diff options
author | Moonchild <moonchild@palemoon.org> | 2021-02-25 01:03:57 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-02-25 01:03:57 +0000 |
commit | ceadffab6b357723981a429e11222daf6cd6dcfb (patch) | |
tree | 5603053048d6a460f79b22bdf165fb74d32d39b0 /testing/web-platform/tests/websockets/unload-a-document | |
parent | 14fb2f966e9b54598c451e3cb35b4aa0480dafed (diff) | |
parent | ad5a13bd501e379517da1a944c104a11d951a3f5 (diff) | |
download | UXP-RC_20210225.tar UXP-RC_20210225.tar.gz UXP-RC_20210225.tar.lz UXP-RC_20210225.tar.xz UXP-RC_20210225.zip |
Merge branch 'master' into releaseRC_20210225
Diffstat (limited to 'testing/web-platform/tests/websockets/unload-a-document')
10 files changed, 0 insertions, 196 deletions
diff --git a/testing/web-platform/tests/websockets/unload-a-document/001-1.html b/testing/web-platform/tests/websockets/unload-a-document/001-1.html deleted file mode 100644 index 926a68a06..000000000 --- a/testing/web-platform/tests/websockets/unload-a-document/001-1.html +++ /dev/null @@ -1,28 +0,0 @@ -<!doctype html> -<title>WebSockets: navigating top-level browsing context</title> -<script src=../constants.js?pipe=sub></script> -<meta name="variant" content=""> -<meta name="variant" content="?wss"> -<script> -var controller = opener || parent; -var t = controller.t; -var assert_equals = controller.asset_equals; -var assert_unreached = controller.assert_unreached; -var uuid = controller.uuid; -t.add_cleanup(function() {delete sessionStorage[uuid];}); -t.step(function() { - if (sessionStorage[uuid]) { - t.done(); - } else { - sessionStorage[uuid] = 'true'; - var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo'); - ws.onopen = t.step_func(function(e) { - setTimeout(t.step_func(function() { - assert_unreached('document was not discarded'); - }), 1000); - controller.navigate(); - }) - ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type)); - } -}); -</script> diff --git a/testing/web-platform/tests/websockets/unload-a-document/001-2.html b/testing/web-platform/tests/websockets/unload-a-document/001-2.html deleted file mode 100644 index 24c419ce1..000000000 --- a/testing/web-platform/tests/websockets/unload-a-document/001-2.html +++ /dev/null @@ -1,4 +0,0 @@ -<!doctype html> -<title>WebSockets: navigating top-level browsing context</title> -<body onload="history.back()"></body> -</html> diff --git a/testing/web-platform/tests/websockets/unload-a-document/001.html b/testing/web-platform/tests/websockets/unload-a-document/001.html deleted file mode 100644 index 56e883c64..000000000 --- a/testing/web-platform/tests/websockets/unload-a-document/001.html +++ /dev/null @@ -1,25 +0,0 @@ -<!doctype html> -<title>WebSockets: navigating top-level browsing context</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script src=/common/utils.js></script> -<script src=../constants.js?pipe=sub></script> -<meta name="variant" content=""> -<meta name="variant" content="?wss"> -<p>Test requires popup blocker disabled</p> -<div id=log></div> -<script> -var t = async_test(); -var w; -var uuid; -t.step(function() { - uuid = token() - w = window.open("001-1.html"); - add_result_callback(function() { - w.close(); - }); -}); -navigate = t.step_func(function() { - w.location = w.location.href.replace("001-1.html", "001-2.html"); -}); -</script> diff --git a/testing/web-platform/tests/websockets/unload-a-document/002-1.html b/testing/web-platform/tests/websockets/unload-a-document/002-1.html deleted file mode 100644 index 52f188fa4..000000000 --- a/testing/web-platform/tests/websockets/unload-a-document/002-1.html +++ /dev/null @@ -1,34 +0,0 @@ -<!doctype html> -<title>WebSockets: navigating top-level browsing context with closed websocket</title> -<script src=../constants.js?pipe=sub></script> -<meta name="variant" content=""> -<meta name="variant" content="?wss"> -<script> -var controller = opener || parent; -var t = controller.t; -var assert_equals = controller.asset_equals; -var assert_unreached = controller.assert_unreached ; -var uuid = controller.token; -t.add_cleanup(function() {delete sessionStorage[uuid];}); -t.step(function() { - // this test can fail if the document is unloaded on navigation e.g. due to OOM - if (sessionStorage[uuid]) { - assert_unreached('document was discarded'); - } else { - sessionStorage[uuid] = 'true'; - var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo'); - ws.onopen = t.step_func(function(e) { - - setTimeout(t.step_func(function() { - assert_equals(ws.readyState, ws.CLOSED, 'ws.readyState'); - t.done(); - }), 4000); - ws.close(); - ws.onclose = t.step_func(function() { - controller.navigate(); - }); - }) - ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type)); - } -}); -</script> diff --git a/testing/web-platform/tests/websockets/unload-a-document/002-2.html b/testing/web-platform/tests/websockets/unload-a-document/002-2.html deleted file mode 100644 index 9a246a1dd..000000000 --- a/testing/web-platform/tests/websockets/unload-a-document/002-2.html +++ /dev/null @@ -1,4 +0,0 @@ -<!doctype html> -<title>WebSockets: navigating top-level browsing context with closed websocket</title> -<body onload="history.back()"></body> -</html> diff --git a/testing/web-platform/tests/websockets/unload-a-document/002.html b/testing/web-platform/tests/websockets/unload-a-document/002.html deleted file mode 100644 index 03764c345..000000000 --- a/testing/web-platform/tests/websockets/unload-a-document/002.html +++ /dev/null @@ -1,26 +0,0 @@ -<!doctype html> -<title>WebSockets: navigating top-level browsing context with closed websocket</title> -<meta name=timeout content=long> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script src=/common/utils.js></script> -<script src=../constants.js?pipe=sub></script> -<meta name="variant" content=""> -<meta name="variant" content="?wss"> -<p>Test requires popup blocker disabled</p> -<div id=log></div> -<script> -var t = async_test(null, {timeout:15000}); -var w; -var uuid; -t.step(function() { - uuid = token() - w = window.open("002-1.html"); - add_result_callback(function() { - w.close(); - }); -}); -navigate = t.step_func(function() { - w.location = w.location.href.replace("002-1.html", "002-2.html"); -}); -</script> diff --git a/testing/web-platform/tests/websockets/unload-a-document/003.html b/testing/web-platform/tests/websockets/unload-a-document/003.html deleted file mode 100644 index 554daf458..000000000 --- a/testing/web-platform/tests/websockets/unload-a-document/003.html +++ /dev/null @@ -1,14 +0,0 @@ -<!doctype html> -<title>WebSockets: navigating nested browsing context</title> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script src=/common/utils.js></script> -<div id=log></div> -<script> -var uuid; -var t = async_test(function() {uuid = token()}); -var navigate = t.step_func(function() { - document.getElementsByTagName("iframe")[0].src = 'data:text/html,<body onload="history.back()">'; -}); -</script> -<iframe src=001-1.html></iframe>
\ No newline at end of file diff --git a/testing/web-platform/tests/websockets/unload-a-document/004.html b/testing/web-platform/tests/websockets/unload-a-document/004.html deleted file mode 100644 index 0ef4fbc9f..000000000 --- a/testing/web-platform/tests/websockets/unload-a-document/004.html +++ /dev/null @@ -1,16 +0,0 @@ -<!doctype html> -<title>WebSockets: navigating nested browsing context with closed websocket</title> -<meta name=timeout content=long> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script src=/common/utils.js></script> -<div id=log></div> -<script> -var uuid; -var t = async_test(null, {timeout:15000}) -t.step(function() {uuid = token()}); -var navigate = t.step_func(function() { - document.getElementsByTagName("iframe")[0].src = 'data:text/html,<body onload="history.back()">'; -}); -</script> -<iframe src=002-1.html></iframe> diff --git a/testing/web-platform/tests/websockets/unload-a-document/005-1.html b/testing/web-platform/tests/websockets/unload-a-document/005-1.html deleted file mode 100644 index 04a14874a..000000000 --- a/testing/web-platform/tests/websockets/unload-a-document/005-1.html +++ /dev/null @@ -1,25 +0,0 @@ -<!doctype html> -<title>WebSockets: navigating nested browsing context with a websocket in top-level</title> -<script src=../constants.js?pipe=sub></script> -<meta name="variant" content=""> -<meta name="variant" content="?wss"> -<script> -var t = opener.t; -var assert_unreached = opener.assert_unreached; -var hasRun = false; -function run(){ - var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo'); - ws.onopen = t.step_func(function(e) { - setTimeout(t.step_func(function() { - ws.send('test'); - }), 1000); - window[0].location = 'data:text/html,<body onload="history.back()">'; - ws.onmessage = t.step_func(function(e) { - ws.close(); - t.done(); - }); - }); - ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached("Got unexpected event " + e.type)}); -} -</script> -<iframe src='data:text/html,foo' onload='if (hasRun) return; hasRun = true; t.step(run)'></iframe> diff --git a/testing/web-platform/tests/websockets/unload-a-document/005.html b/testing/web-platform/tests/websockets/unload-a-document/005.html deleted file mode 100644 index 4bafe8b60..000000000 --- a/testing/web-platform/tests/websockets/unload-a-document/005.html +++ /dev/null @@ -1,20 +0,0 @@ -<!doctype html> -<title>WebSockets: navigating nested browsing context with a websocket in top-level</title> -<meta name=timeout content=long> -<script src=/resources/testharness.js></script> -<script src=/resources/testharnessreport.js></script> -<script src=../constants.js?pipe=sub></script> -<meta name="variant" content=""> -<meta name="variant" content="?wss"> -<div id=log></div> -<p>Test requires popup blocker disabled</p> -<div id=log></div> -<script> -var t = async_test(null, {timeout:15000}); -t.step(function() { - var w = window.open("005-1.html"); - add_result_callback(function() { - w.close(); - }); -}); -</script> |