Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/browsers/history/the-location-interface/replace-with-nested-iframe.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<html>
<head>
<title>Referer with location.replace and nested frames</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<iframe src="resources/replace-or-assign-call-on-iframe.html?replace" hidden></iframe>
<script>
async_test(function(t) {
function on_message(e) {
const nestedIframeReferrer = e.data;
assert_equals(nestedIframeReferrer, document.querySelector("iframe").contentWindow.location.href);
t.done();
}
window.addEventListener('message', t.step_func(on_message), false);
}, "Browser sends Referer header when location.replace is called in iframe document on another nested iframe element");
</script>
</body>
</html>