mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
update "navigation within beforeunload" test to match the spec
This commit is contained in:
parent
a297e8f288
commit
9467543c80
4 changed files with 6 additions and 8 deletions
|
@ -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 {
|
||||
|
|
|
@ -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": [
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[navigation-within-beforeunload.html]
|
||||
type: testharness
|
||||
[Triggering navigation from within beforeunload event]
|
||||
expected: FAIL
|
||||
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue