diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html b/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html new file mode 100644 index 0000000000..4aea4aac81 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>"load" & "pageshow" events do not fire on contentWindow of iframe that stays on the initial empty document</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/helpers.js"></script> +<body></body> +<script> +"use strict"; + +promise_test(async t => { + const iframe = document.createElement("iframe"); + document.body.appendChild(iframe); + return assertNoLoadAndPageshowEvent(t, iframe.contentWindow); +}, "load & pageshow event do not fire on contentWindow of <iframe> element created with no src"); + +promise_test(async t => { + const iframe = document.createElement("iframe"); + iframe.src = ""; + document.body.appendChild(iframe); + return assertNoLoadAndPageshowEvent(t, iframe.contentWindow); +}, "load & pageshow events do not fire on contentWindow of <iframe> element created with src=''"); + +promise_test(async t => { + const iframe = document.createElement("iframe"); + iframe.src = "about:blank"; + document.body.appendChild(iframe); + return assertNoLoadAndPageshowEvent(t, iframe.contentWindow); +}, "load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank'"); + +promise_test(async t => { + const iframe = document.createElement("iframe"); + iframe.src = "about:blank#foo"; + document.body.appendChild(iframe); + return assertNoLoadAndPageshowEvent(t, iframe.contentWindow); +}, "load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank#foo'"); + +promise_test(async t => { + const iframe = document.createElement("iframe"); + iframe.src = "about:blank?foo"; + document.body.appendChild(iframe); + return assertNoLoadAndPageshowEvent(t, iframe.contentWindow); +}, "load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank?foo'"); +</script> |