Bug 1469205 [wpt PR 11355] - Update hashchange/popstate event tests, a=testonly
authorPhilip Jägenstedt <philip@foolip.org>
Tue, 26 Jun 2018 02:58:24 +0000
changeset 812115 d97405360c9af7a51a24881e2664424f6b36b003
parent 812114 73b0e112fdfcff9d3bb465a9ec65ac257f149817
child 812116 dff80c86a463e9fb30f5a3886fbc39462c177c2c
push id114453
push userrwood@mozilla.com
push dateThu, 28 Jun 2018 15:10:03 +0000
reviewerstestonly
bugs1469205, 11355
milestone63.0a1
Bug 1469205 [wpt PR 11355] - Update hashchange/popstate event tests, a=testonly Automatic update from web-platform-testsHTML: update hashchange/popstate event tests For https://github.com/whatwg/html/pull/3737. -- wpt-commits: 81303e16ee14b318d07c9aeb56e16e7499647b7a wpt-pr: 11355
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/hashchange_event.html
testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/popstate_event.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -568708,17 +568708,17 @@
    "f875c45ed23c6599aaa0f6dbbe71b56413c0a75f",
    "support"
   ],
   "html/browsers/browsing-the-web/history-traversal/events.html": [
    "3e58347f94b836d727fb524198c3aba9e806459e",
    "testharness"
   ],
   "html/browsers/browsing-the-web/history-traversal/hashchange_event.html": [
-   "4471d424840818a9e3bc5507680a20a6707530b9",
+   "14ca22c06495da0cf734956ddb2f3c25017fa36c",
    "testharness"
   ],
   "html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/blank1.html": [
    "8e53f080578b3d78e55938ad612ba8c4cfd2cb05",
    "support"
   ],
   "html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/blank2.html": [
    "10e0a7f90ca929fd3cfe295c49b59cfd0c5d5070",
@@ -568752,17 +568752,17 @@
    "9a2631564f17e1e156fc6fd4fff0a595e490ba07",
    "testharness"
   ],
   "html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-navigation-samedoc.html": [
    "8f266717a7be3336b00b8bcef70e003bbb2c2e9d",
    "testharness"
   ],
   "html/browsers/browsing-the-web/history-traversal/popstate_event.html": [
-   "ba82d7fe6f6a903e60987e07a0ad3087d7988837",
+   "ed84161a523f48546ffc2fd8ba92d16ba0f247fb",
    "testharness"
   ],
   "html/browsers/browsing-the-web/history-traversal/resources/a.html": [
    "2c1876f92327cf435c5c5c05a8df85f35a26b484",
    "support"
   ],
   "html/browsers/browsing-the-web/history-traversal/resources/b.html": [
    "376cfd38479bcdaf7cb676c57d65b8bba134f0c9",
--- a/testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/hashchange_event.html
+++ b/testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/hashchange_event.html
@@ -13,21 +13,21 @@ window.onload = t.step_func(function () 
   var root = location.href;
   var oldURLs = [];
   var newURLs = [];
 
   var timer = null;
 
   location.hash = 'foo';
   window.onhashchange = t.step_func(function (e) {
-    assert_true(e.isTrusted);
-    assert_equals(e.target, window);
-    assert_equals(e.type, "hashchange");
-    assert_true(e instanceof HashChangeEvent);
-    assert_true(e.bubbles, "bubble");
+    assert_true(e.isTrusted, "isTrusted");
+    assert_equals(e.target, window, "target");
+    assert_equals(e.type, "hashchange", "type");
+    assert_true(e instanceof HashChangeEvent, "is HashChangeEvent");
+    assert_false(e.bubbles, "bubbles");
     assert_false(e.cancelable, "cancelable");
     oldURLs.push(e.oldURL);
     newURLs.push(e.newURL);
     if (newURLs.length === 2) {
       check_result();
     } else if (timer === null) {
       timer = setTimeout(function() {check_result()}, 500);
     }
--- a/testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/popstate_event.html
+++ b/testing/web-platform/tests/html/browsers/browsing-the-web/history-traversal/popstate_event.html
@@ -10,16 +10,23 @@ window.onload = t.step_func(function () 
 
   var timer = null;
 
   history.pushState("a", "State a", "/a");
   history.pushState("b", "State b", "/b");
 
   history.back();
   window.onpopstate = t.step_func(function (e) {
+    assert_true(e.isTrusted, "isTrusted");
+    assert_equals(e.target, window, "target");
+    assert_equals(e.type, "popstate", "type");
+    assert_true(e instanceof PopStateEvent, "is PopStateEvent");
+    assert_false(e.bubbles, "bubbles");
+    assert_false(e.cancelable, "cancelable");
+
     states.push(e.state);
 
     if (states.length === 2) {
       check_result();
     } else if (timer === null) {
       timer = setTimeout(function() {check_result()}, 500);
     }
   })