sandboxing-navigate-parent.html (656B)
1 <!doctype html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <iframe id="i" src="resources/navigate-parent.html" sandbox="allow-scripts allow-same-origin"></iframe> 5 6 <script> 7 async_test(t => { 8 window.onload = t.step_func_done(() => { 9 i.contentWindow.navigateParent(); 10 11 const destinationURL = (new URL("#2", location.href)).href; 12 assert_equals(location.href, destinationURL); 13 assert_equals(navigation.currentEntry.url, destinationURL); 14 }); 15 }, "A sandboxed iframe can use its sibling's navigation object to call navigate(), as long as allow-same-origin is present"); 16 </script>