From a773576eee6d2a0065f93d75e5686dc9baeb4972 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Mon, 11 Sep 2017 13:14:57 +0200 Subject: [PATCH] Bug 1398574 - Update tests within websockets/ to comply with new toplevel data: URI navigation policy. r=jgraham,valentin --- testing/web-platform/meta/MANIFEST.json | 26 ++++++++++++++++--- .../websockets/unload-a-document/001-1.html | 2 +- .../websockets/unload-a-document/001-2.html | 4 +++ .../websockets/unload-a-document/001.html | 2 +- .../websockets/unload-a-document/002-1.html | 2 +- .../websockets/unload-a-document/002-2.html | 4 +++ .../websockets/unload-a-document/002.html | 2 +- 7 files changed, 34 insertions(+), 8 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 diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index d9d7cc7e4705..ff848c3b7dc5 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -316674,11 +316674,21 @@ {} ] ], + "websockets/unload-a-document/001-2.html": [ + [ + {} + ] + ], "websockets/unload-a-document/002-1.html": [ [ {} ] ], + "websockets/unload-a-document/002-2.html": [ + [ + {} + ] + ], "websockets/unload-a-document/005-1.html": [ [ {} @@ -639546,19 +639556,27 @@ "support" ], "websockets/unload-a-document/001-1.html": [ - "5388c58ec7f586a8c79da8955ea25ff0350a08ff", + "89f76dff719f15fce07b674aa4bcc971610da686", + "support" + ], + "websockets/unload-a-document/001-2.html": [ + "facbeee79f931d0ba88163abac18b38bff94f260", "support" ], "websockets/unload-a-document/001.html": [ - "bcfd6cdc6b9dc497c3828fe0a77f1db3676be495", + "f78f6bc059375d19b8ac2619fba93b12e5506132", "testharness" ], "websockets/unload-a-document/002-1.html": [ - "284ca768f294b0716ada9f2936f3862e075388c2", + "353ee429f9d6e90d86f0de251f7ad86f436ad4e2", + "support" + ], + "websockets/unload-a-document/002-2.html": [ + "e689149429d1e29775d7c7f6f5ad6afdde0a1b39", "support" ], "websockets/unload-a-document/002.html": [ - "f39414dbf15f502f6be82324bbf389e75532cb6b", + "aaf934be13d0c9df63a1ff5da6d90cb290855b11", "testharness" ], "websockets/unload-a-document/003.html": [ 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 8ae83af3795a..bd0c36686954 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(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 000000000000..24c419ce1855 --- /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 d949b6eba09d..56e883c6492b 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 8432d84db70a..d151b231f250 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(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 000000000000..9a246a1dd8dd --- /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 df35192d6a41..03764c345e9a 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"); });