diff options
4 files changed, 6 insertions, 8 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 00f65b60611..dcd9c2e0756 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -1560,7 +1560,7 @@ impl Window { let pipeline_id = self.upcast::<GlobalScope>().pipeline_id(); - // Step 4 + // Step 4 and 5 let window_proxy = self.window_proxy(); if let Some(active) = window_proxy.currently_active() { if pipeline_id == active { diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 1e38218000f..581f5b7a4c3 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -564742,7 +564742,7 @@ "support" ], "html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html": [ - "8e48ede5ef227e88a091f1d33b385d0b3dff713c", + "49a3e27670f5902309f45be654ad9e12d7f9c500", "testharness" ], "html/browsers/browsing-the-web/unloading-documents/pagehide-on-history-forward-1.html": [ diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html.ini deleted file mode 100644 index c22659da3d5..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[navigation-within-beforeunload.html] - type: testharness - [Triggering navigation from within beforeunload event] - expected: FAIL - diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html index d7131b00db9..d6ecf5d52f3 100644 --- a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/navigation-within-beforeunload.html @@ -15,7 +15,10 @@ onload = function() {setTimeout(function() { iframe.onload = function() { setTimeout(function() {iframe.contentWindow.location="navigation-within-beforeunload-2.html";}, 100); - iframe.onload = t.step_func(function() {assert_equals(counter, 1000); t.done()}); + // Step 4 of https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigating-across-documents + // doesn't seem to allow navigation within a beforeunload handler, + // so the counter should not go beyond 1. + iframe.onload = t.step_func(function() {assert_equals(counter, 1); t.done()}); }; iframe.src = "navigation-within-beforeunload-1.html?" + Math.random(); |