diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/support/iframe-and-links.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/support/iframe-and-links.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/support/iframe-and-links.html b/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/support/iframe-and-links.html new file mode 100644 index 0000000000..545b0988ba --- /dev/null +++ b/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/support/iframe-and-links.html @@ -0,0 +1,18 @@ +<!doctype html> + +<iframe name="iframe"></iframe> + +<!-- slow link's response is delayed by 1 second --> +<!-- https://wptserve.readthedocs.io/en/latest/pipes.html#trickle --> +<a target="iframe" href="set-child-loaded.html?pipe=trickle(d1)" id="slowLink">slow link</a> +<a target="iframe" href="javascript:'javascript:string <script> parent.javascriptStringDocLoaded(); </script>'" id="javascriptStringLink">javascript:string link</a> +<a target="iframe" href="javascript:undefined" id="javascriptUndefinedLink">javascript:undefined link</a> + +<script> +// set-child-loaded.html (the slow link) sets this to true. +window.childLoaded = false; + +// Do nothing when the javascript:string doc has loaded, if it's correctly targeted to the above iframe. +// However, if it replaces this document, it needs to fail the test (handled in the parent). +function javascriptStringDocLoaded() {} +</script> |