From 84f0cd58013ca207d83dd7d7063f6beb99a32a02 Mon Sep 17 00:00:00 2001 From: Servo WPT Sync <32481905+servo-wpt-sync@users.noreply.github.com> Date: Thu, 10 Jul 2025 05:09:13 +0200 Subject: [PATCH] Sync WPT with upstream (10-07-2025) (#37974) Automated downstream sync of changes from upstream as of 10-07-2025 [no-wpt-sync] Signed-off-by: WPT Sync Bot --- .../url/url-in-tags-revoke.window.js.ini | 3 + tests/wpt/meta/MANIFEST.json | 825 ++++++++++++++---- ...frame-ancestors-path-ignored.window.js.ini | 3 - .../script-url-allowed-by-hash.https.html.ini | 12 + ...eval-blocked-report-contains-hash.html.ini | 3 + .../border-shape/border-shape-shadow.html.ini | 2 + .../layer-font-face-override.html.ini | 7 - .../font-relative-units-dynamic.html.ini | 1 + ...auto-margin-and-replaced-item-001.html.ini | 2 + .../css/css-mixins/contents-rule.html.ini | 15 - .../css/css-mixins/cross-stylesheet.html.ini | 3 - .../meta/css/css-mixins/shadow-dom.html.ini | 9 - .../tentative/table-quirks.html.ini | 3 - ...t-shape-block-color-004.tentative.html.ini | 2 + ...scroll-behavior-smooth-navigation.html.ini | 3 - ...backdrop-filter-root-toggle-crash.html.ini | 2 + ...css-font-face.https.sub.tentative.html.ini | 3 - .../load-pageshow-events-window-open.html.ini | 3 - .../traverse_the_history_5.html.ini | 3 + ...as.2d.disconnected-font-size-math.html.ini | 2 + .../offscreencanvas.transferrable.w.html.ini | 3 - .../headings-styles.html.ini | 216 ----- ...-loading-lazy-nav-location-assign.html.ini | 3 - ...ading-lazy-reload-location-reload.html.ini | 3 + ...rame_sandbox_popups_nonescaping-2.html.ini | 1 - ...rame_sandbox_popups_nonescaping-3.html.ini | 2 +- .../html/semantics/forms/historical.html.ini | 3 - .../user-prompts/print-during-unload.html.ini | 3 + .../meta/preload/preload-error.sub.html.ini | 3 - ...ify-extend-word-generated-content.html.ini | 6 + .../integrity-policy/script.https.html.ini | 50 +- .../integrity-policy/style.https.html.ini | 51 ++ .../audiocontext-suspend-resume.html.ini | 10 +- .../audioparam-method-chaining.html.ini | 3 + .../cancel-scheduled-values.html.ini | 3 + .../realtime-conv.html.ini | 3 + .../script-url-allowed-by-hash.https.html | 38 +- .../tentative/support/iframe_inline.sub.html | 19 + .../support/iframe_inline_meta.sub.html | 20 + .../tentative/support/iframe_meta.sub.html | 1 + .../support/iframe_meta_multiple.html | 1 + .../eval-blocked-report-contains-hash.html | 23 + ...cked-report-contains-hash.html.sub.headers | 6 + .../cookieStore_set_arguments.https.any.js | 2 +- .../prefix/document-cookie.non-secure.html | 3 +- .../text/white-space-processing-049-ref.xht | 5 +- .../anchor-getComputedStyle-002.html | 33 +- .../animation-name-inline-style.html | 19 + .../border-shape/border-shape-shadow-ref.html | 26 + .../border-shape/border-shape-shadow.html | 22 + .../css-cascade/resources/scope-implicit.css | 7 + .../css-cascade/scope-implicit-001-print.html | 18 + .../css-cascade/scope-implicit-002-print.html | 10 + .../scope-implicit-003-print-ref.html | 8 + .../css-cascade/scope-implicit-003-print.html | 16 + .../scope-implicit-004-print.xhtml | 22 + .../css-cascade/scope-implicit-005-print.html | 22 + .../css-cascade/scope-implicit-006-print.html | 31 + .../counters-flex-circular.html | 6 +- .../font-relative-units-dynamic.html | 32 +- tests/wpt/tests/css/css-flexbox/META.yml | 1 - .../wpt/tests/css/css-fonts/WEB_FEATURES.yml | 3 + .../css/css-fonts/parsing/WEB_FEATURES.yml | 6 + .../agnostic/gap-decorations-011-crash.html | 15 + .../initial-letter-with-tab-ref.html | 2 +- .../initial-letter-with-tab-rtl-ref.html | 2 +- ...p-path-animation-circle-0-percent-ref.html | 13 + .../clip-path-animation-circle-0-percent.html | 26 + ...p-path-animation-inset-50-percent-ref.html | 13 + .../clip-path-animation-inset-50-percent.html | 26 + .../clip-path-transition-allow-discrete.html | 35 + .../tests/css/css-mixins/contents-rule.html | 87 -- .../css/css-mixins/cross-stylesheet.html | 29 - .../wpt/tests/css/css-mixins/shadow-dom.html | 75 -- ...-in-overflowed-parent-nested-multicol.html | 16 + ...ine-with-spanner-in-overflowed-parent.html | 12 + .../monolithic-overflow-024-print.html | 1 + .../monolithic-overflow-025-print.html | 1 + .../css/css-pseudo/marker-computed-size.html | 86 +- .../fresh-table-col-crash.html | 12 + .../scroll-initial-target/WEB_FEATURES.yml | 3 + .../css-tables/tentative/table-quirks.html | 10 +- .../tests/css/css-text-decor/WEB_FEATURES.yml | 3 + .../animations/WEB_FEATURES.yml | 4 + ...t-shape-block-color-004-ref.tentative.html | 11 + ...caret-shape-block-color-004.tentative.html | 39 + .../support/dialog-in-rtl-iframe-child.html | 1 + .../cssom-view/getBoundingClientRect-svg.html | 60 +- .../backdrop-filter-root-toggle-crash.html | 45 + .../filter-effects/feconvolve-divisor.html | 22 + .../kernel-unit-length-001.html | 26 + .../kernel-unit-length-002.html | 27 + .../css/filter-effects/lighting-region.html | 19 + .../reference/feconvolve-divisor-ref.html | 14 + .../reference/kernel-unit-length-ref.html | 22 + .../reference/lighting-region-ref.html | 8 + .../wpt/tests/css/geometry/DOMMatrix-003.html | 6 + .../get.tentative.https.html | 20 + .../tests/docs/writing-tests/testdriver.md | 2 + .../DOMImplementation-createDocument.html | 6 +- .../dom/nodes/Document-createElementNS.html | 12 +- .../dom/nodes/Document-createElementNS.js | 22 +- .../dom/nodes/moveBefore/WEB_FEATURES.yml | 3 + .../wpt/tests/dom/nodes/name-validation.html | 4 +- ...cannot-replace-active.tentative.https.html | 29 + ...tive-replaces-passive.tentative.https.html | 29 + ...-button-mode-priority.tentative.https.html | 73 -- ...-passive-after-active.tentative.https.html | 27 + ...cannot-replace-active.tentative.https.html | 30 + tests/wpt/tests/fonts/ahem.css | 3 +- .../html-aam/{fragile => }/area-role.html | 0 ...role.html => optgroup-role.tentative.html} | 0 .../resources/helper.sub.js | 12 +- .../offscreencanvas.transferrable.w.html | 19 +- .../tests/html/editing/dnd/images/015.html | 84 +- .../tests/html/editing/dnd/images/016.html | 82 +- .../tests/html/editing/dnd/images/017.html | 89 +- .../tests/html/editing/dnd/images/018.html | 88 +- .../tests/html/editing/dnd/images/021.html | 79 +- .../tests/html/editing/dnd/images/022.xhtml | 69 +- .../helper-drop-horizontal-scrollbar.xhtml | 14 +- .../dnd/images/helper-drop-image-here.xhtml | 40 +- .../helper-drop-vertical-scrollbar.xhtml | 20 +- .../html/editing/dnd/resources/test-helper.js | 2 + ...ngs-styles-no-h1-in-section.tentative.html | 147 ---- .../headings-styles.html | 9 +- .../the-details-element/WEB_FEATURES.yml | 11 + .../forms/the-input-element/number.html | 3 +- ...s-property-height-bounded-reftest-ref.html | 20 + ...n-css-property-height-bounded-reftest.html | 17 + .../icon-css-property-height-reftest.html | 4 +- ...s-property-margin-bounded-reftest-ref.html | 20 + ...n-css-property-margin-bounded-reftest.html | 17 + ...n-css-property-max-height-reftest-ref.html | 2 +- ...n-css-property-min-height-reftest-ref.html | 10 + .../icon-css-property-min-height-reftest.html | 6 +- .../text-stroke-and-fill-ref.html | 8 + .../text-stroke-and-fill.tentative.html | 17 + .../interestfor-event-timing.tentative.html | 84 ++ .../set_locale_override.https.html.ini | 3 + ...screen_orientation_override.https.html.ini | 3 + .../emulation/set_locale_override.https.html | 41 + ...set_screen_orientation_override.https.html | 68 ++ tests/wpt/tests/lint.ignore | 1 + .../mrow/dynamic-mrow-like-001-ref.html | 20 +- .../mrow/dynamic-mrow-like-001.html | 22 +- .../tables/table-default-styles-001.html | 6 + ...pointercapture_remove_setcapture_node.html | 73 -- .../pointerevent_attributes.html | 9 +- ...erevent_contextmenu_is_a_pointerevent.html | 3 + ...pointercapture_remove_setcapture_node.html | 58 +- ...ate_coalesced_events_attributes.https.html | 90 ++ tests/wpt/tests/reporting/resources/report.py | 6 +- tests/wpt/tests/resources/testdriver.js | 71 ++ .../timeline-trigger-shorthand.tentative.html | 213 +++++ ...-modify-extend-word-generated-content.html | 55 ++ ...peechRecognition-phrases-manual.https.html | 19 +- .../integrity-policy/resources/style.css | 1 + .../integrity-policy/script.https.html | 59 +- .../integrity-policy/style.https.html | 273 ++++++ .../keypoints-attribute-trailing-semi.html | 20 + .../keytimes-attribute-trailing-semi.html | 20 + ...zero-scale-svg-transform-inside-g-tag.html | 30 + .../getcharnumatposition-slr.tentative.html | 22 +- .../text/scripted/getstartpositionofchar.html | 78 +- .../wptrunner/executors/asyncactions.py | 50 ++ .../wptrunner/executors/executorwebdriver.py | 9 + .../wptrunner/wptrunner/executors/protocol.py | 11 + .../wptrunner/wptrunner/testdriver-extra.js | 18 + .../tests/webaudio/resources/audit-util.js | 26 + .../audiocontext-suspend-resume.html | 193 ++-- .../audioparam-method-chaining.html | 163 ++-- .../cancel-scheduled-values.html | 193 ++-- .../realtime-conv.html | 212 +++-- .../the-gainnode-interface/gain.html | 140 ++- .../set_geolocation_override/conftest.py | 19 +- .../webdriver/tests/bidi/network/__init__.py | 29 +- .../bidi/network/continue_response/headers.py | 12 +- .../bidi/network/provide_response/headers.py | 12 +- .../webdriver/tests/bidi/storage/__init__.py | 2 +- .../bidi/storage/delete_cookies/filter.py | 51 +- .../bidi/storage/delete_cookies/partition.py | 16 +- .../tests/bidi/storage/get_cookies/filter.py | 61 +- .../bidi/storage/get_cookies/partition.py | 20 +- .../storage/set_cookie/cookie_same_site.py | 6 +- .../bidi/storage/set_cookie/cookie_secure.py | 9 +- .../webdriver/tests/support/fixtures_bidi.py | 2 +- .../qdq_subgraph.https.any.js | 165 ++++ .../conformance_tests/sigmoid.https.any.js | 24 +- .../conformance_tests/tensor.https.any.js | 452 +++++++++- .../webnn/conformance_tests/tile.https.any.js | 22 + tests/wpt/tests/workers/WEB_FEATURES.yml | 3 + 192 files changed, 4789 insertions(+), 2068 deletions(-) delete mode 100644 tests/wpt/meta/content-security-policy/frame-ancestors/frame-ancestors-path-ignored.window.js.ini create mode 100644 tests/wpt/meta/content-security-policy/unsafe-eval/tentative/eval-blocked-report-contains-hash.html.ini create mode 100644 tests/wpt/meta/css/css-borders/tentative/border-shape/border-shape-shadow.html.ini create mode 100644 tests/wpt/meta/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html.ini delete mode 100644 tests/wpt/meta/css/css-mixins/contents-rule.html.ini delete mode 100644 tests/wpt/meta/css/css-mixins/cross-stylesheet.html.ini delete mode 100644 tests/wpt/meta/css/css-mixins/shadow-dom.html.ini create mode 100644 tests/wpt/meta/css/css-ui/caret-shape-block-color-004.tentative.html.ini create mode 100644 tests/wpt/meta/css/filter-effects/backdrop-filter-root-toggle-crash.html.ini create mode 100644 tests/wpt/meta/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini create mode 100644 tests/wpt/meta/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html.ini delete mode 100644 tests/wpt/meta/html/rendering/non-replaced-elements/sections-and-headings/headings-styles.html.ini delete mode 100644 tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-nav-location-assign.html.ini create mode 100644 tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-reload-location-reload.html.ini delete mode 100644 tests/wpt/meta/html/semantics/forms/historical.html.ini create mode 100644 tests/wpt/meta/html/webappapis/user-prompts/print-during-unload.html.ini create mode 100644 tests/wpt/meta/selection/selection-modify-extend-word-generated-content.html.ini create mode 100644 tests/wpt/meta/subresource-integrity/integrity-policy/style.https.html.ini create mode 100644 tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_inline.sub.html create mode 100644 tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_inline_meta.sub.html create mode 100644 tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-blocked-report-contains-hash.html create mode 100644 tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-blocked-report-contains-hash.html.sub.headers create mode 100644 tests/wpt/tests/css/css-animations/animation-name-inline-style.html create mode 100644 tests/wpt/tests/css/css-borders/tentative/border-shape/border-shape-shadow-ref.html create mode 100644 tests/wpt/tests/css/css-borders/tentative/border-shape/border-shape-shadow.html create mode 100644 tests/wpt/tests/css/css-cascade/resources/scope-implicit.css create mode 100644 tests/wpt/tests/css/css-cascade/scope-implicit-001-print.html create mode 100644 tests/wpt/tests/css/css-cascade/scope-implicit-002-print.html create mode 100644 tests/wpt/tests/css/css-cascade/scope-implicit-003-print-ref.html create mode 100644 tests/wpt/tests/css/css-cascade/scope-implicit-003-print.html create mode 100644 tests/wpt/tests/css/css-cascade/scope-implicit-004-print.xhtml create mode 100644 tests/wpt/tests/css/css-cascade/scope-implicit-005-print.html create mode 100644 tests/wpt/tests/css/css-cascade/scope-implicit-006-print.html create mode 100644 tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-011-crash.html create mode 100644 tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-circle-0-percent-ref.html create mode 100644 tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-circle-0-percent.html create mode 100644 tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-inset-50-percent-ref.html create mode 100644 tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-inset-50-percent.html create mode 100644 tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-transition-allow-discrete.html delete mode 100644 tests/wpt/tests/css/css-mixins/contents-rule.html delete mode 100644 tests/wpt/tests/css/css-mixins/cross-stylesheet.html delete mode 100644 tests/wpt/tests/css/css-mixins/shadow-dom.html create mode 100644 tests/wpt/tests/css/css-multicol/crashtests/block-in-inline-with-spanner-in-overflowed-parent-nested-multicol.html create mode 100644 tests/wpt/tests/css/css-multicol/crashtests/block-in-inline-with-spanner-in-overflowed-parent.html create mode 100644 tests/wpt/tests/css/css-scroll-anchoring/fresh-table-col-crash.html create mode 100644 tests/wpt/tests/css/css-scroll-snap/scroll-initial-target/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-text-decor/animations/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-ui/caret-shape-block-color-004-ref.tentative.html create mode 100644 tests/wpt/tests/css/css-ui/caret-shape-block-color-004.tentative.html create mode 100644 tests/wpt/tests/css/filter-effects/backdrop-filter-root-toggle-crash.html create mode 100644 tests/wpt/tests/css/filter-effects/feconvolve-divisor.html create mode 100644 tests/wpt/tests/css/filter-effects/kernel-unit-length-001.html create mode 100644 tests/wpt/tests/css/filter-effects/kernel-unit-length-002.html create mode 100644 tests/wpt/tests/css/filter-effects/lighting-region.html create mode 100644 tests/wpt/tests/css/filter-effects/reference/feconvolve-divisor-ref.html create mode 100644 tests/wpt/tests/css/filter-effects/reference/kernel-unit-length-ref.html create mode 100644 tests/wpt/tests/css/filter-effects/reference/lighting-region-ref.html create mode 100644 tests/wpt/tests/dom/nodes/moveBefore/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-active-cannot-replace-active.tentative.https.html create mode 100644 tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-active-replaces-passive.tentative.https.html delete mode 100644 tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-button-mode-priority.tentative.https.html create mode 100644 tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-passive-after-active.tentative.https.html create mode 100644 tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-passive-cannot-replace-active.tentative.https.html rename tests/wpt/tests/html-aam/{fragile => }/area-role.html (100%) rename tests/wpt/tests/html-aam/{fragile/optgroup-role.html => optgroup-role.tentative.html} (100%) delete mode 100644 tests/wpt/tests/html/rendering/non-replaced-elements/sections-and-headings/headings-styles-no-h1-in-section.tentative.html create mode 100644 tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-bounded-reftest-ref.html create mode 100644 tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-bounded-reftest.html create mode 100644 tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-bounded-reftest-ref.html create mode 100644 tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-bounded-reftest.html create mode 100644 tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest-ref.html create mode 100644 tests/wpt/tests/html/semantics/permission-element/text-stroke-and-fill-ref.html create mode 100644 tests/wpt/tests/html/semantics/permission-element/text-stroke-and-fill.tentative.html create mode 100644 tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-event-timing.tentative.html create mode 100644 tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/emulation/set_locale_override.https.html.ini create mode 100644 tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/emulation/set_screen_orientation_override.https.html.ini create mode 100644 tests/wpt/tests/infrastructure/testdriver/bidi/emulation/set_locale_override.https.html create mode 100644 tests/wpt/tests/infrastructure/testdriver/bidi/emulation/set_screen_orientation_override.https.html delete mode 100644 tests/wpt/tests/pointerevents/bugs/events_after_lostpointercapture_remove_setcapture_node.html create mode 100644 tests/wpt/tests/pointerevents/pointerevent_pointerrawupdate_coalesced_events_attributes.https.html create mode 100644 tests/wpt/tests/scroll-animations/animation-trigger/parsing/timeline-trigger-shorthand.tentative.html create mode 100644 tests/wpt/tests/selection/selection-modify-extend-word-generated-content.html create mode 100644 tests/wpt/tests/subresource-integrity/integrity-policy/resources/style.css create mode 100644 tests/wpt/tests/subresource-integrity/integrity-policy/style.https.html create mode 100644 tests/wpt/tests/svg/animations/scripted/keypoints-attribute-trailing-semi.html create mode 100644 tests/wpt/tests/svg/animations/scripted/keytimes-attribute-trailing-semi.html create mode 100644 tests/wpt/tests/svg/painting/reftests/zero-scale-svg-transform-inside-g-tag.html diff --git a/tests/wpt/meta/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/meta/FileAPI/url/url-in-tags-revoke.window.js.ini index 62c2d998e8f..745f3e84edb 100644 --- a/tests/wpt/meta/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/meta/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -14,3 +14,6 @@ [Opening a blob URL in a new window by clicking an tag works immediately before revoking the URL.] expected: TIMEOUT + + [Fetching a blob URL immediately before revoking it works in diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_inline.sub.html b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_inline.sub.html new file mode 100644 index 00000000000..c2d95b2cc01 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_inline.sub.html @@ -0,0 +1,19 @@ + + + + + + + + + + diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_inline_meta.sub.html b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_inline_meta.sub.html new file mode 100644 index 00000000000..10e57ea6bca --- /dev/null +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_inline_meta.sub.html @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta.sub.html b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta.sub.html index d4c1bbd0583..669f6d64dc0 100644 --- a/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta.sub.html +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta.sub.html @@ -1,3 +1,4 @@ + diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta_multiple.html b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta_multiple.html index 2837dde2142..c682f8ed37b 100644 --- a/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta_multiple.html +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta_multiple.html @@ -1,3 +1,4 @@ + diff --git a/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-blocked-report-contains-hash.html b/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-blocked-report-contains-hash.html new file mode 100644 index 00000000000..783e86c5f94 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-blocked-report-contains-hash.html @@ -0,0 +1,23 @@ + + + + eval-blocked-and-sends-report + + + + + + + + + +
+ + + diff --git a/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-blocked-report-contains-hash.html.sub.headers b/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-blocked-report-contains-hash.html.sub.headers new file mode 100644 index 00000000000..9627428202c --- /dev/null +++ b/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-blocked-report-contains-hash.html.sub.headers @@ -0,0 +1,6 @@ +Expires: Mon, 26 Jul 1997 05:00:00 GMT +Cache-Control: no-store, no-cache, must-revalidate +Cache-Control: post-check=0, pre-check=0, false +Pragma: no-cache +Set-Cookie: eval-blocked-report-contains-hash={{$id:uuid()}}; +Content-Security-Policy: script-src 'self' 'unsafe-inline'; report-uri /reporting/resources/report.py?op=put&reportID={{$id}} \ No newline at end of file diff --git a/tests/wpt/tests/cookie-store/cookieStore_set_arguments.https.any.js b/tests/wpt/tests/cookie-store/cookieStore_set_arguments.https.any.js index 3e9ac5f3e98..37744cb7c88 100644 --- a/tests/wpt/tests/cookie-store/cookieStore_set_arguments.https.any.js +++ b/tests/wpt/tests/cookie-store/cookieStore_set_arguments.https.any.js @@ -305,7 +305,7 @@ promise_test(async testCase => { const cookies = await cookieStore.getAll('cookie-name'); assert_equals(cookies.length, 1); assert_equals(cookies[0].name, 'cookie-name'); - assert_equals(cookies[0].value, 'cookie-new-value'); + assert_equals(cookies[0].value, 'new-cookie-value'); }, 'cookieStore.set can modify a cookie set by document.cookie if document is defined'); promise_test(async testCase => { diff --git a/tests/wpt/tests/cookies/prefix/document-cookie.non-secure.html b/tests/wpt/tests/cookies/prefix/document-cookie.non-secure.html index efa16a8c5ee..e11776e3c46 100644 --- a/tests/wpt/tests/cookies/prefix/document-cookie.non-secure.html +++ b/tests/wpt/tests/cookies/prefix/document-cookie.non-secure.html @@ -3,12 +3,13 @@ diff --git a/tests/wpt/tests/css/css-animations/animation-name-inline-style.html b/tests/wpt/tests/css/css-animations/animation-name-inline-style.html new file mode 100644 index 00000000000..0a9da80399c --- /dev/null +++ b/tests/wpt/tests/css/css-animations/animation-name-inline-style.html @@ -0,0 +1,19 @@ + + + + + +
+ diff --git a/tests/wpt/tests/css/css-borders/tentative/border-shape/border-shape-shadow-ref.html b/tests/wpt/tests/css/css-borders/tentative/border-shape/border-shape-shadow-ref.html new file mode 100644 index 00000000000..da25a67bd8b --- /dev/null +++ b/tests/wpt/tests/css/css-borders/tentative/border-shape/border-shape-shadow-ref.html @@ -0,0 +1,26 @@ + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/tests/css/css-borders/tentative/border-shape/border-shape-shadow.html b/tests/wpt/tests/css/css-borders/tentative/border-shape/border-shape-shadow.html new file mode 100644 index 00000000000..3de55d2ff89 --- /dev/null +++ b/tests/wpt/tests/css/css-borders/tentative/border-shape/border-shape-shadow.html @@ -0,0 +1,22 @@ + + + + + +
+
diff --git a/tests/wpt/tests/css/css-cascade/resources/scope-implicit.css b/tests/wpt/tests/css/css-cascade/resources/scope-implicit.css new file mode 100644 index 00000000000..5559499b399 --- /dev/null +++ b/tests/wpt/tests/css/css-cascade/resources/scope-implicit.css @@ -0,0 +1,7 @@ +@scope { + .a { + width: 100px; + height :100px; + background: green; + } +} diff --git a/tests/wpt/tests/css/css-cascade/scope-implicit-001-print.html b/tests/wpt/tests/css/css-cascade/scope-implicit-001-print.html new file mode 100644 index 00000000000..99ba919d89d --- /dev/null +++ b/tests/wpt/tests/css/css-cascade/scope-implicit-001-print.html @@ -0,0 +1,18 @@ + + + + + +
+ +

Test passes if there is a filled green square.

+
+
diff --git a/tests/wpt/tests/css/css-cascade/scope-implicit-002-print.html b/tests/wpt/tests/css/css-cascade/scope-implicit-002-print.html new file mode 100644 index 00000000000..9f2ae4a8943 --- /dev/null +++ b/tests/wpt/tests/css/css-cascade/scope-implicit-002-print.html @@ -0,0 +1,10 @@ + + + + + +
+ +

Test passes if there is a filled green square.

+
+
diff --git a/tests/wpt/tests/css/css-cascade/scope-implicit-003-print-ref.html b/tests/wpt/tests/css/css-cascade/scope-implicit-003-print-ref.html new file mode 100644 index 00000000000..40fe830f2c3 --- /dev/null +++ b/tests/wpt/tests/css/css-cascade/scope-implicit-003-print-ref.html @@ -0,0 +1,8 @@ + + + + +

Test passes if there is a filled green square.

+ + + diff --git a/tests/wpt/tests/css/css-cascade/scope-implicit-003-print.html b/tests/wpt/tests/css/css-cascade/scope-implicit-003-print.html new file mode 100644 index 00000000000..cfa2c355dba --- /dev/null +++ b/tests/wpt/tests/css/css-cascade/scope-implicit-003-print.html @@ -0,0 +1,16 @@ + + + + + +

Test passes if there is a filled green square.

+ + + + diff --git a/tests/wpt/tests/css/css-cascade/scope-implicit-004-print.xhtml b/tests/wpt/tests/css/css-cascade/scope-implicit-004-print.xhtml new file mode 100644 index 00000000000..45dabe00bac --- /dev/null +++ b/tests/wpt/tests/css/css-cascade/scope-implicit-004-print.xhtml @@ -0,0 +1,22 @@ + + + + + + + +
+ +

Test passes if there is a filled green square.

+
+
+ + diff --git a/tests/wpt/tests/css/css-cascade/scope-implicit-005-print.html b/tests/wpt/tests/css/css-cascade/scope-implicit-005-print.html new file mode 100644 index 00000000000..ffc4510f5b0 --- /dev/null +++ b/tests/wpt/tests/css/css-cascade/scope-implicit-005-print.html @@ -0,0 +1,22 @@ + + + + + +
+

Test passes if there is a filled green square.

+
+ +
+
diff --git a/tests/wpt/tests/css/css-cascade/scope-implicit-006-print.html b/tests/wpt/tests/css/css-cascade/scope-implicit-006-print.html new file mode 100644 index 00000000000..3b432b40329 --- /dev/null +++ b/tests/wpt/tests/css/css-cascade/scope-implicit-006-print.html @@ -0,0 +1,31 @@ + + + + + +
+ +

Test passes if there is a filled green square.

+
+
+ +
+
diff --git a/tests/wpt/tests/css/css-conditional/container-queries/counters-flex-circular.html b/tests/wpt/tests/css/css-conditional/container-queries/counters-flex-circular.html index 661c9a9b3f6..3639029343d 100644 --- a/tests/wpt/tests/css/css-conditional/container-queries/counters-flex-circular.html +++ b/tests/wpt/tests/css/css-conditional/container-queries/counters-flex-circular.html @@ -49,8 +49,9 @@
diff --git a/tests/wpt/tests/css/css-conditional/container-queries/font-relative-units-dynamic.html b/tests/wpt/tests/css/css-conditional/container-queries/font-relative-units-dynamic.html index a9983d2f028..ee1fbdd0627 100644 --- a/tests/wpt/tests/css/css-conditional/container-queries/font-relative-units-dynamic.html +++ b/tests/wpt/tests/css/css-conditional/container-queries/font-relative-units-dynamic.html @@ -6,7 +6,7 @@ diff --git a/tests/wpt/tests/css/css-flexbox/META.yml b/tests/wpt/tests/css/css-flexbox/META.yml index 503fc08f576..a8543dc98b0 100644 --- a/tests/wpt/tests/css/css-flexbox/META.yml +++ b/tests/wpt/tests/css/css-flexbox/META.yml @@ -2,7 +2,6 @@ spec: https://drafts.csswg.org/css-flexbox/ suggested_reviewers: - kojiishi - plinss - - cbiesinger - fantasai - rachelandrew - tabatkins diff --git a/tests/wpt/tests/css/css-fonts/WEB_FEATURES.yml b/tests/wpt/tests/css/css-fonts/WEB_FEATURES.yml index 856ded1a75b..5b89ca9194d 100644 --- a/tests/wpt/tests/css/css-fonts/WEB_FEATURES.yml +++ b/tests/wpt/tests/css/css-fonts/WEB_FEATURES.yml @@ -28,6 +28,9 @@ features: files: - alternates-order.html - font-variant-alternates-* +- name: font-variant-emoji + files: + - font-variant-emoji-* - name: font-variant-position files: - font-variant-position-* diff --git a/tests/wpt/tests/css/css-fonts/parsing/WEB_FEATURES.yml b/tests/wpt/tests/css/css-fonts/parsing/WEB_FEATURES.yml index b21b7a700e9..78cf199ae09 100644 --- a/tests/wpt/tests/css/css-fonts/parsing/WEB_FEATURES.yml +++ b/tests/wpt/tests/css/css-fonts/parsing/WEB_FEATURES.yml @@ -29,3 +29,9 @@ features: - name: font-variant-alternates files: - font-variant-alternates-* +- name: font-variant-emoji + files: + - font-variant-emoji-* +- name: font-variant-position + files: + - font-variant-position-* diff --git a/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-011-crash.html b/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-011-crash.html new file mode 100644 index 00000000000..f45c0fefe8f --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-011-crash.html @@ -0,0 +1,15 @@ + + + Make sure we don't crash when we don't have a gap and also have a repeater for color + + + + +
diff --git a/tests/wpt/tests/css/css-inline/initial-letter/initial-letter-with-tab-ref.html b/tests/wpt/tests/css/css-inline/initial-letter/initial-letter-with-tab-ref.html index 332dc003772..46389bc1ce2 100644 --- a/tests/wpt/tests/css/css-inline/initial-letter/initial-letter-with-tab-ref.html +++ b/tests/wpt/tests/css/css-inline/initial-letter/initial-letter-with-tab-ref.html @@ -26,7 +26,7 @@ float: left; height: 80px; margin-top: 2px; - width: 640px; + width: 160px; } diff --git a/tests/wpt/tests/css/css-inline/initial-letter/initial-letter-with-tab-rtl-ref.html b/tests/wpt/tests/css/css-inline/initial-letter/initial-letter-with-tab-rtl-ref.html index 0b9a074af70..3fae1415b33 100644 --- a/tests/wpt/tests/css/css-inline/initial-letter/initial-letter-with-tab-rtl-ref.html +++ b/tests/wpt/tests/css/css-inline/initial-letter/initial-letter-with-tab-rtl-ref.html @@ -27,7 +27,7 @@ float: right; height: 80px; margin-top: 2px; - width: 640px; + width: 160px; } diff --git a/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-circle-0-percent-ref.html b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-circle-0-percent-ref.html new file mode 100644 index 00000000000..9769e14dae0 --- /dev/null +++ b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-circle-0-percent-ref.html @@ -0,0 +1,13 @@ + + + +
+ + \ No newline at end of file diff --git a/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-circle-0-percent.html b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-circle-0-percent.html new file mode 100644 index 00000000000..080d0cc2a56 --- /dev/null +++ b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-circle-0-percent.html @@ -0,0 +1,26 @@ + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-inset-50-percent-ref.html b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-inset-50-percent-ref.html new file mode 100644 index 00000000000..afbbe0f8756 --- /dev/null +++ b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-inset-50-percent-ref.html @@ -0,0 +1,13 @@ + + + +
+ + \ No newline at end of file diff --git a/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-inset-50-percent.html b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-inset-50-percent.html new file mode 100644 index 00000000000..5bc27441fb0 --- /dev/null +++ b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-inset-50-percent.html @@ -0,0 +1,26 @@ + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-transition-allow-discrete.html b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-transition-allow-discrete.html new file mode 100644 index 00000000000..46338feaf3b --- /dev/null +++ b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-transition-allow-discrete.html @@ -0,0 +1,35 @@ + + + + + + + + + +
+ + + + + diff --git a/tests/wpt/tests/css/css-mixins/contents-rule.html b/tests/wpt/tests/css/css-mixins/contents-rule.html deleted file mode 100644 index abd380e14e4..00000000000 --- a/tests/wpt/tests/css/css-mixins/contents-rule.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - CSS Mixins: Mixins depending on other mixins - - - - - - -
This text should be green.
-
This text should be green.
-
This text should be green.
-
This text should be green.
-
This text should be green.
- - - diff --git a/tests/wpt/tests/css/css-mixins/cross-stylesheet.html b/tests/wpt/tests/css/css-mixins/cross-stylesheet.html deleted file mode 100644 index 0c8d9be7fcf..00000000000 --- a/tests/wpt/tests/css/css-mixins/cross-stylesheet.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - CSS Mixins: Mixin from another stylesheet - - - - - - - -
This text should be green.
- - - diff --git a/tests/wpt/tests/css/css-mixins/shadow-dom.html b/tests/wpt/tests/css/css-mixins/shadow-dom.html deleted file mode 100644 index f3f62ba2025..00000000000 --- a/tests/wpt/tests/css/css-mixins/shadow-dom.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - CSS Mixins: Shadow DOM - - - - - - -
- -
-
This text should be green.
- - - diff --git a/tests/wpt/tests/css/css-multicol/crashtests/block-in-inline-with-spanner-in-overflowed-parent-nested-multicol.html b/tests/wpt/tests/css/css-multicol/crashtests/block-in-inline-with-spanner-in-overflowed-parent-nested-multicol.html new file mode 100644 index 00000000000..b75aad5bfc0 --- /dev/null +++ b/tests/wpt/tests/css/css-multicol/crashtests/block-in-inline-with-spanner-in-overflowed-parent-nested-multicol.html @@ -0,0 +1,16 @@ + +Nested multicol, overflowed block with spanner in next outer column + + +
+
+ +
+ +
+
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-multicol/crashtests/block-in-inline-with-spanner-in-overflowed-parent.html b/tests/wpt/tests/css/css-multicol/crashtests/block-in-inline-with-spanner-in-overflowed-parent.html new file mode 100644 index 00000000000..6bf5e9c1b9a --- /dev/null +++ b/tests/wpt/tests/css/css-multicol/crashtests/block-in-inline-with-spanner-in-overflowed-parent.html @@ -0,0 +1,12 @@ + +Overflowed block with spanner + + +
+ +
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-page/monolithic-overflow-024-print.html b/tests/wpt/tests/css/css-page/monolithic-overflow-024-print.html index 6153bc98ae0..ea218c428cd 100644 --- a/tests/wpt/tests/css/css-page/monolithic-overflow-024-print.html +++ b/tests/wpt/tests/css/css-page/monolithic-overflow-024-print.html @@ -1,4 +1,5 @@ + diff --git a/tests/wpt/tests/css/css-page/monolithic-overflow-025-print.html b/tests/wpt/tests/css/css-page/monolithic-overflow-025-print.html index 3fefbc37e2e..1c91afaed5f 100644 --- a/tests/wpt/tests/css/css-page/monolithic-overflow-025-print.html +++ b/tests/wpt/tests/css/css-page/monolithic-overflow-025-print.html @@ -1,4 +1,5 @@ + diff --git a/tests/wpt/tests/css/css-pseudo/marker-computed-size.html b/tests/wpt/tests/css/css-pseudo/marker-computed-size.html index 76851369ab5..b8468ff7d89 100644 --- a/tests/wpt/tests/css/css-pseudo/marker-computed-size.html +++ b/tests/wpt/tests/css/css-pseudo/marker-computed-size.html @@ -37,47 +37,49 @@ function checkMarkerSize(expectedWidth, expectedHeight) { } setup({explicit_done: true}); addEventListener("load", () => { - test(() => { - // Marker string: "1. " - target.style.listStyleType = "decimal"; - checkMarkerSize("30px", "10px"); - }, "Decimal ::marker"); - test(() => { - // Marker string: "10. " - target.setAttribute("value", "10"); - checkMarkerSize("40px", "10px"); - }, "Decimal ::marker with custom value"); - test(() => { - // Marker string: "st" - target.style.listStyleType = "'st'"; - checkMarkerSize("20px", "10px"); - }, "String ::marker"); - test(() => { - // No marker box - target.style.listStyleType = "none"; - checkMarkerSize("auto", "auto"); - }, "::marker with no box due to 'list-style'"); - test(() => { - // Marker contents: "foo", "bar" - target.style.setProperty("--content", "'foo' 'bar'"); - checkMarkerSize("60px", "10px"); - }, "::marker with custom string contents"); - test(() => { - // Marker contents: 100x50 image (+2px due to baseline alignment) - target.style.setProperty("--content", "var(--image)"); - checkMarkerSize("100px", "52px"); - }, "::marker with custom image contents"); - test(() => { - // Marker contents: "foo", 100x50 image (+2px due to baseline alignment) - target.style.setProperty("--content", "'foo' var(--image)"); - checkMarkerSize("130px", "52px"); - }, "::marker with custom string and image contents"); - test(() => { - // No marker box - target.style.listStyleType = ""; - target.style.setProperty("--content", "none"); - checkMarkerSize("auto", "auto"); - }, "::marker with no box due to 'content'"); - done(); + document.fonts.load("10px Ahem").then(() => { + test(() => { + // Marker string: "1. " + target.style.listStyleType = "decimal"; + checkMarkerSize("30px", "10px"); + }, "Decimal ::marker"); + test(() => { + // Marker string: "10. " + target.setAttribute("value", "10"); + checkMarkerSize("40px", "10px"); + }, "Decimal ::marker with custom value"); + test(() => { + // Marker string: "st" + target.style.listStyleType = "'st'"; + checkMarkerSize("20px", "10px"); + }, "String ::marker"); + test(() => { + // No marker box + target.style.listStyleType = "none"; + checkMarkerSize("auto", "auto"); + }, "::marker with no box due to 'list-style'"); + test(() => { + // Marker contents: "foo", "bar" + target.style.setProperty("--content", "'foo' 'bar'"); + checkMarkerSize("60px", "10px"); + }, "::marker with custom string contents"); + test(() => { + // Marker contents: 100x50 image (+2px due to baseline alignment) + target.style.setProperty("--content", "var(--image)"); + checkMarkerSize("100px", "52px"); + }, "::marker with custom image contents"); + test(() => { + // Marker contents: "foo", 100x50 image (+2px due to baseline alignment) + target.style.setProperty("--content", "'foo' var(--image)"); + checkMarkerSize("130px", "52px"); + }, "::marker with custom string and image contents"); + test(() => { + // No marker box + target.style.listStyleType = ""; + target.style.setProperty("--content", "none"); + checkMarkerSize("auto", "auto"); + }, "::marker with no box due to 'content'"); + done(); + }); }, {once: true}); diff --git a/tests/wpt/tests/css/css-scroll-anchoring/fresh-table-col-crash.html b/tests/wpt/tests/css/css-scroll-anchoring/fresh-table-col-crash.html new file mode 100644 index 00000000000..dc5b2b43f3d --- /dev/null +++ b/tests/wpt/tests/css/css-scroll-anchoring/fresh-table-col-crash.html @@ -0,0 +1,12 @@ + +Scroll anchoring at focused input element inside editable newly created table-column + + +
+ +
+ diff --git a/tests/wpt/tests/css/css-scroll-snap/scroll-initial-target/WEB_FEATURES.yml b/tests/wpt/tests/css/css-scroll-snap/scroll-initial-target/WEB_FEATURES.yml new file mode 100644 index 00000000000..df984ee32f8 --- /dev/null +++ b/tests/wpt/tests/css/css-scroll-snap/scroll-initial-target/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: scroll-initial-target + files: "**" diff --git a/tests/wpt/tests/css/css-tables/tentative/table-quirks.html b/tests/wpt/tests/css/css-tables/tentative/table-quirks.html index dcf6c084eda..cdebe8768dd 100644 --- a/tests/wpt/tests/css/css-tables/tentative/table-quirks.html +++ b/tests/wpt/tests/css/css-tables/tentative/table-quirks.html @@ -55,7 +55,7 @@

The collapsing table quirk

-

Chrome Legacy/Edge/Safari ignore the quirk, FF does not. Proposal: depreciate the quirk

+

Chrome Legacy/Edge/Safari ignore the quirk, FF does not. Proposal: deprecate the quirk

The table cell width calculation quirk

@@ -64,10 +64,10 @@

The "let cell grows downward be false" quirk

-

Chrome LayoutNG and Safari ignore the quirk, FF does not.

+

Chrome LayoutNG and Safari ignore the quirk, FF does not. Proposal: deprecate the quirk

- +
100 height208 height
@@ -82,7 +82,7 @@ assert_equals(window.getComputedStyle(document.querySelector("#notitalic")).fontStyle, "normal"); }, "decoration does not propagate into table"); test(_ => { - assert_equals(document.querySelector("#rowspan").rowSpan, 1); - }, "rowspan can't be zero"); + assert_equals(document.querySelector("#rowspan").rowSpan, 0); + }, "rowspan can be zero"); document.fonts.ready.then(() => checkLayout("table")); diff --git a/tests/wpt/tests/css/css-text-decor/WEB_FEATURES.yml b/tests/wpt/tests/css/css-text-decor/WEB_FEATURES.yml index c85df8c804b..db75fe44cd4 100644 --- a/tests/wpt/tests/css/css-text-decor/WEB_FEATURES.yml +++ b/tests/wpt/tests/css/css-text-decor/WEB_FEATURES.yml @@ -2,3 +2,6 @@ features: - name: text-emphasis files: - text-emphasis-* +- name: text-underline-offset + files: + - text-underline-offset-* diff --git a/tests/wpt/tests/css/css-text-decor/animations/WEB_FEATURES.yml b/tests/wpt/tests/css/css-text-decor/animations/WEB_FEATURES.yml new file mode 100644 index 00000000000..15436a1fca4 --- /dev/null +++ b/tests/wpt/tests/css/css-text-decor/animations/WEB_FEATURES.yml @@ -0,0 +1,4 @@ +features: +- name: text-underline-offset + files: + - text-underline-offset-* diff --git a/tests/wpt/tests/css/css-ui/caret-shape-block-color-004-ref.tentative.html b/tests/wpt/tests/css/css-ui/caret-shape-block-color-004-ref.tentative.html new file mode 100644 index 00000000000..454a6b2d855 --- /dev/null +++ b/tests/wpt/tests/css/css-ui/caret-shape-block-color-004-ref.tentative.html @@ -0,0 +1,11 @@ + + +
abc
\ No newline at end of file diff --git a/tests/wpt/tests/css/css-ui/caret-shape-block-color-004.tentative.html b/tests/wpt/tests/css/css-ui/caret-shape-block-color-004.tentative.html new file mode 100644 index 00000000000..22f42dc72e2 --- /dev/null +++ b/tests/wpt/tests/css/css-ui/caret-shape-block-color-004.tentative.html @@ -0,0 +1,39 @@ + + +caret-shape block color is the same as what is specified by caret-color property + + + + + + + +
abc
+ + \ No newline at end of file diff --git a/tests/wpt/tests/css/css-view-transitions/support/dialog-in-rtl-iframe-child.html b/tests/wpt/tests/css/css-view-transitions/support/dialog-in-rtl-iframe-child.html index 7b40a8fd5b6..cb1a9459524 100644 --- a/tests/wpt/tests/css/css-view-transitions/support/dialog-in-rtl-iframe-child.html +++ b/tests/wpt/tests/css/css-view-transitions/support/dialog-in-rtl-iframe-child.html @@ -23,6 +23,7 @@ box-sizing: border-box; background-color: limegreen; border: 1px solid black; + outline: none; } diff --git a/tests/wpt/tests/css/cssom-view/getBoundingClientRect-svg.html b/tests/wpt/tests/css/cssom-view/getBoundingClientRect-svg.html index 562c5922243..cb385315e98 100644 --- a/tests/wpt/tests/css/cssom-view/getBoundingClientRect-svg.html +++ b/tests/wpt/tests/css/cssom-view/getBoundingClientRect-svg.html @@ -29,34 +29,40 @@ function getBoundingClientRect(node, start, end) { return rect; } -test(() => { - const element = document.querySelector('#text-1'); - const elementRect = element.getBoundingClientRect(); - const rangeRect = getBoundingClientRect(element.firstChild, 0, element.firstChild.length); - assert_approx_equals(elementRect.x, rangeRect.x, 1); - assert_approx_equals(elementRect.y, rangeRect.y, 1); - assert_approx_equals(elementRect.width, rangeRect.width, 1); - assert_approx_equals(elementRect.height, rangeRect.height, 1); -}, 'Element.getBoundingClientRect() and Range.getBoudingClientRect() should match for an SVG '); +setup({ explicit_done: true }); -test(() => { - const element = document.querySelector('#text-2'); - const elementRect = element.getBoundingClientRect(); - const rangeRect = getBoundingClientRect(element.firstChild, 0, element.firstChild.length); - assert_approx_equals(elementRect.x, rangeRect.x, 1); - assert_approx_equals(elementRect.y, rangeRect.y, 1); - assert_approx_equals(elementRect.width, rangeRect.width, 1); - assert_approx_equals(elementRect.height, rangeRect.height, 1); -}, 'Element.getBoundingClientRect() and Range.getBoudingClientRect() should match for an SVG with a transform'); +document.fonts.ready.then(() => { + test(() => { + const element = document.querySelector('#text-1'); + const elementRect = element.getBoundingClientRect(); + const rangeRect = getBoundingClientRect(element.firstChild, 0, element.firstChild.length); + assert_approx_equals(elementRect.x, rangeRect.x, 1); + assert_approx_equals(elementRect.y, rangeRect.y, 1); + assert_approx_equals(elementRect.width, rangeRect.width, 1); + assert_approx_equals(elementRect.height, rangeRect.height, 1); + }, 'Element.getBoundingClientRect() and Range.getBoudingClientRect() should match for an SVG '); -test(() => { - const element = document.querySelector('#text-3'); - const elementRect = element.getBoundingClientRect(); - const rangeRect = getBoundingClientRect(element.firstChild, 0, element.firstChild.length); - assert_approx_equals(elementRect.x, rangeRect.x, 1); - assert_approx_equals(elementRect.y, rangeRect.y, 1); - assert_approx_equals(elementRect.width, rangeRect.width, 1); - assert_approx_equals(elementRect.height, rangeRect.height, 1); -}, 'Element.getBoundingClientRect() and Range.getBoudingClientRect() should match for an SVG with a rotate'); + test(() => { + const element = document.querySelector('#text-2'); + const elementRect = element.getBoundingClientRect(); + const rangeRect = getBoundingClientRect(element.firstChild, 0, element.firstChild.length); + assert_approx_equals(elementRect.x, rangeRect.x, 1); + assert_approx_equals(elementRect.y, rangeRect.y, 1); + assert_approx_equals(elementRect.width, rangeRect.width, 1); + assert_approx_equals(elementRect.height, rangeRect.height, 1); + }, 'Element.getBoundingClientRect() and Range.getBoudingClientRect() should match for an SVG with a transform'); + + test(() => { + const element = document.querySelector('#text-3'); + const elementRect = element.getBoundingClientRect(); + const rangeRect = getBoundingClientRect(element.firstChild, 0, element.firstChild.length); + assert_approx_equals(elementRect.x, rangeRect.x, 1); + assert_approx_equals(elementRect.y, rangeRect.y, 1); + assert_approx_equals(elementRect.width, rangeRect.width, 1); + assert_approx_equals(elementRect.height, rangeRect.height, 1); + }, 'Element.getBoundingClientRect() and Range.getBoudingClientRect() should match for an SVG with a rotate'); + + done(); +}); diff --git a/tests/wpt/tests/css/filter-effects/backdrop-filter-root-toggle-crash.html b/tests/wpt/tests/css/filter-effects/backdrop-filter-root-toggle-crash.html new file mode 100644 index 00000000000..e29c87971eb --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/backdrop-filter-root-toggle-crash.html @@ -0,0 +1,45 @@ + + + + + + + +
+
+
+ + + + + diff --git a/tests/wpt/tests/css/filter-effects/feconvolve-divisor.html b/tests/wpt/tests/css/filter-effects/feconvolve-divisor.html new file mode 100644 index 00000000000..ed2f15a688e --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/feconvolve-divisor.html @@ -0,0 +1,22 @@ + +Filter primitive (feConvolveMatrix) with zero divisor + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/css/filter-effects/kernel-unit-length-001.html b/tests/wpt/tests/css/filter-effects/kernel-unit-length-001.html new file mode 100644 index 00000000000..c05e8c6e0fc --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/kernel-unit-length-001.html @@ -0,0 +1,26 @@ + +If kernelUnitLength is omitted it should default to 1 + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/css/filter-effects/kernel-unit-length-002.html b/tests/wpt/tests/css/filter-effects/kernel-unit-length-002.html new file mode 100644 index 00000000000..94da7e3d134 --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/kernel-unit-length-002.html @@ -0,0 +1,27 @@ + +If kernelUnitLength is negative or zero it should default to 1 + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/css/filter-effects/lighting-region.html b/tests/wpt/tests/css/filter-effects/lighting-region.html new file mode 100644 index 00000000000..2619d3625cc --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/lighting-region.html @@ -0,0 +1,19 @@ + +Test that no edge lighting highlights appear + + + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/css/filter-effects/reference/feconvolve-divisor-ref.html b/tests/wpt/tests/css/filter-effects/reference/feconvolve-divisor-ref.html new file mode 100644 index 00000000000..d917a697ab7 --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/reference/feconvolve-divisor-ref.html @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/tests/wpt/tests/css/filter-effects/reference/kernel-unit-length-ref.html b/tests/wpt/tests/css/filter-effects/reference/kernel-unit-length-ref.html new file mode 100644 index 00000000000..49c81e7ce57 --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/reference/kernel-unit-length-ref.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/css/filter-effects/reference/lighting-region-ref.html b/tests/wpt/tests/css/filter-effects/reference/lighting-region-ref.html new file mode 100644 index 00000000000..f6ec4021714 --- /dev/null +++ b/tests/wpt/tests/css/filter-effects/reference/lighting-region-ref.html @@ -0,0 +1,8 @@ + + + + + + + diff --git a/tests/wpt/tests/css/geometry/DOMMatrix-003.html b/tests/wpt/tests/css/geometry/DOMMatrix-003.html index 56f463e2ac5..64e9d6885aa 100644 --- a/tests/wpt/tests/css/geometry/DOMMatrix-003.html +++ b/tests/wpt/tests/css/geometry/DOMMatrix-003.html @@ -227,6 +227,12 @@ checkDOMMatrix(result, expected); },"test rotateAxisAngle() "); + test(function() { + var result = new DOMMatrix([1, 1, 1, 1, 1, 1]).rotateAxisAngle(0, 0, 3, 90); + var expected = new DOMMatrix([1, 1, -1, -1, 1, 1]); + checkDOMMatrix(result, expected); + },"test rotateAxisAngle() on 2D matrix with 2D rotation"); + test(function() { var angleDeg = 75; var result = initialDOMMatrix().skewX(angleDeg); diff --git a/tests/wpt/tests/digital-credentials/get.tentative.https.html b/tests/wpt/tests/digital-credentials/get.tentative.https.html index 8c0c33c2fa1..7c1e6631da7 100644 --- a/tests/wpt/tests/digital-credentials/get.tentative.https.html +++ b/tests/wpt/tests/digital-credentials/get.tentative.https.html @@ -231,4 +231,24 @@ ); } }, "Mediation is required to get a DigitalCredential."); + +promise_test(async t => { + const throwingValues = [ + BigInt(123), + (() => { const o = {}; o.self = o; return o; })(), + Symbol("foo") + ]; + + for (const badValue of throwingValues) { + const options = makeGetOptions("openid4vp"); + options.digital.requests[0].data = badValue; + + await promise_rejects_js( + t, + TypeError, + navigator.credentials.get(options), + `Should throw for: ${String(badValue)}` + ); + } +}, "Throws TypeError when request data is not JSON stringifiable."); diff --git a/tests/wpt/tests/docs/writing-tests/testdriver.md b/tests/wpt/tests/docs/writing-tests/testdriver.md index 0fea4ca780a..ce5aa6af545 100644 --- a/tests/wpt/tests/docs/writing-tests/testdriver.md +++ b/tests/wpt/tests/docs/writing-tests/testdriver.md @@ -339,4 +339,6 @@ Emulation of browser APIs via [WebDriver BiDi Emulation](https://www.w3.org/TR/w ```eval_rst .. js:autofunction:: test_driver.bidi.emulation.set_geolocation_override +.. js:autofunction:: test_driver.bidi.emulation.set_locale_override +.. js:autofunction:: test_driver.bidi.emulation.set_screen_orientation_override ``` diff --git a/tests/wpt/tests/dom/nodes/DOMImplementation-createDocument.html b/tests/wpt/tests/dom/nodes/DOMImplementation-createDocument.html index 4550f5d0dce..1efea6855fd 100644 --- a/tests/wpt/tests/dom/nodes/DOMImplementation-createDocument.html +++ b/tests/wpt/tests/dom/nodes/DOMImplementation-createDocument.html @@ -112,11 +112,11 @@ test(function() { assert_not_equals(element, null) assert_equals(element.nodeType, Node.ELEMENT_NODE) assert_equals(element.ownerDocument, doc) - var qualified = String(qualifiedName), names = [] + var qualified = String(qualifiedName) + var names = [] var firstColonIndex = qualified.indexOf(":") if (firstColonIndex >= 0) { - names.push(qualified.substring(0, firstColonIndex)); - names.push(qualified.substring(firstColonIndex + 1)); + names = qualifiedName.split(":", 2); } else { names = [null, qualified] } diff --git a/tests/wpt/tests/dom/nodes/Document-createElementNS.html b/tests/wpt/tests/dom/nodes/Document-createElementNS.html index 03e5a7687d2..9d0792647d3 100644 --- a/tests/wpt/tests/dom/nodes/Document-createElementNS.html +++ b/tests/wpt/tests/dom/nodes/Document-createElementNS.html @@ -58,18 +58,20 @@ function runTest(t, i, desc) { assert_equals(element.nodeType, element.ELEMENT_NODE) assert_equals(element.nodeValue, null) assert_equals(element.ownerDocument, doc) - var qualified = String(qualifiedName), names = [] + var qualified = String(qualifiedName) + var tagName = String(qualifiedName) + var names = []; var firstColonIndex = qualified.indexOf(":") if (firstColonIndex >= 0) { - names.push(qualified.substring(0, firstColonIndex)); - names.push(qualified.substring(firstColonIndex + 1)); + names = qualifiedName.split(":", 2); + tagName = names.join(":"); } else { names = [null, qualified] } assert_equals(element.prefix, names[0], 'element.prefix') assert_equals(element.localName, names[1], 'element.localName') - assert_equals(element.tagName, qualified, 'element.tagName') - assert_equals(element.nodeName, qualified, 'element.nodeName') + assert_equals(element.tagName, tagName, 'element.tagName') + assert_equals(element.nodeName, tagName, 'element.nodeName') assert_equals(element.namespaceURI, namespace === undefined || namespace === "" ? null : namespace, diff --git a/tests/wpt/tests/dom/nodes/Document-createElementNS.js b/tests/wpt/tests/dom/nodes/Document-createElementNS.js index d2e2f78e77e..21902ec504e 100644 --- a/tests/wpt/tests/dom/nodes/Document-createElementNS.js +++ b/tests/wpt/tests/dom/nodes/Document-createElementNS.js @@ -26,7 +26,7 @@ var createElementNS_tests = [ [null, "fo o", "INVALID_CHARACTER_ERR"], [null, "-foo", "INVALID_CHARACTER_ERR"], [null, ".foo", "INVALID_CHARACTER_ERR"], - [null, ":foo", null], + [null, ":foo", "INVALID_CHARACTER_ERR"], [null, "f:oo", "NAMESPACE_ERR"], [null, "foo:", "INVALID_CHARACTER_ERR"], [null, "f:o:o", "NAMESPACE_ERR"], @@ -39,7 +39,7 @@ var createElementNS_tests = [ [null, "xmlfoo:bar", "NAMESPACE_ERR"], [null, "null:xml", "NAMESPACE_ERR"], ["", null, null], - ["", ":foo", null], + ["", ":foo", "INVALID_CHARACTER_ERR"], ["", "f:oo", "NAMESPACE_ERR"], ["", "foo:", "INVALID_CHARACTER_ERR"], [undefined, null, null], @@ -48,10 +48,10 @@ var createElementNS_tests = [ [undefined, "1foo", "INVALID_CHARACTER_ERR"], [undefined, "f1oo", null], [undefined, "foo1", null], - [undefined, ":foo", null], + [undefined, ":foo", "INVALID_CHARACTER_ERR"], [undefined, "f:oo", "NAMESPACE_ERR"], [undefined, "foo:", "INVALID_CHARACTER_ERR"], - [undefined, "f::oo", "NAMESPACE_ERR"], + [undefined, "f::oo", "INVALID_CHARACTER_ERR"], [undefined, "xml", null], [undefined, "xmlns", "NAMESPACE_ERR"], [undefined, "xmlfoo", null], @@ -66,11 +66,11 @@ var createElementNS_tests = [ ["http://example.com/", ".foo", "INVALID_CHARACTER_ERR"], ["http://example.com/", "f1oo", null], ["http://example.com/", "foo1", null], - ["http://example.com/", ":foo", null], + ["http://example.com/", ":foo", "INVALID_CHARACTER_ERR"], ["http://example.com/", "f:oo", null], ["http://example.com/", "f:o:o", null], ["http://example.com/", "foo:", "INVALID_CHARACTER_ERR"], - ["http://example.com/", "f::oo", null], + ["http://example.com/", "f::oo", "INVALID_CHARACTER_ERR"], ["http://example.com/", "a:0", "INVALID_CHARACTER_ERR"], ["http://example.com/", "0:a", null], ["http://example.com/", "a:_", null], @@ -103,7 +103,7 @@ var createElementNS_tests = [ ["http://example.com/", "xmlns:foo", "NAMESPACE_ERR"], ["http://example.com/", "XMLNS:foo", null], ["http://example.com/", "xmlfoo:bar", null], - ["http://example.com/", "prefix::local", null], + ["http://example.com/", "prefix::local", "INVALID_CHARACTER_ERR"], ["http://example.com/", "namespaceURI:{", "INVALID_CHARACTER_ERR"], ["http://example.com/", "namespaceURI:}", "INVALID_CHARACTER_ERR"], ["http://example.com/", "namespaceURI:~", "INVALID_CHARACTER_ERR"], @@ -135,7 +135,7 @@ var createElementNS_tests = [ ["/", "1foo", "INVALID_CHARACTER_ERR"], ["/", "f1oo", null], ["/", "foo1", null], - ["/", ":foo", null], + ["/", ":foo", "INVALID_CHARACTER_ERR"], ["/", "f:oo", null], ["/", "foo:", "INVALID_CHARACTER_ERR"], ["/", "xml", null], @@ -148,7 +148,7 @@ var createElementNS_tests = [ ["http://www.w3.org/XML/1998/namespace", "1foo", "INVALID_CHARACTER_ERR"], ["http://www.w3.org/XML/1998/namespace", "f1oo", null], ["http://www.w3.org/XML/1998/namespace", "foo1", null], - ["http://www.w3.org/XML/1998/namespace", ":foo", null], + ["http://www.w3.org/XML/1998/namespace", ":foo", "INVALID_CHARACTER_ERR"], ["http://www.w3.org/XML/1998/namespace", "f:oo", null], ["http://www.w3.org/XML/1998/namespace", "foo:", "INVALID_CHARACTER_ERR"], ["http://www.w3.org/XML/1998/namespace", "xml", null], @@ -163,7 +163,7 @@ var createElementNS_tests = [ ["http://www.w3.org/2000/xmlns/", "1foo", "INVALID_CHARACTER_ERR"], ["http://www.w3.org/2000/xmlns/", "f1oo", "NAMESPACE_ERR"], ["http://www.w3.org/2000/xmlns/", "foo1", "NAMESPACE_ERR"], - ["http://www.w3.org/2000/xmlns/", ":foo", "NAMESPACE_ERR"], + ["http://www.w3.org/2000/xmlns/", ":foo", "INVALID_CHARACTER_ERR"], ["http://www.w3.org/2000/xmlns/", "f:oo", "NAMESPACE_ERR"], ["http://www.w3.org/2000/xmlns/", "foo:", "INVALID_CHARACTER_ERR"], ["http://www.w3.org/2000/xmlns/", "xml", "NAMESPACE_ERR"], @@ -177,7 +177,7 @@ var createElementNS_tests = [ ["foo:", "1foo", "INVALID_CHARACTER_ERR"], ["foo:", "f1oo", null], ["foo:", "foo1", null], - ["foo:", ":foo", null], + ["foo:", ":foo", "INVALID_CHARACTER_ERR"], ["foo:", "f:oo", null], ["foo:", "foo:", "INVALID_CHARACTER_ERR"], ["foo:", "xml", null], diff --git a/tests/wpt/tests/dom/nodes/moveBefore/WEB_FEATURES.yml b/tests/wpt/tests/dom/nodes/moveBefore/WEB_FEATURES.yml new file mode 100644 index 00000000000..759490d9b4f --- /dev/null +++ b/tests/wpt/tests/dom/nodes/moveBefore/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: move-before + files: "**" diff --git a/tests/wpt/tests/dom/nodes/name-validation.html b/tests/wpt/tests/dom/nodes/name-validation.html index ca5e9c11824..79b7b4186ee 100644 --- a/tests/wpt/tests/dom/nodes/name-validation.html +++ b/tests/wpt/tests/dom/nodes/name-validation.html @@ -49,8 +49,8 @@ const validElementLocalNames = validElementLocalNamesShortened.slice(); const invalidElementLocalNames = invalidElementLocalNamesShortened.slice(); const validAttributeLocalNames = validAttributeLocalNamesShortened.slice(); const invalidAttributeLocalNames = invalidAttributeLocalNamesShortened.slice(); -const validNamespacePrefixes = ['', smallEmoji, bigEmoji]; -const invalidNamespacePrefixes = []; +const validNamespacePrefixes = [smallEmoji, bigEmoji]; +const invalidNamespacePrefixes = ['']; const validDoctypes = ['']; const invalidDoctypes = []; diff --git a/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-active-cannot-replace-active.tentative.https.html b/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-active-cannot-replace-active.tentative.https.html new file mode 100644 index 00000000000..58cc6ae85dc --- /dev/null +++ b/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-active-cannot-replace-active.tentative.https.html @@ -0,0 +1,29 @@ + +Federated Credential Management API Active Mode Cannot Replace Active Mode. + + + + + + + diff --git a/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-active-replaces-passive.tentative.https.html b/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-active-replaces-passive.tentative.https.html new file mode 100644 index 00000000000..96bfc0cca24 --- /dev/null +++ b/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-active-replaces-passive.tentative.https.html @@ -0,0 +1,29 @@ + +Federated Credential Management API Active Mode Replaces Passive Mode. + + + + + + + diff --git a/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-button-mode-priority.tentative.https.html b/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-button-mode-priority.tentative.https.html deleted file mode 100644 index c95b89c0fd4..00000000000 --- a/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-button-mode-priority.tentative.https.html +++ /dev/null @@ -1,73 +0,0 @@ - -Federated Credential Management API Active Mode priority tests. - - - - - - - diff --git a/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-passive-after-active.tentative.https.html b/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-passive-after-active.tentative.https.html new file mode 100644 index 00000000000..1f542b336d8 --- /dev/null +++ b/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-passive-after-active.tentative.https.html @@ -0,0 +1,27 @@ + +Federated Credential Management API Passive Mode After Active Mode. + + + + + + + diff --git a/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-passive-cannot-replace-active.tentative.https.html b/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-passive-cannot-replace-active.tentative.https.html new file mode 100644 index 00000000000..04e37248f6c --- /dev/null +++ b/tests/wpt/tests/fedcm/fedcm-button-and-other-account/fedcm-passive-cannot-replace-active.tentative.https.html @@ -0,0 +1,30 @@ + +Federated Credential Management API Passive Mode Cannot Replace Active Mode. + + + + + + + diff --git a/tests/wpt/tests/fonts/ahem.css b/tests/wpt/tests/fonts/ahem.css index 02c1554537a..b278cc14c54 100644 --- a/tests/wpt/tests/fonts/ahem.css +++ b/tests/wpt/tests/fonts/ahem.css @@ -1,6 +1,5 @@ @font-face { font-family: 'Ahem'; - src: local('Ahem'), - url('/fonts/Ahem.ttf'); + src: url('/fonts/Ahem.ttf'); } diff --git a/tests/wpt/tests/html-aam/fragile/area-role.html b/tests/wpt/tests/html-aam/area-role.html similarity index 100% rename from tests/wpt/tests/html-aam/fragile/area-role.html rename to tests/wpt/tests/html-aam/area-role.html diff --git a/tests/wpt/tests/html-aam/fragile/optgroup-role.html b/tests/wpt/tests/html-aam/optgroup-role.tentative.html similarity index 100% rename from tests/wpt/tests/html-aam/fragile/optgroup-role.html rename to tests/wpt/tests/html-aam/optgroup-role.tentative.html diff --git a/tests/wpt/tests/html/browsers/browsing-the-web/back-forward-cache/resources/helper.sub.js b/tests/wpt/tests/html/browsers/browsing-the-web/back-forward-cache/resources/helper.sub.js index 7df1a30549a..cd5b05a1d34 100644 --- a/tests/wpt/tests/html/browsers/browsing-the-web/back-forward-cache/resources/helper.sub.js +++ b/tests/wpt/tests/html/browsers/browsing-the-web/back-forward-cache/resources/helper.sub.js @@ -201,33 +201,33 @@ function runBfcacheTest(params, description) { // Call clients.claim() on the service worker async function claim(t, worker) { const channel = new MessageChannel(); - const saw_message = new Promise(function(resolve) { + const sawMessage = new Promise(function(resolve) { channel.port1.onmessage = t.step_func(function(e) { assert_equals(e.data, 'PASS', 'Worker call to claim() should fulfill.'); resolve(); }); }); worker.postMessage({type: "claim", port: channel.port2}, [channel.port2]); - await saw_message; + await sawMessage; } // Assigns the current client to a local variable on the service worker. async function storeClients(t, worker) { const channel = new MessageChannel(); - const saw_message = new Promise(function(resolve) { + const sawMessage = new Promise(function(resolve) { channel.port1.onmessage = t.step_func(function(e) { assert_equals(e.data, 'PASS', 'storeClients'); resolve(); }); }); worker.postMessage({type: "storeClients", port: channel.port2}, [channel.port2]); - await saw_message; + await sawMessage; } // Call storedClients.postMessage("") on the service worker async function postMessageToStoredClients(t, worker) { const channel = new MessageChannel(); - const saw_message = new Promise(function(resolve) { + const sawMessage = new Promise(function(resolve) { channel.port1.onmessage = t.step_func(function(e) { assert_equals(e.data, 'PASS', 'postMessageToStoredClients'); resolve(); @@ -235,5 +235,5 @@ async function postMessageToStoredClients(t, worker) { }); worker.postMessage({type: "postMessageToStoredClients", port: channel.port2}, [channel.port2]); - await saw_message; + await sawMessage; } diff --git a/tests/wpt/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html b/tests/wpt/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html index f47dfa006c1..39c8a22413e 100644 --- a/tests/wpt/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html +++ b/tests/wpt/tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html @@ -6,6 +6,17 @@ -Dropping image on horizontal scrollbar of a scrollable block element - - + Dropping image on horizontal scrollbar of a scrollable block element + + -

PNG green pixel

-

Drag little square above and drop it on scrollbar below. You should see word PASS when you drop it on scrollbar.

-
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
- + function onDropCallBack(event) { + assert_equals(div.firstChild.nodeValue, 'PASS'); + return true; + } + + dragDropTest(img, div, onDropCallBack, + 'Dragging the image to the horizontal scrollbar within a scrollable block element should copy it there'); + } + test(); + diff --git a/tests/wpt/tests/html/editing/dnd/images/016.html b/tests/wpt/tests/html/editing/dnd/images/016.html index 1b02bf876be..40edee38ee0 100644 --- a/tests/wpt/tests/html/editing/dnd/images/016.html +++ b/tests/wpt/tests/html/editing/dnd/images/016.html @@ -6,43 +6,55 @@ -Dropping image on vertical scrollbar of a scrollable block element - - + Dropping image on vertical scrollbar of a scrollable block element + + -

PNG green pixel

-

Drag little square above and drop it on scrollbar below. You should see word PASS when you drop it on scrollbar.

-
→ → → → → → → → → → → → → → → → → → → →
- + function onDropCallBack(event) { + assert_equals(div.firstChild.nodeValue, 'P A S S'); + return true; + } + + dragDropTest(img, div, onDropCallBack, + 'Dragging the image to the vertical scrollbar within a scrollable block element should copy it there'); + } + test(); + diff --git a/tests/wpt/tests/html/editing/dnd/images/017.html b/tests/wpt/tests/html/editing/dnd/images/017.html index bbf85f04f83..9abeea5514c 100644 --- a/tests/wpt/tests/html/editing/dnd/images/017.html +++ b/tests/wpt/tests/html/editing/dnd/images/017.html @@ -6,45 +6,60 @@ -Dropping image on horizontal page scrollbar - - + Dropping image on horizontal page scrollbar + + -

PNG green pixel

-

Drag little square above and drop it on vertical scrollbar. Word PASS should appear near scrollbar once you drop it.

-
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
- + function onDropCallBack(event) { + assert_equals(div.firstChild.nodeValue, 'PASS'); + return true; + } + + dragDropTest(img, div, onDropCallBack, 'Dragging the image to the horizontal scrollbar should copy it there'); + } + test(); + diff --git a/tests/wpt/tests/html/editing/dnd/images/018.html b/tests/wpt/tests/html/editing/dnd/images/018.html index 3fa61b07d73..1764c38a383 100644 --- a/tests/wpt/tests/html/editing/dnd/images/018.html +++ b/tests/wpt/tests/html/editing/dnd/images/018.html @@ -6,44 +6,60 @@ -Dropping image on vertical page scrollbar - - + Dropping image on vertical page scrollbar + + -

