diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/same-document-nav-stop.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/same-document-nav-stop.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/same-document-nav-stop.html b/testing/web-platform/tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/same-document-nav-stop.html new file mode 100644 index 0000000000..a9036209a5 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/same-document-nav-stop.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Stop after a same-document navigations</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> +<script type="module"> +import { createIframe } from "./resources/helpers.mjs"; + +promise_test(async t => { + const iframe = await createIframe(t); + + iframe.contentWindow.location.hash = "#1"; + iframe.contentWindow.stop(); + + assert_equals(iframe.contentWindow.location.hash, "#1"); +}, "fragment navigations are not stopped by stop()"); + +promise_test(async t => { + const iframe = await createIframe(t); + + iframe.contentWindow.history.pushState(null, "", "?1"); + iframe.contentWindow.stop(); + + assert_equals(iframe.contentWindow.location.search, "?1"); +}, "pushState() navigations are not stopped by stop()"); +</script> |