assign-with-nested-iframe.html (807B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>Referer with location.assign and nested frames</title> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 </head> 8 <body> 9 <iframe src="resources/replace-or-assign-call-on-iframe.html?assign" hidden></iframe> 10 <script> 11 async_test(function(t) { 12 function on_message(e) { 13 const nestedIframeReferrer = e.data; 14 assert_equals(nestedIframeReferrer, document.querySelector("iframe").contentWindow.location.href); 15 t.done(); 16 } 17 window.addEventListener('message', t.step_func(on_message), false); 18 }, "Browser sends Referer header when location.assign is called in iframe document on another nested iframe element"); 19 </script> 20 </body> 21 </html>