PNG green pixel

-

Drag little square above and drop it on vertical scrollbar. Word PASS should appear near scrollbar once you drop it.

-
→ → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → →
- + function onDropCallBack(event) { + assert_equals(div.firstChild.nodeValue, 'P A S S'); + return true; + } + + dragDropTest(img, div, onDropCallBack, 'Dragging the image to the vertical scrollbar should copy it there'); + } + test(); + diff --git a/tests/wpt/tests/html/editing/dnd/images/021.html b/tests/wpt/tests/html/editing/dnd/images/021.html index 2952e742369..23c1c6c03ca 100644 --- a/tests/wpt/tests/html/editing/dnd/images/021.html +++ b/tests/wpt/tests/html/editing/dnd/images/021.html @@ -6,44 +6,51 @@ -Dropping image on horizontal iframe scrollbar - - + Dropping image on horizontal iframe scrollbar + + -

PNG green pixel

-

Drag little square above and drop it on horizontal scrollbar. Word PASS should appear once you drop it.

- - + function onDropCallBack(event) { + assert_equals(div.textContent, 'PASS'); + return true; + } + + dragDropTest(img, div, onDropCallBack, + 'Dragging the image to the horizontal iframe scrollbar should copy it there', /*dragIframe=*/ null, iframe); + } + test(); + diff --git a/tests/wpt/tests/html/editing/dnd/images/022.xhtml b/tests/wpt/tests/html/editing/dnd/images/022.xhtml index a85f8c10f11..6a8d8f65b5e 100644 --- a/tests/wpt/tests/html/editing/dnd/images/022.xhtml +++ b/tests/wpt/tests/html/editing/dnd/images/022.xhtml @@ -1,27 +1,56 @@ + + + + + + -Dropping image on vertical iframe scrollbar - - + Dropping image on vertical iframe scrollbar + + -

