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/assign-with-nested-iframe.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<html>
<head>
<title>Referer with location.assign 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?assign" 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.assign is called in iframe document on another nested iframe element");
</script>
</body>
</html>