Skip to content

Commit

Permalink
Flip tests for bubbles/cancelable on pageshow/pagehide
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Jun 24, 2021
1 parent 968c68e commit a658b79
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions html/browsers/browsing-the-web/history-traversal/001.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
events.forEach(function(e, i) {
phase = i ? "after" : "before";
assert_equals(e.type, "pageshow", "type " + phase + " navigation");

// https://github.com/whatwg/html/issues/6794
assert_equals(e.bubbles, true, "bubbles " + phase + " navigation");
assert_equals(e.cancelable, true, "cancelable " + phase + " navigation");

assert_equals(e.persisted, i == 0 ? false : true, "persisted " + phase + " navigation");
t.done();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
assert_equals(e.type, "pagehide");
assert_equals(e.target, iframe.contentDocument);
assert_equals(e.currentTarget, iframe.contentWindow);
assert_false(e.bubbles, "bubbles");
assert_false(e.cancelable, "cancelable");

// https://github.com/whatwg/html/issues/6794
assert_true(e.bubbles, "bubbles");
assert_true(e.cancelable, "cancelable");

assert_true(e.persisted, "persisted");
}

Expand Down
7 changes: 5 additions & 2 deletions html/syntax/parsing/the-end.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@
async_test(function() {
window.addEventListener("pageshow", this.step_func_done(function(e) {
assert_equals(e.type, "pageshow");
assert_false(e.bubbles, "bubbles should be false");
assert_false(e.cancelable, "cancelable should be false");

// https://github.com/whatwg/html/issues/6794
assert_true(e.bubbles, "bubbles should be true");
assert_true(e.cancelable, "cancelable should be true");

assert_equals(e.target, document, "target should be document");
assert_true(e.isTrusted, "isTrusted should be true");
assert_class_string(e, "PageTransitionEvent");
Expand Down

0 comments on commit a658b79

Please sign in to comment.