Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!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>