From 4b7a2c677a8bda717cbc21f8e06ee43c0d9f0005 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 6 May 2018 14:31:20 +0200 Subject: moebius#231: Consider blocking top level window data: URIs (tests) https://github.com/MoonchildProductions/moebius/pull/231 --- testing/web-platform/tests/websockets/unload-a-document/001-1.html | 2 +- testing/web-platform/tests/websockets/unload-a-document/001-2.html | 4 ++++ testing/web-platform/tests/websockets/unload-a-document/001.html | 2 +- testing/web-platform/tests/websockets/unload-a-document/002-1.html | 2 +- testing/web-platform/tests/websockets/unload-a-document/002-2.html | 4 ++++ testing/web-platform/tests/websockets/unload-a-document/002.html | 2 +- 6 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 testing/web-platform/tests/websockets/unload-a-document/001-2.html create mode 100644 testing/web-platform/tests/websockets/unload-a-document/002-2.html (limited to 'testing/web-platform') 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 index 214246b2e..926a68a06 100644 --- a/testing/web-platform/tests/websockets/unload-a-document/001-1.html +++ b/testing/web-platform/tests/websockets/unload-a-document/001-1.html @@ -22,7 +22,7 @@ t.step(function() { }), 1000); controller.navigate(); }) - ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached("Got unexpected event " + e.type)}); + ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type)); } }); 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 new file mode 100644 index 000000000..24c419ce1 --- /dev/null +++ b/testing/web-platform/tests/websockets/unload-a-document/001-2.html @@ -0,0 +1,4 @@ + +WebSockets: navigating top-level browsing context + + diff --git a/testing/web-platform/tests/websockets/unload-a-document/001.html b/testing/web-platform/tests/websockets/unload-a-document/001.html index d949b6eba..56e883c64 100644 --- a/testing/web-platform/tests/websockets/unload-a-document/001.html +++ b/testing/web-platform/tests/websockets/unload-a-document/001.html @@ -20,6 +20,6 @@ t.step(function() { }); }); navigate = t.step_func(function() { - w.location = 'data:text/html,'; + w.location = w.location.href.replace("001-1.html", "001-2.html"); }); 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 index 86a852b10..52f188fa4 100644 --- a/testing/web-platform/tests/websockets/unload-a-document/002-1.html +++ b/testing/web-platform/tests/websockets/unload-a-document/002-1.html @@ -28,7 +28,7 @@ t.step(function() { controller.navigate(); }); }) - ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached("Got unexpected event " + e.type)}); + ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type)); } }); 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 new file mode 100644 index 000000000..9a246a1dd --- /dev/null +++ b/testing/web-platform/tests/websockets/unload-a-document/002-2.html @@ -0,0 +1,4 @@ + +WebSockets: navigating top-level browsing context with closed websocket + + diff --git a/testing/web-platform/tests/websockets/unload-a-document/002.html b/testing/web-platform/tests/websockets/unload-a-document/002.html index df35192d6..03764c345 100644 --- a/testing/web-platform/tests/websockets/unload-a-document/002.html +++ b/testing/web-platform/tests/websockets/unload-a-document/002.html @@ -21,6 +21,6 @@ t.step(function() { }); }); navigate = t.step_func(function() { - w.location = 'data:text/html,'; + w.location = w.location.href.replace("002-1.html", "002-2.html"); }); -- cgit v1.2.3