From aec530632a71aa004e2a67373226f6a69d79fc09 Mon Sep 17 00:00:00 2001 From: WPT Sync Bot Date: Thu, 24 Sep 2020 08:19:13 +0000 Subject: [PATCH] Update web-platform-tests to revision fbe1d224ce01b0844030db54a3cc6060c6d6c17a --- .../FileAPI/url/url-charset.window.js.ini | 8 - .../CSS2/floats/hit-test-floats-003.html.ini | 4 + .../CSS2/floats/hit-test-floats-004.html.ini | 4 + .../math-script-level-001.tentative.html.ini | 16 ++ .../trailing-space-in-inline-box.html.ini | 10 + .../offsetTopLeft-border-box.html.ini | 7 + .../fetch/content-type/response.window.js.ini | 15 +- .../fetch/content-type/script.window.js.ini | 3 - .../traverse_the_history_3.html.ini | 4 + .../embedded-opener-remove-frame.html.ini | 4 - .../iframe_sandbox_popups_escaping-2.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-1.html.ini | 3 +- ...rame_sandbox_popups_nonescaping-2.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-3.html.ini | 3 +- .../form-double-submit-3.html.ini | 4 - .../parsing/DOMContentLoaded-defer.html.ini | 4 - .../ignore-opens-during-unload.window.js.ini | 2 +- .../webmessaging/with-ports/018.html.ini | 5 + .../FileAPI/url/url-charset.window.js.ini | 8 - tests/wpt/metadata/MANIFEST.json | 269 +++++++++++++----- .../CSS2/floats/hit-test-floats-003.html.ini | 4 + .../CSS2/floats/hit-test-floats-004.html.ini | 4 + .../math-script-level-001.tentative.html.ini | 16 ++ .../trailing-space-in-inline-box.html.ini | 10 + .../offsetTopLeft-border-box.html.ini | 7 + .../fetch/content-type/response.window.js.ini | 15 +- .../fetch/content-type/script.window.js.ini | 3 - .../traverse_the_history_3.html.ini | 4 + .../embedded-opener-remove-frame.html.ini | 4 - .../iframe_sandbox_popups_escaping-2.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-1.html.ini | 3 +- ...rame_sandbox_popups_nonescaping-2.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-3.html.ini | 3 +- .../form-double-submit-3.html.ini | 4 - .../parsing/DOMContentLoaded-defer.html.ini | 4 - .../ignore-opens-during-unload.window.js.ini | 2 +- .../webmessaging/with-ports/018.html.ini | 5 + .../flex-aspect-ratio-img-row-008.html | 2 +- .../flex-aspect-ratio-img-row-009.html | 2 +- .../flex-minimum-height-flex-items-005.xht | 4 +- .../flex-minimum-width-flex-items-005.xht | 4 +- .../math-script-level-001.tentative.html | 64 +++++ .../math-script-level-002.tentative.html | 74 ++--- .../math-script-level-003.tentative-ref.html | 25 ++ .../math-script-level-003.tentative.html | 29 ++ .../math-script-level-004.tentative.html | 14 +- ...vel-auto-and-math-style-001.tentative.html | 4 +- ...vel-auto-and-math-style-002.tentative.html | 4 +- ...vel-auto-and-math-style-003.tentative.html | 2 +- ...vel-auto-and-math-style-004.tentative.html | 2 +- ...vel-auto-and-math-style-005.tentative.html | 2 +- ...evel-font-size-clamping-001.tentative.html | 4 +- .../trailing-space-in-inline-box.html | 34 +++ .../encrypted-media/scripts/onencrypted.js | 2 +- .../scripts/reset-src-after-setmediakeys.js | 2 +- ...n-in-different-site-iframes-outer.sub.html | 2 +- .../generic-sensor-feature-policy-test.sub.js | 5 +- .../windows/clear-window-name.https.html | 51 ++-- ...ross-origin-isolated-permission.https.html | 44 +-- .../resources/iframe-domain-failure.sub.html | 3 + .../window-domain-failure.https.sub.html | 23 +- .../images/revoked-blob-print-ref.html | 3 + .../images/revoked-blob-print.html | 24 ++ .../interfaces/WebCryptoAPI.idl | 2 +- .../interfaces/css-layout-api.idl | 146 ---------- .../interfaces/payment-request.idl | 14 - .../interfaces/scroll-animations.idl | 23 +- .../css-styling/attribute-mapping-002.html | 14 +- .../presentational-hints-001-ref.html | 2 +- .../css-styling/presentational-hints-001.html | 2 +- .../mediasource-worker-attach.html | 40 +++ .../mediasource-worker-objecturl.html | 27 ++ .../mediasource-worker-objecturl.js | 23 ++ .../mediasource-worker-util.js | 78 +++++ .../merchant-validation/META.yml | 3 + .../complete-method.tentative.https.html} | 0 .../constructor.tentative.https.html} | 0 .../constructortentative..http.html} | 0 .../document-domain.sub.https.html | 38 +++ .../document-domain.sub.https.html.headers | 1 + .../origin-isolation/resources/frame.html | 3 + .../resources/frame.html.headers | 1 + .../features/non-object.https.html | 2 +- .../features/non-string.https.html | 2 +- .../features/resources/helper.mjs | 4 +- .../features/valid-with-semicolon.https.html | 2 +- .../policies/op10 cspfp-valid.json | 2 +- .../policies/op2 cspfp-double-top-level.json | 4 +- .../policies/op5 cspfp-non-object.json | 2 +- .../policies/op6 cspfp-non-string.json | 2 +- .../screen-capture/getdisplaymedia.https.html | 57 +++- ...k-enabled-by-feature-policy.https.sub.html | 5 +- .../getScreens.tentative.https.window.js | 31 +- .../isMultiScreen.tentative.https.window.js | 35 ++- .../registration-script-module.https.html | 13 + .../registration-script.https.html | 5 +- .../resources/registration-tests-script.js | 38 +-- .../shapes/reftests/disabled-shapes-01.svg | 10 + .../polygon-with-filtered-marker.html | 10 + .../web-share/share-url-invalid.https.html | 6 + ...b-allowed-by-feature-policy.https.sub.html | 6 +- ...r-terminate-forever-during-evaluation.html | 82 ++++-- ...orker-run-forever-during-dynamic-import.js | 3 + ...Worker-run-forever-during-importScripts.js | 3 + .../workers/support/Worker-run-forever.js | 1 + 105 files changed, 1097 insertions(+), 543 deletions(-) delete mode 100644 tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-fonts/math-script-level-and-math-style/math-script-level-001.tentative.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-text/white-space/trailing-space-in-inline-box.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini create mode 100644 tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/html/semantics/forms/form-submission-0/form-double-submit-3.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/html/syntax/parsing/DOMContentLoaded-defer.html.ini create mode 100644 tests/wpt/metadata-layout-2020/webmessaging/with-ports/018.html.ini delete mode 100644 tests/wpt/metadata/FileAPI/url/url-charset.window.js.ini create mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini create mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini create mode 100644 tests/wpt/metadata/css/css-fonts/math-script-level-and-math-style/math-script-level-001.tentative.html.ini create mode 100644 tests/wpt/metadata/css/css-text/white-space/trailing-space-in-inline-box.html.ini create mode 100644 tests/wpt/metadata/css/cssom-view/offsetTopLeft-border-box.html.ini create mode 100644 tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit-3.html.ini delete mode 100644 tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini create mode 100644 tests/wpt/metadata/webmessaging/with-ports/018.html.ini create mode 100644 tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-001.tentative.html create mode 100644 tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-003.tentative-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-003.tentative.html create mode 100644 tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-in-inline-box.html create mode 100644 tests/wpt/web-platform-tests/html/rendering/replaced-elements/images/revoked-blob-print-ref.html create mode 100644 tests/wpt/web-platform-tests/html/rendering/replaced-elements/images/revoked-blob-print.html delete mode 100644 tests/wpt/web-platform-tests/interfaces/css-layout-api.idl create mode 100644 tests/wpt/web-platform-tests/media-source/dedicated-worker/mediasource-worker-attach.html create mode 100644 tests/wpt/web-platform-tests/media-source/dedicated-worker/mediasource-worker-objecturl.html create mode 100644 tests/wpt/web-platform-tests/media-source/dedicated-worker/mediasource-worker-objecturl.js create mode 100644 tests/wpt/web-platform-tests/media-source/dedicated-worker/mediasource-worker-util.js create mode 100644 tests/wpt/web-platform-tests/merchant-validation/META.yml rename tests/wpt/web-platform-tests/{payment-request/MerchantValidationEvent/complete-method.https.html => merchant-validation/complete-method.tentative.https.html} (100%) rename tests/wpt/web-platform-tests/{payment-request/MerchantValidationEvent/constructor.https.html => merchant-validation/constructor.tentative.https.html} (100%) rename tests/wpt/web-platform-tests/{payment-request/MerchantValidationEvent/constructor.http.html => merchant-validation/constructortentative..http.html} (100%) create mode 100644 tests/wpt/web-platform-tests/origin-isolation/document-domain.sub.https.html create mode 100644 tests/wpt/web-platform-tests/origin-isolation/document-domain.sub.https.html.headers create mode 100644 tests/wpt/web-platform-tests/origin-isolation/resources/frame.html create mode 100644 tests/wpt/web-platform-tests/origin-isolation/resources/frame.html.headers create mode 100644 tests/wpt/web-platform-tests/service-workers/service-worker/registration-script-module.https.html create mode 100644 tests/wpt/web-platform-tests/svg/shapes/reftests/polygon-with-filtered-marker.html create mode 100644 tests/wpt/web-platform-tests/workers/support/Worker-run-forever-during-dynamic-import.js diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini deleted file mode 100644 index a9005e45d6e..00000000000 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini +++ /dev/null @@ -1,8 +0,0 @@ -[url-charset.window.html] - expected: TIMEOUT - [Blob charset should override any auto-detected charset.] - expected: TIMEOUT - - [Blob charset should override .] - expected: TIMEOUT - 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 new file mode 100644 index 00000000000..f29da48a2a0 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-003.html] + [Miss float below something else] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini new file mode 100644 index 00000000000..4bfb0c2053a --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-004.html] + [Miss float below something else] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-fonts/math-script-level-and-math-style/math-script-level-001.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/css-fonts/math-script-level-and-math-style/math-script-level-001.tentative.html.ini new file mode 100644 index 00000000000..fc434aaca6b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-fonts/math-script-level-and-math-style/math-script-level-001.tentative.html.ini @@ -0,0 +1,16 @@ +[math-script-level-001.tentative.html] + [Inherited values of math-depth] + expected: FAIL + + [Specified math-depth: add()] + expected: FAIL + + [Specified math-depth: ] + expected: FAIL + + [Specified math-depth: auto-add] + expected: FAIL + + [Initial value of math-depth] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/trailing-space-in-inline-box.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/trailing-space-in-inline-box.html.ini new file mode 100644 index 00000000000..2d033278891 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/trailing-space-in-inline-box.html.ini @@ -0,0 +1,10 @@ +[trailing-space-in-inline-box.html] + [Preserved trailing spaces in inline boxes should hang] + expected: FAIL + + [Preserved trailing spaces in inline boxes should hang 2] + expected: FAIL + + [Preserved trailing spaces in inline boxes should hang 1] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini new file mode 100644 index 00000000000..239c35135e4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini @@ -0,0 +1,7 @@ +[offsetTopLeft-border-box.html] + [container: 1] + expected: FAIL + + [container: 0] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index 7f559dc22c6..0d44a823cc7 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -315,21 +315,12 @@ [ + + diff --git a/tests/wpt/web-platform-tests/origin-isolation/document-domain.sub.https.html.headers b/tests/wpt/web-platform-tests/origin-isolation/document-domain.sub.https.html.headers new file mode 100644 index 00000000000..ea3f6b335c7 --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-isolation/document-domain.sub.https.html.headers @@ -0,0 +1 @@ +Origin-Isolation: ?1 diff --git a/tests/wpt/web-platform-tests/origin-isolation/resources/frame.html b/tests/wpt/web-platform-tests/origin-isolation/resources/frame.html new file mode 100644 index 00000000000..8f35d2703e7 --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-isolation/resources/frame.html @@ -0,0 +1,3 @@ + + +A frame included by a test page diff --git a/tests/wpt/web-platform-tests/origin-isolation/resources/frame.html.headers b/tests/wpt/web-platform-tests/origin-isolation/resources/frame.html.headers new file mode 100644 index 00000000000..ea3f6b335c7 --- /dev/null +++ b/tests/wpt/web-platform-tests/origin-isolation/resources/frame.html.headers @@ -0,0 +1 @@ +Origin-Isolation: ?1 diff --git a/tests/wpt/web-platform-tests/origin-policy/features/non-object.https.html b/tests/wpt/web-platform-tests/origin-policy/features/non-object.https.html index 2bd4b67e600..d1be8e89377 100644 --- a/tests/wpt/web-platform-tests/origin-policy/features/non-object.https.html +++ b/tests/wpt/web-platform-tests/origin-policy/features/non-object.https.html @@ -11,6 +11,6 @@ "use strict"; runTestsInSubframe({ hostname: "op5", - testJS: "resources/no-camera-no-geolocation.mjs" + testJS: "resources/yes-camera-yes-geolocation.mjs" }); diff --git a/tests/wpt/web-platform-tests/origin-policy/features/non-string.https.html b/tests/wpt/web-platform-tests/origin-policy/features/non-string.https.html index 190d224a4cf..99645fc6d9d 100644 --- a/tests/wpt/web-platform-tests/origin-policy/features/non-string.https.html +++ b/tests/wpt/web-platform-tests/origin-policy/features/non-string.https.html @@ -11,6 +11,6 @@ "use strict"; runTestsInSubframe({ hostname: "op6", - testJS: "resources/no-camera-no-geolocation.mjs" + testJS: "resources/yes-camera-yes-geolocation.mjs" }); diff --git a/tests/wpt/web-platform-tests/origin-policy/features/resources/helper.mjs b/tests/wpt/web-platform-tests/origin-policy/features/resources/helper.mjs index 7ced355e645..0ea3b011014 100644 --- a/tests/wpt/web-platform-tests/origin-policy/features/resources/helper.mjs +++ b/tests/wpt/web-platform-tests/origin-policy/features/resources/helper.mjs @@ -2,7 +2,7 @@ export function runFPTest({ camera, geolocation }) { test(() => { - assert_equals(document.featurePolicy.allowsFeature('camera', 'https://example.com/'), camera, 'camera'); - assert_equals(document.featurePolicy.allowsFeature('geolocation', 'https://example.com/'), geolocation, 'geolocation'); + assert_equals(document.featurePolicy.allowsFeature('camera'), camera, 'camera'); + assert_equals(document.featurePolicy.allowsFeature('geolocation'), geolocation, 'geolocation'); }); } diff --git a/tests/wpt/web-platform-tests/origin-policy/features/valid-with-semicolon.https.html b/tests/wpt/web-platform-tests/origin-policy/features/valid-with-semicolon.https.html index 8d2d0f4495f..53ea7a94019 100644 --- a/tests/wpt/web-platform-tests/origin-policy/features/valid-with-semicolon.https.html +++ b/tests/wpt/web-platform-tests/origin-policy/features/valid-with-semicolon.https.html @@ -11,6 +11,6 @@ "use strict"; runTestsInSubframe({ hostname: "op10", - testJS: "resources/yes-camera-yes-geolocation.mjs" + testJS: "resources/no-camera-yes-geolocation.mjs" }); diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op10 cspfp-valid.json b/tests/wpt/web-platform-tests/origin-policy/policies/op10 cspfp-valid.json index 0fc1d163f2b..c3bea5c7bcc 100644 --- a/tests/wpt/web-platform-tests/origin-policy/policies/op10 cspfp-valid.json +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op10 cspfp-valid.json @@ -8,6 +8,6 @@ ] }, "features": { - "policy": "camera 'self' https://example.com/; geolocation 'self' https://example.com/" + "policy": "camera 'none'; geolocation 'self' https://example.com/" } } diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op2 cspfp-double-top-level.json b/tests/wpt/web-platform-tests/origin-policy/policies/op2 cspfp-double-top-level.json index 26d798b585d..59c34190fd9 100644 --- a/tests/wpt/web-platform-tests/origin-policy/policies/op2 cspfp-double-top-level.json +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op2 cspfp-double-top-level.json @@ -13,9 +13,9 @@ ] }, "features": { - "policy": "camera 'self' https://example.com/" + "policy": "geolocation 'none'" }, "features": { - "policy": "geolocation 'self' https://example.com/" + "policy": "camera 'none'" } } diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op5 cspfp-non-object.json b/tests/wpt/web-platform-tests/origin-policy/policies/op5 cspfp-non-object.json index 7488f9bfef2..1e404608b59 100644 --- a/tests/wpt/web-platform-tests/origin-policy/policies/op5 cspfp-non-object.json +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op5 cspfp-non-object.json @@ -5,5 +5,5 @@ "content_security": [ "script-src 'self' 'unsafe-inline'" ], - "features": "camera 'self' https://example.com/" + "features": "camera 'none'" } diff --git a/tests/wpt/web-platform-tests/origin-policy/policies/op6 cspfp-non-string.json b/tests/wpt/web-platform-tests/origin-policy/policies/op6 cspfp-non-string.json index 5c6941bf8fd..231e7d4326f 100644 --- a/tests/wpt/web-platform-tests/origin-policy/policies/op6 cspfp-non-string.json +++ b/tests/wpt/web-platform-tests/origin-policy/policies/op6 cspfp-non-string.json @@ -11,7 +11,7 @@ }, "features": { "policy": [ - "camera 'self' https://example.com/" + "camera 'none'" ] } } diff --git a/tests/wpt/web-platform-tests/screen-capture/getdisplaymedia.https.html b/tests/wpt/web-platform-tests/screen-capture/getdisplaymedia.https.html index 4b433d717df..aae81d2f823 100644 --- a/tests/wpt/web-platform-tests/screen-capture/getdisplaymedia.https.html +++ b/tests/wpt/web-platform-tests/screen-capture/getdisplaymedia.https.html @@ -80,15 +80,15 @@ promise_test(async t => { }, `getDisplayMedia(${j(constraints)}) must succeed with video maybe audio`)); [ - {video: {width: {max: 360}}}, - {video: {height: {max: 240}}}, - {video: {width: {max: 360}, height: {max: 240}}}, - {video: {frameRate: {max: 4}}}, - {video: {frameRate: {max: 4}, width: {max: 360}}}, - {video: {frameRate: {max: 4}, height: {max: 240}}}, - {video: {frameRate: {max: 4}, width: {max: 360}, height: {max: 240}}}, + {width: {max: 360}}, + {height: {max: 240}}, + {width: {max: 360}, height: {max: 240}}, + {frameRate: {max: 4}}, + {frameRate: {max: 4}, width: {max: 360}}, + {frameRate: {max: 4}, height: {max: 240}}, + {frameRate: {max: 4}, width: {max: 360}, height: {max: 240}}, ].forEach(constraints => promise_test(async t => { - const stream = await getDisplayMedia(constraints); + const stream = await getDisplayMedia({video: constraints}); t.add_cleanup(() => stopTracks(stream)); const {width, height, frameRate} = stream.getTracks()[0].getSettings(); assert_greater_than_equal(width, 1); @@ -103,7 +103,46 @@ promise_test(async t => { if (constraints.frameRate) { assert_less_than_equal(frameRate, constraints.frameRate.max); } -}, `getDisplayMedia(${j(constraints)}) must be constrained`)); +}, `getDisplayMedia({video: ${j(constraints)}}) must be constrained`)); + +const someSizes = [ + {width: 160}, + {height: 120}, + {width: 80}, + {height: 60}, + {width: 158}, + {height: 118}, +]; + +someSizes.forEach(constraints => promise_test(async t => { + const stream = await getDisplayMedia({video: constraints}); + t.add_cleanup(() => stopTracks(stream)); + const {width, height, frameRate} = stream.getTracks()[0].getSettings(); + if (constraints.width) { + assert_equals(width, constraints.width); + } else { + assert_equals(height, constraints.height); + } + assert_greater_than_equal(frameRate, 1); +}, `getDisplayMedia({video: ${j(constraints)}}) must be downscaled precisely`)); + +promise_test(async t => { + const video = {height: 240}; + const stream = await getDisplayMedia({video}); + t.add_cleanup(() => stopTracks(stream)); + const [track] = stream.getVideoTracks(); + const {height} = track.getSettings(); + assert_equals(height, video.height); + for (const constraints of someSizes) { + await track.applyConstraints(constraints); + const {width, height} = track.getSettings(); + if (constraints.width) { + assert_equals(width, constraints.width); + } else { + assert_equals(height, constraints.height); + } + } +}, `applyConstraints(width or height) must downscale precisely`); [ {video: {width: {max: 0}}}, diff --git a/tests/wpt/web-platform-tests/screen-wake-lock/wakelock-enabled-by-feature-policy.https.sub.html b/tests/wpt/web-platform-tests/screen-wake-lock/wakelock-enabled-by-feature-policy.https.sub.html index f908717ff41..53e92f55167 100644 --- a/tests/wpt/web-platform-tests/screen-wake-lock/wakelock-enabled-by-feature-policy.https.sub.html +++ b/tests/wpt/web-platform-tests/screen-wake-lock/wakelock-enabled-by-feature-policy.https.sub.html @@ -28,12 +28,15 @@ ); }, 'Feature-Policy header {"screen-wake-lock" : ["*"]} allows same-origin iframes.'); + // Set allow="screen-wake-lock" on iframe element to delegate + // 'screen-wake-lock' to cross origin subframe. async_test(t => { test_feature_availability( 'navigator.wakeLock.request("screen")', t, cross_origin_src, - expect_feature_available_default + expect_feature_available_default, + 'screen-wake-lock' ); }, 'Feature-Policy header {"screen-wake-lock" : ["*"]} allows cross-origin iframes.'); diff --git a/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js b/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js index ad982b219cb..acd38bb03b2 100644 --- a/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js +++ b/tests/wpt/web-platform-tests/screen_enumeration/getScreens.tentative.https.window.js @@ -39,25 +39,26 @@ promise_test(async t => { await promise_rejects_dom(t, 'NotAllowedError', self.getScreens()); }, 'getScreens() rejects the promise with permission denied'); -async_test(async t => { +promise_test(async t => { await test_driver.set_permission({name: 'window-placement'}, 'granted'); let iframe = document.body.appendChild(document.createElement('iframe')); assert_greater_than((await iframe.contentWindow.getScreens()).length, 0); - iframe.contentWindow.onunload = t.step_func(async () => { - // TODO(crbug.com/1106132): This should reject or resolve; not hang. - // assert_greater_than((await iframe.contentWindow.getScreens()).length, 0); - - let iframeGetScreens = iframe.contentWindow.getScreens; - let constructor = iframe.contentWindow.DOMException; - assert_not_equals(iframeGetScreens, undefined); - assert_not_equals(constructor, undefined); - - await t.step_wait(() => !iframe.contentWindow, "execution context invalid"); - assert_equals(iframe.contentWindow, null); - await promise_rejects_dom(t, 'InvalidStateError', constructor, iframeGetScreens()); - t.done(); + let iframeGetScreens; + let constructor; + await new Promise(resolve => { + iframe.contentWindow.onunload = () => { + // Grab these before the contentWindow is removed. + iframeGetScreens = iframe.contentWindow.getScreens; + constructor = iframe.contentWindow.DOMException; + resolve(); + }; + document.body.removeChild(iframe); }); + assert_not_equals(iframeGetScreens, undefined); + assert_not_equals(constructor, undefined); - document.body.removeChild(iframe); + await t.step_wait(() => !iframe.contentWindow, "execution context invalid"); + assert_equals(iframe.contentWindow, null); + await promise_rejects_dom(t, 'InvalidStateError', constructor, iframeGetScreens()); }, "getScreens() resolves for attached iframe; rejects for detached iframe"); diff --git a/tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.tentative.https.window.js b/tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.tentative.https.window.js index 515731cc04f..ac32dd05169 100644 --- a/tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.tentative.https.window.js +++ b/tests/wpt/web-platform-tests/screen_enumeration/isMultiScreen.tentative.https.window.js @@ -17,24 +17,29 @@ promise_test(async t => { assert_equals(typeof await self.isMultiScreen(), 'boolean'); }, 'isMultiScreen() returns a boolean value with permission denied'); -async_test(async t => { +promise_test(async t => { let iframe = document.body.appendChild(document.createElement('iframe')); assert_equals(typeof await iframe.contentWindow.isMultiScreen(), 'boolean'); - iframe.contentWindow.onunload = t.step_func(async () => { - // TODO(crbug.com/1106132): This should reject or resolve; not hang. - // assert_equals(typeof await iframe.contentWindow.isMultiScreen(), 'boolean'); - - let iframeIsMultiScreen = iframe.contentWindow.isMultiScreen; - let constructor = iframe.contentWindow.DOMException; - assert_not_equals(iframeIsMultiScreen, undefined); - assert_not_equals(constructor, undefined); - - await t.step_wait(() => !iframe.contentWindow, "execution context invalid"); - assert_equals(iframe.contentWindow, null); - await promise_rejects_dom(t, 'InvalidStateError', constructor, iframeIsMultiScreen()); - t.done(); + let iframeIsMultiScreen; + let constructor; + await new Promise(resolve => { + iframe.contentWindow.onunload = () => { + // Grab these before the contentWindow is removed. + iframeIsMultiScreen = iframe.contentWindow.isMultiScreen; + constructor = iframe.contentWindow.DOMException; + resolve(); + }; + document.body.removeChild(iframe); }); - document.body.removeChild(iframe); + + // TODO(crbug.com/1106132): This should reject or resolve; not hang. + // assert_equals(typeof await iframe.contentWindow.isMultiScreen(), 'boolean'); + assert_not_equals(iframeIsMultiScreen, undefined); + assert_not_equals(constructor, undefined); + + await t.step_wait(() => !iframe.contentWindow, "execution context invalid"); + assert_equals(iframe.contentWindow, null); + await promise_rejects_dom(t, 'InvalidStateError', constructor, iframeIsMultiScreen()); }, "isMultiScreen() resolves for attached iframe; rejects for detached iframe"); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/registration-script-module.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/registration-script-module.https.html new file mode 100644 index 00000000000..9e39a1f75b2 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/registration-script-module.https.html @@ -0,0 +1,13 @@ + +Service Worker: Registration (module script) + + + + + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/registration-script.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/registration-script.https.html index f70b9e67626..f1e51fd265e 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/registration-script.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/registration-script.https.html @@ -5,5 +5,8 @@ diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/registration-tests-script.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/registration-tests-script.js index 4d08efd21f8..f400bb91af9 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/registration-tests-script.js +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/registration-tests-script.js @@ -1,6 +1,6 @@ // Registration tests that mostly exercise the service worker script contents or // response. -function registration_tests_script(register_method) { +function registration_tests_script(register_method, type) { promise_test(function(t) { var script = 'resources/invalid-chunked-encoding.py'; var scope = 'resources/scope/invalid-chunked-encoding/'; @@ -46,14 +46,16 @@ function registration_tests_script(register_method) { 'Registration of script including uncaught exception should fail.'); }, 'Registering script including uncaught exception'); - promise_test(function(t) { - var script = 'resources/malformed-worker.py?import-malformed-script'; - var scope = 'resources/scope/import-malformed-script'; - return promise_rejects_js(t, - TypeError, - register_method(script, {scope: scope}), - 'Registration of script importing malformed script should fail.'); - }, 'Registering script importing malformed script'); + if (type === 'classic') { + promise_test(function(t) { + var script = 'resources/malformed-worker.py?import-malformed-script'; + var scope = 'resources/scope/import-malformed-script'; + return promise_rejects_js(t, + TypeError, + register_method(script, {scope: scope}), + 'Registration of script importing malformed script should fail.'); + }, 'Registering script importing malformed script'); + } promise_test(function(t) { var script = 'resources/no-such-worker.js'; @@ -64,14 +66,16 @@ function registration_tests_script(register_method) { 'Registration of non-existent script should fail.'); }, 'Registering non-existent script'); - promise_test(function(t) { - var script = 'resources/malformed-worker.py?import-no-such-script'; - var scope = 'resources/scope/import-no-such-script'; - return promise_rejects_js(t, - TypeError, - register_method(script, {scope: scope}), - 'Registration of script importing non-existent script should fail.'); - }, 'Registering script importing non-existent script'); + if (type === 'classic') { + promise_test(function(t) { + var script = 'resources/malformed-worker.py?import-no-such-script'; + var scope = 'resources/scope/import-no-such-script'; + return promise_rejects_js(t, + TypeError, + register_method(script, {scope: scope}), + 'Registration of script importing non-existent script should fail.'); + }, 'Registering script importing non-existent script'); + } promise_test(function(t) { var script = 'resources/malformed-worker.py?caught-exception'; diff --git a/tests/wpt/web-platform-tests/svg/shapes/reftests/disabled-shapes-01.svg b/tests/wpt/web-platform-tests/svg/shapes/reftests/disabled-shapes-01.svg index 65364dc08ff..49572fe71e7 100644 --- a/tests/wpt/web-platform-tests/svg/shapes/reftests/disabled-shapes-01.svg +++ b/tests/wpt/web-platform-tests/svg/shapes/reftests/disabled-shapes-01.svg @@ -9,15 +9,25 @@ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/svg/shapes/reftests/polygon-with-filtered-marker.html b/tests/wpt/web-platform-tests/svg/shapes/reftests/polygon-with-filtered-marker.html new file mode 100644 index 00000000000..def8adc6852 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/shapes/reftests/polygon-with-filtered-marker.html @@ -0,0 +1,10 @@ + +Filtered <marker> with <clipPath> ancestor on <polygon> + + + + + + + + diff --git a/tests/wpt/web-platform-tests/web-share/share-url-invalid.https.html b/tests/wpt/web-platform-tests/web-share/share-url-invalid.https.html index d7ffd3b11ce..cb76458c24c 100644 --- a/tests/wpt/web-platform-tests/web-share/share-url-invalid.https.html +++ b/tests/wpt/web-platform-tests/web-share/share-url-invalid.https.html @@ -40,6 +40,12 @@ return promise_rejects_js(t, TypeError, promise); }, "share() rejects chrome: URLs"); + promise_test(async t => { + await test_driver.bless(); + const promise = navigator.share({ url: "javascript:window.alert('error')" }); + return promise_rejects_js(t, TypeError, promise); + }, "share() rejects javascript: URLs"); + promise_test(async t => { await test_driver.bless(); const file = new File([], "text/plain"); diff --git a/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy.https.sub.html b/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy.https.sub.html index 9ec25eadba3..831cb42cab6 100644 --- a/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy.https.sub.html +++ b/tests/wpt/web-platform-tests/webusb/usb-allowed-by-feature-policy.https.sub.html @@ -27,15 +27,17 @@ async_test(t => { expect_feature_available_default); }, header + ' allows workers in same-origin iframes.'); +// Set allow="usb" on iframe element to delegate 'usb' to cross origin subframe. async_test(t => { test_feature_availability('usb.getDevices()', t, cross_origin_src, - expect_feature_available_default); + expect_feature_available_default, 'usb'); }, header + ' allows cross-origin iframes.'); +// Set allow="usb" on iframe element to delegate 'usb' to cross origin subframe. async_test(t => { test_feature_availability('usb.getDevices()', t, cross_origin_worker_frame_src, - expect_feature_available_default); + expect_feature_available_default, 'usb'); }, header + ' allows workers in cross-origin iframes.'); fetch_tests_from_worker(new Worker( diff --git a/tests/wpt/web-platform-tests/workers/Worker-terminate-forever-during-evaluation.html b/tests/wpt/web-platform-tests/workers/Worker-terminate-forever-during-evaluation.html index a45a4cd2105..4513c5b5379 100644 --- a/tests/wpt/web-platform-tests/workers/Worker-terminate-forever-during-evaluation.html +++ b/tests/wpt/web-platform-tests/workers/Worker-terminate-forever-during-evaluation.html @@ -5,32 +5,60 @@ diff --git a/tests/wpt/web-platform-tests/workers/support/Worker-run-forever-during-dynamic-import.js b/tests/wpt/web-platform-tests/workers/support/Worker-run-forever-during-dynamic-import.js new file mode 100644 index 00000000000..62840bd5b4f --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/support/Worker-run-forever-during-dynamic-import.js @@ -0,0 +1,3 @@ +import('./Worker-run-forever.js') + .then(r => postMessage('resolved: ' + r)) + .catch(e => postMessage('rejected: ' + e)); diff --git a/tests/wpt/web-platform-tests/workers/support/Worker-run-forever-during-importScripts.js b/tests/wpt/web-platform-tests/workers/support/Worker-run-forever-during-importScripts.js index 3a0fb4bb063..6a3083f3821 100644 --- a/tests/wpt/web-platform-tests/workers/support/Worker-run-forever-during-importScripts.js +++ b/tests/wpt/web-platform-tests/workers/support/Worker-run-forever-during-importScripts.js @@ -1 +1,4 @@ importScripts('Worker-run-forever.js'); + +// This is not expected to run. +postMessage('after importScripts()'); diff --git a/tests/wpt/web-platform-tests/workers/support/Worker-run-forever.js b/tests/wpt/web-platform-tests/workers/support/Worker-run-forever.js index 679f908c202..2d822d407f4 100644 --- a/tests/wpt/web-platform-tests/workers/support/Worker-run-forever.js +++ b/tests/wpt/web-platform-tests/workers/support/Worker-run-forever.js @@ -1,2 +1,3 @@ postMessage('start'); +onerror = () => postMessage('onerror'); while(1);