same-document-nav-stop.html (830B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>Stop after a same-document navigations</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 7 <body> 8 <script type="module"> 9 import { createIframe } from "./resources/helpers.mjs"; 10 11 promise_test(async t => { 12 const iframe = await createIframe(t); 13 14 iframe.contentWindow.location.hash = "#1"; 15 iframe.contentWindow.stop(); 16 17 assert_equals(iframe.contentWindow.location.hash, "#1"); 18 }, "fragment navigations are not stopped by stop()"); 19 20 promise_test(async t => { 21 const iframe = await createIframe(t); 22 23 iframe.contentWindow.history.pushState(null, "", "?1"); 24 iframe.contentWindow.stop(); 25 26 assert_equals(iframe.contentWindow.location.search, "?1"); 27 }, "pushState() navigations are not stopped by stop()"); 28 </script>