From cad3ca2512e3e7e1a3a527e771bb2ff88f4cd47a Mon Sep 17 00:00:00 2001 From: Servo WPT Sync <32481905+servo-wpt-sync@users.noreply.github.com> Date: Tue, 26 Dec 2023 03:08:45 -0500 Subject: [PATCH] Sync WPT with upstream (25-12-2023) (#30938) * Update web-platform-tests to revision b'73caf716542762aab6646f0a02de208bc0ec4124' * Update expectations --------- Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com> --- .../inline-negative-margin-001.html.ini | 5 +- ...ty-animation-ending-correctly-001.html.ini | 2 + .../parsing/content-computed.html.ini | 66 + .../parsing/content-valid.html.ini | 216 +++ .../parsing/text-spacing-computed.html.ini | 9 + .../text-spacing-trim-computed.html.ini | 6 + .../parsing/text-spacing-trim-valid.html.ini | 6 + .../parsing/text-spacing-valid.html.ini | 9 + ...spacing-trim-space-first-wrap-001.html.ini | 11 + ...cing-trim-space-first-wrap-br-001.html.ini | 11 + .../text-spacing-trim-wrap-001.html.ini | 11 - ...space-separators-break-spaces-008.html.ini | 2 + ...on-from-ua-to-blocking-stylesheet.html.ini | 2 + .../progress-computed.tentative.html.ini | 3 + ...ryList-addListener-removeListener.html.ini | 3 + ...yList-extends-EventTarget-interop.html.ini | 3 - .../offsetTop-offsetLeft-with-zoom.html.ini | 3 + .../offsetTopLeft-border-box.html.ini | 6 - ...scroll-behavior-smooth-navigation.html.ini | 3 - .../cssom/getComputedStyle-pseudo.html.ini | 36 + .../dir-pseudo-on-input-element.html.ini | 3 + .../selectors/has-style-sharing-007.html.ini | 2 + .../tentative/state-pseudo-class.html.ini | 17 + ...-parts-valid-node-types.tentative.html.ini | 2 + .../empty-iframe-load-event.html.ini | 0 .../load-pageshow-events-window-open.html.ini | 3 - ...tion-unload-cross-origin.sub.window.js.ini | 3 + ...ation-unload-same-origin-fragment.html.ini | 3 + .../traverse_the_history_3.html.ini | 3 + .../traverse_the_history_5.html.ini | 3 + ...creating_browsing_context_test_01.html.ini | 3 - ...as.2d.disconnected-font-size-math.html.ini | 2 + .../text/canvas.2d.disconnected.html.ini | 2 +- .../button-layout/computed-style.html.ini | 1 + ...rame_sandbox_popups_nonescaping-2.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-3.html.ini | 3 +- .../multipart-formdata.window.js.ini | 3 + .../text-plain.window.js.ini | 9 +- .../module-static-import-delayed.html.ini | 3 - ...le-event-handler-settings-objects.html.ini | 3 + ...ob-entry-different-function-realm.html.ini | 3 +- .../promise-job-entry.html.ini | 2 +- .../strategy-worker-terminate.html.ini | 2 + .../sub-sample-buffer-stitching.html.ini | 6 + .../018.html.ini | 0 ...s-3P-window.partitioned.tentative.html.ini | 4 - .../semantics/run-a-worker/003.html.ini | 1 + tests/wpt/meta/MANIFEST.json | 1210 ++++++++++-- ...ground-attachment-fixed-block-002.html.ini | 2 + ...round-attachment-fixed-inline-002.html.ini | 2 + ...round-attachment-local-inline-002.html.ini | 2 + ...ty-animation-ending-correctly-002.html.ini | 2 + .../parsing/content-computed.html.ini | 66 + .../parsing/content-valid.html.ini | 216 +++ .../at-font-face-font-matching.html.ini | 57 +- .../parsing/text-spacing-computed.html.ini | 9 + .../text-spacing-trim-computed.html.ini | 6 + .../parsing/text-spacing-trim-valid.html.ini | 6 + .../parsing/text-spacing-valid.html.ini | 9 + ...cing-trim-space-first-wrap-br-001.html.ini | 11 + .../progress-computed.tentative.html.ini | 3 + ...ryList-addListener-removeListener.html.ini | 3 - .../offsetTop-offsetLeft-with-zoom.html.ini | 3 + .../cssom/getComputedStyle-pseudo.html.ini | 39 + .../dir-pseudo-on-input-element.html.ini | 3 + .../selectors/has-style-sharing-007.html.ini | 2 + .../tentative/state-pseudo-class.html.ini | 17 + ...-parts-valid-node-types.tentative.html.ini | 2 + .../css-images.sub.tentative.html.ini | 3 - ...-img-environment-change.https.sub.html.ini | 6 +- ...lement-img-environment-change.sub.html.ini | 3 - ...eshow-events-iframe-contentWindow.html.ini | 2 +- ...avigation-unload-same-origin.window.js.ini | 3 - .../replace-before-load/a-click.html.ini | 3 + .../pageload-image-in-popup.html.ini | 3 + .../traverse_the_history_4.html.ini | 0 .../supported-elements.html.ini | 5 +- .../button-layout/computed-style.html.ini | 45 + .../input-type-button-clip.html.ini | 2 + .../iframe_sandbox_popups_escaping-2.html.ini | 4 +- ...rame_sandbox_popups_nonescaping-1.html.ini | 3 +- .../image-loading-lazy-slow.html.ini | 2 + .../multipart-formdata.window.js.ini | 3 + ...rm-during-planned-navigation-task.html.ini | 4 + .../text-plain.window.js.ini | 6 +- .../htmlanchorelement_noopener.html.ini | 7 +- .../sub-sample-buffer-stitching.html.ini | 6 + .../audiocontext-not-fully-active.html.ini | 1 - .../webmessaging/without-ports/017.html.ini | 4 + .../018.html.ini | 0 .../aria-owns-from-aria-hidden-subtree.html | 34 + .../crashtests/select-in-display-none.html | 25 + .../accname/name/comp_name_from_content.html | 16 + .../tests/background-fetch/WEB_FEATURES.yml | 3 + .../wpt/tests/clipboard-apis/WEB_FEATURES.yml | 5 + .../detached-iframe/WEB_FEATURES.yml | 3 + .../permissions/WEB_FEATURES.yml | 3 + .../text-write-read/WEB_FEATURES.yml | 3 + .../fedcm-disconnect-errors.https.html | 34 +- .../fedcm-error-basic.https.html | 46 +- ...fedcm-too-many-disconnect-calls.https.html | 31 + .../support/fedcm-helper.sub.js | 36 + .../support/fedcm/disconnect_failure.py | 8 + ...fest_with_cross_origin_disconnect.sub.json | 7 + .../manifest_with_disconnect_failure.json | 7 + .../css/css-anchor-position/WEB_FEATURES.yml | 3 + .../chrome-1512373-2-crash.html | 18 + .../chrome-1512373-crash.html | 7 + ...background-attachment-fixed-block-002.html | 52 + ...ackground-attachment-fixed-inline-002.html | 48 + ...background-attachment-local-block-002.html | 52 + ...ackground-attachment-local-inline-002.html | 48 + ...ground-attachment-fixed-block-002-ref.html | 47 + ...round-attachment-fixed-inline-002-ref.html | 40 + ...ground-attachment-local-block-002-ref.html | 47 + ...round-attachment-local-inline-002-ref.html | 49 + ...ea-input-flex-items-in-multicol-crash.html | 12 + .../css/css-cascade/at-scope-parsing.html | 6 + ...indefinite-height-min-height-flex-row.html | 36 + ...indefinite-height-min-height-flex-row.html | 36 + .../container-queries/WEB_FEATURES.yml | 3 + .../content-visibility/WEB_FEATURES.yml | 3 + .../css-content/parsing/content-computed.html | 46 + .../css-content/parsing/content-invalid.html | 61 + .../css-content/parsing/content-valid.html | 58 + .../css/css-grid/animation/WEB_FEATURES.yml | 3 + ...id-container-baseline-synthesized-001.html | 58 + ...id-container-baseline-synthesized-002.html | 59 + ...id-container-baseline-synthesized-003.html | 59 + ...id-container-baseline-synthesized-004.html | 60 + .../masonry-not-inhibited-001-ref.html | 37 + .../tentative/masonry-not-inhibited-001.html | 54 + ...ontainer-baseline-synthesized-001-ref.html | 46 + .../alignment-in-subgridded-axes-001.html | 102 + .../css-grid/subgrid/grid-gap-012-ref.html | 7 + .../css/css-grid/subgrid/grid-gap-012.html | 15 + .../subgrid/subgrid-baseline-010.html | 2 +- .../subgrid/subgrid-baseline-011.html | 2 +- .../css/css-images/image-set/WEB_FEATURES.yml | 3 + .../css-inline/text-box-trim/WEB_FEATURES.yml | 3 + ...rl-reference-svg-foreignobject-zoomed.html | 23 + .../mask-image/mask-position-8.html | 15 + ...-become-oof-container-make-oof-inflow.html | 13 + ...n-abspos-in-relpos-in-nested-multicol.html | 16 + .../tests/css/css-nesting/WEB_FEATURES.yml | 3 + .../wpt/tests/css/css-syntax/WEB_FEATURES.yml | 6 + .../parsing/text-spacing-computed.html | 9 +- .../parsing/text-spacing-invalid.html | 2 +- .../parsing/text-spacing-trim-computed.html | 6 +- .../parsing/text-spacing-trim-invalid.html | 5 +- .../parsing/text-spacing-trim-valid.html | 6 +- .../css-text/parsing/text-spacing-valid.html | 9 +- .../css-text/parsing/white-space-invalid.html | 2 + .../css/css-text/text-indent/WEB_FEATURES.yml | 3 + ...spacing-trim-space-first-wrap-001-ref.html | 25 + ...ext-spacing-trim-space-first-wrap-001.html | 36 + ...-spacing-trim-space-first-wrap-br-001.html | 36 + .../text-spacing-trim-wrap-001-ref.html | 6 +- .../progress-computed.tentative.html | 1 + .../tests/css/css-variables/WEB_FEATURES.yml | 3 + .../css/css-view-transitions/WEB_FEATURES.yml | 3 + ...-on-root-element-with-view-transition.html | 2 +- .../only-child-view-transition.html | 2 +- .../style-inheritance.html | 22 +- ...ive-vertical-lr-baseline.optional-ref.html | 10 +- ...-native-vertical-lr-baseline.optional.html | 10 +- ...ive-vertical-rl-baseline.optional-ref.html | 10 +- ...-native-vertical-rl-baseline.optional.html | 10 +- ...ive-vertical-lr-baseline.optional-ref.html | 10 +- ...-native-vertical-lr-baseline.optional.html | 10 +- ...ive-vertical-rl-baseline.optional-ref.html | 10 +- ...-native-vertical-rl-baseline.optional.html | 10 +- .../offsetTop-offsetLeft-with-zoom.html | 95 + ...tyledeclaration-csstext-all-shorthand.html | 5 + .../css/cssom/getComputedStyle-pseudo.html | 88 +- .../dir-pseudo-on-input-element.html | 2 +- .../selectors/has-style-sharing-007-ref.html | 24 + .../css/selectors/has-style-sharing-007.html | 27 + .../tests/custom-elements/WEB_FEATURES.yml | 3 + .../tentative/ElementInternals-states.html | 2 - .../state/tentative/state-pseudo-class.html | 76 +- ...ate-css-selector-shadow-dom.tentative.html | 74 + .../state-css-selector.tentative.html | 6 +- .../WEB_FEATURES.yml | 3 + .../basic-dom-part-objects.tentative.html | 29 +- .../dom-parts-valid-node-types.tentative.html | 55 + tests/wpt/tests/fenced-frame/README.md | 16 + .../automatic-beacon-component-ad.https.html | 58 + .../multiple-component-ads.https.html | 32 + .../nested-opaque-ad-sizes.https.html | 14 +- .../wpt/tests/fenced-frame/resources/utils.js | 81 +- .../html/canvas/offscreen/WEB_FEATURES.yml | 3 + .../dir-auto-form-associated.window.js | 14 +- .../details-pseudo-elements-001-ref.html | 1 - ...details-pseudo-elements-001.tentative.html | 4 - .../widgets/button-layout/computed-style.html | 18 +- .../input-type-button-clip-ref.html | 9 + .../button-layout/input-type-button-clip.html | 15 + .../the-area-element/support/hit-test.js | 2 +- .../show-picker-being-cv-hidden.html | 23 + .../the-dialog-element/WEB_FEATURES.yml | 3 + .../case-sensitivity/values.window.js | 91 + .../actions/mouseClickCount.html.ini | 1 - .../testdriver/set_get_window_rect.html.ini | 7 + .../testdriver/set_get_window_rect.html | 31 + .../intersection-observer/bounding-box.html | 4 +- .../zoom-scaled-target.html | 62 + .../tests/picture-in-picture/WEB_FEATURES.yml | 3 + ...pointercapture_remove_setcapture_node.html | 97 + tests/wpt/tests/resources/testdriver.js | 23 + .../wpt/tests/sanitizer-api/WEB_FEATURES.yml | 3 + .../move-around-contenteditable-false.html | 189 ++ tests/wpt/tests/shadow-dom/WEB_FEATURES.yml | 3 + .../dropped-entries.tentative.html | 4 +- ...ftnav-painted-area-is-reset.tentative.html | 123 ++ .../reftests/gradient-color-interpolation.svg | 22 + .../gradient-color-interpolation-ref.svg | 24 + .../tools/ci/ci_wptrunner_infrastructure.sh | 4 +- tests/wpt/tests/tools/ci/requirements_tc.txt | 2 +- tests/wpt/tests/tools/ci/tc/tasks/test.yml | 2 + tests/wpt/tests/tools/lint/commands.json | 15 +- tests/wpt/tests/tools/lint/lint.py | 37 +- tests/wpt/tests/tools/lint/rules.py | 17 + .../tests/tools/lint/tests/test_file_lints.py | 150 ++ tests/wpt/tests/tools/metadata/schema.py | 14 +- .../tools/metadata/webfeatures/__init__.py | 0 .../tools/metadata/webfeatures/schema.py | 86 + .../metadata/webfeatures/tests/__init__.py | 0 .../metadata/webfeatures/tests/test_schema.py | 91 + tests/wpt/tests/tools/requirements_tests.txt | 2 +- .../tools/webdriver/webdriver/bidi/error.py | 2 +- .../bidi/modules/browsing_context.py | 3 - tests/wpt/tests/tools/wpt/android.py | 50 + tests/wpt/tests/tools/wpt/commands.json | 3 +- .../tests/tools/wpt/requirements_android.txt | 1 + tests/wpt/tests/tools/wpt/run.py | 54 +- .../wptrunner/wptrunner/browsers/chrome.py | 2 +- .../wptrunner/wptrunner/executors/actions.py | 21 +- .../wptrunner/executors/executormarionette.py | 2 + .../wptrunner/executors/executorselenium.py | 3 + .../wptrunner/executors/executorwebdriver.py | 7 + .../wptrunner/wptrunner/executors/protocol.py | 11 +- .../wptrunner/wptrunner/testdriver-extra.js | 8 +- .../tools/wptrunner/wptrunner/testrunner.py | 2 +- .../tests/tools/wptserve/wptserve/server.py | 4 +- .../wpt/tests/web-animations/WEB_FEATURES.yml | 3 + .../interfaces/Animatable/animate.html | 6 +- .../interfaces/KeyframeEffect/target.html | 7 +- .../webauthn/conditional-mediation.https.html | 15 +- .../webcodecs/full-cycle-test.https.any.js | 1 + .../reconfiguring-encoder.https.any.js | 1 + .../tests/webdriver/tests/bidi/__init__.py | 24 +- .../browsing_context/locate_nodes/context.py | 73 + .../browsing_context/locate_nodes/invalid.py | 79 +- .../locate_nodes/max_node_count.py | 46 +- .../locate_nodes/ownership.py | 4 +- .../browsing_context/locate_nodes/sandbox.py | 12 +- .../locate_nodes/start_nodes.py | 140 +- .../webdriver/tests/bidi/network/conftest.py | 32 +- .../bidi/network/continue_with_auth/action.py | 148 ++ .../network/continue_with_auth/invalid.py | 40 + .../webdriver/tests/bidi/script/__init__.py | 20 - .../script/call_function/result_ownership.py | 2 +- .../tests/bidi/script/disown/handles.py | 2 +- .../tests/bidi/script/disown/target.py | 2 +- .../bidi/script/evaluate/result_ownership.py | 2 +- .../classic/element_send_keys/send_keys.py | 11 + .../support/http_handlers/authentication.py | 14 +- tests/wpt/tests/webhid/WEB_FEATURES.yml | 3 + .../broadcastchannel/WEB_FEATURES.yml | 3 + .../wpt/tests/webnn/arg_min_max.https.any.js | 10 + .../tests/webnn/gpu/arg_min_max.https.any.js | 10 + .../webnn/resources/test_data/arg_max.json | 919 +++++++++ .../webnn/resources/test_data/arg_min.json | 919 +++++++++ .../webnn/resources/test_data/expand.json | 949 +++++++++ .../webnn/resources/test_data/where.json | 1688 +++++++++++++++++ tests/wpt/tests/webnn/resources/utils.js | 11 + tests/wpt/tests/webtransport/WEB_FEATURES.yml | 3 + .../misc/texture-upload-size.html.ini | 12 + 279 files changed, 10825 insertions(+), 511 deletions(-) create mode 100644 tests/wpt/meta-legacy-layout/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/css-content/parsing/content-computed.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/css-content/parsing/content-valid.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/css-text/white-space/trailing-other-space-separators-break-spaces-008.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/css-transitions/render-blocking/no-transition-from-ua-to-blocking-stylesheet.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/cssom-view/offsetTop-offsetLeft-with-zoom.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/css/cssom-view/offsetTopLeft-border-box.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/selectors/has-style-sharing-007.html.ini create mode 100644 tests/wpt/meta-legacy-layout/dom/parts/dom-parts-valid-node-types.tentative.html.ini rename tests/wpt/{meta => meta-legacy-layout}/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini (100%) create mode 100644 tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini create mode 100644 tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini create mode 100644 tests/wpt/meta-legacy-layout/streams/readable-streams/crashtests/strategy-worker-terminate.html.ini rename tests/wpt/meta-legacy-layout/webmessaging/{with-ports => without-ports}/018.html.ini (100%) delete mode 100644 tests/wpt/meta-legacy-layout/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini create mode 100644 tests/wpt/meta/css/css-backgrounds/background-attachment-fixed-block-002.html.ini create mode 100644 tests/wpt/meta/css/css-backgrounds/background-attachment-fixed-inline-002.html.ini create mode 100644 tests/wpt/meta/css/css-backgrounds/background-attachment-local-inline-002.html.ini create mode 100644 tests/wpt/meta/css/css-color/animation/opacity-animation-ending-correctly-002.html.ini create mode 100644 tests/wpt/meta/css/css-content/parsing/content-computed.html.ini create mode 100644 tests/wpt/meta/css/css-content/parsing/content-valid.html.ini create mode 100644 tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini create mode 100644 tests/wpt/meta/css/cssom-view/offsetTop-offsetLeft-with-zoom.html.ini create mode 100644 tests/wpt/meta/css/selectors/has-style-sharing-007.html.ini create mode 100644 tests/wpt/meta/dom/parts/dom-parts-valid-node-types.tentative.html.ini delete mode 100644 tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini create mode 100644 tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini create mode 100644 tests/wpt/meta/html/browsers/browsing-the-web/read-media/pageload-image-in-popup.html.ini rename tests/wpt/{meta-legacy-layout => meta}/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini (100%) create mode 100644 tests/wpt/meta/html/rendering/widgets/button-layout/input-type-button-clip.html.ini create mode 100644 tests/wpt/meta/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html.ini create mode 100644 tests/wpt/meta/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini create mode 100644 tests/wpt/meta/webmessaging/without-ports/017.html.ini rename tests/wpt/meta/webmessaging/{with-ports => without-ports}/018.html.ini (100%) create mode 100644 tests/wpt/tests/accessibility/crashtests/aria-owns-from-aria-hidden-subtree.html create mode 100644 tests/wpt/tests/accessibility/crashtests/select-in-display-none.html create mode 100644 tests/wpt/tests/background-fetch/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/clipboard-apis/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/clipboard-apis/detached-iframe/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/clipboard-apis/permissions/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/clipboard-apis/text-write-read/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/credential-management/fedcm-too-many-disconnect-calls.https.html create mode 100644 tests/wpt/tests/credential-management/support/fedcm/disconnect_failure.py create mode 100644 tests/wpt/tests/credential-management/support/fedcm/manifest_with_cross_origin_disconnect.sub.json create mode 100644 tests/wpt/tests/credential-management/support/fedcm/manifest_with_disconnect_failure.json create mode 100644 tests/wpt/tests/css/css-anchor-position/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-anchor-position/chrome-1512373-2-crash.html create mode 100644 tests/wpt/tests/css/css-anchor-position/chrome-1512373-crash.html create mode 100644 tests/wpt/tests/css/css-backgrounds/background-attachment-fixed-block-002.html create mode 100644 tests/wpt/tests/css/css-backgrounds/background-attachment-fixed-inline-002.html create mode 100644 tests/wpt/tests/css/css-backgrounds/background-attachment-local-block-002.html create mode 100644 tests/wpt/tests/css/css-backgrounds/background-attachment-local-inline-002.html create mode 100644 tests/wpt/tests/css/css-backgrounds/reference/background-attachment-fixed-block-002-ref.html create mode 100644 tests/wpt/tests/css/css-backgrounds/reference/background-attachment-fixed-inline-002-ref.html create mode 100644 tests/wpt/tests/css/css-backgrounds/reference/background-attachment-local-block-002-ref.html create mode 100644 tests/wpt/tests/css/css-backgrounds/reference/background-attachment-local-inline-002-ref.html create mode 100644 tests/wpt/tests/css/css-break/flexbox/textarea-input-flex-items-in-multicol-crash.html create mode 100644 tests/wpt/tests/css/css-contain/contain-inline-size-grid-indefinite-height-min-height-flex-row.html create mode 100644 tests/wpt/tests/css/css-contain/contain-size-grid-indefinite-height-min-height-flex-row.html create mode 100644 tests/wpt/tests/css/css-contain/container-queries/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-contain/content-visibility/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-content/parsing/content-computed.html create mode 100644 tests/wpt/tests/css/css-content/parsing/content-invalid.html create mode 100644 tests/wpt/tests/css/css-content/parsing/content-valid.html create mode 100644 tests/wpt/tests/css/css-grid/animation/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-grid/grid-container-baseline-synthesized-001.html create mode 100644 tests/wpt/tests/css/css-grid/grid-container-baseline-synthesized-002.html create mode 100644 tests/wpt/tests/css/css-grid/grid-container-baseline-synthesized-003.html create mode 100644 tests/wpt/tests/css/css-grid/grid-container-baseline-synthesized-004.html create mode 100644 tests/wpt/tests/css/css-grid/masonry/tentative/masonry-not-inhibited-001-ref.html create mode 100644 tests/wpt/tests/css/css-grid/masonry/tentative/masonry-not-inhibited-001.html create mode 100644 tests/wpt/tests/css/css-grid/reference/grid-container-baseline-synthesized-001-ref.html create mode 100644 tests/wpt/tests/css/css-grid/subgrid/alignment-in-subgridded-axes-001.html create mode 100644 tests/wpt/tests/css/css-grid/subgrid/grid-gap-012-ref.html create mode 100644 tests/wpt/tests/css/css-grid/subgrid/grid-gap-012.html create mode 100644 tests/wpt/tests/css/css-images/image-set/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-inline/text-box-trim/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-masking/clip-path/clip-path-url-reference-svg-foreignobject-zoomed.html create mode 100644 tests/wpt/tests/css/css-masking/mask-image/mask-position-8.html create mode 100644 tests/wpt/tests/css/css-multicol/crashtests/inline-become-oof-container-make-oof-inflow.html create mode 100644 tests/wpt/tests/css/css-multicol/crashtests/relayout-fixedpos-in-abspos-in-relpos-in-nested-multicol.html create mode 100644 tests/wpt/tests/css/css-nesting/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-syntax/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-text/text-indent/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001-ref.html create mode 100644 tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html create mode 100644 tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html create mode 100644 tests/wpt/tests/css/css-variables/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-view-transitions/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/cssom-view/offsetTop-offsetLeft-with-zoom.html create mode 100644 tests/wpt/tests/css/selectors/has-style-sharing-007-ref.html create mode 100644 tests/wpt/tests/css/selectors/has-style-sharing-007.html create mode 100644 tests/wpt/tests/custom-elements/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/custom-state-pseudo-class/state-css-selector-shadow-dom.tentative.html create mode 100644 tests/wpt/tests/document-picture-in-picture/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/dom/parts/dom-parts-valid-node-types.tentative.html create mode 100644 tests/wpt/tests/fenced-frame/automatic-beacon-component-ad.https.html create mode 100644 tests/wpt/tests/fenced-frame/multiple-component-ads.https.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/html/rendering/widgets/button-layout/input-type-button-clip-ref.html create mode 100644 tests/wpt/tests/html/rendering/widgets/button-layout/input-type-button-clip.html create mode 100644 tests/wpt/tests/html/semantics/forms/the-select-element/show-picker-being-cv-hidden.html create mode 100644 tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/html/semantics/selectors/case-sensitivity/values.window.js create mode 100644 tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/set_get_window_rect.html.ini create mode 100644 tests/wpt/tests/infrastructure/testdriver/set_get_window_rect.html create mode 100644 tests/wpt/tests/intersection-observer/zoom-scaled-target.html create mode 100644 tests/wpt/tests/picture-in-picture/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/pointerevents/pointerevent_lostpointercapture_remove_setcapture_node.html create mode 100644 tests/wpt/tests/sanitizer-api/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/selection/caret/move-around-contenteditable-false.html create mode 100644 tests/wpt/tests/shadow-dom/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/soft-navigation-heuristics/softnav-painted-area-is-reset.tentative.html create mode 100644 tests/wpt/tests/svg/pservers/reftests/gradient-color-interpolation.svg create mode 100644 tests/wpt/tests/svg/pservers/reftests/reference/gradient-color-interpolation-ref.svg create mode 100644 tests/wpt/tests/tools/metadata/webfeatures/__init__.py create mode 100644 tests/wpt/tests/tools/metadata/webfeatures/schema.py create mode 100644 tests/wpt/tests/tools/metadata/webfeatures/tests/__init__.py create mode 100644 tests/wpt/tests/tools/metadata/webfeatures/tests/test_schema.py create mode 100644 tests/wpt/tests/tools/wpt/requirements_android.txt create mode 100644 tests/wpt/tests/web-animations/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/webdriver/tests/bidi/network/continue_with_auth/action.py create mode 100644 tests/wpt/tests/webhid/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/webmessaging/broadcastchannel/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/webnn/arg_min_max.https.any.js create mode 100644 tests/wpt/tests/webnn/gpu/arg_min_max.https.any.js create mode 100644 tests/wpt/tests/webnn/resources/test_data/arg_max.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/arg_min.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/expand.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/where.json create mode 100644 tests/wpt/tests/webtransport/WEB_FEATURES.yml diff --git a/tests/wpt/meta-legacy-layout/css/CSS2/linebox/inline-negative-margin-001.html.ini b/tests/wpt/meta-legacy-layout/css/CSS2/linebox/inline-negative-margin-001.html.ini index 5e3a96e5999..a057f038339 100644 --- a/tests/wpt/meta-legacy-layout/css/CSS2/linebox/inline-negative-margin-001.html.ini +++ b/tests/wpt/meta-legacy-layout/css/CSS2/linebox/inline-negative-margin-001.html.ini @@ -8,5 +8,8 @@ [[data-expected-height\] 3] expected: FAIL - [[data-expected-height\] 4] + [[data-expected-height\] 1] + expected: FAIL + + [[data-expected-height\] 2] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini new file mode 100644 index 00000000000..304b1579ca4 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini @@ -0,0 +1,2 @@ +[opacity-animation-ending-correctly-001.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/css/css-content/parsing/content-computed.html.ini b/tests/wpt/meta-legacy-layout/css/css-content/parsing/content-computed.html.ini new file mode 100644 index 00000000000..6d5b5bfc0ae --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-content/parsing/content-computed.html.ini @@ -0,0 +1,66 @@ +[content-computed.html] + [Property content value 'open-quote / "alt text"'] + expected: FAIL + + [Property content value 'close-quote / "alt text"'] + expected: FAIL + + [Property content value 'no-open-quote / "alt text"'] + expected: FAIL + + [Property content value 'no-close-quote / "alt text"'] + expected: FAIL + + [Property content value 'counter(counter-name) / "alt text"'] + expected: FAIL + + [Property content value 'counter(counter-name, counter-style)'] + expected: FAIL + + [Property content value 'counter(counter-name, counter-style) / "alt text"'] + expected: FAIL + + [Property content value 'counter(counter-name, dECiMaL) / "alt text"'] + expected: FAIL + + [Property content value 'counter(counter-name, DECIMAL) / "alt text"'] + expected: FAIL + + [Property content value 'counters(counter-name, ".") / "alt text"'] + expected: FAIL + + [Property content value 'counters(counter-name, ".", counter-style)'] + expected: FAIL + + [Property content value 'counters(counter-name, ".", counter-style) / "alt text"'] + expected: FAIL + + [Property content value 'counters(counter-name, ".", dECiMaL) / "alt text"'] + expected: FAIL + + [Property content value 'counters(counter-name, ".", DECIMAL) / "alt text"'] + expected: FAIL + + [Property content value 'url("https://www.example.com/picture.svg") / "alt text"'] + expected: FAIL + + [Property content value '"hello" / "alt text"'] + expected: FAIL + + [Property content value 'counter(counter-name) "potato" / "alt text"'] + expected: FAIL + + [Property content value 'counters(counter-name, ".") "potato" / "alt text"'] + expected: FAIL + + [Property content value '"(" counters(counter-name, ".", counter-style) ")"'] + expected: FAIL + + [Property content value '"(" counters(counter-name, ".", counter-style) ")" / "alt text"'] + expected: FAIL + + [Property content value 'open-quote "hello" "world" close-quote / "alt text"'] + expected: FAIL + + [Property content value 'url("https://www.example.com/picture.svg") "hello" / "alt text"'] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-content/parsing/content-valid.html.ini b/tests/wpt/meta-legacy-layout/css/css-content/parsing/content-valid.html.ini new file mode 100644 index 00000000000..ec3fb653e49 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-content/parsing/content-valid.html.ini @@ -0,0 +1,216 @@ +[content-valid.html] + [e.style['content'\] = "open-quote / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "open-quote / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "open-quote / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "close-quote / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "close-quote / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "close-quote / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "no-open-quote / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "no-open-quote / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "no-open-quote / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "no-close-quote / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "no-close-quote / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "no-close-quote / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "attr(alt) / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "attr(alt) / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "attr(alt) / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "attr(data-foo) / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "attr(data-foo) / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "attr(data-foo) / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name) / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name) / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name) / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name, counter-style)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name, counter-style) / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name, counter-style) / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name, counter-style) / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name, dECiMaL) / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name, dECiMaL) / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name, dECiMaL) / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name, DECIMAL) / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name, DECIMAL) / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name, DECIMAL) / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\") / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\") / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\") / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\", counter-style)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\", counter-style) / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\", counter-style) / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\", counter-style) / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\", dECiMaL) / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\", dECiMaL) / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\", dECiMaL) / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\", DECIMAL) / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\", DECIMAL) / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\", DECIMAL) / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "url(\\"https://www.example.com/picture.svg\\") / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "url(\\"https://www.example.com/picture.svg\\") / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "url(\\"https://www.example.com/picture.svg\\") / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"hello\\" / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"hello\\" / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"hello\\" / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"hello\\" \\"world\\" / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"hello\\" \\"world\\" / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"hello\\" \\"world\\" / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"hello\\" attr(alt) \\"world\\" / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"hello\\" attr(alt) \\"world\\" / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"hello\\" attr(alt) \\"world\\" / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name) \\"potato\\" / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name) \\"potato\\" / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counter(counter-name) \\"potato\\" / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\") \\"potato\\" / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\") \\"potato\\" / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "counters(counter-name, \\".\\") \\"potato\\" / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"(\\" counters(counter-name, \\".\\", counter-style) \\")\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"(\\" counters(counter-name, \\".\\", counter-style) \\")\\" / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"(\\" counters(counter-name, \\".\\", counter-style) \\")\\" / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "\\"(\\" counters(counter-name, \\".\\", counter-style) \\")\\" / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "open-quote \\"hello\\" \\"world\\" close-quote / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "open-quote \\"hello\\" \\"world\\" close-quote / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "open-quote \\"hello\\" \\"world\\" close-quote / attr(foo)" should set the property value] + expected: FAIL + + [e.style['content'\] = "url(\\"https://www.example.com/picture.svg\\") \\"hello\\" / \\"alt text\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "url(\\"https://www.example.com/picture.svg\\") \\"hello\\" / \\"alt text\\" attr(foo) \\"bar\\"" should set the property value] + expected: FAIL + + [e.style['content'\] = "url(\\"https://www.example.com/picture.svg\\") \\"hello\\" / attr(foo)" should set the property value] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-computed.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-computed.html.ini index f084a73611d..5aa68b9f2d9 100644 --- a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-computed.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-computed.html.ini @@ -34,3 +34,12 @@ [Property text-spacing value 'space-all no-autospace'] expected: FAIL + + [Property text-spacing value 'trim-start'] + expected: FAIL + + [Property text-spacing value 'no-autospace normal'] + expected: FAIL + + [Property text-spacing value 'normal no-autospace'] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-trim-computed.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-trim-computed.html.ini index 55f43aa1353..5fab60bb026 100644 --- a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-trim-computed.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-trim-computed.html.ini @@ -22,3 +22,9 @@ [Property text-spacing-trim value 'space-first allow-end'] expected: FAIL + + [Property text-spacing-trim value 'normal'] + expected: FAIL + + [Property text-spacing-trim value 'trim-start'] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-trim-valid.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-trim-valid.html.ini index dc325c5f4c5..48ded869ba1 100644 --- a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-trim-valid.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-trim-valid.html.ini @@ -22,3 +22,9 @@ [e.style['text-spacing-trim'\] = "space-first allow-end" should set the property value] expected: FAIL + + [e.style['text-spacing-trim'\] = "normal" should set the property value] + expected: FAIL + + [e.style['text-spacing-trim'\] = "trim-start" should set the property value] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-valid.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-valid.html.ini index 5e2575b4053..7b223b35219 100644 --- a/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-valid.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-text/parsing/text-spacing-valid.html.ini @@ -34,3 +34,12 @@ [e.style['text-spacing'\] = "space-all no-autospace" should set the property value] expected: FAIL + + [e.style['text-spacing'\] = "trim-start" should set the property value] + expected: FAIL + + [e.style['text-spacing'\] = "no-autospace normal" should set the property value] + expected: FAIL + + [e.style['text-spacing'\] = "normal no-autospace" should set the property value] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html.ini new file mode 100644 index 00000000000..bad56becd0b --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html.ini @@ -0,0 +1,11 @@ +[text-spacing-trim-space-first-wrap-001.html?class=chws,vrl] + expected: FAIL + +[text-spacing-trim-space-first-wrap-001.html?class=halt,htb] + expected: FAIL + +[text-spacing-trim-space-first-wrap-001.html?class=chws,htb] + expected: FAIL + +[text-spacing-trim-space-first-wrap-001.html?class=halt,vrl] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini new file mode 100644 index 00000000000..8c8ff980a52 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini @@ -0,0 +1,11 @@ +[text-spacing-trim-space-first-wrap-br-001.html?class=halt,htb] + expected: FAIL + +[text-spacing-trim-space-first-wrap-br-001.html?class=chws,vrl] + expected: FAIL + +[text-spacing-trim-space-first-wrap-br-001.html?class=halt,vrl] + expected: FAIL + +[text-spacing-trim-space-first-wrap-br-001.html?class=chws,htb] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html.ini deleted file mode 100644 index 98b57ffa091..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[text-spacing-trim-wrap-001.html?class=chws,vrl] - expected: FAIL - -[text-spacing-trim-wrap-001.html?class=halt,vrl] - expected: FAIL - -[text-spacing-trim-wrap-001.html?class=halt,htb] - expected: FAIL - -[text-spacing-trim-wrap-001.html?class=chws,htb] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/white-space/trailing-other-space-separators-break-spaces-008.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/white-space/trailing-other-space-separators-break-spaces-008.html.ini new file mode 100644 index 00000000000..f6bf6aa789e --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-text/white-space/trailing-other-space-separators-break-spaces-008.html.ini @@ -0,0 +1,2 @@ +[trailing-other-space-separators-break-spaces-008.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-transitions/render-blocking/no-transition-from-ua-to-blocking-stylesheet.html.ini b/tests/wpt/meta-legacy-layout/css/css-transitions/render-blocking/no-transition-from-ua-to-blocking-stylesheet.html.ini new file mode 100644 index 00000000000..e35a452a186 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-transitions/render-blocking/no-transition-from-ua-to-blocking-stylesheet.html.ini @@ -0,0 +1,2 @@ +[no-transition-from-ua-to-blocking-stylesheet.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini index 441914bc0c4..a08341d7a0f 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini @@ -52,3 +52,6 @@ [calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 4) should be used-value-equivalent to 8] expected: FAIL + + [calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 2) should be used-value-equivalent to 4] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index 314dca9c1f5..d52a3e77a70 100644 --- a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -1,3 +1,6 @@ [MediaQueryList-addListener-removeListener.html] [listeners are called when ") + + await bidi_session.browsing_context.navigate( + context=top_context["context"], url=page_url, wait="complete" + ) + + contexts = await bidi_session.browsing_context.get_tree(root=top_context["context"]) + iframe_context = contexts[0]["children"][0] + + result = await bidi_session.browsing_context.locate_nodes( + context=iframe_context["context"], + locator={"type": "css", "value": "#in-iframe"} + ) + + expected = [ + { + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"id": "in-iframe"}, + "childNodeCount": 1, + "localName": "div", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + } + } + ] + + recursive_compare(expected, result["nodes"]) diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/invalid.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/invalid.py index d549cf35de2..ff00de91ed0 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/invalid.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/invalid.py @@ -1,6 +1,8 @@ import pytest import webdriver.bidi.error as error +from webdriver.bidi.modules.script import ContextTarget + pytestmark = pytest.mark.asyncio @@ -47,7 +49,6 @@ async def test_params_locator_type_invalid_value(bidi_session, inline, top_conte @pytest.mark.parametrize("type,value", [ ("css", "a*b"), ("xpath", ""), - ("xpath", "invalid-xpath") ("innerText", "") ]) async def test_params_locator_value_invalid_value(bidi_session, inline, top_context, type, value): @@ -59,6 +60,15 @@ async def test_params_locator_value_invalid_value(bidi_session, inline, top_cont ) +async def test_params_locator_xpath_unknown_error(bidi_session, inline, top_context): + await navigate_to_page(bidi_session, inline, top_context) + + with pytest.raises(error.UnknownErrorException): + await bidi_session.browsing_context.locate_nodes( + context=top_context["context"], locator={"type": "xpath", "value": "/foo:bar"} + ) + + @pytest.mark.parametrize("value", [False, "string", 1.5, {}, []]) async def test_params_max_node_count_invalid_type(bidi_session, inline, top_context, value): await navigate_to_page(bidi_session, inline, top_context) @@ -148,6 +158,71 @@ async def test_params_start_nodes_empty_list(bidi_session, inline, top_context): with pytest.raises(error.InvalidArgumentException): await bidi_session.browsing_context.locate_nodes( context=top_context["context"], - locator={ "type": "invalid", "value": "div" }, + locator={ "type": "css", "value": "div" }, start_nodes=[] ) + + +@pytest.mark.parametrize( + "value", + [ + {"type": "number", "value": 3}, + {"type": "window"}, + {"type": "array", "value": ["test"]}, + { + "type": "object", + "value": [ + ["1", {"type": "string", "value": "foo"}], + ], + }, + ], +) +async def test_params_start_nodes_not_dom_node( + bidi_session, inline, top_context, value +): + await navigate_to_page(bidi_session, inline, top_context) + + if value["type"] == "window": + value["value"] = top_context["context"] + + with pytest.raises(error.InvalidArgumentException): + await bidi_session.browsing_context.locate_nodes( + context=top_context["context"], + locator={"type": "css", "value": "div"}, + start_nodes=[value], + ) + + +@pytest.mark.parametrize( + "expression", + [ + "document.querySelector('input#button').attributes[0]", + "document.querySelector('#with-text-node').childNodes[0]", + """document.createProcessingInstruction("xml-stylesheet", "href='foo.css'")""", + "document.querySelector('#with-comment').childNodes[0]", + "document.doctype", + "document.getElementsByTagName('div')", + "document.querySelectorAll('div')" + ], +) +async def test_params_start_nodes_dom_node_not_element( + bidi_session, inline, top_context, get_test_page, expression +): + await navigate_to_page(bidi_session, inline, top_context) + + await bidi_session.browsing_context.navigate( + context=top_context['context'], url=get_test_page(), wait="complete" + ) + + remote_reference = await bidi_session.script.evaluate( + expression=expression, + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + with pytest.raises(error.InvalidArgumentException): + await bidi_session.browsing_context.locate_nodes( + context=top_context["context"], + locator={"type": "css", "value": "div"}, + start_nodes=[remote_reference], + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/max_node_count.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/max_node_count.py index 9147fb31832..4652026e96f 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/max_node_count.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/max_node_count.py @@ -3,7 +3,7 @@ import pytest from ... import any_string, recursive_compare -@pytest.mark.parametrize("type,value,max,expected", [ +@pytest.mark.parametrize("type,value,max_count,expected", [ ("css", "div", 1, [ { "type": "node", @@ -124,7 +124,7 @@ from ... import any_string, recursive_compare "inner_text_multiple" ]) @pytest.mark.asyncio -async def test_find_by_css_limit_return_count(bidi_session, inline, top_context, type, value, max_count, expected): +async def test_find_by_locator_limit_return_count(bidi_session, inline, top_context, type, value, max_count, expected): url = inline("""
foo
foo
""") await bidi_session.browsing_context.navigate( context=top_context["context"], url=url, wait="complete" @@ -137,3 +137,45 @@ async def test_find_by_css_limit_return_count(bidi_session, inline, top_context, ) recursive_compare(expected, result["nodes"]) + + +@pytest.mark.asyncio +async def test_several_context_nodes(bidi_session, inline, top_context): + url = inline( + """ +
+
should be returned
+
+
+
should not be returned
+
should not be returned
+
should not be returned
+
should not be returned
+
should not be returned
+
should not be returned
+
should not be returned
+
should not be returned
+
should not be returned
+
+ """ + ) + await bidi_session.browsing_context.navigate( + context=top_context["context"], url=url, wait="complete" + ) + + result_context_nodes = await bidi_session.browsing_context.locate_nodes( + context=top_context["context"], + locator={"type": "css", "value": ".context-node"}, + ) + + result = await bidi_session.browsing_context.locate_nodes( + context=top_context["context"], + locator={"type": "css", "value": "div"}, + max_node_count=1, + start_nodes=[ + {"sharedId": result_context_nodes["nodes"][0]["sharedId"]}, + {"sharedId": result_context_nodes["nodes"][1]["sharedId"]}, + ], + ) + + assert len(result["nodes"]) == 1 diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/ownership.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/ownership.py index d5450ffc80c..b1830c740a9 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/ownership.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/ownership.py @@ -1,6 +1,6 @@ import pytest -from webdriver.bidi.modules.script import assert_handle +from ... import assert_handle @pytest.mark.parametrize("ownership,has_handle", [ @@ -20,7 +20,7 @@ async def test_root_ownership_of_located_nodes(bidi_session, inline, top_context ownership=ownership ) - assert result["nodes"].length == 1 + assert len(result["nodes"]) == 1 result_node = result["nodes"][0] assert_handle(result_node, has_handle) diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/sandbox.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/sandbox.py index 7f9cd9dfd85..efa431bf190 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/sandbox.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/sandbox.py @@ -22,7 +22,7 @@ async def test_locate_nodes_in_sandbox(bidi_session, inline, top_context): # Since the node was found in the sandbox, it should be available # to scripts running in the sandbox. result_in_sandbox = await bidi_session.script.call_function( - function_declaration="() => arguments[0]", + function_declaration="function(){ return arguments[0]; }", target=ContextTarget(top_context["context"], "sandbox"), await_promise=True, arguments=[ @@ -48,7 +48,6 @@ async def test_locate_same_node_in_different_sandboxes_returns_same_id(bidi_sess sandbox="first_sandbox" ) - assert first_result["context"] == top_context["context"] assert len(first_result["nodes"]) == 1 second_result = await bidi_session.browsing_context.locate_nodes( @@ -94,18 +93,17 @@ async def test_locate_same_node_in_different_sandboxes_with_root_ownership_retur first_result = await bidi_session.browsing_context.locate_nodes( context=top_context["context"], locator={ "type": "css", "value": "div[data-class='one']" }, - sandbox="first_sandbox", - ownership=OwnershipModel.ROOT + ownership=OwnershipModel.ROOT.value, + sandbox="first_sandbox" ) - assert first_result["context"] == top_context["context"] assert len(first_result["nodes"]) == 1 second_result = await bidi_session.browsing_context.locate_nodes( context=top_context["context"], locator={ "type": "css", "value": "div[data-class='one']" }, - sandbox="second_sandbox", - ownership=OwnershipModel.ROOT + ownership=OwnershipModel.ROOT.value, + sandbox="second_sandbox" ) assert len(second_result["nodes"]) == 1 diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/start_nodes.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/start_nodes.py index 3f46a50642c..707d83a337d 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/start_nodes.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/locate_nodes/start_nodes.py @@ -4,38 +4,14 @@ from webdriver.bidi.modules.script import ContextTarget from ... import any_string, recursive_compare -@pytest.mark.parametrize("type,value", [ - ("css", "div"), - ("xpath", "//div"), - ("innerText", "foo") -]) -@pytest.mark.asyncio -async def test_locate_with_context_nodes(bidi_session, inline, top_context, type, value): - url = inline("""

foo
foo

""") - await bidi_session.browsing_context.navigate( - context=top_context["context"], url=url, wait="complete" - ) - - context_nodes = await bidi_session.script.evaluate( - expression="""document.querySelector("p")""", - target=ContextTarget(top_context["context"]), - await_promise=True, - ) - - result = await bidi_session.browsing_context.locate_nodes( - context=top_context["context"], - locator={ "type": type, "value": value }, - start_nodes=[context_nodes] - ) - - expected = [ - { +@pytest.mark.parametrize("type,value,expected", [ + ("css", "p", [{ "type": "node", "sharedId": any_string, "value": { "attributes": {"data-class":"one"}, "childNodeCount": 1, - "localName": "div", + "localName": "p", "namespaceURI": "http://www.w3.org/1999/xhtml", "nodeType": 1, } @@ -46,33 +22,123 @@ async def test_locate_with_context_nodes(bidi_session, inline, top_context, type "value": { "attributes": {"data-class":"two"}, "childNodeCount": 1, - "localName": "div", + "localName": "p", "namespaceURI": "http://www.w3.org/1999/xhtml", "nodeType": 1, } - } - ] + }]), + ("css", "a span", [{ + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"id":"text"}, + "childNodeCount": 1, + "localName": "span", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + } + }]), + ("css", "#text", [{ + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"id":"text"}, + "childNodeCount": 1, + "localName": "span", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + } + }]), + ("xpath", "//p", [{ + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"data-class":"one"}, + "childNodeCount": 1, + "localName": "p", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + } + }, + { + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"data-class":"two"}, + "childNodeCount": 1, + "localName": "p", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + } + }]), + ("innerText", "foo", [{ + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"data-class":"one"}, + "childNodeCount": 1, + "localName": "p", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + } + }, + { + "type": "node", + "sharedId": any_string, + "value": { + "attributes": {"data-class":"two"}, + "childNodeCount": 1, + "localName": "p", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + } + }]) +]) +@pytest.mark.asyncio +async def test_locate_with_context_nodes(bidi_session, inline, top_context, type, value, expected): + url = inline("""
+

foo

+

foo

+ + bar + +
""") + await bidi_session.browsing_context.navigate( + context=top_context["context"], url=url, wait="complete" + ) + + context_nodes = await bidi_session.script.evaluate( + expression="""document.querySelector("div")""", + target=ContextTarget(top_context["context"]), + await_promise=True, + ) + + result = await bidi_session.browsing_context.locate_nodes( + context=top_context["context"], + locator={ "type": type, "value": value }, + start_nodes=[context_nodes] + ) recursive_compare(expected, result["nodes"]) @pytest.mark.parametrize("type,value", [ - ("css", "div[data-class='one']"), - ("xpath", ".//div[@data-class='one']"), + ("css", "p[data-class='one']"), + ("xpath", ".//p[@data-class='one']"), ("innerText", "foo") ]) @pytest.mark.asyncio async def test_locate_with_multiple_context_nodes(bidi_session, inline, top_context, type, value): url = inline(""" -

foo
bar

-

foo
bar

+

foo

bar

+

foo

bar

""") await bidi_session.browsing_context.navigate( context=top_context["context"], url=url, wait="complete" ) script_result = await bidi_session.script.evaluate( - expression="""document.querySelectorAll("p")""", + expression="""document.querySelectorAll("div")""", target=ContextTarget(top_context["context"]), await_promise=True, ) @@ -92,7 +158,7 @@ async def test_locate_with_multiple_context_nodes(bidi_session, inline, top_cont "value": { "attributes": {"data-class":"one"}, "childNodeCount": 1, - "localName": "div", + "localName": "p", "namespaceURI": "http://www.w3.org/1999/xhtml", "nodeType": 1, } @@ -103,7 +169,7 @@ async def test_locate_with_multiple_context_nodes(bidi_session, inline, top_cont "value": { "attributes": {"data-class":"one"}, "childNodeCount": 1, - "localName": "div", + "localName": "p", "namespaceURI": "http://www.w3.org/1999/xhtml", "nodeType": 1, } diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/conftest.py b/tests/wpt/tests/webdriver/tests/bidi/network/conftest.py index fb6dcc45dd7..184073a53ab 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/network/conftest.py +++ b/tests/wpt/tests/webdriver/tests/bidi/network/conftest.py @@ -33,7 +33,7 @@ async def add_intercept(bidi_session): for intercept in intercepts: try: await bidi_session.network.remove_intercept(intercept=intercept) - except (NoSuchInterceptException): + except NoSuchInterceptException: # Ignore exceptions in case a specific intercept was already removed # during the test. pass @@ -44,7 +44,10 @@ def fetch(bidi_session, top_context, configuration): """Perform a fetch from the page of the provided context, default to the top context. """ - async def fetch(url, method="GET", headers=None, context=top_context, timeout_in_seconds=3): + + async def fetch( + url, method="GET", headers=None, context=top_context, timeout_in_seconds=3 + ): method_arg = f"method: '{method}'," headers_arg = "" @@ -76,7 +79,12 @@ def fetch(bidi_session, top_context, configuration): @pytest_asyncio.fixture async def setup_network_test( - bidi_session, subscribe_events, wait_for_event, wait_for_future_safe, top_context, url + bidi_session, + subscribe_events, + wait_for_event, + wait_for_future_safe, + top_context, + url, ): """Navigate the current top level context to the provided url and subscribe to network.beforeRequestSent. @@ -131,12 +139,26 @@ async def setup_network_test( async def setup_blocked_request( setup_network_test, url, add_intercept, fetch, wait_for_event ): - async def setup_blocked_request(phase): + """Creates an intercept for the provided phase, sends a fetch request that + should be blocked by this intercept and resolves when the corresponding + event is received. + + For the "authRequired" phase, the request will be sent to the authentication + http handler. The optional arguments username, password and realm can be used + to configure the handler. + + Returns the `request` id of the intercepted request. + """ + + async def setup_blocked_request( + phase, username="user", password="password", realm="test" + ): await setup_network_test(events=[f"network.{phase}"]) if phase == "authRequired": blocked_url = url( - "/webdriver/tests/support/http_handlers/authentication.py?realm=testrealm" + "/webdriver/tests/support/http_handlers/authentication.py?" + f"username={username}&password={password}&realm={realm}" ) else: blocked_url = url(PAGE_EMPTY_TEXT) diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/continue_with_auth/action.py b/tests/wpt/tests/webdriver/tests/bidi/network/continue_with_auth/action.py new file mode 100644 index 00000000000..a122ce0e492 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/network/continue_with_auth/action.py @@ -0,0 +1,148 @@ +import pytest +import webdriver.bidi.error as error +from webdriver.bidi.modules.network import AuthCredentials +from webdriver.error import TimeoutException + +from tests.support.sync import AsyncPoll +from .. import ( + assert_response_event, + AUTH_REQUIRED_EVENT, + PAGE_EMPTY_TEXT, + RESPONSE_COMPLETED_EVENT, +) + +pytestmark = pytest.mark.asyncio + + +async def test_cancel( + setup_blocked_request, subscribe_events, wait_for_event, bidi_session, url +): + request = await setup_blocked_request("authRequired") + await subscribe_events(events=[RESPONSE_COMPLETED_EVENT]) + + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + await bidi_session.network.continue_with_auth(request=request, action="cancel") + await on_response_completed + + response_event = await on_response_completed + assert_response_event( + response_event, + expected_response={ + "status": 401, + "statusText": "Unauthorized", + }, + ) + + +async def test_default( + setup_blocked_request, subscribe_events, wait_for_event, bidi_session, url +): + request = await setup_blocked_request("authRequired") + + # Additionally subscribe to all network events + await subscribe_events(events=["network"]) + + # Track all received network.responseCompleted events in the events array + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener( + RESPONSE_COMPLETED_EVENT, on_event + ) + + # continueWithAuth using action "default" should show the authentication + # prompt and no new network event should be generated. + await bidi_session.network.continue_with_auth(request=request, action="default") + + wait = AsyncPoll(bidi_session, timeout=0.5) + with pytest.raises(TimeoutException): + await wait.until(lambda _: len(events) > 0) + + remove_listener() + + +async def test_provideCredentials( + setup_blocked_request, subscribe_events, bidi_session, url +): + # Setup unique username / password because browsers cache credentials. + username = "test_provideCredentials" + password = "test_provideCredentials_password" + request = await setup_blocked_request("authRequired", username=username, password=password) + + # Additionally subscribe to network.responseCompleted + await subscribe_events(events=[RESPONSE_COMPLETED_EVENT]) + + # Track all received network.responseCompleted events in the events array + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener( + RESPONSE_COMPLETED_EVENT, on_event + ) + + credentials = AuthCredentials(username=username, password=password) + await bidi_session.network.continue_with_auth( + request=request, action="provideCredentials", credentials=credentials + ) + + # TODO: At the moment, the specification does not expect to receive a + # responseCompleted event for each authentication attempt, so only assert + # the last event. See https://github.com/w3c/webdriver-bidi/issues/627 + + # Wait until a a responseCompleted event with status 200 OK is received. + wait = AsyncPoll(bidi_session, message="Didn't receive response completed events") + await wait.until(lambda _: len(events) > 0 and events[-1]["response"]["status"] == 200) + + remove_listener() + + +async def test_provideCredentials_wrong_credentials( + setup_blocked_request, subscribe_events, bidi_session, wait_for_event, url +): + # Setup unique username / password because browsers cache credentials. + username = "test_provideCredentials_wrong_credentials" + password = "test_provideCredentials_wrong_credentials_password" + request = await setup_blocked_request("authRequired", username=username, password=password) + + # Additionally subscribe to network.responseCompleted + await subscribe_events(events=[RESPONSE_COMPLETED_EVENT]) + + # Track all received network.responseCompleted events in the events array + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener( + RESPONSE_COMPLETED_EVENT, on_event + ) + + on_auth_required = wait_for_event(AUTH_REQUIRED_EVENT) + + wrong_credentials = AuthCredentials(username=username, password="wrong_password") + await bidi_session.network.continue_with_auth( + request=request, action="provideCredentials", credentials=wrong_credentials + ) + + # We expect to get another authRequired event after providing wrong credentials + await on_auth_required + + # Continue with the correct credentials + correct_credentials = AuthCredentials(username=username, password=password) + await bidi_session.network.continue_with_auth( + request=request, action="provideCredentials", credentials=correct_credentials + ) + + # TODO: At the moment, the specification does not expect to receive a + # responseCompleted event for each authentication attempt, so only assert + # the last event. See https://github.com/w3c/webdriver-bidi/issues/627 + + # Wait until a a responseCompleted event with status 200 OK is received. + wait = AsyncPoll(bidi_session, message="Didn't receive response completed events") + await wait.until(lambda _: len(events) > 0 and events[-1]["response"]["status"] == 200) + + remove_listener() diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/continue_with_auth/invalid.py b/tests/wpt/tests/webdriver/tests/bidi/network/continue_with_auth/invalid.py index ea188cbde88..dc21d0bc53c 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/network/continue_with_auth/invalid.py +++ b/tests/wpt/tests/webdriver/tests/bidi/network/continue_with_auth/invalid.py @@ -46,6 +46,46 @@ async def test_params_request_no_such_request( await bidi_session.network.continue_with_auth(request=request, action="cancel") +async def test_params_request_no_such_request_after_cancel( + setup_blocked_request, bidi_session, subscribe_events, wait_for_event +): + request = await setup_blocked_request("authRequired") + + await subscribe_events(events=[RESPONSE_COMPLETED_EVENT]) + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + + await bidi_session.network.continue_with_auth(request=request, action="cancel") + await on_response_completed + + with pytest.raises(error.NoSuchRequestException): + await bidi_session.network.continue_with_auth(request=request, action="cancel") + + +async def test_params_request_no_such_request_after_provideCredentials( + setup_blocked_request, bidi_session, subscribe_events, wait_for_event +): + # Setup unique username / password because browsers cache credentials. + username = "test_params_request_no_such_request_after_provideCredentials" + password = "test_params_request_no_such_request_after_provideCredentials_password" + request = await setup_blocked_request("authRequired", username=username, password=password) + + await subscribe_events(events=[RESPONSE_COMPLETED_EVENT]) + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + + credentials = { + "type": "password", + "username": username, + "password": password, + } + await bidi_session.network.continue_with_auth( + request=request, action="provideCredentials", credentials=credentials + ) + await on_response_completed + + with pytest.raises(error.NoSuchRequestException): + await bidi_session.network.continue_with_auth(request=request, action="cancel") + + @pytest.mark.parametrize("value", [None, False, 42, {}, []]) async def test_params_action_invalid_type(setup_blocked_request, bidi_session, value): request = await setup_blocked_request("authRequired") diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/script/__init__.py index 0f62fe44756..7feae91f27b 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/__init__.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/__init__.py @@ -5,26 +5,6 @@ from webdriver.bidi.modules.script import ContextTarget from .. import any_int, any_string, recursive_compare -def assert_handle(obj: Mapping[str, Any], should_contain_handle: bool) -> None: - if should_contain_handle: - assert "handle" in obj, f"Result should contain `handle`. Actual: {obj}" - assert isinstance(obj["handle"], str), f"`handle` should be a string, but was {type(obj['handle'])}" - - # Recursively check that handle is not found in any of the nested values. - if "value" in obj: - value = obj["value"] - if type(value) is list: - for v in value: - assert_handle(v, False) - - if type(value) is dict: - for v in value.values(): - assert_handle(v, False) - - else: - assert "handle" not in obj, f"Result should not contain `handle`. Actual: {obj}" - - def specific_error_response(expected_error: Mapping[str, Any]) -> Callable[[Any], None]: return lambda actual: recursive_compare( { diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result_ownership.py b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result_ownership.py index 84b8f776b45..6a96f87ad10 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result_ownership.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/result_ownership.py @@ -1,7 +1,7 @@ import pytest from webdriver.bidi.modules.script import ContextTarget, ScriptEvaluateResultException -from .. import assert_handle +from ... import assert_handle @pytest.mark.asyncio diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/disown/handles.py b/tests/wpt/tests/webdriver/tests/bidi/script/disown/handles.py index e1226463a5c..1dfa318cd18 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/disown/handles.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/disown/handles.py @@ -4,7 +4,7 @@ import webdriver.bidi.error as error from webdriver.bidi.modules.script import ContextTarget -from .. import assert_handle +from ... import assert_handle pytestmark = pytest.mark.asyncio diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/disown/target.py b/tests/wpt/tests/webdriver/tests/bidi/script/disown/target.py index 67d857a0414..bce956d06be 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/disown/target.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/disown/target.py @@ -4,7 +4,7 @@ import webdriver.bidi.error as error from webdriver.bidi.modules.script import ContextTarget, RealmTarget -from .. import assert_handle +from ... import assert_handle pytestmark = pytest.mark.asyncio diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result_ownership.py b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result_ownership.py index ab018699eb9..4a417532afb 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result_ownership.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/result_ownership.py @@ -1,7 +1,7 @@ import pytest from webdriver.bidi.modules.script import ContextTarget, ScriptEvaluateResultException -from .. import assert_handle +from ... import assert_handle @pytest.mark.asyncio diff --git a/tests/wpt/tests/webdriver/tests/classic/element_send_keys/send_keys.py b/tests/wpt/tests/webdriver/tests/classic/element_send_keys/send_keys.py index 92002f29457..7b25d65a1b1 100644 --- a/tests/wpt/tests/webdriver/tests/classic/element_send_keys/send_keys.py +++ b/tests/wpt/tests/webdriver/tests/classic/element_send_keys/send_keys.py @@ -119,3 +119,14 @@ def test_invalid_text_type(session, inline, value): response = element_send_keys(session, element, value) assert_error(response, "invalid argument") + + +def test_surrogates(session, inline): + session.url = inline("") + element = session.find.css("input", all=False) + + text = "🦥🍄" + response = element_send_keys(session, element, text) + assert_success(response) + + assert element.property("value") == text diff --git a/tests/wpt/tests/webdriver/tests/support/http_handlers/authentication.py b/tests/wpt/tests/webdriver/tests/support/http_handlers/authentication.py index d3c95a948f0..2526a5a4c2c 100644 --- a/tests/wpt/tests/webdriver/tests/support/http_handlers/authentication.py +++ b/tests/wpt/tests/webdriver/tests/support/http_handlers/authentication.py @@ -10,10 +10,18 @@ def basic_authentication(url, **kwargs): def main(request, response): - user = request.auth.username + username = request.auth.username password = request.auth.password - if user == b"user" and password == b"password": + expected_username = "user" + if b"username" in request.GET: + expected_username = request.GET.first(b"username") + + expected_password = "password" + if b"password" in request.GET: + expected_password = request.GET.first(b"password") + + if username == expected_username and password == expected_password: return b"Authentication done" realm = b"test" @@ -22,4 +30,4 @@ def main(request, response): return ((401, b"Unauthorized"), [(b"WWW-Authenticate", b'Basic realm="' + realm + b'"')], - b"Please login with credentials 'user' and 'password'") + f"Please login with credentials '{expected_username}' and '{expected_password}'") diff --git a/tests/wpt/tests/webhid/WEB_FEATURES.yml b/tests/wpt/tests/webhid/WEB_FEATURES.yml new file mode 100644 index 00000000000..7453658f782 --- /dev/null +++ b/tests/wpt/tests/webhid/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webhid + files: "**" diff --git a/tests/wpt/tests/webmessaging/broadcastchannel/WEB_FEATURES.yml b/tests/wpt/tests/webmessaging/broadcastchannel/WEB_FEATURES.yml new file mode 100644 index 00000000000..378ed57dc52 --- /dev/null +++ b/tests/wpt/tests/webmessaging/broadcastchannel/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: broadcast-channel + files: "**" diff --git a/tests/wpt/tests/webnn/arg_min_max.https.any.js b/tests/wpt/tests/webnn/arg_min_max.https.any.js new file mode 100644 index 00000000000..cff1d6a955c --- /dev/null +++ b/tests/wpt/tests/webnn/arg_min_max.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API argMin/Max operations +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-argminmax + +testWebNNOperation(['argMin', 'argMax'], buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/tests/webnn/gpu/arg_min_max.https.any.js b/tests/wpt/tests/webnn/gpu/arg_min_max.https.any.js new file mode 100644 index 00000000000..76092ea92e6 --- /dev/null +++ b/tests/wpt/tests/webnn/gpu/arg_min_max.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API argMin/Max operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-argminmax + +testWebNNOperation(['argMin', 'argMax'], buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/arg_max.json b/tests/wpt/tests/webnn/resources/test_data/arg_max.json new file mode 100644 index 00000000000..9af47a95894 --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/arg_max.json @@ -0,0 +1,919 @@ +{ + "tests": [ + { + "name": "argMax float32 1D tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 3 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 3 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 3 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 3 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 3 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.axes=[2]", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "name": "output", + "shape": [2, 1, 3], + "data": [ + 1, + 2, + 2, + 1, + 2, + 2 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.axes=[]", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "axes": [] + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 3], + "data": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1, 1], + "data": [ + 3 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 3 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.selectLastIndex=true", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "selectLastIndex": true + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 20 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.selectLastIndex=false", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "selectLastIndex": false + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 3 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.axes=[0, 2] options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2], + "keepDimensions": false + }, + "expected": { + "name": "output", + "shape": [1, 3], + "data": [ + 1, + 2, + 2 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.axes=[3, 0, 1] options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "axes": [3, 0, 1], + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 4, 1], + "data": [ + 2, + 0, + 2, + 1 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.axes=[0, 2] options.selectLastIndex=false", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2], + "selectLastIndex": false + }, + "expected": { + "name": "output", + "shape": [1, 3], + "data": [ + 1, + 2, + 2 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.axes=[0, 2] options.selectLastIndex=true", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2], + "selectLastIndex": true + }, + "expected": { + "name": "output", + "shape": [1, 3], + "data": [ + 5, + 6, + 6 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.axes=[3, 0, 1] options.selectLastIndex=false", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "axes": [3, 0, 1], + "selectLastIndex": false + }, + "expected": { + "name": "output", + "shape": [4], + "data": [ + 2, + 0, + 2, + 1 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor options.axes=[3, 0, 1] options.selectLastIndex=true", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "axes": [3, 0, 1], + "selectLastIndex": true + }, + "expected": { + "name": "output", + "shape": [4], + "data": [ + 5, + 3, + 5, + 4 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 4D tensor all options", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32" + } + }, + "options": { + "axes": [3, 0], + "keepDimensions": true, + "selectLastIndex": false + }, + "expected": { + "name": "output", + "shape": [1, 1, 4, 1], + "data": [ + 2, + 0, + 2, + 1 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 0D scalar options.axes=[]", + "inputs": { + "input": { + "shape": [], + "data": [ + -51.0936194154457 + ], + "type": "float32" + } + }, + "options": { + "axes": [] + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 0 + ], + "type": "int64" + } + }, + { + "name": "argMax float32 0D scalar options.axes=[] no effect by both keepDimensions and selectLastIndex being true", + "inputs": { + "input": { + "shape": [], + "data": [ + -51.0936194154457 + ], + "type": "float32" + } + }, + "options": { + "axes": [], + "keepDimensions": true, + "selectLastIndex": true + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 0 + ], + "type": "int64" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/arg_min.json b/tests/wpt/tests/webnn/resources/test_data/arg_min.json new file mode 100644 index 00000000000..dc0b5cdfd1a --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/arg_min.json @@ -0,0 +1,919 @@ +{ + "tests": [ + { + "name": "argMin float32 1D tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 7 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 7 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 7 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 7 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 7 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.axes=[2]", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "name": "output", + "shape": [2, 1, 3], + "data": [ + 2, + 2, + 0, + 0, + 0, + 0 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.axes=[]", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "axes": [] + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 3], + "data": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1, 1], + "data": [ + 7 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 7 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.selectLastIndex=true", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "selectLastIndex": true + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 19 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.selectLastIndex=false", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "selectLastIndex": false + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 7 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.axes=[0, 2] options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2], + "keepDimensions": false + }, + "expected": { + "name": "output", + "shape": [1, 3], + "data": [ + 2, + 2, + 4 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.axes=[3, 0, 1] options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "axes": [3, 0, 1], + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 4, 1], + "data": [ + 4, + 0, + 1, + 1 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.axes=[0, 2] options.selectLastIndex=false", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2], + "selectLastIndex": false + }, + "expected": { + "name": "output", + "shape": [1, 3], + "data": [ + 2, + 2, + 4 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.axes=[0, 2] options.selectLastIndex=true", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2], + "selectLastIndex": true + }, + "expected": { + "name": "output", + "shape": [1, 3], + "data": [ + 6, + 6, + 4 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.axes=[3, 0, 1] options.selectLastIndex=false", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "axes": [3, 0, 1], + "selectLastIndex": false + }, + "expected": { + "name": "output", + "shape": [4], + "data": [ + 4, + 0, + 1, + 1 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor options.axes=[3, 0, 1] options.selectLastIndex=true", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "axes": [3, 0, 1], + "selectLastIndex": true + }, + "expected": { + "name": "output", + "shape": [4], + "data": [ + 4, + 0, + 4, + 1 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 4D tensor all options", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32" + } + }, + "options": { + "axes": [3, 0], + "keepDimensions": true, + "selectLastIndex": false + }, + "expected": { + "name": "output", + "shape": [1, 1, 4, 1], + "data": [ + 4, + 0, + 1, + 1 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 0D scalar options.axes=[]", + "inputs": { + "input": { + "shape": [], + "data": [ + 3.830124090690262 + ], + "type": "float32" + } + }, + "options": { + "axes": [] + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 0 + ], + "type": "int64" + } + }, + { + "name": "argMin float32 0D scalar options.axes=[] no effect by both keepDimensions and selectLastIndex being true", + "inputs": { + "input": { + "shape": [], + "data": [ + 3.830124090690262 + ], + "type": "float32" + } + }, + "options": { + "axes": [], + "keepDimensions": true, + "selectLastIndex": true + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 0 + ], + "type": "int64" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/expand.json b/tests/wpt/tests/webnn/resources/test_data/expand.json new file mode 100644 index 00000000000..be56ca14890 --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/expand.json @@ -0,0 +1,949 @@ +{ + "tests": [ + { + "name": "expand float32 0D scalar to 1D", + "inputs": { + "input": { + "shape": [], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [24], + "expected": { + "name": "output", + "shape": [24], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 0D scalar to 2D", + "inputs": { + "input": { + "shape": [], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [4, 6], + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 0D scalar to 3D", + "inputs": { + "input": { + "shape": [], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [2, 3, 4], + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 0D scalar to 4D", + "inputs": { + "input": { + "shape": [], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [2, 2, 2, 3], + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 0D scalar to 5D", + "inputs": { + "input": { + "shape": [], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [2, 2, 3, 1, 2], + "expected": { + "name": "output", + "shape": [2, 2, 3, 1, 2], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 1D tensor to 1D", + "inputs": { + "input": { + "shape": [1], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [24], + "expected": { + "name": "output", + "shape": [24], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 1D tensor to 2D", + "inputs": { + "input": { + "shape": [1], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [4, 6], + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 1D tensor to 3D", + "inputs": { + "input": { + "shape": [1], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [2, 3, 4], + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 1D tensor to 4D", + "inputs": { + "input": { + "shape": [1], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [2, 2, 2, 3], + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 1D tensor to 5D", + "inputs": { + "input": { + "shape": [1], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [2, 2, 3, 1, 2], + "expected": { + "name": "output", + "shape": [2, 2, 3, 1, 2], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 2D tensor to 2D (1st dimension)", + "inputs": { + "input": { + "shape": [1, 6], + "data": [ + 10.898762702941895, + -29.391416549682617, + -73.74250793457031, + 22.456905364990234, + -97.5792465209961, + -76.95013427734375 + ], + "type": "float32" + } + }, + "newShape": [4, 6], + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 10.898762702941895, + -29.391416549682617, + -73.74250793457031, + 22.456905364990234, + -97.5792465209961, + -76.95013427734375, + 10.898762702941895, + -29.391416549682617, + -73.74250793457031, + 22.456905364990234, + -97.5792465209961, + -76.95013427734375, + 10.898762702941895, + -29.391416549682617, + -73.74250793457031, + 22.456905364990234, + -97.5792465209961, + -76.95013427734375, + 10.898762702941895, + -29.391416549682617, + -73.74250793457031, + 22.456905364990234, + -97.5792465209961, + -76.95013427734375 + ], + "type": "float32" + } + }, + { + "name": "expand float32 2D tensor to 2D (2nd dimension)", + "inputs": { + "input": { + "shape": [4, 1], + "data": [ + 4.965915679931641, + 66.14382934570312, + 75.28175354003906, + 49.998130798339844 + ], + "type": "float32" + } + }, + "newShape": [4, 6], + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 4.965915679931641, + 4.965915679931641, + 4.965915679931641, + 4.965915679931641, + 4.965915679931641, + 4.965915679931641, + 66.14382934570312, + 66.14382934570312, + 66.14382934570312, + 66.14382934570312, + 66.14382934570312, + 66.14382934570312, + 75.28175354003906, + 75.28175354003906, + 75.28175354003906, + 75.28175354003906, + 75.28175354003906, + 75.28175354003906, + 49.998130798339844, + 49.998130798339844, + 49.998130798339844, + 49.998130798339844, + 49.998130798339844, + 49.998130798339844 + ], + "type": "float32" + } + }, + { + "name": "expand float32 2D tensor to 2D (all dimensions)", + "inputs": { + "input": { + "shape": [1, 1], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [4, 6], + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 2D tensor to 3D", + "inputs": { + "input": { + "shape": [4, 1], + "data": [ + 4.965915679931641, + 66.14382934570312, + 75.28175354003906, + 49.998130798339844 + ], + "type": "float32" + } + }, + "newShape": [2, 4, 3], + "expected": { + "name": "output", + "shape": [2, 4, 3], + "data": [ + 4.965915679931641, + 4.965915679931641, + 4.965915679931641, + 66.14382934570312, + 66.14382934570312, + 66.14382934570312, + 75.28175354003906, + 75.28175354003906, + 75.28175354003906, + 49.998130798339844, + 49.998130798339844, + 49.998130798339844, + 4.965915679931641, + 4.965915679931641, + 4.965915679931641, + 66.14382934570312, + 66.14382934570312, + 66.14382934570312, + 75.28175354003906, + 75.28175354003906, + 75.28175354003906, + 49.998130798339844, + 49.998130798339844, + 49.998130798339844 + ], + "type": "float32" + } + }, + { + "name": "expand float32 2D tensor to 4D", + "inputs": { + "input": { + "shape": [1, 6], + "data": [ + 10.898762702941895, + -29.391416549682617, + -73.74250793457031, + 22.456905364990234, + -97.5792465209961, + -76.95013427734375 + ], + "type": "float32" + } + }, + "newShape": [2, 1, 2, 6], + "expected": { + "name": "output", + "shape": [2, 1, 2, 6], + "data": [ + 10.898762702941895, + -29.391416549682617, + -73.74250793457031, + 22.456905364990234, + -97.5792465209961, + -76.95013427734375, + 10.898762702941895, + -29.391416549682617, + -73.74250793457031, + 22.456905364990234, + -97.5792465209961, + -76.95013427734375, + 10.898762702941895, + -29.391416549682617, + -73.74250793457031, + 22.456905364990234, + -97.5792465209961, + -76.95013427734375, + 10.898762702941895, + -29.391416549682617, + -73.74250793457031, + 22.456905364990234, + -97.5792465209961, + -76.95013427734375 + ], + "type": "float32" + } + }, + { + "name": "expand float32 2D tensor to 5D", + "inputs": { + "input": { + "shape": [1, 1], + "data": [ + -6.461850643157959 + ], + "type": "float32" + } + }, + "newShape": [2, 1, 3, 2, 2], + "expected": { + "name": "output", + "shape": [2, 1, 3, 2, 2], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { + "name": "expand float32 3D tensor to 3D", + "inputs": { + "input": { + "shape": [1, 2, 1], + "data": [ + 21.694129943847656, + -72.82571411132812 + ], + "type": "float32" + } + }, + "newShape": [2, 2, 6], + "expected": { + "name": "output", + "shape": [2, 2, 6], + "data": [ + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812 + ], + "type": "float32" + } + }, + { + "name": "expand float32 3D tensor to 4D", + "inputs": { + "input": { + "shape": [1, 2, 1], + "data": [ + 21.694129943847656, + -72.82571411132812 + ], + "type": "float32" + } + }, + "newShape": [2, 2, 2, 3], + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812 + ], + "type": "float32" + } + }, + { + "name": "expand float32 3D tensor to 5D", + "inputs": { + "input": { + "shape": [1, 2, 1], + "data": [ + 21.694129943847656, + -72.82571411132812 + ], + "type": "float32" + } + }, + "newShape": [2, 1, 2, 2, 3], + "expected": { + "name": "output", + "shape": [2, 1, 2, 2, 3], + "data": [ + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812, + 21.694129943847656, + 21.694129943847656, + 21.694129943847656, + -72.82571411132812, + -72.82571411132812, + -72.82571411132812 + ], + "type": "float32" + } + }, + { + "name": "expand float32 4D tensor to 4D", + "inputs": { + "input": { + "shape": [2, 1, 1, 1], + "data": [ + 12.799123764038086, + -26.550199508666992 + ], + "type": "float32" + } + }, + "newShape": [2, 3, 2, 2], + "expected": { + "name": "output", + "shape": [2, 3, 2, 2], + "data": [ + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992 + ], + "type": "float32" + } + }, + { + "name": "expand float32 4D tensor to 5D", + "inputs": { + "input": { + "shape": [2, 1, 1, 1], + "data": [ + 12.799123764038086, + -26.550199508666992 + ], + "type": "float32" + } + }, + "newShape": [2, 2, 3, 1, 2], + "expected": { + "name": "output", + "shape": [2, 2, 3, 1, 2], + "data": [ + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + 12.799123764038086, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992, + -26.550199508666992 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/where.json b/tests/wpt/tests/webnn/resources/test_data/where.json new file mode 100644 index 00000000000..ce3cda4bad3 --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/where.json @@ -0,0 +1,1688 @@ +{ + "tests": [ + { + "name": "where float32 0D scalars", + "inputs": { + "condition": { + "shape": [], + "data": [ + 247 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [], + "data": [ + -22.83924102783203 + ], + "type": "float32" + }, + "falseValues": { + "shape": [], + "data": [ + -50.02232360839844 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + -22.83924102783203 + ], + "type": "float32" + } + }, + { + "name": "where float32 1D tensors", + "inputs": { + "condition": { + "shape": [24], + "data": [ + 241, + 0, + 85, + 0, + 227, + 51, + 202, + 0, + 104, + 227, + 129, + 129, + 175, + 134, + 130, + 140, + 103, + 46, + 158, + 17, + 0, + 41, + 94, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [24], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [24], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 70.27151489257812, + 66.7642593383789, + -1.5351932048797607, + -21.683168411254883, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + 65.5730209350586, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + 18.877336502075195, + -23.302522659301758, + 30.851404190063477, + -75.41789245605469 + ], + "type": "float32" + } + }, + { + "name": "where float32 2D tensors", + "inputs": { + "condition": { + "shape": [4, 6], + "data": [ + 241, + 0, + 85, + 0, + 227, + 51, + 202, + 0, + 104, + 227, + 129, + 129, + 175, + 134, + 130, + 140, + 103, + 46, + 158, + 17, + 0, + 41, + 94, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [4, 6], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [4, 6], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape":[4, 6], + "data": [ + 70.27151489257812, + 66.7642593383789, + -1.5351932048797607, + -21.683168411254883, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + 65.5730209350586, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + 18.877336502075195, + -23.302522659301758, + 30.851404190063477, + -75.41789245605469 + ], + "type": "float32" + } + }, + { + "name": "where float32 3D tensors", + "inputs": { + "condition": { + "shape": [2, 3, 4], + "data": [ + 241, + 0, + 85, + 0, + 227, + 51, + 202, + 0, + 104, + 227, + 129, + 129, + 175, + 134, + 130, + 140, + 103, + 46, + 158, + 17, + 0, + 41, + 94, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 3, 4], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 3, 4], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 70.27151489257812, + 66.7642593383789, + -1.5351932048797607, + -21.683168411254883, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + 65.5730209350586, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + 18.877336502075195, + -23.302522659301758, + 30.851404190063477, + -75.41789245605469 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors", + "inputs": { + "condition": { + "shape": [2, 2, 2, 3], + "data": [ + 241, + 0, + 85, + 0, + 227, + 51, + 202, + 0, + 104, + 227, + 129, + 129, + 175, + 134, + 130, + 140, + 103, + 46, + 158, + 17, + 0, + 41, + 94, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 2, 3], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 66.7642593383789, + -1.5351932048797607, + -21.683168411254883, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + 65.5730209350586, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + 18.877336502075195, + -23.302522659301758, + 30.851404190063477, + -75.41789245605469 + ], + "type": "float32" + } + }, + { + "name": "where float32 5D tensors", + "inputs": { + "condition": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 241, + 0, + 85, + 0, + 227, + 51, + 202, + 0, + 104, + 227, + 129, + 129, + 175, + 134, + 130, + 140, + 103, + 46, + 158, + 17, + 0, + 41, + 94, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 1, 2, 3], + "data": [ + 70.27151489257812, + 66.7642593383789, + -1.5351932048797607, + -21.683168411254883, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + 65.5730209350586, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + 18.877336502075195, + -23.302522659301758, + 30.851404190063477, + -75.41789245605469 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors only broadcast condition 0D to 4D", + "inputs": { + "condition": { + "shape": [], + "data": [ + 247 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 2, 3], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors only broadcast condition 1D to 4D", + "inputs": { + "condition": { + "shape": [3], + "data": [ + 253, + 222, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 2, 3], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -39.82423782348633, + -83.77035522460938, + 29.59670639038086, + -46.46003341674805, + -6.663239002227783, + -83.15333557128906, + 35.14354705810547, + -45.470706939697266, + 50.38861083984375, + 60.741416931152344, + 47.503013610839844, + -21.95842933654785, + 34.315250396728516, + -76.8262710571289, + 67.0030746459961, + 91.12223052978516, + -29.081029891967773, + -12.19106674194336, + 18.877336502075195, + -23.302522659301758, + 30.851404190063477, + -75.41789245605469 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors only broadcast condition 2D to 4D", + "inputs": { + "condition": { + "shape": [2, 1], + "data": [ + 103, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 2, 3], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors only broadcast condition 3D to 4D", + "inputs": { + "condition": { + "shape": [1, 2, 3], + "data": [ + 235, + 0, + 93, + 213, + 0, + 117 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 2, 3], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 66.7642593383789, + -1.5351932048797607, + -83.77035522460938, + -67.3449478149414, + -37.10446548461914, + -6.663239002227783, + 65.5730209350586, + -90.47624206542969, + -45.470706939697266, + 76.65287780761719, + 46.510799407958984, + 47.503013610839844, + -30.397233963012695, + 42.89878463745117, + -76.8262710571289, + -82.2353286743164, + 40.09717559814453, + -29.081029891967773, + 74.97810363769531, + -10.8577880859375, + -23.302522659301758, + 48.867103576660156, + -58.82704544067383 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors only broadcast condition 4D to 4D", + "inputs": { + "condition": { + "shape": [1, 2, 2, 1], + "data": [ + 0, + 165, + 0, + 90 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 2, 3], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors only broadcast trueValues 2D to 4D", + "inputs": { + "condition": { + "shape": [2, 2, 2, 3], + "data": [ + 241, + 0, + 85, + 0, + 227, + 51, + 202, + 0, + 104, + 227, + 129, + 129, + 175, + 134, + 130, + 140, + 103, + 46, + 158, + 17, + 0, + 41, + 94, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 3], + "data": [ + 38.77214050292969, + 18.20477294921875, + -11.542049407958984, + -82.74693298339844, + -18.61202621459961, + -75.77534484863281 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 2, 3], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 38.77214050292969, + 66.7642593383789, + -11.542049407958984, + -21.683168411254883, + -18.61202621459961, + -75.77534484863281, + 38.77214050292969, + 65.5730209350586, + -11.542049407958984, + -82.74693298339844, + -18.61202621459961, + -75.77534484863281, + 38.77214050292969, + 18.20477294921875, + -11.542049407958984, + -82.74693298339844, + -18.61202621459961, + -75.77534484863281, + 38.77214050292969, + 18.20477294921875, + 18.877336502075195, + -82.74693298339844, + -18.61202621459961, + -75.41789245605469 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors only broadcast trueValues 4D to 4D", + "inputs": { + "condition": { + "shape": [2, 2, 2, 3], + "data": [ + 241, + 0, + 85, + 0, + 227, + 51, + 202, + 0, + 104, + 227, + 129, + 129, + 175, + 134, + 130, + 140, + 103, + 46, + 158, + 17, + 0, + 41, + 94, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 2, 1, 1], + "data": [ + -29.164173126220703, + 32.200286865234375, + -6.146966457366943, + -24.822790145874023 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 2, 3], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -29.164173126220703, + 66.7642593383789, + -29.164173126220703, + -21.683168411254883, + -29.164173126220703, + -29.164173126220703, + 32.200286865234375, + 65.5730209350586, + 32.200286865234375, + 32.200286865234375, + 32.200286865234375, + 32.200286865234375, + -6.146966457366943, + -6.146966457366943, + -6.146966457366943, + -6.146966457366943, + -6.146966457366943, + -6.146966457366943, + -24.822790145874023, + -24.822790145874023, + 18.877336502075195, + -24.822790145874023, + -24.822790145874023, + -75.41789245605469 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors only broadcast falseValues 3D to 4D", + "inputs": { + "condition": { + "shape": [2, 2, 2, 3], + "data": [ + 241, + 0, + 85, + 0, + 227, + 51, + 202, + 0, + 104, + 227, + 129, + 129, + 175, + 134, + 130, + 140, + 103, + 46, + 158, + 17, + 0, + 41, + 94, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 1], + "data": [ + -86.59848022460938, + -67.72773742675781, + -30.731334686279297, + -93.49223327636719 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + -86.59848022460938, + -1.5351932048797607, + -67.72773742675781, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -30.731334686279297, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -30.731334686279297, + -23.302522659301758, + 30.851404190063477, + -93.49223327636719 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors only broadcast falseValues 4D to 4D", + "inputs": { + "condition": { + "shape": [2, 2, 2, 3], + "data": [ + 241, + 0, + 85, + 0, + 227, + 51, + 202, + 0, + 104, + 227, + 129, + 129, + 175, + 134, + 130, + 140, + 103, + 46, + 158, + 17, + 0, + 41, + 94, + 0 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32" + }, + "falseValues": { + "shape": [1, 2, 1, 3], + "data": [ + 17.777414321899414, + -1.9890096187591553, + -57.28207015991211, + -80.01390838623047, + 66.87323760986328, + -31.328258514404297 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 70.27151489257812, + -1.9890096187591553, + -1.5351932048797607, + 17.777414321899414, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + 66.87323760986328, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -31.328258514404297, + -23.302522659301758, + 30.851404190063477, + -31.328258514404297 + ], + "type": "float32" + } + }, + { + "name": "where float32 4D tensors all broadcast 4D", + "inputs": { + "condition": { + "shape": [2, 1, 1, 1], + "data": [ + 58, + 217 + ], + "type": "uint8" + }, + "trueValues": { + "shape": [2, 3], + "data": [ + 38.77214050292969, + 18.20477294921875, + -11.542049407958984, + -82.74693298339844, + -18.61202621459961, + -75.77534484863281 + ], + "type": "float32" + }, + "falseValues": { + "shape": [2, 2, 1], + "data":[ + -86.59848022460938, + -67.72773742675781, + -30.731334686279297, + -93.49223327636719 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 38.77214050292969, + 18.20477294921875, + -11.542049407958984, + -82.74693298339844, + -18.61202621459961, + -75.77534484863281, + 38.77214050292969, + 18.20477294921875, + -11.542049407958984, + -82.74693298339844, + -18.61202621459961, + -75.77534484863281, + 38.77214050292969, + 18.20477294921875, + -11.542049407958984, + -82.74693298339844, + -18.61202621459961, + -75.77534484863281, + 38.77214050292969, + 18.20477294921875, + -11.542049407958984, + -82.74693298339844, + -18.61202621459961, + -75.77534484863281 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/utils.js b/tests/wpt/tests/webnn/resources/utils.js index c3b10a70201..0e2687ec22b 100644 --- a/tests/wpt/tests/webnn/resources/utils.js +++ b/tests/wpt/tests/webnn/resources/utils.js @@ -12,6 +12,7 @@ const TypedArrayDict = { uint32: Uint32Array, int8: Int8Array, uint8: Uint8Array, + int64: BigInt64Array, }; const getTypedArrayData = (type, data) => { @@ -22,6 +23,11 @@ const getTypedArrayData = (type, data) => { for (let i = 0; i < data.length; i++) { outData[i] = toHalf(data[i]); } + } else if (type === 'int64') { + outData = new TypedArrayDict[type](data.length); + for (let i = 0; i < data.length; i++) { + outData[i] = BigInt(data[i]); + } } else { outData = new TypedArrayDict[type](data); } @@ -280,6 +286,8 @@ const getReductionPrecisionTolerance = (resources, operationName) => { // Refer to precision metrics on https://github.com/webmachinelearning/webnn/issues/265#issuecomment-1256242643 const PrecisionMetrics = { + argMax: {ULP: {int64: 0}}, + argMin: {ULP: {int64: 0}}, batchNormalization: {ULP: {float32: 6, float16: 6}}, clamp: {ULP: {float32: 0, float16: 0}}, concat: {ULP: {float32: 0, float16: 0}}, @@ -428,6 +436,9 @@ const assert_array_approx_equals_ulp = (actual, expected, nulp, dataType, descri actualBitwise = actual[i]; // convert expected data of Float16 to Uint16 expectedBitwise = toHalf(expected[i]); + } else if (dataType === 'int64') { + actualBitwise = actual[i]; + expectedBitwise = BigInt(expected[i]); } distance = actualBitwise - expectedBitwise; distance = distance >= 0 ? distance : -distance; diff --git a/tests/wpt/tests/webtransport/WEB_FEATURES.yml b/tests/wpt/tests/webtransport/WEB_FEATURES.yml new file mode 100644 index 00000000000..057d226047c --- /dev/null +++ b/tests/wpt/tests/webtransport/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webtransport + files: "**" diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini index 9a7eb8a7235..2208f9c110d 100644 --- a/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini +++ b/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini @@ -100,3 +100,15 @@ [WebGL test #66: Texture was smaller than the expected size 0x0] expected: FAIL + + [WebGL test #70: Texture was smaller than the expected size 0x0] + expected: FAIL + + [WebGL test #74: Texture was smaller than the expected size 0x0] + expected: FAIL + + [WebGL test #78: Texture was smaller than the expected size 0x0] + expected: FAIL + + [WebGL test #82: Texture was smaller than the expected size 0x0] + expected: FAIL