From d3f5d549bbae972e6bb9629c976b441e3c85ba0b Mon Sep 17 00:00:00 2001 From: WPT Sync Bot Date: Fri, 16 Oct 2020 08:19:14 +0000 Subject: [PATCH] Update web-platform-tests to revision e3cc95aa44f8a32bdf5c2827455de43148aa9980 --- ...rototype-constructor-set-receiver.html.ini | 4 + .../css/cssom-view/CaretPosition-001.html.ini | 4 - .../elementsFromPoint-invalid-cases.html.ini | 4 - .../matchMedia-display-none-iframe.html.ini | 2 - .../fetch/content-type/response.window.js.ini | 21 +- .../fetch/content-type/script.window.js.ini | 3 + .../nosniff/parsing-nosniff.window.js.ini | 3 + .../traverse_the_history_5.html.ini | 4 + ...ross-origin-objects-on-new-window.html.ini | 2 + .../supported-elements.html.ini | 6 +- .../hash-name-reference.html.ini | 3 - ...ng-lazy-in-script-disabled-iframe.html.ini | 4 + .../iframe_sandbox_popups_escaping-3.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-1.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-2.html.ini | 4 +- ...rame_sandbox_popups_nonescaping-3.html.ini | 3 +- .../form-double-submit.html.ini | 4 - .../module-static-import-delayed.html.ini | 4 + .../ignore-opens-during-unload.window.js.ini | 2 +- .../promise-job-entry.html.ini | 5 +- .../sub-sample-buffer-stitching.html.ini | 9 + .../webmessaging/with-ports/018.html.ini | 5 - .../Worker/Worker-constructor.html.ini | 2 + tests/wpt/metadata/MANIFEST.json | 413 ++- ...rototype-constructor-set-receiver.html.ini | 4 + .../css/cssom-view/CaretPosition-001.html.ini | 4 - .../elementsFromPoint-invalid-cases.html.ini | 4 - .../matchMedia-display-none-iframe.html.ini | 2 - .../fetch/content-type/response.window.js.ini | 21 +- .../fetch/content-type/script.window.js.ini | 3 + .../nosniff/parsing-nosniff.window.js.ini | 3 + .../traverse_the_history_5.html.ini | 4 + ...ross-origin-objects-on-new-window.html.ini | 2 + .../supported-elements.html.ini | 6 +- .../hash-name-reference.html.ini | 3 - ...ng-lazy-in-script-disabled-iframe.html.ini | 4 + .../iframe_sandbox_popups_escaping-3.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-1.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-2.html.ini | 4 +- ...rame_sandbox_popups_nonescaping-3.html.ini | 3 +- .../form-double-submit.html.ini | 4 - .../module-static-import-delayed.html.ini | 4 + .../ignore-opens-during-unload.window.js.ini | 2 +- .../promise-job-entry.html.ini | 5 +- .../sub-sample-buffer-stitching.html.ini | 6 + .../webmessaging/with-ports/018.html.ini | 5 - .../Worker/Worker-constructor.html.ini | 2 + ...ce-prototype-constructor-set-receiver.html | 47 + .../web-platform-tests/cors-rfc1918/META.yml | 5 + .../web-platform-tests/cors-rfc1918/README.md | 8 + .../otpcredential-get-basics.https.html | 46 +- .../support/otpcredential-helper.js | 128 +- .../support/otpcredential-iframe.html | 32 +- .../css/css-conditional/js/CSS-supports.html | 67 + .../percentage-size-subitems-002.html | 10 + .../css/css-grid/relative-grandchild.html | 10 + .../clip-path-no-content-005.svg | 19 + ...lip-path-path-interpolation-with-zoom.html | 27 + .../clip-path-path-with-zoom-hittest.html | 25 + .../clip-path/clip-path-path-with-zoom.html | 23 + ...path-path-interpolation-with-zoom-ref.html | 12 + .../clip-path-path-with-zoom-ref.html | 13 + .../small-aspect-ratio-crash.html | 5 + .../wpt/web-platform-tests/css/cssom/CSS.html | 48 - .../web-platform-tests/css/cssom/escape.html | 4 + .../density-corrected-image-in-canvas.html | 117 + ...-corrected-image-svg-aspect-ratio-ref.html | 29 + ...sity-corrected-image-svg-aspect-ratio.html | 32 + .../density-corrected-image-svg-ref.html | 24 + .../density-corrected-image-svg.html | 26 + .../density-corrected-natural-size.html | 40 + .../density-corrected-size-bg-ref.html | 32 + .../density-corrected-size-bg.html | 34 + .../density-corrected-size-img-ref.html | 8 + .../density-corrected-size-img.html | 14 + ...ty-corrected-size-pseudo-elements-ref.html | 18 + ...ensity-corrected-size-pseudo-elements.html | 20 + ...ensity-corrected-various-elements-ref.html | 34 + .../density-corrected-various-elements.html | 34 + .../resources/exif-resolution-no-change.jpg | Bin 0 -> 1816 bytes .../resources/exif-resolution-none.jpg | Bin 0 -> 1816 bytes .../exif-resolution-preapplied-lores.jpg | Bin 0 -> 3547 bytes ...exif-resolution-preapplied-non-uniform.jpg | Bin 0 -> 1985 bytes .../resources/exif-resolution-valid-hires.jpg | Bin 0 -> 2018 bytes .../resources/exif-resolution-valid-lores.jpg | Bin 0 -> 2018 bytes .../exif-resolution-valid-non-uniform.jpg | Bin 0 -> 2018 bytes .../exif-resolution-with-orientation.jpg | Bin 0 -> 2030 bytes .../resources/exify.js | 39 + .../third_party/piexif/LICENSE.txt | 21 + .../third_party/piexif/piexif.js | 2482 +++++++++++++++++ ...oading-lazy-in-script-disabled-iframe.html | 23 + .../iframe-loading-lazy-in-viewport.html | 2 + .../onmerchantvalidation-attribute.https.html | 0 .../payment-request-abort-method.https.html | 51 +- ...anmakepayment-method-protection.https.html | 65 - .../payment-request-show-method.https.html | 86 +- .../show-consume-activation.https.html | 58 + ...ethod-optional-promise-rejects.https.html} | 189 +- .../resources/chromium/mock-sms-receiver.js | 51 - .../resources/test-only-api.m.js | 5 + .../resources/test-only-api.m.js.headers | 2 + .../test/tests/functional/no-title.html | 7 + .../web-platform-tests/resources/test/tox.ini | 2 +- .../resources/testharness.js | 15 +- .../element-based-offset-clamp.html | 22 +- ...-payment-confirmation.tenative.https.html} | 0 .../tools/ci/epochs_update.sh | 11 +- .../wptrunner/wptrunner/browsers/chrome.py | 1 - .../url/urlsearchparams-constructor.any.js | 2 + 109 files changed, 4141 insertions(+), 598 deletions(-) create mode 100644 tests/wpt/metadata-layout-2020/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/matchMedia-display-none-iframe.html.ini create mode 100644 tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini create mode 100644 tests/wpt/metadata-layout-2020/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini create mode 100644 tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-in-script-disabled-iframe.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/html/semantics/forms/form-submission-0/form-double-submit.html.ini create mode 100644 tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/webmessaging/with-ports/018.html.ini create mode 100644 tests/wpt/metadata-layout-2020/workers/constructors/Worker/Worker-constructor.html.ini create mode 100644 tests/wpt/metadata/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html.ini delete mode 100644 tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini delete mode 100644 tests/wpt/metadata/css/cssom-view/elementsFromPoint-invalid-cases.html.ini delete mode 100644 tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini create mode 100644 tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini create mode 100644 tests/wpt/metadata/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini create mode 100644 tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-in-script-disabled-iframe.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit.html.ini create mode 100644 tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini delete mode 100644 tests/wpt/metadata/webmessaging/with-ports/018.html.ini create mode 100644 tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini create mode 100644 tests/wpt/web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html create mode 100644 tests/wpt/web-platform-tests/cors-rfc1918/META.yml create mode 100644 tests/wpt/web-platform-tests/cors-rfc1918/README.md create mode 100644 tests/wpt/web-platform-tests/css/css-conditional/js/CSS-supports.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-002.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/relative-grandchild.html create mode 100644 tests/wpt/web-platform-tests/css/css-masking/clip-path-svg-content/clip-path-no-content-005.svg create mode 100644 tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-with-zoom.html create mode 100644 tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-with-zoom-hittest.html create mode 100644 tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-with-zoom.html create mode 100644 tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-interpolation-with-zoom-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-path-with-zoom-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/small-aspect-ratio-crash.html delete mode 100644 tests/wpt/web-platform-tests/css/cssom/CSS.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-image-in-canvas.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-image-svg-aspect-ratio-ref.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-image-svg-aspect-ratio.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-image-svg-ref.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-image-svg.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-natural-size.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-size-bg-ref.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-size-bg.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-size-img-ref.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-size-img.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-size-pseudo-elements-ref.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-size-pseudo-elements.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-various-elements-ref.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/density-corrected-various-elements.html create mode 100644 tests/wpt/web-platform-tests/density-size-correction/resources/exif-resolution-no-change.jpg create mode 100644 tests/wpt/web-platform-tests/density-size-correction/resources/exif-resolution-none.jpg create mode 100644 tests/wpt/web-platform-tests/density-size-correction/resources/exif-resolution-preapplied-lores.jpg create mode 100644 tests/wpt/web-platform-tests/density-size-correction/resources/exif-resolution-preapplied-non-uniform.jpg create mode 100644 tests/wpt/web-platform-tests/density-size-correction/resources/exif-resolution-valid-hires.jpg create mode 100644 tests/wpt/web-platform-tests/density-size-correction/resources/exif-resolution-valid-lores.jpg create mode 100644 tests/wpt/web-platform-tests/density-size-correction/resources/exif-resolution-valid-non-uniform.jpg create mode 100644 tests/wpt/web-platform-tests/density-size-correction/resources/exif-resolution-with-orientation.jpg create mode 100644 tests/wpt/web-platform-tests/density-size-correction/resources/exify.js create mode 100644 tests/wpt/web-platform-tests/density-size-correction/third_party/piexif/LICENSE.txt create mode 100644 tests/wpt/web-platform-tests/density-size-correction/third_party/piexif/piexif.js create mode 100644 tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-in-script-disabled-iframe.html create mode 100644 tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/resources/iframe-loading-lazy-in-viewport.html rename tests/wpt/web-platform-tests/{payment-request => merchant-validation}/onmerchantvalidation-attribute.https.html (100%) delete mode 100644 tests/wpt/web-platform-tests/payment-request/payment-request-canmakepayment-method-protection.https.html create mode 100644 tests/wpt/web-platform-tests/payment-request/show-consume-activation.https.html rename tests/wpt/web-platform-tests/payment-request/{show-method-optional-promise-rejects-manual.https.html => show-method-optional-promise-rejects.https.html} (51%) delete mode 100644 tests/wpt/web-platform-tests/resources/chromium/mock-sms-receiver.js create mode 100644 tests/wpt/web-platform-tests/resources/test-only-api.m.js create mode 100644 tests/wpt/web-platform-tests/resources/test-only-api.m.js.headers rename tests/wpt/web-platform-tests/{payment-request/secure-payment-confirmation.https.html => secure-payment-confirmation/secure-payment-confirmation.tenative.https.html} (100%) diff --git a/tests/wpt/metadata-layout-2020/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html.ini b/tests/wpt/metadata-layout-2020/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html.ini new file mode 100644 index 00000000000..739c434ea33 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html.ini @@ -0,0 +1,4 @@ +[interface-prototype-constructor-set-receiver.html] + [Window, Location, Navigator, HTMLDocument, and HTMLHeadElement] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini deleted file mode 100644 index 4c79907309b..00000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[CaretPosition-001.html] - [Element at (400, 100)] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini deleted file mode 100644 index e181af5397f..00000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[elementsFromPoint-invalid-cases.html] - [The root element is the last element returned for otherwise empty queries within the viewport] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/matchMedia-display-none-iframe.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/matchMedia-display-none-iframe.html.ini deleted file mode 100644 index e6e1f29e274..00000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/matchMedia-display-none-iframe.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[matchMedia-display-none-iframe.html] - expected: ERROR 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 9df578bb958..8ae6da93e83 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 @@ -312,9 +312,6 @@ [Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK] expected: NOTRUN - [ + diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/resources/iframe-loading-lazy-in-viewport.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/resources/iframe-loading-lazy-in-viewport.html new file mode 100644 index 00000000000..1efd2bd056d --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/resources/iframe-loading-lazy-in-viewport.html @@ -0,0 +1,2 @@ + + diff --git a/tests/wpt/web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html b/tests/wpt/web-platform-tests/merchant-validation/onmerchantvalidation-attribute.https.html similarity index 100% rename from tests/wpt/web-platform-tests/payment-request/onmerchantvalidation-attribute.https.html rename to tests/wpt/web-platform-tests/merchant-validation/onmerchantvalidation-attribute.https.html diff --git a/tests/wpt/web-platform-tests/payment-request/payment-request-abort-method.https.html b/tests/wpt/web-platform-tests/payment-request/payment-request-abort-method.https.html index 8230e2458aa..32b87970b4d 100644 --- a/tests/wpt/web-platform-tests/payment-request/payment-request-abort-method.https.html +++ b/tests/wpt/web-platform-tests/payment-request/payment-request-abort-method.https.html @@ -1,11 +1,11 @@ - + Test for PaymentRequest.abort() method - + - + - If you find a buggy test, please file a bug - and tag one of the suggested reviewers. + If you find a buggy test, please + file a bug and + tag one of the + suggested reviewers. diff --git a/tests/wpt/web-platform-tests/payment-request/payment-request-canmakepayment-method-protection.https.html b/tests/wpt/web-platform-tests/payment-request/payment-request-canmakepayment-method-protection.https.html deleted file mode 100644 index 9c068dfe001..00000000000 --- a/tests/wpt/web-platform-tests/payment-request/payment-request-canmakepayment-method-protection.https.html +++ /dev/null @@ -1,65 +0,0 @@ - - -Tests for PaymentRequest.canMakePayment() method - - - - - - - - - If you find a buggy test, please file a bug - and tag one of the suggested reviewers. - diff --git a/tests/wpt/web-platform-tests/payment-request/payment-request-show-method.https.html b/tests/wpt/web-platform-tests/payment-request/payment-request-show-method.https.html index 20d5bab0d14..e5ee5eed01b 100644 --- a/tests/wpt/web-platform-tests/payment-request/payment-request-show-method.https.html +++ b/tests/wpt/web-platform-tests/payment-request/payment-request-show-method.https.html @@ -1,7 +1,7 @@ - + Test for PaymentRequest.show() method - + @@ -21,7 +21,7 @@ const defaultMethods = Object.freeze([ countryCode: "US", merchantCapabilities: ["supports3DS"], supportedNetworks: ["visa"], - } + }, }, ]); @@ -35,7 +35,7 @@ const defaultDetails = Object.freeze({ }, }); -promise_test(async t => { +promise_test(async (t) => { const request = new PaymentRequest(defaultMethods, defaultDetails); const acceptPromise = request.show(); // Abort the request after 2 seconds if it has not rejected. This allows the @@ -46,62 +46,64 @@ promise_test(async t => { request.abort(); }, 2000); - await promise_rejects_dom(t, "SecurityError", acceptPromise); + await promise_rejects_dom(t, "NotAllowedError", acceptPromise); }, `Calling show() without being triggered by user interaction throws`); -promise_test(async t => { +promise_test(async (t) => { const request = new PaymentRequest(defaultMethods, defaultDetails); - const [acceptPromise] = await test_driver.bless( - "test: throws if the promise [[state]] is not 'created'", - () => { - const acceptPromise = request.show(); // Sets state to "interactive" - return [acceptPromise]; - }); + await test_driver.bless( + "test: throws if the promise [[state]] is not 'created'" + ); + const acceptPromise = request.show(); // Sets state to "interactive" + // No user activation... + await promise_rejects_dom(t, "NotAllowedError", request.show()); + + // Get user activation + await test_driver.bless( + "test: throws if the promise [[state]] is not 'created'" + ); await promise_rejects_dom(t, "InvalidStateError", request.show()); + await request.abort(); await promise_rejects_dom(t, "AbortError", acceptPromise); }, "Throws if the promise [[state]] is not 'created'."); -promise_test(async t => { +promise_test(async (t) => { const request1 = new PaymentRequest(defaultMethods, defaultDetails); const request2 = new PaymentRequest(defaultMethods, defaultDetails); - const [acceptPromise1] = await test_driver.bless( - `test: reject promise with "AbortedError" if payment request is already showing`, - async () => { - const acceptPromise1 = request1.show(); - const acceptPromise2 = request2.show(); - await promise_rejects_dom(t, "AbortError", acceptPromise2); - return [acceptPromise1]; - }); + + await test_driver.bless("payment request"); + const acceptPromise1 = request1.show(); + + // User activation consumed, so... + await promise_rejects_dom(t, "NotAllowedError", request2.show()); + + // Payment request already showing, so... + await test_driver.bless("payment request"); + await promise_rejects_dom(t, "AbortError", request2.show()); await request1.abort(); await promise_rejects_dom(t, "AbortError", acceptPromise1); }, `If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException.`); -promise_test(async t => { +promise_test(async (t) => { const request = new PaymentRequest( [{ supportedMethods: "this-is-not-supported" }], defaultDetails ); - const [acceptPromise] = await test_driver.bless( - `test: reject promise with "NotSupportedError"`, - () => { - const acceptPromise = request.show(); - return [acceptPromise]; - }); + await test_driver.bless(`test: reject promise with "NotSupportedError"`); + const acceptPromise = request.show(); await promise_rejects_dom(t, "NotSupportedError", acceptPromise); }, `If payment method consultation produces no supported method of payment, then return a promise rejected with a "NotSupportedError" DOMException.`); -promise_test(async t => { +promise_test(async (t) => { const request = new PaymentRequest(defaultMethods, defaultDetails); - const [p1, p2, p3] = await test_driver.bless( - `test: calling show() multiple times always returns a new promise`, - () => { - const p1 = request.show(); - const p2 = request.show(); - const p3 = request.show(); - return [p1, p2, p3]; - }); + await test_driver.bless("call show()"); + const p1 = request.show(); + await test_driver.bless("call show()"); + const p2 = request.show(); + await test_driver.bless("call show()"); + const p3 = request.show(); const promises = new Set([p1, p2, p3]); assert_equals(promises.size, 3, "Must have three unique objects"); @@ -111,9 +113,13 @@ promise_test(async t => { await request.abort(); await promise_rejects_dom(t, "AbortError", p1); }, "Calling show() multiple times always returns a new promise."); - - If you find a buggy test, please file a bug - and tag one of the suggested reviewers. + If you find a buggy test, please + file a bug and + tag one of the + suggested reviewers. diff --git a/tests/wpt/web-platform-tests/payment-request/show-consume-activation.https.html b/tests/wpt/web-platform-tests/payment-request/show-consume-activation.https.html new file mode 100644 index 00000000000..0b92c4c15cf --- /dev/null +++ b/tests/wpt/web-platform-tests/payment-request/show-consume-activation.https.html @@ -0,0 +1,58 @@ + + + + + show() consumes user activation + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/payment-request/show-method-optional-promise-rejects-manual.https.html b/tests/wpt/web-platform-tests/payment-request/show-method-optional-promise-rejects.https.html similarity index 51% rename from tests/wpt/web-platform-tests/payment-request/show-method-optional-promise-rejects-manual.https.html rename to tests/wpt/web-platform-tests/payment-request/show-method-optional-promise-rejects.https.html index 1a322452eb6..3b429655039 100644 --- a/tests/wpt/web-platform-tests/payment-request/show-method-optional-promise-rejects-manual.https.html +++ b/tests/wpt/web-platform-tests/payment-request/show-method-optional-promise-rejects.https.html @@ -1,15 +1,18 @@ - + Test for PaymentRequest.show(optional detailsPromise) method - + + + -

- PaymentRequest .show(optional detailsPromise) tests -

-

- Bad details - causes `detailsPromise` to reject. -

-

- Click on each button in sequence from top to bottom without refreshing the page. - No payment sheet should be shown, as all provided values cause an error. -

-

- - If you see a payment sheet, it means the test has failed. - -

-
    -
  1. -
  2. + const rejectedPromise = Promise.reject(new SyntaxError("test")); + testBadUpdate( + "Rejection of detailsPromise must abort the update with an 'AbortError' DOMException.", + rejectedPromise, + "AbortError" + ); -
  3. + testBadUpdate( + "Total in the update is a string, so converting to IDL must abort the update with a TypeError.", + { total: `this will cause a TypeError!` }, + TypeError + ); -
  4. + testBadUpdate( + "Total is recursive, so converting to IDL must abort the update with a TypeError.", + { total: recursiveData }, + TypeError + ); -
  5. + testBadUpdate( + "Updating with a negative total results in a TypeError.", + invalidDetailsNegativeTotal, + TypeError + ); -
  6. -
  7. + testBadUpdate( + "Updating with a displayItem with an invalid currency results in RangeError.", + { ...validDetails, displayItems: invalidPaymentItems }, + RangeError + ); -
  8. + testBadUpdate( + "Updating with duplicate shippingOptions (same IDs) results in a TypeError.", + { + ...validDetails, + shippingOptions: [validShippingOption, validShippingOption], + }, + TypeError + ); -
  9. - -
  10. - -
  11. -
- - - If you find a buggy test, please file a bug - and tag one of the suggested reviewers. - + }, + RangeError + ); + testBadUpdate( + "Must throw as Modifier has a recursive dictionary.", + { ...validDetails, modifiers: [modifierWithRecursiveData, validModifier] }, + TypeError + ); + diff --git a/tests/wpt/web-platform-tests/resources/chromium/mock-sms-receiver.js b/tests/wpt/web-platform-tests/resources/chromium/mock-sms-receiver.js deleted file mode 100644 index 903456d6830..00000000000 --- a/tests/wpt/web-platform-tests/resources/chromium/mock-sms-receiver.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -const SmsProvider = (() => { - - class MockWebOTPService { - - constructor() { - this.mojoReceiver_ = new blink.mojom.WebOTPServiceReceiver(this); - - this.interceptor_ = - new MojoInterfaceInterceptor(blink.mojom.WebOTPService.$interfaceName); - - this.interceptor_.oninterfacerequest = (e) => { - this.mojoReceiver_.$.bindHandle(e.handle); - } - this.interceptor_.start(); - - this.returnValues_ = {}; - } - - async receive() { - let call = this.returnValues_.receive ? - this.returnValues_.receive.shift() : null; - if (!call) - return; - return call(); - } - - async abort() {}; - - pushReturnValuesForTesting(callName, value) { - this.returnValues_[callName] = this.returnValues_[callName] || []; - this.returnValues_[callName].push(value); - return this; - } - } - - const mockWebOTPService = new MockWebOTPService(); - - class SmsProviderChromium { - constructor() { - Object.freeze(this); // Make it immutable. - } - - pushReturnValuesForTesting(callName, callback) { - mockWebOTPService.pushReturnValuesForTesting(callName, callback); - } - } - - return SmsProviderChromium; -})(); diff --git a/tests/wpt/web-platform-tests/resources/test-only-api.m.js b/tests/wpt/web-platform-tests/resources/test-only-api.m.js new file mode 100644 index 00000000000..984f635abac --- /dev/null +++ b/tests/wpt/web-platform-tests/resources/test-only-api.m.js @@ -0,0 +1,5 @@ +/* Whether the browser is Chromium-based with MojoJS enabled */ +export const isChromiumBased = 'MojoInterfaceInterceptor' in self; + +/* Whether the browser is WebKit-based with internal test-only API enabled */ +export const isWebKitBased = !isChromiumBased && 'internals' in self; diff --git a/tests/wpt/web-platform-tests/resources/test-only-api.m.js.headers b/tests/wpt/web-platform-tests/resources/test-only-api.m.js.headers new file mode 100644 index 00000000000..5e8f640c665 --- /dev/null +++ b/tests/wpt/web-platform-tests/resources/test-only-api.m.js.headers @@ -0,0 +1,2 @@ +Content-Type: text/javascript; charset=utf-8 +Cache-Control: max-age=3600 diff --git a/tests/wpt/web-platform-tests/resources/test/tests/functional/no-title.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/no-title.html index 3458af44596..ae1333a0f7f 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/functional/no-title.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/no-title.html @@ -15,6 +15,7 @@ test(function(){assert_true(true, '1')}); test(()=>assert_true(true, '2')); test(() => assert_true(true, '3')); + test(() => assert_true(true, '3')); // test duplicate behaviour test(() => { assert_true(true, '4'); }); @@ -55,6 +56,12 @@ "properties": {}, "message": null }, + { + "status_string": "PASS", + "name": "assert_true(true, '3') 1", + "properties": {}, + "message": null + }, { "status_string": "PASS", "name": "Tests with no title 1", diff --git a/tests/wpt/web-platform-tests/resources/test/tox.ini b/tests/wpt/web-platform-tests/resources/test/tox.ini index a7a02e4b93b..c38b9f2749c 100644 --- a/tests/wpt/web-platform-tests/resources/test/tox.ini +++ b/tests/wpt/web-platform-tests/resources/test/tox.ini @@ -8,7 +8,7 @@ passenv=DISPLAY # Necessary for the spawned GeckoDriver process to connect to # the appropriate display. deps = html5lib - pytest>=2.9 + pytest>=2.9,<6 # pinned to <6 due to https://github.com/web-platform-tests/wpt/issues/26132 pyvirtualdisplay six requests diff --git a/tests/wpt/web-platform-tests/resources/testharness.js b/tests/wpt/web-platform-tests/resources/testharness.js index 85ffcf726af..4fb8cea0bcc 100644 --- a/tests/wpt/web-platform-tests/resources/testharness.js +++ b/tests/wpt/web-platform-tests/resources/testharness.js @@ -520,6 +520,8 @@ policies and contribution forms [3]. Object.prototype.toString.call(worker) == '[object ServiceWorker]'; } + var seen_func_name = Object.create(null); + function get_test_name(func, name) { if (name) { @@ -537,8 +539,17 @@ policies and contribution forms [3]. var trimmed = (arrow[1] !== undefined ? arrow[1] : arrow[2]).trim(); // drop trailing ; if there's no earlier ones trimmed = trimmed.replace(/^([^;]*)(;\s*)+$/, "$1"); - // ignore this if it's then empty - if (trimmed) return trimmed; + + if (trimmed) { + // add a suffix if we already have this string + if (seen_func_name[trimmed]) { + trimmed = trimmed + " " + seen_func_name[trimmed]; + seen_func_name[trimmed]++; + } else { + seen_func_name[trimmed] = 1; + } + return trimmed; + } } } diff --git a/tests/wpt/web-platform-tests/scroll-animations/element-based-offset-clamp.html b/tests/wpt/web-platform-tests/scroll-animations/element-based-offset-clamp.html index b1405074938..6467af199f1 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/element-based-offset-clamp.html +++ b/tests/wpt/web-platform-tests/scroll-animations/element-based-offset-clamp.html @@ -7,25 +7,19 @@