PNG green pixel

-

Drag little square above and drop it on vertical scrollbar. Word PASS should appear once you drop it.

- +

PNG green pixel

+

Drag little square above and drop it on vertical scrollbar. Word PASS should appear once you drop it.

+ + diff --git a/tests/wpt/tests/html/editing/dnd/images/helper-drop-horizontal-scrollbar.xhtml b/tests/wpt/tests/html/editing/dnd/images/helper-drop-horizontal-scrollbar.xhtml index ca1a677cc8c..f8aa0fe7815 100644 --- a/tests/wpt/tests/html/editing/dnd/images/helper-drop-horizontal-scrollbar.xhtml +++ b/tests/wpt/tests/html/editing/dnd/images/helper-drop-horizontal-scrollbar.xhtml @@ -1,9 +1,15 @@ -Image drag and drop: helper file + Image drag and drop: helper file + - -
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
+ +
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ +
- \ No newline at end of file + diff --git a/tests/wpt/tests/html/editing/dnd/images/helper-drop-image-here.xhtml b/tests/wpt/tests/html/editing/dnd/images/helper-drop-image-here.xhtml index 78fa33bf093..266b4fb051d 100644 --- a/tests/wpt/tests/html/editing/dnd/images/helper-drop-image-here.xhtml +++ b/tests/wpt/tests/html/editing/dnd/images/helper-drop-image-here.xhtml @@ -1,28 +1,26 @@ -Image drag and drop: helper file - - + Image drag and drop: helper file + + -
+
diff --git a/tests/wpt/tests/html/editing/dnd/images/helper-drop-vertical-scrollbar.xhtml b/tests/wpt/tests/html/editing/dnd/images/helper-drop-vertical-scrollbar.xhtml index 2c3913bfc38..aa02abd5c96 100644 --- a/tests/wpt/tests/html/editing/dnd/images/helper-drop-vertical-scrollbar.xhtml +++ b/tests/wpt/tests/html/editing/dnd/images/helper-drop-vertical-scrollbar.xhtml @@ -1,13 +1,19 @@ -Image drag and drop: helper file - + Image drag and drop: helper file + + - -
→ → → → → → → → → → → → → → → → → → → →
+ +
→ → → → → → →
diff --git a/tests/wpt/tests/html/editing/dnd/resources/test-helper.js b/tests/wpt/tests/html/editing/dnd/resources/test-helper.js index a77bce83b50..652977c7a51 100644 --- a/tests/wpt/tests/html/editing/dnd/resources/test-helper.js +++ b/tests/wpt/tests/html/editing/dnd/resources/test-helper.js @@ -27,6 +27,8 @@ const movePointerToCenter = (element, iframe, actions) => { // test will only pass if this function returns true. Also, if the `dropElement` is inside an // iframe, use the optional `iframe` parameter to specify an iframe element that contains the // `dropElement` to ensure that tests with an iframe pass. +// TODO(https://crbug.com/426228061): Some tests were written to drag into scrollbars +// instead of the center of the element, this function should be expanded to accommodate them. function dragDropTest(dragElement, dropElement, onDropCallBack, testDescription, dragIframe = undefined, dropIframe = undefined) { promise_test((t) => new Promise(async (resolve, reject) => { diff --git a/tests/wpt/tests/html/rendering/non-replaced-elements/sections-and-headings/headings-styles-no-h1-in-section.tentative.html b/tests/wpt/tests/html/rendering/non-replaced-elements/sections-and-headings/headings-styles-no-h1-in-section.tentative.html deleted file mode 100644 index 61610c2fd6c..00000000000 --- a/tests/wpt/tests/html/rendering/non-replaced-elements/sections-and-headings/headings-styles-no-h1-in-section.tentative.html +++ /dev/null @@ -1,147 +0,0 @@ - -default styles for h1..h6, hgroup, article, aside, nav, section (no h1 in section UA styles) - - - - - - - -
- -
-

-

-

-

-
-
-
-
- - -
-
-

-
-

-
-

-
-

-
-

-
-

-

-

-

-
-
-
-
-
-
-
- - -
-

-
-

-
-

-
-

-
-

-
-

-

-

-

-
-
-
-
-
-
-
-
- -
- - diff --git a/tests/wpt/tests/html/rendering/non-replaced-elements/sections-and-headings/headings-styles.html b/tests/wpt/tests/html/rendering/non-replaced-elements/sections-and-headings/headings-styles.html index be531adfcf5..61610c2fd6c 100644 --- a/tests/wpt/tests/html/rendering/non-replaced-elements/sections-and-headings/headings-styles.html +++ b/tests/wpt/tests/html/rendering/non-replaced-elements/sections-and-headings/headings-styles.html @@ -1,9 +1,10 @@ -default styles for h1..h6, hgroup, article, aside, nav, section +default styles for h1..h6, hgroup, article, aside, nav, section (no h1 in section UA styles) +
diff --git a/tests/wpt/tests/html/rendering/the-details-element/WEB_FEATURES.yml b/tests/wpt/tests/html/rendering/the-details-element/WEB_FEATURES.yml index b2a03da5103..4d91af3a014 100644 --- a/tests/wpt/tests/html/rendering/the-details-element/WEB_FEATURES.yml +++ b/tests/wpt/tests/html/rendering/the-details-element/WEB_FEATURES.yml @@ -1,6 +1,17 @@ features: - name: details files: "**" +- name: details-content + files: + # List all of the tests for ::details-content manually instead of using + # a pattern, since the filename lends itself to testing other pseudo-elements + # for
in the future, if they are added. + - details-pseudo-elements-001.html + - details-pseudo-elements-002.html + - details-pseudo-elements-003.html + - details-pseudo-elements-004.html + - details-pseudo-elements-005.html + - details-pseudo-elements-006.html - name: scroll-to-text-fragment files: - auto-expand-details-text-fragment.html diff --git a/tests/wpt/tests/html/semantics/forms/the-input-element/number.html b/tests/wpt/tests/html/semantics/forms/the-input-element/number.html index 7d93f208985..f7b6f189ce3 100644 --- a/tests/wpt/tests/html/semantics/forms/the-input-element/number.html +++ b/tests/wpt/tests/html/semantics/forms/the-input-element/number.html @@ -40,7 +40,8 @@ {value: "\f1", expected: "", testname: "value with a leading form feed"}, {value: "\r1", expected: "", testname: "value with a leading carriage return"}, {value: " 1", expected: "", testname: "value with a leading space"}, - {value: "1trailing junk", expected: "", testname: "value = 1trailing junk"} + {value: "1trailing junk", expected: "", testname: "value = 1trailing junk"}, + {value: "123", expected: "", testname: "full-width digits"}, ]; for (var i = 0; i < numbers.length; i++) { var w = numbers[i]; diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-bounded-reftest-ref.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-bounded-reftest-ref.html new file mode 100644 index 00000000000..73ad9d5bac7 --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-bounded-reftest-ref.html @@ -0,0 +1,20 @@ + + + + A standard permission element of type location, with the maximum allowed + height. + + + + + diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-bounded-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-bounded-reftest.html new file mode 100644 index 00000000000..85401aba8ff --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-bounded-reftest.html @@ -0,0 +1,17 @@ + + + The icon is set to the exact maximum height in the reference. + Increasing it further should have no effect. + + + + + + diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html index 9f52fd75479..502c655fc2a 100644 --- a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html @@ -1,8 +1,8 @@ The icon of the element should change if the height is changed - - + + + + diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-bounded-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-bounded-reftest.html new file mode 100644 index 00000000000..e23f02e440a --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-bounded-reftest.html @@ -0,0 +1,17 @@ + + + The margin-inline-end is set to the exact maximum allowed limit in the ref. + Increasing it further should have no effect. + + + + + + diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html index abda1adc1d8..4db4f2867f2 100644 --- a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html @@ -1,7 +1,7 @@ - A standard permission element of type location, without 50px height. + A standard permission element of type location, with 50px height. + diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html index d1fe8d0724c..dea31f13b94 100644 --- a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html +++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html @@ -1,11 +1,11 @@ The icon of the element should change if the min-height is changed - - + + diff --git a/tests/wpt/tests/html/semantics/permission-element/text-stroke-and-fill-ref.html b/tests/wpt/tests/html/semantics/permission-element/text-stroke-and-fill-ref.html new file mode 100644 index 00000000000..c420d08cc7c --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/text-stroke-and-fill-ref.html @@ -0,0 +1,8 @@ + + + +
+ +
+ + \ No newline at end of file diff --git a/tests/wpt/tests/html/semantics/permission-element/text-stroke-and-fill.tentative.html b/tests/wpt/tests/html/semantics/permission-element/text-stroke-and-fill.tentative.html new file mode 100644 index 00000000000..05b49508c8e --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/text-stroke-and-fill.tentative.html @@ -0,0 +1,17 @@ + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-event-timing.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-event-timing.tentative.html new file mode 100644 index 00000000000..ea0cd89543f --- /dev/null +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-event-timing.tentative.html @@ -0,0 +1,84 @@ + + + + + + + + + + + + + +
Target
+
+ + + diff --git a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/emulation/set_locale_override.https.html.ini b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/emulation/set_locale_override.https.html.ini new file mode 100644 index 00000000000..3312a5a6a15 --- /dev/null +++ b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/emulation/set_locale_override.https.html.ini @@ -0,0 +1,3 @@ +[set_locale_override.https.html] + expected: + if product != "chrome": ERROR diff --git a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/emulation/set_screen_orientation_override.https.html.ini b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/emulation/set_screen_orientation_override.https.html.ini new file mode 100644 index 00000000000..965d076da60 --- /dev/null +++ b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/emulation/set_screen_orientation_override.https.html.ini @@ -0,0 +1,3 @@ +[set_screen_orientation_override.https.html] + expected: + if product != "chrome": ERROR diff --git a/tests/wpt/tests/infrastructure/testdriver/bidi/emulation/set_locale_override.https.html b/tests/wpt/tests/infrastructure/testdriver/bidi/emulation/set_locale_override.https.html new file mode 100644 index 00000000000..701ddd6fb05 --- /dev/null +++ b/tests/wpt/tests/infrastructure/testdriver/bidi/emulation/set_locale_override.https.html @@ -0,0 +1,41 @@ + + +TestDriver bidi.emulation.set_locale_override method + + + + + + diff --git a/tests/wpt/tests/infrastructure/testdriver/bidi/emulation/set_screen_orientation_override.https.html b/tests/wpt/tests/infrastructure/testdriver/bidi/emulation/set_screen_orientation_override.https.html new file mode 100644 index 00000000000..7084e0dc210 --- /dev/null +++ b/tests/wpt/tests/infrastructure/testdriver/bidi/emulation/set_screen_orientation_override.https.html @@ -0,0 +1,68 @@ + + +TestDriver bidi.emulation.set_screen_orientation_override method + + + + + + diff --git a/tests/wpt/tests/lint.ignore b/tests/wpt/tests/lint.ignore index 7812e9131c7..75a20041d5f 100644 --- a/tests/wpt/tests/lint.ignore +++ b/tests/wpt/tests/lint.ignore @@ -290,6 +290,7 @@ SET TIMEOUT: shadow-dom/Document-prototype-currentScript.html SET TIMEOUT: shadow-dom/scroll-to-the-fragment-in-shadow-tree.html SET TIMEOUT: shadow-dom/slotchange-event.html SET TIMEOUT: subresource-integrity/integrity-policy/script.https.html +SET TIMEOUT: subresource-integrity/integrity-policy/style.https.html SET TIMEOUT: trusted-types/support/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.js SET TIMEOUT: trusted-types/support/DOMWindowTimers-setTimeout-setInterval.js SET TIMEOUT: trusted-types/support/should-sink-type-mismatch-violation-be-blocked-by-csp-002-worker-multiple-violations.js diff --git a/tests/wpt/tests/mathml/presentation-markup/mrow/dynamic-mrow-like-001-ref.html b/tests/wpt/tests/mathml/presentation-markup/mrow/dynamic-mrow-like-001-ref.html index 2f823ba9550..69b2bfe1546 100644 --- a/tests/wpt/tests/mathml/presentation-markup/mrow/dynamic-mrow-like-001-ref.html +++ b/tests/wpt/tests/mathml/presentation-markup/mrow/dynamic-mrow-like-001-ref.html @@ -16,25 +16,25 @@
    -
  1. XpÉ
  2. +
  3. XpÉ
  4. Xp
  5. -
  6. XpÉ
  7. +
  8. XpÉ
  9. Xp
  10. -
  11. XpÉ
  12. +
  13. XpÉ
  14. Xp
  15. -
  16. XpÉ
  17. +
  18. XpÉ
  19. Xp
  20. -
  21. XpÉ
  22. +
  23. XpÉ
  24. Xp
  25. -
  26. XpÉ
  27. +
  28. XpÉ
  29. Xp
  30. -
  31. XpÉ
  32. +
  33. XpÉ
  34. Xp
  35. -
  36. XpÉ
  37. +
  38. XpÉ
  39. Xp
  40. -
  41. XpÉ
  42. +
  43. XpÉ
  44. Xp
  45. -
  46. XpÉ
  47. +
  48. XpÉ
  49. Xp
diff --git a/tests/wpt/tests/mathml/presentation-markup/mrow/dynamic-mrow-like-001.html b/tests/wpt/tests/mathml/presentation-markup/mrow/dynamic-mrow-like-001.html index 79de59feec6..2bff4fc0079 100644 --- a/tests/wpt/tests/mathml/presentation-markup/mrow/dynamic-mrow-like-001.html +++ b/tests/wpt/tests/mathml/presentation-markup/mrow/dynamic-mrow-like-001.html @@ -30,7 +30,7 @@ mn.textContent = "X"; e.appendChild(mn); mn = FragmentHelper.createElement("mn"); - mn.textContent = "É"; + mn.textContent = "\u00C9"; e.appendChild(mn); mn = FragmentHelper.createElement("mn"); mn.textContent = "p"; @@ -48,25 +48,25 @@
  1. -
  2. XpÉ
  3. +
  4. XpÉ
  5. -
  6. XpÉ
  7. +
  8. XpÉ
  9. -
  10. XpÉ
  11. +
  12. XpÉ
  13. -
  14. XpÉ
  15. +
  16. XpÉ
  17. -
  18. XpÉ
  19. +
  20. XpÉ
  21. -
  22. XpÉ
  23. +
  24. XpÉ
  25. -
  26. XpÉ
  27. +
  28. XpÉ
  29. -
  30. XpÉ
  31. +
  32. XpÉ
  33. -
  34. XpÉ
  35. +
  36. XpÉ
  37. -
  38. XpÉ
  39. +
  40. XpÉ
diff --git a/tests/wpt/tests/mathml/presentation-markup/tables/table-default-styles-001.html b/tests/wpt/tests/mathml/presentation-markup/tables/table-default-styles-001.html index 495cdc000af..61be3dfa2da 100644 --- a/tests/wpt/tests/mathml/presentation-markup/tables/table-default-styles-001.html +++ b/tests/wpt/tests/mathml/presentation-markup/tables/table-default-styles-001.html @@ -21,6 +21,9 @@ diff --git a/tests/wpt/tests/pointerevents/bugs/events_after_lostpointercapture_remove_setcapture_node.html b/tests/wpt/tests/pointerevents/bugs/events_after_lostpointercapture_remove_setcapture_node.html deleted file mode 100644 index ec478a68006..00000000000 --- a/tests/wpt/tests/pointerevents/bugs/events_after_lostpointercapture_remove_setcapture_node.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - Lostpointercapture removing new capture element prevents the new capture - - - - - - - - - - -
-
-
- - - diff --git a/tests/wpt/tests/pointerevents/pointerevent_attributes.html b/tests/wpt/tests/pointerevents/pointerevent_attributes.html index 13fb30f61e9..7b700bf67d8 100644 --- a/tests/wpt/tests/pointerevents/pointerevent_attributes.html +++ b/tests/wpt/tests/pointerevents/pointerevent_attributes.html @@ -70,6 +70,10 @@ const frameLoadedPromise = new Promise(resolve => { display: inline-block; } +
@@ -85,6 +89,8 @@ const frameLoadedPromise = new Promise(resolve => { window.onload = runTests(); async function runTests() { + // Prevent opening contextmenu. + addEventListener("contextmenu", e => e.preventDefault()); const queryStringFragments = location.search.substring(1).split('-'); const pointerType = queryStringFragments[0]; @@ -102,7 +108,6 @@ const frameLoadedPromise = new Promise(resolve => { ]; function injectScrubGesture(element) { - const doneButton = document.getElementById('done'); const actions = new test_driver.Actions(); let buttonArguments = @@ -131,7 +136,7 @@ const frameLoadedPromise = new Promise(resolve => { } // Processing a click or tap on the done button is used to signal that all - // other events should have beem handled. This is used to catch unhandled + // other events should have been handled. This is used to catch unhandled // events that would otherwise result in a timeout. function clickOrTapDone() { const doneButton = document.getElementById('done'); diff --git a/tests/wpt/tests/pointerevents/pointerevent_contextmenu_is_a_pointerevent.html b/tests/wpt/tests/pointerevents/pointerevent_contextmenu_is_a_pointerevent.html index 88ec1903ab8..64355d897f5 100644 --- a/tests/wpt/tests/pointerevents/pointerevent_contextmenu_is_a_pointerevent.html +++ b/tests/wpt/tests/pointerevents/pointerevent_contextmenu_is_a_pointerevent.html @@ -18,6 +18,9 @@ const target = document.getElementById("target"); const pointer_type = location.search.substring(1); + // Prevent opening contextmenu. + addEventListener("contextmenu", e => e.preventDefault()); + function assertContextmenuProperties(contextmenu_event, pointerdown_event) { assert_equals(contextmenu_event.constructor, window.PointerEvent, "contextmenu should use a PointerEvent constructor"); diff --git a/tests/wpt/tests/pointerevents/pointerevent_lostpointercapture_remove_setcapture_node.html b/tests/wpt/tests/pointerevents/pointerevent_lostpointercapture_remove_setcapture_node.html index c20f62174bd..8da1b7d28c4 100644 --- a/tests/wpt/tests/pointerevents/pointerevent_lostpointercapture_remove_setcapture_node.html +++ b/tests/wpt/tests/pointerevents/pointerevent_lostpointercapture_remove_setcapture_node.html @@ -1,7 +1,7 @@ - Lostpointercapture removing new capture element prevents the new capture + Lostpointercapture fires on document when target is removed @@ -12,30 +12,46 @@ +

Pointer Events - lostpointercapture removes new capture element


diff --git a/tests/wpt/tests/pointerevents/pointerevent_pointerrawupdate_coalesced_events_attributes.https.html b/tests/wpt/tests/pointerevents/pointerevent_pointerrawupdate_coalesced_events_attributes.https.html new file mode 100644 index 00000000000..eed165623ea --- /dev/null +++ b/tests/wpt/tests/pointerevents/pointerevent_pointerrawupdate_coalesced_events_attributes.https.html @@ -0,0 +1,90 @@ + + + + + + + + +Simple test for getCoalescedEvents() of `pointerrawupdate` + + + + + + + + + +
start
+
+ + diff --git a/tests/wpt/tests/reporting/resources/report.py b/tests/wpt/tests/reporting/resources/report.py index b5ee0c07d86..09f6c606b14 100644 --- a/tests/wpt/tests/reporting/resources/report.py +++ b/tests/wpt/tests/reporting/resources/report.py @@ -140,4 +140,8 @@ def main(request, response): request.server.stash.put(key=count_key, value=count) # Return acknowledgement report. - return [(b"Content-Type", b"text/plain")], b"Recorded report " + request.body + response_headers = [(b"Content-Type", b"text/plain")] + # Keep the same as preflight to not send CORS header for www2 + if b"www2" not in request.headers[b"Origin"]: + response_headers.append((b"Access-Control-Allow-Origin", b"*")) + return response_headers, b"Recorded report " + request.body diff --git a/tests/wpt/tests/resources/testdriver.js b/tests/wpt/tests/resources/testdriver.js index 5a4ccf2a8b2..cfe7e65549a 100644 --- a/tests/wpt/tests/resources/testdriver.js +++ b/tests/wpt/tests/resources/testdriver.js @@ -819,6 +819,69 @@ return window.test_driver_internal.bidi.emulation.set_geolocation_override( params); }, + /** + * Overrides the locale for the specified browsing contexts. + * Matches the `emulation.setLocaleOverride + * `_ + * WebDriver BiDi command. + * + * @example + * await test_driver.bidi.emulation.set_locale_override({ + * locale: 'de-DE' + * }); + * + * @param {object} params - Parameters for the command. + * @param {null|string} params.locale - The optional + * locale to set. + * @param {null|Array.<(Context)>} [params.contexts] The + * optional contexts parameter specifies which browsing contexts + * to set the locale override on. It should be either an array + * of Context objects (window or browsing context id), or null. + * If null or omitted, the override will be set on the current + * browsing context. + * @returns {Promise} Resolves when the locale override + * is successfully set. + */ + set_locale_override: function (params) { + assertBidiIsEnabled(); + return window.test_driver_internal.bidi.emulation.set_locale_override( + params); + }, + /** + * Overrides the screen orientation for the specified browsing + * contexts. + * Matches the `emulation.setScreenOrientationOverride + * `_ + * WebDriver BiDi command. + * + * @example + * await test_driver.bidi.emulation.set_screen_orientation_override({ + * screenOrientation: { + * natural: 'portrait', + * type: 'landscape-secondary' + * } + * }); + * + * @param {object} params - Parameters for the command. + * @param {null|object} params.screenOrientation - The optional + * screen orientation. Matches the + * `emulation.ScreenOrientation `_ + * type. If null or omitted, the override will be removed. + * @param {null|Array.<(Context)>} [params.contexts] The + * optional contexts parameter specifies which browsing contexts + * to set the screen orientation override on. It should be + * either an array of Context objects (window or browsing + * context id), or null. If null or omitted, the override will + * be set on the current browsing context. + * @returns {Promise} Resolves when the screen orientation + * override is successfully set. + */ + set_screen_orientation_override: function (params) { + // Ensure the bidi feature is enabled before calling the internal method + assertBidiIsEnabled(); + return window.test_driver_internal.bidi.emulation.set_screen_orientation_override( + params); + }, }, /** * `log `_ module. @@ -2181,6 +2244,14 @@ set_geolocation_override: function (params) { throw new Error( "bidi.emulation.set_geolocation_override is not implemented by testdriver-vendor.js"); + }, + set_locale_override: function (params) { + throw new Error( + "bidi.emulation.set_locale_override is not implemented by testdriver-vendor.js"); + }, + set_screen_orientation_override: function (params) { + throw new Error( + "bidi.emulation.set_screen_orientation_override is not implemented by testdriver-vendor.js"); } }, log: { diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/parsing/timeline-trigger-shorthand.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/parsing/timeline-trigger-shorthand.tentative.html new file mode 100644 index 00000000000..bcc96189e07 --- /dev/null +++ b/tests/wpt/tests/scroll-animations/animation-trigger/parsing/timeline-trigger-shorthand.tentative.html @@ -0,0 +1,213 @@ + +timeline-trigger shorthand + + + + + + +
+ diff --git a/tests/wpt/tests/selection/selection-modify-extend-word-generated-content.html b/tests/wpt/tests/selection/selection-modify-extend-word-generated-content.html new file mode 100644 index 00000000000..035b1280425 --- /dev/null +++ b/tests/wpt/tests/selection/selection-modify-extend-word-generated-content.html @@ -0,0 +1,55 @@ + + + +Generated content should not connect the first/last word with adjacent line's last/first word + + + + + +

previous line

+

middle line

+

last line

+ + diff --git a/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html b/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html index 0f596a88015..637d926c2eb 100644 --- a/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html +++ b/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html @@ -64,25 +64,20 @@ promise_test(async (t) => { ); }; - recognition1.phrases = new SpeechRecognitionPhraseList([ - new SpeechRecognitionPhrase("test", 1.0) - ]); + recognition1.phrases.push(new SpeechRecognitionPhrase("test", 1.0)); // Create the second speech recognition with a mode that supports contextual biasing. const recognition2 = new SpeechRecognition(); recognition2.processLocally = true; recognition2.lang = "en-US"; - recognition2.onerror = function(event) { - // Currently WPT may not be able to detect that SODA is available and - // will throw a "language-not-supported" error here. - assert_unreached("Caught an error: " + event.error); - }; + // On-device speech recognition should not throw an error. + recognition2.onerror = t.unreached_func("recognition2 should not error"); - recognition2.phrases = new SpeechRecognitionPhraseList([ - new SpeechRecognitionPhrase("ASIC", 1.0), - new SpeechRecognitionPhrase("FPGA", 1.0) - ]); + recognition2.phrases = [ + new SpeechRecognitionPhrase("ASIC", 3.0), + new SpeechRecognitionPhrase("FPGA", 3.0) + ]; const recognitionPromise = new Promise((resolve) => { recognition2.onresult = (event) => { diff --git a/tests/wpt/tests/subresource-integrity/integrity-policy/resources/style.css b/tests/wpt/tests/subresource-integrity/integrity-policy/resources/style.css new file mode 100644 index 00000000000..6a16e4dfd43 --- /dev/null +++ b/tests/wpt/tests/subresource-integrity/integrity-policy/resources/style.css @@ -0,0 +1 @@ +#colorme{color:red} \ No newline at end of file diff --git a/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html b/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html index c58598bf236..9321d039ee1 100644 --- a/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html +++ b/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html @@ -230,43 +230,40 @@ script.src = test_case.url; document.body.appendChild(script); }); - let report_body = null; - if (test_case.policy_violation) { - report_body = await report_observed_promise; - } else { - const timeout_promise = new Promise(r => setTimeout(() => r('timeout'), 100)); - const race_result = await Promise.race([report_observed_promise, timeout_promise]); - if (race_result !== 'timeout') { - report_body = race_result; + if (with_reporting) { + if (test_case.policy_violation) { + report_body = await report_observed_promise; + } else { + const timeout_promise = new Promise(r => setTimeout(() => r('timeout'), 100)); + const race_result = await Promise.race([report_observed_promise, timeout_promise]); + if (race_result !== 'timeout') { + report_body = race_result; + } } } return { body: report_body, ran: window.ran }; - }, [test_case]); - assert_equals(result.ran, test_case.expected.ran, "Ran"); - if (test_case.policy_violation) { - assert_not_equals(result.body, null, "Expected a policy violation report"); - let report_body = {}; - if (with_reporting) { - report_body = await report_observed_promise; - } - return { body: report_body, ran: window.ran }; }, [test_case, with_reporting]); - assert_equals(result.ran, test_case.expected.ran); - if (with_reporting && test_case.policy_violation) { - assert_equals(result.body.blockedURL, test_case.expected.blocked); - assert_true(result.body.documentURL.endsWith(iframe_url)); - assert_equals(result.body.destination, "script"); - assert_equals(result.body.reportOnly, !test_case.add_blocking_header); - } else { - assert_equals(result.body, null, "No policy violation report should be observed"); - } - if (with_reporting && test_case.endpoints && test_case.policy_violation) { - if (test_case.add_blocking_header) { - await check_report(reporting_endpoint, reporting_uuid_1, iframe_url, test_case.url, !test_case.add_blocking_header); - await check_report(reporting_endpoint, reporting_uuid_2, iframe_url, test_case.url, !test_case.add_blocking_header); + + assert_equals(result.ran, test_case.expected.ran, "Ran"); + if (with_reporting) { + if (test_case.policy_violation) { + assert_not_equals(result.body, null, "Expected a policy violation report"); + assert_equals(result.body.blockedURL, test_case.expected.blocked); + assert_true(result.body.documentURL.endsWith(iframe_url)); + assert_equals(result.body.destination, "script"); + assert_equals(result.body.reportOnly, !test_case.add_blocking_header); + } else { + assert_equals(result.body, null, "No policy violation report should be observed"); + } + + if (test_case.endpoints && test_case.policy_violation) { + if (test_case.add_blocking_header) { + await check_report(reporting_endpoint, reporting_uuid_1, iframe_url, test_case.url, !test_case.add_blocking_header); + await check_report(reporting_endpoint, reporting_uuid_2, iframe_url, test_case.url, !test_case.add_blocking_header); + } + await check_report(reporting_endpoint, reporting_uuid_3, iframe_url, test_case.url, true); } - await check_report(reporting_endpoint, reporting_uuid_3, iframe_url, test_case.url, true); } }, test_case.description); }); diff --git a/tests/wpt/tests/subresource-integrity/integrity-policy/style.https.html b/tests/wpt/tests/subresource-integrity/integrity-policy/style.https.html new file mode 100644 index 00000000000..b2dc8a54763 --- /dev/null +++ b/tests/wpt/tests/subresource-integrity/integrity-policy/style.https.html @@ -0,0 +1,273 @@ + + + + + + + + + + + + + diff --git a/tests/wpt/tests/svg/animations/scripted/keypoints-attribute-trailing-semi.html b/tests/wpt/tests/svg/animations/scripted/keypoints-attribute-trailing-semi.html new file mode 100644 index 00000000000..b6fcbd106a1 --- /dev/null +++ b/tests/wpt/tests/svg/animations/scripted/keypoints-attribute-trailing-semi.html @@ -0,0 +1,20 @@ + +A trailing semicolon is allowed in the 'keyPoints' attribute + + + + + + + + + diff --git a/tests/wpt/tests/svg/animations/scripted/keytimes-attribute-trailing-semi.html b/tests/wpt/tests/svg/animations/scripted/keytimes-attribute-trailing-semi.html new file mode 100644 index 00000000000..3aba6f3a31e --- /dev/null +++ b/tests/wpt/tests/svg/animations/scripted/keytimes-attribute-trailing-semi.html @@ -0,0 +1,20 @@ + +A trailing semicolon is allowed in the 'keyTimes' attribute + + + + + + + + + diff --git a/tests/wpt/tests/svg/painting/reftests/zero-scale-svg-transform-inside-g-tag.html b/tests/wpt/tests/svg/painting/reftests/zero-scale-svg-transform-inside-g-tag.html new file mode 100644 index 00000000000..30511ee0a17 --- /dev/null +++ b/tests/wpt/tests/svg/painting/reftests/zero-scale-svg-transform-inside-g-tag.html @@ -0,0 +1,30 @@ + + +SVG elements inside `<g>` tag with intial scale '0' should be mutable via JS + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/svg/text/scripted/getcharnumatposition-slr.tentative.html b/tests/wpt/tests/svg/text/scripted/getcharnumatposition-slr.tentative.html index a929d58ba14..80533036840 100644 --- a/tests/wpt/tests/svg/text/scripted/getcharnumatposition-slr.tentative.html +++ b/tests/wpt/tests/svg/text/scripted/getcharnumatposition-slr.tentative.html @@ -25,14 +25,16 @@ function newPoint(x, y) { return p; } -test(() => { - const element = document.querySelector('#slr'); - assert_equals(element.getNumberOfChars(), 3); - const start = 200; - assert_equals(element.getCharNumAtPosition(newPoint(40, start + 10)), -1); - assert_equals(element.getCharNumAtPosition(newPoint(40, start - 10)), 0); - assert_equals(element.getCharNumAtPosition(newPoint(40, start - 30)), 1); - assert_equals(element.getCharNumAtPosition(newPoint(40, start - 50)), 2); - assert_equals(element.getCharNumAtPosition(newPoint(40, start - 70)), -1); -}, 'sideways-lr'); +document.fonts.ready.then(() => { + test(() => { + const element = document.querySelector('#slr'); + assert_equals(element.getNumberOfChars(), 3); + const start = 200; + assert_equals(element.getCharNumAtPosition(newPoint(40, start + 10)), -1); + assert_equals(element.getCharNumAtPosition(newPoint(40, start - 10)), 0); + assert_equals(element.getCharNumAtPosition(newPoint(40, start - 30)), 1); + assert_equals(element.getCharNumAtPosition(newPoint(40, start - 50)), 2); + assert_equals(element.getCharNumAtPosition(newPoint(40, start - 70)), -1); + }, 'sideways-lr'); +}); diff --git a/tests/wpt/tests/svg/text/scripted/getstartpositionofchar.html b/tests/wpt/tests/svg/text/scripted/getstartpositionofchar.html index 5b09ea198a2..e3aeed6da5b 100644 --- a/tests/wpt/tests/svg/text/scripted/getstartpositionofchar.html +++ b/tests/wpt/tests/svg/text/scripted/getstartpositionofchar.html @@ -33,43 +33,49 @@ text { const FONT_SIZE = 10; function $(sel) { return document.querySelector(sel); } -test(() => { - const target = $('#vrl'); - const base = target.getStartPositionOfChar(0).y; - assert_equals(base + FONT_SIZE, target.getEndPositionOfChar(0).y); - assert_equals(base + FONT_SIZE, target.getStartPositionOfChar(1).y); - assert_equals(base + FONT_SIZE * 2, target.getEndPositionOfChar(1).y); - assert_equals(base + FONT_SIZE * 2, target.getStartPositionOfChar(2).y); - assert_equals(base + FONT_SIZE * 3, target.getEndPositionOfChar(2).y); -}, 'vertical-rl'); +setup({ explicit_done: true }); -test(() => { - const target = $('#vlr'); - const base = target.getStartPositionOfChar(0).y; - assert_equals(base + FONT_SIZE, target.getEndPositionOfChar(0).y); - assert_equals(base + FONT_SIZE, target.getStartPositionOfChar(1).y); - assert_equals(base + FONT_SIZE * 2, target.getEndPositionOfChar(1).y); - assert_equals(base + FONT_SIZE * 2, target.getStartPositionOfChar(2).y); - assert_equals(base + FONT_SIZE * 3, target.getEndPositionOfChar(2).y); -}, 'vertical-lr'); +document.fonts.ready.then(() => { + test(() => { + const target = $('#vrl'); + const base = target.getStartPositionOfChar(0).y; + assert_equals(base + FONT_SIZE, target.getEndPositionOfChar(0).y); + assert_equals(base + FONT_SIZE, target.getStartPositionOfChar(1).y); + assert_equals(base + FONT_SIZE * 2, target.getEndPositionOfChar(1).y); + assert_equals(base + FONT_SIZE * 2, target.getStartPositionOfChar(2).y); + assert_equals(base + FONT_SIZE * 3, target.getEndPositionOfChar(2).y); + }, 'vertical-rl'); -test(() => { - const target = $('#srl'); - const base = target.getStartPositionOfChar(0).y; - assert_equals(base + FONT_SIZE, target.getEndPositionOfChar(0).y); - assert_equals(base + FONT_SIZE, target.getStartPositionOfChar(1).y); - assert_equals(base + FONT_SIZE * 2, target.getEndPositionOfChar(1).y); - assert_equals(base + FONT_SIZE * 2, target.getStartPositionOfChar(2).y); - assert_equals(base + FONT_SIZE * 3, target.getEndPositionOfChar(2).y); -}, 'sideways-rl'); + test(() => { + const target = $('#vlr'); + const base = target.getStartPositionOfChar(0).y; + assert_equals(base + FONT_SIZE, target.getEndPositionOfChar(0).y); + assert_equals(base + FONT_SIZE, target.getStartPositionOfChar(1).y); + assert_equals(base + FONT_SIZE * 2, target.getEndPositionOfChar(1).y); + assert_equals(base + FONT_SIZE * 2, target.getStartPositionOfChar(2).y); + assert_equals(base + FONT_SIZE * 3, target.getEndPositionOfChar(2).y); + }, 'vertical-lr'); -test(() => { - const target = $('#slr'); - const base = target.getStartPositionOfChar(0).y; - assert_equals(base - FONT_SIZE, target.getEndPositionOfChar(0).y); - assert_equals(base - FONT_SIZE, target.getStartPositionOfChar(1).y); - assert_equals(base - FONT_SIZE * 2, target.getEndPositionOfChar(1).y); - assert_equals(base - FONT_SIZE * 2, target.getStartPositionOfChar(2).y); - assert_equals(base - FONT_SIZE * 3, target.getEndPositionOfChar(2).y); -}, 'sideways-lr'); + test(() => { + const target = $('#srl'); + const base = target.getStartPositionOfChar(0).y; + assert_equals(base + FONT_SIZE, target.getEndPositionOfChar(0).y); + assert_equals(base + FONT_SIZE, target.getStartPositionOfChar(1).y); + assert_equals(base + FONT_SIZE * 2, target.getEndPositionOfChar(1).y); + assert_equals(base + FONT_SIZE * 2, target.getStartPositionOfChar(2).y); + assert_equals(base + FONT_SIZE * 3, target.getEndPositionOfChar(2).y); + }, 'sideways-rl'); + + test(() => { + const target = $('#slr'); + const base = target.getStartPositionOfChar(0).y; + assert_equals(base - FONT_SIZE, target.getEndPositionOfChar(0).y); + assert_equals(base - FONT_SIZE, target.getStartPositionOfChar(1).y); + assert_equals(base - FONT_SIZE * 2, target.getEndPositionOfChar(1).y); + assert_equals(base - FONT_SIZE * 2, target.getStartPositionOfChar(2).y); + assert_equals(base - FONT_SIZE * 3, target.getEndPositionOfChar(2).y); + }, 'sideways-lr'); + + done(); +}); diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/asyncactions.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/asyncactions.py index b2bee624ea0..52e188192a3 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/asyncactions.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/asyncactions.py @@ -197,6 +197,54 @@ class BidiEmulationSetGeolocationOverrideAction: coordinates, error, contexts) +class BidiEmulationSetLocaleOverrideAction: + name = "bidi.emulation.set_locale_override" + + def __init__(self, logger, protocol): + do_delayed_imports() + self.logger = logger + self.protocol = protocol + + async def __call__(self, payload): + locale = payload['locale'] if 'locale' in payload else None + + if "contexts" not in payload: + raise ValueError("Missing required parameter: contexts") + contexts = [] + for context in payload["contexts"]: + contexts.append(get_browsing_context_id(context)) + if len(contexts) == 0: + raise ValueError("At least one context must be provided") + + return await self.protocol.bidi_emulation.set_locale_override(locale, + contexts) + + +class BidiEmulationSetScreenOrientationOverrideAction: + name = "bidi.emulation.set_screen_orientation_override" + + def __init__(self, logger, protocol): + do_delayed_imports() + self.logger = logger + self.protocol = protocol + + async def __call__(self, payload): + screen_orientation = payload['screenOrientation'] \ + if 'screenOrientation' in payload \ + else None + + if "contexts" not in payload: + raise ValueError("Missing required parameter: contexts") + contexts = [] + for context in payload["contexts"]: + contexts.append(get_browsing_context_id(context)) + if len(contexts) == 0: + raise ValueError("At least one context must be provided") + + return await self.protocol.bidi_emulation.set_screen_orientation_override( + screen_orientation, contexts) + + class BidiSessionSubscribeAction: name = "bidi.session.subscribe" @@ -245,5 +293,7 @@ async_actions = [ BidiBluetoothSimulateDescriptorAction, BidiBluetoothSimulateDescriptorResponseAction, BidiEmulationSetGeolocationOverrideAction, + BidiEmulationSetLocaleOverrideAction, + BidiEmulationSetScreenOrientationOverrideAction, BidiPermissionsSetPermissionAction, BidiSessionSubscribeAction] diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index 88ab4c3045b..4473e3e16af 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -372,6 +372,15 @@ class WebDriverBidiEmulationProtocolPart(BidiEmulationProtocolPart): return await self.webdriver.bidi_session.emulation.set_geolocation_override( coordinates=coordinates, error=error, contexts=contexts) + async def set_locale_override(self, locale, contexts): + return await self.webdriver.bidi_session.emulation.set_locale_override( + locale=locale, contexts=contexts) + + async def set_screen_orientation_override(self, screen_orientation, + contexts): + return await self.webdriver.bidi_session.emulation.set_screen_orientation_override( + screen_orientation=screen_orientation, contexts=contexts) + class WebDriverBidiPermissionsProtocolPart(BidiPermissionsProtocolPart): def __init__(self, parent): diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py index 2a1db8825d4..4e87a7442ec 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py @@ -605,6 +605,17 @@ class BidiEmulationProtocolPart(ProtocolPart): contexts: List[str]) -> None: pass + @abstractmethod + async def set_locale_override(self, locale: Optional[str], + contexts: List[str]) -> None: + pass + + @abstractmethod + async def set_screen_orientation_override(self, + screen_orientation: Optional[Mapping[str, Any]], + contexts: List[str]) -> None: + pass + class BidiScriptProtocolPart(ProtocolPart): """Protocol part for executing BiDi scripts""" diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js index ea7719cf1e9..1cdc476dedb 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js @@ -398,6 +398,24 @@ }); } + window.test_driver_internal.bidi.emulation.set_locale_override = function (params) { + return create_action("bidi.emulation.set_locale_override", { + // Default to the current window. + contexts: [window], + ...(params ?? {}) + }); + }; + + window.test_driver_internal.bidi.emulation.set_screen_orientation_override = + function (params) { + return create_action( + "bidi.emulation.set_screen_orientation_override", { + // Default to the current window. + contexts: [window], + ...(params ?? {}) + }); + } + window.test_driver_internal.bidi.log.entry_added.subscribe = function (params) { return subscribe({ diff --git a/tests/wpt/tests/webaudio/resources/audit-util.js b/tests/wpt/tests/webaudio/resources/audit-util.js index a4dea796585..7c6e40cea5a 100644 --- a/tests/wpt/tests/webaudio/resources/audit-util.js +++ b/tests/wpt/tests/webaudio/resources/audit-util.js @@ -193,3 +193,29 @@ function computeSNR(actual, expected) { return signalPower / noisePower; } + +/** + * Asserts that all elements in the given array are equal to the specified value. + * If the value is NaN, checks that each element in the array is also NaN. + * Throws an assertion error if any element does not match the expected value. + * + * @param {Array} array - The array of numbers to check. + * @param {number} value - The constant value that each array element should match. + * @param {string} [messagePrefix=''] - Optional prefix for assertion error messages. + */ +function assert_constant_value(array, value, messagePrefix = '') { + for (let i = 0; i < array.length; ++i) { + if (Number.isNaN(value)) { + assert_true( + Number.isNaN(array[i]), + `${messagePrefix} entry ${i} should be NaN` + ); + } else { + assert_equals( + array[i], + value, + `${messagePrefix} entry ${i} should be ${value}` + ); + } + } +} \ No newline at end of file diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html b/tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html index ff3daebf396..a3818397283 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html +++ b/tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-suspend-resume.html @@ -6,140 +6,101 @@ - - - diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-method-chaining.html b/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-method-chaining.html index ffe46035fd7..51709681b87 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-method-chaining.html +++ b/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-method-chaining.html @@ -1,24 +1,21 @@ - - audioparam-method-chaining.html - + AudioParam Method Chaining - - diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/cancel-scheduled-values.html b/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/cancel-scheduled-values.html index ac1da8cd51b..d1bcda7f47f 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/cancel-scheduled-values.html +++ b/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/cancel-scheduled-values.html @@ -7,149 +7,110 @@ - diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html b/tests/wpt/tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html index 505f0f03f54..a84e2622ab9 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html +++ b/tests/wpt/tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html @@ -6,147 +6,139 @@ - - - diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-gainnode-interface/gain.html b/tests/wpt/tests/webaudio/the-audio-api/the-gainnode-interface/gain.html index c41f4c90805..1bae5903569 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-gainnode-interface/gain.html +++ b/tests/wpt/tests/webaudio/the-audio-api/the-gainnode-interface/gain.html @@ -7,7 +7,6 @@ - diff --git a/tests/wpt/tests/webdriver/tests/bidi/emulation/set_geolocation_override/conftest.py b/tests/wpt/tests/webdriver/tests/bidi/emulation/set_geolocation_override/conftest.py index e9f44d94862..6ed5669da1d 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/emulation/set_geolocation_override/conftest.py +++ b/tests/wpt/tests/webdriver/tests/bidi/emulation/set_geolocation_override/conftest.py @@ -35,17 +35,17 @@ async def get_current_geolocation(bidi_session, configuration): @pytest_asyncio.fixture async def set_geolocation_permission(bidi_session): - data_to_cleanup = {} + data_to_cleanup = [] async def set_geolocation_permission(context, user_context="default"): nonlocal data_to_cleanup origin = await get_context_origin(bidi_session, context) - data_to_cleanup = { + data_to_cleanup.append({ "origin": origin, "user_context": user_context, - } + }) await bidi_session.permissions.set_permission( descriptor={"name": "geolocation"}, @@ -56,9 +56,10 @@ async def set_geolocation_permission(bidi_session): yield set_geolocation_permission - await bidi_session.permissions.set_permission( - descriptor={"name": "geolocation"}, - state="prompt", - origin=data_to_cleanup["origin"], - user_context=data_to_cleanup["user_context"], - ) + for item in data_to_cleanup: + await bidi_session.permissions.set_permission( + descriptor={"name": "geolocation"}, + state="prompt", + origin=item["origin"], + user_context=item["user_context"], + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/network/__init__.py index 46146d52eb9..b7458377ab0 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/network/__init__.py +++ b/tests/wpt/tests/webdriver/tests/bidi/network/__init__.py @@ -473,6 +473,8 @@ SET_COOKIE_TEST_PARAMETERS = [ name="foo", path="/", value=NetworkStringValue("bar"), + same_site="none", + secure=True ), None, { @@ -480,7 +482,7 @@ SET_COOKIE_TEST_PARAMETERS = [ "name": "foo", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bar"}, }, @@ -490,6 +492,8 @@ SET_COOKIE_TEST_PARAMETERS = [ name="foo", path="/", value=NetworkStringValue("bar"), + same_site="none", + secure=True ), "default domain", { @@ -497,7 +501,7 @@ SET_COOKIE_TEST_PARAMETERS = [ "name": "foo", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bar"}, }, @@ -507,6 +511,8 @@ SET_COOKIE_TEST_PARAMETERS = [ name="foo", path="/", value=NetworkStringValue("bar"), + same_site="none", + secure=True ), "alt domain", { @@ -514,7 +520,7 @@ SET_COOKIE_TEST_PARAMETERS = [ "name": "foo", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bar"}, }, @@ -524,6 +530,8 @@ SET_COOKIE_TEST_PARAMETERS = [ name="foo", path="/some/other/path", value=NetworkStringValue("bar"), + same_site="none", + secure=True ), None, { @@ -531,7 +539,7 @@ SET_COOKIE_TEST_PARAMETERS = [ "name": "foo", "path": "/some/other/path", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bar"}, }, @@ -542,6 +550,8 @@ SET_COOKIE_TEST_PARAMETERS = [ name="foo", path="/", value=NetworkStringValue("bar"), + same_site="none", + secure=True ), None, { @@ -549,7 +559,7 @@ SET_COOKIE_TEST_PARAMETERS = [ "name": "foo", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bar"}, }, @@ -560,6 +570,7 @@ SET_COOKIE_TEST_PARAMETERS = [ path="/", secure=True, value=NetworkStringValue("bar"), + same_site="none", ), None, { @@ -578,6 +589,8 @@ SET_COOKIE_TEST_PARAMETERS = [ name="foo", path="/", value=NetworkStringValue("bar"), + same_site="none", + secure=True ), None, { @@ -586,7 +599,7 @@ SET_COOKIE_TEST_PARAMETERS = [ "name": "foo", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bar"}, }, @@ -597,6 +610,8 @@ SET_COOKIE_TEST_PARAMETERS = [ name="foo", path="/", value=NetworkStringValue("bar"), + same_site="none", + secure=True ), None, { @@ -605,7 +620,7 @@ SET_COOKIE_TEST_PARAMETERS = [ "name": "foo", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bar"}, }, diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/continue_response/headers.py b/tests/wpt/tests/webdriver/tests/bidi/network/continue_response/headers.py index a9f4a6d8bca..5fa67a87d0a 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/network/continue_response/headers.py +++ b/tests/wpt/tests/webdriver/tests/bidi/network/continue_response/headers.py @@ -132,7 +132,7 @@ async def test_set_cookie_header( on_load = wait_for_event(LOAD_EVENT) response_header = Header( - name="Set-Cookie", value=NetworkStringValue("aaa=bbb;Path=/") + name="Set-Cookie", value=NetworkStringValue("aaa=bbb;Path=/;SameSite=None;Secure") ) await bidi_session.network.continue_response( @@ -152,7 +152,7 @@ async def test_set_cookie_header( "name": "aaa", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bbb"}, } @@ -181,10 +181,10 @@ async def test_set_cookie_header_and_cookies( on_load = wait_for_event(LOAD_EVENT) response_header = Header( - name="Set-Cookie", value=NetworkStringValue("foo=bar;Path=/") + name="Set-Cookie", value=NetworkStringValue("foo=bar;Path=/;SameSite=None;Secure") ) response_cookie = SetCookieHeader( - name="baz", value=NetworkStringValue("biz"), path="/" + name="baz", value=NetworkStringValue("biz"), path="/", same_site="none", secure=True ) await bidi_session.network.continue_response( @@ -210,7 +210,7 @@ async def test_set_cookie_header_and_cookies( "name": "foo", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bar"}, } @@ -221,7 +221,7 @@ async def test_set_cookie_header_and_cookies( "name": "baz", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "biz"}, } diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/provide_response/headers.py b/tests/wpt/tests/webdriver/tests/bidi/network/provide_response/headers.py index 95291b5a4c3..49248e56eea 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/network/provide_response/headers.py +++ b/tests/wpt/tests/webdriver/tests/bidi/network/provide_response/headers.py @@ -89,7 +89,7 @@ async def test_set_cookie_header_before_request_sent( on_load = wait_for_event(LOAD_EVENT) response_header = Header( - name="Set-Cookie", value=NetworkStringValue("aaa=bbb;Path=/") + name="Set-Cookie", value=NetworkStringValue("aaa=bbb;Path=/;SameSite=None;Secure") ) await bidi_session.network.provide_response( @@ -112,7 +112,7 @@ async def test_set_cookie_header_before_request_sent( "name": "aaa", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bbb"}, } @@ -141,10 +141,10 @@ async def test_set_cookie_header_and_cookies_before_request_sent( on_load = wait_for_event(LOAD_EVENT) response_header = Header( - name="Set-Cookie", value=NetworkStringValue("foo=bar;Path=/") + name="Set-Cookie", value=NetworkStringValue("foo=bar;Path=/;SameSite=None;Secure;") ) response_cookie = SetCookieHeader( - name="baz", value=NetworkStringValue("biz"), path="/" + name="baz", value=NetworkStringValue("biz"), path="/", same_site="none", secure=True ) await bidi_session.network.provide_response( @@ -173,7 +173,7 @@ async def test_set_cookie_header_and_cookies_before_request_sent( "name": "foo", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "bar"}, } @@ -184,7 +184,7 @@ async def test_set_cookie_header_and_cookies_before_request_sent( "name": "baz", "path": "/", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": "biz"}, } diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py index ff73dff2757..52770d76d0e 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py @@ -59,7 +59,7 @@ def create_cookie( secure: Optional[bool] = True, path: Optional[str] = None, http_only: Optional[bool] = None, - same_site: Optional[str] = None, + same_site: Optional[str] = "none", expiry: Optional[int] = None, ) -> PartialCookie: """ diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/delete_cookies/filter.py b/tests/wpt/tests/webdriver/tests/bidi/storage/delete_cookies/filter.py index 1432da4709d..031095481dd 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/storage/delete_cookies/filter.py +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/delete_cookies/filter.py @@ -40,14 +40,14 @@ async def test_filter( cookie_value_matching_filter = "bar" cookie1_name = "baz" - await add_cookie(new_tab["context"], cookie1_name, cookie_value_matching_filter) + await add_cookie(new_tab["context"], cookie1_name, cookie_value_matching_filter, secure=True) cookie2_name = "foo" - await add_cookie(new_tab["context"], cookie2_name, cookie_value_matching_filter) + await add_cookie(new_tab["context"], cookie2_name, cookie_value_matching_filter, secure=True) cookie3_name = "foo_3" cookie3_value = "not_bar" - await add_cookie(new_tab["context"], cookie3_name, cookie3_value) + await add_cookie(new_tab["context"], cookie3_name, cookie3_value, secure=True) result = await bidi_session.storage.delete_cookies( filter=filter, @@ -64,7 +64,7 @@ async def test_filter( name=cookie3_name, value={"type": "string", "value": cookie3_value}, path="/webdriver/tests/support", - secure=False, + secure=True, ) @@ -86,16 +86,16 @@ async def test_filter_domain( cookie1_name = "bar" cookie1_value = "foo" - await add_cookie(top_context["context"], cookie1_name, cookie1_value) + await add_cookie(top_context["context"], cookie1_name, cookie1_value, secure=True) cookie2_name = "foo" cookie2_value = "bar" - await add_cookie(top_context["context"], cookie2_name, cookie2_value) + await add_cookie(top_context["context"], cookie2_name, cookie2_value, secure=True) cookie3_name = "foo_2" cookie3_value = "bar_2" cookie3_domain = domain_value(domain="alt") - await add_cookie(new_tab["context"], cookie3_name, cookie3_value) + await add_cookie(new_tab["context"], cookie3_name, cookie3_value, secure=True) filter = CookieFilter(domain=domain_value()) result = await bidi_session.storage.delete_cookies( @@ -113,7 +113,7 @@ async def test_filter_domain( name=cookie3_name, value={"type": "string", "value": cookie3_value}, path="/webdriver/tests/support", - secure=False, + secure=True, ) @@ -148,6 +148,7 @@ async def test_filter_expiry( name=cookie1_name, value=cookie1_value, expiry=date_string_to_delete, + secure=True ) cookie2_name = "foo" @@ -157,6 +158,7 @@ async def test_filter_expiry( name=cookie2_name, value=cookie2_value, expiry=date_string_to_delete, + secure=True ) cookie3_name = "foo_3" @@ -168,7 +170,11 @@ async def test_filter_expiry( date_string_to_remain = format_expiry_string(expiry_date_to_remain) await add_cookie( - new_tab["context"], cookie3_name, cookie3_value, expiry=date_string_to_remain + new_tab["context"], + cookie3_name, + cookie3_value, + expiry=date_string_to_remain, + secure=True ) filter = CookieFilter(expiry=expiry_to_delete) @@ -187,7 +193,7 @@ async def test_filter_expiry( name=cookie3_name, value={"type": "string", "value": cookie3_value}, path="/webdriver/tests/support", - secure=False, + secure=True, ) @@ -201,19 +207,19 @@ async def test_filter_name(bidi_session, new_tab, test_page, add_cookie, domain_ cookie1_value = "bar" cookie1_path = "/" await add_cookie( - new_tab["context"], name_to_delete, cookie1_value, path=cookie1_path + new_tab["context"], name_to_delete, cookie1_value, path=cookie1_path, secure=True ) cookie2_value = "baz" cookie2_path = "/webdriver/" await add_cookie( - new_tab["context"], name_to_delete, cookie2_value, path=cookie2_path + new_tab["context"], name_to_delete, cookie2_value, path=cookie2_path, secure=True ) name_to_remain = "foo_2" cookie3_value = "bar_2" cookie3_path = "/" - await add_cookie(new_tab["context"], name_to_remain, cookie3_value, path=cookie3_path) + await add_cookie(new_tab["context"], name_to_remain, cookie3_value, path=cookie3_path, secure=True) filter = CookieFilter(name=name_to_delete) result = await bidi_session.storage.delete_cookies( @@ -231,7 +237,7 @@ async def test_filter_name(bidi_session, new_tab, test_page, add_cookie, domain_ name=name_to_remain, value={"type": "string", "value": cookie3_value}, path=cookie3_path, - secure=False, + secure=True, ) @@ -265,6 +271,7 @@ async def test_filter_same_site( cookie1_name, cookie1_value, same_site=same_site_to_delete, + secure=True ) cookie2_name = "foo" @@ -274,12 +281,13 @@ async def test_filter_same_site( cookie2_name, cookie2_value, same_site=same_site_to_delete, + secure=True ) cookie3_name = "foo_3" cookie3_value = "bar_3" await add_cookie( - new_tab["context"], cookie3_name, cookie3_value, same_site=same_site_to_remain + new_tab["context"], cookie3_name, cookie3_value, same_site=same_site_to_remain, secure=True ) filter = CookieFilter(same_site=same_site_to_delete) @@ -299,7 +307,7 @@ async def test_filter_same_site( value={"type": "string", "value": cookie3_value}, path="/webdriver/tests/support", same_site=same_site_to_remain, - secure=False, + secure=True, ) @@ -326,6 +334,7 @@ async def test_filter_secure( new_tab["context"], cookie1_name, cookie1_value, + same_site="strict", secure=secure_to_delete, ) @@ -335,13 +344,14 @@ async def test_filter_secure( new_tab["context"], cookie2_name, cookie2_value, + same_site="strict", secure=secure_to_delete, ) cookie3_name = "foo_3" cookie3_value = "bar_3" await add_cookie( - new_tab["context"], cookie3_name, cookie3_value, secure=secure_to_remain + new_tab["context"], cookie3_name, cookie3_value, same_site="strict", secure=secure_to_remain ) filter = CookieFilter(secure=secure_to_delete) @@ -360,6 +370,7 @@ async def test_filter_secure( name=cookie3_name, value={"type": "string", "value": cookie3_value}, path="/webdriver/tests/support", + same_site="strict", secure=secure_to_remain, ) @@ -392,6 +403,7 @@ async def test_filter_path( cookie1_name, cookie1_value, path=path_to_delete, + secure=True ) cookie2_name = "foo" @@ -401,12 +413,13 @@ async def test_filter_path( cookie2_name, cookie2_value, path=path_to_delete, + secure=True ) cookie3_name = "foo_3" cookie3_value = "bar_3" await add_cookie( - new_tab["context"], cookie3_name, cookie3_value, path=path_to_remain + new_tab["context"], cookie3_name, cookie3_value, path=path_to_remain, secure=True ) filter = CookieFilter(path=path_to_delete) @@ -425,7 +438,7 @@ async def test_filter_path( name=cookie3_name, value={"type": "string", "value": cookie3_value}, path="/webdriver/tests/support" if path_to_remain is None else path_to_remain, - secure=False, + secure=True, ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/delete_cookies/partition.py b/tests/wpt/tests/webdriver/tests/bidi/storage/delete_cookies/partition.py index 07057967b67..ac756e946ac 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/storage/delete_cookies/partition.py +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/delete_cookies/partition.py @@ -43,8 +43,8 @@ async def test_default_partition( cookie2_value = "bar_2" if with_document_cookie: - await add_cookie(new_tab["context"], cookie1_name, cookie1_value) - await add_cookie(top_context["context"], cookie2_name, cookie2_value) + await add_cookie(new_tab["context"], cookie1_name, cookie1_value, secure=True) + await add_cookie(top_context["context"], cookie2_name, cookie2_value, secure=True) else: await set_cookie( cookie=create_cookie( @@ -89,7 +89,7 @@ async def test_partition_context( cookie_value = "bar" partition = BrowsingContextPartitionDescriptor(new_tab["context"]) if with_document_cookie: - await add_cookie(new_tab["context"], cookie_name, cookie_value) + await add_cookie(new_tab["context"], cookie_name, cookie_value, secure=True) else: await set_cookie( cookie=create_cookie( @@ -256,10 +256,10 @@ async def test_partition_user_context( if with_document_cookie: await add_cookie( - new_context_1["context"], cookie1_name, cookie1_value, path="/" + new_context_1["context"], cookie1_name, cookie1_value, path="/", secure=True ) await add_cookie( - new_context_2["context"], cookie2_name, cookie2_value, path="/" + new_context_2["context"], cookie2_name, cookie2_value, path="/", secure=True ) else: await set_cookie( @@ -267,6 +267,8 @@ async def test_partition_user_context( domain=cookie1_domain, name=cookie1_name, value=NetworkStringValue(cookie1_value), + same_site="none", + secure=True ), partition=cookie1_partition, ) @@ -275,6 +277,8 @@ async def test_partition_user_context( domain=cookie2_domain, name=cookie2_name, value=NetworkStringValue(cookie2_value), + same_site="none", + secure=True ), partition=cookie2_partition, ) @@ -297,5 +301,5 @@ async def test_partition_user_context( name=cookie2_name, value={"type": "string", "value": cookie2_value}, partition=cookie2_partition, - secure=False + secure=True ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/get_cookies/filter.py b/tests/wpt/tests/webdriver/tests/bidi/storage/get_cookies/filter.py index 89965499eed..b641a14b1b4 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/storage/get_cookies/filter.py +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/get_cookies/filter.py @@ -25,13 +25,13 @@ async def test_filter( value_1 = "bar" cookie1_name = "baz" - await add_cookie(new_tab["context"], cookie1_name, value_1) + await add_cookie(new_tab["context"], cookie1_name, value_1, secure=True) cookie2_name = "foo" - await add_cookie(new_tab["context"], cookie2_name, value_1) + await add_cookie(new_tab["context"], cookie2_name, value_1, secure=True) cookie3_name = "foo_3" - await add_cookie(new_tab["context"], cookie3_name, "bar_3") + await add_cookie(new_tab["context"], cookie3_name, "bar_3", secure=True) cookies = await bidi_session.storage.get_cookies( filter=filter, @@ -48,7 +48,7 @@ async def test_filter( "name": cookie1_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": value_1}, }, @@ -61,7 +61,7 @@ async def test_filter( "name": cookie2_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": value_1}, }, @@ -87,15 +87,15 @@ async def test_filter_domain( cookie1_name = "bar" cookie1_value = "foo" - await add_cookie(top_context["context"], cookie1_name, cookie1_value) + await add_cookie(top_context["context"], cookie1_name, cookie1_value, secure=True) cookie2_name = "foo" cookie2_value = "bar" - await add_cookie(top_context["context"], cookie2_name, cookie2_value) + await add_cookie(top_context["context"], cookie2_name, cookie2_value, secure=True) cookie3_name = "foo_2" cookie3_value = "bar_2" - await add_cookie(new_tab["context"], cookie3_name, cookie3_value) + await add_cookie(new_tab["context"], cookie3_name, cookie3_value, secure=True) domain = domain_value() cookies = await bidi_session.storage.get_cookies( @@ -113,7 +113,7 @@ async def test_filter_domain( "name": cookie1_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie1_value}, }, @@ -126,7 +126,7 @@ async def test_filter_domain( "name": cookie2_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie2_value}, }, @@ -165,6 +165,7 @@ async def test_filter_expiry( name=cookie1_name, value=cookie1_value, expiry=cookie1_date_string, + secure=True ) cookie2_name = "foo" @@ -174,6 +175,7 @@ async def test_filter_expiry( name=cookie2_name, value=cookie2_value, expiry=cookie1_date_string, + secure=True, ) cookie3_name = "foo_3" @@ -184,7 +186,7 @@ async def test_filter_expiry( cookie2_date_string = format_expiry_string(cookie2_expiry_date) await add_cookie( - new_tab["context"], cookie3_name, "bar_3", expiry=cookie2_date_string + new_tab["context"], cookie3_name, "bar_3", expiry=cookie2_date_string, secure=True ) cookies = await bidi_session.storage.get_cookies( @@ -203,7 +205,7 @@ async def test_filter_expiry( "name": cookie1_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie1_value}, }, @@ -217,7 +219,7 @@ async def test_filter_expiry( "name": cookie2_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie2_value}, }, @@ -232,10 +234,10 @@ async def test_filter_name(bidi_session, new_tab, test_page, domain_value, add_c cookie1_name = "foo" cookie1_value = "bar" - await add_cookie(new_tab["context"], cookie1_name, cookie1_value) + await add_cookie(new_tab["context"], cookie1_name, cookie1_value, secure=True) cookie2_name = "foo_2" - await add_cookie(new_tab["context"], cookie2_name, "bar_2") + await add_cookie(new_tab["context"], cookie2_name, "bar_2", secure=True) cookies = await bidi_session.storage.get_cookies( filter={"name": "foo"}, @@ -250,7 +252,7 @@ async def test_filter_name(bidi_session, new_tab, test_page, domain_value, add_c "name": cookie1_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie1_value}, } @@ -269,6 +271,9 @@ async def test_filter_name(bidi_session, new_tab, test_page, domain_value, add_c ("strict", "none"), ("lax", "strict"), ("strict", "lax"), + ("none", "default"), + ("default", "lax"), + ("default", "strict"), ], ) async def test_filter_same_site( @@ -285,6 +290,7 @@ async def test_filter_same_site( cookie1_name, cookie1_value, same_site=same_site_1, + secure=True ) cookie2_name = "foo" @@ -294,10 +300,11 @@ async def test_filter_same_site( cookie2_name, cookie2_value, same_site=same_site_1, + secure=True ) cookie3_name = "foo_3" - await add_cookie(new_tab["context"], cookie3_name, "bar_3", same_site=same_site_2) + await add_cookie(new_tab["context"], cookie3_name, "bar_3", same_site=same_site_2, secure=True) cookies = await bidi_session.storage.get_cookies( filter=CookieFilter(same_site=same_site_1), @@ -314,7 +321,7 @@ async def test_filter_same_site( "name": cookie1_name, "path": "/webdriver/tests/support", "sameSite": same_site_1, - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie1_value}, }, @@ -327,7 +334,7 @@ async def test_filter_same_site( "name": cookie2_name, "path": "/webdriver/tests/support", "sameSite": same_site_1, - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie2_value}, }, @@ -352,6 +359,7 @@ async def test_filter_secure( new_tab["context"], cookie1_name, cookie1_value, + same_site="strict", secure=secure_1, ) @@ -361,11 +369,12 @@ async def test_filter_secure( new_tab["context"], cookie2_name, cookie2_value, + same_site="strict", secure=secure_1, ) cookie3_name = "foo_3" - await add_cookie(new_tab["context"], cookie3_name, "bar_3", secure=secure_2) + await add_cookie(new_tab["context"], cookie3_name, "bar_3", same_site="strict", secure=secure_2) cookies = await bidi_session.storage.get_cookies( filter=CookieFilter(secure=secure_1), @@ -381,7 +390,7 @@ async def test_filter_secure( "httpOnly": False, "name": cookie1_name, "path": "/webdriver/tests/support", - "sameSite": "none", + "sameSite": "strict", "secure": secure_1, "size": 6, "value": {"type": "string", "value": cookie1_value}, @@ -394,7 +403,7 @@ async def test_filter_secure( "httpOnly": False, "name": cookie2_name, "path": "/webdriver/tests/support", - "sameSite": "none", + "sameSite": "strict", "secure": secure_1, "size": 6, "value": {"type": "string", "value": cookie2_value}, @@ -431,6 +440,7 @@ async def test_filter_path( cookie1_name, cookie1_value, path=path_1, + secure=True ) cookie2_name = "foo" @@ -440,10 +450,11 @@ async def test_filter_path( cookie2_name, cookie2_value, path=path_1, + secure=True ) cookie3_name = "foo_3" - await add_cookie(new_tab["context"], cookie3_name, "bar_3", path=path_2) + await add_cookie(new_tab["context"], cookie3_name, "bar_3", path=path_2, secure=True) cookies = await bidi_session.storage.get_cookies( filter=CookieFilter(path=path_1), @@ -459,7 +470,7 @@ async def test_filter_path( "name": cookie1_name, "path": path_1, "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie1_value}, }, @@ -472,7 +483,7 @@ async def test_filter_path( "name": cookie2_name, "path": path_1, "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie2_value}, }, diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/get_cookies/partition.py b/tests/wpt/tests/webdriver/tests/bidi/storage/get_cookies/partition.py index 76fd6221a00..8506a45495a 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/storage/get_cookies/partition.py +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/get_cookies/partition.py @@ -30,11 +30,11 @@ async def test_default_partition( cookie1_name = "foo" cookie1_value = "bar" - await add_cookie(new_tab["context"], cookie1_name, cookie1_value) + await add_cookie(new_tab["context"], cookie1_name, cookie1_value, secure=True) cookie2_name = "foo_2" cookie2_value = "bar_2" - await add_cookie(top_context["context"], cookie2_name, cookie2_value) + await add_cookie(top_context["context"], cookie2_name, cookie2_value, secure=True) cookies = await bidi_session.storage.get_cookies() @@ -49,7 +49,7 @@ async def test_default_partition( "name": cookie1_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie1_value}, }, @@ -62,7 +62,7 @@ async def test_default_partition( "name": cookie2_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 10, "value": {"type": "string", "value": cookie2_value}, }, @@ -94,7 +94,7 @@ async def test_partition_context( cookie_name = "foo" cookie_value = "bar" - await add_cookie(new_tab["context"], cookie_name, cookie_value) + await add_cookie(new_tab["context"], cookie_name, cookie_value, secure=True) # Check that added cookies are present on the right context. cookies = await bidi_session.storage.get_cookies( @@ -112,7 +112,7 @@ async def test_partition_context( "name": cookie_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie_value}, }, @@ -309,7 +309,7 @@ async def test_partition_default_user_context( cookie_name = "foo" cookie_value = "bar" - await add_cookie(new_context["context"], cookie_name, cookie_value) + await add_cookie(new_context["context"], cookie_name, cookie_value, secure=True) # Check that added cookies are present on the right user context. result = await bidi_session.storage.get_cookies( @@ -322,7 +322,7 @@ async def test_partition_default_user_context( "name": cookie_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 6, "value": {"type": "string", "value": cookie_value}, } @@ -362,7 +362,7 @@ async def test_partition_user_context( cookie_name = "foo_1" cookie_value = "bar_1" - await add_cookie(new_context_1["context"], cookie_name, cookie_value) + await add_cookie(new_context_1["context"], cookie_name, cookie_value, secure=True) # Check that added cookies are present on the right user context. result = await bidi_session.storage.get_cookies( @@ -375,7 +375,7 @@ async def test_partition_user_context( "name": cookie_name, "path": "/webdriver/tests/support", "sameSite": "none", - "secure": False, + "secure": True, "size": 10, "value": {"type": "string", "value": cookie_value}, } diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_same_site.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_same_site.py index 53d8ae99877..1121f294b6a 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_same_site.py +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_same_site.py @@ -10,7 +10,7 @@ pytestmark = pytest.mark.asyncio "strict", "lax", "none", - None + "default" ] ) async def test_cookie_secure(bidi_session, set_cookie, test_page, domain_value, same_site): @@ -19,6 +19,4 @@ async def test_cookie_secure(bidi_session, set_cookie, test_page, domain_value, await assert_partition_key(bidi_session, actual=set_cookie_result["partitionKey"]) - # `same_site` defaults to "none". - expected_same_site = same_site if same_site is not None else 'none' - await assert_cookie_is_set(bidi_session, domain=domain_value(), same_site=expected_same_site) + await assert_cookie_is_set(bidi_session, domain=domain_value(), same_site=same_site) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_secure.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_secure.py index bc3201ab804..11b3e40b204 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_secure.py +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_secure.py @@ -12,12 +12,15 @@ pytestmark = pytest.mark.asyncio None ] ) -async def test_cookie_secure(bidi_session, set_cookie, test_page, domain_value, secure): +async def test_cookie_secure(bidi_session, set_cookie, domain_value, secure): set_cookie_result = await set_cookie( - cookie=create_cookie(domain=domain_value(), secure=secure)) + cookie=create_cookie(domain=domain_value(), same_site="strict", secure=secure) + ) await assert_partition_key(bidi_session, actual=set_cookie_result["partitionKey"]) # `secure` defaults to `false`. expected_secure = secure if secure is not None else False - await assert_cookie_is_set(bidi_session, domain=domain_value(), secure=expected_secure) + await assert_cookie_is_set( + bidi_session, domain=domain_value(), same_site="strict", secure=expected_secure + ) diff --git a/tests/wpt/tests/webdriver/tests/support/fixtures_bidi.py b/tests/wpt/tests/webdriver/tests/support/fixtures_bidi.py index c28988a8c2b..06b591dc802 100644 --- a/tests/wpt/tests/webdriver/tests/support/fixtures_bidi.py +++ b/tests/wpt/tests/webdriver/tests/support/fixtures_bidi.py @@ -553,7 +553,7 @@ async def add_cookie(bidi_session): cookie_string += f";path={path}" cookie["path"] = path - if same_site != "none": + if same_site != "default": cookie_string += f";SameSite={same_site}" if secure is True: diff --git a/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js b/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js index 9c7ef624f17..8c81447daeb 100644 --- a/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js @@ -3599,6 +3599,171 @@ const subgraphTests = [ } } }, + { + 'name': 'quantized pad with constant mode for Kernel fusion', + 'graph': { + 'inputs': { + 'input': { + 'data': [ + 1.6811466217041016, 0.0479511022567749, 0.33355462551116943, + -0.1988269537687301, -0.0041167140007019, -0.0634240251779556, + ], + 'descriptor': {shape: [2, 3], dataType: 'float32'}, + 'constant': false + }, + 'scale': { + 'data': [0.003921568859368563], + 'descriptor': {shape: [1], dataType: 'float32'}, + 'constant': true + }, + 'zeroPoint': { + 'data': [0], + 'descriptor': {shape: [1], dataType: 'int8'}, + 'constant': true + }, + }, + 'operators': [ + { + 'name': 'quantizeLinear', + 'arguments': [ + {'input': 'input'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'quantizedInput' + }, + { + 'name': 'dequantizeLinear', + 'arguments': [ + {'input': 'quantizedInput'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'dequantizedInput' + }, + { + 'name': 'pad', + 'arguments': [ + {'input': 'dequantizedInput'}, {'beginningPadding': [1, 2]}, + {'endingPadding': [1, 2]}, {'options': {'value': 1}} + ], + 'outputs': 'padOutput' + }, + { + 'name': 'quantizeLinear', + 'arguments': [ + {'input': 'padOutput'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'quantizedPadOutput' + }, + { + 'name': 'dequantizeLinear', + 'arguments': [ + {'input': 'quantizedPadOutput'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'output' + } + ], + 'expectedOutputs': { + 'output': { + 'data': [ + 0.49803924560546875, 0.49803924560546875, 0.49803924560546875, + 0.49803924560546875, 0.49803924560546875, 0.49803924560546875, + 0.49803924560546875, 0.49803924560546875, 0.49803924560546875, + 0.49803924560546875, 0.0470588281750679, 0.3333333432674408, + 0.49803924560546875, 0.49803924560546875, 0.49803924560546875, + 0.49803924560546875, -0.20000001788139343, -0.003921568859368563, + -0.062745101749897, 0.49803924560546875, 0.49803924560546875, + 0.49803924560546875, 0.49803924560546875, 0.49803924560546875, + 0.49803924560546875, 0.49803924560546875, 0.49803924560546875, + 0.49803924560546875, + ], + 'descriptor': {shape: [4, 7], dataType: 'float32'} + } + } + } + }, + { + 'name': 'quantized pad with constant mode for XNNPack fusion', + 'graph': { + 'inputs': { + 'input': { + 'data': [ + 1.6811466217041016, 0.0479511022567749, 0.33355462551116943, + -0.1988269537687301, -0.0041167140007019, -0.0634240251779556, + ], + 'descriptor': {shape: [2, 3], dataType: 'float32'}, + 'constant': false + }, + 'scale': { + 'data': [0.003921568859368563], + 'descriptor': {shape: [1], dataType: 'float32'}, + 'constant': true + }, + 'zeroPoint': { + 'data': [0], + 'descriptor': {shape: [1], dataType: 'int8'}, + 'constant': true + }, + }, + 'operators': [ + { + 'name': 'quantizeLinear', + 'arguments': [ + {'input': 'input'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'quantizedInput' + }, + { + 'name': 'dequantizeLinear', + 'arguments': [ + {'input': 'quantizedInput'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'dequantizedInput' + }, + { + 'name': 'pad', + 'arguments': [ + {'input': 'dequantizedInput'}, {'beginningPadding': [1, 2]}, + {'endingPadding': [1, 2]}, {'options': {'value': 0}} + ], + 'outputs': 'padOutput' + }, + { + 'name': 'quantizeLinear', + 'arguments': [ + {'input': 'padOutput'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'quantizedPadOutput' + }, + { + 'name': 'dequantizeLinear', + 'arguments': [ + {'input': 'quantizedPadOutput'}, + {'scale': 'scale', 'zeroPoint': 'zeroPoint'} + ], + 'outputs': 'output' + } + ], + 'expectedOutputs': { + 'output': { + 'data': [ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0.49803924560546875, 0.0470588281750679, 0.3333333432674408, + 0, 0, 0, 0, + -0.20000001788139343, -0.003921568859368563, -0.062745101749897, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + ], + 'descriptor': {shape: [4, 7], dataType: 'float32'} + } + } + } + }, { 'name': 'quantized clamp', 'graph': { diff --git a/tests/wpt/tests/webnn/conformance_tests/sigmoid.https.any.js b/tests/wpt/tests/webnn/conformance_tests/sigmoid.https.any.js index 287568a390a..7474fe98f65 100644 --- a/tests/wpt/tests/webnn/conformance_tests/sigmoid.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/sigmoid.https.any.js @@ -21,7 +21,7 @@ const sigmoidTests = [ 'inputs': { 'sigmoidInput': { 'data': [ - -0.37699514627456665, -0.6848450899124146, -5.988872051239014, + -0.37699514627456665, -0.6848450899124146, -3.5469970703125, 4.431885719299316, -0.93868488073349, 4.591195583343506, -2.5067026615142822, 1.5669522285461426, -2.596473217010498, -3.64729380607605, 2.6785237789154053, -3.1051602363586426, @@ -42,7 +42,7 @@ const sigmoidTests = [ 'expectedOutputs': { 'sigmoidOutput': { 'data': [ - 0.4068518280982971, 0.33518078923225403, 0.0025002227630466223, + 0.4068518280982971, 0.33518078923225403, 0.028004197403788567, 0.9882476925849915, 0.28116607666015625, 0.9899610877037048, 0.07538963109254837, 0.8273487091064453, 0.0693657398223877, 0.02539960853755474, 0.9357474446296692, 0.04289489984512329, @@ -84,7 +84,7 @@ const sigmoidTests = [ 'inputs': { 'sigmoidInput': { 'data': [ - -0.37699514627456665, -0.6848450899124146, -5.988872051239014, + -0.37699514627456665, -0.6848450899124146, -3.5469970703125, 4.431885719299316, -0.93868488073349, 4.591195583343506, -2.5067026615142822, 1.5669522285461426, -2.596473217010498, -3.64729380607605, 2.6785237789154053, -3.1051602363586426, @@ -104,7 +104,7 @@ const sigmoidTests = [ 'expectedOutputs': { 'sigmoidOutput': { 'data': [ - 0.4068518280982971, 0.33518078923225403, 0.0025002227630466223, + 0.4068518280982971, 0.33518078923225403, 0.028004197403788567, 0.9882476925849915, 0.28116607666015625, 0.9899610877037048, 0.07538963109254837, 0.8273487091064453, 0.0693657398223877, 0.02539960853755474, 0.9357474446296692, 0.04289489984512329, @@ -124,7 +124,7 @@ const sigmoidTests = [ 'inputs': { 'sigmoidInput': { 'data': [ - -0.37699514627456665, -0.6848450899124146, -5.988872051239014, + -0.37699514627456665, -0.6848450899124146, -3.5469970703125, 4.431885719299316, -0.93868488073349, 4.591195583343506, -2.5067026615142822, 1.5669522285461426, -2.596473217010498, -3.64729380607605, 2.6785237789154053, -3.1051602363586426, @@ -144,7 +144,7 @@ const sigmoidTests = [ 'expectedOutputs': { 'sigmoidOutput': { 'data': [ - 0.4068518280982971, 0.33518078923225403, 0.0025002227630466223, + 0.4068518280982971, 0.33518078923225403, 0.028004197403788567, 0.9882476925849915, 0.28116607666015625, 0.9899610877037048, 0.07538963109254837, 0.8273487091064453, 0.0693657398223877, 0.02539960853755474, 0.9357474446296692, 0.04289489984512329, @@ -164,7 +164,7 @@ const sigmoidTests = [ 'inputs': { 'sigmoidInput': { 'data': [ - -0.37699514627456665, -0.6848450899124146, -5.988872051239014, + -0.37699514627456665, -0.6848450899124146, -3.5469970703125, 4.431885719299316, -0.93868488073349, 4.591195583343506, -2.5067026615142822, 1.5669522285461426, -2.596473217010498, -3.64729380607605, 2.6785237789154053, -3.1051602363586426, @@ -184,7 +184,7 @@ const sigmoidTests = [ 'expectedOutputs': { 'sigmoidOutput': { 'data': [ - 0.4068518280982971, 0.33518078923225403, 0.0025002227630466223, + 0.4068518280982971, 0.33518078923225403, 0.028004197403788567, 0.9882476925849915, 0.28116607666015625, 0.9899610877037048, 0.07538963109254837, 0.8273487091064453, 0.0693657398223877, 0.02539960853755474, 0.9357474446296692, 0.04289489984512329, @@ -204,7 +204,7 @@ const sigmoidTests = [ 'inputs': { 'sigmoidInput': { 'data': [ - -0.37699514627456665, -0.6848450899124146, -5.988872051239014, + -0.37699514627456665, -0.6848450899124146, -3.5469970703125, 4.431885719299316, -0.93868488073349, 4.591195583343506, -2.5067026615142822, 1.5669522285461426, -2.596473217010498, -3.64729380607605, 2.6785237789154053, -3.1051602363586426, @@ -224,7 +224,7 @@ const sigmoidTests = [ 'expectedOutputs': { 'sigmoidOutput': { 'data': [ - 0.4068518280982971, 0.33518078923225403, 0.0025002227630466223, + 0.4068518280982971, 0.33518078923225403, 0.028004197403788567, 0.9882476925849915, 0.28116607666015625, 0.9899610877037048, 0.07538963109254837, 0.8273487091064453, 0.0693657398223877, 0.02539960853755474, 0.9357474446296692, 0.04289489984512329, @@ -244,7 +244,7 @@ const sigmoidTests = [ 'inputs': { 'sigmoidInput': { 'data': [ - -0.37699514627456665, -0.6848450899124146, -5.988872051239014, + -0.37699514627456665, -0.6848450899124146, -3.5469970703125, 4.431885719299316, -0.93868488073349, 4.591195583343506, -2.5067026615142822, 1.5669522285461426, -2.596473217010498, -3.64729380607605, 2.6785237789154053, -3.1051602363586426, @@ -264,7 +264,7 @@ const sigmoidTests = [ 'expectedOutputs': { 'sigmoidOutput': { 'data': [ - 0.4068518280982971, 0.33518078923225403, 0.0025002227630466223, + 0.4068518280982971, 0.33518078923225403, 0.028004197403788567, 0.9882476925849915, 0.28116607666015625, 0.9899610877037048, 0.07538963109254837, 0.8273487091064453, 0.0693657398223877, 0.02539960853755474, 0.9357474446296692, 0.04289489984512329, diff --git a/tests/wpt/tests/webnn/conformance_tests/tensor.https.any.js b/tests/wpt/tests/webnn/conformance_tests/tensor.https.any.js index 03057a62ee8..ea2cedb3f6d 100644 --- a/tests/wpt/tests/webnn/conformance_tests/tensor.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/tensor.https.any.js @@ -38,7 +38,7 @@ const getDescriptorFromTensor = (tensor) => { shape: tensor.shape, readable: tensor.readable, writable: tensor.writable, - importableToWebGPU: tensor.importableToWebGPU, + exportableToGPU: tensor.exportableToGPU, }; }; @@ -1321,6 +1321,455 @@ const testDispatchTensor = (testName) => { }, `${testName} / same constant multiple graphs`); }; +/** + * Asserts a gpu buffer data matches expected. + * @param {GPUDevice} gpuDevice - The device used to create the context. + * @param {GPUBuffer} gpuBuffer - The buffer to read and compare data. + * @param {Array} expected - Array of the expected data in the tensor. + */ +const assert_gpu_buffer_data_equals = + async (gpuDevice, gpuBuffer, expected) => { + const gpuReadbackBuffer = gpuDevice.createBuffer({ + size: expected.byteLength, + usage: GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST, + }); + + const gpuCommandEncoder = gpuDevice.createCommandEncoder(); + gpuCommandEncoder.copyBufferToBuffer( + gpuBuffer, 0, gpuReadbackBuffer, 0, expected.byteLength); + gpuDevice.queue.submit([gpuCommandEncoder.finish()]); + + await gpuReadbackBuffer.mapAsync(GPUMapMode.READ); + const outputData = + new expected.constructor(gpuReadbackBuffer.getMappedRange()); + assert_array_equals(outputData, expected); + gpuReadbackBuffer.unmap(); +}; + +/** + * Export to GPU operation test. + * @param {String} testName - The name of the test operation. + */ +const testExportToGPU = (testName) => { + let gpuAdapter; + let gpuDevice; + let mlContext; + let mlGraph; + const shape = [2, 2]; + let gpuComputePipeline; + let isExportToGPUSupported = true; + promise_setup(async () => { + // Initialize GPU + gpuAdapter = navigator.gpu && await navigator.gpu.requestAdapter(); + if (!gpuAdapter) { + isExportToGPUSupported = false; + return; + } + + gpuDevice = await gpuAdapter.requestDevice(); + if (!gpuDevice) { + isExportToGPUSupported = false; + return; + } + + // Construct a GPU custom op which increments each number of the input + // buffer by 1. + const gpuComputeShaderCode = ` + @group(0) @binding(0) var inputBuffer: array; + @group(0) @binding(1) var outputBuffer: array; + + @compute @workgroup_size(1) + fn main(@builtin(global_invocation_id) global_id: vec3) { + let index = global_id.x; + outputBuffer[index] = inputBuffer[index] + 1.0; + }`; + + const gpuShaderModule = + gpuDevice.createShaderModule({code: gpuComputeShaderCode}); + gpuComputePipeline = gpuDevice.createComputePipeline({ + layout: 'auto', + compute: {module: gpuShaderModule, entryPoint: 'main'}, + }); + + // Initialize WebNN + try { + mlContext = await navigator.ml.createContext(gpuDevice); + } catch (e) { + throw new AssertionError( + `Unable to create context for ${variant} variant. ${e}`); + } + + // Check if WebNN interop is supported. + try { + await mlContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: true, + }); + } catch (e) { + if (e.name === 'NotSupportedError') { + isExportToGPUSupported = false; + return; + } + throw e; + } + + // Construct a simple graph: OUTPUT = LHS + RHS. + const mlBuilder = new MLGraphBuilder(mlContext); + const mlOperandDescriptor = {dataType: 'float32', shape}; + const lhsOperand = mlBuilder.input('lhs', mlOperandDescriptor); + const rhsOperand = mlBuilder.input('rhs', mlOperandDescriptor); + mlGraph = await mlBuilder.build( + {'output': mlBuilder.add(lhsOperand, rhsOperand)}); + }); + + const dispatchGPU = + (gpuDevice, gpuPipeline, gpuInputBuffer, gpuOutputBuffer, inputData) => { + const gpuBindGroup = gpuDevice.createBindGroup({ + layout: gpuPipeline.getBindGroupLayout(0), + entries: [ + {binding: 0, resource: {buffer: gpuInputBuffer}}, + {binding: 1, resource: {buffer: gpuOutputBuffer}}, + ], + }); + + const gpuCommandEncoder = gpuDevice.createCommandEncoder(); + { + const gpuComputePass = gpuCommandEncoder.beginComputePass(); + gpuComputePass.setPipeline(gpuPipeline); + gpuComputePass.setBindGroup(0, gpuBindGroup); + gpuComputePass.dispatchWorkgroups( + inputData.byteLength / inputData.BYTES_PER_ELEMENT); + gpuComputePass.end(); + } + gpuDevice.queue.submit([gpuCommandEncoder.finish()]); + }; + + promise_test(async () => { + if (!isExportToGPUSupported) { + return; + } + + const mlTensorDescriptor = { + dataType: 'float32', + shape: shape, + exportableToGPU: true + }; + + const mlTensor = await mlContext.createTensor(mlTensorDescriptor); + const gpuTensorBuffer = await mlContext.exportToGPU(mlTensor); + + assert_equals( + gpuTensorBuffer.usage, + GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC | + GPUBufferUsage.COPY_DST); + assert_equals(gpuTensorBuffer.size, sizeOfDescriptor(mlTensorDescriptor)); + }, `${testName} / export tensor`); + + promise_test(async t => { + if (!isExportToGPUSupported) { + return; + } + + const mlTensor = await mlContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: false, + }); + + await promise_rejects_js(t, TypeError, mlContext.exportToGPU(mlTensor)); + }, `${testName} / export wrong tensor`); + + promise_test(async t => { + if (!isExportToGPUSupported) { + return; + } + + const maxBufferSizeOOB = gpuDevice.limits.maxBufferSize + 1; + const elementSize = Float32Array.BYTES_PER_ELEMENT; + const shape = [maxBufferSizeOOB / elementSize]; + + const mlTensor = await mlContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: true, + }); + + await mlContext.exportToGPU(mlTensor); + }, `${testName} / export big tensor`) + + promise_test(async () => { + if (!isExportToGPUSupported) { + return; + } + + const mlTensorDescriptor = { + dataType: 'float32', + shape: shape, + exportableToGPU: true, + readable: true, + writable: true + }; + + let mlTensor = await mlContext.createTensor(mlTensorDescriptor); + const inputData = new Float32Array(sizeOfShape(shape)).fill(1.0); + mlContext.writeTensor(mlTensor, inputData); + + const gpuTensorBuffer = await mlContext.exportToGPU(mlTensor); + gpuTensorBuffer.destroy(); + + await assert_tensor_data_equals(mlContext, mlTensor, inputData); + }, `${testName} / export then destroy buffer`); + + promise_test(async () => { + if (!isExportToGPUSupported) { + return; + } + + const mlTensorDescriptor = { + dataType: 'float32', + shape: shape, + exportableToGPU: true, + writable: true + }; + + let mlTensor = await mlContext.createTensor(mlTensorDescriptor); + + const inputData = new Float32Array(sizeOfShape(shape)).fill(1.0); + mlContext.writeTensor(mlTensor, inputData); + + const gpuTensorBuffer = await mlContext.exportToGPU(mlTensor); + mlTensor.destroy(); + + await assert_gpu_buffer_data_equals(gpuDevice, gpuTensorBuffer, inputData); + }, `${testName} / export then destroy tensor`); + + promise_test(async () => { + if (!isExportToGPUSupported) { + return; + } + + const mlTensor = await mlContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: true, + }); + await mlContext.exportToGPU(mlTensor); + assert_throws_js( + TypeError, + () => mlContext.writeTensor( + mlTensor, new Float32Array([1.0, 2.0, 3.0, 4.0]))); + }, `${testName} / write tensor after export`); + + promise_test(async t => { + if (!isExportToGPUSupported) { + return; + } + + const mlTensor = await mlContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: true, + }); + + // Second call rejects because the first export is still pending and multiple + // exports aren’t allowed. + let export_promise = mlContext.exportToGPU(mlTensor); + await promise_rejects_js(t, TypeError, mlContext.exportToGPU(mlTensor)); + + let gpuTensorBuffer1 = await export_promise; + let gpuTensorBuffer2 = await mlContext.exportToGPU(mlTensor); + assert_equals( + gpuTensorBuffer1, gpuTensorBuffer2, 'Same buffers should be returned.'); + }, `${testName} / export twice`); + + promise_test(async () => { + if (!isExportToGPUSupported) { + return; + } + + // Initialize the tensor buffers from WebNN. + let mlTensorInput = await mlContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: true, + writable: true + }); + + const inputData1 = new Float32Array(sizeOfShape(shape)).fill(1.0); + mlContext.writeTensor(mlTensorInput, inputData1); + + let mlTensorOutput = await mlContext.createTensor( + {dataType: 'float32', shape: shape, exportableToGPU: true}); + + let gpuTensorBufferInput = await mlContext.exportToGPU(mlTensorInput); + let gpuTensorBufferOutput = await mlContext.exportToGPU(mlTensorOutput); + + dispatchGPU( + gpuDevice, gpuComputePipeline, gpuTensorBufferInput, + gpuTensorBufferOutput, inputData1); + + gpuTensorBufferInput.destroy(); + gpuTensorBufferOutput.destroy(); + + // Write different data to the input tensor. + const inputData2 = new Float32Array(sizeOfShape(shape)).fill(2.0); + mlContext.writeTensor(mlTensorInput, inputData2); + + gpuTensorBufferInput = await mlContext.exportToGPU(mlTensorInput); + gpuTensorBufferOutput = await mlContext.exportToGPU(mlTensorOutput); + + dispatchGPU( + gpuDevice, gpuComputePipeline, gpuTensorBufferInput, + gpuTensorBufferOutput, inputData2); + + await assert_gpu_buffer_data_equals( + gpuDevice, gpuTensorBufferOutput, inputData2.map(x => x + 1)); + }, `${testName} / dispatch gpu twice`); + + promise_test(async () => { + if (!isExportToGPUSupported) { + return; + } + + // Initialize the tensor buffers from WebNN. + let mlTensorInput = await mlContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: true, + writable: true + }); + + const inputData = new Float32Array(sizeOfShape(shape)).fill(1.0); + mlContext.writeTensor(mlTensorInput, inputData); + + let mlTensorOutput = await mlContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: true, + readable: true + }); + + let gpuTensorBufferInput = await mlContext.exportToGPU(mlTensorInput); + let gpuTensorBufferOutput = await mlContext.exportToGPU(mlTensorOutput); + + gpuTensorBufferInput.destroy(); + gpuTensorBufferOutput.destroy(); + + mlContext.dispatch( + mlGraph, { + 'lhs': mlTensorInput, + 'rhs': mlTensorInput, + }, + { + 'output': mlTensorOutput, + }); + + await assert_tensor_data_equals( + mlContext, mlTensorOutput, inputData.map(x => x + 1)); + }, `${testName} / webnn dispatch only`); + + promise_test(async () => { + if (!isExportToGPUSupported) { + return; + } + + // Initialize the tensor buffers from WebNN. + let mlTensorInput = await mlContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: true, + writable: true + }); + + const inputData = new Float32Array(sizeOfShape(shape)).fill(1.0); + mlContext.writeTensor(mlTensorInput, inputData); + + let mlTensorOutput = await mlContext.createTensor( + {dataType: 'float32', shape: shape, exportableToGPU: true}); + + let gpuTensorBufferInput = await mlContext.exportToGPU(mlTensorInput); + let gpuTensorBufferOutput = await mlContext.exportToGPU(mlTensorOutput); + + dispatchGPU( + gpuDevice, gpuComputePipeline, gpuTensorBufferInput, + gpuTensorBufferOutput, inputData); + + gpuTensorBufferInput.destroy(); + gpuTensorBufferOutput.destroy(); + + mlContext.dispatch( + mlGraph, { + 'lhs': mlTensorOutput, + 'rhs': mlTensorOutput, + }, + { + 'output': mlTensorInput, + }); + + gpuTensorBufferInput = await mlContext.exportToGPU(mlTensorInput); + gpuTensorBufferOutput = await mlContext.exportToGPU(mlTensorOutput); + + dispatchGPU( + gpuDevice, gpuComputePipeline, gpuTensorBufferInput, + gpuTensorBufferOutput, inputData); + + await assert_gpu_buffer_data_equals( + gpuDevice, gpuTensorBufferOutput, + new Float32Array(sizeOfShape(shape)).fill(5.0)); + }, `${testName} / dispatch from webgpu then webnn`); + + promise_test(async () => { + if (!isExportToGPUSupported) { + return; + } + + let anotherMLContext = await navigator.ml.createContext(gpuDevice); + + let mlTensor = await anotherMLContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: true, + writable: true + }); + + const inputData = new Float32Array(sizeOfShape(shape)).fill(1.0); + anotherMLContext.writeTensor(mlTensor, inputData); + + const gpuTensorBuffer = await anotherMLContext.exportToGPU(mlTensor); + + anotherMLContext.destroy(); + + await assert_gpu_buffer_data_equals(gpuDevice, gpuTensorBuffer, inputData); + }, `${testName} / destroy context after export`); + + promise_test(async t => { + if (!isExportToGPUSupported) { + return; + } + + let anotherGPUDevice = await gpuAdapter.requestDevice(); + let anotherMLContext = await navigator.ml.createContext(anotherGPUDevice); + + let mlTensor = await anotherMLContext.createTensor({ + dataType: 'float32', + shape: shape, + exportableToGPU: true, + readable: true, + writable: true + }); + + const inputData = new Float32Array(sizeOfShape(shape)).fill(1.0); + anotherMLContext.writeTensor(mlTensor, inputData); + + anotherGPUDevice.destroy(); + + await promise_rejects_dom( + t, 'InvalidStateError', anotherMLContext.exportToGPU(mlTensor)); + await assert_tensor_data_equals(anotherMLContext, mlTensor, inputData); + }, `${testName} / destroy device before export`); +}; + if (navigator.ml) { testCreateTensor('create', {dataType: 'float16', shape: [2, 3]}); testCreateTensor('create', {dataType: 'float32', shape: [1, 5]}); @@ -1346,6 +1795,7 @@ if (navigator.ml) { testReadTensor('read'); testWriteTensor('write'); testDispatchTensor('dispatch'); + testExportToGPU('interop'); } else { test(() => assert_implements(navigator.ml, 'missing navigator.ml')); } diff --git a/tests/wpt/tests/webnn/conformance_tests/tile.https.any.js b/tests/wpt/tests/webnn/conformance_tests/tile.https.any.js index aa34b082c7e..3e4ea39653b 100644 --- a/tests/wpt/tests/webnn/conformance_tests/tile.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/tile.https.any.js @@ -17,6 +17,28 @@ // MLOperatorOptions options = {}); const tileTests = [ + { + 'name': 'tile float32 0D scalar tensor by repetitions=[]', + 'graph': { + 'inputs': { + 'tileInput': { + 'data': [0.5], + 'descriptor': {shape: [], dataType: 'float32'} + } + }, + 'operators': [{ + 'name': 'tile', + 'arguments': [{'input': 'tileInput'}, {'repetitions': []}], + 'outputs': 'tileOutput' + }], + 'expectedOutputs': { + 'tileOutput': { + 'data': [0.5], + 'descriptor': {shape: [], dataType: 'float32'} + } + } + } + }, { 'name': 'tile float32 1D constant tensor', 'graph': { diff --git a/tests/wpt/tests/workers/WEB_FEATURES.yml b/tests/wpt/tests/workers/WEB_FEATURES.yml index 1687ef742e2..bd9a8dbba8f 100644 --- a/tests/wpt/tests/workers/WEB_FEATURES.yml +++ b/tests/wpt/tests/workers/WEB_FEATURES.yml @@ -1,4 +1,7 @@ features: +- name: request-animation-frame-workers + files: + - WorkerGlobalScope_requestAnimationFrame.worker.js - name: ua-client-hints files: - WorkerNavigator_userAgentData.http.html