Commit f740ff40 authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Commit Bot

Import wpt@7fe3903b54bd58ee3039858f4c66bc492195fd39

Using wpt-import in Chromium 00c23f03.

Build: https://ci.chromium.org/buildbot/chromium.infra.cron/wpt-importer/7692

Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md

TBR=leon.han@intel.com

No-Export: true
Change-Id: I76bf3bfa205dd1ae5e38266db56b13b80c35aa35
Reviewed-on: https://chromium-review.googlesource.com/826384
Commit-Queue: Blink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Reviewed-by: default avatarBlink WPT Bot <blink-w3c-test-autoroller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524047}
parent 593547ab
...@@ -10,6 +10,11 @@ test(function () { ...@@ -10,6 +10,11 @@ test(function () {
'There should be no PopStateEvent#initPopStateEvent'); 'There should be no PopStateEvent#initPopStateEvent');
}, 'initPopStateEvent'); }, 'initPopStateEvent');
test(function () {
var popStateEvent = new PopStateEvent("popstate");
assert_equals(popStateEvent.state, null, "the PopStateEvent.state");
}, "Initial value of PopStateEvent.state must be null");
test(function () { test(function () {
var state = history.state; var state = history.state;
var data; var data;
......
This is a testharness.js-based test.
FAIL Queue a task to fire hashchange event assert_true: bubble expected true got false
Harness: the test ran to completion.
...@@ -18,6 +18,12 @@ window.onload = t.step_func(function () { ...@@ -18,6 +18,12 @@ window.onload = t.step_func(function () {
location.hash = 'foo'; location.hash = 'foo';
window.onhashchange = t.step_func(function (e) { 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_false(e.cancelable, "cancelable");
oldURLs.push(e.oldURL); oldURLs.push(e.oldURL);
newURLs.push(e.newURL); newURLs.push(e.newURL);
if (newURLs.length === 2) { if (newURLs.length === 2) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment