diff --git a/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/buffer-is-detached.https.window.js.ini b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/buffer-is-detached.https.window.js.ini new file mode 100644 index 00000000000..689b45fc5b3 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/buffer-is-detached.https.window.js.ini @@ -0,0 +1,4 @@ +[buffer-is-detached.https.window.html] + [writeValueWithResponse() fails when passed a detached buffer] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/characteristic-is-removed.https.window.js.ini b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/characteristic-is-removed.https.window.js.ini new file mode 100644 index 00000000000..c5032c5b28b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/characteristic-is-removed.https.window.js.ini @@ -0,0 +1,4 @@ +[characteristic-is-removed.https.window.html] + [Characteristic gets removed. Reject with InvalidStateError.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/gen-characteristic-is-removed.https.window.js.ini b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/gen-characteristic-is-removed.https.window.js.ini new file mode 100644 index 00000000000..e31590e2b73 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/gen-characteristic-is-removed.https.window.js.ini @@ -0,0 +1,4 @@ +[gen-characteristic-is-removed.https.window.html] + [Characteristic gets removed. Reject with InvalidStateError.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/service-is-removed.https.window.js.ini b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/service-is-removed.https.window.js.ini new file mode 100644 index 00000000000..6fde66b04c8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/service-is-removed.https.window.js.ini @@ -0,0 +1,4 @@ +[service-is-removed.https.window.html] + [Service gets removed. Reject with InvalidStateError.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/write-succeeds.https.window.js.ini b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/write-succeeds.https.window.js.ini new file mode 100644 index 00000000000..df37a229b93 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithResponse/write-succeeds.https.window.js.ini @@ -0,0 +1,4 @@ +[write-succeeds.https.window.html] + [A regular write request to a writable characteristic should succeed.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/buffer-is-detached.https.window.js.ini b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/buffer-is-detached.https.window.js.ini new file mode 100644 index 00000000000..54b3c859672 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/buffer-is-detached.https.window.js.ini @@ -0,0 +1,4 @@ +[buffer-is-detached.https.window.html] + [writeValueWithoutResponse() fails when passed a detached buffer] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/characteristic-is-removed.https.window.js.ini b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/characteristic-is-removed.https.window.js.ini new file mode 100644 index 00000000000..c5032c5b28b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/characteristic-is-removed.https.window.js.ini @@ -0,0 +1,4 @@ +[characteristic-is-removed.https.window.html] + [Characteristic gets removed. Reject with InvalidStateError.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/gen-characteristic-is-removed.https.window.js.ini b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/gen-characteristic-is-removed.https.window.js.ini new file mode 100644 index 00000000000..e31590e2b73 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/gen-characteristic-is-removed.https.window.js.ini @@ -0,0 +1,4 @@ +[gen-characteristic-is-removed.https.window.html] + [Characteristic gets removed. Reject with InvalidStateError.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/service-is-removed.https.window.js.ini b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/service-is-removed.https.window.js.ini new file mode 100644 index 00000000000..6fde66b04c8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/service-is-removed.https.window.js.ini @@ -0,0 +1,4 @@ +[service-is-removed.https.window.html] + [Service gets removed. Reject with InvalidStateError.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/write-succeeds.https.window.js.ini b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/write-succeeds.https.window.js.ini new file mode 100644 index 00000000000..df37a229b93 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/bluetooth/characteristic/writeValueWithoutResponse/write-succeeds.https.window.js.ini @@ -0,0 +1,4 @@ +[write-succeeds.https.window.html] + [A regular write request to a writable characteristic should succeed.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini deleted file mode 100644 index f29da48a2a0..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-003.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/compositing/mix-blend-mode/mix-blend-mode-animation.html.ini b/tests/wpt/metadata-layout-2020/css/compositing/mix-blend-mode/mix-blend-mode-animation.html.ini deleted file mode 100644 index a647125277a..00000000000 --- a/tests/wpt/metadata-layout-2020/css/compositing/mix-blend-mode/mix-blend-mode-animation.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[mix-blend-mode-animation.html] - expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini index 4a1e8110f6f..f8e7e539aae 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini @@ -2,3 +2,6 @@ [Hit test intersecting scaled box] expected: FAIL + [Hit test within unscaled box] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-ui/appearance-transition.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/css-ui/appearance-transition.tentative.html.ini new file mode 100644 index 00000000000..bb169f7f284 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-ui/appearance-transition.tentative.html.ini @@ -0,0 +1,2 @@ +[appearance-transition.tentative.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index 628b1fab770..c884dc82eab 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -2,3 +2,6 @@ [listeners are called when + + diff --git a/tests/wpt/web-platform-tests/event-timing/resources/event-timing-test-utils.js b/tests/wpt/web-platform-tests/event-timing/resources/event-timing-test-utils.js index 6045a054e7c..d01ff1d27d4 100644 --- a/tests/wpt/web-platform-tests/event-timing/resources/event-timing-test-utils.js +++ b/tests/wpt/web-platform-tests/event-timing/resources/event-timing-test-utils.js @@ -182,6 +182,26 @@ function notCancelable(eventType) { return ['mouseenter', 'mouseleave', 'pointerenter', 'pointerleave'].includes(eventType); } +// Tests the given |eventType|'s performance.eventCounts value. Since this is populated only when +// the event is processed, we check every 10 ms until we've found the |expectedCount|. +function testCounts(t, resolve, looseCount, eventType, expectedCount) { + const counts = performance.eventCounts.get(eventType); + if (counts < expectedCount) { + t.step_timeout(() => { + testCounts(t, resolve, looseCount, eventType, expectedCount); + }, 10); + return; + } + if (looseCount) { + assert_greater_than_equal(performance.eventCounts.get(eventType), expectedCount, + `Should have at least ${expectedCount} ${eventType} events`) + } else { + assert_equals(performance.eventCounts.get(eventType), expectedCount, + `Should have ${expectedCount} ${eventType} events`); + } + resolve(); +} + // Tests the given |eventType| by creating events whose target are the element with id // 'target'. The test assumes that such element already exists. |looseCount| is set for // eventTypes for which events would occur for other elements besides the target, so the @@ -197,13 +217,9 @@ async function testEventType(t, eventType, looseCount=false) { // Trigger two 'fast' events of the type. await applyAction(eventType, target); await applyAction(eventType, target); - if (looseCount) { - assert_greater_than_equal(performance.eventCounts.get(eventType), 2, - `Should have at least 2 ${eventType} events`) - } else { - assert_equals(performance.eventCounts.get(eventType), 2, - `Should have 2 ${eventType} events`); - } + await new Promise(t.step_func(resolve => { + testCounts(t, resolve, looseCount, eventType, 2); + })); // The durationThreshold used by the observer. A slow events needs to be slower than that. const durationThreshold = 16; // Now add an event handler to cause a slow event. @@ -236,14 +252,9 @@ async function testEventType(t, eventType, looseCount=false) { false /* isFirst */, durationThreshold, notCancelable(eventType)); - if (looseCount) { - assert_greater_than_equal(performance.eventCounts.get(eventType), 3, - `Should have at least 3 ${eventType} events`) - } else { - assert_equals(performance.eventCounts.get(eventType), 3, - `Should have 3 ${eventType} events`); - } - resolve(); + // Shouldn't need async testing here since we already got the observer entry, but might as + // well reuse the method. + testCounts(t, resolve, looseCount, eventType, 3); })).observe({type: 'event', durationThreshold: durationThreshold}); }); // Cause a slow event. diff --git a/tests/wpt/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-disabled-tentative.html b/tests/wpt/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-disabled-tentative.html new file mode 100644 index 00000000000..c4413f7804f --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-disabled-tentative.html @@ -0,0 +1,51 @@ + + + + + 'focus-without-user-activation' Policy : Correctly block automatic focus when policy disabled + + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-enabled-tentative.sub.html b/tests/wpt/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-enabled-tentative.sub.html new file mode 100644 index 00000000000..411e4f2fa06 --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-enabled-tentative.sub.html @@ -0,0 +1,51 @@ + + + + + 'focus-without-user-activation' Policy : Correctly block automatic focus when policy disabled + + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-tentative.sub.html b/tests/wpt/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-tentative.sub.html deleted file mode 100644 index ad90864fa47..00000000000 --- a/tests/wpt/web-platform-tests/feature-policy/experimental-features/focus-without-user-activation-tentative.sub.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - 'focus-without-user-activation' Policy : Correctly block automatic focus when policy disabled - - - - - diff --git a/tests/wpt/web-platform-tests/feature-policy/experimental-features/resources/focus-without-user-activation-iframe-tentative.html b/tests/wpt/web-platform-tests/feature-policy/experimental-features/resources/focus-without-user-activation-iframe-tentative.html new file mode 100644 index 00000000000..3d5aab95add --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/experimental-features/resources/focus-without-user-activation-iframe-tentative.html @@ -0,0 +1,47 @@ + + + diff --git a/tests/wpt/web-platform-tests/feature-policy/experimental-features/resources/focus_steal.html b/tests/wpt/web-platform-tests/feature-policy/experimental-features/resources/focus_steal.html deleted file mode 100644 index 43e8688117d..00000000000 --- a/tests/wpt/web-platform-tests/feature-policy/experimental-features/resources/focus_steal.html +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html b/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html index 3d9530c26f6..30525d8a3cd 100644 --- a/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html +++ b/tests/wpt/web-platform-tests/feature-policy/resources/feature-policy-nested-subframe-policy.https.sub.html @@ -2,12 +2,16 @@ diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cors/support/cors-tester.py b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cors/support/cors-tester.py index 7ec7b160115..ad1cce1922e 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cors/support/cors-tester.py +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cors/support/cors-tester.py @@ -1,51 +1,50 @@ from wptserve.handlers import HTTPException -import urllib def main(request, response): - if request.method != "GET": - raise HTTPException(400, message="Method was not GET") + if request.method != u"GET": + raise HTTPException(400, message=u"Method was not GET") - if not "id" in request.GET: - raise HTTPException(400, message="No id") + if not b"id" in request.GET: + raise HTTPException(400, message=u"No id") - id = request.GET['id'] - - if "read" in request.GET: + id = request.GET[b'id'] + if b"read" in request.GET: data = request.server.stash.take(id) if data is None: - response.set_error(404, "Tried to read data not yet set") + response.set_error(404, u"Tried to read data not yet set") return - return [("Content-Type", "text/plain")], data + return [(b"Content-Type", b"text/plain")], data - elif "cleanup" in request.GET: + elif b"cleanup" in request.GET: request.server.stash.take(id) - return "OK" + return b"OK" - elif "delete-cookie" in request.GET: + elif b"delete-cookie" in request.GET: response.delete_cookie(id) - return [("Content-Type", "text/plain")], "OK" + return [(b"Content-Type", b"text/plain")], b"OK" - if "origin" in request.GET: - response.headers.set('Access-Control-Allow-Origin', request.GET['origin']) - response.headers.set('Access-Control-Allow-Credentials', 'true') + if b"origin" in request.GET: + response.headers.set(b'Access-Control-Allow-Origin', request.GET[b'origin']) + response.headers.set(b'Access-Control-Allow-Credentials', b'true') - cors = request.headers.get("origin", "no") + cors = request.headers.get(b"origin", b"no") cookie = request.cookies.first(id, None) - cookie_value = cookie.value if cookie is not None else "no" - line = 'cors = ' + cors + ' | cookie = ' + cookie_value; + cookie_value = cookie.value if cookie is not None else b"no" + + line = b'cors = ' + cors + b' | cookie = ' + cookie_value data = request.server.stash.take(id) if data is not None: - line = data + "\n" + line + line = data + b"\n" + line request.server.stash.put(id, line) - if "redirect" in request.GET: + if b"redirect" in request.GET: response.status = 302 - response.headers.set('Location', request.GET['redirect']) + response.headers.set(b'Location', request.GET[b'redirect']) else: - return """WEBVTT + return b"""WEBVTT 00:00:00.000 --> 00:00:10.000 Test""" diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.py b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.py index e4216c6d53f..3e2d9917d90 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.py +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/404-response-with-actual-image-data.py @@ -1,3 +1,3 @@ import base64 def main(req, res): - return 404, [('Content-Type', 'image/png')], base64.decodestring("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAhSURBVDhPY3wro/KfgQLABKXJBqMGjBoAAqMGDLwBDAwAEsoCTFWunmQAAAAASUVORK5CYII=") + return 404, [(b'Content-Type', b'image/png')], base64.decodestring(b"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAhSURBVDhPY3wro/KfgQLABKXJBqMGjBoAAqMGDLwBDAwAEsoCTFWunmQAAAAASUVORK5CYII=") diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-object-element/object-construct-in-document-with-null-browsing-context-crash.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-object-element/object-construct-in-document-with-null-browsing-context-crash.html new file mode 100644 index 00000000000..7248368656d --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-object-element/object-construct-in-document-with-null-browsing-context-crash.html @@ -0,0 +1,11 @@ +HTMLObjectElement: construct in a document with a null browsing context + + + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/form-submission.py b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/form-submission.py index b296ac44c57..f0c2d4cf61f 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/form-submission.py +++ b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/resources/form-submission.py @@ -1,12 +1,12 @@ def main(request, response): - if request.headers.get('Content-Type') == 'application/x-www-form-urlencoded': - result = request.body == 'foo=bara' - elif request.headers.get('Content-Type') == 'text/plain': - result = request.body == 'qux=baz\r\n' + if request.headers.get(b'Content-Type') == b'application/x-www-form-urlencoded': + result = request.body == b'foo=bara' + elif request.headers.get(b'Content-Type') == b'text/plain': + result = request.body == b'qux=baz\r\n' else: - result = request.POST.first('foo') == 'bar' + result = request.POST.first(b'foo') == b'bar' - result = result and request.url_parts.query == 'query=1' + result = result and request.url_parts.query == u'query=1' - return ([("Content-Type", "text/plain")], - "OK" if result else "FAIL") + return ([(b"Content-Type", b"text/plain")], + b"OK" if result else b"FAIL") diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py index cf6f72fa1b3..ec5fdc8cce4 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py @@ -1,20 +1,20 @@ def main(request, response): headers = [ - ("Content-Type", "text/javascript"), - ("Access-Control-Allow-Origin", request.headers.get("Origin")), - ("Access-Control-Allow-Credentials", "true") + (b"Content-Type", b"text/javascript"), + (b"Access-Control-Allow-Origin", request.headers.get(b"Origin")), + (b"Access-Control-Allow-Credentials", b"true") ] - identifier = request.GET.first("id") - cookie_name = request.GET.first("cookieName") + identifier = request.GET.first(b"id") + cookie_name = request.GET.first(b"cookieName") cookie = request.cookies.first(cookie_name, None) if identifier is None or cookie_name is None: - return headers, "" + return headers, b"" if cookie is None: - result = "not found" - elif cookie.value == "1": - result = "found" + result = b"not found" + elif cookie.value == b"1": + result = b"found" else: - result = "different value: " + cookie.value + result = b"different value: " + cookie.value - return headers, "window." + identifier + " = '" + result + "';" + return headers, b"window." + identifier + b" = '" + result + b"';" diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py index b652cbe2c86..413f48d381a 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/referrer-checker.py @@ -1,6 +1,6 @@ def main(request, response): - referrer = request.headers.get("referer", "") - response_headers = [("Content-Type", "text/javascript"), - ("Access-Control-Allow-Origin", "*")]; + referrer = request.headers.get(b"referer", b"") + response_headers = [(b"Content-Type", b"text/javascript"), + (b"Access-Control-Allow-Origin", b"*")] return (200, response_headers, - "export const referrer = '" + referrer + "';") + b"export const referrer = '" + referrer + b"';") diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-classic.html index 8a67fdc8950..2b84ae80882 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-module.html index 79a36234ed8..09ee1490c1b 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-fetch-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-classic.html index e940df58c5b..477abd32cf6 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-module.html index 40b88a47246..9da22764086 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-parse-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-classic.html index 22aaf05ada3..bc4deb6f170 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-module.html index c08d2807e37..ff76954f9df 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-createHTMLDocument-success-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-classic.html index 2f51bc64a42..768120e9d8f 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-module.html index a423a5150a4..50dd80662dc 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-fetch-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-classic.html index d689e03dad2..981a0682302 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-module.html index f104bde6239..6debb4189ec 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-inline-classic.html index e2ea35eebbd..53389f20db5 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-inline-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-parse-error-inline-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-classic.html index c4f018187d3..9c4a12226a0 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-module.html index 31243eb7a58..0a0490cfc14 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-inline-classic.html index e0c9b6d08be..932825709f0 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-inline-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/after-prepare-iframe-success-inline-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-classic.html index f67f90fa9bc..444382ac209 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-module.html index 23399bcb1e1..e1a1f7c08f3 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-fetch-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-classic.html index 792873fa6e6..6bb5ebddbd2 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-module.html index 1b1f20190e3..10a6549f62d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-classic.html index 41b358bf96b..28bd9359956 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-module.html index d52210f2db5..e665a75629a 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-parse-error-inline-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-classic.html new file mode 100644 index 00000000000..8ee0dd1de19 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-classic.html @@ -0,0 +1,14 @@ + + + +Moving script elements between documents + + + + + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-module.html new file mode 100644 index 00000000000..4791149c571 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-empty-src-module.html @@ -0,0 +1,14 @@ + + + +Moving script elements between documents + + + + + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-classic.html index f6a36234a1a..3a3aceaf26e 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-module.html index 2ba6e606aca..c15b4fc77fd 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-classic.html index d8b5018d8e7..576f4d46845 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-module.html index 4941ec96a38..c84d61c89ad 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-createHTMLDocument-success-inline-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-classic.html index b8455144727..febf6fcc55a 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-module.html index 277f6a92002..f936260b8ce 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-fetch-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-classic.html index 38dd5acb891..870c900abf0 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-module.html index ef28de29e7e..fb44a89df10 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-classic.html index fc9c1c05185..986e4fa3963 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-module.html index d20595b755a..3a3fc384794 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-parse-error-inline-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-classic.html new file mode 100644 index 00000000000..4f03a943581 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-classic.html @@ -0,0 +1,14 @@ + + + +Moving script elements between documents + + + + + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-module.html new file mode 100644 index 00000000000..a7bd42fd32f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-empty-src-module.html @@ -0,0 +1,14 @@ + + + +Moving script elements between documents + + + + + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-classic.html index 80e7d317878..08a8ac4afae 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-module.html index 932d8d7d3b3..b8c3f79feae 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-classic.html index 9150714cf3f..b639f6109d1 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-module.html index a6191c0ede6..616e46310f6 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/before-prepare-iframe-success-inline-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-classic.html index 150d1ef7e33..745c62d8983 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-module.html index 41d8f271b95..f6353a05fcb 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-fetch-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-classic.html index 2fed35acf84..21099c3ff97 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-module.html index 34fe929185a..2eb153acfe5 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-parse-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-classic.html index 7f7fb9a2657..88821826edb 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-module.html index 13a53f1c7c4..f2a9d957412 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-createHTMLDocument-success-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-classic.html index 81a822e8ec5..d96bfe0d505 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-module.html index 7c7f5306305..7e71bfbe158 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-fetch-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-classic.html index 45a95bc0fca..757c879897e 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-module.html index 3d2df395bd7..6ec6c5970ef 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-inline-classic.html index 7875282087a..c0b0f9d4047 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-inline-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-parse-error-inline-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-classic.html index 6409e2cb829..7955dbce627 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-module.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-module.html index fbe63beeba0..af17eb01f75 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-module.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-external-module.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-inline-classic.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-inline-classic.html index 4bd10a39d29..8a44e2feaf1 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-inline-classic.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/move-back-iframe-success-inline-classic.html @@ -3,7 +3,6 @@ Moving script elements between documents - diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js index 01fb366aa86..de4af6ac10a 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js @@ -30,10 +30,9 @@ function createDocument(documentType, result, inlineOrExternal, type, hasBlockin }); } -window.scriptErrorEventFired = false; window.didExecute = undefined; -// For a script, there are four associated Documents that can +// For a script, there are three associated Documents that can // potentially different: // // [1] script's parser document @@ -48,7 +47,7 @@ window.didExecute = undefined; // // This helper is for tests where [1]/[2]/[3] are different. -// In the spec, scripts are not executed only if [1]/[2]/[3] are all the same +// In the spec, scripts are executed only if [1]/[2]/[3] are all the same // (or [1] is null and [2]==[3]). // // A check for [1]==[2] is in #prepare-a-script and @@ -75,6 +74,11 @@ window.didExecute = undefined; // https://github.com/whatwg/html/issues/1349 // https://github.com/chrishtr/rendering/blob/master/stylesheet-loading-proposal.md // +// TODO(domfarolino): Remove the "parsing but moved back" tests, because if a +// """ % (type, result, random.random()) + elif inlineOrExternal == "empty-src": + time.sleep(1) + body += """ + + + """ % (type,) # // if readyToEvaluate is false, the script is probably # // wasn't blocked by stylesheets as expected. diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/tools/generate.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/tools/generate.py index 0612023fd4c..80a655e821b 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/tools/generate.py +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/tools/generate.py @@ -3,7 +3,6 @@ template = ''' Moving script elements between documents - @@ -18,13 +17,35 @@ runTest("%s", "%s", "%s", "%s", "%s"); n = 0 for timing in ["before-prepare", "after-prepare", "move-back"]: for destType in ["iframe", "createHTMLDocument"]: - for result in ["fetch-error", "parse-error", "success"]: - for inlineOrExternal in ["inline", "external"]: + for inlineOrExternal in ["inline", "external", "empty-src"]: + for result in ["fetch-error", "parse-error", "success"]: for type in ["classic", "module"]: - # No fetch error for inline scripts. - if result == "fetch-error" and inlineOrExternal == "inline": + # The |inlineOrExternal| keyword creates a certain kind of script, + # and the |result| keyword can influence the generated script in + # different ways i.e., giving the script a parse-error, or creating + # a script that fails to load. When we're creating an inline script, + # it doesn't make sense to test the fetch-error case, so we ignore + # this combination, as the server will not react to it in any + # meaningful way. + if inlineOrExternal == "inline" and result == "fetch-error": continue + if inlineOrExternal == "empty-src": + # The "empty-src" tests aim to exercise #prepare-a-script step 26 + # substep 2, where the + diff --git a/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/resources/a-onclick-handler-iframe.html b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/resources/a-onclick-handler-iframe.html new file mode 100644 index 00000000000..711e40f9d4b --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/resources/a-onclick-handler-iframe.html @@ -0,0 +1 @@ +link diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/slow-png.py b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/slow-png.py index 5fa2fd9a9d8..7869856ed0c 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/slow-png.py +++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/slow-png.py @@ -1,7 +1,7 @@ from base64 import decodestring import time -png_response = decodestring('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg==') +png_response = decodestring(b'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg==') def main(request, response): time.sleep(2) diff --git a/tests/wpt/web-platform-tests/interfaces/css-shadow-parts.idl b/tests/wpt/web-platform-tests/interfaces/css-shadow-parts.idl index 66aaeba73a7..c470e8e7dc8 100644 --- a/tests/wpt/web-platform-tests/interfaces/css-shadow-parts.idl +++ b/tests/wpt/web-platform-tests/interfaces/css-shadow-parts.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into reffy-reports // (https://github.com/tidoust/reffy-reports) -// Source: CSS Shadow Parts (http://drafts.csswg.org/css-shadow-parts/) +// Source: CSS Shadow Parts (https://drafts.csswg.org/css-shadow-parts/) partial interface Element { [SameObject, PutForwards=value] readonly attribute DOMTokenList part; diff --git a/tests/wpt/web-platform-tests/interfaces/wai-aria.idl b/tests/wpt/web-platform-tests/interfaces/wai-aria.idl index ef8fd6342a5..cf8168a6931 100644 --- a/tests/wpt/web-platform-tests/interfaces/wai-aria.idl +++ b/tests/wpt/web-platform-tests/interfaces/wai-aria.idl @@ -1,10 +1,10 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into reffy-reports // (https://github.com/tidoust/reffy-reports) -// Source: Accessible Rich Internet Applications (WAI-ARIA) 1.2 (https://rawgit.com/w3c/aria/master/) +// Source: Accessible Rich Internet Applications (WAI-ARIA) 1.2 (https://w3c.github.io/aria/) interface mixin AccessibilityRole { - attribute DOMString role; + attribute DOMString? role; }; Element includes AccessibilityRole; diff --git a/tests/wpt/web-platform-tests/interfaces/webauthn.idl b/tests/wpt/web-platform-tests/interfaces/webauthn.idl index a1d46a37cf4..70f250286cd 100644 --- a/tests/wpt/web-platform-tests/interfaces/webauthn.idl +++ b/tests/wpt/web-platform-tests/interfaces/webauthn.idl @@ -44,7 +44,7 @@ interface AuthenticatorAssertionResponse : AuthenticatorResponse { }; dictionary PublicKeyCredentialParameters { - required PublicKeyCredentialType type; + required DOMString type; required COSEAlgorithmIdentifier alg; }; @@ -76,10 +76,10 @@ dictionary PublicKeyCredentialUserEntity : PublicKeyCredentialEntity { }; dictionary AuthenticatorSelectionCriteria { - AuthenticatorAttachment authenticatorAttachment; + DOMString authenticatorAttachment; boolean requireResidentKey = false; - ResidentKeyRequirement residentKey; - UserVerificationRequirement userVerification = "preferred"; + DOMString residentKey; + DOMString userVerification = "preferred"; }; enum AuthenticatorAttachment { @@ -105,7 +105,7 @@ dictionary PublicKeyCredentialRequestOptions { unsigned long timeout; USVString rpId; sequence allowCredentials = []; - UserVerificationRequirement userVerification = "preferred"; + DOMString userVerification = "preferred"; AuthenticationExtensionsClientInputs extensions; }; @@ -126,7 +126,7 @@ dictionary CollectedClientData { }; dictionary TokenBinding { - required TokenBindingStatus status; + required DOMString status; DOMString id; }; @@ -137,7 +137,7 @@ enum PublicKeyCredentialType { }; dictionary PublicKeyCredentialDescriptor { - required PublicKeyCredentialType type; + required DOMString type; required BufferSource id; sequence transports; }; diff --git a/tests/wpt/web-platform-tests/interfaces/webmidi.idl b/tests/wpt/web-platform-tests/interfaces/webmidi.idl index 096e7a1db11..0e390f8bde7 100644 --- a/tests/wpt/web-platform-tests/interfaces/webmidi.idl +++ b/tests/wpt/web-platform-tests/interfaces/webmidi.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into reffy-reports // (https://github.com/tidoust/reffy-reports) -// Source: Web MIDI API (http://webaudio.github.io/web-midi-api/) +// Source: Web MIDI API (https://webaudio.github.io/web-midi-api/) partial interface Navigator { [SecureContext] diff --git a/tests/wpt/web-platform-tests/interfaces/webxr.idl b/tests/wpt/web-platform-tests/interfaces/webxr.idl index 8559c882328..f723acc0ce5 100644 --- a/tests/wpt/web-platform-tests/interfaces/webxr.idl +++ b/tests/wpt/web-platform-tests/interfaces/webxr.idl @@ -43,7 +43,7 @@ enum XRVisibilityState { void updateRenderState(optional XRRenderStateInit state = {}); [NewObject] Promise requestReferenceSpace(XRReferenceSpaceType type); - long requestAnimationFrame(XRFrameRequestCallback callback); + unsigned long requestAnimationFrame(XRFrameRequestCallback callback); void cancelAnimationFrame(long handle); Promise end(); diff --git a/tests/wpt/web-platform-tests/lint.ignore b/tests/wpt/web-platform-tests/lint.ignore index 335f04297b5..776c6332900 100644 --- a/tests/wpt/web-platform-tests/lint.ignore +++ b/tests/wpt/web-platform-tests/lint.ignore @@ -296,6 +296,7 @@ SET TIMEOUT: css/css-fonts/font-display/font-display-feature-policy-01.tentative SET TIMEOUT: css/css-fonts/font-display/font-display-feature-policy-02.tentative.html SET TIMEOUT: css/css-fonts/font-display/font-display-preload.html SET TIMEOUT: document-policy/font-display/font-display-document-policy-01.tentative.html +SET TIMEOUT: feature-policy/experimental-features/resources/focus-without-user-activation-iframe-tentative.html SET TIMEOUT: html/browsers/windows/auxiliary-browsing-contexts/resources/close-opener.html SET TIMEOUT: html/cross-origin-embedder-policy/resources/navigate-none.sub.html SET TIMEOUT: html/cross-origin-embedder-policy/resources/navigate-require-corp.sub.html diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/mpadded/legacy-orthogonal-pseudo-units.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/mpadded/legacy-orthogonal-pseudo-units.html new file mode 100644 index 00000000000..3a944ead471 --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/mpadded/legacy-orthogonal-pseudo-units.html @@ -0,0 +1,101 @@ + + + + +Legacy mpadded pseudo-units relying on orthogonal metrics + + + + + + + + + + +
+ +

+ + + + + +

+ +

+ + + + + + + + + + + +

+ +

+ + + + + + + + + + + +

+

+ + + + + + +

+

+ + + + + + +

+

+ + + + + + +

+ + + diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/mrow/merror-001.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/mrow/merror-001.html new file mode 100644 index 00000000000..3cf610868bb --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/mrow/merror-001.html @@ -0,0 +1,43 @@ + + + + +Test the merror element + + + + + + + + + +
+
+ + AN ERROR + AN ERROR + +
+ + + diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html index fde3a606ae2..2982fc5a19e 100644 --- a/tests/wpt/web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html +++ b/tests/wpt/web-platform-tests/mathml/relations/css-styling/attribute-mapping-001.html @@ -42,8 +42,7 @@ test(function() { assert_equals(style.getPropertyValue("color"), - tag === "merror" ? - "rgb(255, 0, 0)" : "rgb(0, 0, 255)", + "rgb(0, 0, 255)", "no attribute"); element.setAttribute("mathcolor", "black"); assert_equals(style.getPropertyValue("color"), "rgb(0, 0, 0)", "attribute specified"); diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/default-font-family.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/default-font-family.html new file mode 100644 index 00000000000..413227ed46f --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/relations/css-styling/default-font-family.html @@ -0,0 +1,36 @@ + + + + +Default font-family on the <math> root + + + + + + + +
+
+
+ +
+ + + + + diff --git a/tests/wpt/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002.html b/tests/wpt/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002.html index 38d89aa186e..2556f680ca5 100644 --- a/tests/wpt/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002.html +++ b/tests/wpt/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002.html @@ -35,28 +35,30 @@ continue; } + var default_border = tag === "merror" ? 1 : 0; + test(function() { assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); var s = compareSpaceWithAndWithoutStyle(tag, style); - assert_approx_equals(s.left_delta, 30, epsilon, "left border"); - assert_approx_equals(s.right_delta, 40, epsilon, "right border"); - assert_approx_equals(s.top_delta, 50, epsilon, "top border"); - assert_approx_equals(s.bottom_delta, 60, epsilon, "bottom border"); - assert_approx_equals(s.element_width_delta, 30 + 40, epsilon, "element width"); - assert_approx_equals(s.element_height_delta, 50 + 60, epsilon, "element height"); - assert_approx_equals(s.preferred_width_delta, 30 + 40, epsilon, "element preferred width"); + assert_approx_equals(s.left_delta + default_border, 30, epsilon, "left border"); + assert_approx_equals(s.right_delta + default_border, 40, epsilon, "right border"); + assert_approx_equals(s.top_delta + default_border, 50, epsilon, "top border"); + assert_approx_equals(s.bottom_delta + default_border, 60, epsilon, "bottom border"); + assert_approx_equals(s.element_width_delta + 2 * default_border, 30 + 40, epsilon, "element width"); + assert_approx_equals(s.element_height_delta + 2 * default_border, 50 + 60, epsilon, "element height"); + assert_approx_equals(s.preferred_width_delta + 2 * default_border, 30 + 40, epsilon, "element preferred width"); }, `Border properties on ${tag}`); test(function() { assert_true(MathMLFeatureDetection[`has_${tag}`](), `${tag} is supported`); var s = compareSpaceWithAndWithoutStyle(tag, style, null, "rtl"); - assert_approx_equals(s.left_delta, 30, epsilon, "left border"); - assert_approx_equals(s.right_delta, 40, epsilon, "right border"); - assert_approx_equals(s.top_delta, 50, epsilon, "top border"); - assert_approx_equals(s.bottom_delta, 60, epsilon, "bottom border"); - assert_approx_equals(s.element_width_delta, 30 + 40, epsilon, "element width"); - assert_approx_equals(s.element_height_delta, 50 + 60, epsilon, "element height"); - assert_approx_equals(s.preferred_width_delta, 30 + 40, epsilon, "element preferred width"); + assert_approx_equals(s.left_delta + default_border, 30, epsilon, "left border"); + assert_approx_equals(s.right_delta + default_border, 40, epsilon, "right border"); + assert_approx_equals(s.top_delta + default_border, 50, epsilon, "top border"); + assert_approx_equals(s.bottom_delta + default_border, 60, epsilon, "bottom border"); + assert_approx_equals(s.element_width_delta + 2 * default_border, 30 + 40, epsilon, "element width"); + assert_approx_equals(s.element_height_delta + 2 * default_border, 50 + 60, epsilon, "element height"); + assert_approx_equals(s.preferred_width_delta + 2 * default_border, 30 + 40, epsilon, "element preferred width"); }, `Border properties on ${tag} (rtl)`); } diff --git a/tests/wpt/web-platform-tests/resources/chromium/web-bluetooth-test.js b/tests/wpt/web-platform-tests/resources/chromium/web-bluetooth-test.js index ee8f082b874..fb6965c9f38 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/web-bluetooth-test.js +++ b/tests/wpt/web-platform-tests/resources/chromium/web-bluetooth-test.js @@ -13,6 +13,23 @@ function toMojoCentralState(state) { } } +// Converts bluetooth.mojom.WriteType to a string. If |writeType| is +// invalid, this method will throw. +function writeTypeToString(writeType) { + switch (writeType) { + case bluetooth.mojom.WriteType.kNone: + return 'none'; + case bluetooth.mojom.WriteType.kWriteDefaultDeprecated: + return 'default-deprecated'; + case bluetooth.mojom.WriteType.kWriteWithResponse: + return 'with-response'; + case bluetooth.mojom.WriteType.kWriteWithoutResponse: + return 'without-response'; + default: + throw `Unknown bluetooth.mojom.WriteType: ${writeType}`; + } +} + // Canonicalizes UUIDs and converts them to Mojo UUIDs. function canonicalizeAndConvertToMojoUUID(uuids) { let canonicalUUIDs = uuids.map(val => ({uuid: BluetoothUUID.getService(val)})); @@ -448,16 +465,19 @@ class FakeRemoteGATTCharacteristic { return isNotifying; } - // Gets the last successfully written value to the characteristic. - // Returns null if no value has yet been written to the characteristic. + // Gets the last successfully written value to the characteristic and its + // write type. Write type is one of 'none', 'default-deprecated', + // 'with-response', 'without-response'. Returns {lastValue: null, + // lastWriteType: 'none'} if no value has yet been written to the + // characteristic. async getLastWrittenValue() { - let {success, value} = - await this.fake_central_ptr_.getLastWrittenCharacteristicValue( - ...this.ids_); + let {success, value, writeType} = + await this.fake_central_ptr_.getLastWrittenCharacteristicValue( + ...this.ids_); if (!success) throw 'getLastWrittenCharacteristicValue failed'; - return value; + return {lastValue: value, lastWriteType: writeTypeToString(writeType)}; } // Removes the fake GATT Characteristic from its fake service. diff --git a/tests/wpt/web-platform-tests/scroll-animations/cancel-animation.html b/tests/wpt/web-platform-tests/scroll-animations/cancel-animation.html new file mode 100644 index 00000000000..16858f4f2b2 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/cancel-animation.html @@ -0,0 +1,214 @@ + + +<Canceling an animation + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/scroll-animations/finish-animation.html b/tests/wpt/web-platform-tests/scroll-animations/finish-animation.html index 6729d2fe7f3..ab80458b033 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/finish-animation.html +++ b/tests/wpt/web-platform-tests/scroll-animations/finish-animation.html @@ -339,5 +339,155 @@ }, 'Finishing running animation attached to inactive timeline pauses the ' + 'animation.'); + promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + animation.pause(); + await animation.ready; + + animation.finish(); + + assert_equals(animation.playState, 'finished', + 'The play state of a paused animation should become ' + + '"finished"'); + assert_times_equal(animation.startTime, + animation.timeline.currentTime - 1000, + 'The start time of a paused animation should be set'); + }, 'Finishing a paused animation resolves the start time'); + + promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + animation.play(); + // Update playbackRate so we can test that the calculated startTime + // respects it + animation.playbackRate = 2; + animation.pause(); + // While animation is still pause-pending call finish() + animation.finish(); + + assert_false(animation.pending); + assert_equals(animation.playState, 'finished', + 'The play state of a pause-pending animation should become ' + + '"finished"'); + assert_times_equal(animation.startTime, + animation.timeline.currentTime - 1000 / 2, + 'The start time of a pause-pending animation should ' + + 'be set'); + }, 'Finishing a pause-pending animation resolves the pending task' + + ' immediately and update the start time'); + + promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + animation.play(); + animation.playbackRate = -2; + animation.pause(); + animation.finish(); + + assert_false(animation.pending); + assert_equals(animation.playState, 'finished', + 'The play state of a pause-pending animation should become ' + + '"finished"'); + assert_times_equal(animation.startTime, animation.timeline.currentTime, + 'The start time of a pause-pending animation should be ' + + 'set'); + }, 'Finishing a pause-pending animation with negative playback rate' + + ' resolves the pending task immediately'); + + promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + animation.play(); + await animation.ready; + + animation.pause(); + animation.play(); + // We are now in the unusual situation of being play-pending whilst having + // a resolved start time. Check that finish() still triggers a transition + // to the finished state immediately. + animation.finish(); + + assert_equals(animation.playState, 'finished', + 'After aborting a pause then finishing an animation its play ' + + 'state should become "finished" immediately'); + }, 'Finishing an animation during an aborted pause makes it finished' + + ' immediately'); + + promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + animation.play(); + await animation.ready; + + animation.updatePlaybackRate(2); + assert_true(animation.pending); + + animation.finish(); + assert_false(animation.pending); + assert_equals(animation.playbackRate, 2); + assert_times_equal(animation.currentTime, 1000); + }, 'A pending playback rate should be applied immediately when an animation' + + ' is finished'); + + promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + animation.play(); + await animation.ready; + + animation.updatePlaybackRate(0); + + assert_throws_dom('InvalidStateError', () => { + animation.finish(); + }); + }, 'An exception should be thrown if the effective playback rate is zero'); + + promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + animation.effect.updateTiming({ iterations: Infinity }); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + animation.play(); + animation.currentTime = 500; + animation.playbackRate = -1; + await animation.ready; + + animation.updatePlaybackRate(1); + + assert_throws_dom('InvalidStateError', () => { + animation.finish(); + }); + }, 'An exception should be thrown when finishing if the effective playback rate' + + ' is positive and the target effect end is infinity'); + + promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + animation.effect.updateTiming({ iterations: Infinity }); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + animation.play(); + await animation.ready; + + animation.updatePlaybackRate(-1); + + animation.finish(); + // Should not have thrown + }, 'An exception is NOT thrown when finishing if the effective playback rate' + + ' is negative and the target effect end is infinity'); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/scroll-animations/pause-animation.html b/tests/wpt/web-platform-tests/scroll-animations/pause-animation.html new file mode 100644 index 00000000000..07c72aad07c --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/pause-animation.html @@ -0,0 +1,209 @@ + + +Pausing an animation + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/scroll-animations/play-animation.html b/tests/wpt/web-platform-tests/scroll-animations/play-animation.html new file mode 100644 index 00000000000..fc1182d80a0 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/play-animation.html @@ -0,0 +1,234 @@ + + +Playing an animation + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/scroll-animations/reverse-animation.html b/tests/wpt/web-platform-tests/scroll-animations/reverse-animation.html new file mode 100644 index 00000000000..95c772e30a8 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/reverse-animation.html @@ -0,0 +1,330 @@ + + +Reversing an animation + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-animation-inactive-timeline.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-animation-inactive-timeline.html index 2d36648925c..70b732eddd6 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-animation-inactive-timeline.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-animation-inactive-timeline.html @@ -12,6 +12,7 @@ width: 100px; will-change: transform; } + .contents { height: 1000px; width: 100%; @@ -29,6 +30,8 @@ promise_test(async t => { // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); + assert_equals(animation.timeline.currentTime, null, + 'Sanity check the timeline is inactive.'); // Play the animation when the timeline is inactive. animation.play(); assert_equals(animation.currentTime, null, @@ -50,6 +53,8 @@ promise_test(async t => { // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); + assert_equals(animation.timeline.currentTime, null, + 'Sanity check the timeline is inactive.'); // Play the animation when the timeline is inactive. animation.play(); @@ -70,9 +75,12 @@ promise_test(async t => { const target = animation.effect.target; // Make the scroll timeline inactive. scroller.style.overflow = 'visible'; + scroller.scrollTop; // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); + assert_equals(animation.timeline.currentTime, null, + 'Sanity check the timeline is inactive.'); // Set start time when the timeline is inactive. animation.startTime = 0; assert_equals(animation.currentTime, null, @@ -115,6 +123,8 @@ promise_test(async t => { scroller.style.overflow = 'visible'; scroller.scrollTop; await waitForNextFrame(); + assert_equals(animation.timeline.currentTime, null, + 'Sanity check the timeline is inactive.'); assert_equals(animation.playState, 'running', 'State is \'running\' when the timeline is inactive.'); assert_equals(animation.currentTime, null, @@ -146,32 +156,4 @@ promise_test(async t => { 'Animation has an effect when the timeline is active.'); }, 'Animation current time is correct when the timeline becomes newly ' + 'inactive and then active again.'); - -promise_test(async t => { - const animation = createScrollLinkedAnimation(t); - const scroller = animation.timeline.scrollSource; - scroller.scrollTop; - - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); - animation.play(); - await animation.ready; - - // Make the scroll timeline inactive. - scroller.style.overflow = 'visible'; - scroller.scrollTop; - await waitForNextFrame(); - - const eventWatcher = new EventWatcher(t, animation, 'cancel'); - animation.cancel(); - const cancelEvent = await eventWatcher.wait_for('cancel'); - - assert_equals(cancelEvent.currentTime, null, - 'event.currentTime should be unresolved when the timeline is inactive.'); - assert_equals(cancelEvent.timelineTime, null, - 'event.timelineTime should be unresolved when the timeline is inactive'); -}, 'oncancel event is fired when the timeline is inactive.'); - - \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timeline-phases.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timeline-phases.tentative.html index 46fe06a0bdd..c58ba1dc066 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timeline-phases.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timeline-phases.tentative.html @@ -193,18 +193,21 @@ promise_test(async t => { const timeline = createScrollTimeline(t); const scroller = timeline.scrollSource; - // Timeline should be inactive since layout hasn't updated yet + // Setting the scroller to display none should make the timeline inactive + scroller.style.display = "none"; + scroller.scrollTop; + await waitForNextFrame(); assert_equals(timeline.phase, "inactive"); - // Accessing scroller.scrollHeight forces the scroller to update - scroller.scrollHeight; - // Wait for new animation frame which allows the timeline to compute new - // current time. + // Setting the scroller to display "block" should make the timeline active + scroller.style.display = "block"; + scroller.scrollTop; await waitForNextFrame(); assert_equals(timeline.phase, "active"); // Setting the scroller to display none should make the timeline inactive - scroller.style.display = "none" + scroller.style.display = "none"; + scroller.scrollTop; await waitForNextFrame(); assert_equals(timeline.phase, "inactive"); diff --git a/tests/wpt/web-platform-tests/scroll-animations/setting-start-time.html b/tests/wpt/web-platform-tests/scroll-animations/setting-start-time.html index 9346214b057..2b208e7e06a 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/setting-start-time.html +++ b/tests/wpt/web-platform-tests/scroll-animations/setting-start-time.html @@ -13,6 +13,7 @@ width: 100px; will-change: transform; } + .contents { height: 1000px; width: 100%; @@ -28,7 +29,7 @@ promise_test(async t => { const scroller = animation.timeline.scrollSource; const maxScroll = scroller.scrollHeight - scroller.clientHeight; scroller.scrollTop = 0.2 * maxScroll; - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); @@ -60,7 +61,7 @@ promise_test(async t => { const scroller = animation.timeline.scrollSource; // Make the scroll timeline inactive. scroller.style.overflow = 'visible'; - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); assert_equals(animation.timeline.currentTime, null, @@ -95,7 +96,7 @@ promise_test(async t => { const maxScroll = scroller.scrollHeight - scroller.clientHeight; scroller.scrollTop = 0.2 * maxScroll; - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); @@ -124,7 +125,7 @@ promise_test(async t => { const scroller = animation.timeline.scrollSource; // Make the scroll timeline inactive. scroller.style.overflow = 'visible'; - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); assert_equals(animation.timeline.currentTime, null, @@ -156,7 +157,7 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); @@ -190,7 +191,7 @@ promise_test(async t => { const scroller = animation.timeline.scrollSource; // Make the scroll timeline inactive. scroller.style.overflow = 'visible'; - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); assert_equals(animation.timeline.currentTime, null, @@ -225,7 +226,7 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); @@ -249,7 +250,7 @@ promise_test(async t => { const scroller = animation.timeline.scrollSource; // Make the scroll timeline inactive. scroller.style.overflow = 'visible'; - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); assert_equals(animation.timeline.currentTime, null, @@ -272,7 +273,7 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); @@ -301,7 +302,7 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); animation.play(); @@ -319,7 +320,7 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new + // Wait for new animation frame which allows the timeline to compute new // current time. await waitForNextFrame(); animation.play(); @@ -336,5 +337,85 @@ promise_test(async t => { assert_times_equal(animation.currentTime, -2000); }, 'Setting the start time on a reverse running animation updates the play ' + 'state'); + promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + let readyPromiseCallbackCalled = false; + animation.ready.then(() => { readyPromiseCallbackCalled = true; } ); + animation.pause(); + + // Sanity check + assert_true(animation.pending && animation.playState === 'paused', + 'Animation is in pause-pending state'); + + // Setting the start time should resolve the 'ready' promise although + // the resolution callbacks when be run in a separate microtask. + animation.startTime = null; + assert_false(readyPromiseCallbackCalled, + 'Ready promise callback is not called synchronously'); + + await Promise.resolve(); + assert_true(readyPromiseCallbackCalled, + 'Ready promise callback called after setting startTime'); +}, 'Setting the start time resolves a pending pause task'); + +promise_test(async t => { + const anim = createScrollLinkedAnimation(t); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + anim.play(); + + // We should be play-pending now + assert_true(anim.pending); + assert_equals(anim.playState, 'running'); + + // Apply a pending playback rate + anim.updatePlaybackRate(2); + assert_equals(anim.playbackRate, 1); + assert_true(anim.pending); + + // Setting the start time should apply the pending playback rate + anim.startTime = anim.timeline.currentTime - 25 * MS_PER_SEC; + assert_equals(anim.playbackRate, 2); + assert_false(anim.pending); + + // Sanity check that the start time is preserved and current time is + // calculated using the new playback rate + assert_times_equal(anim.startTime, + anim.timeline.currentTime - 25 * MS_PER_SEC); + assert_time_equals_literal(anim.currentTime, 50 * MS_PER_SEC); +}, 'Setting the start time of a play-pending animation applies a pending playback rate'); + +promise_test(async t => { + const anim = createScrollLinkedAnimation(t); + // Wait for new animation frame which allows the timeline to compute new + // current time. + await waitForNextFrame(); + anim.play(); + await anim.ready; + + // We should be running now + assert_false(anim.pending); + assert_equals(anim.playState, 'running'); + + // Apply a pending playback rate + anim.updatePlaybackRate(2); + assert_equals(anim.playbackRate, 1); + assert_true(anim.pending); + + // Setting the start time should apply the pending playback rate + anim.startTime = anim.timeline.currentTime - 250; + assert_equals(anim.playbackRate, 2); + assert_false(anim.pending); + + // Sanity check that the start time is preserved and current time is + // calculated using the new playback rate + assert_times_equal(anim.startTime, + anim.timeline.currentTime - 250); + assert_time_equals_literal(parseInt(anim.currentTime.toPrecision(5), 10), 500); +}, 'Setting the start time of a playing animation applies a pending playback rate'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/testcommon.js b/tests/wpt/web-platform-tests/scroll-animations/testcommon.js index 733b5f9f643..96bafdb396b 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/testcommon.js +++ b/tests/wpt/web-platform-tests/scroll-animations/testcommon.js @@ -2,6 +2,8 @@ function createScroller(test) { var scroller = createDiv(test); scroller.innerHTML = "
"; scroller.classList.add('scroller'); + // Trigger layout run. + scroller.scrollTop; return scroller; } diff --git a/tests/wpt/web-platform-tests/scroll-animations/update-playback-rate.html b/tests/wpt/web-platform-tests/scroll-animations/update-playback-rate.html new file mode 100644 index 00000000000..82cf69999f6 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/update-playback-rate.html @@ -0,0 +1,181 @@ + + +Seamlessly updating the playback rate of an animation + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/scroll-animations/updating-the-finished-state.html b/tests/wpt/web-platform-tests/scroll-animations/updating-the-finished-state.html new file mode 100644 index 00000000000..2e758dbe689 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/updating-the-finished-state.html @@ -0,0 +1,674 @@ + + +Updating the finished state + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/mime-sniffing-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/mime-sniffing-worker.js index 046628055e1..5c34a7a49e8 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/mime-sniffing-worker.js +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/mime-sniffing-worker.js @@ -1,5 +1,9 @@ self.addEventListener('fetch', function(event) { - var res = new Response('\n

test

'); - res.headers.delete('content-type'); + // Use an empty content-type value to force mime-sniffing. Note, this + // must be passed to the constructor since the mime-type of the Response + // is fixed and cannot be later changed. + var res = new Response('\n

test

', { + headers: { 'content-type': '' } + }); event.respondWith(res); }); diff --git a/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py b/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py index e71f671ced3..68cece452c9 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py +++ b/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py @@ -1,33 +1,50 @@ +from six import PY3 + def get_response(raw_headers, filter_value, filter_name): - result = "" - for line in raw_headers.headers: - if line[-2:] != '\r\n': - return "Syntax error: missing CRLF: " + line + result = b"" + # Type of raw_headers is in Python 2 and in + # Python 3. doesn't have 'headers" attribute or equivalent + # [https://bugs.python.org/issue4773]. + # In Python 2, variable raw_headers.headers returns a completely uninterpreted list of lines + # contained in the header. In Python 3, raw_headers.as_string() returns entire formatted + # message as a string. Here is to construct an equivalent "headers" variable to support tests + # in Python 3. + if PY3: + header_list = [ + (s + u'\r\n').encode("iso-8859-1") for s in raw_headers.as_string().splitlines() if s + ] + else: + header_list = raw_headers.headers + for line in header_list: + if line[-2:] != b'\r\n': + return b"Syntax error: missing CRLF: " + line line = line[:-2] - if ': ' not in line: - return "Syntax error: no colon and space found: " + line - name, value = line.split(': ', 1) + if b': ' not in line: + return b"Syntax error: no colon and space found: " + line + name, value = line.split(b': ', 1) if filter_value: if value == filter_value: - result += name + "," + result += name + b"," elif name.lower() == filter_name: - result += name + ": " + value + "\n" + result += name + b": " + value + b"\n" return result def main(request, response): headers = [] if "cors" in request.GET: - headers.append(("Access-Control-Allow-Origin", "*")) - headers.append(("Access-Control-Allow-Credentials", "true")) - headers.append(("Access-Control-Allow-Methods", "GET, POST, PUT, FOO")) - headers.append(("Access-Control-Allow-Headers", "x-test, x-foo")) - headers.append(("Access-Control-Expose-Headers", "x-request-method, x-request-content-type, x-request-query, x-request-content-length")) - headers.append(("content-type", "text/plain")) + headers.append((b"Access-Control-Allow-Origin", b"*")) + headers.append((b"Access-Control-Allow-Credentials", b"true")) + headers.append((b"Access-Control-Allow-Methods", b"GET, POST, PUT, FOO")) + headers.append((b"Access-Control-Allow-Headers", b"x-test, x-foo")) + headers.append(( + b"Access-Control-Expose-Headers", + b"x-request-method, x-request-content-type, x-request-query, x-request-content-length")) + headers.append((b"content-type", b"text/plain")) - filter_value = request.GET.first("filter_value", "") - filter_name = request.GET.first("filter_name", "").lower() + filter_value = request.GET.first(b"filter_value", b"") + filter_name = request.GET.first(b"filter_name", b"").lower() result = get_response(request.raw_headers, filter_value, filter_name) return headers, result