From 914fe64fc72462f3af743d9d1ff26781d9fecec3 Mon Sep 17 00:00:00 2001 From: Servo WPT Sync <32481905+servo-wpt-sync@users.noreply.github.com> Date: Wed, 6 Dec 2023 12:45:20 -0500 Subject: [PATCH] Sync WPT with upstream (03-12-2023) (#30814) * Update web-platform-tests to revision b'dd47ca67f55ac9df45235b2335200fb885dd1357' * Update test expectations --------- Co-authored-by: Martin Robinson --- .../blocks/align-content-table-cell.html.ini | 15 + .../animate-with-color-mix.html.ini | 18 + ...color-computed-color-mix-function.html.ini | 6 + .../animate-with-color-mix.html.ini | 18 + .../minmax-length-percent-serialize.html.ini | 5 + .../css/css-values/signed-zero.html.ini | 486 + .../css-values/signs-abs-computed.html.ini | 3 + ...SSStyleSheet-constructable-concat.html.ini | 2 +- .../HTMLLinkElement-load-event-002.html.ini | 2 +- .../webkit-transition-end-event.html.ini | 14 +- .../dom/ranges/Range-cloneContents.html.ini | 2 + .../dom/ranges/Range-deleteContents.html.ini | 2 + .../dom/ranges/Range-extractContents.html.ini | 2 + .../dom/ranges/Range-insertNode.html.ini | 2 + .../ranges/Range-surroundContents.html.ini | 2 + .../dom/xslt/large-cdata.html.ini | 2 + .../css-images.sub.tentative.html.ini | 6 - .../anchor.tentative.https.window.js.ini | 66 + .../anchor.tentative.window.js.ini | 15 + .../iframe.tentative.https.window.js.ini | 30 + .../window-open.tentative.https.window.js.ini | 68 + ...c-aboutblank-navigate-immediately.html.ini | 3 + ...eshow-events-iframe-contentWindow.html.ini | 6 + ...url-return-value-handling-dynamic.html.ini | 12 - .../close-method.window.js.ini | 4 + .../embedded-opener-remove-frame.html.ini | 4 +- .../layers/2d.layer.nested-filters.html.ini | 2 + ...yer.css-filters.blur-and-shadow.w.html.ini | 2 + .../2d.layer.css-filters.blur.w.html.ini | 2 + .../2d.layer.css-filters.shadow.w.html.ini | 2 + .../layers/2d.layer.css-filters.w.html.ini | 2 + .../layers/2d.layer.nested-filters.html.ini | 2 + .../layers/2d.layer.nested-filters.w.html.ini | 2 + .../html/dom/idlharness.https.html.ini | 6 + ...nitiator-is-not-opener.https.window.js.ini | 3 +- .../document-with-fragment-valid.html.ini | 4 - .../images/img-sizes-auto.html.ini | 2 + .../iframe-loading-lazy.html.ini | 1 + .../iframe_sandbox_popups_escaping-3.html.ini | 1 + ...rame_sandbox_popups_nonescaping-1.html.ini | 3 +- ...rame_sandbox_popups_nonescaping-2.html.ini | 1 - ...rame_sandbox_popups_nonescaping-3.html.ini | 3 +- .../non-active-document.html.ini | 3 - .../sizes/sizes-auto-rendering-2.html.ini | 2 + .../sizes-auto-rendering-dynamic.html.ini | 2 + .../the-img-element/sizes/sizes-auto.html.ini | 60 + .../urlencoded2.window.js.ini | 6 + .../defer-script/async-script.html.ini | 4 + .../module-tla-delayed.html.ini | 3 + ...Document-parseHTMLUnsafe-encoding.html.ini | 2 + ...arseHTMLUnsafe-encoding.tentative.html.ini | 2 - ...t-parseHTMLUnsafe-style-attribute.html.ini | 2 + ...LUnsafe-style-attribute.tentative.html.ini | 2 - ...rseHTMLUnsafe-url-base-pushstate.html.ini} | 2 +- ...safe-url-base-pushstate.tentative.html.ini | 18 - ...ocument-parseHTMLUnsafe-url-base.html.ini} | 2 +- ...nt-parseHTMLUnsafe-url-moretests.html.ini} | 2 +- ...nt-parseHTMLUnsafe-url-pushstate.html.ini} | 2 +- ...TMLUnsafe-url-pushstate.tentative.html.ini | 18 - ... => Document-parseHTMLUnsafe-url.html.ini} | 2 +- .../Document-parseHTMLUnsafe.html.ini | 2 + ...ocument-parseHTMLUnsafe.tentative.html.ini | 2 - .../Element-setHTMLUnsafe-04.html.ini} | 2 +- .../setHTMLUnsafe-CEReactions.html.ini | 6 + .../setHTMLUnsafe-xml.html.ini | 6 + .../setHTMLUnsafe.html.ini} | 2 +- .../content-type-parsing.html.ini | 4 +- .../sub-sample-buffer-stitching.html.ini | 5 + .../webmessaging/without-ports}/018.html.ini | 0 .../Worker/Worker-constructor.html.ini | 2 + tests/wpt/meta/MANIFEST.json | 1745 +- .../inline-negative-margin-001.html.ini | 9 +- .../blocks/align-content-table-cell.html.ini | 21 + .../animate-with-color-mix.html.ini | 18 + ...color-computed-color-mix-function.html.ini | 6 + .../at-font-face-font-matching.html.ini | 62 +- .../animate-with-color-mix.html.ini | 18 + .../minmax-length-percent-serialize.html.ini | 6 + .../meta/css/css-values/signed-zero.html.ini | 486 + .../css-values/signs-abs-computed.html.ini | 3 + ...QueryList-addListener-handleEvent.html.ini | 3 + ...ryList-addListener-removeListener.html.ini | 3 + ...ediaQueryList-extends-EventTarget.html.ini | 10 + ...SSStyleSheet-constructable-concat.html.ini | 2 +- .../HTMLLinkElement-load-event-002.html.ini | 2 +- .../webkit-transition-end-event.html.ini | 9 +- .../dom/ranges/Range-cloneContents.html.ini | 2 + .../dom/ranges/Range-deleteContents.html.ini | 2 + .../dom/ranges/Range-extractContents.html.ini | 2 + .../meta/dom/ranges/Range-insertNode.html.ini | 2 + .../ranges/Range-surroundContents.html.ini | 2 + tests/wpt/meta/dom/xslt/large-cdata.html.ini | 2 + ...lement-img-environment-change.sub.html.ini | 7 +- .../anchor.tentative.https.window.js.ini | 66 + .../anchor.tentative.window.js.ini | 15 + .../iframe.tentative.https.window.js.ini | 30 + .../window-open.tentative.https.window.js.ini | 68 + .../load-pageshow-events-window-open.html.ini | 3 + ...avigation-unload-same-origin.window.js.ini | 3 - ...ml.ini => traverse_the_history_5.html.ini} | 2 +- .../close-method.window.js.ini | 4 + .../layers/2d.layer.nested-filters.html.ini | 2 + ...yer.css-filters.blur-and-shadow.w.html.ini | 2 + .../2d.layer.css-filters.blur.w.html.ini | 2 + .../2d.layer.css-filters.shadow.w.html.ini | 2 + .../layers/2d.layer.css-filters.w.html.ini | 2 + .../layers/2d.layer.nested-filters.html.ini | 2 + .../layers/2d.layer.nested-filters.w.html.ini | 2 + .../meta/html/dom/idlharness.https.html.ini | 6 + ...nitiator-is-not-opener.https.window.js.ini | 3 +- .../images/img-sizes-auto.html.ini | 2 + .../media_fragment_seek.html.ini | 3 - .../iframe-loading-lazy.html.ini | 1 + .../iframe_sandbox_popups_escaping-1.html.ini | 3 +- .../iframe_sandbox_popups_escaping-2.html.ini | 1 + ...rame_sandbox_popups_nonescaping-2.html.ini | 3 +- .../image-loading-lazy-slow.html.ini | 2 - .../non-active-document.html.ini | 9 - .../sizes/sizes-auto-rendering-2.html.ini | 2 + .../sizes-auto-rendering-dynamic.html.ini | 2 + .../the-img-element/sizes/sizes-auto.html.ini | 60 + .../multipart-formdata.window.js.ini | 3 + .../text-plain.window.js.ini | 9 +- .../urlencoded2.window.js.ini | 3 - .../parsing/DOMContentLoaded-defer.html.ini | 3 - ...Document-parseHTMLUnsafe-encoding.html.ini | 2 + ...arseHTMLUnsafe-encoding.tentative.html.ini | 2 - ...t-parseHTMLUnsafe-style-attribute.html.ini | 2 + ...LUnsafe-style-attribute.tentative.html.ini | 2 - ...arseHTMLUnsafe-url-base-pushstate.html.ini | 18 + ...safe-url-base-pushstate.tentative.html.ini | 18 - ...Document-parseHTMLUnsafe-url-base.html.ini | 18 + ...nt-parseHTMLUnsafe-url-moretests.html.ini} | 2 +- ...ent-parseHTMLUnsafe-url-pushstate.html.ini | 18 + ...TMLUnsafe-url-pushstate.tentative.html.ini | 18 - .../Document-parseHTMLUnsafe-url.html.ini | 18 + .../Document-parseHTMLUnsafe.html.ini | 2 + ...ocument-parseHTMLUnsafe.tentative.html.ini | 2 - .../Element-setHTMLUnsafe-04.html.ini} | 2 +- .../setHTMLUnsafe-CEReactions.html.ini | 6 + .../setHTMLUnsafe-xml.html.ini | 6 + .../setHTMLUnsafe.html.ini} | 2 +- ...le-event-handler-settings-objects.html.ini | 3 + .../strategy-worker-terminate.html.ini | 2 - .../sub-sample-buffer-stitching.html.ini | 5 + .../audiocontext-not-fully-active.html.ini | 1 + .../meta/webmessaging/with-ports/017.html.ini | 4 - .../webmessaging/without-ports/017.html.ini | 4 - .../css/offset_properties_inline.html.ini | 6 + tests/wpt/tests/.azure-pipelines.yml | 9 +- tests/wpt/tests/avif/WEB_FEATURES.yml | 3 + ...gation_triggered.tentative.https.window.js | 37 +- ...yle-allowed-while-cloning-objects.sub.html | 203 +- .../blocks/align-content-table-cell.html | 174 + .../css-anchor-position/inset-area-basic.html | 119 + .../inset-area-computed-insets.tentative.html | 24 + .../inset-area-interpolation.html | 14 + .../inset-area-wm-dir.html | 170 + .../animate-with-color-mix.html | 162 + ...nd-position-bottom-right-repeat-round.html | 16 + ...osition-bottom-right-repeat-round-ref.html | 13 + ...urrentcolor-background-repaint-parent.html | 14 +- ...r-mix-currentcolor-background-repaint.html | 14 +- ...ix-currentcolor-border-repaint-parent.html | 14 +- ...color-mix-currentcolor-border-repaint.html | 14 +- ...x-currentcolor-outline-repaint-parent.html | 14 +- ...olor-mix-currentcolor-outline-repaint.html | 14 +- .../currentcolor-border-repaint-parent.html | 14 +- tests/wpt/tests/css/css-break/float-016.html | 19 + ...eme-iframe-background-about-blank-ref.html | 5 + ...rame-background-about-blank.tentative.html | 13 + .../support/dark-frame-blank.html | 4 + .../color-computed-color-mix-function.html | 4 + .../parsing/color-invalid-relative-color.html | 8 - ...tent-visibility-vs-scrollIntoView-003.html | 20 +- tests/wpt/tests/css/css-grid/WEB_FEATURES.yml | 3 + ...d-auto-repeat-max-size-001.tentative.html} | 5 +- .../grid-minimum-size-grid-items-021.html | 30 +- ...-areas-overflowing-grid-container-009.html | 2 +- .../css/css-grid/masonry/WEB_FEATURES.yml | 3 + .../css/css-grid/subgrid/WEB_FEATURES.yml | 3 + .../css-lists/counters-container-crash.html | 19 + ...path-animation-ensure-keyframe-update.html | 38 + .../outline-width-rounding.tentative.html | 17 +- ...boundary-viewport-covering.tentative.html} | 0 ...erflowing-snap-areas-nested.tentative.html | 108 + .../overflowing-snap-areas.html | 14 - ...d-snap-area-layout-changed.tentative.html} | 0 ...scroll-snap-stop-002-nested.tentative.html | 61 + .../css-scroll-snap/scroll-snap-stop-002.html | 32 - ...=> snap-into-covering-area.tentative.html} | 0 .../parsing/rotate-parsing-computed.html | 47 + .../parsing/scale-parsing-computed.html | 44 + .../parsing/translate-parsing-computed.html | 42 + .../transform-box/svgbox-stroke-box-003.html | 21 + .../transform-box/svgbox-stroke-box-004.html | 21 + .../animations/animate-with-color-mix.html | 146 + .../minmax-length-percent-serialize.html | 7 + .../wpt/tests/css/css-values/signed-zero.html | 133 + .../css/css-values/signs-abs-computed.html | 1 + .../no-crash-set-exception.html | 4 - .../tests/css/cssom-view/negativeMargins.html | 2 - ...SSStyleSheet-constructable-concat-ref.html | 7 + .../CSSStyleSheet-constructable-concat.html | 12 +- .../css/printing/page-size-001-print-ref.html | 7 +- .../css/printing/page-size-002-print-ref.html | 5 +- .../css/printing/page-size-002-print.html | 5 +- .../user-action-pseudo-classes-in-has.html | 58 +- .../wpt/tests/css/support/color-testcommon.js | 47 + .../resize-requires-user-gesture.https.html | 22 + tests/wpt/tests/dom/nodes/attributes.html | 27 +- tests/wpt/tests/dom/xslt/large-cdata-ref.html | 13 + tests/wpt/tests/dom/xslt/large-cdata.html | 17 + .../tests/dom/xslt/resources/large_CDATA.xml | 156982 +++++++++++++++ .../dom/xslt/resources/large_CDATA_ref.html | 119 + .../wpt/tests/dom/xslt/resources/xml2html.xsl | 25 + ...er-empty-table-header-grouped-element.html | 16 + .../anchor.tentative.https.window.js | 190 + .../anchor.tentative.window.js | 94 + .../resources/anchor.html | 16 + .../iframed-no-preflight-received.html | 7 + .../resources/no-preflight-received.html | 6 + .../resources/openee.html | 8 + .../resources/opener.html | 4 +- .../resources/preflight.py | 18 +- .../resources/support.sub.js | 49 +- .../window-open.tentative.https.window.js | 66 +- .../window-open.tentative.window.js | 26 +- ...in-leave-ad-interest-group.https.window.js | 4 +- .../reporting-arguments.https.window.js | 2 +- tests/wpt/tests/fullscreen/WEB_FEATURES.yml | 3 + .../tests/html-aam/{META.yaml => META.yml} | 2 +- tests/wpt/tests/html-aam/names.html | 260 + .../unloading-documents/support/002-1.html | 6 +- .../unloading-documents/support/002a.html | 2 +- .../the-window-object/close-method.window.js | 4 +- ...-setting-goes-cross-origin-domain.sub.html | 4 - .../layers/2d.layer.beginLayer-options.html | 12 +- ....css-filters.blur-and-shadow-expected.html | 17 + .../2d.layer.css-filters.blur-and-shadow.html | 20 + .../2d.layer.css-filters.blur-expected.html | 16 + .../layers/2d.layer.css-filters.blur.html | 20 + .../2d.layer.css-filters.shadow-expected.html | 16 + .../layers/2d.layer.css-filters.shadow.html | 20 + .../2d.layer.nested-filters-expected.html | 28 + .../layers/2d.layer.nested-filters.html | 33 + .../layers/2d.layer.beginLayer-options.html | 12 +- .../2d.layer.beginLayer-options.worker.js | 12 +- .../layers/2d.layer.css-filters-expected.html | 45 + ....css-filters.blur-and-shadow-expected.html | 17 + .../2d.layer.css-filters.blur-and-shadow.html | 23 + ...d.layer.css-filters.blur-and-shadow.w.html | 37 + .../2d.layer.css-filters.blur-expected.html | 16 + .../layers/2d.layer.css-filters.blur.html | 23 + .../layers/2d.layer.css-filters.blur.w.html | 37 + .../layers/2d.layer.css-filters.html | 37 + .../2d.layer.css-filters.shadow-expected.html | 16 + .../layers/2d.layer.css-filters.shadow.html | 23 + .../layers/2d.layer.css-filters.shadow.w.html | 37 + .../layers/2d.layer.css-filters.w.html | 51 + .../2d.layer.nested-filters-expected.html | 28 + .../layers/2d.layer.nested-filters.html | 36 + .../layers/2d.layer.nested-filters.w.html | 50 + .../html/canvas/tools/yaml-new/layers.yaml | 87 +- ...ow-initiator-is-not-opener.https.window.js | 4 +- .../lists/lists-styles.html | 21 +- .../crashtests/fieldset-middleclick.html | 37 + .../images/img-sizes-auto.html | 53 + .../image-loading-lazy-in-scroller-far.html | 2 +- ...ading-lazy-in-scroller-horizontal-far.html | 2 +- ...e-loading-lazy-in-scroller-horizontal.html | 4 +- ...age-loading-lazy-in-scroller-nested-2.html | 4 +- ...age-loading-lazy-in-scroller-nested-3.html | 4 +- ...age-loading-lazy-in-scroller-nested-4.html | 10 +- ...age-loading-lazy-in-scroller-nested-5.html | 10 +- ...image-loading-lazy-in-scroller-nested.html | 4 +- .../image-loading-lazy-in-scroller.html | 4 +- .../reference/sizes-auto-rendering-ref.html | 8 + .../sizes/sizes-auto-rendering-2.html | 25 + .../sizes/sizes-auto-rendering-3.html | 25 + .../sizes/sizes-auto-rendering-dynamic.html | 38 + .../sizes/sizes-auto-rendering.html | 26 + .../the-img-element/sizes/sizes-auto.html | 24 +- .../show-picker-being-rendered.html | 21 + .../show-picker-user-gesture.tentative.html | 1 + ...oketarget-on-audio-behavior.tentative.html | 12 +- ...oketarget-on-video-behavior.tentative.html | 12 +- .../html/semantics/popovers/WEB_FEATURES.yml | 3 + .../semantics/popovers/popover-events.html | 20 +- .../checked-indeterminate.window.js | 27 + ...=> Document-parseHTMLUnsafe-encoding.html} | 0 ...ment-parseHTMLUnsafe-style-attribute.html} | 0 ...t-parseHTMLUnsafe-url-base-pushstate.html} | 0 ...=> Document-parseHTMLUnsafe-url-base.html} | 0 ...cument-parseHTMLUnsafe-url-moretests.html} | 0 ...cument-parseHTMLUnsafe-url-pushstate.html} | 0 ...html => Document-parseHTMLUnsafe-url.html} | 0 ...ive.html => Document-parseHTMLUnsafe.html} | 0 ...ive.html => Element-setHTMLUnsafe-04.html} | 0 .../setHTMLUnsafe-CEReactions.html | 71 + .../setHTMLUnsafe-xml.html | 27 + ...safe.tentative.html => setHTMLUnsafe.html} | 0 .../protocol-handler-fragment-nosw.https.html | 25 + .../protocol-handler-fragment.https.html | 25 + .../protocol-handler-path.https.html | 25 + .../protocol-handler-query-nosw.https.html | 25 + .../protocol-handler-query.https.html | 25 + tests/wpt/tests/https-upgrades/README | 19 + ...to-http-redirecting-to-http.https.sub.html | 30 + .../http-redirecting-to-http.https.sub.html | 29 + .../http-redirecting-to-https.https.sub.html | 29 + tests/wpt/tests/infrastructure/README.md | 2 +- .../expected-fail/window-onload-test.html | 28 + .../reftest/reftest_window_load.html | 10 + tests/wpt/tests/interfaces/clipboard-apis.idl | 6 +- .../wpt/tests/interfaces/encrypted-media.idl | 17 + tests/wpt/tests/interfaces/html.idl | 2 + tests/wpt/tests/interfaces/longtasks.idl | 9 + .../tests/interfaces/orientation-event.idl | 8 +- .../interfaces/private-network-access.idl | 8 +- .../wpt/tests/interfaces/storage-buckets.idl | 4 +- tests/wpt/tests/interfaces/streams.idl | 6 +- tests/wpt/tests/interfaces/webauthn.idl | 15 +- tests/wpt/tests/interfaces/webgpu.idl | 4 +- tests/wpt/tests/interfaces/webtransport.idl | 1 + .../intersection-observer/clip-path.html | 3 - .../intersection-observer/display-none.html | 3 - .../intersection-observer-test-utils.js | 18 +- ...intersection-with-fractional-bounds-2.html | 77 + ...g-intersection-with-fractional-bounds.html | 68 + tests/wpt/tests/lint.ignore | 8 - .../tentative/loaf-desired-exec-time.html | 5 - .../loaf-source-location-redirect.html | 88 +- .../first-letter-contributed-to-ancestor.html | 17 + .../default-mfrac-padding-style.html | 30 + .../wpt/tests/navigation-api/WEB_FEATURES.yml | 3 + .../cross-origin-traversal-redirect.html | 33 + .../navigate-history-back-bfcache.html | 24 + .../cross-origin-redirect-on-second-visit.py | 31 + .../return-value/back-204-205-download.html | 9 +- ...ate-unload.html => navigate-pagehide.html} | 4 +- ...-rejection-order-invalidurl-pagehide.html} | 4 +- ...n-order-pagehide-unserializablestate.html} | 4 +- ...eload-unload.html => reload-pagehide.html} | 4 +- ...n-order-pagehide-unserializablestate.html} | 4 +- .../back-cross-document-event-order.html | 36 + .../navigate-cross-document-event-order.html | 3 +- tests/wpt/tests/png/apng/acTL-plays-one.html | 2 +- .../png/apng/apng-blue-rectangle-one-ref.html | 22 + .../tests/png/apng/apng-checkerboard-ref.html | 2 +- .../png/apng/nearly-transparent-ref.html | 2 +- tests/wpt/tests/png/apng/support/019.png | Bin 0 -> 614 bytes .../resources/test/tests/unit/late-test.html | 14 +- tests/wpt/tests/resources/testdriver.js | 46 +- tests/wpt/tests/resources/testharness.js | 5 + .../element-set-sanitized-html.https.html | 52 +- .../sanitizer-api/sanitizer-config.https.html | 27 +- .../sanitizer-api/sanitizer-names.https.html | 64 +- .../sanitizer-unknown.https.html | 27 +- .../sanitizer-api/support/testcases.sub.js | 254 +- tests/wpt/tests/scheduler/WEB_FEATURES.yml | 3 + .../css/scroll-timeline-shorthand.html | 4 +- .../css/view-timeline-shorthand.html | 6 +- .../non-html-documents.html | 46 +- .../{non-html.json => application-json.json} | 0 .../{non-html.xml => application-xml.xml} | 0 .../resources/{non-html.css => text-css.css} | 0 .../resources/text-html.html | 10 + .../{non-html.js => text-javascript.js} | 0 .../{non-html.txt => text-plain.txt} | 2 + .../static-router/resources/router-rules.js | 59 +- .../static-router-main-resource.https.html | 2 +- .../static-router-subresource.https.html | 82 +- ...uest-fallback-to-network-iframe.https.html | 22 + ...etch-request-fallback-to-network-worker.js | 15 + ...ervice-worker-img.tentative.https.sub.html | 111 + .../click-event-bubbles.tentative.html | 28 + .../multiple-nested-events.tentative.html | 40 + ...api-after-transition-commit.tentative.html | 2 +- .../navigation-api-hash.tentative.html | 2 +- ...vigation-api-preventDefault.tentative.html | 2 +- .../navigation-api-rejected.tentative.html | 2 +- ...igation-api-view-transition.tentative.html | 2 +- .../navigation-api.tentative.html | 2 +- .../popstate-multiple-backs.tentative.html | 5 +- .../popstate.tentative.html | 5 +- .../resources/soft-navigation-helper.js | 13 +- .../prerender/fetch-blob.html | 7 +- tests/wpt/tests/storage-access-api/helpers.js | 6 + ...s-web-socket.tentative.sub.https.window.js | 51 + .../resources/embedded_responder.js | 20 +- .../linking/reftests/use-template-ref.html | 5 + .../svg/linking/reftests/use-template.html | 20 + ...-mix-currentcolor-fill-stroke-repaint.html | 14 +- .../currentcolor-fill-stroke-repaint.html | 14 +- tests/wpt/tests/tools/ci/tc/tasks/test.yml | 2 +- .../wpt/tests/tools/ci/tc/tests/test_valid.py | 4 + tests/wpt/tests/tools/wpt/run.py | 2 +- .../wptrunner/wptrunner/executors/actions.py | 13 + .../wptrunner/executors/executorwebdriver.py | 9 + .../wptrunner/wptrunner/executors/protocol.py | 12 + .../wptrunner/wptrunner/testdriver-extra.js | 4 + .../tools/wptrunner/wptrunner/testrunner.py | 2 +- .../crashtests/color-mix-crashtest.html | 35 + tests/wpt/tests/webcodecs/WEB_FEATURES.yml | 3 + .../webcodecs/full-cycle-test.https.any.js | 11 +- .../webdriver/tests/bidi/WEB_FEATURES.yml | 3 + .../set_viewport/device_pixel_ratio.py | 30 +- .../browsing_context/set_viewport/invalid.py | 12 +- .../{set_viewport.py => viewport.py} | 90 +- .../pointer_mouse_multiclick.py | 4 +- .../bidi/input/release_actions/sequence.py | 6 +- .../tests/bidi/log/entry_added/console.py | 19 + .../network/auth_required/auth_required.py | 15 +- .../bidi/network/auth_required/unsubscribe.py | 37 + .../remove_intercept/remove_intercept.py | 24 +- .../perform_actions/pointer_tripleclick.py | 4 +- .../tests/classic/release_actions/sequence.py | 42 +- .../webnn/elementwise_logical.https.any.js | 20 + .../webnn/elementwise_unary.https.any.js | 2 +- .../gpu/elementwise_logical.https.any.js | 20 + .../webnn/gpu/elementwise_unary.https.any.js | 2 +- .../webnn/resources/test_data/concat.json | 1790 + .../resources/test_data/conv_transpose2d.json | 137 + .../webnn/resources/test_data/equal.json | 884 + .../webnn/resources/test_data/greater.json | 884 + .../resources/test_data/greater_or_equal.json | 873 + .../webnn/resources/test_data/identity.json | 354 + .../webnn/resources/test_data/lesser.json | 873 + .../resources/test_data/lesser_or_equal.json | 873 + .../resources/test_data/logical_not.json | 354 + .../webnn/resources/test_data/reciprocal.json | 354 + .../webnn/resources/test_data/reshape.json | 71 +- .../tests/webnn/resources/test_data/sqrt.json | 354 + tests/wpt/tests/webnn/resources/utils.js | 91 +- ...ection-insertable-streams-audio.https.html | 83 +- ...ction-insertable-streams-errors.https.html | 41 - ...ection-insertable-streams-video.https.html | 46 +- .../RTCPeerConnection-insertable-streams.js | 12 +- tests/wpt/tests/webrtc/RTCDataChannel-GC.html | 50 + tests/wpt/tests/webusb/WEB_FEATURES.yml | 3 + tests/wpt/tests/webvtt/WEB_FEATURES.yml | 3 + 442 files changed, 174178 insertions(+), 1548 deletions(-) create mode 100644 tests/wpt/meta-legacy-layout/css/css-align/blocks/align-content-table-cell.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/css-animations/animate-with-color-mix.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/css-transitions/animations/animate-with-color-mix.html.ini create mode 100644 tests/wpt/meta-legacy-layout/css/css-values/signed-zero.html.ini create mode 100644 tests/wpt/meta-legacy-layout/dom/ranges/Range-cloneContents.html.ini create mode 100644 tests/wpt/meta-legacy-layout/dom/ranges/Range-deleteContents.html.ini create mode 100644 tests/wpt/meta-legacy-layout/dom/ranges/Range-extractContents.html.ini create mode 100644 tests/wpt/meta-legacy-layout/dom/ranges/Range-insertNode.html.ini create mode 100644 tests/wpt/meta-legacy-layout/dom/ranges/Range-surroundContents.html.ini create mode 100644 tests/wpt/meta-legacy-layout/dom/xslt/large-cdata.html.ini create mode 100644 tests/wpt/meta-legacy-layout/fetch/private-network-access/anchor.tentative.https.window.js.ini create mode 100644 tests/wpt/meta-legacy-layout/fetch/private-network-access/anchor.tentative.window.js.ini create mode 100644 tests/wpt/meta-legacy-layout/html/canvas/element/layers/2d.layer.nested-filters.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.w.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/canvas/offscreen/layers/2d.layer.css-filters.blur.w.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.w.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/canvas/offscreen/layers/2d.layer.css-filters.w.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/canvas/offscreen/layers/2d.layer.nested-filters.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/canvas/offscreen/layers/2d.layer.nested-filters.w.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/document-with-fragment-valid.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/rendering/replaced-elements/images/img-sizes-auto.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/non-active-document.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-2.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-dynamic.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/document-write/module-tla-delayed.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-encoding.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-encoding.tentative.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-style-attribute.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-style-attribute.tentative.html.ini rename tests/wpt/{meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-base.tentative.html.ini => meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-base-pushstate.html.ini} (90%) delete mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-base-pushstate.tentative.html.ini rename tests/wpt/{meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url.tentative.html.ini => meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-base.html.ini} (91%) rename tests/wpt/{meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-moretests.tentative.html.ini => meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-moretests.html.ini} (76%) rename tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Document-parseHTMLUnsafe-url.tentative.html.ini => Document-parseHTMLUnsafe-url-pushstate.html.ini} (91%) delete mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-pushstate.tentative.html.ini rename tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Document-parseHTMLUnsafe-url-base.tentative.html.ini => Document-parseHTMLUnsafe-url.html.ini} (90%) create mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe.html.ini delete mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe.tentative.html.ini rename tests/wpt/{meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Element-setHTMLUnsafe-04.tentative.html.ini => meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Element-setHTMLUnsafe-04.html.ini} (65%) create mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/setHTMLUnsafe-CEReactions.html.ini create mode 100644 tests/wpt/meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/setHTMLUnsafe-xml.html.ini rename tests/wpt/{meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/setHTMLUnsafe.tentative.html.ini => meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/setHTMLUnsafe.html.ini} (92%) rename tests/wpt/{meta/webmessaging/with-ports => meta-legacy-layout/webmessaging/without-ports}/018.html.ini (100%) create mode 100644 tests/wpt/meta-legacy-layout/workers/constructors/Worker/Worker-constructor.html.ini create mode 100644 tests/wpt/meta/css/css-align/blocks/align-content-table-cell.html.ini create mode 100644 tests/wpt/meta/css/css-animations/animate-with-color-mix.html.ini create mode 100644 tests/wpt/meta/css/css-transitions/animations/animate-with-color-mix.html.ini create mode 100644 tests/wpt/meta/css/css-values/minmax-length-percent-serialize.html.ini create mode 100644 tests/wpt/meta/css/css-values/signed-zero.html.ini create mode 100644 tests/wpt/meta/css/cssom-view/MediaQueryList-extends-EventTarget.html.ini create mode 100644 tests/wpt/meta/dom/ranges/Range-cloneContents.html.ini create mode 100644 tests/wpt/meta/dom/ranges/Range-deleteContents.html.ini create mode 100644 tests/wpt/meta/dom/ranges/Range-extractContents.html.ini create mode 100644 tests/wpt/meta/dom/ranges/Range-insertNode.html.ini create mode 100644 tests/wpt/meta/dom/ranges/Range-surroundContents.html.ini create mode 100644 tests/wpt/meta/dom/xslt/large-cdata.html.ini create mode 100644 tests/wpt/meta/fetch/private-network-access/anchor.tentative.https.window.js.ini create mode 100644 tests/wpt/meta/fetch/private-network-access/anchor.tentative.window.js.ini delete mode 100644 tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini rename tests/wpt/meta/html/browsers/history/the-history-interface/{traverse_the_history_4.html.ini => traverse_the_history_5.html.ini} (71%) create mode 100644 tests/wpt/meta/html/canvas/element/layers/2d.layer.nested-filters.html.ini create mode 100644 tests/wpt/meta/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.w.html.ini create mode 100644 tests/wpt/meta/html/canvas/offscreen/layers/2d.layer.css-filters.blur.w.html.ini create mode 100644 tests/wpt/meta/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.w.html.ini create mode 100644 tests/wpt/meta/html/canvas/offscreen/layers/2d.layer.css-filters.w.html.ini create mode 100644 tests/wpt/meta/html/canvas/offscreen/layers/2d.layer.nested-filters.html.ini create mode 100644 tests/wpt/meta/html/canvas/offscreen/layers/2d.layer.nested-filters.w.html.ini create mode 100644 tests/wpt/meta/html/rendering/replaced-elements/images/img-sizes-auto.html.ini delete mode 100644 tests/wpt/meta/html/semantics/embedded-content/media-elements/media_fragment_seek.html.ini delete mode 100644 tests/wpt/meta/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html.ini delete mode 100644 tests/wpt/meta/html/semantics/embedded-content/the-img-element/non-active-document.html.ini create mode 100644 tests/wpt/meta/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-2.html.ini create mode 100644 tests/wpt/meta/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-dynamic.html.ini delete mode 100644 tests/wpt/meta/html/syntax/parsing/DOMContentLoaded-defer.html.ini create mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-encoding.html.ini delete mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-encoding.tentative.html.ini create mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-style-attribute.html.ini delete mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-style-attribute.tentative.html.ini create mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-base-pushstate.html.ini delete mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-base-pushstate.tentative.html.ini create mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-base.html.ini rename tests/wpt/{meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-moretests.tentative.html.ini => meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-moretests.html.ini} (76%) create mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-pushstate.html.ini delete mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url-pushstate.tentative.html.ini create mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe-url.html.ini create mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe.html.ini delete mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Document-parseHTMLUnsafe.tentative.html.ini rename tests/wpt/{meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Element-setHTMLUnsafe-04.tentative.html.ini => meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/Element-setHTMLUnsafe-04.html.ini} (65%) create mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/setHTMLUnsafe-CEReactions.html.ini create mode 100644 tests/wpt/meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/setHTMLUnsafe-xml.html.ini rename tests/wpt/{meta-legacy-layout/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/setHTMLUnsafe.tentative.html.ini => meta/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/setHTMLUnsafe.html.ini} (92%) delete mode 100644 tests/wpt/meta/streams/readable-streams/crashtests/strategy-worker-terminate.html.ini delete mode 100644 tests/wpt/meta/webmessaging/with-ports/017.html.ini delete mode 100644 tests/wpt/meta/webmessaging/without-ports/017.html.ini create mode 100644 tests/wpt/mozilla/meta/css/offset_properties_inline.html.ini create mode 100644 tests/wpt/tests/avif/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-align/blocks/align-content-table-cell.html create mode 100644 tests/wpt/tests/css/css-anchor-position/inset-area-basic.html create mode 100644 tests/wpt/tests/css/css-anchor-position/inset-area-computed-insets.tentative.html create mode 100644 tests/wpt/tests/css/css-anchor-position/inset-area-interpolation.html create mode 100644 tests/wpt/tests/css/css-anchor-position/inset-area-wm-dir.html create mode 100644 tests/wpt/tests/css/css-animations/animate-with-color-mix.html create mode 100644 tests/wpt/tests/css/css-backgrounds/background-position/background-position-bottom-right-repeat-round.html create mode 100644 tests/wpt/tests/css/css-backgrounds/background-position/reference/background-position-bottom-right-repeat-round-ref.html create mode 100644 tests/wpt/tests/css/css-break/float-016.html create mode 100644 tests/wpt/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-about-blank-ref.html create mode 100644 tests/wpt/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-about-blank.tentative.html create mode 100644 tests/wpt/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-blank.html create mode 100644 tests/wpt/tests/css/css-grid/WEB_FEATURES.yml rename tests/wpt/tests/css/css-grid/grid-definition/{grid-auto-repeat-max-size-001.html => grid-auto-repeat-max-size-001.tentative.html} (97%) create mode 100644 tests/wpt/tests/css/css-grid/masonry/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-grid/subgrid/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/css/css-lists/counters-container-crash.html create mode 100644 tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-ensure-keyframe-update.html rename tests/wpt/tests/css/css-scroll-snap/input/{snap-area-overflow-boundary.html => snap-area-overflow-boundary-viewport-covering.tentative.html} (100%) create mode 100644 tests/wpt/tests/css/css-scroll-snap/overflowing-snap-areas-nested.tentative.html rename tests/wpt/tests/css/css-scroll-snap/{scroll-snap-nested-snap-area-layout-changed.html => scroll-snap-nested-snap-area-layout-changed.tentative.html} (100%) create mode 100644 tests/wpt/tests/css/css-scroll-snap/scroll-snap-stop-002-nested.tentative.html rename tests/wpt/tests/css/css-scroll-snap/{snap-into-covering-area.html => snap-into-covering-area.tentative.html} (100%) create mode 100644 tests/wpt/tests/css/css-transforms/parsing/rotate-parsing-computed.html create mode 100644 tests/wpt/tests/css/css-transforms/parsing/scale-parsing-computed.html create mode 100644 tests/wpt/tests/css/css-transforms/parsing/translate-parsing-computed.html create mode 100644 tests/wpt/tests/css/css-transforms/transform-box/svgbox-stroke-box-003.html create mode 100644 tests/wpt/tests/css/css-transforms/transform-box/svgbox-stroke-box-004.html create mode 100644 tests/wpt/tests/css/css-transitions/animations/animate-with-color-mix.html create mode 100644 tests/wpt/tests/css/css-values/signed-zero.html create mode 100644 tests/wpt/tests/document-picture-in-picture/resize-requires-user-gesture.https.html create mode 100644 tests/wpt/tests/dom/xslt/large-cdata-ref.html create mode 100644 tests/wpt/tests/dom/xslt/large-cdata.html create mode 100644 tests/wpt/tests/dom/xslt/resources/large_CDATA.xml create mode 100644 tests/wpt/tests/dom/xslt/resources/large_CDATA_ref.html create mode 100644 tests/wpt/tests/dom/xslt/resources/xml2html.xsl create mode 100644 tests/wpt/tests/editing/crashtests/delete-from-after-empty-table-header-grouped-element.html create mode 100644 tests/wpt/tests/fetch/private-network-access/anchor.tentative.https.window.js create mode 100644 tests/wpt/tests/fetch/private-network-access/anchor.tentative.window.js create mode 100644 tests/wpt/tests/fetch/private-network-access/resources/anchor.html create mode 100644 tests/wpt/tests/fetch/private-network-access/resources/iframed-no-preflight-received.html create mode 100644 tests/wpt/tests/fetch/private-network-access/resources/no-preflight-received.html create mode 100644 tests/wpt/tests/fetch/private-network-access/resources/openee.html create mode 100644 tests/wpt/tests/fullscreen/WEB_FEATURES.yml rename tests/wpt/tests/html-aam/{META.yaml => META.yml} (82%) create mode 100644 tests/wpt/tests/html-aam/names.html create mode 100644 tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow-expected.html create mode 100644 tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow.html create mode 100644 tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-expected.html create mode 100644 tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur.html create mode 100644 tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.shadow-expected.html create mode 100644 tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.shadow.html create mode 100644 tests/wpt/tests/html/canvas/element/layers/2d.layer.nested-filters-expected.html create mode 100644 tests/wpt/tests/html/canvas/element/layers/2d.layer.nested-filters.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters-expected.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow-expected.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.w.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-expected.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.w.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow-expected.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.w.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.w.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters-expected.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.html create mode 100644 tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.w.html create mode 100644 tests/wpt/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/crashtests/fieldset-middleclick.html create mode 100644 tests/wpt/tests/html/rendering/replaced-elements/images/img-sizes-auto.html create mode 100644 tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/reference/sizes-auto-rendering-ref.html create mode 100644 tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-2.html create mode 100644 tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-3.html create mode 100644 tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-dynamic.html create mode 100644 tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering.html create mode 100644 tests/wpt/tests/html/semantics/forms/the-select-element/show-picker-being-rendered.html create mode 100644 tests/wpt/tests/html/semantics/popovers/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/html/semantics/selectors/pseudo-classes/checked-indeterminate.window.js rename tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Document-parseHTMLUnsafe-encoding.tentative.html => Document-parseHTMLUnsafe-encoding.html} (100%) rename tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Document-parseHTMLUnsafe-style-attribute.tentative.html => Document-parseHTMLUnsafe-style-attribute.html} (100%) rename tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Document-parseHTMLUnsafe-url-base-pushstate.tentative.html => Document-parseHTMLUnsafe-url-base-pushstate.html} (100%) rename tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Document-parseHTMLUnsafe-url-base.tentative.html => Document-parseHTMLUnsafe-url-base.html} (100%) rename tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Document-parseHTMLUnsafe-url-moretests.tentative.html => Document-parseHTMLUnsafe-url-moretests.html} (100%) rename tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Document-parseHTMLUnsafe-url-pushstate.tentative.html => Document-parseHTMLUnsafe-url-pushstate.html} (100%) rename tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Document-parseHTMLUnsafe-url.tentative.html => Document-parseHTMLUnsafe-url.html} (100%) rename tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Document-parseHTMLUnsafe.tentative.html => Document-parseHTMLUnsafe.html} (100%) rename tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{Element-setHTMLUnsafe-04.tentative.html => Element-setHTMLUnsafe-04.html} (100%) create mode 100644 tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/setHTMLUnsafe-CEReactions.html create mode 100644 tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/setHTMLUnsafe-xml.html rename tests/wpt/tests/html/webappapis/dynamic-markup-insertion/html-unsafe-methods/{setHTMLUnsafe.tentative.html => setHTMLUnsafe.html} (100%) create mode 100644 tests/wpt/tests/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol-handler-fragment-nosw.https.html create mode 100644 tests/wpt/tests/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol-handler-fragment.https.html create mode 100644 tests/wpt/tests/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol-handler-path.https.html create mode 100644 tests/wpt/tests/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol-handler-query-nosw.https.html create mode 100644 tests/wpt/tests/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol-handler-query.https.html create mode 100644 tests/wpt/tests/https-upgrades/README create mode 100644 tests/wpt/tests/https-upgrades/tentative/http-redirecting-to-http-redirecting-to-http.https.sub.html create mode 100644 tests/wpt/tests/https-upgrades/tentative/http-redirecting-to-http.https.sub.html create mode 100644 tests/wpt/tests/https-upgrades/tentative/http-redirecting-to-https.https.sub.html create mode 100644 tests/wpt/tests/infrastructure/expected-fail/window-onload-test.html create mode 100644 tests/wpt/tests/infrastructure/reftest/reftest_window_load.html create mode 100644 tests/wpt/tests/intersection-observer/svg-intersection-with-fractional-bounds-2.html create mode 100644 tests/wpt/tests/intersection-observer/svg-intersection-with-fractional-bounds.html create mode 100644 tests/wpt/tests/mathml/crashtests/first-letter-contributed-to-ancestor.html create mode 100644 tests/wpt/tests/mathml/presentation-markup/fractions/default-mfrac-padding-style.html create mode 100644 tests/wpt/tests/navigation-api/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/navigation-api/navigate-event/cross-origin-traversal-redirect.html create mode 100644 tests/wpt/tests/navigation-api/navigate-event/navigate-history-back-bfcache.html create mode 100644 tests/wpt/tests/navigation-api/navigate-event/resources/cross-origin-redirect-on-second-visit.py rename tests/wpt/tests/navigation-api/navigation-methods/return-value/{navigate-unload.html => navigate-pagehide.html} (90%) rename tests/wpt/tests/navigation-api/navigation-methods/return-value/{navigate-rejection-order-invalidurl-unload.html => navigate-rejection-order-invalidurl-pagehide.html} (85%) rename tests/wpt/tests/navigation-api/navigation-methods/return-value/{navigate-rejection-order-unload-unserializablestate.html => navigate-rejection-order-pagehide-unserializablestate.html} (84%) rename tests/wpt/tests/navigation-api/navigation-methods/return-value/{reload-unload.html => reload-pagehide.html} (90%) rename tests/wpt/tests/navigation-api/navigation-methods/return-value/{reload-rejection-order-unload-unserializablestate.html => reload-rejection-order-pagehide-unserializablestate.html} (86%) create mode 100644 tests/wpt/tests/navigation-api/ordering-and-transition/back-cross-document-event-order.html create mode 100644 tests/wpt/tests/png/apng/apng-blue-rectangle-one-ref.html create mode 100644 tests/wpt/tests/png/apng/support/019.png create mode 100644 tests/wpt/tests/scheduler/WEB_FEATURES.yml rename tests/wpt/tests/scroll-to-text-fragment/resources/{non-html.json => application-json.json} (100%) rename tests/wpt/tests/scroll-to-text-fragment/resources/{non-html.xml => application-xml.xml} (100%) rename tests/wpt/tests/scroll-to-text-fragment/resources/{non-html.css => text-css.css} (100%) create mode 100644 tests/wpt/tests/scroll-to-text-fragment/resources/text-html.html rename tests/wpt/tests/scroll-to-text-fragment/resources/{non-html.js => text-javascript.js} (100%) rename tests/wpt/tests/scroll-to-text-fragment/resources/{non-html.txt => text-plain.txt} (99%) create mode 100644 tests/wpt/tests/shared-storage/resources/shared-storage-writable-fetch-request-fallback-to-network-iframe.https.html create mode 100644 tests/wpt/tests/shared-storage/resources/shared-storage-writable-fetch-request-fallback-to-network-worker.js create mode 100644 tests/wpt/tests/shared-storage/shared-storage-writable-service-worker-img.tentative.https.sub.html create mode 100644 tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html create mode 100644 tests/wpt/tests/soft-navigation-heuristics/multiple-nested-events.tentative.html create mode 100644 tests/wpt/tests/storage-access-api/requestStorageAccess-web-socket.tentative.sub.https.window.js create mode 100644 tests/wpt/tests/svg/linking/reftests/use-template-ref.html create mode 100644 tests/wpt/tests/svg/linking/reftests/use-template.html create mode 100644 tests/wpt/tests/web-animations/crashtests/color-mix-crashtest.html create mode 100644 tests/wpt/tests/webcodecs/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/webdriver/tests/bidi/WEB_FEATURES.yml rename tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/{set_viewport.py => viewport.py} (68%) create mode 100644 tests/wpt/tests/webdriver/tests/bidi/network/auth_required/unsubscribe.py create mode 100644 tests/wpt/tests/webnn/elementwise_logical.https.any.js create mode 100644 tests/wpt/tests/webnn/gpu/elementwise_logical.https.any.js create mode 100644 tests/wpt/tests/webnn/resources/test_data/equal.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/greater.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/greater_or_equal.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/identity.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/lesser.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/lesser_or_equal.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/logical_not.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/reciprocal.json create mode 100644 tests/wpt/tests/webnn/resources/test_data/sqrt.json create mode 100644 tests/wpt/tests/webrtc/RTCDataChannel-GC.html create mode 100644 tests/wpt/tests/webusb/WEB_FEATURES.yml create mode 100644 tests/wpt/tests/webvtt/WEB_FEATURES.yml diff --git a/tests/wpt/meta-legacy-layout/css/css-align/blocks/align-content-table-cell.html.ini b/tests/wpt/meta-legacy-layout/css/css-align/blocks/align-content-table-cell.html.ini new file mode 100644 index 00000000000..5019117c546 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-align/blocks/align-content-table-cell.html.ini @@ -0,0 +1,15 @@ +[align-content-table-cell.html] + [vertical-align:top and align-content:start are equivalent] + expected: FAIL + + [vertical-align:middle and `align-content:unsafe center` are equivalent] + expected: FAIL + + [vertical-align:bottom and `align-content:unsafe end` are equivalent] + expected: FAIL + + [vertical-align:baseline and align-content:baseline are equivalent] + expected: FAIL + + [vertical-align:bottom and `align-content:safe end` are equivalent if the container is tall] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-animations/animate-with-color-mix.html.ini b/tests/wpt/meta-legacy-layout/css/css-animations/animate-with-color-mix.html.ini new file mode 100644 index 00000000000..4172b4ec02b --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-animations/animate-with-color-mix.html.ini @@ -0,0 +1,18 @@ +[animate-with-color-mix.html] + [Animate from neutral keyframe with color-mix to legacy rgb] + expected: FAIL + + [Animate from legacy rgb to neutral keyframe with color-mix] + expected: FAIL + + [Animate from neutral keyframe with color-mix to srgb] + expected: FAIL + + [Animate from srgb to neutral keyframe with color-mix] + expected: FAIL + + [Animate from color-mix with transparency to legacy rgba] + expected: FAIL + + [Animate from legacy rgba to color-mix with transparency] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-color-mix-function.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-color-mix-function.html.ini index b1df42608a0..3f3a52b9d50 100644 --- a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-color-mix-function.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-color-mix-function.html.ini @@ -808,3 +808,9 @@ [Property color value 'color-mix(in hsl decreasing hue, hsl(60deg 50% 50%), hsl(60deg 50% 50%))'] expected: FAIL + + [Property color value 'color-mix(in lch, lab(50 0 0), black)'] + expected: FAIL + + [Property color value 'color-mix(in oklch, oklab(0.5 0 0), black)'] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-transitions/animations/animate-with-color-mix.html.ini b/tests/wpt/meta-legacy-layout/css/css-transitions/animations/animate-with-color-mix.html.ini new file mode 100644 index 00000000000..b195b0e5f61 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-transitions/animations/animate-with-color-mix.html.ini @@ -0,0 +1,18 @@ +[animate-with-color-mix.html] + [Transition from color-mix to legacy rgb] + expected: FAIL + + [Transition from legacy rgb to color-mix] + expected: FAIL + + [Transition from color-mix to srgb] + expected: FAIL + + [Transition from srgb to color-mix] + expected: FAIL + + [Transition from color-mix with transparency to legacy rgba] + expected: FAIL + + [Transition from legacy rgba to color-mix with transparency] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/minmax-length-percent-serialize.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/minmax-length-percent-serialize.html.ini index 2b23997447b..3a95b5bb439 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/minmax-length-percent-serialize.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/minmax-length-percent-serialize.html.ini @@ -209,3 +209,8 @@ ['calc(1em + max(10% + 20px) + 5% + min(1em + 10%) + 10px)' as a specified value should serialize as 'calc(5% + 1em + 10px + max(10% + 20px) + min(10% + 1em))'.] expected: FAIL + ['max((min(10%, 30px) + 10px) * 2 + 10px, 5em + 5%)' as a specified value should serialize as 'max(10px + (10px + min(10%, 30px)) * 2, 5% + 5em)'.] + expected: FAIL + + ['max((min(10%, 30px) + 10px) * 2 + 10px, 5em + 5%)' as a computed value should serialize as 'max(10px + (10px + min(10%, 30px)) * 2, 5% + 80px)'.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/signed-zero.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/signed-zero.html.ini new file mode 100644 index 00000000000..02081835bc2 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/signed-zero.html.ini @@ -0,0 +1,486 @@ +[signed-zero.html] + [sign(calc(-0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc(-0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(calc( 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc( 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(calc(-0 * -1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc(-0 * -1)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(calc(-0 * 1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc(-0 * 1)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(calc( 0 * -1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc( 0 * -1)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(calc( 0 * 1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc( 0 * 1)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(calc(-1 / -infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc(-1 / -infinity)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(calc(-1 / infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc(-1 / infinity)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(calc( 1 / -infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc( 1 / -infinity)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(calc( 1 / infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc( 1 / infinity)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(calc(-0 + -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc(-0 + -0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(calc(-0 + 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc(-0 + 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(calc( 0 + -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc( 0 + -0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(calc( 0 + 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc( 0 + 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(calc(-0 - -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc(-0 - -0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(calc(-0 - 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc(-0 - 0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(calc( 0 - -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc( 0 - -0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(calc( 0 - 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(calc( 0 - 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(min(-0, 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(min(-0, 0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(min( 0, -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(min( 0, -0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(max(-0, 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(max(-0, 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(max( 0, -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(max( 0, -0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(clamp(-0, -1, -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(-0, -1, -0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(clamp(-0, -0, -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(-0, -0, -0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(clamp(-0, 0, -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(-0, 0, -0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(clamp(-0, 1, -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(-0, 1, -0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(clamp(-0, -1, 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(-0, -1, 0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(clamp(-0, -0, 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(-0, -0, 0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(clamp(-0, 0, 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(-0, 0, 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(clamp(-0, 1, 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(-0, 1, 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(clamp(0, -1, -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(0, -1, -0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(clamp(0, -0, -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(0, -0, -0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(clamp(0, 0, -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(0, 0, -0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(clamp(0, 1, -0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(clamp(0, 1, -0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(round(nearest, -1, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(round(nearest, -1, infinity)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(round(nearest, -0, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(round(nearest, -0, infinity)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(round(nearest, 0, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(round(nearest, 0, infinity)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(round(nearest, 1, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(round(nearest, 1, infinity)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(round(up, -1, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(round(up, -1, infinity)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(round(up, -0, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(round(up, -0, infinity)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(round(up, 0, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(round(up, 0, infinity)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(round(down, -0, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(round(down, -0, infinity)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(round(down, 0, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(round(down, 0, infinity)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(round(down, 1, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(round(down, 1, infinity)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(mod(-1, -1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(mod(-1, -1)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(mod(-1, 1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(mod(-1, 1)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(mod( 1, -1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(mod( 1, -1)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(mod( 1, 1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(mod( 1, 1)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(rem(-1, -1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(rem(-1, -1)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(rem(-1, 1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(rem(-1, 1)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(rem( 1, -1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(rem( 1, -1)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(rem( 1, 1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(rem( 1, 1)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(asin(-0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(asin(-0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(asin( 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(asin( 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(atan(-0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(atan(-0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(atan( 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(atan( 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(atan2(-0, 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(atan2(-0, 0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(atan2(-0, 1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(atan2(-0, 1)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(atan2(-0, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(atan2(-0, infinity)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(atan2(0, 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(atan2(0, 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(atan2(0, 1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(atan2(0, 1)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(atan2(0, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(atan2(0, infinity)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(atan2(-1, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(atan2(-1, infinity)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(atan2( 1, infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(atan2( 1, infinity)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(pow(-infinity, -2)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(pow(-infinity, -2)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(pow(-infinity, -1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(pow(-infinity, -1)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(pow(-0, 1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(pow(-0, 1)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(pow(-0, 2)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(pow(-0, 2)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(pow(0, 1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(pow(0, 1)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(pow(0, 2)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(pow(0, 2)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(pow(infinity, -2)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(pow(infinity, -2)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(pow(infinity, -1)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(pow(infinity, -1)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(sqrt(-0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(sqrt(-0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(sqrt( 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(sqrt( 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(hypot(-0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(hypot(-0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(hypot( 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(hypot( 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(exp(-infinity)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(exp(-infinity)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(abs(-0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(abs(-0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(abs( 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(abs( 0)), 1) should be used-value-equivalent to 1] + expected: FAIL + + [sign(sign(-0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(sign(-0)), 1) should be used-value-equivalent to -1] + expected: FAIL + + [sign(sign( 0)) should be used-value-equivalent to 0] + expected: FAIL + + [clamp(-1, 1 / sign(sign( 0)), 1) should be used-value-equivalent to 1] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/signs-abs-computed.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/signs-abs-computed.html.ini index 86afe4029a6..fb68814a810 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/signs-abs-computed.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/signs-abs-computed.html.ini @@ -745,3 +745,6 @@ [calc((1em + 1px) * (sign(1em - 10px - 10%) + 1)) should be used-value-equivalent to 21px] expected: FAIL + + [calc(sign(10%) * 100px) should be used-value-equivalent to 100px] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom/CSSStyleSheet-constructable-concat.html.ini b/tests/wpt/meta-legacy-layout/css/cssom/CSSStyleSheet-constructable-concat.html.ini index 45a69e94d18..c4c419ff449 100644 --- a/tests/wpt/meta-legacy-layout/css/cssom/CSSStyleSheet-constructable-concat.html.ini +++ b/tests/wpt/meta-legacy-layout/css/cssom/CSSStyleSheet-constructable-concat.html.ini @@ -1,4 +1,4 @@ [CSSStyleSheet-constructable-concat.html] - expected: FAIL + expected: TIMEOUT [adoptedStyleSheets should allow .concat on empty starting values] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom/HTMLLinkElement-load-event-002.html.ini b/tests/wpt/meta-legacy-layout/css/cssom/HTMLLinkElement-load-event-002.html.ini index 30870e698be..c0bf1e99f81 100644 --- a/tests/wpt/meta-legacy-layout/css/cssom/HTMLLinkElement-load-event-002.html.ini +++ b/tests/wpt/meta-legacy-layout/css/cssom/HTMLLinkElement-load-event-002.html.ini @@ -1,3 +1,3 @@ [HTMLLinkElement-load-event-002.html] [Load event doesn't fire on removed link] - expected: FAIL + expected: [PASS, FAIL] diff --git a/tests/wpt/meta-legacy-layout/dom/events/webkit-transition-end-event.html.ini b/tests/wpt/meta-legacy-layout/dom/events/webkit-transition-end-event.html.ini index b7fe8688a23..eb8b8d11dff 100644 --- a/tests/wpt/meta-legacy-layout/dom/events/webkit-transition-end-event.html.ini +++ b/tests/wpt/meta-legacy-layout/dom/events/webkit-transition-end-event.html.ini @@ -1,4 +1,5 @@ [webkit-transition-end-event.html] + expected: TIMEOUT [dispatchEvent of an transitionend event does not trigger a prefixed event handler or listener] expected: FAIL @@ -12,16 +13,25 @@ expected: FAIL [event types for prefixed and unprefixed transitionend event listeners should be named appropriately] - expected: FAIL + expected: NOTRUN [ontransitionend and onwebkittransitionend are not aliases] expected: FAIL [webkitTransitionEnd event listener should trigger for an animation] - expected: FAIL + expected: TIMEOUT [dispatchEvent of a webkitTransitionEnd event does trigger a prefixed event handler or listener] expected: FAIL [onwebkittransitionend event handler should not trigger if an unprefixed event handler also exists] expected: FAIL + + [webkitTransitionEnd event listener should not trigger if an unprefixed listener also exists] + expected: NOTRUN + + [webkitTransitionEnd event listener should not trigger if an unprefixed event handler also exists] + expected: NOTRUN + + [webkitTransitionEnd event listener is case sensitive] + expected: NOTRUN diff --git a/tests/wpt/meta-legacy-layout/dom/ranges/Range-cloneContents.html.ini b/tests/wpt/meta-legacy-layout/dom/ranges/Range-cloneContents.html.ini new file mode 100644 index 00000000000..e9dec4e7d3f --- /dev/null +++ b/tests/wpt/meta-legacy-layout/dom/ranges/Range-cloneContents.html.ini @@ -0,0 +1,2 @@ +[Range-cloneContents.html] + expected: ERROR diff --git a/tests/wpt/meta-legacy-layout/dom/ranges/Range-deleteContents.html.ini b/tests/wpt/meta-legacy-layout/dom/ranges/Range-deleteContents.html.ini new file mode 100644 index 00000000000..fb958044113 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/dom/ranges/Range-deleteContents.html.ini @@ -0,0 +1,2 @@ +[Range-deleteContents.html] + expected: ERROR diff --git a/tests/wpt/meta-legacy-layout/dom/ranges/Range-extractContents.html.ini b/tests/wpt/meta-legacy-layout/dom/ranges/Range-extractContents.html.ini new file mode 100644 index 00000000000..5ecae010acf --- /dev/null +++ b/tests/wpt/meta-legacy-layout/dom/ranges/Range-extractContents.html.ini @@ -0,0 +1,2 @@ +[Range-extractContents.html] + expected: ERROR diff --git a/tests/wpt/meta-legacy-layout/dom/ranges/Range-insertNode.html.ini b/tests/wpt/meta-legacy-layout/dom/ranges/Range-insertNode.html.ini new file mode 100644 index 00000000000..ca10364a152 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/dom/ranges/Range-insertNode.html.ini @@ -0,0 +1,2 @@ +[Range-insertNode.html] + expected: ERROR diff --git a/tests/wpt/meta-legacy-layout/dom/ranges/Range-surroundContents.html.ini b/tests/wpt/meta-legacy-layout/dom/ranges/Range-surroundContents.html.ini new file mode 100644 index 00000000000..5d76192b344 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/dom/ranges/Range-surroundContents.html.ini @@ -0,0 +1,2 @@ +[Range-surroundContents.html] + expected: ERROR diff --git a/tests/wpt/meta-legacy-layout/dom/xslt/large-cdata.html.ini b/tests/wpt/meta-legacy-layout/dom/xslt/large-cdata.html.ini new file mode 100644 index 00000000000..35649fdefbf --- /dev/null +++ b/tests/wpt/meta-legacy-layout/dom/xslt/large-cdata.html.ini @@ -0,0 +1,2 @@ +[large-cdata.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini b/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini index 741af78eff8..f9de5391ad6 100644 --- a/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini +++ b/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini @@ -146,9 +146,3 @@ [list-style-image sec-fetch-site - HTTPS downgrade-upgrade] expected: FAIL - - [background-image sec-fetch-site - HTTPS downgrade (header not sent)] - expected: TIMEOUT - - [border-image sec-fetch-site - HTTPS downgrade (header not sent)] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/anchor.tentative.https.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/anchor.tentative.https.window.js.ini new file mode 100644 index 00000000000..fedc14fa7cf --- /dev/null +++ b/tests/wpt/meta-legacy-layout/fetch/private-network-access/anchor.tentative.https.window.js.ini @@ -0,0 +1,66 @@ +[anchor.tentative.https.window.html?include=from-private] + [private to local: failed preflight.] + expected: FAIL + + [private to local: missing CORS headers.] + expected: FAIL + + [private to local: missing PNA header.] + expected: FAIL + + [private to local: success.] + expected: FAIL + + +[anchor.tentative.https.window.html?include=from-local] + +[anchor.tentative.https.window.html?include=from-public] + [public to local: failed preflight.] + expected: FAIL + + [public to local: missing CORS headers.] + expected: FAIL + + [public to local: missing PNA header.] + expected: FAIL + + [public to local: success.] + expected: FAIL + + [public to private: failed preflight.] + expected: FAIL + + [public to private: missing CORS headers.] + expected: FAIL + + [public to private: missing PNA header.] + expected: FAIL + + [public to private: success.] + expected: FAIL + + +[anchor.tentative.https.window.html?include=from-treat-as-public] + [treat-as-public-address to local: failed preflight.] + expected: FAIL + + [treat-as-public-address to local: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to local: missing PNA header.] + expected: FAIL + + [treat-as-public-address to local: success.] + expected: FAIL + + [treat-as-public-address to private: failed preflight.] + expected: FAIL + + [treat-as-public-address to private: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to private: missing PNA header.] + expected: FAIL + + [treat-as-public-address to private: success.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/anchor.tentative.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/anchor.tentative.window.js.ini new file mode 100644 index 00000000000..17d7f91535a --- /dev/null +++ b/tests/wpt/meta-legacy-layout/fetch/private-network-access/anchor.tentative.window.js.ini @@ -0,0 +1,15 @@ +[anchor.tentative.window.html] + [private to local: failure.] + expected: FAIL + + [public to local: failure.] + expected: FAIL + + [public to private: failure.] + expected: FAIL + + [treat-as-public-address to local: failure.] + expected: FAIL + + [treat-as-public-address to private: failure.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/iframe.tentative.https.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/iframe.tentative.https.window.js.ini index 22ec14fd43c..4a8188e4633 100644 --- a/tests/wpt/meta-legacy-layout/fetch/private-network-access/iframe.tentative.https.window.js.ini +++ b/tests/wpt/meta-legacy-layout/fetch/private-network-access/iframe.tentative.https.window.js.ini @@ -51,6 +51,12 @@ [private to local: success.] expected: FAIL + [private to local: missing CORS headers.] + expected: FAIL + + [private to local: missing PNA header.] + expected: FAIL + [iframe.tentative.https.window.html?include=from-public] [public to local: failed preflight.] @@ -65,6 +71,18 @@ [public to private: success.] expected: FAIL + [public to local: missing CORS headers.] + expected: FAIL + + [public to local: missing PNA header.] + expected: FAIL + + [public to private: missing CORS headers.] + expected: FAIL + + [public to private: missing PNA header.] + expected: FAIL + [iframe.tentative.https.window.html?include=from-treat-as-public] [treat-as-public-address to local: failed preflight.] @@ -79,5 +97,17 @@ [treat-as-public-address to private: success.] expected: FAIL + [treat-as-public-address to local: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to local: missing PNA header.] + expected: FAIL + + [treat-as-public-address to private: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to private: missing PNA header.] + expected: FAIL + [iframe.tentative.https.window.html?include=from-local] diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/window-open.tentative.https.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/window-open.tentative.https.window.js.ini index f0d5b699832..f96c6c1c2a2 100644 --- a/tests/wpt/meta-legacy-layout/fetch/private-network-access/window-open.tentative.https.window.js.ini +++ b/tests/wpt/meta-legacy-layout/fetch/private-network-access/window-open.tentative.https.window.js.ini @@ -43,3 +43,71 @@ [treat-as-public-address to private: missing PNA header.] expected: FAIL + + +[window-open.tentative.https.window.html?include=from-public] + [public to local: failed preflight.] + expected: FAIL + + [public to local: missing CORS headers.] + expected: FAIL + + [public to local: missing PNA header.] + expected: FAIL + + [public to local: success.] + expected: FAIL + + [public to private: failed preflight.] + expected: FAIL + + [public to private: missing CORS headers.] + expected: FAIL + + [public to private: missing PNA header.] + expected: FAIL + + [public to private: success.] + expected: FAIL + + +[window-open.tentative.https.window.html?include=from-treat-as-public] + [treat-as-public-address to local: failed preflight.] + expected: FAIL + + [treat-as-public-address to local: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to local: missing PNA header.] + expected: FAIL + + [treat-as-public-address to local: success.] + expected: FAIL + + [treat-as-public-address to private: failed preflight.] + expected: FAIL + + [treat-as-public-address to private: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to private: missing PNA header.] + expected: FAIL + + [treat-as-public-address to private: success.] + expected: FAIL + + +[window-open.tentative.https.window.html?include=from-local] + +[window-open.tentative.https.window.html?include=from-private] + [private to local: failed preflight.] + expected: FAIL + + [private to local: missing CORS headers.] + expected: FAIL + + [private to local: missing PNA header.] + expected: FAIL + + [private to local: success.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini index 530635e744f..1bca09f21d6 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini @@ -4,3 +4,6 @@ [Navigating to a different document with link click] expected: FAIL + + [Navigating to a different document with form submission] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini index 51fd557bd7f..d19311abec9 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini @@ -7,3 +7,9 @@ [load & pageshow events do not fire on contentWindow of diff --git a/tests/wpt/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-about-blank.tentative.html b/tests/wpt/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-about-blank.tentative.html new file mode 100644 index 00000000000..a5a9843ac80 --- /dev/null +++ b/tests/wpt/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-about-blank.tentative.html @@ -0,0 +1,13 @@ + +CSS Color Adjustment Test: about:blank doesn't cause a white backdrop in dark mode even though technically its color-scheme is mismatched + + + + +

Should not see a white frame below

+ + diff --git a/tests/wpt/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-blank.html b/tests/wpt/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-blank.html new file mode 100644 index 00000000000..dd540f41a3c --- /dev/null +++ b/tests/wpt/tests/css/css-color-adjust/rendering/dark-color-scheme/support/dark-frame-blank.html @@ -0,0 +1,4 @@ + + diff --git a/tests/wpt/tests/css/css-color/parsing/color-computed-color-mix-function.html b/tests/wpt/tests/css/css-color/parsing/color-computed-color-mix-function.html index 9f77afed0fd..f0e2f6cce02 100644 --- a/tests/wpt/tests/css/css-color/parsing/color-computed-color-mix-function.html +++ b/tests/wpt/tests/css/css-color/parsing/color-computed-color-mix-function.html @@ -254,6 +254,8 @@ fuzzy_test_computed_color(`color-mix(in lch, lch(0.1 0.2 30deg / 25%) 0%, lch(0.5 0.5 none / none))`, `lch(0.5 0.5 30 / 0.25)`); fuzzy_test_computed_color(`color-mix(in lch, lch(0.1 0.2 30deg / 25%) 0%, lch(none none none / 0.5))`, `lch(0.1 0.2 30 / 0.5)`); fuzzy_test_computed_color(`color-mix(in lch, lch(0.1 0.2 30deg / 25%) 0%, lch(0.5 none none / 0.5))`, `lch(0.5 0.2 30 / 0.5)`); + // Achromatic colors should have powerless hues. https://www.w3.org/TR/css-color-4/#lab-to-lch + fuzzy_test_computed_color(`color-mix(in lch, lab(50 0 0), black)`, `lch(25 0 none)`); // oklch() fuzzy_test_computed_color(`color-mix(in oklch, oklch(0.1 0.2 30deg), oklch(0.5 0.6 70deg))`, `oklch(0.3 0.4 50)`); @@ -332,6 +334,8 @@ fuzzy_test_computed_color(`color-mix(in oklch, oklch(0.1 0.2 30deg / 25%) 0%, oklch(0.5 0.5 none / none))`, `oklch(0.5 0.5 30 / 0.25)`); fuzzy_test_computed_color(`color-mix(in oklch, oklch(0.1 0.2 30deg / 25%) 0%, oklch(none none none / 0.5))`, `oklch(0.1 0.2 30 / 0.5)`); fuzzy_test_computed_color(`color-mix(in oklch, oklch(0.1 0.2 30deg / 25%) 0%, oklch(0.5 none none / 0.5))`, `oklch(0.5 0.2 30 / 0.5)`); + // Achromatic colors should have powerless hues. https://www.w3.org/TR/css-color-4/#lab-to-lch + fuzzy_test_computed_color(`color-mix(in oklch, oklab(0.5 0 0), black)`, `oklch(0.25 0 none)`); // lab() fuzzy_test_computed_color(`color-mix(in lab, lab(10 20 30), lab(50 60 70))`, `lab(30 40 50)`); diff --git a/tests/wpt/tests/css/css-color/parsing/color-invalid-relative-color.html b/tests/wpt/tests/css/css-color/parsing/color-invalid-relative-color.html index db0aa0b2fe8..9746d6ed20c 100644 --- a/tests/wpt/tests/css/css-color/parsing/color-invalid-relative-color.html +++ b/tests/wpt/tests/css/css-color/parsing/color-invalid-relative-color.html @@ -36,11 +36,7 @@ // hsl(from ...) // Testing invalid values. - test_invalid_value(`color`, `hsl(from rebeccapurple h 10% 10)`); - test_invalid_value(`color`, `hsl(from rebeccapurple h 10 10%)`); test_invalid_value(`color`, `hsl(from rebeccapurple 10% s l)`); - test_invalid_value(`color`, `hsl(from rgb(10%, 20%, 30%, 40%) h 10% 10)`); - test_invalid_value(`color`, `hsl(from rgb(10%, 20%, 30%, 40%) h 10 10%)`); test_invalid_value(`color`, `hsl(from rgb(10%, 20%, 30%, 40%) 10% s l)`); // Testing invalid component names @@ -55,11 +51,7 @@ // hwb(from ...) // Testing invalid values. - test_invalid_value(`color`, `hwb(from rebeccapurple h 10% 10)`); - test_invalid_value(`color`, `hwb(from rebeccapurple h 10 10%)`); test_invalid_value(`color`, `hwb(from rebeccapurple 10% w b)`); - test_invalid_value(`color`, `hwb(from rgb(10%, 20%, 30%, 40%) h 10% 10)`); - test_invalid_value(`color`, `hwb(from rgb(10%, 20%, 30%, 40%) h 10 10%)`); test_invalid_value(`color`, `hwb(from rgb(10%, 20%, 30%, 40%) 10% w b)`); // Testing invalid component names diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-vs-scrollIntoView-003.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-vs-scrollIntoView-003.html index 685dba0b7b4..65e48663a91 100644 --- a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-vs-scrollIntoView-003.html +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-vs-scrollIntoView-003.html @@ -50,10 +50,14 @@ diff --git a/tests/wpt/tests/css/css-grid/WEB_FEATURES.yml b/tests/wpt/tests/css/css-grid/WEB_FEATURES.yml new file mode 100644 index 00000000000..07a148beb5a --- /dev/null +++ b/tests/wpt/tests/css/css-grid/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: grid + files: "**" diff --git a/tests/wpt/tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-001.html b/tests/wpt/tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-001.tentative.html similarity index 97% rename from tests/wpt/tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-001.html rename to tests/wpt/tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-001.tentative.html index 08d23c6b605..144ded9f36f 100644 --- a/tests/wpt/tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-001.html +++ b/tests/wpt/tests/css/css-grid/grid-definition/grid-auto-repeat-max-size-001.tentative.html @@ -3,6 +3,7 @@ CSS Grid Layout Test: Auto repeat tracks and max sizes + + +
+ + +
+ diff --git a/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-ensure-keyframe-update.html b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-ensure-keyframe-update.html new file mode 100644 index 00000000000..a20595ead87 --- /dev/null +++ b/tests/wpt/tests/css/css-masking/clip-path/animations/clip-path-animation-ensure-keyframe-update.html @@ -0,0 +1,38 @@ + + + + + + + + + +
+ + + + + diff --git a/tests/wpt/tests/css/css-outline/outline-width-rounding.tentative.html b/tests/wpt/tests/css/css-outline/outline-width-rounding.tentative.html index 162d938cf9c..8a4a724bbe5 100644 --- a/tests/wpt/tests/css/css-outline/outline-width-rounding.tentative.html +++ b/tests/wpt/tests/css/css-outline/outline-width-rounding.tentative.html @@ -16,8 +16,8 @@

Test passes if outline widths are rounded up - when they are greater than 0 and less than 1, - and rounded down when they are greater than 1. + when they are greater than 0px and less than 1px, + and rounded down when they are greater than 1px.

diff --git a/tests/wpt/tests/css/css-scroll-snap/input/snap-area-overflow-boundary.html b/tests/wpt/tests/css/css-scroll-snap/input/snap-area-overflow-boundary-viewport-covering.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-scroll-snap/input/snap-area-overflow-boundary.html rename to tests/wpt/tests/css/css-scroll-snap/input/snap-area-overflow-boundary-viewport-covering.tentative.html diff --git a/tests/wpt/tests/css/css-scroll-snap/overflowing-snap-areas-nested.tentative.html b/tests/wpt/tests/css/css-scroll-snap/overflowing-snap-areas-nested.tentative.html new file mode 100644 index 00000000000..046f3c88ed9 --- /dev/null +++ b/tests/wpt/tests/css/css-scroll-snap/overflowing-snap-areas-nested.tentative.html @@ -0,0 +1,108 @@ + + + + + +
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/tests/wpt/tests/css/css-scroll-snap/overflowing-snap-areas.html b/tests/wpt/tests/css/css-scroll-snap/overflowing-snap-areas.html index 38002c3edda..1e727108119 100644 --- a/tests/wpt/tests/css/css-scroll-snap/overflowing-snap-areas.html +++ b/tests/wpt/tests/css/css-scroll-snap/overflowing-snap-areas.html @@ -128,20 +128,6 @@ test(() => { }, "Snaps to a snap area (400) that is closer than the position that reveals " + "the space between snap areas (600) within the larger snap area on y."); -test(() => { - scroller_x.scrollTo(950, 0); - assert_equals(scroller_x.scrollLeft, 1000); - assert_equals(scroller_x.scrollTop, 0); -}, "Snap within a snap area which covers snapport on x selects a valid snap " + - "position that avoids the overlapping areas at 800-1000 and 1400-1600."); - -test(() => { - scroller_y.scrollTo(0, 950); - assert_equals(scroller_y.scrollLeft, 0); - assert_equals(scroller_y.scrollTop, 1000); -}, "Snap within a snap area which covers snapport on y selects a valid snap " + - "position that avoids the overlapping areas at 800-1000 and 1400-1600."); - test(() => { scroller_x.scrollTo(1650, 0); assert_equals(scroller_x.scrollLeft, 1650); diff --git a/tests/wpt/tests/css/css-scroll-snap/scroll-snap-nested-snap-area-layout-changed.html b/tests/wpt/tests/css/css-scroll-snap/scroll-snap-nested-snap-area-layout-changed.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-scroll-snap/scroll-snap-nested-snap-area-layout-changed.html rename to tests/wpt/tests/css/css-scroll-snap/scroll-snap-nested-snap-area-layout-changed.tentative.html diff --git a/tests/wpt/tests/css/css-scroll-snap/scroll-snap-stop-002-nested.tentative.html b/tests/wpt/tests/css/css-scroll-snap/scroll-snap-stop-002-nested.tentative.html new file mode 100644 index 00000000000..34b6dc97e22 --- /dev/null +++ b/tests/wpt/tests/css/css-scroll-snap/scroll-snap-stop-002-nested.tentative.html @@ -0,0 +1,61 @@ + + + + + + + +
+
+
+
+
+ + diff --git a/tests/wpt/tests/css/css-scroll-snap/scroll-snap-stop-002.html b/tests/wpt/tests/css/css-scroll-snap/scroll-snap-stop-002.html index 0951604a74b..1aae7aea604 100644 --- a/tests/wpt/tests/css/css-scroll-snap/scroll-snap-stop-002.html +++ b/tests/wpt/tests/css/css-scroll-snap/scroll-snap-stop-002.html @@ -111,16 +111,6 @@ div {
- -
-
-
-
-
- diff --git a/tests/wpt/tests/css/css-scroll-snap/snap-into-covering-area.html b/tests/wpt/tests/css/css-scroll-snap/snap-into-covering-area.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-scroll-snap/snap-into-covering-area.html rename to tests/wpt/tests/css/css-scroll-snap/snap-into-covering-area.tentative.html diff --git a/tests/wpt/tests/css/css-transforms/parsing/rotate-parsing-computed.html b/tests/wpt/tests/css/css-transforms/parsing/rotate-parsing-computed.html new file mode 100644 index 00000000000..ae1cade666c --- /dev/null +++ b/tests/wpt/tests/css/css-transforms/parsing/rotate-parsing-computed.html @@ -0,0 +1,47 @@ + + + + +CSS Transform Module Level 2: rotate computed values. + + + + + + + + +
+ + + diff --git a/tests/wpt/tests/css/css-transforms/parsing/scale-parsing-computed.html b/tests/wpt/tests/css/css-transforms/parsing/scale-parsing-computed.html new file mode 100644 index 00000000000..e01550b396f --- /dev/null +++ b/tests/wpt/tests/css/css-transforms/parsing/scale-parsing-computed.html @@ -0,0 +1,44 @@ + + + + +CSS Transform Module Level 2: scale computed values. + + + + + + + + +
+ + + diff --git a/tests/wpt/tests/css/css-transforms/parsing/translate-parsing-computed.html b/tests/wpt/tests/css/css-transforms/parsing/translate-parsing-computed.html new file mode 100644 index 00000000000..a88cc652fa4 --- /dev/null +++ b/tests/wpt/tests/css/css-transforms/parsing/translate-parsing-computed.html @@ -0,0 +1,42 @@ + + + + +CSS Transform Module Level 2: translate computed values. + + + + + + + + +
+ + + diff --git a/tests/wpt/tests/css/css-transforms/transform-box/svgbox-stroke-box-003.html b/tests/wpt/tests/css/css-transforms/transform-box/svgbox-stroke-box-003.html new file mode 100644 index 00000000000..f132eb41013 --- /dev/null +++ b/tests/wpt/tests/css/css-transforms/transform-box/svgbox-stroke-box-003.html @@ -0,0 +1,21 @@ + +transform-box: stroke-box, stroke with vector-effect: non-scaling-stroke + + + + + + + + + + diff --git a/tests/wpt/tests/css/css-transforms/transform-box/svgbox-stroke-box-004.html b/tests/wpt/tests/css/css-transforms/transform-box/svgbox-stroke-box-004.html new file mode 100644 index 00000000000..0046295cf9a --- /dev/null +++ b/tests/wpt/tests/css/css-transforms/transform-box/svgbox-stroke-box-004.html @@ -0,0 +1,21 @@ + +transform-box: border-box, stroke with vector-effect: non-scaling-stroke + + + + + + + + + + diff --git a/tests/wpt/tests/css/css-transitions/animations/animate-with-color-mix.html b/tests/wpt/tests/css/css-transitions/animations/animate-with-color-mix.html new file mode 100644 index 00000000000..3e630a7a2b1 --- /dev/null +++ b/tests/wpt/tests/css/css-transitions/animations/animate-with-color-mix.html @@ -0,0 +1,146 @@ + + + + + + + CSS transitions with color-mix + + + + + + + +
+
+
+
+
+
+ + + diff --git a/tests/wpt/tests/css/css-values/minmax-length-percent-serialize.html b/tests/wpt/tests/css/css-values/minmax-length-percent-serialize.html index 43d2806658b..20d54d8cb0c 100644 --- a/tests/wpt/tests/css/css-values/minmax-length-percent-serialize.html +++ b/tests/wpt/tests/css/css-values/minmax-length-percent-serialize.html @@ -123,4 +123,11 @@ test_serialization( 'calc(25% + 2em + 30px)', 'calc(25% + 62px)', '87px'); + +test_serialization( + 'max((min(10%, 30px) + 10px) * 2 + 10px, 5em + 5%)', + 'max(10px + (10px + min(10%, 30px)) * 2, 5% + 5em)', + 'max(10px + (10px + min(10%, 30px)) * 2, 5% + 80px)', + '85px', + prop='width'); diff --git a/tests/wpt/tests/css/css-values/signed-zero.html b/tests/wpt/tests/css/css-values/signed-zero.html new file mode 100644 index 00000000000..6ede4bbb0ec --- /dev/null +++ b/tests/wpt/tests/css/css-values/signed-zero.html @@ -0,0 +1,133 @@ + + +CSS Values and Units Test: signed zero + + + + + + + + +
+ diff --git a/tests/wpt/tests/css/css-values/signs-abs-computed.html b/tests/wpt/tests/css/css-values/signs-abs-computed.html index 73b1e0d1c32..8bad89e557b 100644 --- a/tests/wpt/tests/css/css-values/signs-abs-computed.html +++ b/tests/wpt/tests/css/css-values/signs-abs-computed.html @@ -204,5 +204,6 @@ test_length_equals('sign(10px - 1em)', '0', 'fontSize=10px'); test_length_equals('sign(10px - 2em)', '-1', 'fontSize=10px'); document.getElementById('container').style.fontSize = '20px'; +test_math_used('calc(sign(10%) * 100px)', '100px'); diff --git a/tests/wpt/tests/css/css-view-transitions/no-crash-set-exception.html b/tests/wpt/tests/css/css-view-transitions/no-crash-set-exception.html index 06e519e447c..e1596cf76e5 100644 --- a/tests/wpt/tests/css/css-view-transitions/no-crash-set-exception.html +++ b/tests/wpt/tests/css/css-view-transitions/no-crash-set-exception.html @@ -28,10 +28,6 @@ html::view-transition-new(shared) {
diff --git a/tests/wpt/tests/css/cssom/CSSStyleSheet-constructable-concat-ref.html b/tests/wpt/tests/css/cssom/CSSStyleSheet-constructable-concat-ref.html index 1c6b6784c9c..b4533234590 100644 --- a/tests/wpt/tests/css/cssom/CSSStyleSheet-constructable-concat-ref.html +++ b/tests/wpt/tests/css/cssom/CSSStyleSheet-constructable-concat-ref.html @@ -5,6 +5,13 @@ This should be green
This should be green +
Tests:
+PASS
+PASS
+PASS
+PASS
+
+ -
Page 1
-
Page 2
-
Page 3
+
Page 1
+
Page 2
+
Page 3
diff --git a/tests/wpt/tests/css/printing/page-size-002-print-ref.html b/tests/wpt/tests/css/printing/page-size-002-print-ref.html index aa8cb6edcd2..78a16469436 100644 --- a/tests/wpt/tests/css/printing/page-size-002-print-ref.html +++ b/tests/wpt/tests/css/printing/page-size-002-print-ref.html @@ -1,7 +1,10 @@
Page 1
diff --git a/tests/wpt/tests/css/printing/page-size-002-print.html b/tests/wpt/tests/css/printing/page-size-002-print.html index 8ecf38107b8..243c382ca2c 100644 --- a/tests/wpt/tests/css/printing/page-size-002-print.html +++ b/tests/wpt/tests/css/printing/page-size-002-print.html @@ -3,7 +3,10 @@
Page 1
diff --git a/tests/wpt/tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html b/tests/wpt/tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html index 97702e546f3..01b3df961a2 100644 --- a/tests/wpt/tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html +++ b/tests/wpt/tests/css/selectors/invalidation/user-action-pseudo-classes-in-has.html @@ -22,6 +22,7 @@
+
No :hover
Hover and click me
Focus me
Focus me
@@ -37,47 +38,66 @@
+ + + + + + diff --git a/tests/wpt/tests/dom/nodes/attributes.html b/tests/wpt/tests/dom/nodes/attributes.html index c6db7eb8aa4..47f51dff1bc 100644 --- a/tests/wpt/tests/dom/nodes/attributes.html +++ b/tests/wpt/tests/dom/nodes/attributes.html @@ -588,7 +588,32 @@ test(function() { el.setAttributeNode(attr2); assert_equals(el.getAttributeNodeNS("ns1", "name").value, "value1"); assert_equals(el.getAttributeNodeNS("ns1", "NAME").value, "VALUE2"); -}, "setAttributeNode doesn't have case-insensitivity even with an HTMLElement") +}, "setAttributeNode doesn't have case-insensitivity even with an HTMLElement 1") + +test(function() { + var el = document.createElement("div"); + var attr1 = document.createAttributeNS("ns1", "FOOBAR"); + var attr2 = document.createAttributeNS("ns1", "FOOBAR"); + assert_equals(el.setAttributeNode(attr1), null); + assert_equals(attr1.ownerElement, el); + assert_equals(attr2.ownerElement, null); + var oldAttr = el.setAttributeNode(attr2); + assert_equals(oldAttr, attr1); + assert_equals(attr1.ownerElement, null); + assert_equals(attr2.ownerElement, el); +}, "setAttributeNode doesn't have case-insensitivity even with an HTMLElement 2") + +test(function() { + var el = document.createElement("div"); + var attr1 = document.createAttributeNS("ns1", "foobar"); + var attr2 = document.createAttributeNS("ns1", "FOOBAR"); + assert_equals(el.setAttributeNode(attr1), null); + assert_equals(attr1.ownerElement, el); + assert_equals(attr2.ownerElement, null); + assert_equals(el.setAttributeNode(attr2), null); + assert_equals(attr1.ownerElement, el); + assert_equals(attr2.ownerElement, el); +}, "setAttributeNode doesn't have case-insensitivity even with an HTMLElement 3") test(function() { var el = document.createElement("div") diff --git a/tests/wpt/tests/dom/xslt/large-cdata-ref.html b/tests/wpt/tests/dom/xslt/large-cdata-ref.html new file mode 100644 index 00000000000..7f80540c5f8 --- /dev/null +++ b/tests/wpt/tests/dom/xslt/large-cdata-ref.html @@ -0,0 +1,13 @@ + + + diff --git a/tests/wpt/tests/dom/xslt/large-cdata.html b/tests/wpt/tests/dom/xslt/large-cdata.html new file mode 100644 index 00000000000..9c83b731bd0 --- /dev/null +++ b/tests/wpt/tests/dom/xslt/large-cdata.html @@ -0,0 +1,17 @@ + + + + + + + diff --git a/tests/wpt/tests/dom/xslt/resources/large_CDATA.xml b/tests/wpt/tests/dom/xslt/resources/large_CDATA.xml new file mode 100644 index 00000000000..9b3f5b90357 --- /dev/null +++ b/tests/wpt/tests/dom/xslt/resources/large_CDATA.xml @@ -0,0 +1,156982 @@ + + + + + Empire Burlesque + Bob Dylan + USA + Columbia + 10.90 + 1985 + + + + + Hide your heart + Bonnie Tyler + UK + CBS Records + 9.90 + 1988 + + + + Greatest Hits + Dolly Parton + USA + RCA + 9.90 + 1982 + + + + Still got the blues + Gary Moore + UK + Virgin records + 10.20 + 1990 + + + Eros + Eros Ramazzotti + EU + BMG + 9.90 + 1997 + + + One night only + Bee Gees + UK + Polydor + 10.90 + 1998 + + + Sylvias Mother + Dr.Hook + UK + CBS + 8.10 + 1973 + + + Maggie May + Rod Stewart + UK + Pickwick + 8.50 + 1990 + + + Romanza + Andrea Bocelli + EU + Polydor + 10.80 + 1996 + + + When a man loves a woman + Percy Sledge + USA + Atlantic + 8.70 + 1987 + + + Black angel + Savage Rose + EU + Mega + 10.90 + 1995 + + + 1999 Grammy Nominees + Many + USA + Grammy + 10.20 + 1999 + + + For the good times + Kenny Rogers + UK + Mucik + 8.70 + 1995 + + + Big Willie style + Will Smith + USA + Columbia + 9.90 + 1997 + + + Tupelo Honey + Van Morrison + UK + Polydor + 8.20 + 1971 + + + Soulsville + Jorn Hoel + Norway + WEA + 7.90 + 1996 + + + The very best of + Cat Stevens + UK + Island + 8.90 + 1990 + + + Stop + Sam Brown + UK + A and M + 8.90 + 1988 + + + Bridge of Spies + T`Pau + UK + Siren + 7.90 + 1987 + + + Private Dancer + Tina Turner + UK + Capitol + 8.90 + 1983 + + + Midt om natten + Kim Larsen + EU + Medley + 7.80 + 1983 + + + Pavarotti Gala Concert + Luciano Pavarotti + UK + DECCA + 9.90 + 1991 + + + The dock of the bay + Otis Redding + USA + Stax Records + 7.90 + 1968 + + + Picture book + Simply Red + EU + Elektra + 7.20 + 1985 + + + Red + The Communards + UK + London + 7.80 + 1987 + + + Unchain my heart + Joe Cocker + USA + EMI + 8.20 + 1987 + + + diff --git a/tests/wpt/tests/dom/xslt/resources/large_CDATA_ref.html b/tests/wpt/tests/dom/xslt/resources/large_CDATA_ref.html new file mode 100644 index 00000000000..3c68a6fc53b --- /dev/null +++ b/tests/wpt/tests/dom/xslt/resources/large_CDATA_ref.html @@ -0,0 +1,119 @@ + + +

My CD Collection

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TitleArtist
Empire BurlesqueBob Dylan
Hide your heartBonnie Tyler
Greatest HitsDolly Parton
Still got the bluesGary Moore
ErosEros Ramazzotti
One night onlyBee Gees
Sylvias MotherDr.Hook
Maggie MayRod Stewart
RomanzaAndrea Bocelli
When a man loves a womanPercy Sledge
Black angelSavage Rose
1999 Grammy NomineesMany
For the good timesKenny Rogers
Big Willie styleWill Smith
Tupelo HoneyVan Morrison
SoulsvilleJorn Hoel
The very best ofCat Stevens
StopSam Brown
Bridge of SpiesT`Pau
Private DancerTina Turner
Midt om nattenKim Larsen
Pavarotti Gala ConcertLuciano Pavarotti
The dock of the bayOtis Redding
Picture bookSimply Red
RedThe Communards
Unchain my heartJoe Cocker
diff --git a/tests/wpt/tests/dom/xslt/resources/xml2html.xsl b/tests/wpt/tests/dom/xslt/resources/xml2html.xsl new file mode 100644 index 00000000000..07b967500ff --- /dev/null +++ b/tests/wpt/tests/dom/xslt/resources/xml2html.xsl @@ -0,0 +1,25 @@ + + + + + + +

My CD Collection

+ + + + + + + + + + + +
TitleArtist
+ + +
+ +
diff --git a/tests/wpt/tests/editing/crashtests/delete-from-after-empty-table-header-grouped-element.html b/tests/wpt/tests/editing/crashtests/delete-from-after-empty-table-header-grouped-element.html new file mode 100644 index 00000000000..e6ad4fa9e36 --- /dev/null +++ b/tests/wpt/tests/editing/crashtests/delete-from-after-empty-table-header-grouped-element.html @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/tests/fetch/private-network-access/anchor.tentative.https.window.js b/tests/wpt/tests/fetch/private-network-access/anchor.tentative.https.window.js new file mode 100644 index 00000000000..8ad99b1ee9c --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/anchor.tentative.https.window.js @@ -0,0 +1,190 @@ +// META: script=/common/subset-tests-by-key.js +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=resources/support.sub.js +// META: variant=?include=from-local +// META: variant=?include=from-private +// META: variant=?include=from-public +// META: variant=?include=from-treat-as-public +// +// These tests verify that secure contexts can navigate to less-public address +// spaces via an anchor link iff the target server responds affirmatively to +// preflight requests. + +setup(() => { + assert_true(window.isSecureContext); +}); + +// Source: secure local context. +// +// All fetches unaffected by Private Network Access. + +subsetTestByKey("from-local", promise_test_parallel, t => anchorTest(t, { + source: { server: Server.HTTPS_LOCAL }, + target: { server: Server.HTTPS_LOCAL }, + expected: NavigationTestResult.SUCCESS, +}), "local to local: no preflight required."); + +subsetTestByKey("from-local", promise_test_parallel, t => anchorTest(t, { + source: { server: Server.HTTPS_LOCAL }, + target: { server: Server.HTTPS_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "local to private: no preflight required."); + +subsetTestByKey("from-local", promise_test_parallel, t => anchorTest(t, { + source: { server: Server.HTTPS_LOCAL }, + target: { server: Server.HTTPS_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "local to public: no preflight required."); + +// Generates tests of preflight behavior for a single (source, target) pair. +// +// Scenarios: +// +// - preflight response has non-2xx HTTP code +// - preflight response is missing CORS headers +// - preflight response is missing the PNA-specific `Access-Control` header +// - success +// +function makePreflightTests({ + key, + sourceName, + sourceServer, + sourceTreatAsPublic, + targetName, + targetServer, +}) { + const prefix = + `${sourceName} to ${targetName}: `; + + const source = { + server: sourceServer, + treatAsPublic: sourceTreatAsPublic, + }; + + promise_test_parallel(t => anchorTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.failure() }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "failed preflight."); + + promise_test_parallel(t => anchorTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.noCorsHeader(token()) }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "missing CORS headers."); + + promise_test_parallel(t => anchorTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.noPnaHeader(token()) }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "missing PNA header."); + + promise_test_parallel(t => anchorTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.navigation(token()) }, + }, + expected: NavigationTestResult.SUCCESS, + }), prefix + "success."); +} + +// Source: private secure context. +// +// Fetches to the local address space require a successful preflight response +// carrying a PNA-specific header. + +subsetTestByKey('from-private', makePreflightTests, { + sourceServer: Server.HTTPS_PRIVATE, + sourceName: 'private', + targetServer: Server.HTTPS_LOCAL, + targetName: 'local', +}); + +subsetTestByKey("from-private", promise_test_parallel, t => anchorTest(t, { + source: { server: Server.HTTPS_PRIVATE }, + target: { server: Server.HTTPS_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "private to private: no preflight required."); + +subsetTestByKey("from-private", promise_test_parallel, t => anchorTest(t, { + source: { server: Server.HTTPS_PRIVATE }, + target: { server: Server.HTTPS_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "private to public: no preflight required."); + +// Source: public secure context. +// +// Fetches to the local and private address spaces require a successful +// preflight response carrying a PNA-specific header. + +subsetTestByKey('from-public', makePreflightTests, { + sourceServer: Server.HTTPS_PUBLIC, + sourceName: "public", + targetServer: Server.HTTPS_LOCAL, + targetName: "local", +}); + +subsetTestByKey('from-public', makePreflightTests, { + sourceServer: Server.HTTPS_PUBLIC, + sourceName: "public", + targetServer: Server.HTTPS_PRIVATE, + targetName: "private", +}); + +subsetTestByKey("from-public", promise_test_parallel, t => anchorTest(t, { + source: { server: Server.HTTPS_PUBLIC }, + target: { server: Server.HTTPS_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "public to public: no preflight required."); + +// The following tests verify that `CSP: treat-as-public-address` makes +// documents behave as if they had been served from a public IP address. + +subsetTestByKey('from-treat-as-public', makePreflightTests, { + sourceServer: Server.HTTPS_LOCAL, + sourceTreatAsPublic: true, + sourceName: "treat-as-public-address", + targetServer: Server.OTHER_HTTPS_LOCAL, + targetName: "local", +}); + +subsetTestByKey("from-treat-as-public", promise_test_parallel, + t => anchorTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: {server: Server.HTTPS_LOCAL}, + expected: NavigationTestResult.SUCCESS, + }), + 'treat-as-public-address to local (same-origin): no preflight required.'); + +subsetTestByKey('from-treat-as-public', makePreflightTests, { + sourceServer: Server.HTTPS_LOCAL, + sourceTreatAsPublic: true, + sourceName: 'treat-as-public-address', + targetServer: Server.HTTPS_PRIVATE, + targetName: 'private', +}); + +subsetTestByKey("from-treat-as-public", promise_test_parallel, + t => anchorTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: {server: Server.HTTPS_PUBLIC}, + expected: NavigationTestResult.SUCCESS, + }), + 'treat-as-public-address to public: no preflight required.'); diff --git a/tests/wpt/tests/fetch/private-network-access/anchor.tentative.window.js b/tests/wpt/tests/fetch/private-network-access/anchor.tentative.window.js new file mode 100644 index 00000000000..60ccbde74d6 --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/anchor.tentative.window.js @@ -0,0 +1,94 @@ +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=resources/support.sub.js +// +// Spec: https://wicg.github.io/private-network-access/ +// +// These tests verify that non-secure contexts cannot open a new window via an +// anchor link to less-public address spaces. + +setup(() => { + // Making sure we are in a non secure context, as expected. + assert_false(window.isSecureContext); +}); + +promise_test_parallel(t => anchorTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.SUCCESS, +}), "local to local: no preflight required."); + +promise_test_parallel(t => anchorTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "local to private: no preflight required."); + +promise_test_parallel(t => anchorTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "local to public: no preflight required."); + +promise_test_parallel(t => anchorTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "private to local: failure."); + +promise_test_parallel(t => anchorTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "private to private: no preflight required."); + +promise_test_parallel(t => anchorTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "private to public: no preflight required."); + +promise_test_parallel(t => anchorTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "public to local: failure."); + +promise_test_parallel(t => anchorTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.FAILURE, +}), "public to private: failure."); + +promise_test_parallel(t => anchorTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "public to public: no preflight required."); + +promise_test_parallel(t => anchorTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "treat-as-public-address to local: failure."); + +promise_test_parallel(t => anchorTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.FAILURE, +}), "treat-as-public-address to private: failure."); + +promise_test_parallel(t => anchorTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "treat-as-public-address to public: no preflight required."); diff --git a/tests/wpt/tests/fetch/private-network-access/resources/anchor.html b/tests/wpt/tests/fetch/private-network-access/resources/anchor.html new file mode 100644 index 00000000000..0780b3fa502 --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/resources/anchor.html @@ -0,0 +1,16 @@ + + +Anchor + + diff --git a/tests/wpt/tests/fetch/private-network-access/resources/iframed-no-preflight-received.html b/tests/wpt/tests/fetch/private-network-access/resources/iframed-no-preflight-received.html new file mode 100644 index 00000000000..20b5150d44a --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/resources/iframed-no-preflight-received.html @@ -0,0 +1,7 @@ + + +Iframed + diff --git a/tests/wpt/tests/fetch/private-network-access/resources/no-preflight-received.html b/tests/wpt/tests/fetch/private-network-access/resources/no-preflight-received.html new file mode 100644 index 00000000000..5ee533e1820 --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/resources/no-preflight-received.html @@ -0,0 +1,6 @@ + + +No preflight received + diff --git a/tests/wpt/tests/fetch/private-network-access/resources/openee.html b/tests/wpt/tests/fetch/private-network-access/resources/openee.html new file mode 100644 index 00000000000..8f0a859cb32 --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/resources/openee.html @@ -0,0 +1,8 @@ + + +Openee + diff --git a/tests/wpt/tests/fetch/private-network-access/resources/opener.html b/tests/wpt/tests/fetch/private-network-access/resources/opener.html index 40e3b60bb52..78b66c6db7b 100644 --- a/tests/wpt/tests/fetch/private-network-access/resources/opener.html +++ b/tests/wpt/tests/fetch/private-network-access/resources/opener.html @@ -4,8 +4,8 @@ diff --git a/tests/wpt/tests/fetch/private-network-access/resources/preflight.py b/tests/wpt/tests/fetch/private-network-access/resources/preflight.py index 255bd56a33e..7ab9dffe1d9 100644 --- a/tests/wpt/tests/fetch/private-network-access/resources/preflight.py +++ b/tests/wpt/tests/fetch/private-network-access/resources/preflight.py @@ -89,7 +89,8 @@ def _get_expect_single_preflight(request): return request.GET.get(b"expect-single-preflight") def _is_preflight_optional(request): - return request.GET.get(b"is-preflight-optional") + return request.GET.get(b"is-preflight-optional") or \ + request.GET.get(b"file-if-no-preflight-received") def _get_preflight_uuid(request): return request.GET.get(b"preflight-uuid") @@ -129,8 +130,12 @@ def _handle_preflight_request(request, response): return (headers, "preflight") -def _final_response_body(request): - file_name = request.GET.get(b"file") +def _final_response_body(request, missing_preflight): + file_name = None + if missing_preflight and not request.GET.get(b"is-preflight-optional"): + file_name = request.GET.get(b"file-if-no-preflight-received") + if file_name is None: + file_name = request.GET.get(b"file") if file_name is None: return request.GET.get(b"body") or "success" @@ -146,13 +151,14 @@ def _final_response_body(request): return prefix + contents def _handle_final_request(request, response): + missing_preflight = False if _should_treat_as_public_once(request): headers = [("Content-Security-Policy", "treat-as-public-address"),] else: uuid = _get_preflight_uuid(request) if uuid is not None: - if (request.server.stash.take(uuid) is None and - not _is_preflight_optional(request)): + missing_preflight = request.server.stash.take(uuid) is None + if missing_preflight and not _is_preflight_optional(request): return (405, [], "no preflight received") request.server.stash.put(uuid, "final") @@ -172,7 +178,7 @@ def _handle_final_request(request, response): if _is_loaded_in_fenced_frame(request): headers.append(("Supports-Loading-Mode", "fenced-frame")) - body = _final_response_body(request) + body = _final_response_body(request, missing_preflight) return (headers, body) def main(request, response): diff --git a/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js b/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js index c3bdb8139ba..920ded6cff7 100644 --- a/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js +++ b/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js @@ -446,6 +446,10 @@ async function iframeTest(t, { source, target, expected }) { const targetUrl = preflightUrl(target); targetUrl.searchParams.set("file", "iframed.html"); targetUrl.searchParams.set("iframe-uuid", uuid); + targetUrl.searchParams.set( + "file-if-no-preflight-received", + "iframed-no-preflight-received.html", + ); const sourceUrl = resolveUrl("resources/iframer.html", sourceResolveOptions(source)); @@ -470,13 +474,18 @@ async function iframeTest(t, { source, target, expected }) { assert_equals(result, expected); } -const WindowOpenTestResult = { +const NavigationTestResult = { SUCCESS: "success", - FAILURE: "failure", + FAILURE: "timeout", }; async function windowOpenTest(t, { source, target, expected }) { const targetUrl = preflightUrl(target); + targetUrl.searchParams.set("file", "openee.html"); + targetUrl.searchParams.set( + "file-if-no-preflight-received", + "no-preflight-received.html", + ); const sourceUrl = resolveUrl("resources/opener.html", sourceResolveOptions(source)); @@ -487,7 +496,41 @@ async function windowOpenTest(t, { source, target, expected }) { iframe.contentWindow.postMessage({ url: targetUrl.href }, "*"); - assert_equals(await reply, expected); + const result = await Promise.race([ + reply, + new Promise((resolve) => { + t.step_timeout(() => resolve("timeout"), 3000 /* ms */); + }), + ]); + + assert_equals(result, expected); +} + +async function anchorTest(t, { source, target, expected }) { + const targetUrl = preflightUrl(target); + targetUrl.searchParams.set("file", "openee.html"); + targetUrl.searchParams.set( + "file-if-no-preflight-received", + "no-preflight-received.html", + ); + + const sourceUrl = + resolveUrl("resources/anchor.html", sourceResolveOptions(source)); + sourceUrl.searchParams.set("url", targetUrl); + + const iframe = await appendIframe(t, document, sourceUrl); + const reply = futureMessage({ source: iframe.contentWindow }); + + iframe.contentWindow.postMessage({ url: targetUrl.href }, "*"); + + const result = await Promise.race([ + reply, + new Promise((resolve) => { + t.step_timeout(() => resolve("timeout"), 4000 /* ms */); + }), + ]); + + assert_equals(result, expected); } // Similar to `iframeTest`, but replaced iframes with fenced frames. diff --git a/tests/wpt/tests/fetch/private-network-access/window-open.tentative.https.window.js b/tests/wpt/tests/fetch/private-network-access/window-open.tentative.https.window.js index 85b929f34d4..c91ec235511 100644 --- a/tests/wpt/tests/fetch/private-network-access/window-open.tentative.https.window.js +++ b/tests/wpt/tests/fetch/private-network-access/window-open.tentative.https.window.js @@ -1,10 +1,15 @@ +// META: script=/common/subset-tests-by-key.js // META: script=/common/dispatcher/dispatcher.js // META: script=/common/utils.js // META: script=resources/support.sub.js +// META: variant=?include=from-local +// META: variant=?include=from-private +// META: variant=?include=from-public +// META: variant=?include=from-treat-as-public // -// These tests verify that secure contexts can navigate iframes to less-public -// address spaces iff the target server responds affirmatively to preflight -// requests. +// These tests verify that secure contexts can navigate to less-public address +// spaces via window.open iff the target server responds affirmatively to +// preflight requests. setup(() => { assert_true(window.isSecureContext); @@ -14,29 +19,28 @@ setup(() => { // // All fetches unaffected by Private Network Access. -promise_test_parallel(t => windowOpenTest(t, { +subsetTestByKey("from-local", promise_test_parallel, t => windowOpenTest(t, { source: { server: Server.HTTPS_LOCAL }, target: { server: Server.HTTPS_LOCAL }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "local to local: no preflight required."); -promise_test_parallel(t => windowOpenTest(t, { +subsetTestByKey("from-local", promise_test_parallel, t => windowOpenTest(t, { source: { server: Server.HTTPS_LOCAL }, target: { server: Server.HTTPS_PRIVATE }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "local to private: no preflight required."); -promise_test_parallel(t => windowOpenTest(t, { +subsetTestByKey("from-local", promise_test_parallel, t => windowOpenTest(t, { source: { server: Server.HTTPS_LOCAL }, target: { server: Server.HTTPS_PUBLIC }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "local to public: no preflight required."); // Generates tests of preflight behavior for a single (source, target) pair. // // Scenarios: // -// - parent navigates child: // - preflight response has non-2xx HTTP code // - preflight response is missing CORS headers // - preflight response is missing the PNA-specific `Access-Control` header @@ -64,7 +68,7 @@ function makePreflightTests({ server: targetServer, behavior: { preflight: PreflightBehavior.failure() }, }, - expected: WindowOpenTestResult.FAILURE, + expected: NavigationTestResult.FAILURE, }), prefix + "failed preflight."); promise_test_parallel(t => windowOpenTest(t, { @@ -73,7 +77,7 @@ function makePreflightTests({ server: targetServer, behavior: { preflight: PreflightBehavior.noCorsHeader(token()) }, }, - expected: WindowOpenTestResult.FAILURE, + expected: NavigationTestResult.FAILURE, }), prefix + "missing CORS headers."); promise_test_parallel(t => windowOpenTest(t, { @@ -82,16 +86,16 @@ function makePreflightTests({ server: targetServer, behavior: { preflight: PreflightBehavior.noPnaHeader(token()) }, }, - expected: WindowOpenTestResult.FAILURE, + expected: NavigationTestResult.FAILURE, }), prefix + "missing PNA header."); promise_test_parallel(t => windowOpenTest(t, { source, target: { server: targetServer, - behavior: { preflight: PreflightBehavior.success(token()) }, + behavior: { preflight: PreflightBehavior.navigation(token()) }, }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), prefix + "success."); } @@ -100,23 +104,23 @@ function makePreflightTests({ // Fetches to the local address space require a successful preflight response // carrying a PNA-specific header. -makePreflightTests({ +subsetTestByKey('from-private', makePreflightTests, { sourceServer: Server.HTTPS_PRIVATE, sourceName: 'private', targetServer: Server.HTTPS_LOCAL, targetName: 'local', }); -promise_test_parallel(t => windowOpenTest(t, { +subsetTestByKey("from-private", promise_test_parallel, t => windowOpenTest(t, { source: { server: Server.HTTPS_PRIVATE }, target: { server: Server.HTTPS_PRIVATE }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "private to private: no preflight required."); -promise_test_parallel(t => windowOpenTest(t, { +subsetTestByKey("from-private", promise_test_parallel, t => windowOpenTest(t, { source: { server: Server.HTTPS_PRIVATE }, target: { server: Server.HTTPS_PUBLIC }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "private to public: no preflight required."); // Source: public secure context. @@ -124,30 +128,30 @@ promise_test_parallel(t => windowOpenTest(t, { // Fetches to the local and private address spaces require a successful // preflight response carrying a PNA-specific header. -makePreflightTests({ +subsetTestByKey('from-public', makePreflightTests, { sourceServer: Server.HTTPS_PUBLIC, sourceName: "public", targetServer: Server.HTTPS_LOCAL, targetName: "local", }); -makePreflightTests({ +subsetTestByKey('from-public', makePreflightTests, { sourceServer: Server.HTTPS_PUBLIC, sourceName: "public", targetServer: Server.HTTPS_PRIVATE, targetName: "private", }); -promise_test_parallel(t => windowOpenTest(t, { +subsetTestByKey("from-public", promise_test_parallel, t => windowOpenTest(t, { source: { server: Server.HTTPS_PUBLIC }, target: { server: Server.HTTPS_PUBLIC }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "public to public: no preflight required."); // The following tests verify that `CSP: treat-as-public-address` makes // documents behave as if they had been served from a public IP address. -makePreflightTests({ +subsetTestByKey('from-treat-as-public', makePreflightTests, { sourceServer: Server.HTTPS_LOCAL, sourceTreatAsPublic: true, sourceName: "treat-as-public-address", @@ -155,18 +159,18 @@ makePreflightTests({ targetName: "local", }); -promise_test_parallel( +subsetTestByKey("from-treat-as-public", promise_test_parallel, t => windowOpenTest(t, { source: { server: Server.HTTPS_LOCAL, treatAsPublic: true, }, target: {server: Server.HTTPS_LOCAL}, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), 'treat-as-public-address to local (same-origin): no preflight required.'); -makePreflightTests({ +subsetTestByKey('from-treat-as-public', makePreflightTests, { sourceServer: Server.HTTPS_LOCAL, sourceTreatAsPublic: true, sourceName: 'treat-as-public-address', @@ -174,14 +178,14 @@ makePreflightTests({ targetName: 'private', }); -promise_test_parallel( +subsetTestByKey("from-treat-as-public", promise_test_parallel, t => windowOpenTest(t, { source: { server: Server.HTTPS_LOCAL, treatAsPublic: true, }, target: {server: Server.HTTPS_PUBLIC}, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), 'treat-as-public-address to public: no preflight required.'); @@ -195,6 +199,6 @@ promise_test_parallel( server: Server.HTTPS_PUBLIC, behavior: {preflight: PreflightBehavior.optionalSuccess(token())} }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), 'treat-as-public-address to local: optional preflight'); diff --git a/tests/wpt/tests/fetch/private-network-access/window-open.tentative.window.js b/tests/wpt/tests/fetch/private-network-access/window-open.tentative.window.js index 8d023775226..18a0260cb10 100644 --- a/tests/wpt/tests/fetch/private-network-access/window-open.tentative.window.js +++ b/tests/wpt/tests/fetch/private-network-access/window-open.tentative.window.js @@ -12,58 +12,58 @@ setup(() => { assert_false(window.isSecureContext); }); -promise_test(t => windowOpenTest(t, { +promise_test_parallel(t => windowOpenTest(t, { source: { server: Server.HTTP_LOCAL }, target: { server: Server.HTTP_LOCAL }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "local to local: no preflight required."); promise_test_parallel(t => windowOpenTest(t, { source: { server: Server.HTTP_LOCAL }, target: { server: Server.HTTP_PRIVATE }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "local to private: no preflight required."); promise_test_parallel(t => windowOpenTest(t, { source: { server: Server.HTTP_LOCAL }, target: { server: Server.HTTP_PUBLIC }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "local to public: no preflight required."); promise_test_parallel(t => windowOpenTest(t, { source: { server: Server.HTTP_PRIVATE }, target: { server: Server.HTTP_LOCAL }, - expected: WindowOpenTestResult.FAILURE, + expected: NavigationTestResult.FAILURE, }), "private to local: failure."); promise_test_parallel(t => windowOpenTest(t, { source: { server: Server.HTTP_PRIVATE }, target: { server: Server.HTTP_PRIVATE }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "private to private: no preflight required."); promise_test_parallel(t => windowOpenTest(t, { source: { server: Server.HTTP_PRIVATE }, target: { server: Server.HTTP_PUBLIC }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "private to public: no preflight required."); promise_test_parallel(t => windowOpenTest(t, { source: { server: Server.HTTP_PUBLIC }, target: { server: Server.HTTP_LOCAL }, - expected: WindowOpenTestResult.FAILURE, + expected: NavigationTestResult.FAILURE, }), "public to local: failure."); promise_test_parallel(t => windowOpenTest(t, { source: { server: Server.HTTP_PUBLIC }, target: { server: Server.HTTP_PRIVATE }, - expected: WindowOpenTestResult.FAILURE, + expected: NavigationTestResult.FAILURE, }), "public to private: failure."); promise_test_parallel(t => windowOpenTest(t, { source: { server: Server.HTTP_PUBLIC }, target: { server: Server.HTTP_PUBLIC }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "public to public: no preflight required."); promise_test_parallel(t => windowOpenTest(t, { @@ -72,7 +72,7 @@ promise_test_parallel(t => windowOpenTest(t, { treatAsPublic: true, }, target: { server: Server.HTTP_LOCAL }, - expected: WindowOpenTestResult.FAILURE, + expected: NavigationTestResult.FAILURE, }), "treat-as-public-address to local: failure."); promise_test_parallel(t => windowOpenTest(t, { @@ -81,7 +81,7 @@ promise_test_parallel(t => windowOpenTest(t, { treatAsPublic: true, }, target: { server: Server.HTTP_PRIVATE }, - expected: WindowOpenTestResult.FAILURE, + expected: NavigationTestResult.FAILURE, }), "treat-as-public-address to private: failure."); promise_test_parallel(t => windowOpenTest(t, { @@ -90,5 +90,5 @@ promise_test_parallel(t => windowOpenTest(t, { treatAsPublic: true, }, target: { server: Server.HTTP_PUBLIC }, - expected: WindowOpenTestResult.SUCCESS, + expected: NavigationTestResult.SUCCESS, }), "treat-as-public-address to public: no preflight required."); diff --git a/tests/wpt/tests/fledge/tentative/join-leave-ad-interest-group.https.window.js b/tests/wpt/tests/fledge/tentative/join-leave-ad-interest-group.https.window.js index 107bd3b815a..c3c97d60c61 100644 --- a/tests/wpt/tests/fledge/tentative/join-leave-ad-interest-group.https.window.js +++ b/tests/wpt/tests/fledge/tentative/join-leave-ad-interest-group.https.window.js @@ -481,14 +481,14 @@ const SIMPLE_JOIN_LEAVE_TEST_CASES = [ { expectJoinSucces: true, expectLeaveSucces: true, interestGroup: { ...BASE_INTEREST_GROUP, - name: 'a'.repeat(1048524) + name: 'a'.repeat(1048520) }, testCaseName: "Largest possible interest group dictionary", }, { expectJoinSucces: false, expectLeaveSucces: true, interestGroup: { ...BASE_INTEREST_GROUP, - name: 'a'.repeat(1048525) + name: 'a'.repeat(1048521) }, testCaseName: "Oversized interest group dictionary", }, diff --git a/tests/wpt/tests/fledge/tentative/reporting-arguments.https.window.js b/tests/wpt/tests/fledge/tentative/reporting-arguments.https.window.js index d652bf2835c..f26a969328f 100644 --- a/tests/wpt/tests/fledge/tentative/reporting-arguments.https.window.js +++ b/tests/wpt/tests/fledge/tentative/reporting-arguments.https.window.js @@ -259,7 +259,7 @@ subsetTest(promise_test, async test => { // reportResultSuccessCondition: `browserSignals.interestGroupName === undefined`, // reportWinSuccessCondition: - `browserSignals.interestGroupName === "default name"` + `browserSignals.interestGroupName === ''` ); }, 'browserSignals.interestGroupName test.'); diff --git a/tests/wpt/tests/fullscreen/WEB_FEATURES.yml b/tests/wpt/tests/fullscreen/WEB_FEATURES.yml new file mode 100644 index 00000000000..0a2878cf6ec --- /dev/null +++ b/tests/wpt/tests/fullscreen/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: fullscreen + files: "**" diff --git a/tests/wpt/tests/html-aam/META.yaml b/tests/wpt/tests/html-aam/META.yml similarity index 82% rename from tests/wpt/tests/html-aam/META.yaml rename to tests/wpt/tests/html-aam/META.yml index 572918600ac..212cae7fa52 100644 --- a/tests/wpt/tests/html-aam/META.yaml +++ b/tests/wpt/tests/html-aam/META.yml @@ -1,4 +1,4 @@ spec: https://w3c.github.io/html-aam/ suggested_reviewers: - cookiecrook - - scottaohara \ No newline at end of file + - scottaohara diff --git a/tests/wpt/tests/html-aam/names.html b/tests/wpt/tests/html-aam/names.html new file mode 100644 index 00000000000..cd32fde5c70 --- /dev/null +++ b/tests/wpt/tests/html-aam/names.html @@ -0,0 +1,260 @@ + + + + HTML-AAM Element Accessible Name From Author Tests + + + + + + + + + + +

Tests the accName for elements defined in HTML-AAM: Accessible Name Computations By HTML Element. + These tests are meant to show whether an element returns a name per the naming mechanism used. See wpt: accname for expanded accName testing.

+ + + + + +

address element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + + +

aside element

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

blockquote element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + + +

details element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + +

figure element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + +

footer element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + +

form element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + +

hgroup element

+

x

y

+ +

x

y

+

x

y

+

x

y

+ +

x

y

+

x

y

+ +

x

y

+

x

y

+ + +

hr element

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

ol element

+
  1. x
+ +
  1. x
+
  1. x
+
  1. x
+ +
  1. x
+
  1. x
+ +
  1. x
+
  1. x
+ + +

main element

+
x
+ +
x
+
x
+
x
+ +
x
+
x
+ +
x
+
x
+ + +

menu element

+
  • x
  • + +
  • x
  • +
  • x
  • +
  • x
  • + +
  • x
  • +
  • x
  • + +
  • x
  • +
  • x
  • + + +

    nav element

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

    search element

    +x + +x +x +x + +x +x + +x +x + + +

    section element

    +
    x
    + +
    x
    +
    x
    +
    x
    + +
    x
    +
    x
    + +
    x
    +
    x
    + + +

    ul element

    +
    • x
    + +
    • x
    +
    • x
    +
    • x
    + +
    • x
    +
    • x
    + +
    • x
    +
    • x
    + + + +
    labelledby
    + + + + + diff --git a/tests/wpt/tests/html/browsers/browsing-the-web/unloading-documents/support/002-1.html b/tests/wpt/tests/html/browsers/browsing-the-web/unloading-documents/support/002-1.html index 0e6f7d967be..017fbb964c7 100644 --- a/tests/wpt/tests/html/browsers/browsing-the-web/unloading-documents/support/002-1.html +++ b/tests/wpt/tests/html/browsers/browsing-the-web/unloading-documents/support/002-1.html @@ -5,7 +5,11 @@ var do_test = t.step_func(function() { localStorage.test6564729 += '1'; var d = document; - var e = document.open(); // unload triggered here - beforeunload 2, 3 in 002b; pagehide 4, unload 5, pagehide 6 in 002b, unload 7 in 002b + // This document's unload not triggered here because `document.open` erases + // all of the document's handlers. However the iframe's event handlers (002b) + // will fire. The `beforeunload` event handler will not fire because this is + // not a navigation resulting from a user interaction. + var e = document.open(); localStorage.test6564729 += (e == d) ? '8' : 'X'; var s = 'FAIL if you see this | ' + localStorage.test6564729; document.write(s); diff --git a/tests/wpt/tests/html/browsers/browsing-the-web/unloading-documents/support/002a.html b/tests/wpt/tests/html/browsers/browsing-the-web/unloading-documents/support/002a.html index d11f670869c..51ff3e37b64 100644 --- a/tests/wpt/tests/html/browsers/browsing-the-web/unloading-documents/support/002a.html +++ b/tests/wpt/tests/html/browsers/browsing-the-web/unloading-documents/support/002a.html @@ -1,7 +1,7 @@ diff --git a/tests/wpt/tests/html/browsers/the-window-object/close-method.window.js b/tests/wpt/tests/html/browsers/the-window-object/close-method.window.js index 0288f9cab8e..048c5f7236e 100644 --- a/tests/wpt/tests/html/browsers/the-window-object/close-method.window.js +++ b/tests/wpt/tests/html/browsers/the-window-object/close-method.window.js @@ -6,7 +6,7 @@ function assert_closed_opener(w, closed, opener) { async_test(t => { const openee = window.open(); assert_closed_opener(openee, false, self); - openee.onunload = t.step_func(() => { + openee.onpagehide = t.step_func(() => { assert_closed_opener(openee, true, self); t.step_timeout(() => { assert_closed_opener(openee, true, null); @@ -25,7 +25,7 @@ async_test(t => { const openee2 = window.open("", "greatname"); assert_not_equals(openee, openee2); assert_closed_opener(openee, true, self); // Ensure second window.open() call was synchronous - openee2.onunload = t.step_func(() => { + openee2.onpagehide = t.step_func(() => { assert_closed_opener(openee2, true, self); t.step_timeout(() => { assert_closed_opener(openee, true, null); diff --git a/tests/wpt/tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-goes-cross-origin-domain.sub.html b/tests/wpt/tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-goes-cross-origin-domain.sub.html index 239fa6ddf2f..c2a6def6c24 100644 --- a/tests/wpt/tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-goes-cross-origin-domain.sub.html +++ b/tests/wpt/tests/html/browsers/the-windowproxy-exotic-object/windowproxy-prototype-setting-goes-cross-origin-domain.sub.html @@ -12,8 +12,6 @@ diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.beginLayer-options.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.beginLayer-options.html index 34aa57a1926..658d7e09917 100644 --- a/tests/wpt/tests/html/canvas/element/layers/2d.layer.beginLayer-options.html +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.beginLayer-options.html @@ -36,12 +36,14 @@ _addTest(function(canvas, ctx) { ctx.beginLayer({filter: []}); ctx.endLayer(); ctx.beginLayer({filter: {}}); ctx.endLayer(); ctx.beginLayer({filter: {name: "unknown"}}); ctx.endLayer(); + ctx.beginLayer({filter: ''}); ctx.endLayer(); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: ''}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: 0}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: 1}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: true}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: false}); }); + // These cases don't throw TypeError since they can be casted to a + // DOMString. + ctx.beginLayer({filter: 0}); ctx.endLayer(); + ctx.beginLayer({filter: 1}); ctx.endLayer(); + ctx.beginLayer({filter: true}); ctx.endLayer(); + ctx.beginLayer({filter: false}); ctx.endLayer(); }); diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow-expected.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow-expected.html new file mode 100644 index 00000000000..85503ae33a3 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow-expected.html @@ -0,0 +1,17 @@ + + +Canvas test: 2d.layer.css-filters.blur-and-shadow +

    2d.layer.css-filters.blur-and-shadow

    +

    Checks that beginLayer works with a CSS filter string as input.

    + + + + + + + + + + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow.html new file mode 100644 index 00000000000..08adfa3d746 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-and-shadow.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.css-filters.blur-and-shadow +

    2d.layer.css-filters.blur-and-shadow

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-expected.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-expected.html new file mode 100644 index 00000000000..c6131f6c1e3 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.css-filters.blur +

    2d.layer.css-filters.blur

    +

    Checks that beginLayer works with a CSS filter string as input.

    + + + + + + + + + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur.html new file mode 100644 index 00000000000..3eb3ab8f9c3 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.blur.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.css-filters.blur +

    2d.layer.css-filters.blur

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.shadow-expected.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.shadow-expected.html new file mode 100644 index 00000000000..60f78d80965 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.shadow-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.css-filters.shadow +

    2d.layer.css-filters.shadow

    +

    Checks that beginLayer works with a CSS filter string as input.

    + + + + + + + + + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.shadow.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.shadow.html new file mode 100644 index 00000000000..e6df8a3ac23 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.css-filters.shadow.html @@ -0,0 +1,20 @@ + + + +Canvas test: 2d.layer.css-filters.shadow +

    2d.layer.css-filters.shadow

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.nested-filters-expected.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.nested-filters-expected.html new file mode 100644 index 00000000000..8b53e2dc761 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.nested-filters-expected.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.layer.nested-filters +

    2d.layer.nested-filters

    +

    Checks that nested layers work properly when both apply filters.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/element/layers/2d.layer.nested-filters.html b/tests/wpt/tests/html/canvas/element/layers/2d.layer.nested-filters.html new file mode 100644 index 00000000000..333de67ac9b --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/layers/2d.layer.nested-filters.html @@ -0,0 +1,33 @@ + + + +Canvas test: 2d.layer.nested-filters +

    2d.layer.nested-filters

    +

    Checks that nested layers work properly when both apply filters.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.html index 75e73c032b0..4fb042a1d89 100644 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.html +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.html @@ -37,12 +37,14 @@ t.step(function() { ctx.beginLayer({filter: []}); ctx.endLayer(); ctx.beginLayer({filter: {}}); ctx.endLayer(); ctx.beginLayer({filter: {name: "unknown"}}); ctx.endLayer(); + ctx.beginLayer({filter: ''}); ctx.endLayer(); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: ''}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: 0}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: 1}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: true}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: false}); }); + // These cases don't throw TypeError since they can be casted to a + // DOMString. + ctx.beginLayer({filter: 0}); ctx.endLayer(); + ctx.beginLayer({filter: 1}); ctx.endLayer(); + ctx.beginLayer({filter: true}); ctx.endLayer(); + ctx.beginLayer({filter: false}); ctx.endLayer(); t.done(); }); diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.worker.js b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.worker.js index 77941270e83..cafbc83f3e2 100644 --- a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.worker.js +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.beginLayer-options.worker.js @@ -33,12 +33,14 @@ t.step(function() { ctx.beginLayer({filter: []}); ctx.endLayer(); ctx.beginLayer({filter: {}}); ctx.endLayer(); ctx.beginLayer({filter: {name: "unknown"}}); ctx.endLayer(); + ctx.beginLayer({filter: ''}); ctx.endLayer(); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: ''}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: 0}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: 1}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: true}); }); - assert_throws_js(TypeError, function() { ctx.beginLayer({filter: false}); }); + // These cases don't throw TypeError since they can be casted to a + // DOMString. + ctx.beginLayer({filter: 0}); ctx.endLayer(); + ctx.beginLayer({filter: 1}); ctx.endLayer(); + ctx.beginLayer({filter: true}); ctx.endLayer(); + ctx.beginLayer({filter: false}); ctx.endLayer(); t.done(); }); done(); diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters-expected.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters-expected.html new file mode 100644 index 00000000000..19aec30ec4d --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters-expected.html @@ -0,0 +1,45 @@ + + +Canvas test: 2d.layer.css-filters +

    2d.layer.css-filters

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow-expected.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow-expected.html new file mode 100644 index 00000000000..85503ae33a3 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow-expected.html @@ -0,0 +1,17 @@ + + +Canvas test: 2d.layer.css-filters.blur-and-shadow +

    2d.layer.css-filters.blur-and-shadow

    +

    Checks that beginLayer works with a CSS filter string as input.

    + + + + + + + + + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.html new file mode 100644 index 00000000000..a44ce4707f4 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.css-filters.blur-and-shadow +

    2d.layer.css-filters.blur-and-shadow

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.w.html new file mode 100644 index 00000000000..9413ca6674b --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-and-shadow.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.css-filters.blur-and-shadow +

    2d.layer.css-filters.blur-and-shadow

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-expected.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-expected.html new file mode 100644 index 00000000000..c6131f6c1e3 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.css-filters.blur +

    2d.layer.css-filters.blur

    +

    Checks that beginLayer works with a CSS filter string as input.

    + + + + + + + + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.html new file mode 100644 index 00000000000..5407ec37ad8 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.css-filters.blur +

    2d.layer.css-filters.blur

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.w.html new file mode 100644 index 00000000000..35af0e1bfb7 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.blur.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.css-filters.blur +

    2d.layer.css-filters.blur

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.html new file mode 100644 index 00000000000..6f170aa1632 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.html @@ -0,0 +1,37 @@ + + + +Canvas test: 2d.layer.css-filters +

    2d.layer.css-filters

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow-expected.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow-expected.html new file mode 100644 index 00000000000..60f78d80965 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow-expected.html @@ -0,0 +1,16 @@ + + +Canvas test: 2d.layer.css-filters.shadow +

    2d.layer.css-filters.shadow

    +

    Checks that beginLayer works with a CSS filter string as input.

    + + + + + + + + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.html new file mode 100644 index 00000000000..28d6e6e4033 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.html @@ -0,0 +1,23 @@ + + + +Canvas test: 2d.layer.css-filters.shadow +

    2d.layer.css-filters.shadow

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.w.html new file mode 100644 index 00000000000..98e9d2fbd43 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.shadow.w.html @@ -0,0 +1,37 @@ + + + + +Canvas test: 2d.layer.css-filters.shadow +

    2d.layer.css-filters.shadow

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.w.html new file mode 100644 index 00000000000..0c086af825d --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.css-filters.w.html @@ -0,0 +1,51 @@ + + + + +Canvas test: 2d.layer.css-filters +

    2d.layer.css-filters

    +

    Checks that beginLayer works with a CSS filter string as input.

    + +

    FAIL (fallback content)

    +
    + + + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters-expected.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters-expected.html new file mode 100644 index 00000000000..8b53e2dc761 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters-expected.html @@ -0,0 +1,28 @@ + + +Canvas test: 2d.layer.nested-filters +

    2d.layer.nested-filters

    +

    Checks that nested layers work properly when both apply filters.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.html new file mode 100644 index 00000000000..adf99bacbe7 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.html @@ -0,0 +1,36 @@ + + + +Canvas test: 2d.layer.nested-filters +

    2d.layer.nested-filters

    +

    Checks that nested layers work properly when both apply filters.

    + +

    FAIL (fallback content)

    +
    + diff --git a/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.w.html b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.w.html new file mode 100644 index 00000000000..0616fecfd9d --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/layers/2d.layer.nested-filters.w.html @@ -0,0 +1,50 @@ + + + + +Canvas test: 2d.layer.nested-filters +

    2d.layer.nested-filters

    +

    Checks that nested layers work properly when both apply filters.

    + +

    FAIL (fallback content)

    +
    + + + diff --git a/tests/wpt/tests/html/canvas/tools/yaml-new/layers.yaml b/tests/wpt/tests/html/canvas/tools/yaml-new/layers.yaml index 27d7937432c..3a05e755213 100644 --- a/tests/wpt/tests/html/canvas/tools/yaml-new/layers.yaml +++ b/tests/wpt/tests/html/canvas/tools/yaml-new/layers.yaml @@ -789,12 +789,14 @@ ctx.beginLayer({filter: []}); ctx.endLayer(); ctx.beginLayer({filter: {}}); ctx.endLayer(); ctx.beginLayer({filter: {name: "unknown"}}); ctx.endLayer(); + ctx.beginLayer({filter: ''}); ctx.endLayer(); - @assert throws TypeError ctx.beginLayer({filter: ''}); - @assert throws TypeError ctx.beginLayer({filter: 0}); - @assert throws TypeError ctx.beginLayer({filter: 1}); - @assert throws TypeError ctx.beginLayer({filter: true}); - @assert throws TypeError ctx.beginLayer({filter: false}); + // These cases don't throw TypeError since they can be casted to a + // DOMString. + ctx.beginLayer({filter: 0}); ctx.endLayer(); + ctx.beginLayer({filter: 1}); ctx.endLayer(); + ctx.beginLayer({filter: true}); ctx.endLayer(); + ctx.beginLayer({filter: false}); ctx.endLayer(); - name: 2d.layer.blur-from-outside-canvas desc: Checks blur leaking inside from drawing outside the canvas @@ -947,3 +949,78 @@ ctx.shadowOffsetX = -10; ctx.shadowOffsetY = 10; ctx.drawImage(canvas2, 0, 0); + +- name: 2d.layer.css-filters + desc: Checks that beginLayer works with a CSS filter string as input. + size: [200, 200] + code: | + ctx.beginLayer({filter: '{{ css_filter }}'}); + + ctx.fillStyle = 'teal'; + ctx.fillRect(50, 50, 100, 100); + + ctx.endLayer(); + html_reference: | + + + {{ svg_filter | indent(4) }} + + + + + + variants: + blur: + css_filter: blur(10px) + svg_filter: + shadow: + css_filter: drop-shadow(-10px -10px 5px purple) + svg_filter: |- + + blur-and-shadow: + css_filter: blur(5px) drop-shadow(10px 10px 5px orange) + svg_filter: |- + + + +- name: 2d.layer.nested-filters + desc: Checks that nested layers work properly when both apply filters. + size: [400, 200] + code: | + ctx.beginLayer({filter: {name: 'dropShadow', dx: -20, dy: -20, + stdDeviation: 0, floodColor: 'yellow'}}); + ctx.beginLayer({filter: 'drop-shadow(-10px -10px 0 blue)'}); + + ctx.fillStyle = 'red'; + ctx.fillRect(50, 50, 100, 100); + + ctx.endLayer(); + ctx.endLayer(); + + ctx.beginLayer({filter: 'drop-shadow(20px 20px 0 blue)'}); + ctx.beginLayer({filter: {name: 'dropShadow', dx: 10, dy: 10, + stdDeviation: 0, floodColor: 'yellow'}}); + + ctx.fillStyle = 'red'; + ctx.fillRect(250, 50, 100, 100); + + ctx.endLayer(); + ctx.endLayer(); + reference: | + ctx.fillStyle = 'yellow'; + ctx.fillRect(20, 20, 100, 100); + ctx.fillRect(30, 30, 100, 100); + ctx.fillStyle = 'blue'; + ctx.fillRect(40, 40, 100, 100); + ctx.fillStyle = 'red'; + ctx.fillRect(50, 50, 100, 100); + + ctx.fillStyle = 'blue'; + ctx.fillRect(280, 80, 100, 100); + ctx.fillRect(270, 70, 100, 100); + ctx.fillStyle = 'yellow'; + ctx.fillRect(260, 60, 100, 100); + ctx.fillStyle = 'red'; + ctx.fillRect(250, 50, 100, 100); diff --git a/tests/wpt/tests/html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.js b/tests/wpt/tests/html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.js index ca3028d9cc3..a8519b5d1b6 100644 --- a/tests/wpt/tests/html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.js +++ b/tests/wpt/tests/html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.js @@ -21,9 +21,9 @@ const runTest = (description) => { `; - const popup_unloaded = new Promise(r => window.popup.onunload = e => r()); + const popup_navigated = new Promise(r => window.popup.onpagehide = e => r()); document.body.append(iframe); - await popup_unloaded; // This makes sure the old child has unloaded, but + await popup_navigated; // This makes sure the old child has unloaded, but // with the timeout below it's really not needed. // This is necessary, or else the test times out. The about:blank load diff --git a/tests/wpt/tests/html/rendering/non-replaced-elements/lists/lists-styles.html b/tests/wpt/tests/html/rendering/non-replaced-elements/lists/lists-styles.html index 3a94de18ad6..a5f011cecc1 100644 --- a/tests/wpt/tests/html/rendering/non-replaced-elements/lists/lists-styles.html +++ b/tests/wpt/tests/html/rendering/non-replaced-elements/lists/lists-styles.html @@ -40,10 +40,10 @@ ol[class=type-a], li[class=type-a] { list-style-type: lower-alpha; } ol[class=type-A], li[class=type-A] { list-style-type: upper-alpha; } ol[class=type-i], li[class=type-i] { list-style-type: lower-roman; } ol[class=type-I], li[class=type-I] { list-style-type: upper-roman; } -ol[type=none i], li[type=none i] { list-style-type: none; } -ol[type=disc i], li[type=disc i] { list-style-type: disc; } -ol[type=circle i], li[type=circle i] { list-style-type: circle; } -ol[type=square i], li[type=square i] { list-style-type: square; } +ul[type=none i], li[type=none i] { list-style-type: none; } +ul[type=disc i], li[type=disc i] { list-style-type: disc; } +ul[type=circle i], li[type=circle i] { list-style-type: circle; } +ul[type=square i], li[type=square i] { list-style-type: square; } li[value="10"], li[value="10xyz"], li[value="10e10"] { counter-set: list-item 10; } ol[start="10"], ol[start="10xyz"], ol[start="10e10"] { counter-reset: list-item 9; } @@ -143,30 +143,43 @@ ol[reversed][start="20"], ol[reversed][start="20xyz"], ol[reversed][start="20e10
        +
          1. +
              1. +
                  1. +
                      1. +
                          1. +
                              1. +
                                  1. +
                                      1. +
                                          1. +
                                              1. +
                                                  1. +
                                                      1. +
                                                          1. diff --git a/tests/wpt/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/crashtests/fieldset-middleclick.html b/tests/wpt/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/crashtests/fieldset-middleclick.html new file mode 100644 index 00000000000..39acf9eca17 --- /dev/null +++ b/tests/wpt/tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/crashtests/fieldset-middleclick.html @@ -0,0 +1,37 @@ + + + + + + + + + +
                                                            +

                                                            test

                                                            +

                                                            test

                                                            +

                                                            test

                                                            +

                                                            test

                                                            +

                                                            test

                                                            +

                                                            test

                                                            +
                                                            + + + diff --git a/tests/wpt/tests/html/rendering/replaced-elements/images/img-sizes-auto.html b/tests/wpt/tests/html/rendering/replaced-elements/images/img-sizes-auto.html new file mode 100644 index 00000000000..cbdf769596a --- /dev/null +++ b/tests/wpt/tests/html/rendering/replaced-elements/images/img-sizes-auto.html @@ -0,0 +1,53 @@ + +default styles for <img sizes=auto> + + + + + + + + +
                                                            + +
                                                            + + + + + + + + + + + + + + + + + +
                                                            + +
                                                            + + diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-far.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-far.html index b85eb57d052..065fa939bc5 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-far.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-far.html @@ -12,7 +12,7 @@ } #spacer { - width: 100px; + width: 130px; height: 10000vh; } diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-horizontal-far.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-horizontal-far.html index d406f81cc59..20274310f1c 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-horizontal-far.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-horizontal-far.html @@ -14,7 +14,7 @@ #spacer { width: 10000vw; - height: 100px; + height: 130px; flex-shrink: 0; } diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-horizontal.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-horizontal.html index 5801a2b163b..124dbaddf89 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-horizontal.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-horizontal.html @@ -13,8 +13,8 @@ } #spacer { - width: 100px; - height: 100px; + width: 130px; + height: 130px; flex-shrink: 0; } diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-2.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-2.html index c314b5ac3fa..5e25f452750 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-2.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-2.html @@ -18,8 +18,8 @@ } #spacer { - width: 100px; - height: 100px; + width: 130px; + height: 130px; } #target { diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-3.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-3.html index 53e0823f1aa..0d6d95826bb 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-3.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-3.html @@ -24,8 +24,8 @@ } #spacer { - width: 100px; - height: 100px; + width: 130px; + height: 130px; } #target { diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-4.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-4.html index 8cdf047e955..312e90bd494 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-4.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-in-scroller-nested-4.html @@ -17,9 +17,9 @@ overflow: scroll; } - #spacer { - width: 100px; - height: 100px; + .spacer { + width: 130px; + height: 130px; } #target { @@ -29,9 +29,9 @@
                                                            -
                                                            +
                                                            -
                                                            +
                                                            -
                                                            +
                                                            -
                                                            +
                                                            +Auto sizes rendering + + diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-2.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-2.html new file mode 100644 index 00000000000..75d1884e34b --- /dev/null +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-2.html @@ -0,0 +1,25 @@ + + +Auto sizes rendering + + + + + + diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-3.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-3.html new file mode 100644 index 00000000000..71ed90ebbec --- /dev/null +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-3.html @@ -0,0 +1,25 @@ + + +Auto sizes rendering + + + + + + diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-dynamic.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-dynamic.html new file mode 100644 index 00000000000..901c6f2e096 --- /dev/null +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering-dynamic.html @@ -0,0 +1,38 @@ + + +Auto sizes dynamic rendering + + + + + + diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering.html new file mode 100644 index 00000000000..e972f69c20d --- /dev/null +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto-rendering.html @@ -0,0 +1,26 @@ + + +Auto sizes rendering + + + + + + diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto.html index 41385edd33f..6c1a741f2bf 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/sizes/sizes-auto.html @@ -1,5 +1,6 @@ img parse a sizes attribute: sizes=auto + +
                                                            + + + +
                                                            + diff --git a/tests/wpt/tests/lint.ignore b/tests/wpt/tests/lint.ignore index 50a31e69784..a39705ddf86 100644 --- a/tests/wpt/tests/lint.ignore +++ b/tests/wpt/tests/lint.ignore @@ -469,13 +469,6 @@ TRAILING WHITESPACE: css/css-fonts/support/fonts/gsubtest-lookup3.ufo/features.f SET TIMEOUT: css/compositing/mix-blend-mode/mix-blend-mode-parent-with-3D-transform-and-transition.html SET TIMEOUT: css/compositing/mix-blend-mode/mix-blend-mode-sibling-with-3D-transform-and-transition.html -SET TIMEOUT: css/css-backgrounds/color-mix-currentcolor-background-repaint-parent.html -SET TIMEOUT: css/css-backgrounds/color-mix-currentcolor-background-repaint.html -SET TIMEOUT: css/css-backgrounds/color-mix-currentcolor-border-repaint-parent.html -SET TIMEOUT: css/css-backgrounds/color-mix-currentcolor-border-repaint.html -SET TIMEOUT: css/css-backgrounds/color-mix-currentcolor-outline-repaint-parent.html -SET TIMEOUT: css/css-backgrounds/color-mix-currentcolor-outline-repaint.html -SET TIMEOUT: css/css-backgrounds/currentcolor-border-repaint-parent.html SET TIMEOUT: css/css-transitions/events-007.html SET TIMEOUT: css/css-transitions/support/generalParallelTest.js SET TIMEOUT: css/css-transitions/support/runParallelAsyncHarness.js @@ -527,7 +520,6 @@ SET TIMEOUT: css/CSS2/tables/tables-102.xht SET TIMEOUT: css/mediaqueries/min-width-tables-001.html SET TIMEOUT: css/css-text/crashtests/rendering-rtl-bidi-override-crash.html SET TIMEOUT: css/css-backgrounds/color-mix-currentcolor-border-repaint-parent.html -SET TIMEOUT: svg/painting/color-mix-currentcolor-fill-stroke-repaint.html SET TIMEOUT: svg/painting/currentcolor-fill-stroke-repaint.html SET TIMEOUT: resource-timing/resources/run-async-tasks-promise.js diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-desired-exec-time.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-desired-exec-time.html index d35502e99c6..656c58d0c24 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-desired-exec-time.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-desired-exec-time.html @@ -16,11 +16,6 @@ const INTERNAL_OVERHEAD_DELAY_EPSILON = 5; - // Accessibility code may schedule tasks that confuse this test code. - if (window.accessibilityController) { - accessibilityController.reset(); - } - promise_test(async t => { const button = document.createElement("button"); button.innerText = "Click"; diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location-redirect.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location-redirect.html index f8d5d3d2498..013742354c1 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location-redirect.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location-redirect.html @@ -15,49 +15,81 @@ const {REMOTE_ORIGIN} = get_host_info(); -function crossOriginRedirectURL(path) { - const url = new URL(`/common/redirect.py`, REMOTE_ORIGIN); - url.searchParams.set("location", path); +function corsify(url, cors) { + if (!cors) + return url.href; + url.searchParams.set("pipe", "header(Access-Control-Allow-Origin, *)"); return url.href; } -function test_source_location_pre_redirect({path, type, name}) { - promise_test(async t => { - const very_long_frame_duration = 360; - const url = crossOriginRedirectURL(path); - let [entry, script] = await expect_long_frame_with_script(() => { - const script = document.createElement("script"); - script.src = url; - document.body.appendChild(script); - t.add_cleanup(() => script.remove()); - }, script => ( - script.type === type && - (!name || script.name.startsWith(name)) && - script.duration >= very_long_frame_duration), t); +const targetURL = (path, cors) => + corsify(new URL(path, REMOTE_ORIGIN), cors); - assert_true(script.sourceLocation.includes("redirect.py"), - `${script.sourceLocation} should be pre-redirect`); - }, `${type} doesn't expose post-redirect source location`); +function crossOriginRedirectURL(path, cors) { + const url = new URL(`/common/redirect.py`, REMOTE_ORIGIN); + url.searchParams.set("location", targetURL(path, cors)); + return corsify(url, cors); } -test_source_location_pre_redirect({ +function test_source_location_with_redirect({path, type, name}) { + for (let scriptType of ["classic-opaque", "classic-cors", "module"]) { + const cors = scriptType !== "classic-opaque"; + promise_test(async t => { + const VERY_LONG_FRAME_DURATION = 360; + const preRedirectURL = crossOriginRedirectURL(path, cors); + const postRedirectURL = targetURL(path, cors); + let [entry, script] = await expect_long_frame_with_script(() => { + const script = document.createElement("script"); + script.src = preRedirectURL; + if (scriptType === "module") + script.type = "module"; + else if (cors) + script.crossOrigin = "anonymous"; + document.body.appendChild(script); + t.add_cleanup(() => script.remove()); + }, script => script.duration >= VERY_LONG_FRAME_DURATION, t); + + const result = + script.sourceLocation.startsWith(postRedirectURL) ? "post-redirect" : + script.sourceLocation.startsWith(preRedirectURL) ? "pre-redirect" : + script.sourceLocation === "" ? + "empty" : "other"; + + assert_not_equals(result, "other", `Unexpected source location ${script.sourceLocation}`); + + if (cors) { + assert_not_equals(result, "empty", "CORS-ok scripts should expose sourceLocation"); + } else { + const char_index = result === "empty" ? 0 : + parseInt(script.sourceLocation.match(/\:(\d+)$/)?.[1] ?? "0"); + assert_not_equals(result, "post-redirect", "No-CORS classic scripts should not expose post-redirect URL"); + assert_equals(char_index, 0, "No-CORS classic scripts should not expose character index"); + } + }, `Test ${type} with ${scriptType}`); + } +} + +test_source_location_with_redirect({ path: "/long-animation-frame/tentative/resources/busy.js", - type: "classic-script" + type: "script-block" }); -test_source_location_pre_redirect({ + +test_source_location_with_redirect({ path: "/long-animation-frame/tentative/resources/raf-generates-loaf.js", name: "FrameRequestCallback", type: "user-callback" }); -test_source_location_pre_redirect({ - path: "/long-animation-frame/tentative/resources/promise-generates-loaf.js", - type: "resolve-promise", - name: "Window.fetch.then" -}); -test_source_location_pre_redirect({ +test_source_location_with_redirect({ path: "/long-animation-frame/tentative/resources/event-generates-loaf.js", type: "event-listener", name: "XMLHttpRequest.onload" }); + +test_source_location_with_redirect({ + path: "/long-animation-frame/tentative/resources/promise-generates-loaf.js", + type: "resolve-promise", + name: "Window.fetch.then" +}); + diff --git a/tests/wpt/tests/mathml/crashtests/first-letter-contributed-to-ancestor.html b/tests/wpt/tests/mathml/crashtests/first-letter-contributed-to-ancestor.html new file mode 100644 index 00000000000..f50841d94a7 --- /dev/null +++ b/tests/wpt/tests/mathml/crashtests/first-letter-contributed-to-ancestor.html @@ -0,0 +1,17 @@ + + + + + % + + diff --git a/tests/wpt/tests/mathml/presentation-markup/fractions/default-mfrac-padding-style.html b/tests/wpt/tests/mathml/presentation-markup/fractions/default-mfrac-padding-style.html new file mode 100644 index 00000000000..3365f1a2456 --- /dev/null +++ b/tests/wpt/tests/mathml/presentation-markup/fractions/default-mfrac-padding-style.html @@ -0,0 +1,30 @@ + + + + +Test the mfrac element + + + + + + + +
                                                            +
                                                            + + + 1 + 2 + + +
                                                            + + + diff --git a/tests/wpt/tests/navigation-api/WEB_FEATURES.yml b/tests/wpt/tests/navigation-api/WEB_FEATURES.yml new file mode 100644 index 00000000000..3516e9555e6 --- /dev/null +++ b/tests/wpt/tests/navigation-api/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: navigation + files: "**" diff --git a/tests/wpt/tests/navigation-api/navigate-event/cross-origin-traversal-redirect.html b/tests/wpt/tests/navigation-api/navigate-event/cross-origin-traversal-redirect.html new file mode 100644 index 00000000000..24ccc0956ac --- /dev/null +++ b/tests/wpt/tests/navigation-api/navigate-event/cross-origin-traversal-redirect.html @@ -0,0 +1,33 @@ + + + + + + + diff --git a/tests/wpt/tests/navigation-api/navigate-event/navigate-history-back-bfcache.html b/tests/wpt/tests/navigation-api/navigate-event/navigate-history-back-bfcache.html new file mode 100644 index 00000000000..0336ff1c2fe --- /dev/null +++ b/tests/wpt/tests/navigation-api/navigate-event/navigate-history-back-bfcache.html @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/tests/wpt/tests/navigation-api/navigate-event/resources/cross-origin-redirect-on-second-visit.py b/tests/wpt/tests/navigation-api/navigate-event/resources/cross-origin-redirect-on-second-visit.py new file mode 100644 index 00000000000..12a9427fb74 --- /dev/null +++ b/tests/wpt/tests/navigation-api/navigate-event/resources/cross-origin-redirect-on-second-visit.py @@ -0,0 +1,31 @@ +import uuid + +def redirect_response(): + location = b'http://localhost:8000/common/blank.html' + return (301, + [ + (b'Cache-Control', b'no-cache, no-store, must-revalidate'), + (b'Pragma', b'no-cache'), + (b'Content-Type', b'text/html'), + (b'Location', location), + ], + b'redirect_body') + +def ok_response(): + return ( + [ + (b'Cache-Control', b'no-cache, no-store, must-revalidate'), + (b'Pragma', b'no-cache'), + (b'Content-Type', b'text/html') + ], + b'body') + +def main(request, response): + key = request.GET[b'key']; + visited = request.server.stash.take(key) + request.server.stash.put(key, True) + + if visited is None: + return ok_response() + + return redirect_response() diff --git a/tests/wpt/tests/navigation-api/navigation-methods/return-value/back-204-205-download.html b/tests/wpt/tests/navigation-api/navigation-methods/return-value/back-204-205-download.html index 5bedbf21e86..3e19bcb0f50 100644 --- a/tests/wpt/tests/navigation-api/navigation-methods/return-value/back-204-205-download.html +++ b/tests/wpt/tests/navigation-api/navigation-methods/return-value/back-204-205-download.html @@ -32,11 +32,9 @@ for (const [description, action] of tests) { const indexBefore = i.contentWindow.navigation.currentEntry.index; - // One might be surprised that navigate does not fire. (It does fire for the - // corresponding tests of navigation.navigate(), i.e., this is - // traversal-specific behavior.) See https://github.com/WICG/navigation-api/issues/207 - // for some discussion. - i.contentWindow.navigation.onnavigate = t.unreached_func("onnavigate should not be called"); + let onnavigate_called = false; + i.contentWindow.navigation.onnavigate = () => onnavigate_called = true; + i.contentWindow.onunload = t.unreached_func("onunload should not be called"); i.contentWindow.navigation.onnavigatesuccess = t.unreached_func("onnavigatesuccess should not be called"); i.contentWindow.navigation.onnavigateerror = t.unreached_func("onnavigateerror should not be called"); @@ -47,6 +45,7 @@ for (const [description, action] of tests) { await new Promise(resolve => t.step_timeout(resolve, 50)); assert_equals(i.contentWindow.navigation.currentEntry.index, indexBefore); assert_equals(i.contentWindow.navigation.transition, null); + assert_true(onnavigate_called); }, `back() promises to ${description} never settle`); } diff --git a/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-unload.html b/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-pagehide.html similarity index 90% rename from tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-unload.html rename to tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-pagehide.html index fbc1fde6e97..c303e656f36 100644 --- a/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-unload.html +++ b/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-pagehide.html @@ -17,11 +17,11 @@ promise_test(async t => { i.contentWindow.navigation.navigate("?1"); await new Promise(resolve => { - i.contentWindow.onunload = t.step_func(async () => { + i.contentWindow.onpagehide = t.step_func(async () => { await assertBothRejectDOM(t, i.contentWindow.navigation.navigate("?2"), "InvalidStateError", i.contentWindow); assert_equals(navigateEventCount, 1); resolve(); }); }); -}, `navigate() inside onunload`); +}, `navigate() inside onpagehide`); diff --git a/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unload.html b/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-pagehide.html similarity index 85% rename from tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unload.html rename to tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-pagehide.html index d778dd662c8..79f16078272 100644 --- a/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unload.html +++ b/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-pagehide.html @@ -17,11 +17,11 @@ promise_test(async t => { i.contentWindow.navigation.navigate("?1"); await new Promise(resolve => { - i.contentWindow.onunload = t.step_func(async () => { + i.contentWindow.onpagehide = t.step_func(async () => { await assertBothRejectDOM(t, i.contentWindow.navigation.navigate("https://example.com\u0000mozilla.org"), "SyntaxError", i.contentWindow); assert_equals(navigateEventCount, 1); resolve(); }); }); -}, `navigate() with an invalid URL inside onunload throws "SyntaxError", not "InvalidStateError"`); +}, `navigate() with an invalid URL inside onpagehide throws "SyntaxError", not "InvalidStateError"`); diff --git a/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-unload-unserializablestate.html b/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-pagehide-unserializablestate.html similarity index 84% rename from tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-unload-unserializablestate.html rename to tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-pagehide-unserializablestate.html index 417dd27174c..5a3c069bb48 100644 --- a/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-unload-unserializablestate.html +++ b/tests/wpt/tests/navigation-api/navigation-methods/return-value/navigate-rejection-order-pagehide-unserializablestate.html @@ -17,11 +17,11 @@ promise_test(async t => { i.contentWindow.navigation.navigate("?1"); await new Promise(resolve => { - i.contentWindow.onunload = t.step_func(async () => { + i.contentWindow.onpagehide = t.step_func(async () => { await assertBothRejectDOM(t, i.contentWindow.navigation.navigate("?2", { state: document.body }), "DataCloneError", i.contentWindow); assert_equals(navigateEventCount, 1); resolve(); }); }); -}, `navigate() with an unserializable state inside onunload throws "DataCloneError", not "InvalidStateError"`); +}, `navigate() with an unserializable state inside onpagehide throws "DataCloneError", not "InvalidStateError"`); diff --git a/tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-unload.html b/tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-pagehide.html similarity index 90% rename from tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-unload.html rename to tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-pagehide.html index 1906659d1db..1c3ce0d13b8 100644 --- a/tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-unload.html +++ b/tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-pagehide.html @@ -17,11 +17,11 @@ promise_test(async t => { i.contentWindow.navigation.navigate("?1"); await new Promise(resolve => { - i.contentWindow.onunload = t.step_func(async () => { + i.contentWindow.onpagehide = t.step_func(async () => { await assertBothRejectDOM(t, i.contentWindow.navigation.reload(), "InvalidStateError", i.contentWindow); assert_equals(navigateEventCount, 1); resolve(); }); }); -}, `reload() inside onunload`); +}, `reload() inside onpagehide`); diff --git a/tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-rejection-order-unload-unserializablestate.html b/tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-rejection-order-pagehide-unserializablestate.html similarity index 86% rename from tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-rejection-order-unload-unserializablestate.html rename to tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-rejection-order-pagehide-unserializablestate.html index 9e7edcbba4f..e976575acab 100644 --- a/tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-rejection-order-unload-unserializablestate.html +++ b/tests/wpt/tests/navigation-api/navigation-methods/return-value/reload-rejection-order-pagehide-unserializablestate.html @@ -18,7 +18,7 @@ promise_test(async t => { let assertionPromise; await new Promise(resolve => { - i.contentWindow.onunload = t.step_func(() => { + i.contentWindow.onpagehide = t.step_func(() => { assertionPromise = assertBothRejectDOM(t, i.contentWindow.navigation.reload({ state: document.body }), "DataCloneError", i.contentWindow); assert_equals(navigateEventCount, 1); resolve(); @@ -28,5 +28,5 @@ promise_test(async t => { assert_not_equals(assertionPromise, undefined); await assertionPromise; -}, `reload() with an unserializable state inside onunload throws "DataCloneError", not "InvalidStateError"`); +}, `reload() with an unserializable state inside onpagehide throws "DataCloneError", not "InvalidStateError"`); diff --git a/tests/wpt/tests/navigation-api/ordering-and-transition/back-cross-document-event-order.html b/tests/wpt/tests/navigation-api/ordering-and-transition/back-cross-document-event-order.html new file mode 100644 index 00000000000..bde5697001c --- /dev/null +++ b/tests/wpt/tests/navigation-api/ordering-and-transition/back-cross-document-event-order.html @@ -0,0 +1,36 @@ + + + + + diff --git a/tests/wpt/tests/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html b/tests/wpt/tests/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html index 34a9b79fb5f..7a8c1792595 100644 --- a/tests/wpt/tests/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html +++ b/tests/wpt/tests/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html @@ -6,7 +6,7 @@ async_test(t => { let events = []; function finish() { - assert_array_equals(events, ["onnavigate", "readystateinteractive", "domcontentloaded", "readystatecomplete", "onload", "onpageshow"]); + assert_array_equals(events, ["onnavigate", "onunload", "readystateinteractive", "domcontentloaded", "readystatecomplete", "onload", "onpageshow"]); t.done(); }; @@ -24,6 +24,7 @@ async_test(t => { i.contentDocument.addEventListener("DOMContentLoaded", () => events.push("domcontentloaded")); i.contentDocument.onreadystatechange = () => events.push("readystate" + i.contentDocument.readyState); }; + i.contentWindow.onunload = () => events.push("onunload"); i.contentWindow.navigation.onnavigate = () => events.push("onnavigate"); i.contentWindow.navigation.navigate("?1").committed.then( () => events.push("promisefulfilled"), () => events.push("promiserejected")); diff --git a/tests/wpt/tests/png/apng/acTL-plays-one.html b/tests/wpt/tests/png/apng/acTL-plays-one.html index d34c204782e..9012e0e56ac 100644 --- a/tests/wpt/tests/png/apng/acTL-plays-one.html +++ b/tests/wpt/tests/png/apng/acTL-plays-one.html @@ -6,7 +6,7 @@ - + diff --git a/tests/wpt/tests/sanitizer-api/sanitizer-config.https.html b/tests/wpt/tests/sanitizer-api/sanitizer-config.https.html index f60e6c9c938..fc371b5bb97 100644 --- a/tests/wpt/tests/sanitizer-api/sanitizer-config.https.html +++ b/tests/wpt/tests/sanitizer-api/sanitizer-config.https.html @@ -42,24 +42,27 @@ // The probe determines whether the Sanitizer modifies the probe string. const probe_string = "
                                                            balabala

                                                            test

                                                            "; const probe = sanitizer => { - const div = document.createElement("div"); - div.setHTML(probe_string, {sanitizer: sanitizer}); + let template = document.createElement("template"); + template.innerHTML = probe_string; + let fragment = sanitizer.sanitize(template.content); + let div = document.createElement("div"); + div.append(fragment); return probe_string == div.innerHTML; }; const should_stay_the_same = { - allowElements: [ "div", "p" ], - blockElements: [ "test" ], - dropElements: [ "test" ], - allowAttributes: [{ name: "id", elements: "*"}], - dropAttributes: [{ name: "bla", elements: ["blubb"]}], + elements: [ "div", "p" ], + replaceWithChildrenElements: [ "test" ], + removeElements: [ "test" ], + attributes: ["id"], + removeAttributes: ["bla"], }; const should_modify = { - allowElements: [ "div", "span" ], - blockElements: [ "div" ], - dropElements: [ "p" ], - allowAttributes: [{ name: "id", elements: ["p"] }], - dropAttributes: [{ name: "id", elements: ["div"] }], + elements: [ "div", "span" ], + replaceWithChildrenElements: [ "div" ], + removeElements: [ "p" ], + attributes: ["test"], + removeAttributes: ["id"], }; assert_array_equals(Object.keys(should_stay_the_same), Object.keys(should_modify)); diff --git a/tests/wpt/tests/sanitizer-api/sanitizer-names.https.html b/tests/wpt/tests/sanitizer-api/sanitizer-names.https.html index df5dd8549d1..cd33bbc7635 100644 --- a/tests/wpt/tests/sanitizer-api/sanitizer-names.https.html +++ b/tests/wpt/tests/sanitizer-api/sanitizer-names.https.html @@ -14,13 +14,12 @@ // Element names: const elems_valid = [ "p", "template", "span", "custom-elements", "potato", - // Arguments will be stringified, so anything that stringifies to a valid - // name is also valid. (E.g. null => "null") - null, undefined, 123 + // name is also valid. + 123 ]; const elems_invalid = [ - "", [], ["*"], ["p"] + "", {name: ""}, ]; // Attribute names: @@ -32,17 +31,16 @@ const all_elems = elems_valid.concat(elems_invalid); const all_attrs = attrs_valid.concat(attrs_invalid); - for (const item of ["allowElements", "dropElements", "blockElements"]) { + for (const item of ["elements", "removeElements", "replaceWithChildrenElements"]) { test(t => { const sanitizer = new Sanitizer({[item]: all_elems}); assert_array_same(sanitizer.getConfiguration()[item], elems_valid.map(x => "" + x)); }, `Element names in config item: ${item}`); } - for (const item of ["allowAttributes", "dropAttributes"]) { + for (const item of ["attributes", "removeAttributes"]) { test(t => { - const sanitizer = new Sanitizer( - {[item]: Object.fromEntries(all_attrs.map(x => [x, ["*"]]))}); + const sanitizer = new Sanitizer({[item]: all_attrs}); assert_array_same(Object.keys(sanitizer.getConfiguration()[item]), attrs_valid.map(x => "" + x)); }, `Attribute names in config item: ${item}`); @@ -64,46 +62,50 @@ [ { name: "math", namespace: MATHML_NS }, "Hello" ], ].forEach(([elem, probe, expected], index) => { test(t => { - const sanitizer = new Sanitizer({allowElements: [elem], + const options = { elements: [elem], // TODO(https://github.com/WICG/sanitizer-api/issues/167) - allowUnknownMarkup: true}); + unknownMarkup: true}; const template = document.createElement("template"); - template.setHTML(probe, {sanitizer}); + template.setHTML(probe, {sanitizer: options}); assert_equals(template.innerHTML, expected ?? probe); - }, `Namespaced elements #${index}: allowElements: [${JSON.stringify(elem)}]`); + }, `Namespaced elements #${index}: elements: [${JSON.stringify(elem)}]`); }); // Same for attributes: const XLINK_NS = "http://www.w3.org/1999/xlink"; [ - [ { name: "style", elements: "*" }, "

                                                            " ], - [ { name: "href", elements: "*" }, "

                                                            " ], - [ { name: "xlink:href", elements: "*" }, "

                                                            " ], - [ { name: "href", namespace: XLINK_NS, elements: "*" }, "

                                                            ", "

                                                            " ], - [ { name: "href", namespace: XLINK_NS, elements: "*" }, "

                                                            ", "

                                                            " ], - [ { name: "href", elements: "*" }, "

                                                            ", "

                                                            " ], + [ { name: "style"}, "

                                                            " ], + [ { name: "href"}, "

                                                            " ], + [ { name: "xlink:href"}, "

                                                            " ], + [ { name: "href", namespace: XLINK_NS}, "

                                                            ", "

                                                            " ], + [ { name: "href", namespace: XLINK_NS}, "

                                                            ", "

                                                            " ], + [ { name: "href"}, "

                                                            ", "

                                                            " ], ].forEach(([attr, probe, expected], index) => { test(t => { - const sanitizer = new Sanitizer({allowAttributes: [attr], + const options = {attributes: [attr], // TODO(https://github.com/WICG/sanitizer-api/issues/167) - allowUnknownMarkup: true}); + unknownMarkup: true}; const template = document.createElement("template"); - template.setHTML(probe, {sanitizer}); + template.setHTML(probe, {sanitizer: options}); assert_equals(template.innerHTML, expected ?? probe); - }, `Namespaced attributes #${index}: allowAttributes: [${JSON.stringify(attr)}]`); + }, `Namespaced attributes #${index}: attributes: [${JSON.stringify(attr)}]`); }); // Test for namespaced attribute inside namespace element test(t => { const probe = ``; - const sanitizer = new Sanitizer({ - allowAttributes: [{ name: "href", namespace: XLINK_NS, elements: "*" }], - allowElements: [{ name: "svg", namespace: SVG_NS }, { name: "a", namespace: SVG_NS }], + const options = { + elements: [ + {name: "svg", namespace: SVG_NS}, + {name: "a", namespace: SVG_NS, attributes: [ + { name: "href", namespace: XLINK_NS } + ]} + ], // TODO(https://github.com/WICG/sanitizer-api/issues/167) - allowUnknownMarkup: true}); + unknownMarkup: true}; const template = document.createElement("template"); - template.setHTML(probe, {sanitizer}); + template.setHTML(probe, {sanitizer: options}); assert_equals(template.innerHTML, probe); }, "Namespaced attribute xlink:href inside SVG tree"); @@ -115,14 +117,14 @@ [ "textPath", "" ], ].forEach(([elem, probe], index) => { const sanitize = (elem, probe) => { - const sanitizer = new Sanitizer({allowElements: [ + const options = {elements: [ { name: "svg", namespace: SVG_NS }, { name: elem, namespace: SVG_NS } ], // TODO(https://github.com/WICG/sanitizer-api/issues/167) - allowUnknownMarkup: true}); + unknownMarkup: true}; const template = document.createElement("template"); - template.setHTML(`${probe}`, {sanitizer}); + template.setHTML(`${probe}`, {sanitizer: options}); return template.content.firstElementChild.innerHTML; }; test(t => { @@ -138,7 +140,7 @@ test(t => { const elems = ["svg:" + elem]; assert_array_equals( - new Sanitizer({allowElements: elems}).getConfiguration().allowElements, + new Sanitizer({elements: elems}).getConfiguration().allowElements, elems); }, `Mixed case element names #${index}: "${elem}" is preserved in config.`); }); diff --git a/tests/wpt/tests/sanitizer-api/sanitizer-unknown.https.html b/tests/wpt/tests/sanitizer-api/sanitizer-unknown.https.html index 03d7c6966d6..7b9835cb6d0 100644 --- a/tests/wpt/tests/sanitizer-api/sanitizer-unknown.https.html +++ b/tests/wpt/tests/sanitizer-api/sanitizer-unknown.https.html @@ -9,37 +9,30 @@ test(t => { d = document.createElement("div") d.setHTML("", - { sanitizer: new Sanitizer({allowElements: ["hello", "world"]}) }); + { sanitizer: { elements: ["hello", "world"] } }); assert_equals(d.innerHTML, ""); -}, "Unknown element names get blocked without allowUnknownMarkup."); +}, "Unknown element names get blocked without unknownMarkup."); test(t => { d = document.createElement("div") d.setHTML("", - { sanitizer: new Sanitizer({allowUnknownMarkup: true, - allowElements: ["hello", "world"]}) }); + { sanitizer: { unknownMarkup: true, elements: ["hello", "world"] } }); assert_equals(d.innerHTML, ""); -}, "Unknown element names pass with allowUnknownMarkup."); +}, "Unknown element names pass with unknownMarkup."); test(t => { d = document.createElement("div") - d.setHTML("", { sanitizer: - new Sanitizer({allowAttributes: [{name: "hello", elements: "*"}, - {name: "world", elements: "*"}]}) }); + d.setHTML("", + { sanitizer: { attributes: ["name", "world"] } }); assert_equals(d.innerHTML, ""); -}, "Unknown attributes names get blocked without allowUnknownMarkup."); +}, "Unknown attributes names get blocked without unknownMarkup."); test(t => { d = document.createElement("div") - d.setHTML("", { sanitizer: - new Sanitizer({allowUnknownMarkup: true, - allowAttributes: [ - {name: "hello", elements: "*"}, - {name: "world", elements: "*"} - ]}) - }); + d.setHTML("", + { sanitizer: { unknownMarkup: true, attributes: ["name", "world"] } }); assert_equals(d.innerHTML, ``); -}, "Unknown attribute names pass with allowUnknownMarkup."); +}, "Unknown attribute names pass with unknownMarkup."); diff --git a/tests/wpt/tests/sanitizer-api/support/testcases.sub.js b/tests/wpt/tests/sanitizer-api/support/testcases.sub.js index ad083a8d13b..7ce755ca060 100644 --- a/tests/wpt/tests/sanitizer-api/support/testcases.sub.js +++ b/tests/wpt/tests/sanitizer-api/support/testcases.sub.js @@ -78,16 +78,16 @@ const testcases = [ message: "invalid config_input", }, { - config_input: { dropElements: [] }, + config_input: { removeElements: [] }, value: "test", result: "test", - message: "empty dropElements list", + message: "empty removeElements list", }, { - config_input: { dropElements: ["div"] }, + config_input: { removeElements: ["div"] }, value: "
                                                            test

                                                            bla", result: "

                                                            bla

                                                            ", - message: "test html without close tag with dropElements list ['div']", + message: "test html without close tag with removeElements list ['div']", }, { config_input: {}, @@ -96,120 +96,168 @@ const testcases = [ message: "default behavior for custom elements", }, { - config_input: { allowCustomElements: true }, + config_input: { customElements: true }, value: "testbla", result: "testbla", message: "allow custom elements", }, { config_input: { - allowCustomElements: true, - allowElements: ["custom-element"], + customElements: true, + elements: ["custom-element"], }, value: "testbla", result: "testbla", message: "allow custom elements with allow elements", }, { - config_input: { allowCustomElements: false }, + config_input: { customElements: false }, value: "testbla", result: "bla", message: "disallow custom elements", }, { config_input: { - dropElements: ["custom-element"], - allowCustomElements: true, + removeElements: ["custom-element"], + customElements: true, }, value: "testbla", result: "bla", message: 'allow custom elements with drop list contains ["custom-element"]', }, { - config_input: { dropElements: ["script"] }, + config_input: { removeElements: ["script"] }, value: "", result: "", - message: 'test script with ["script"] as dropElements list', + message: 'test script with ["script"] as removeElements list', }, { - config_input: { dropElements: ["test-element", "i"] }, + config_input: { removeElements: ["test-element", "i"] }, value: "
                                                            balabalatest
                                                            t", result: "
                                                            balabala
                                                            ", - message: 'dropElements list ["test-element", "i"]}', + message: 'removeElements list ["test-element", "i"]}', }, { - config_input: { dropElements: ["dl", "p"] }, + config_input: { removeElements: ["dl", "p"] }, value: "
                                                            balabalai

                                                            t

                                                            ", result: "
                                                            balabalai
                                                            ", - message: 'dropElements list ["dl", "p"]}', + message: 'removeElements list ["dl", "p"]}', }, { - config_input: { allowElements: ["p"] }, + config_input: { elements: ["p"] }, value: "
                                                            test
                                                            p
                                                            tt

                                                            div

                                                            ", result: "testptt

                                                            div

                                                            ", - message: 'allowElements list ["p"]', + message: 'elements list ["p"]', }, { - config_input: { dropElements: ["div"], allowElements: ["div"] }, + config_input: { removeElements: ["div"], elements: ["div"] }, value: "
                                                            test

                                                            bla", result: "bla", - message: "allowElements list has no influence to dropElements", + message: "elements list has no influence to removeElements", }, { - config_input: { dropAttributes: [{ name: "style", elements: ["p"] }] }, - value: - "

                                                            Click.

                                                            div
                                                            ", - result: '

                                                            Click.

                                                            div
                                                            ', - message: 'dropAttributes list {"style": ["p"]} with style attribute', - }, - // {config_input: {dropAttributes: [{name: "*": ["a"]}}, value: "Click.
                                                            div
                                                            ", result: "Click.
                                                            div
                                                            ", message: "dropAttributes list {\"*\": [\"a\"]} with style attribute"}, - { - config_input: { dropAttributes: [] }, + config_input: { removeAttributes: [] }, value: "

                                                            Click.

                                                            ", result: '

                                                            Click.

                                                            ', - message: "empty dropAttributes list with id attribute", + message: "empty removeAttributes list with id attribute", }, { - config_input: { dropAttributes: [{ name: "id", elements: "*" }] }, + config_input: { removeAttributes: ["id"] }, value: "

                                                            Click.

                                                            ", result: "

                                                            Click.

                                                            ", - message: 'dropAttributes list {"id": ["*"]} with id attribute', + message: 'removeAttributes list ["id"] with id attribute', }, { config_input: { - dropAttributes: [{ name: "data-attribute-with-dashes", elements: "*" }], + removeAttributes: ["data-attribute-with-dashes"], }, value: "

                                                            Click.

                                                            ", result: '

                                                            Click.

                                                            ', message: - 'dropAttributes list {"data-attribute-with-dashes": ["*"]} with dom dataset js access', + 'removeAttributes list ["data-attribute-with-dashes"] with dom dataset js access', }, { - config_input: { allowAttributes: [{ name: "id", elements: ["div"] }] }, - value: "

                                                            P

                                                            DIV
                                                            ", - result: '

                                                            P

                                                            DIV
                                                            ', - message: 'allowAttributes list {"id": ["div"]} with id attribute', + config_input: { + elements: [ + { name: "p", attributes: ["title"] }, + { name: "div", attributes: ["id"] }, + ], + }, + value: "

                                                            P

                                                            DIV
                                                            ", + result: '

                                                            P

                                                            DIV
                                                            ', + message: + 'elements list with

                                                            attributes: ["title"] and div attributes: ["id"] lists', }, { - config_input: { allowAttributes: [{ name: "id", elements: "*" }] }, + config_input: { + elements: [ + { name: "p", removeAttributes: ["title"] }, + { name: "div", removeAttributes: ["id"] }, + ], + }, + value: "

                                                            P

                                                            DIV
                                                            ", + result: '

                                                            P

                                                            DIV
                                                            ', + message: + 'elements list with

                                                            removeAttributes: ["title"] and div removeAttributes: ["id"] lists', + }, + { + config_input: { + elements: [{ name: "div", attributes: ["id"], removeAttributes: ["id"] }], + }, + value: "

                                                            DIV
                                                            ", + result: "
                                                            DIV
                                                            ", + message: + 'elements list with
                                                            attributes: ["id"] and removeAttributes: ["id"] lists', + }, + { + config_input: { + elements: [{ name: "div", attributes: ["id", "title"] }], + attributes: [] + }, + value: "
                                                            DIV
                                                            ", + result: "
                                                            DIV
                                                            ", + message: + 'elements list with
                                                            attributes: ["id", "title"] does not override empty attributes: [] list', + }, + { + config_input: { + elements: [{ name: "div", attributes: ["id", "title"] }], + removeAttributes: ["id", "title"] + }, + value: "
                                                            DIV
                                                            ", + result: "
                                                            DIV
                                                            ", + message: + 'elements list with
                                                            attributes: ["id", "title"] does not override removeAttributes: ["id", "title"] list', + }, + { + config_input: { + elements: [{ name: "div", removeAttributes: ["id", "title"] }], + attributes: ["id", "title"] + }, + value: "
                                                            DIV
                                                            ", + result: "
                                                            DIV
                                                            ", + message: + 'elements list with
                                                            removeAttributes: ["id", "title"] is effective even with attributes: ["id", "title"] list', + }, + { + config_input: { attributes: ["id"] }, value: "

                                                            Click.

                                                            ", result: '

                                                            Click.

                                                            ', - message: - 'allowAttributes list {"id": ["*"]} with id attribute and onclick scripts', + message: 'attributes list ["id"] with id attribute and onclick scripts', }, // {config_input: {allowAttributes: {"*": ["a"]}}, value: "Click.
                                                            div
                                                            ", result: "Click.
                                                            div
                                                            ", message: "allowAttributes list {\"*\": [\"a\"]} with style attribute"}, { config_input: { - dropAttributes: [{ name: "style", elements: "*" }], - allowAttributes: [{ name: "style", elements: "*" }], + removeAttributes: ["style"], + attributes: ["style"], }, value: "

                                                            Click.

                                                            ", result: "

                                                            Click.

                                                            ", - message: "allowAttributes list has no influence to dropAttributes", + message: "attributes list has no influence to removeAttributes list", }, { - config_input: { allowElements: ["template", "div"] }, + config_input: { elements: ["template", "div"] }, value: "", result: "", message: "Template element", @@ -318,16 +366,16 @@ const testcases = [ message: "HTML with comments; comments not allowed", }, { - config_input: { allowComments: true }, + config_input: { comments: true }, value: "

                                                            Some text

                                                            Some more text

                                                            ", result: "

                                                            Some text

                                                            Some more text

                                                            ", - message: "HTML with comments; allowComments", + message: "HTML with comments; comments", }, { - config_input: { allowComments: false }, + config_input: { comments: false }, value: "

                                                            Some text

                                                            Some more text

                                                            ", result: "

                                                            Some text

                                                            Some more text

                                                            ", - message: "HTML with comments; !allowComments", + message: "HTML with comments; !comments", }, { config_input: {}, @@ -336,26 +384,26 @@ const testcases = [ message: "HTML with comments deeper in the tree", }, { - config_input: { allowComments: true }, + config_input: { comments: true }, value: "

                                                            commentintext

                                                            ", result: "

                                                            commentintext

                                                            ", - message: "HTML with comments deeper in the tree, allowComments", + message: "HTML with comments deeper in the tree, comments", }, { - config_input: { allowComments: false }, + config_input: { comments: false }, value: "

                                                            commentintext

                                                            ", result: "

                                                            commentintext

                                                            ", - message: "HTML with comments deeper in the tree, !allowComments", + message: "HTML with comments deeper in the tree, !comments", }, { - config_input: { allowElements: ["svg"] }, + config_input: { elements: ["svg"] }, value: "", result: "", message: "Unknown HTML names (HTMLUnknownElement instances) should not match elements parsed as non-HTML namespaces.", }, { - config_input: { allowElements: ["div", "svg"] }, + config_input: { elements: ["div", "svg"] }, value: "
                                                            ", result: "
                                                            ", message: @@ -364,139 +412,127 @@ const testcases = [ // Case normalization (actually: lack of) { - config_input: { dropElements: ["I", "DL"] }, + config_input: { removeElements: ["I", "DL"] }, value: "
                                                            balabala
                                                            test
                                                            ", result: "
                                                            balabala
                                                            test
                                                            ", - message: 'dropElements list ["I", "DL"]}', + message: 'removeElements list ["I", "DL"]}', }, { - config_input: { dropElements: ["i", "dl"] }, + config_input: { removeElements: ["i", "dl"] }, value: "
                                                            balabala
                                                            test
                                                            ", result: "
                                                            balabala
                                                            ", - message: 'dropElements list ["i", "dl"]}', + message: 'removeElements list ["i", "dl"]}', }, { - config_input: { dropElements: ["i", "dl"] }, + config_input: { removeElements: ["i", "dl"] }, value: "
                                                            balabala
                                                            test
                                                            ", result: "
                                                            balabala
                                                            ", - message: 'dropElements list ["i", "dl"]} with uppercase HTML', + message: 'removeElements list ["i", "dl"]} with uppercase HTML', }, { - config_input: { dropAttributes: [{ name: "ID", elements: "*" }] }, + config_input: { removeAttributes: ["ID"] }, value: '

                                                            Click.

                                                            ', result: '

                                                            Click.

                                                            ', - message: 'dropAttributes list {"ID": ["*"]} with id attribute', + message: 'removeAttributes list ["ID"] with id attribute', }, { - config_input: { dropAttributes: [{ name: "ID", elements: "*" }] }, + config_input: { removeAttributes: ["ID"] }, value: '

                                                            Click.

                                                            ', result: '

                                                            Click.

                                                            ', - message: 'dropAttributes list {"ID": ["*"]} with ID attribute', + message: 'removeAttributes list ["ID"] with ID attribute', }, { - config_input: { dropAttributes: [{ name: "id", elements: "*" }] }, + config_input: { removeAttributes: ["id"] }, value: '

                                                            Click.

                                                            ', result: "

                                                            Click.

                                                            ", - message: 'dropAttributes list {"id": ["*"]} with ID attribute', + message: 'removeAttributes list ["id"] with ID attribute', }, - // allowUnknownMarkup for elements (with and without) + // unknownMarkup for elements (with and without) { - config_input: { dropElements: [123, "test", "i", "custom-element"] }, + config_input: { removeElements: [123, "test", "i", "custom-element"] }, value: "
                                                            balabalatest
                                                            tcustom-element", result: "
                                                            balabala
                                                            ", - message: - "dropElements with unknown elements and without allowUnknownMarkup", + message: "removeElements with unknown elements and without unknownMarkup", }, { - config_input: { blockElements: [123, "test", "i", "custom-element"] }, + config_input: { + replaceWithChildrenElements: [123, "test", "i", "custom-element"], + }, value: "
                                                            balabalatest
                                                            tcustom-element", result: "
                                                            balabalatest
                                                            ", message: - "blockElements with unknown elements and without allowUnknownMarkup", + "replaceWithChildrenElements with unknown elements and without unknownMarkup", }, { - config_input: { allowElements: ["p", "test"] }, + config_input: { elements: ["p", "test"] }, value: "
                                                            test
                                                            p
                                                            tt

                                                            div

                                                            test", result: "testptt

                                                            div

                                                            ", - message: - "allowElements with unknown elements and without allowUnknownMarkup", + message: "elements with unknown elements and without unknownMarkup", }, { config_input: { - dropElements: [123, "test", "i", "custom-element"], - allowUnknownMarkup: true, + removeElements: [123, "test", "i", "custom-element"], + unknownMarkup: true, }, value: "
                                                            balabalatest
                                                            tcustom-element", result: "
                                                            balabala
                                                            ", - message: "dropElements with unknown elements and with allowUnknownMarkup", + message: "removeElements with unknown elements and with unknownMarkup", }, { config_input: { - blockElements: [123, "test", "i", "custom-element"], - allowUnknownMarkup: true, + replaceWithChildrenElements: [123, "test", "i", "custom-element"], + unknownMarkup: true, }, value: "
                                                            balabalatest
                                                            tcustom-element", result: "
                                                            balabalatest
                                                            t", - message: "blockElements with unknown elements and with allowUnknownMarkup", + message: + "replaceWithChildrenElements with unknown elements and with unknownMarkup", }, { - config_input: { allowElements: ["p", "test"], allowUnknownMarkup: true }, + config_input: { elements: ["p", "test"], unknownMarkup: true }, value: "
                                                            test
                                                            p
                                                            tt

                                                            div

                                                            test
                                                            ", result: "testptt

                                                            div

                                                            test", - message: "allowElements with unknown elements and with allowUnknownMarkup", + message: "elements with unknown elements and with unknownMarkup", }, - // allowUnknownMarkup for attributes (with and without) + // unknownMarkup for attributes (with and without) { config_input: { - allowAttributes: [ - { name: "hello", elements: "*" }, - { name: "world", elements: ["b"] }, - ], + attributes: ["hello", "world"], }, value: "
                                                            ", result: "
                                                            ", - message: - "allowAttributes unknown attributes and without allowUnknownMarkup", + message: "attributes: unknown attributes and without unknownMarkup", }, { config_input: { - allowAttributes: [ - { name: "hello", elements: "*" }, - { name: "world", elements: ["b"] }, - ], - allowUnknownMarkup: true, + attributes: ["hello", "world"], + unknownMarkup: true, }, value: "
                                                            ", - result: '
                                                            ', - message: "allowAttributes unknown attributes and with allowUnknownMarkup", + result: '
                                                            ', + message: "attributes: unknown attributes and with unknownMarkup", }, { config_input: { - dropAttributes: [ - { name: "hello", elements: "*" }, - { name: "world", elements: ["b"] }, - ], + removeAttributes: ["hello", "world"], }, value: "
                                                            ", result: "
                                                            ", - message: "dropAttributes unknown attributes and without allowUnknownMarkup", + message: "removeAttributes: unknown attributes and without unknownMarkup", }, { config_input: { - dropAttributes: [ - { name: "hello", elements: "*" }, - { name: "world", elements: ["b"] }, - ], - allowUnknownMarkup: true, + removeAttributes: ["hello", "world"], + unknownMarkup: true, }, value: "
                                                            ", result: "
                                                            ", - message: "dropAttributes unknown attributes and with allowUnknownMarkup", + message: "removeAttributes unknown attributes and with allowUnknownMarkup", }, ]; diff --git a/tests/wpt/tests/scheduler/WEB_FEATURES.yml b/tests/wpt/tests/scheduler/WEB_FEATURES.yml new file mode 100644 index 00000000000..4b5218b8b61 --- /dev/null +++ b/tests/wpt/tests/scheduler/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: scheduler + files: "**" diff --git a/tests/wpt/tests/scroll-animations/css/scroll-timeline-shorthand.html b/tests/wpt/tests/scroll-animations/css/scroll-timeline-shorthand.html index 0c8a47ae20d..722a8a1f4d7 100644 --- a/tests/wpt/tests/scroll-animations/css/scroll-timeline-shorthand.html +++ b/tests/wpt/tests/scroll-animations/css/scroll-timeline-shorthand.html @@ -100,10 +100,10 @@ test_shorthand_contraction('scroll-timeline', { test_shorthand_contraction('scroll-timeline', { 'scroll-timeline-name': '--a, --b, --c', 'scroll-timeline-axis': 'inline, inline', -}, ''); +}, '--a inline, --b inline, --c inline'); test_shorthand_contraction('scroll-timeline', { 'scroll-timeline-name': '--a, --b', 'scroll-timeline-axis': 'inline, inline, inline', -}, ''); +}, '--a inline, --b inline'); diff --git a/tests/wpt/tests/scroll-animations/css/view-timeline-shorthand.html b/tests/wpt/tests/scroll-animations/css/view-timeline-shorthand.html index c14c1c88067..9027eb0b09d 100644 --- a/tests/wpt/tests/scroll-animations/css/view-timeline-shorthand.html +++ b/tests/wpt/tests/scroll-animations/css/view-timeline-shorthand.html @@ -148,17 +148,17 @@ test_shorthand_contraction('view-timeline', { 'view-timeline-name': '--a, --b, --c', 'view-timeline-axis': 'inline, inline', 'view-timeline-inset': 'auto, auto', -}, ''); +}, '--a inline, --b inline, --c inline'); test_shorthand_contraction('view-timeline', { 'view-timeline-name': '--a, --b', 'view-timeline-axis': 'inline, inline, inline', 'view-timeline-inset': 'auto, auto, auto', -}, ''); +}, '--a inline, --b inline'); test_shorthand_contraction('view-timeline', { 'view-timeline-name': '--a, --b', 'view-timeline-axis': 'inline, inline', 'view-timeline-inset': 'auto, auto, auto', -}, ''); +}, '--a inline, --b inline'); diff --git a/tests/wpt/tests/scroll-to-text-fragment/non-html-documents.html b/tests/wpt/tests/scroll-to-text-fragment/non-html-documents.html index d86cf482ddc..5cec6aee3a2 100644 --- a/tests/wpt/tests/scroll-to-text-fragment/non-html-documents.html +++ b/tests/wpt/tests/scroll-to-text-fragment/non-html-documents.html @@ -26,24 +26,54 @@ function openPopup(url) { } const test_cases = [ - 'non-html.css', - 'non-html.js', - 'non-html.json', - 'non-html.txt', - 'non-html.xml' + { + filename: 'text-html.html', + expected: 'allowed', + }, + { + filename: 'text-css.css', + expected: 'blocked', + }, + { + filename: 'text-javascript.js', + expected: 'blocked', + }, + { + filename: 'application-json.json', + expected: 'blocked', + }, + { + filename: 'text-plain.txt', + expected: 'allowed', + }, + { + filename: 'application-xml.xml', + expected: 'blocked', + }, ]; for (let test_case of test_cases) { + const filename = test_case.filename; + const expected = test_case.expected; + const mediaType = filename.split('.')[0].replace('-', '/'); + promise_test(async function (t) { - const popup = await openPopup(`resources/${test_case}#:~:text=target`); + const popup = await openPopup(`resources/${filename}#:~:text=target`); + + // The WPT server should provide the correct content-type header from the + // file extension. + assert_equals(popup.document.contentType, mediaType); // rAF twice in case there is any asynchronicity in scrolling to the target. await rAF(popup); await rAF(popup); - assert_equals(popup.scrollY, 0); + const did_scroll = popup.scrollY > 0; + const expected_scroll = expected == 'allowed'; + assert_equals(did_scroll, expected_scroll, 'scrolled to fragment'); + popup.close(); - }, `Text directive blocked in ${test_case}`); + }, `Text directive ${expected} in ${mediaType}`); } diff --git a/tests/wpt/tests/scroll-to-text-fragment/resources/non-html.json b/tests/wpt/tests/scroll-to-text-fragment/resources/application-json.json similarity index 100% rename from tests/wpt/tests/scroll-to-text-fragment/resources/non-html.json rename to tests/wpt/tests/scroll-to-text-fragment/resources/application-json.json diff --git a/tests/wpt/tests/scroll-to-text-fragment/resources/non-html.xml b/tests/wpt/tests/scroll-to-text-fragment/resources/application-xml.xml similarity index 100% rename from tests/wpt/tests/scroll-to-text-fragment/resources/non-html.xml rename to tests/wpt/tests/scroll-to-text-fragment/resources/application-xml.xml diff --git a/tests/wpt/tests/scroll-to-text-fragment/resources/non-html.css b/tests/wpt/tests/scroll-to-text-fragment/resources/text-css.css similarity index 100% rename from tests/wpt/tests/scroll-to-text-fragment/resources/non-html.css rename to tests/wpt/tests/scroll-to-text-fragment/resources/text-css.css diff --git a/tests/wpt/tests/scroll-to-text-fragment/resources/text-html.html b/tests/wpt/tests/scroll-to-text-fragment/resources/text-html.html new file mode 100644 index 00000000000..c3d2d3a2f8b --- /dev/null +++ b/tests/wpt/tests/scroll-to-text-fragment/resources/text-html.html @@ -0,0 +1,10 @@ + + +

                                                            + target +

                                                            diff --git a/tests/wpt/tests/scroll-to-text-fragment/resources/non-html.js b/tests/wpt/tests/scroll-to-text-fragment/resources/text-javascript.js similarity index 100% rename from tests/wpt/tests/scroll-to-text-fragment/resources/non-html.js rename to tests/wpt/tests/scroll-to-text-fragment/resources/text-javascript.js diff --git a/tests/wpt/tests/scroll-to-text-fragment/resources/non-html.txt b/tests/wpt/tests/scroll-to-text-fragment/resources/text-plain.txt similarity index 99% rename from tests/wpt/tests/scroll-to-text-fragment/resources/non-html.txt rename to tests/wpt/tests/scroll-to-text-fragment/resources/text-plain.txt index 785a4d56d6e..b114445bac0 100644 --- a/tests/wpt/tests/scroll-to-text-fragment/resources/non-html.txt +++ b/tests/wpt/tests/scroll-to-text-fragment/resources/text-plain.txt @@ -23,3 +23,5 @@ In 2006, the W3C indicated an interest to participate in the development of HTML For a number of years, both groups then worked together. In 2011, however, the groups came to the conclusion that they had different goals: the W3C wanted to publish a "finished" version of "HTML5", while the WHATWG wanted to continue working on a Living Standard for HTML, continuously maintaining the specification rather than freezing it in a state with known problems, and adding new features as needed to evolve the platform. In 2019, the WHATWG and W3C signed an agreement to collaborate on a single version of HTML going forward: this document. + +target diff --git a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/router-rules.js b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/router-rules.js index 7b6a7144dbb..67871a2d4fd 100644 --- a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/router-rules.js +++ b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/router-rules.js @@ -2,44 +2,29 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. const routerRules = { - 'condition-url-pattern-source-network': [ - { - condition: { - urlPattern: new URLPattern({ - pathname: '/**/direct.txt' - }) - }, - source: 'network' + 'condition-urlpattern-constructed-source-network': [{ + condition: {urlPattern: new URLPattern({pathname: '/**/direct.txt'})}, + source: 'network' + }], + 'condition-urlpattern-urlpatterninit-source-network': [ + {condition: {urlPattern: {pathname: '/**/direct.txt'}}, source: 'network'}, + ], + 'condition-urlpattern-string-source-network': [ + {condition: {urlPattern: '/**/direct.txt'}, source: 'network'}, + ], + 'condition-request-source-network': + [{condition: {requestMode: 'no-cors'}, source: 'network'}], + 'condition-or-source-network': [{ + condition: { + or: [ + { + or: [{urlPattern: '/**/or-test/direct1.*??*'}], + }, + {urlPattern: '/**/or-test/direct2.*??*'} + ] }, - - ], - 'condition-request-source-network': [ - { - condition: { - requestMode: 'no-cors' - }, - source: 'network' - } - ], - 'condition-or-source-network': [ - { - condition: { - or: [ - { - or: [ - { - urlPattern: '/**/or-test/direct1.*??*' - } - ], - }, - { - urlPattern: '/**/or-test/direct2.*??*' - } - ] - }, - source: 'network' - } - ], + source: 'network' + }], }; export {routerRules}; diff --git a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/static-router-main-resource.https.html b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/static-router-main-resource.https.html index dda75f20f4b..523ececf317 100644 --- a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/static-router-main-resource.https.html +++ b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/static-router-main-resource.https.html @@ -10,7 +10,7 @@ + + + diff --git a/tests/wpt/tests/shared-storage/resources/shared-storage-writable-fetch-request-fallback-to-network-worker.js b/tests/wpt/tests/shared-storage/resources/shared-storage-writable-fetch-request-fallback-to-network-worker.js new file mode 100644 index 00000000000..d304669ea19 --- /dev/null +++ b/tests/wpt/tests/shared-storage/resources/shared-storage-writable-fetch-request-fallback-to-network-worker.js @@ -0,0 +1,15 @@ +var requests = []; + +self.addEventListener('message', function(event) { + event.data.port.postMessage({requests: requests}); + requests = []; +}); + +self.addEventListener('fetch', function(event) { + let maybeHeader = event.request.headers.get('Sec-Shared-Storage-Writable'); + requests.push({ + url: event.request.url, + mode: event.request.mode, + SSWHeader: String(maybeHeader), + }); +}); diff --git a/tests/wpt/tests/shared-storage/shared-storage-writable-service-worker-img.tentative.https.sub.html b/tests/wpt/tests/shared-storage/shared-storage-writable-service-worker-img.tentative.https.sub.html new file mode 100644 index 00000000000..9e7326d3c4d --- /dev/null +++ b/tests/wpt/tests/shared-storage/shared-storage-writable-service-worker-img.tentative.https.sub.html @@ -0,0 +1,111 @@ + + + + + + + + + + diff --git a/tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html new file mode 100644 index 00000000000..ee9d1e12335 --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html @@ -0,0 +1,28 @@ + + + + + + + + + + + +
                                                            + Click me! +
                                                            + + + diff --git a/tests/wpt/tests/soft-navigation-heuristics/multiple-nested-events.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/multiple-nested-events.tentative.html new file mode 100644 index 00000000000..e51841865d6 --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/multiple-nested-events.tentative.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +
                                                            + Click me! +
                                                            + + + + diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-after-transition-commit.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-after-transition-commit.tentative.html index 5c7d8f4f7a4..ae17db7d59f 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-after-transition-commit.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-after-transition-commit.tentative.html @@ -16,11 +16,11 @@ diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html index a63b177a63f..e20578ea79e 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html @@ -16,11 +16,11 @@ diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html index d6c61efb3cb..b7b2a24c942 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html @@ -19,12 +19,12 @@ testSoftNavigationNotDetected({ testName: "Aborted navigate event is not a soft navigation", eventHandler: e => { - timestamps[counter]["eventStart"] = performance.now(); e.intercept({handler: async () => { await addImageToMain(); main.appendChild(img); }}); e.preventDefault(); + timestamps[counter]["eventEnd"] = performance.now(); }, eventTarget: navigation, eventName: "navigate", diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-rejected.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-rejected.tentative.html index bcc0451d5bd..693f876b6e1 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-rejected.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-rejected.tentative.html @@ -16,11 +16,11 @@ diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html index 2755f9f9ac7..4d88f3d0b7d 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html @@ -23,7 +23,6 @@ await new Promise(r => step_timeout(r, 0)); const navigate_callback = e => { - timestamps[counter]["eventStart"] = performance.now(); e.intercept({ async handler() { const lcp_promise = new Promise(resolve => { @@ -41,6 +40,7 @@ await lcp_promise; } }); + timestamps[counter]["eventEnd"] = performance.now(); }; const link = document.getElementById("link"); diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api.tentative.html index ca11f684f49..2d61736a486 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api.tentative.html @@ -16,10 +16,10 @@ diff --git a/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html index 2a12a352bff..fd87f5f03e7 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html @@ -39,7 +39,10 @@ return t.popped == 2; } const link = document.getElementById("link"); - link.addEventListener("click", () => history.back()); + link.addEventListener("click", () => { + history.back(); + timestamps[counter]["eventEnd"] = performance.now(); + }); testSoftNavigation({ addContent: () => { // Add the content to the main element diff --git a/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html index 60a5ff72292..f89991d76b0 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html @@ -22,7 +22,10 @@ history.pushState({}, "", "another_one.html"); const link = document.getElementById("link"); - link.addEventListener("click", () => history.back()); + link.addEventListener("click", () => { + history.back(); + timestamps[counter]["eventEnd"] = performance.now(); + }); testSoftNavigation({ addContent: () => { // Add the content to the main element diff --git a/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js b/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js index 58ca9c22657..685bc21f43c 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js +++ b/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js @@ -144,10 +144,17 @@ const setEvent = (t, button, pushState, addContent, pushUrl, eventType, prepWork const eventObject = (eventType == 'click' || eventType.startsWith("key")) ? button : window; eventObject.addEventListener(eventType, async e => { + let prepWorkFailed = false; if (prepWork &&!prepWork(t)) { + prepWorkFailed = true; + } + // This is the end of the event's sync processing. + if (!timestamps[counter]["eventEnd"]) { + timestamps[counter]["eventEnd"] = performance.now(); + } + if (prepWorkFailed) { return; } - timestamps[counter]["eventStart"] = performance.now(); // Jump through a task, to ensure task tracking is working properly. await new Promise(r => t.step_timeout(r, 0)); @@ -165,9 +172,9 @@ const setEvent = (t, button, pushState, addContent, pushUrl, eventType, prepWork await new Promise(r => t.step_timeout(r, 10)); await addContent(url); - ++counter; interacted = true; + ++counter; }); }; @@ -190,7 +197,7 @@ const validateSoftNavigationEntry = async (clicks, extraValidations, assert_less_than_equal(timestamps[i]["syncPostInteraction"], entryTimestamp, "Entry timestamp is lower than the post interaction one"); assert_greater_than_equal( - timestamps[i]['eventStart'], entryTimestamp, + entryTimestamp, timestamps[i]['eventEnd'], 'Event start timestamp matches'); assert_not_equals(entry.navigationId, performance.getEntriesByType("navigation")[0].navigationId, diff --git a/tests/wpt/tests/speculation-rules/prerender/fetch-blob.html b/tests/wpt/tests/speculation-rules/prerender/fetch-blob.html index 4124d95077a..3158b0f1a06 100644 --- a/tests/wpt/tests/speculation-rules/prerender/fetch-blob.html +++ b/tests/wpt/tests/speculation-rules/prerender/fetch-blob.html @@ -1,5 +1,7 @@ Same-origin prerendering can access blobs + + @@ -13,7 +15,10 @@ setup(() => assertSpeculationRulesIsSupported()); promise_test(async t => { - const {exec} = await create_prerendered_page(t); + const opt = {}; + const init_opt = {}; + const rule_extras = {'target_hint': getTargetHint()}; + const {exec} = await create_prerendered_page(t, opt, init_opt, rule_extras); const result = await exec(async () => { const blob = await (await fetch('cache.txt')).blob(); const reader = new FileReader(); diff --git a/tests/wpt/tests/storage-access-api/helpers.js b/tests/wpt/tests/storage-access-api/helpers.js index 24ed21a976b..1ca0e121c6a 100644 --- a/tests/wpt/tests/storage-access-api/helpers.js +++ b/tests/wpt/tests/storage-access-api/helpers.js @@ -290,3 +290,9 @@ function MessageWorker(frame, message = {}) { return PostMessageAndAwaitReply( { command: "message_worker", message }, frame.contentWindow); } +// Opens a WebSocket connection to origin from within frame, and +// returns the cookie header that was sent during the handshake. +function ReadCookiesFromWebSocketConnection(frame, origin) { + return PostMessageAndAwaitReply( + { command: "get_cookie_via_websocket", origin}, frame.contentWindow); +} \ No newline at end of file diff --git a/tests/wpt/tests/storage-access-api/requestStorageAccess-web-socket.tentative.sub.https.window.js b/tests/wpt/tests/storage-access-api/requestStorageAccess-web-socket.tentative.sub.https.window.js new file mode 100644 index 00000000000..bc323bd95a0 --- /dev/null +++ b/tests/wpt/tests/storage-access-api/requestStorageAccess-web-socket.tentative.sub.https.window.js @@ -0,0 +1,51 @@ +// META: script=helpers.js +// META: script=/cookies/resources/cookie-helper.sub.js +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js + +'use strict'; + +const altRoot = "https://{{hosts[alt][]}}:{{ports[https][0]}}"; +const altRootWss = "wss://{{hosts[alt][]}}:{{ports[wss][0]}}"; + +const responderPath = "/storage-access-api/resources/script-with-cookie-header.py?script=embedded_responder.js"; +const altRootResponder = `${altRoot}${responderPath}`; + +async function SetUpResponderFrame(t, url) { + const frame = await CreateFrame(url); + + await SetPermissionInFrame(frame, [{ name: 'storage-access' }, 'granted']); + t.add_cleanup(async () => { + await test_driver.delete_all_cookies(); + await SetPermissionInFrame(frame, [{ name: 'storage-access' }, 'prompt']); + await MaybeSetStorageAccess("*", "*", "allowed"); + }); + + return frame; +} + +promise_test(async (t) => { + await MaybeSetStorageAccess("*", "*", "blocked"); + await SetFirstPartyCookieAndUnsetStorageAccessPermission(altRoot); + + const frame = await SetUpResponderFrame(t, altRootResponder); + + assert_true(await RequestStorageAccessInFrame(frame), "requestStorageAccess resolves without requiring a gesture."); + assert_true(await FrameHasStorageAccess(frame), "frame has storage access after request."); + assert_true(await HasUnpartitionedCookie(frame), "frame has access to cookies after request."); + + assert_true(cookieStringHasCookie("cookie", "unpartitioned", + await ReadCookiesFromWebSocketConnection(frame, altRootWss)), + "WebSocket handshake should include unpartitioned cookie"); +}, "WebSocket inherits storage access"); + +promise_test(async (t) => { + + await MaybeSetStorageAccess("*", "*", "blocked"); + await SetFirstPartyCookieAndUnsetStorageAccessPermission(altRoot); + const frame = await SetUpResponderFrame(t, altRootResponder); + + assert_false(cookieStringHasCookie("cookie", "unpartitioned", + await ReadCookiesFromWebSocketConnection(frame, altRootWss)), + "request should not contain cookies"); +}, "WebSocket omits unpartitioned cookies without storage access"); diff --git a/tests/wpt/tests/storage-access-api/resources/embedded_responder.js b/tests/wpt/tests/storage-access-api/resources/embedded_responder.js index e9cc39bc71a..4a956c5f394 100644 --- a/tests/wpt/tests/storage-access-api/resources/embedded_responder.js +++ b/tests/wpt/tests/storage-access-api/resources/embedded_responder.js @@ -1,5 +1,3 @@ -// META: script=/resources/testdriver.js -// META: script=/resources/testdriver-vendor.js "use strict"; test_driver.set_test_context(window.top); @@ -16,6 +14,20 @@ function waitForWorkerMessage(worker) { }); } +function connectAndGetRequestCookiesFrom(origin) { + return new Promise((resolve, reject) => { + const ws = new WebSocket(origin +'/echo-cookie'); + ws.onmessage = event => { + const cookies = event.data; + resolve(cookies); + ws.onerror = undefined; + ws.onclose = undefined; + }; + ws.onerror = () => reject(new Error('Unexpected error event')); + ws.onclose = evt => reject('Unexpected close event: ' + JSON.stringify(evt)); + }); +} + window.addEventListener("message", async (event) => { function reply(data) { event.source.postMessage( @@ -73,6 +85,10 @@ window.addEventListener("message", async (event) => { reply(await p.then(resp => resp.data)) break; } + case "get_cookie_via_websocket":{ + reply(await connectAndGetRequestCookiesFrom(event.data.origin)); + break; + } default: } }); diff --git a/tests/wpt/tests/svg/linking/reftests/use-template-ref.html b/tests/wpt/tests/svg/linking/reftests/use-template-ref.html new file mode 100644 index 00000000000..1423c542b14 --- /dev/null +++ b/tests/wpt/tests/svg/linking/reftests/use-template-ref.html @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/wpt/tests/svg/linking/reftests/use-template.html b/tests/wpt/tests/svg/linking/reftests/use-template.html new file mode 100644 index 00000000000..1c07415442d --- /dev/null +++ b/tests/wpt/tests/svg/linking/reftests/use-template.html @@ -0,0 +1,20 @@ + + +CSS Test: Use element after cloning + + + + + + + + + + + diff --git a/tests/wpt/tests/svg/painting/color-mix-currentcolor-fill-stroke-repaint.html b/tests/wpt/tests/svg/painting/color-mix-currentcolor-fill-stroke-repaint.html index 216948038ca..70e9013ac45 100644 --- a/tests/wpt/tests/svg/painting/color-mix-currentcolor-fill-stroke-repaint.html +++ b/tests/wpt/tests/svg/painting/color-mix-currentcolor-fill-stroke-repaint.html @@ -18,13 +18,13 @@
                                                            diff --git a/tests/wpt/tests/svg/painting/currentcolor-fill-stroke-repaint.html b/tests/wpt/tests/svg/painting/currentcolor-fill-stroke-repaint.html index 4e4fa20450c..4b08e1b8574 100644 --- a/tests/wpt/tests/svg/painting/currentcolor-fill-stroke-repaint.html +++ b/tests/wpt/tests/svg/painting/currentcolor-fill-stroke-repaint.html @@ -18,13 +18,13 @@
                                                            diff --git a/tests/wpt/tests/tools/ci/tc/tasks/test.yml b/tests/wpt/tests/tools/ci/tc/tasks/test.yml index 163e15c185c..cdb6687d065 100644 --- a/tests/wpt/tests/tools/ci/tc/tasks/test.yml +++ b/tests/wpt/tests/tools/ci/tc/tasks/test.yml @@ -113,7 +113,7 @@ components: scopes: - "docker-worker:capability:privileged" chunks-override: - testharness: 20 + testharness: 24 tox-python3_7: env: diff --git a/tests/wpt/tests/tools/ci/tc/tests/test_valid.py b/tests/wpt/tests/tools/ci/tc/tests/test_valid.py index 544c187affa..3a4ed62c3a1 100644 --- a/tests/wpt/tests/tools/ci/tc/tests/test_valid.py +++ b/tests/wpt/tests/tools/ci/tc/tests/test_valid.py @@ -289,6 +289,10 @@ def test_verify_payload(): 'wpt-firefox_android-nightly-testharness-18', 'wpt-firefox_android-nightly-testharness-19', 'wpt-firefox_android-nightly-testharness-20', + 'wpt-firefox_android-nightly-testharness-21', + 'wpt-firefox_android-nightly-testharness-22', + 'wpt-firefox_android-nightly-testharness-23', + 'wpt-firefox_android-nightly-testharness-24', 'wpt-firefox-stable-reftest-1', 'wpt-firefox-stable-reftest-2', 'wpt-firefox-stable-reftest-3', diff --git a/tests/wpt/tests/tools/wpt/run.py b/tests/wpt/tests/tools/wpt/run.py index 7bac4355829..4297c392d16 100644 --- a/tests/wpt/tests/tools/wpt/run.py +++ b/tests/wpt/tests/tools/wpt/run.py @@ -411,7 +411,7 @@ class FirefoxAndroid(BrowserSetup): self._logcat.start(device_serial) if self.browser.apk_path: device.uninstall_app(app) - device.install_app(self.browser.apk_path) + device.install_app(self.browser.apk_path, timeout=600) elif not device.is_app_installed(app): raise WptrunError("app %s not installed on device %s" % (app, device_serial)) diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/actions.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/actions.py index d9875535b25..f698b92d633 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/actions.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/actions.py @@ -277,6 +277,18 @@ class SetSPCTransactionModeAction: self.logger.debug("Setting SPC transaction mode to %s" % mode) return self.protocol.spc_transactions.set_spc_transaction_mode(mode) +class SetRPHRegistrationModeAction: + name = "set_rph_registration_mode" + + def __init__(self, logger, protocol): + self.logger = logger + self.protocol = protocol + + def __call__(self, payload): + mode = payload["mode"] + self.logger.debug("Setting RPH registration mode to %s" % mode) + return self.protocol.rph_registrations.set_rph_registration_mode(mode) + class CancelFedCMDialogAction: name = "cancel_fedcm_dialog" @@ -442,6 +454,7 @@ actions = [ClickAction, RemoveAllCredentialsAction, SetUserVerifiedAction, SetSPCTransactionModeAction, + SetRPHRegistrationModeAction, CancelFedCMDialogAction, ConfirmIDPLoginAction, SelectFedCMAccountAction, diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index e3760b8d5f8..8b61f16cac0 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -32,6 +32,7 @@ from .protocol import (BaseProtocolPart, WindowProtocolPart, DebugProtocolPart, SPCTransactionsProtocolPart, + RPHRegistrationsProtocolPart, FedCMProtocolPart, VirtualSensorProtocolPart, merge_dicts) @@ -363,6 +364,13 @@ class WebDriverSPCTransactionsProtocolPart(SPCTransactionsProtocolPart): body = {"mode": mode} return self.webdriver.send_session_command("POST", "secure-payment-confirmation/set-mode", body) +class WebDriverRPHRegistrationsProtocolPart(RPHRegistrationsProtocolPart): + def setup(self): + self.webdriver = self.parent.webdriver + + def set_rph_registration_mode(self, mode): + body = {"mode": mode} + return self.webdriver.send_session_command("POST", "custom-handlers/set-mode", body) class WebDriverFedCMProtocolPart(FedCMProtocolPart): def setup(self): @@ -432,6 +440,7 @@ class WebDriverProtocol(Protocol): WebDriverSetPermissionProtocolPart, WebDriverVirtualAuthenticatorProtocolPart, WebDriverSPCTransactionsProtocolPart, + WebDriverRPHRegistrationsProtocolPart, WebDriverFedCMProtocolPart, WebDriverDebugProtocolPart, WebDriverVirtualSensorPart] diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py index cac25e4e672..2bae86c5a9a 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py @@ -616,6 +616,18 @@ class SPCTransactionsProtocolPart(ProtocolPart): :param str mode: The automation mode to set""" pass +class RPHRegistrationsProtocolPart(ProtocolPart): + """Protocol part for Custom Handlers registrations""" + __metaclass__ = ABCMeta + + name = "rph_registrations" + + @abstractmethod + def set_rph_registration_mode(self, mode): + """Set the RPH registration automation mode + + :param str mode: The automation mode to set""" + pass class FedCMProtocolPart(ProtocolPart): """Protocol part for Federated Credential Management""" diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js index 29c661512da..4cb5462694b 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js @@ -269,6 +269,10 @@ return create_action("set_spc_transaction_mode", {mode, context}); }; + window.test_driver_internal.set_rph_registration_mode = function(mode, context = null) { + return create_action("set_rph_registration_mode", {mode, context}); + }; + window.test_driver_internal.cancel_fedcm_dialog = function(context = null) { return create_action("cancel_fedcm_dialog", {context}); }; diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/testrunner.py b/tests/wpt/tests/tools/wptrunner/wptrunner/testrunner.py index f29e902e05c..2d81cab7983 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/testrunner.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/testrunner.py @@ -640,7 +640,7 @@ class TestRunnerManager(threading.Thread): self.recording.set(["testrunner", "test"] + self.state.test.id.split("/")[1:]) self.logger.test_start(self.state.test.id, subsuite=self.state.subsuite) if self.rerun > 1: - self.logger.info("Run %d/%d" % (self.run_count, self.rerun)) + self.logger.info(f"Run {self.run_count + 1}/{self.rerun}") self.send_message("reset") self.run_count += 1 if self.debug_info is None: diff --git a/tests/wpt/tests/web-animations/crashtests/color-mix-crashtest.html b/tests/wpt/tests/web-animations/crashtests/color-mix-crashtest.html new file mode 100644 index 00000000000..91d29464f50 --- /dev/null +++ b/tests/wpt/tests/web-animations/crashtests/color-mix-crashtest.html @@ -0,0 +1,35 @@ + + +Interpolation of a color-mix function with currentcolor should not crash + + + +
                                                            Hello world
                                                            + + + + diff --git a/tests/wpt/tests/webcodecs/WEB_FEATURES.yml b/tests/wpt/tests/webcodecs/WEB_FEATURES.yml new file mode 100644 index 00000000000..89681db8850 --- /dev/null +++ b/tests/wpt/tests/webcodecs/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webcodecs + files: "**" diff --git a/tests/wpt/tests/webcodecs/full-cycle-test.https.any.js b/tests/wpt/tests/webcodecs/full-cycle-test.https.any.js index b7d5f7ea658..9f486f4c5a2 100644 --- a/tests/wpt/tests/webcodecs/full-cycle-test.https.any.js +++ b/tests/wpt/tests/webcodecs/full-cycle-test.https.any.js @@ -82,9 +82,13 @@ async function runFullCycleTest(t, options) { await checkEncoderSupport(t, encoder_config); let decoder = new VideoDecoder({ output(frame) { + t.add_cleanup(() => { frame.close() }); + assert_equals(frame.visibleRect.width, w, "visibleRect.width"); assert_equals(frame.visibleRect.height, h, "visibleRect.height"); - assert_equals(frame.timestamp, next_ts++, "decode timestamp"); + if (!options.realTimeLatencyMode) { + assert_equals(frame.timestamp, next_ts++, "decode timestamp"); + } // The encoder is allowed to change the color space to satisfy the // encoder when readback is needed to send the frame for encoding, but @@ -105,7 +109,6 @@ async function runFullCycleTest(t, options) { frames_decoded++; assert_true(validateBlackDots(frame, frame.timestamp), "frame doesn't match. ts: " + frame.timestamp); - frame.close(); }, error(e) { assert_unreached(e.message); @@ -129,7 +132,9 @@ async function runFullCycleTest(t, options) { } decoder.decode(chunk); frames_encoded++; - assert_equals(chunk.timestamp, next_encode_ts++, "encode timestamp"); + if (!options.realTimeLatencyMode) { + assert_equals(chunk.timestamp, next_encode_ts++, "encode timestamp"); + } }, error(e) { assert_unreached(e.message); diff --git a/tests/wpt/tests/webdriver/tests/bidi/WEB_FEATURES.yml b/tests/wpt/tests/webdriver/tests/bidi/WEB_FEATURES.yml new file mode 100644 index 00000000000..a3af7470a94 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webdriver-bidi + files: "**" diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/device_pixel_ratio.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/device_pixel_ratio.py index 604c9668556..e4db779bd5d 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/device_pixel_ratio.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/device_pixel_ratio.py @@ -4,10 +4,16 @@ from ... import get_device_pixel_ratio, get_viewport_dimensions @pytest.mark.asyncio -@pytest.mark.parametrize("device_pixel_ratio", [1, 2]) -async def test_device_pixel_ratio_only(bidi_session, new_tab, device_pixel_ratio): +@pytest.mark.parametrize("device_pixel_ratio", [0.5, 2]) +async def test_device_pixel_ratio_only(bidi_session, inline, new_tab, device_pixel_ratio): viewport = await get_viewport_dimensions(bidi_session, new_tab) + # Load a page so that reflow is triggered when changing the DPR + url = inline("
                                                            foo
                                                            ") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url, wait="complete" + ) + await bidi_session.browsing_context.set_viewport( context=new_tab["context"], device_pixel_ratio=device_pixel_ratio) @@ -17,12 +23,20 @@ async def test_device_pixel_ratio_only(bidi_session, new_tab, device_pixel_ratio @pytest.mark.asyncio -@pytest.mark.parametrize("device_pixel_ratio", [1, 2]) -async def test_device_pixel_ratio_with_viewport(bidi_session, new_tab, device_pixel_ratio): +@pytest.mark.parametrize("device_pixel_ratio", [0.5, 2]) +async def test_device_pixel_ratio_with_viewport( + bidi_session, inline, new_tab, device_pixel_ratio +): test_viewport = {"width": 250, "height": 300} assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + # Load a page so that reflow is triggered when changing the DPR + url = inline("
                                                            foo
                                                            ") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url, wait="complete" + ) + await bidi_session.browsing_context.set_viewport( context=new_tab["context"], viewport=test_viewport, @@ -33,10 +47,16 @@ async def test_device_pixel_ratio_with_viewport(bidi_session, new_tab, device_pi @pytest.mark.asyncio -async def test_reset_device_pixel_ratio(bidi_session, new_tab): +async def test_reset_device_pixel_ratio(bidi_session, inline, new_tab): original_dpr = await get_device_pixel_ratio(bidi_session, new_tab) test_dpr = original_dpr + 1 + # Load a page so that reflow is triggered when changing the DPR + url = inline("
                                                            foo
                                                            ") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url, wait="complete" + ) + await bidi_session.browsing_context.set_viewport( context=new_tab["context"], device_pixel_ratio=test_dpr) diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/invalid.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/invalid.py index b918deb668c..2a90af4da0b 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/invalid.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/invalid.py @@ -76,10 +76,18 @@ async def test_params_viewport_invalid_value(bidi_session, new_tab, viewport): @pytest.mark.parametrize("device_pixel_ratio", [False, "", {}, []]) async def test_params_devicePixelRatio_invalid_type(bidi_session, new_tab,device_pixel_ratio): with pytest.raises(error.InvalidArgumentException): - await bidi_session.browsing_context.set_viewport(context=new_tab["context"], device_pixel_ratio=device_pixel_ratio) + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + device_pixel_ratio=device_pixel_ratio, + viewport=None + ) @pytest.mark.parametrize("device_pixel_ratio", [0, -1]) async def test_params_devicePixelRatio_invalid_value(bidi_session, new_tab, device_pixel_ratio): with pytest.raises(error.InvalidArgumentException): - await bidi_session.browsing_context.set_viewport(context=new_tab["context"], device_pixel_ratio=device_pixel_ratio) + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + device_pixel_ratio=device_pixel_ratio, + viewport=None + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/set_viewport.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/viewport.py similarity index 68% rename from tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/set_viewport.py rename to tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/viewport.py index 51203db1d61..60f9e47040f 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/set_viewport.py +++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/set_viewport/viewport.py @@ -3,6 +3,7 @@ from webdriver.bidi.undefined import UNDEFINED from ... import get_viewport_dimensions + @pytest.mark.asyncio async def test_set_viewport(bidi_session, new_tab): test_viewport = {"width": 250, "height": 300} @@ -17,11 +18,17 @@ async def test_set_viewport(bidi_session, new_tab): @pytest.mark.asyncio -async def test_set_viewport_same_dimensions(bidi_session, new_tab): - test_viewport = {"width": 250, "height": 300} +async def test_undefined_viewport(bidi_session, inline, new_tab): + test_viewport = {"width": 499, "height": 599} assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + # Load a page so that reflow is triggered when changing the viewport + url = inline("
                                                            foo
                                                            ") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url, wait="complete" + ) + await bidi_session.browsing_context.set_viewport( context=new_tab["context"], viewport=test_viewport) @@ -30,19 +37,57 @@ async def test_set_viewport_same_dimensions(bidi_session, new_tab): await bidi_session.browsing_context.set_viewport( context=new_tab["context"], - viewport=test_viewport) + viewport=UNDEFINED) assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport @pytest.mark.asyncio -async def test_set_viewport_reset(bidi_session, new_tab): +@pytest.mark.parametrize("width, height", [ + (250, 300), + (500, 300), + (250, 600), + (500, 600) +], ids=["none", "width", "height", "both"]) +async def test_modified_dimensions(bidi_session, inline, new_tab, width, height): + start_viewport = {"width": 250, "height": 300} + + assert await get_viewport_dimensions(bidi_session, new_tab) != start_viewport + + # Load a page so that reflow is triggered when changing the viewport + url = inline("
                                                            foo
                                                            ") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url, wait="complete" + ) + + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=start_viewport) + + assert await get_viewport_dimensions(bidi_session, new_tab) == start_viewport + + modified_viewport = {"width": width, "height": height} + await bidi_session.browsing_context.set_viewport( + context=new_tab["context"], + viewport=modified_viewport) + + assert await get_viewport_dimensions(bidi_session, new_tab) == modified_viewport + + +@pytest.mark.asyncio +async def test_reset_to_default(bidi_session, inline, new_tab): original_viewport = await get_viewport_dimensions(bidi_session, new_tab) test_viewport = {"width": 666, "height": 333} assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + # Load a page so that reflow is triggered when changing the viewport + url = inline("
                                                            foo
                                                            ") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url, wait="complete" + ) + await bidi_session.browsing_context.set_viewport( context=new_tab["context"], viewport=test_viewport @@ -58,13 +103,19 @@ async def test_set_viewport_reset(bidi_session, new_tab): @pytest.mark.asyncio -async def test_set_viewport_affects_specific_context(bidi_session, top_context, new_tab): +async def test_specific_context(bidi_session, inline, new_tab, top_context): original_viewport = await get_viewport_dimensions(bidi_session, top_context) test_viewport = {"width": 333, "height": 666} assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + # Load a page so that reflow is triggered when changing the viewport + url = inline("
                                                            foo
                                                            ") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url, wait="complete" + ) + await bidi_session.browsing_context.set_viewport( context=new_tab["context"], viewport=test_viewport @@ -84,7 +135,7 @@ async def test_set_viewport_affects_specific_context(bidi_session, top_context, "https coop" ]) @pytest.mark.asyncio -async def test_set_viewport_persists_on_navigation(bidi_session, new_tab, inline, protocol, parameters): +async def test_persists_on_navigation(bidi_session, new_tab, inline, protocol, parameters): test_viewport = {"width": 499, "height": 599} assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport @@ -111,11 +162,17 @@ async def test_set_viewport_persists_on_navigation(bidi_session, new_tab, inline @pytest.mark.asyncio -async def test_set_viewport_persists_on_reload(bidi_session, new_tab): +async def test_persists_on_reload(bidi_session, inline, new_tab): test_viewport = {"width": 499, "height": 599} assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport + # Load a page so that reflow is triggered when changing the viewport + url = inline("
                                                            foo
                                                            ") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], url=url, wait="complete" + ) + await bidi_session.browsing_context.set_viewport( context=new_tab["context"], viewport=test_viewport) @@ -127,22 +184,3 @@ async def test_set_viewport_persists_on_reload(bidi_session, new_tab): ) assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport - - -@pytest.mark.asyncio -async def test_set_viewport_undefined(bidi_session, new_tab): - test_viewport = {"width": 499, "height": 599} - - assert await get_viewport_dimensions(bidi_session, new_tab) != test_viewport - - await bidi_session.browsing_context.set_viewport( - context=new_tab["context"], - viewport=test_viewport) - - assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport - - await bidi_session.browsing_context.set_viewport( - context=new_tab["context"], - viewport=UNDEFINED) - - assert await get_viewport_dimensions(bidi_session, new_tab) == test_viewport diff --git a/tests/wpt/tests/webdriver/tests/bidi/input/perform_actions/pointer_mouse_multiclick.py b/tests/wpt/tests/webdriver/tests/bidi/input/perform_actions/pointer_mouse_multiclick.py index 4f67f8fda94..87c29027b3a 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/input/perform_actions/pointer_mouse_multiclick.py +++ b/tests/wpt/tests/webdriver/tests/bidi/input/perform_actions/pointer_mouse_multiclick.py @@ -85,9 +85,7 @@ async def test_tripleclick_at_coordinates( desired outcome as taps are handled differently on mobile. """ url = inline( - f"""
                                                            - {lots_of_text} -
                                                            """ + f"""
                                                            {lots_of_text}
                                                            """ ) await bidi_session.browsing_context.navigate( diff --git a/tests/wpt/tests/webdriver/tests/bidi/input/release_actions/sequence.py b/tests/wpt/tests/webdriver/tests/bidi/input/release_actions/sequence.py index 55bc038a611..603b2941415 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/input/release_actions/sequence.py +++ b/tests/wpt/tests/webdriver/tests/bidi/input/release_actions/sequence.py @@ -66,6 +66,9 @@ async def test_release_mouse_sequence_resets_dblclick_state( ) events = await get_events(bidi_session, top_context["context"]) + # The expeced data here might vary between the vendors since the spec at the moment + # is not clear on how the double/triple click should be tracked. It should be + # clarified in the scope of https://github.com/w3c/webdriver/issues/1772. expected = [ {"type": "mousedown", "button": 0}, {"type": "mouseup", "button": 0}, @@ -75,8 +78,5 @@ async def test_release_mouse_sequence_resets_dblclick_state( {"type": "click", "button": 0}, ] - if not release_actions: - expected.append({"type": "dblclick", "button": 0}) - filtered_events = [filter_dict(e, expected[0]) for e in events] assert expected == filtered_events[1:] diff --git a/tests/wpt/tests/webdriver/tests/bidi/log/entry_added/console.py b/tests/wpt/tests/webdriver/tests/bidi/log/entry_added/console.py index 533dfd79501..061e85b7b6b 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/log/entry_added/console.py +++ b/tests/wpt/tests/webdriver/tests/bidi/log/entry_added/console.py @@ -100,6 +100,25 @@ async def test_timestamp(bidi_session, subscribe_events, top_context, wait_for_e assert_console_entry(event_data, text="foo", timestamp=int_interval(time_start, time_end)) +@pytest.mark.asyncio +async def test_method_timeEnd(bidi_session, subscribe_events, top_context, wait_for_event, wait_for_future_safe): + await subscribe_events(events=["log.entryAdded"]) + + on_entry_added = wait_for_event("log.entryAdded") + + script = "console.time('test'); console.timeEnd('test');" + + await bidi_session.script.evaluate( + expression=script, + await_promise=True, + target=ContextTarget(top_context["context"]), + ) + + event_data = await wait_for_future_safe(on_entry_added) + + assert_console_entry(event_data, method="timeEnd") + + @pytest.mark.asyncio async def test_new_context_with_new_window(bidi_session, subscribe_events, top_context, wait_for_event, wait_for_future_safe): await subscribe_events(events=["log.entryAdded"]) diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/auth_required/auth_required.py b/tests/wpt/tests/webdriver/tests/bidi/network/auth_required/auth_required.py index 7a0d53f40ec..5a01937ecd0 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/network/auth_required/auth_required.py +++ b/tests/wpt/tests/webdriver/tests/bidi/network/auth_required/auth_required.py @@ -1,5 +1,3 @@ -import asyncio - import pytest from .. import assert_response_event @@ -54,23 +52,12 @@ async def test_subscribe_status( redirect_count=0, ) - await bidi_session.session.unsubscribe(events=[AUTH_REQUIRED_EVENT]) - - # Navigate to authentication.py again and check no new event is received. - await bidi_session.browsing_context.navigate( - context=new_tab["context"], - url=auth_url, - wait="none", - ) - await asyncio.sleep(0.5) - assert len(events) == 1 - remove_listener() @pytest.mark.asyncio async def test_no_authentication( - bidi_session, new_tab, subscribe_events, wait_for_event, url + bidi_session, new_tab, subscribe_events, url ): await subscribe_events(events=[AUTH_REQUIRED_EVENT]) diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/auth_required/unsubscribe.py b/tests/wpt/tests/webdriver/tests/bidi/network/auth_required/unsubscribe.py new file mode 100644 index 00000000000..d869fdff7a7 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/network/auth_required/unsubscribe.py @@ -0,0 +1,37 @@ +import asyncio + +import pytest + +pytestmark = pytest.mark.asyncio + +PAGE_EMPTY_HTML = "/webdriver/tests/bidi/network/support/empty.html" + +AUTH_REQUIRED_EVENT = "network.authRequired" + + +# This test can be moved back to `auth_required.py` when all implementations +# support handing of HTTP auth prompt. +async def test_unsubscribe(bidi_session, new_tab, url): + await bidi_session.session.subscribe(events=[AUTH_REQUIRED_EVENT]) + await bidi_session.session.unsubscribe(events=[AUTH_REQUIRED_EVENT]) + + # Track all received network.authRequired events in the events array. + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener(AUTH_REQUIRED_EVENT, on_event) + + # Navigate to authentication.py again and check no event is received. + await bidi_session.browsing_context.navigate( + context=new_tab["context"], + url=url( + "/webdriver/tests/support/http_handlers/authentication.py?realm=testrealm" + ), + wait="none", + ) + await asyncio.sleep(0.5) + assert len(events) == 0 + + remove_listener() diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/remove_intercept/remove_intercept.py b/tests/wpt/tests/webdriver/tests/bidi/network/remove_intercept/remove_intercept.py index 3f205c38210..31b11153578 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/network/remove_intercept/remove_intercept.py +++ b/tests/wpt/tests/webdriver/tests/bidi/network/remove_intercept/remove_intercept.py @@ -1,5 +1,6 @@ # META: timeout=long +import asyncio import pytest from .. import ( @@ -18,7 +19,7 @@ PAGE_OTHER_TEXT = "/webdriver/tests/bidi/network/support/other.txt" "responseStarted", ]) async def test_remove_intercept( - bidi_session, wait_for_event, url, setup_network_test, add_intercept, subscribe_events, top_context, wait_for_future_safe, phase + bidi_session, wait_for_event, url, setup_network_test, add_intercept, top_context, wait_for_future_safe, phase ): network_events = await setup_network_test( events=[ @@ -39,18 +40,14 @@ async def test_remove_intercept( on_network_event = wait_for_event(f"network.{phase}") - await subscribe_events(events=["browsingContext.load"], contexts=[top_context["context"]]) - - browsing_context_load_events = [] - - async def on_browsing_context_load_event(method, data): - browsing_context_load_events.append(data) - - remove_listener = bidi_session.add_event_listener("browsingContext.load", on_browsing_context_load_event) - - # Request to top_context should be blocked. + # Request to top_context should be blocked and run into a timeout. # TODO(https://github.com/w3c/webdriver-bidi/issues/188): Use a timeout argument when available. - await bidi_session.browsing_context.navigate(context=top_context["context"], url=text_url, wait="complete") + with pytest.raises(asyncio.TimeoutError): + await asyncio.wait_for( + asyncio.shield(bidi_session.browsing_context.navigate( + context=top_context["context"], url=text_url, wait="complete")), + timeout=2.0, + ) await wait_for_future_safe(on_network_event) @@ -95,9 +92,6 @@ async def test_remove_intercept( assert len(response_completed_events) == 1 assert_response_event(response_completed_events[0], is_blocked=False) - assert len(browsing_context_load_events) == 0 - remove_listener() - @pytest.mark.asyncio async def test_return_value(bidi_session, add_intercept): diff --git a/tests/wpt/tests/webdriver/tests/classic/perform_actions/pointer_tripleclick.py b/tests/wpt/tests/webdriver/tests/classic/perform_actions/pointer_tripleclick.py index eccfa672408..301b503ef9b 100644 --- a/tests/wpt/tests/webdriver/tests/classic/perform_actions/pointer_tripleclick.py +++ b/tests/wpt/tests/webdriver/tests/classic/perform_actions/pointer_tripleclick.py @@ -11,9 +11,7 @@ def test_tripleclick_at_coordinates(session, mouse_chain, inline): this will select a paragraph. On mobile this will not have the same desired outcome as taps are handled differently on mobile. """ - session.url = inline("""
                                                            - {} -
                                                            """.format(lots_of_text)) + session.url = inline("""
                                                            {}
                                                            """.format(lots_of_text)) div = session.find.css("div", all=False) div_rect = div.rect div_centre = { diff --git a/tests/wpt/tests/webdriver/tests/classic/release_actions/sequence.py b/tests/wpt/tests/webdriver/tests/classic/release_actions/sequence.py index 78912d8b389..65ad39fcbf7 100644 --- a/tests/wpt/tests/webdriver/tests/classic/release_actions/sequence.py +++ b/tests/wpt/tests/webdriver/tests/classic/release_actions/sequence.py @@ -1,4 +1,5 @@ # META: timeout=long +import pytest from tests.classic.release_actions.support.refine import get_events, get_keys from tests.support.helpers import filter_dict, filter_supported_key_events @@ -29,19 +30,31 @@ def test_release_char_sequence_sends_keyup_events_in_reverse(session, assert events == expected +@pytest.mark.parametrize( + "release_actions", + [True, False], + ids=["with release actions", "without release actions"], +) def test_release_mouse_sequence_resets_dblclick_state(session, test_actions_page, - mouse_chain): + mouse_chain, + release_actions): reporter = session.find.css("#outer", all=False) mouse_chain \ .click(element=reporter) \ .perform() - session.actions.release() + + if release_actions: + session.actions.release() + mouse_chain \ .perform() events = get_events(session) + # The expeced data here might vary between the vendors since the spec at the moment + # is not clear on how the double/triple click should be tracked. It should be + # clarified in the scope of https://github.com/w3c/webdriver/issues/1772. expected = [ {"type": "mousedown", "button": 0}, {"type": "mouseup", "button": 0}, @@ -52,28 +65,3 @@ def test_release_mouse_sequence_resets_dblclick_state(session, ] filtered_events = [filter_dict(e, expected[0]) for e in events] assert expected == filtered_events[1:] - - -def test_no_release_mouse_sequence_keeps_dblclick_state(session, - test_actions_page, - mouse_chain): - reporter = session.find.css("#outer", all=False) - - mouse_chain \ - .click(element=reporter) \ - .perform() - mouse_chain \ - .perform() - events = get_events(session) - - expected = [ - {"type": "mousedown", "button": 0}, - {"type": "mouseup", "button": 0}, - {"type": "click", "button": 0}, - {"type": "mousedown", "button": 0}, - {"type": "mouseup", "button": 0}, - {"type": "click", "button": 0}, - {"type": "dblclick", "button": 0}, - ] - filtered_events = [filter_dict(e, expected[0]) for e in events] - assert expected == filtered_events[1:] diff --git a/tests/wpt/tests/webnn/elementwise_logical.https.any.js b/tests/wpt/tests/webnn/elementwise_logical.https.any.js new file mode 100644 index 00000000000..e614b94df5e --- /dev/null +++ b/tests/wpt/tests/webnn/elementwise_logical.https.any.js @@ -0,0 +1,20 @@ +// META: title=test WebNN API element-wise logical operations +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-logical + +testWebNNOperation( + [ + 'equal', + 'greater', + 'greaterOrEqual', + 'lesser', + 'lesserOrEqual', + ], + buildOperationWithTwoInputs +); +testWebNNOperation('logicalNot', buildOperationWithSingleInput); \ No newline at end of file diff --git a/tests/wpt/tests/webnn/elementwise_unary.https.any.js b/tests/wpt/tests/webnn/elementwise_unary.https.any.js index 3a6ccc8daf6..27902a406fb 100644 --- a/tests/wpt/tests/webnn/elementwise_unary.https.any.js +++ b/tests/wpt/tests/webnn/elementwise_unary.https.any.js @@ -8,6 +8,6 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-unary testWebNNOperation( - ['abs', 'ceil', 'cos', 'exp', 'floor', 'log', 'neg', 'sin', 'tan'], + ['abs', 'ceil', 'cos', 'exp', 'floor', 'identity', 'log', 'neg', 'reciprocal', 'sin', 'sqrt', 'tan'], buildOperationWithSingleInput ); \ No newline at end of file diff --git a/tests/wpt/tests/webnn/gpu/elementwise_logical.https.any.js b/tests/wpt/tests/webnn/gpu/elementwise_logical.https.any.js new file mode 100644 index 00000000000..f597ce8e0b2 --- /dev/null +++ b/tests/wpt/tests/webnn/gpu/elementwise_logical.https.any.js @@ -0,0 +1,20 @@ +// META: title=test WebNN API element-wise logical operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-logical + +testWebNNOperation( + [ + 'equal', + 'greater', + 'greaterOrEqual', + 'lesser', + 'lesserOrEqual', + ], + buildOperationWithTwoInputs, 'gpu' +); +testWebNNOperation('logicalNot', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file diff --git a/tests/wpt/tests/webnn/gpu/elementwise_unary.https.any.js b/tests/wpt/tests/webnn/gpu/elementwise_unary.https.any.js index bd4e927f78c..eff46315529 100644 --- a/tests/wpt/tests/webnn/gpu/elementwise_unary.https.any.js +++ b/tests/wpt/tests/webnn/gpu/elementwise_unary.https.any.js @@ -8,6 +8,6 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-unary testWebNNOperation( - ['abs', 'ceil', 'cos', 'exp', 'floor', 'log', 'neg', 'sin', 'tan'], + ['abs', 'ceil', 'cos', 'exp', 'floor', 'identity', 'log', 'neg', 'reciprocal', 'sin', 'sqrt', 'tan'], buildOperationWithSingleInput, 'gpu' ); \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/concat.json b/tests/wpt/tests/webnn/resources/test_data/concat.json index 9ecc393f899..4230744e86f 100644 --- a/tests/wpt/tests/webnn/resources/test_data/concat.json +++ b/tests/wpt/tests/webnn/resources/test_data/concat.json @@ -76,6 +76,81 @@ "type": "float32" } }, + { + "name": "concat two float16 1D tensors of same shape along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [12], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [12], + "data": [ + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat three float32 1D tensors of different 1st dimension along axis 0", "inputs": [ @@ -158,6 +233,88 @@ "type": "float32" } }, + { + "name": "concat three float16 1D tensors of different 1st dimension along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [4], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [8], + "data": [ + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [12], + "data": [ + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat four float32 1D tensors of same 1st dimension along axis 0", "inputs": [ @@ -247,6 +404,95 @@ "type": "float32" } }, + { + "name": "concat four float16 1D tensors of same 1st dimension along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [6], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [6], + "data": [ + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [6], + "data": [ + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635 + ], + "type": "float16" + }, + { + "name": "input4", + "shape": [6], + "data": [ + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat four float32 1D tensors of different 1st dimension along axis 0", "inputs": [ @@ -336,6 +582,95 @@ "type": "float32" } }, + { + "name": "concat four float16 1D tensors of different 1st dimension along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [2], + "data": [ + -0.39444134019222243, + 0.8619825316530809 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [4], + "data": [ + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [8], + "data": [ + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976 + ], + "type": "float16" + }, + { + "name": "input4", + "shape": [10], + "data": [ + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, // concat 2D tensors { "name": "concat two float32 2D tensors of same shape along axis 0", @@ -412,6 +747,81 @@ "type": "float32" } }, + { + "name": "concat two float16 2D tensors of same shape along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [2, 6], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [2, 6], + "data": [ + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat two float32 2D tensors of same others dimensions except different 1st dimension along axis 0", "inputs": [ @@ -487,6 +897,81 @@ "type": "float32" } }, + { + "name": "concat two float16 2D tensors of same others dimensions except different 1st dimension along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [1, 6], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [3, 6], + "data": [ + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat four float32 2D tensors of same shape along axis 0", "inputs": [ @@ -576,6 +1061,95 @@ "type": "float32" } }, + { + "name": "concat four float16 2D tensors of same shape along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [3, 2], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [3, 2], + "data": [ + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [3, 2], + "data": [ + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635 + ], + "type": "float16" + }, + { + "name": "input4", + "shape": [3, 2], + "data": [ + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [12, 2], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat two float32 2D tensors of same others dimensions except different 2nd dimension along axis 1", "inputs": [ @@ -651,6 +1225,81 @@ "type": "float32" } }, + { + "name": "concat two float16 2D tensors of same others dimensions except different 2nd dimension along axis 1", + "inputs": [ + { + "name": "input1", + "shape": [2, 10], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [2, 2], + "data": [ + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 1, + "expected": { + "name": "output", + "shape": [2, 12], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + 0.51806640625, + -0.8740234375, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat three float32 2D tensors of same shape along axis 1", "inputs": [ @@ -733,6 +1382,88 @@ "type": "float32" } }, + { + "name": "concat three float16 2D tensors of same shape along axis 1", + "inputs": [ + { + "name": "input1", + "shape": [4, 2], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [4, 2], + "data": [ + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [4, 2], + "data": [ + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 1, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -0.39453125, + 0.86181640625, + -0.5947265625, + -0.40283203125, + -0.720703125, + -0.79931640625, + 0.337890625, + -0.99072265625, + -0.953125, + -0.67333984375, + 0.66552734375, + 0.038848876953125, + 0.57666015625, + 0.32275390625, + 0.491943359375, + -0.15869140625, + 0.51806640625, + -0.8740234375, + -0.447265625, + 0.11029052734375, + -0.341796875, + -0.916015625, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat four float32 2D tensors of same others dimensions except different 2nd dimension along axis 1", "inputs": [ @@ -822,6 +1553,95 @@ "type": "float32" } }, + { + "name": "concat four float16 2D tensors of same others dimensions except different 2nd dimension along axis 1", + "inputs": [ + { + "name": "input1", + "shape": [3, 1], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [3, 2], + "data": [ + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [3, 2], + "data": [ + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157 + ], + "type": "float16" + }, + { + "name": "input4", + "shape": [3, 3], + "data": [ + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 1, + "expected": { + "name": "output", + "shape": [3, 8], + "data": [ + -0.39453125, + -0.99072265625, + 0.57666015625, + -0.40283203125, + -0.953125, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.86181640625, + 0.32275390625, + -0.447265625, + -0.67333984375, + 0.491943359375, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + 0.337890625, + 0.11029052734375, + -0.5947265625, + -0.15869140625, + -0.341796875, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, // concat 3D tensors { "name": "concat two float32 3D tensors of same others dimensions except different 1st dimension along axis 0", @@ -898,6 +1718,81 @@ "type": "float32" } }, + { + "name": "concat two float16 3D tensors of same others dimensions except different 1st dimension along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [2, 1, 3], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [6, 1, 3], + "data": [ + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [8, 1, 3], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat four float32 3D tensors of same others dimensions except different 2nd dimension along axis 1", "inputs": [ @@ -987,6 +1882,95 @@ "type": "float32" } }, + { + "name": "concat four float16 3D tensors of same others dimensions except different 2nd dimension along axis 1", + "inputs": [ + { + "name": "input1", + "shape": [3, 1, 1], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [3, 2, 1], + "data": [ + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [3, 2, 1], + "data": [ + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157 + ], + "type": "float16" + }, + { + "name": "input4", + "shape": [3, 3, 1], + "data": [ + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 1, + "expected": { + "name": "output", + "shape": [3, 8, 1], + "data": [ + -0.39453125, + -0.99072265625, + 0.57666015625, + -0.40283203125, + -0.953125, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.86181640625, + 0.32275390625, + -0.447265625, + -0.67333984375, + 0.491943359375, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + 0.337890625, + 0.11029052734375, + -0.5947265625, + -0.15869140625, + -0.341796875, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat three float32 3D tensors of same shape along axis 2", "inputs": [ @@ -1069,6 +2053,88 @@ "type": "float32" } }, + { + "name": "concat three float16 3D tensors of same shape along axis 2", + "inputs": [ + { + "name": "input1", + "shape": [2, 2, 2], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [2, 2, 2], + "data": [ + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [2, 2, 2], + "data": [ + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 2, + "expected": { + "name": "output", + "shape": [2, 2, 6], + "data": [ + -0.39453125, + 0.86181640625, + -0.5947265625, + -0.40283203125, + -0.720703125, + -0.79931640625, + 0.337890625, + -0.99072265625, + -0.953125, + -0.67333984375, + 0.66552734375, + 0.038848876953125, + 0.57666015625, + 0.32275390625, + 0.491943359375, + -0.15869140625, + 0.51806640625, + -0.8740234375, + -0.447265625, + 0.11029052734375, + -0.341796875, + -0.916015625, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, // concat 4D tensors { "name": "concat two float32 4D tensors of same others dimensions except different 1st dimension along axis 0", @@ -1145,6 +2211,81 @@ "type": "float32" } }, + { + "name": "concat two float16 4D tensors of same others dimensions except different 1st dimension along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [1, 3, 1, 2], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [3, 3, 1, 2], + "data": [ + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [4, 3, 1, 2], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat three float32 4D tensors of same shape along axis 1", "inputs": [ @@ -1227,6 +2368,88 @@ "type": "float32" } }, + { + "name": "concat three float16 4D tensors of same shape along axis 1", + "inputs": [ + { + "name": "input1", + "shape": [2, 2, 1, 2], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [2, 2, 1, 2], + "data": [ + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [2, 2, 1, 2], + "data": [ + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 1, + "expected": { + "name": "output", + "shape": [2, 6, 1, 2], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat three float32 4D tensors of same others dimensions except different 3rd dimension along axis 2", "inputs": [ @@ -1309,6 +2532,88 @@ "type": "float32" } }, + { + "name": "concat three float16 4D tensors of same others dimensions except different 3rd dimension along axis 2", + "inputs": [ + { + "name": "input1", + "shape": [1, 2, 2, 1], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [1, 2, 8, 1], + "data": [ + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [1, 2, 2, 1], + "data": [ + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 2, + "expected": { + "name": "output", + "shape": [1, 2, 12, 1], + "data": [ + -0.39453125, + 0.86181640625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.51806640625, + -0.8740234375, + 0.337890625, + -0.99072265625, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat four float32 4D tensors of same others dimensions except different 4th dimension along axis 3", "inputs": [ @@ -1398,6 +2703,95 @@ "type": "float32" } }, + { + "name": "concat four float16 4D tensors of same others dimensions except different 4th dimension along axis 3", + "inputs": [ + { + "name": "input1", + "shape": [1, 3, 1, 1], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [1, 3, 1, 1], + "data": [ + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [1, 3, 1, 2], + "data": [ + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844 + ], + "type": "float16" + }, + { + "name": "input4", + "shape": [1, 3, 1, 4], + "data": [ + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 3, + "expected": { + "name": "output", + "shape": [1, 3, 1, 8], + "data": [ + -0.39453125, + -0.99072265625, + -0.447265625, + 0.11029052734375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + 0.86181640625, + 0.57666015625, + -0.5947265625, + -0.40283203125, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.337890625, + 0.32275390625, + -0.953125, + -0.67333984375, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, // concat 5D tensors { "name": "concat four float32 5D tensors of same shape along axis 0", @@ -1488,6 +2882,95 @@ "type": "float32" } }, + { + "name": "concat four float16 5D tensors of same shape along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [1, 2, 1, 1, 3], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [1, 2, 1, 1, 3], + "data": [ + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [1, 2, 1, 1, 3], + "data": [ + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635 + ], + "type": "float16" + }, + { + "name": "input4", + "shape":[1, 2, 1, 1, 3], + "data": [ + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [4, 2, 1, 1, 3], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat two float32 5D tensors of same others dimensions except different 2nd dimension along axis 1", "inputs": [ @@ -1563,6 +3046,81 @@ "type": "float32" } }, + { + "name": "concat two float16 5D tensors of same others dimensions except different 2nd dimension along axis 1", + "inputs": [ + { + "name": "input1", + "shape": [1, 2, 3, 1, 1], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [1, 6, 3, 1, 1], + "data": [ + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 1, + "expected": { + "name": "output", + "shape": [1, 8, 3, 1, 1], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat three float32 5D tensors of same others dimensions except different 3rd dimension along axis 2", "inputs": [ @@ -1645,6 +3203,88 @@ "type": "float32" } }, + { + "name": "concat three float16 5D tensors of same others dimensions except different 3rd dimension along axis 2", + "inputs": [ + { + "name": "input1", + "shape": [1, 2, 1, 1, 2], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [1, 2, 2, 1, 2], + "data": [ + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844 + ], + "type": "float16" + }, + { + "name": "input3", + "shape": [1, 2, 3, 1, 2], + "data": [ + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 2, + "expected": { + "name": "output", + "shape": [1, 2, 6, 1, 2], + "data": [ + -0.39453125, + 0.86181640625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.337890625, + -0.99072265625, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat two float32 5D tensors of same others dimensions except different 4th dimension along axis 3", "inputs": [ @@ -1720,6 +3360,81 @@ "type": "float32" } }, + { + "name": "concat two float16 5D tensors of same others dimensions except different 4th dimension along axis 3", + "inputs": [ + { + "name": "input1", + "shape": [3, 1, 1, 1, 2], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [3, 1, 1, 3, 2], + "data": [ + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 3, + "expected": { + "name": "output", + "shape": [3, 1, 1, 4, 2], + "data": [ + -0.39453125, + 0.86181640625, + -0.447265625, + 0.11029052734375, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.337890625, + -0.99072265625, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + -0.720703125, + -0.79931640625, + 0.57666015625, + 0.32275390625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } + }, { "name": "concat two float32 5D tensors of same others dimensions except different 5th dimension along axis 4", "inputs": [ @@ -1794,6 +3509,81 @@ ], "type": "float32" } + }, + { + "name": "concat two float16 5D tensors of same others dimensions except different 5th dimension along axis 4", + "inputs": [ + { + "name": "input1", + "shape": [1, 2, 1, 1, 4], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932 + ], + "type": "float16" + }, + { + "name": "input2", + "shape": [1, 2, 1, 1, 8], + "data": [ + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844, + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float16" + } + ], + "axis": 4, + "expected": { + "name": "output", + "shape": [1, 2, 1, 1, 12], + "data": [ + -0.39453125, + 0.86181640625, + 0.337890625, + -0.99072265625, + -0.5947265625, + -0.40283203125, + -0.953125, + -0.67333984375, + 0.491943359375, + -0.15869140625, + -0.341796875, + -0.916015625, + 0.57666015625, + 0.32275390625, + -0.447265625, + 0.11029052734375, + -0.720703125, + -0.79931640625, + 0.66552734375, + 0.038848876953125, + 0.51806640625, + -0.8740234375, + -0.47900390625, + 0.12115478515625 + ], + "type": "float16" + } } ] } \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json b/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json index 2fcb317268c..980cc9f6629 100644 --- a/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json +++ b/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json @@ -81,6 +81,143 @@ "type": "float32" } }, + { + "name": "convTranspose2d float32 4D input and filter tensors options.groups", + "inputs": { + "input": { + "shape": [1, 2, 2, 2], + "data": [ + 0.8161798343223461, + 0.544277595043074, + 0.791066952587467, + 0.3656411302728415, + 0.2542919917049826, + 0.20815767803688034, + 0.7023073172218113, + 0.573446998515611 + ], + "type": "float32" + }, + "filter": { + "shape": [2, 1, 2, 2], + "data": [ + 0.09232201736721923, + 0.31896016969423147, + 0.5445202353307315, + 0.65828078346301, + 0.9634372989011768, + 0.01211885979286964, + 0.9230011822371578, + 0.4781944254526862 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "groups": 2 + }, + "expected": { + "shape": [1, 2, 3, 3], + "data": [ + 0.07535136491060257, + 0.3105776607990265, + 0.1736028790473938, + 0.5174593329429626, + 1.1197212934494019, + 0.4749124348163605, + 0.4307519793510437, + 0.7198431491851807, + 0.24069452285766602, + 0.023476747795939445, + 0.1003265455365181, + 0.06639400124549866, + 0.20330555737018585, + 0.5576914548873901, + 0.3199329376220703, + 0.3824205696582794, + 0.7745689153671265, + 0.3774891495704651 + ], + "type": "float32" + } + }, + { + "name": "convTranspose2d float32 4D input and filter tensors options.groups=2 options.strides=[2, 2]", + "inputs": { + "input": { + "shape": [1, 2, 2, 2], + "data": [ + 0.8161798343223461, + 0.544277595043074, + 0.791066952587467, + 0.3656411302728415, + 0.2542919917049826, + 0.20815767803688034, + 0.7023073172218113, + 0.573446998515611 + ], + "type": "float32" + }, + "filter": { + "shape": [2, 1, 2, 2], + "data": [ + 0.09232201736721923, + 0.31896016969423147, + 0.5445202353307315, + 0.65828078346301, + 0.9634372989011768, + 0.01211885979286964, + 0.9230011822371578, + 0.4781944254526862 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "groups": 2, + "strides": [2, 2] + }, + "expected": { + "shape": [1, 2, 4, 4], + "data": [ + 0.07535136491060257, + 0.26032882928848267, + 0.050248805433511734, + 0.1736028790473938, + 0.44442644715309143, + 0.537275493144989, + 0.29637017846107483, + 0.3582874834537506, + 0.07303289324045181, + 0.2523188292980194, + 0.03375672549009323, + 0.11662495136260986, + 0.4307519793510437, + 0.5207441449165344, + 0.19909898936748505, + 0.24069452285766602, + 0.023476747795939445, + 0.08110900968313217, + 0.019217535853385925, + 0.06639400124549866, + 0.13846713304519653, + 0.16739553213119507, + 0.11334607005119324, + 0.13702619075775146, + 0.06483843177556992, + 0.22400806844234467, + 0.05294178053736687, + 0.18290674686431885, + 0.3824205696582794, + 0.4623154401779175, + 0.31225350499153137, + 0.3774891495704651 + ], + "type": "float32" + } + }, { "name": "convTranspose2d float32 4D input and filter tensors options.padding", "inputs": { diff --git a/tests/wpt/tests/webnn/resources/test_data/equal.json b/tests/wpt/tests/webnn/resources/test_data/equal.json new file mode 100644 index 00000000000..8350a25d594 --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/equal.json @@ -0,0 +1,884 @@ +{ + "tests": [ + { + "name": "equal float32 0D scalar", + "inputs": { + "a": { + "shape": [], + "data": [ + -0.6285496901988363 + ], + "type": "float32" + }, + "b": { + "shape": [], + "data": [ + -4.416641209564136 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 0 + ], + "type": "uint8" + } + }, + { + "name": "equal float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + 2.8057064434130865, + 5.588105051769192, + -4.839719707803649, + 4.996258886261531, + 0.9727277518275201, + -6.173707599765419, + 2.8057064434130865, + 5.588105051769192, + 7.767369675510874, + -4.308908126069415, + -5.895479626582176, + -8.532091541161986, + 2.8057064434130865, + 5.588105051769192, + 0.17833953390240076, + -4.479541639848148, + 0.6819732148052395, + -6.687512654244134, + 2.8057064434130865, + 5.588105051769192, + -9.041799605912026, + -1.972828107164485, + -3.011512276155144, + 3.6268343183100704 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "equal float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + 2.8057064434130865, + 5.588105051769192, + -4.839719707803649, + 4.996258886261531, + 0.9727277518275201, + -6.173707599765419, + 2.8057064434130865, + 5.588105051769192, + 7.767369675510874, + -4.308908126069415, + -5.895479626582176, + -8.532091541161986, + 2.8057064434130865, + 5.588105051769192, + 0.17833953390240076, + -4.479541639848148, + 0.6819732148052395, + -6.687512654244134, + 2.8057064434130865, + 5.588105051769192, + -9.041799605912026, + -1.972828107164485, + -3.011512276155144, + 3.6268343183100704 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "equal float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + 2.8057064434130865, + 5.588105051769192, + -4.839719707803649, + 4.996258886261531, + 0.9727277518275201, + -6.173707599765419, + 2.8057064434130865, + 5.588105051769192, + 7.767369675510874, + -4.308908126069415, + -5.895479626582176, + -8.532091541161986, + 2.8057064434130865, + 5.588105051769192, + 0.17833953390240076, + -4.479541639848148, + 0.6819732148052395, + -6.687512654244134, + 2.8057064434130865, + 5.588105051769192, + -9.041799605912026, + -1.972828107164485, + -3.011512276155144, + 3.6268343183100704 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "equal float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 2.8057064434130865, + 5.588105051769192, + -4.839719707803649, + 4.996258886261531, + 0.9727277518275201, + -6.173707599765419, + 2.8057064434130865, + 5.588105051769192, + 7.767369675510874, + -4.308908126069415, + -5.895479626582176, + -8.532091541161986, + 2.8057064434130865, + 5.588105051769192, + 0.17833953390240076, + -4.479541639848148, + 0.6819732148052395, + -6.687512654244134, + 2.8057064434130865, + 5.588105051769192, + -9.041799605912026, + -1.972828107164485, + -3.011512276155144, + 3.6268343183100704 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "equal float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 2.8057064434130865, + 5.588105051769192, + -4.839719707803649, + 4.996258886261531, + 0.9727277518275201, + -6.173707599765419, + 2.8057064434130865, + 5.588105051769192, + 7.767369675510874, + -4.308908126069415, + -5.895479626582176, + -8.532091541161986, + 2.8057064434130865, + 5.588105051769192, + 0.17833953390240076, + -4.479541639848148, + 0.6819732148052395, + -6.687512654244134, + 2.8057064434130865, + 5.588105051769192, + -9.041799605912026, + -1.972828107164485, + -3.011512276155144, + 3.6268343183100704 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 1, 2, 3], + "data": [ + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "equal float32 broadcast 0D to 4D", + "inputs": { + "a": { + "shape": [], + "data": [ + 2.8057064434130865 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "equal float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + 2.8057064434130865 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "equal float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + 2.8057064434130865, + 5.588105051769192, + -4.9622954777657835, + -2.863192149827909, + -3.011512276155144, + 3.6268343183100704 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "equal float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + 2.8057064434130865, + 5.588105051769192, + -9.041799605912026, + 3.6268343183100704 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "equal float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + 2.8057064434130865 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/greater.json b/tests/wpt/tests/webnn/resources/test_data/greater.json new file mode 100644 index 00000000000..12e32d90728 --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/greater.json @@ -0,0 +1,884 @@ +{ + "tests": [ + { + "name": "greater float32 0D scalar", + "inputs": { + "a": { + "shape": [], + "data": [ + 3.6851014232119716 + ], + "type": "float32" + }, + "b": { + "shape": [], + "data": [ + 1.7231997782518338 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 1 + ], + "type": "uint8" + } + }, + { + "name": "greater float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + -6.155234276085855, + -4.023341341511664, + 5.9525983178014386, + 2.3066237309537883, + -2.7692292888690817, + -0.9711201246625745, + 1.2222066588909755, + 4.590261643319389, + 9.101232896619365, + -4.997007709812857, + -4.807293508200368, + 8.919360491720344, + 0.900502762346548, + -2.8414556193065543, + -2.8280412040974845, + 8.479845345966147, + -7.840679465875833, + 9.213960197279938, + 4.982364937519449, + -2.5073192467116145, + -4.518013838492472, + 8.351094603114355, + -6.161073167579363, + 0.7364829132932815 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "greater float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + -6.155234276085855, + -4.023341341511664, + 5.9525983178014386, + 2.3066237309537883, + -2.7692292888690817, + -0.9711201246625745, + 1.2222066588909755, + 4.590261643319389, + 9.101232896619365, + -4.997007709812857, + -4.807293508200368, + 8.919360491720344, + 0.900502762346548, + -2.8414556193065543, + -2.8280412040974845, + 8.479845345966147, + -7.840679465875833, + 9.213960197279938, + 4.982364937519449, + -2.5073192467116145, + -4.518013838492472, + 8.351094603114355, + -6.161073167579363, + 0.7364829132932815 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "greater float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + -6.155234276085855, + -4.023341341511664, + 5.9525983178014386, + 2.3066237309537883, + -2.7692292888690817, + -0.9711201246625745, + 1.2222066588909755, + 4.590261643319389, + 9.101232896619365, + -4.997007709812857, + -4.807293508200368, + 8.919360491720344, + 0.900502762346548, + -2.8414556193065543, + -2.8280412040974845, + 8.479845345966147, + -7.840679465875833, + 9.213960197279938, + 4.982364937519449, + -2.5073192467116145, + -4.518013838492472, + 8.351094603114355, + -6.161073167579363, + 0.7364829132932815 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "greater float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -6.155234276085855, + -4.023341341511664, + 5.9525983178014386, + 2.3066237309537883, + -2.7692292888690817, + -0.9711201246625745, + 1.2222066588909755, + 4.590261643319389, + 9.101232896619365, + -4.997007709812857, + -4.807293508200368, + 8.919360491720344, + 0.900502762346548, + -2.8414556193065543, + -2.8280412040974845, + 8.479845345966147, + -7.840679465875833, + 9.213960197279938, + 4.982364937519449, + -2.5073192467116145, + -4.518013838492472, + 8.351094603114355, + -6.161073167579363, + 0.7364829132932815 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "greater float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -6.155234276085855, + -4.023341341511664, + 5.9525983178014386, + 2.3066237309537883, + -2.7692292888690817, + -0.9711201246625745, + 1.2222066588909755, + 4.590261643319389, + 9.101232896619365, + -4.997007709812857, + -4.807293508200368, + 8.919360491720344, + 0.900502762346548, + -2.8414556193065543, + -2.8280412040974845, + 8.479845345966147, + -7.840679465875833, + 9.213960197279938, + 4.982364937519449, + -2.5073192467116145, + -4.518013838492472, + 8.351094603114355, + -6.161073167579363, + 0.7364829132932815 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 1, 2, 3], + "data": [ + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "greater float32 broadcast 0D to 4D", + "inputs": { + "a": { + "shape": [], + "data": [ + 6.22164122692616 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "type": "uint8" + } + }, + { + "name": "greater float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + 6.22164122692616 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "type": "uint8" + } + }, + { + "name": "greater float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + -2.684664470849163, + 6.170023353490912, + 9.487744366422781, + -2.555641152388084, + -2.0436435571200873, + 8.533930402669746 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "greater float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + -7.099076082908593, + -7.781408238233589, + 8.782817806924719, + -8.948624418290514 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1 + ], + "type": "uint8" + } + }, + { + "name": "greater float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + 6.22164122692616 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "type": "uint8" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/greater_or_equal.json b/tests/wpt/tests/webnn/resources/test_data/greater_or_equal.json new file mode 100644 index 00000000000..93ae0b3a4bc --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/greater_or_equal.json @@ -0,0 +1,873 @@ +{ + "tests": [ + { + "name": "greaterOrEqual float32 0D scalar", + "inputs": { + "a": { + "shape": [], + "data": [ + 0.2829853513361833 + ], + "type": "float32" + }, + "b": { + "shape": [], + "data": [ + 6.156983509735351 + ], + "type": "float32" + } + }, + "expected": { + "shape": [], + "data": [ + 0 + ], + "type": "uint8" + } + }, + { + "name": "greaterOrEqual float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + -7.028095113692983, + 1.9109992244501228, + 3.576529209692282, + 1.7167964605289043, + 2.846137548919838, + -2.311762981138341, + -6.086130252861408, + -3.437926736129744, + -3.4764428213302656, + -2.194656398262036, + 2.9962267558939892, + -5.540947945499273, + 5.098470133217425, + 6.775498827056623, + 2.4505413384295913, + 5.210598812779001, + -9.710094050019439, + -2.413028179599279, + 8.678308853275162, + -9.449530756013411, + 0.7702168987269076, + -1.518607415508292, + -9.15394321549195, + -4.9917360557925194 + ], + "type": "float32" + } + }, + "expected": { + "shape": [24], + "data": [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1 + ], + "type": "uint8" + } + }, + { + "name": "greaterOrEqual float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + -7.028095113692983, + 1.9109992244501228, + 3.576529209692282, + 1.7167964605289043, + 2.846137548919838, + -2.311762981138341, + -6.086130252861408, + -3.437926736129744, + -3.4764428213302656, + -2.194656398262036, + 2.9962267558939892, + -5.540947945499273, + 5.098470133217425, + 6.775498827056623, + 2.4505413384295913, + 5.210598812779001, + -9.710094050019439, + -2.413028179599279, + 8.678308853275162, + -9.449530756013411, + 0.7702168987269076, + -1.518607415508292, + -9.15394321549195, + -4.9917360557925194 + ], + "type": "float32" + } + }, + "expected": { + "shape": [4, 6], + "data": [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1 + ], + "type": "uint8" + } + }, + { + "name": "greaterOrEqual float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + -7.028095113692983, + 1.9109992244501228, + 3.576529209692282, + 1.7167964605289043, + 2.846137548919838, + -2.311762981138341, + -6.086130252861408, + -3.437926736129744, + -3.4764428213302656, + -2.194656398262036, + 2.9962267558939892, + -5.540947945499273, + 5.098470133217425, + 6.775498827056623, + 2.4505413384295913, + 5.210598812779001, + -9.710094050019439, + -2.413028179599279, + 8.678308853275162, + -9.449530756013411, + 0.7702168987269076, + -1.518607415508292, + -9.15394321549195, + -4.9917360557925194 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 3, 4], + "data": [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1 + ], + "type": "uint8" + } + }, + { + "name": "greaterOrEqual float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -7.028095113692983, + 1.9109992244501228, + 3.576529209692282, + 1.7167964605289043, + 2.846137548919838, + -2.311762981138341, + -6.086130252861408, + -3.437926736129744, + -3.4764428213302656, + -2.194656398262036, + 2.9962267558939892, + -5.540947945499273, + 5.098470133217425, + 6.775498827056623, + 2.4505413384295913, + 5.210598812779001, + -9.710094050019439, + -2.413028179599279, + 8.678308853275162, + -9.449530756013411, + 0.7702168987269076, + -1.518607415508292, + -9.15394321549195, + -4.9917360557925194 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1 + ], + "type": "uint8" + } + }, + { + "name": "greaterOrEqual float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -7.028095113692983, + 1.9109992244501228, + 3.576529209692282, + 1.7167964605289043, + 2.846137548919838, + -2.311762981138341, + -6.086130252861408, + -3.437926736129744, + -3.4764428213302656, + -2.194656398262036, + 2.9962267558939892, + -5.540947945499273, + 5.098470133217425, + 6.775498827056623, + 2.4505413384295913, + 5.210598812779001, + -9.710094050019439, + -2.413028179599279, + 8.678308853275162, + -9.449530756013411, + 0.7702168987269076, + -1.518607415508292, + -9.15394321549195, + -4.9917360557925194 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1 + ], + "type": "uint8" + } + }, + { + "name": "greaterOrEqual float32 broadcast 0D to 4D", + "inputs": { + "a": { + "shape": [], + "data": [ + -1.0187572964482339 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "greaterOrEqual float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + -1.0187572964482339 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "greaterOrEqual float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + -4.19451362795888, + 3.8917840404002177, + -3.5139974150349484, + 6.279316420756992, + 0.0017881708061917578, + -0.7928582491851124 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1 + ], + "type": "uint8" + } + }, + { + "name": "greaterOrEqual float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + -3.282304702993888, + -1.397563682654157, + 0.4905360718662557, + -6.882648917469618 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1 + ], + "type": "uint8" + } + }, + { + "name": "greaterOrEqual float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + -1.0187572964482339 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/identity.json b/tests/wpt/tests/webnn/resources/test_data/identity.json new file mode 100644 index 00000000000..444b39dc06c --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/identity.json @@ -0,0 +1,354 @@ +{ + "tests": [ + { + "name": "identity float32 0D scalar", + "inputs": { + "input": { + "shape": [], + "data": [ + -4.273642352495437 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + -4.273642539978027 + ], + "type": "float32" + } + }, + { + "name": "identity float32 1D tensor", + "inputs": { + "input": { + "shape":[24], + "data": [ + 0.3775514170243319, + -0.8890897684684553, + 9.965806154214683, + 7.964576323402355, + -4.207889285235442, + -3.748703004469509, + -2.5114005246358584, + 5.777673182705456, + -4.472823584733945, + -8.405767426137253, + -3.857972358579822, + 6.0361876313443865, + 9.076417609486516, + 7.101912233390028, + 1.4166420410053604, + -5.644308337756456, + -2.598648114422626, + -7.264847061642685, + -9.782458548766716, + 5.4966995825042275, + -9.967339588615012, + -6.901016518448189, + -2.850190435789366, + 3.279616439989832 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.377551406621933, + -0.8890897631645203, + 9.965806007385254, + 7.964576244354248, + -4.207889080047607, + -3.7487030029296875, + -2.5114004611968994, + 5.777673244476318, + -4.472823619842529, + -8.405767440795898, + -3.8579723834991455, + 6.036187648773193, + 9.076417922973633, + 7.101912021636963, + 1.4166420698165894, + -5.644308567047119, + -2.5986480712890625, + -7.264847278594971, + -9.782458305358887, + 5.496699810028076, + -9.967339515686035, + -6.901016712188721, + -2.8501904010772705, + 3.279616355895996 + ], + "type": "float32" + } + }, + { + "name": "identity float32 2D tensor", + "inputs": { + "input": { + "shape":[4, 6], + "data": [ + 0.3775514170243319, + -0.8890897684684553, + 9.965806154214683, + 7.964576323402355, + -4.207889285235442, + -3.748703004469509, + -2.5114005246358584, + 5.777673182705456, + -4.472823584733945, + -8.405767426137253, + -3.857972358579822, + 6.0361876313443865, + 9.076417609486516, + 7.101912233390028, + 1.4166420410053604, + -5.644308337756456, + -2.598648114422626, + -7.264847061642685, + -9.782458548766716, + 5.4966995825042275, + -9.967339588615012, + -6.901016518448189, + -2.850190435789366, + 3.279616439989832 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 0.377551406621933, + -0.8890897631645203, + 9.965806007385254, + 7.964576244354248, + -4.207889080047607, + -3.7487030029296875, + -2.5114004611968994, + 5.777673244476318, + -4.472823619842529, + -8.405767440795898, + -3.8579723834991455, + 6.036187648773193, + 9.076417922973633, + 7.101912021636963, + 1.4166420698165894, + -5.644308567047119, + -2.5986480712890625, + -7.264847278594971, + -9.782458305358887, + 5.496699810028076, + -9.967339515686035, + -6.901016712188721, + -2.8501904010772705, + 3.279616355895996 + ], + "type": "float32" + } + }, + { + "name": "identity float32 3D tensor", + "inputs": { + "input": { + "shape":[2, 3, 4], + "data": [ + 0.3775514170243319, + -0.8890897684684553, + 9.965806154214683, + 7.964576323402355, + -4.207889285235442, + -3.748703004469509, + -2.5114005246358584, + 5.777673182705456, + -4.472823584733945, + -8.405767426137253, + -3.857972358579822, + 6.0361876313443865, + 9.076417609486516, + 7.101912233390028, + 1.4166420410053604, + -5.644308337756456, + -2.598648114422626, + -7.264847061642685, + -9.782458548766716, + 5.4966995825042275, + -9.967339588615012, + -6.901016518448189, + -2.850190435789366, + 3.279616439989832 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 0.377551406621933, + -0.8890897631645203, + 9.965806007385254, + 7.964576244354248, + -4.207889080047607, + -3.7487030029296875, + -2.5114004611968994, + 5.777673244476318, + -4.472823619842529, + -8.405767440795898, + -3.8579723834991455, + 6.036187648773193, + 9.076417922973633, + 7.101912021636963, + 1.4166420698165894, + -5.644308567047119, + -2.5986480712890625, + -7.264847278594971, + -9.782458305358887, + 5.496699810028076, + -9.967339515686035, + -6.901016712188721, + -2.8501904010772705, + 3.279616355895996 + ], + "type": "float32" + } + }, + { + "name": "identity float32 4D tensor", + "inputs": { + "input": { + "shape":[2, 2, 2, 3], + "data": [ + 0.3775514170243319, + -0.8890897684684553, + 9.965806154214683, + 7.964576323402355, + -4.207889285235442, + -3.748703004469509, + -2.5114005246358584, + 5.777673182705456, + -4.472823584733945, + -8.405767426137253, + -3.857972358579822, + 6.0361876313443865, + 9.076417609486516, + 7.101912233390028, + 1.4166420410053604, + -5.644308337756456, + -2.598648114422626, + -7.264847061642685, + -9.782458548766716, + 5.4966995825042275, + -9.967339588615012, + -6.901016518448189, + -2.850190435789366, + 3.279616439989832 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0.377551406621933, + -0.8890897631645203, + 9.965806007385254, + 7.964576244354248, + -4.207889080047607, + -3.7487030029296875, + -2.5114004611968994, + 5.777673244476318, + -4.472823619842529, + -8.405767440795898, + -3.8579723834991455, + 6.036187648773193, + 9.076417922973633, + 7.101912021636963, + 1.4166420698165894, + -5.644308567047119, + -2.5986480712890625, + -7.264847278594971, + -9.782458305358887, + 5.496699810028076, + -9.967339515686035, + -6.901016712188721, + -2.8501904010772705, + 3.279616355895996 + ], + "type": "float32" + } + }, + { + "name": "identity float32 5D tensor", + "inputs": { + "input": { + "shape":[2, 1, 4, 1, 3], + "data": [ + 0.3775514170243319, + -0.8890897684684553, + 9.965806154214683, + 7.964576323402355, + -4.207889285235442, + -3.748703004469509, + -2.5114005246358584, + 5.777673182705456, + -4.472823584733945, + -8.405767426137253, + -3.857972358579822, + 6.0361876313443865, + 9.076417609486516, + 7.101912233390028, + 1.4166420410053604, + -5.644308337756456, + -2.598648114422626, + -7.264847061642685, + -9.782458548766716, + 5.4966995825042275, + -9.967339588615012, + -6.901016518448189, + -2.850190435789366, + 3.279616439989832 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 0.377551406621933, + -0.8890897631645203, + 9.965806007385254, + 7.964576244354248, + -4.207889080047607, + -3.7487030029296875, + -2.5114004611968994, + 5.777673244476318, + -4.472823619842529, + -8.405767440795898, + -3.8579723834991455, + 6.036187648773193, + 9.076417922973633, + 7.101912021636963, + 1.4166420698165894, + -5.644308567047119, + -2.5986480712890625, + -7.264847278594971, + -9.782458305358887, + 5.496699810028076, + -9.967339515686035, + -6.901016712188721, + -2.8501904010772705, + 3.279616355895996 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/lesser.json b/tests/wpt/tests/webnn/resources/test_data/lesser.json new file mode 100644 index 00000000000..64774d1621c --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/lesser.json @@ -0,0 +1,873 @@ +{ + "tests": [ + { + "name": "lesser float32 0D scalar", + "inputs": { + "a": { + "shape": [], + "data": [ + -0.5228080371919397 + ], + "type": "float32" + }, + "b": { + "shape": [], + "data": [ + 0.8150388698055 + ], + "type": "float32" + } + }, + "expected": { + "shape": [], + "data": [ + 1 + ], + "type": "uint8" + } + }, + { + "name": "lesser float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + 2.9453755897484726, + 3.7304716829497266, + 4.025375190729793, + -4.718355239722074, + 6.773274305103257, + -2.042813441289626, + -6.526761957285996, + 6.826299715878466, + -9.267172939567224, + 6.118424090729771, + -2.0017322775193014, + 1.779831042224643, + 9.660093887317394, + -2.7473158972960476, + -3.4345008109025033, + -4.7510974486127955, + -6.092621934151237, + -0.43348063367342426, + -1.4069053013420518, + -0.23742098855005445, + -9.105970612932852, + 6.811780042167808, + -6.768326860738436, + -8.952353121501568 + ], + "type": "float32" + } + }, + "expected": { + "shape": [24], + "data": [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesser float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + 2.9453755897484726, + 3.7304716829497266, + 4.025375190729793, + -4.718355239722074, + 6.773274305103257, + -2.042813441289626, + -6.526761957285996, + 6.826299715878466, + -9.267172939567224, + 6.118424090729771, + -2.0017322775193014, + 1.779831042224643, + 9.660093887317394, + -2.7473158972960476, + -3.4345008109025033, + -4.7510974486127955, + -6.092621934151237, + -0.43348063367342426, + -1.4069053013420518, + -0.23742098855005445, + -9.105970612932852, + 6.811780042167808, + -6.768326860738436, + -8.952353121501568 + ], + "type": "float32" + } + }, + "expected": { + "shape": [4, 6], + "data": [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesser float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + 2.9453755897484726, + 3.7304716829497266, + 4.025375190729793, + -4.718355239722074, + 6.773274305103257, + -2.042813441289626, + -6.526761957285996, + 6.826299715878466, + -9.267172939567224, + 6.118424090729771, + -2.0017322775193014, + 1.779831042224643, + 9.660093887317394, + -2.7473158972960476, + -3.4345008109025033, + -4.7510974486127955, + -6.092621934151237, + -0.43348063367342426, + -1.4069053013420518, + -0.23742098855005445, + -9.105970612932852, + 6.811780042167808, + -6.768326860738436, + -8.952353121501568 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 3, 4], + "data": [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesser float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 2.9453755897484726, + 3.7304716829497266, + 4.025375190729793, + -4.718355239722074, + 6.773274305103257, + -2.042813441289626, + -6.526761957285996, + 6.826299715878466, + -9.267172939567224, + 6.118424090729771, + -2.0017322775193014, + 1.779831042224643, + 9.660093887317394, + -2.7473158972960476, + -3.4345008109025033, + -4.7510974486127955, + -6.092621934151237, + -0.43348063367342426, + -1.4069053013420518, + -0.23742098855005445, + -9.105970612932852, + 6.811780042167808, + -6.768326860738436, + -8.952353121501568 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesser float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 2.9453755897484726, + 3.7304716829497266, + 4.025375190729793, + -4.718355239722074, + 6.773274305103257, + -2.042813441289626, + -6.526761957285996, + 6.826299715878466, + -9.267172939567224, + 6.118424090729771, + -2.0017322775193014, + 1.779831042224643, + 9.660093887317394, + -2.7473158972960476, + -3.4345008109025033, + -4.7510974486127955, + -6.092621934151237, + -0.43348063367342426, + -1.4069053013420518, + -0.23742098855005445, + -9.105970612932852, + 6.811780042167808, + -6.768326860738436, + -8.952353121501568 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesser float32 broadcast 0D to 4D", + "inputs": { + "a": { + "shape": [], + "data": [ + -5.678369818327527 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesser float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + -5.678369818327527 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesser float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data":[ + 3.5869946313397314, + -2.8533321455054805, + -3.684652687308483, + 2.4055018033797815, + -4.358371438779294, + 5.5484749560652915 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1 + ], + "type": "uint8" + } + }, + { + "name": "lesser float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + -4.439523740453941, + 2.751832334938049, + 3.6359436309279225, + -2.808992101634189 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 1 + ], + "type": "uint8" + } + }, + { + "name": "lesser float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + -5.678369818327527 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 0 + ], + "type": "uint8" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/lesser_or_equal.json b/tests/wpt/tests/webnn/resources/test_data/lesser_or_equal.json new file mode 100644 index 00000000000..8daea5e1368 --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/lesser_or_equal.json @@ -0,0 +1,873 @@ +{ + "tests": [ + { + "name": "lesserOrEqual float32 0D scalar", + "inputs": { + "a": { + "shape": [], + "data": [ + -6.978766599337822 + ], + "type": "float32" + }, + "b": { + "shape": [], + "data": [ + 6.613064588921308 + ], + "type": "float32" + } + }, + "expected": { + "shape": [], + "data": [ + 1 + ], + "type": "uint8" + } + }, + { + "name": "lesserOrEqual float32 1D tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32" + }, + "b": { + "shape": [24], + "data": [ + 5.498841374763742, + 1.7662660534986596, + -2.815573112568557, + -6.048312187382399, + 9.49753657859197, + -2.1015747067374635, + -4.079037092104509, + 5.314039986892048, + 0.0387145550620982, + -0.30728287605858995, + 4.975426828050438, + 3.4626017503711424, + 8.605685214066689, + 1.5140481393702743, + 2.009095893644295, + -0.3105867764637402, + -4.244836158037981, + -3.5506834915660024, + -2.5953286338985615, + -4.999806170449843, + 3.1189506609780526, + 9.70514084988082, + 9.546739178733759, + -6.189505543544822 + ], + "type": "float32" + } + }, + "expected": { + "shape": [24], + "data": [ + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesserOrEqual float32 2D tensors", + "inputs": { + "a": { + "shape": [4, 6], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32" + }, + "b": { + "shape": [4, 6], + "data": [ + 5.498841374763742, + 1.7662660534986596, + -2.815573112568557, + -6.048312187382399, + 9.49753657859197, + -2.1015747067374635, + -4.079037092104509, + 5.314039986892048, + 0.0387145550620982, + -0.30728287605858995, + 4.975426828050438, + 3.4626017503711424, + 8.605685214066689, + 1.5140481393702743, + 2.009095893644295, + -0.3105867764637402, + -4.244836158037981, + -3.5506834915660024, + -2.5953286338985615, + -4.999806170449843, + 3.1189506609780526, + 9.70514084988082, + 9.546739178733759, + -6.189505543544822 + ], + "type": "float32" + } + }, + "expected": { + "shape": [4, 6], + "data": [ + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesserOrEqual float32 3D tensors", + "inputs": { + "a": { + "shape": [2, 3, 4], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3, 4], + "data": [ + 5.498841374763742, + 1.7662660534986596, + -2.815573112568557, + -6.048312187382399, + 9.49753657859197, + -2.1015747067374635, + -4.079037092104509, + 5.314039986892048, + 0.0387145550620982, + -0.30728287605858995, + 4.975426828050438, + 3.4626017503711424, + 8.605685214066689, + 1.5140481393702743, + 2.009095893644295, + -0.3105867764637402, + -4.244836158037981, + -3.5506834915660024, + -2.5953286338985615, + -4.999806170449843, + 3.1189506609780526, + 9.70514084988082, + 9.546739178733759, + -6.189505543544822 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 3, 4], + "data": [ + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesserOrEqual float32 4D tensors", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + 5.498841374763742, + 1.7662660534986596, + -2.815573112568557, + -6.048312187382399, + 9.49753657859197, + -2.1015747067374635, + -4.079037092104509, + 5.314039986892048, + 0.0387145550620982, + -0.30728287605858995, + 4.975426828050438, + 3.4626017503711424, + 8.605685214066689, + 1.5140481393702743, + 2.009095893644295, + -0.3105867764637402, + -4.244836158037981, + -3.5506834915660024, + -2.5953286338985615, + -4.999806170449843, + 3.1189506609780526, + 9.70514084988082, + 9.546739178733759, + -6.189505543544822 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesserOrEqual float32 5D tensors", + "inputs": { + "a": { + "shape": [2, 2, 1, 2, 3], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 5.498841374763742, + 1.7662660534986596, + -2.815573112568557, + -6.048312187382399, + 9.49753657859197, + -2.1015747067374635, + -4.079037092104509, + 5.314039986892048, + 0.0387145550620982, + -0.30728287605858995, + 4.975426828050438, + 3.4626017503711424, + 8.605685214066689, + 1.5140481393702743, + 2.009095893644295, + -0.3105867764637402, + -4.244836158037981, + -3.5506834915660024, + -2.5953286338985615, + -4.999806170449843, + 3.1189506609780526, + 9.70514084988082, + 9.546739178733759, + -6.189505543544822 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 1, 2, 3], + "data": [ + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesserOrEqual float32 broadcast 0D to 4D", + "inputs": { + "a": { + "shape": [], + "data": [ + 4.840611135629258 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "type": "uint8" + } + }, + { + "name": "lesserOrEqual float32 broadcast 1D to 4D", + "inputs": { + "a": { + "shape": [1], + "data": [ + 4.840611135629258 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "type": "uint8" + } + }, + { + "name": "lesserOrEqual float32 broadcast 2D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32" + }, + "b": { + "shape": [2, 3], + "data": [ + -8.499546963452499, + -8.321309725362518, + -7.182070889034953, + 3.418306360706925, + 5.389469370006754, + 6.9043128878217 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesserOrEqual float32 broadcast 3D to 4D", + "inputs": { + "a": { + "shape": [2, 2, 2, 3], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 1], + "data": [ + 4.195140983741625, + 7.828658911400325, + 6.690202989995797, + 0.924701041097018 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0 + ], + "type": "uint8" + } + }, + { + "name": "lesserOrEqual float32 broadcast 4D to 4D", + "inputs": { + "a": { + "shape": [1, 1, 1, 1], + "data": [ + 4.840611135629258 + ], + "type": "float32" + }, + "b": { + "shape": [2, 2, 2, 3], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32" + } + }, + "expected": { + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "type": "uint8" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/logical_not.json b/tests/wpt/tests/webnn/resources/test_data/logical_not.json new file mode 100644 index 00000000000..5cb3208c786 --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/logical_not.json @@ -0,0 +1,354 @@ +{ + "tests": [ + { + "name": "logicalNot uint8 0D scalar", + "inputs": { + "x": { + "shape": [], + "data": [ + 1 + ], + "type": "uint8" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 0 + ], + "type": "uint8" + } + }, + { + "name": "logicalNot uint8 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 204, + 130, + 90, + 0, + 147, + 42, + 10, + 18, + 13, + 235, + 0, + 233, + 53, + 83, + 9, + 254, + 69, + 56, + 219, + 109, + 171, + 0, + 228, + 135 + ], + "type": "uint8" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "logicalNot uint8 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 204, + 130, + 90, + 0, + 147, + 42, + 10, + 18, + 13, + 235, + 0, + 233, + 53, + 83, + 9, + 254, + 69, + 56, + 219, + 109, + 171, + 0, + 228, + 135 + ], + "type": "uint8" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "logicalNot uint8 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 204, + 130, + 90, + 0, + 147, + 42, + 10, + 18, + 13, + 235, + 0, + 233, + 53, + 83, + 9, + 254, + 69, + 56, + 219, + 109, + 171, + 0, + 228, + 135 + ], + "type": "uint8" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "logicalNot uint8 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 204, + 130, + 90, + 0, + 147, + 42, + 10, + 18, + 13, + 235, + 0, + 233, + 53, + 83, + 9, + 254, + 69, + 56, + 219, + 109, + 171, + 0, + 228, + 135 + ], + "type": "uint8" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { + "name": "logicalNot uint8 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 204, + 130, + 90, + 0, + 147, + 42, + 10, + 18, + 13, + 235, + 0, + 233, + 53, + 83, + 9, + 254, + 69, + 56, + 219, + 109, + 171, + 0, + 228, + 135 + ], + "type": "uint8" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/reciprocal.json b/tests/wpt/tests/webnn/resources/test_data/reciprocal.json new file mode 100644 index 00000000000..dce56e5f57d --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/reciprocal.json @@ -0,0 +1,354 @@ +{ + "tests": [ + { + "name": "reciprocal float32 0D scalar", + "inputs": { + "x": { + "shape": [], + "data": [ + -9.363490722293237 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + -0.10679777711629868 + ], + "type": "float32" + } + }, + { + "name": "reciprocal float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + -1.011086269320547, + 4.6215385203163315, + 2.4173768502126727, + -8.934871773645101, + -3.348558485147799, + -8.803302423903414, + 8.82632175955639, + 6.572828698368518, + 6.639494748363678, + 2.6842704650429496, + -4.627160556770815, + -6.873653395070409, + -1.185412145486616, + 0.9572811852263605, + 0.021320551999082227, + 0.35645850544829827, + 4.827780063442164, + 1.312808185701284, + 8.246278209083616, + -0.20391698798075097, + -9.039937028172055, + 9.94280947774324, + -9.540112102987099, + -0.08022661906399975 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.9890353083610535, + 0.21637815237045288, + 0.4136715531349182, + -0.111921027302742, + -0.29863595962524414, + -0.11359372735023499, + 0.1132974773645401, + 0.1521414965391159, + 0.15061387419700623, + 0.3725407123565674, + -0.21611526608467102, + -0.14548304677009583, + -0.8435884118080139, + 1.044625163078308, + 46.90310287475586, + 2.805375576019287, + 0.20713452994823456, + 0.761725902557373, + 0.12126683443784714, + -4.903956413269043, + -0.11062023788690567, + 0.10057520121335983, + -0.10482056438922882, + -12.464690208435059 + ], + "type": "float32" + } + }, + { + "name": "reciprocal float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + -1.011086269320547, + 4.6215385203163315, + 2.4173768502126727, + -8.934871773645101, + -3.348558485147799, + -8.803302423903414, + 8.82632175955639, + 6.572828698368518, + 6.639494748363678, + 2.6842704650429496, + -4.627160556770815, + -6.873653395070409, + -1.185412145486616, + 0.9572811852263605, + 0.021320551999082227, + 0.35645850544829827, + 4.827780063442164, + 1.312808185701284, + 8.246278209083616, + -0.20391698798075097, + -9.039937028172055, + 9.94280947774324, + -9.540112102987099, + -0.08022661906399975 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -0.9890353083610535, + 0.21637815237045288, + 0.4136715531349182, + -0.111921027302742, + -0.29863595962524414, + -0.11359372735023499, + 0.1132974773645401, + 0.1521414965391159, + 0.15061387419700623, + 0.3725407123565674, + -0.21611526608467102, + -0.14548304677009583, + -0.8435884118080139, + 1.044625163078308, + 46.90310287475586, + 2.805375576019287, + 0.20713452994823456, + 0.761725902557373, + 0.12126683443784714, + -4.903956413269043, + -0.11062023788690567, + 0.10057520121335983, + -0.10482056438922882, + -12.464690208435059 + ], + "type": "float32" + } + }, + { + "name": "reciprocal float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + -1.011086269320547, + 4.6215385203163315, + 2.4173768502126727, + -8.934871773645101, + -3.348558485147799, + -8.803302423903414, + 8.82632175955639, + 6.572828698368518, + 6.639494748363678, + 2.6842704650429496, + -4.627160556770815, + -6.873653395070409, + -1.185412145486616, + 0.9572811852263605, + 0.021320551999082227, + 0.35645850544829827, + 4.827780063442164, + 1.312808185701284, + 8.246278209083616, + -0.20391698798075097, + -9.039937028172055, + 9.94280947774324, + -9.540112102987099, + -0.08022661906399975 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + -0.9890353083610535, + 0.21637815237045288, + 0.4136715531349182, + -0.111921027302742, + -0.29863595962524414, + -0.11359372735023499, + 0.1132974773645401, + 0.1521414965391159, + 0.15061387419700623, + 0.3725407123565674, + -0.21611526608467102, + -0.14548304677009583, + -0.8435884118080139, + 1.044625163078308, + 46.90310287475586, + 2.805375576019287, + 0.20713452994823456, + 0.761725902557373, + 0.12126683443784714, + -4.903956413269043, + -0.11062023788690567, + 0.10057520121335983, + -0.10482056438922882, + -12.464690208435059 + ], + "type": "float32" + } + }, + { + "name": "reciprocal float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + -1.011086269320547, + 4.6215385203163315, + 2.4173768502126727, + -8.934871773645101, + -3.348558485147799, + -8.803302423903414, + 8.82632175955639, + 6.572828698368518, + 6.639494748363678, + 2.6842704650429496, + -4.627160556770815, + -6.873653395070409, + -1.185412145486616, + 0.9572811852263605, + 0.021320551999082227, + 0.35645850544829827, + 4.827780063442164, + 1.312808185701284, + 8.246278209083616, + -0.20391698798075097, + -9.039937028172055, + 9.94280947774324, + -9.540112102987099, + -0.08022661906399975 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + -0.9890353083610535, + 0.21637815237045288, + 0.4136715531349182, + -0.111921027302742, + -0.29863595962524414, + -0.11359372735023499, + 0.1132974773645401, + 0.1521414965391159, + 0.15061387419700623, + 0.3725407123565674, + -0.21611526608467102, + -0.14548304677009583, + -0.8435884118080139, + 1.044625163078308, + 46.90310287475586, + 2.805375576019287, + 0.20713452994823456, + 0.761725902557373, + 0.12126683443784714, + -4.903956413269043, + -0.11062023788690567, + 0.10057520121335983, + -0.10482056438922882, + -12.464690208435059 + ], + "type": "float32" + } + }, + { + "name": "reciprocal float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + -1.011086269320547, + 4.6215385203163315, + 2.4173768502126727, + -8.934871773645101, + -3.348558485147799, + -8.803302423903414, + 8.82632175955639, + 6.572828698368518, + 6.639494748363678, + 2.6842704650429496, + -4.627160556770815, + -6.873653395070409, + -1.185412145486616, + 0.9572811852263605, + 0.021320551999082227, + 0.35645850544829827, + 4.827780063442164, + 1.312808185701284, + 8.246278209083616, + -0.20391698798075097, + -9.039937028172055, + 9.94280947774324, + -9.540112102987099, + -0.08022661906399975 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + -0.9890353083610535, + 0.21637815237045288, + 0.4136715531349182, + -0.111921027302742, + -0.29863595962524414, + -0.11359372735023499, + 0.1132974773645401, + 0.1521414965391159, + 0.15061387419700623, + 0.3725407123565674, + -0.21611526608467102, + -0.14548304677009583, + -0.8435884118080139, + 1.044625163078308, + 46.90310287475586, + 2.805375576019287, + 0.20713452994823456, + 0.761725902557373, + 0.12126683443784714, + -4.903956413269043, + -0.11062023788690567, + 0.10057520121335983, + -0.10482056438922882, + -12.464690208435059 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/reshape.json b/tests/wpt/tests/webnn/resources/test_data/reshape.json index 7d48ed3a18f..fbb93a8e03c 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reshape.json +++ b/tests/wpt/tests/webnn/resources/test_data/reshape.json @@ -202,7 +202,7 @@ } }, { - "name": "reshape float32 tensor to a new shape (one dimension being the special value of null)", + "name": "reshape float32 tensor to a new shape (4D to 4D)", "inputs": { "input": { "shape": [3, 2, 2, 2], @@ -235,7 +235,7 @@ "type": "float32" } }, - "newShape": [4, null, 3, 1], + "newShape": [4, 2, 3, 1], "expected": { "name": "output", "shape": [4, 2, 3, 1], @@ -334,73 +334,6 @@ ], "type": "float32" } - }, - { - "name": "reshape float32 tensor to 1D tensor newShape=[null]", - "inputs": { - "input": { - "shape": [3, 2, 2, 2], - "data": [ - -30.056147250771076, - 99.5694232746736, - 88.04620115823073, - -91.87507576772606, - -23.797235323955633, - -91.28665022600151, - -63.15204449663816, - 12.066952464893262, - -96.1172904235943, - -44.77365489782947, - -80.08650883940432, - -64.4375694650447, - 27.641954235862485, - -96.86306613475395, - 83.68347403572196, - 50.599484132010815, - -20.187656772788642, - -1.3904608012750117, - -96.9360325497362, - 65.34144119048645, - 34.835993949837274, - 62.01485845563673, - -2.8698414892852355, - 27.903749097190158 - ], - "type": "float32" - } - }, - "newShape": [null], - "expected": { - "name": "output", - "shape": [24], - "data": [ - -30.0561466217041, - 99.56941986083984, - 88.04620361328125, - -91.87507629394531, - -23.7972354888916, - -91.28665161132812, - -63.15204620361328, - 12.0669527053833, - -96.1172866821289, - -44.77365493774414, - -80.08650970458984, - -64.43756866455078, - 27.64195442199707, - -96.86306762695312, - 83.6834716796875, - 50.599483489990234, - -20.18765640258789, - -1.3904608488082886, - -96.93603515625, - 65.34143829345703, - 34.835994720458984, - 62.01485824584961, - -2.8698415756225586, - 27.903749465942383 - ], - "type": "float32" - } } ] } \ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/sqrt.json b/tests/wpt/tests/webnn/resources/test_data/sqrt.json new file mode 100644 index 00000000000..be9666590bd --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/sqrt.json @@ -0,0 +1,354 @@ +{ + "tests": [ + { + "name": "sqrt float32 0D scalar", + "inputs": { + "x": { + "shape": [], + "data": [ + 4.004463832628975 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 2.001115560531616 + ], + "type": "float32" + } + }, + { + "name": "sqrt float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 7.256007082508322, + 7.786442153556337, + 1.3684587069592324, + 8.053416211473843, + 9.131288551146515, + 8.525780428509535, + 4.870553385406751, + 7.625959393700068, + 2.7050268401423483, + 8.709602770137977, + 3.2687935624375797, + 4.712883187439902, + 8.669182019771712, + 8.82960710328718, + 0.5529024533541915, + 7.95877117461449, + 4.096406313025051, + 7.919884221032476, + 4.424484759327438, + 0.09894099762703057, + 4.690024907987658, + 1.5277378145575349, + 5.929779749165696, + 6.06647154134714 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 2.693697690963745, + 2.790419816970825, + 1.1698113679885864, + 2.8378541469573975, + 3.0218021869659424, + 2.919893980026245, + 2.20693302154541, + 2.7615139484405518, + 1.644696593284607, + 2.9512035846710205, + 1.8079805374145508, + 2.170917510986328, + 2.944347381591797, + 2.9714653491973877, + 0.7435740828514099, + 2.821129322052002, + 2.023958206176758, + 2.8142287731170654, + 2.1034460067749023, + 0.31454887986183167, + 2.165646553039551, + 1.2360169887542725, + 2.4351139068603516, + 2.4630208015441895 + ], + "type": "float32" + } + }, + { + "name": "sqrt float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 7.256007082508322, + 7.786442153556337, + 1.3684587069592324, + 8.053416211473843, + 9.131288551146515, + 8.525780428509535, + 4.870553385406751, + 7.625959393700068, + 2.7050268401423483, + 8.709602770137977, + 3.2687935624375797, + 4.712883187439902, + 8.669182019771712, + 8.82960710328718, + 0.5529024533541915, + 7.95877117461449, + 4.096406313025051, + 7.919884221032476, + 4.424484759327438, + 0.09894099762703057, + 4.690024907987658, + 1.5277378145575349, + 5.929779749165696, + 6.06647154134714 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 2.693697690963745, + 2.790419816970825, + 1.1698113679885864, + 2.8378541469573975, + 3.0218021869659424, + 2.919893980026245, + 2.20693302154541, + 2.7615139484405518, + 1.644696593284607, + 2.9512035846710205, + 1.8079805374145508, + 2.170917510986328, + 2.944347381591797, + 2.9714653491973877, + 0.7435740828514099, + 2.821129322052002, + 2.023958206176758, + 2.8142287731170654, + 2.1034460067749023, + 0.31454887986183167, + 2.165646553039551, + 1.2360169887542725, + 2.4351139068603516, + 2.4630208015441895 + ], + "type": "float32" + } + }, + { + "name": "sqrt float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 7.256007082508322, + 7.786442153556337, + 1.3684587069592324, + 8.053416211473843, + 9.131288551146515, + 8.525780428509535, + 4.870553385406751, + 7.625959393700068, + 2.7050268401423483, + 8.709602770137977, + 3.2687935624375797, + 4.712883187439902, + 8.669182019771712, + 8.82960710328718, + 0.5529024533541915, + 7.95877117461449, + 4.096406313025051, + 7.919884221032476, + 4.424484759327438, + 0.09894099762703057, + 4.690024907987658, + 1.5277378145575349, + 5.929779749165696, + 6.06647154134714 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 2.693697690963745, + 2.790419816970825, + 1.1698113679885864, + 2.8378541469573975, + 3.0218021869659424, + 2.919893980026245, + 2.20693302154541, + 2.7615139484405518, + 1.644696593284607, + 2.9512035846710205, + 1.8079805374145508, + 2.170917510986328, + 2.944347381591797, + 2.9714653491973877, + 0.7435740828514099, + 2.821129322052002, + 2.023958206176758, + 2.8142287731170654, + 2.1034460067749023, + 0.31454887986183167, + 2.165646553039551, + 1.2360169887542725, + 2.4351139068603516, + 2.4630208015441895 + ], + "type": "float32" + } + }, + { + "name": "sqrt float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 7.256007082508322, + 7.786442153556337, + 1.3684587069592324, + 8.053416211473843, + 9.131288551146515, + 8.525780428509535, + 4.870553385406751, + 7.625959393700068, + 2.7050268401423483, + 8.709602770137977, + 3.2687935624375797, + 4.712883187439902, + 8.669182019771712, + 8.82960710328718, + 0.5529024533541915, + 7.95877117461449, + 4.096406313025051, + 7.919884221032476, + 4.424484759327438, + 0.09894099762703057, + 4.690024907987658, + 1.5277378145575349, + 5.929779749165696, + 6.06647154134714 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 2.693697690963745, + 2.790419816970825, + 1.1698113679885864, + 2.8378541469573975, + 3.0218021869659424, + 2.919893980026245, + 2.20693302154541, + 2.7615139484405518, + 1.644696593284607, + 2.9512035846710205, + 1.8079805374145508, + 2.170917510986328, + 2.944347381591797, + 2.9714653491973877, + 0.7435740828514099, + 2.821129322052002, + 2.023958206176758, + 2.8142287731170654, + 2.1034460067749023, + 0.31454887986183167, + 2.165646553039551, + 1.2360169887542725, + 2.4351139068603516, + 2.4630208015441895 + ], + "type": "float32" + } + }, + { + "name": "sqrt float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 7.256007082508322, + 7.786442153556337, + 1.3684587069592324, + 8.053416211473843, + 9.131288551146515, + 8.525780428509535, + 4.870553385406751, + 7.625959393700068, + 2.7050268401423483, + 8.709602770137977, + 3.2687935624375797, + 4.712883187439902, + 8.669182019771712, + 8.82960710328718, + 0.5529024533541915, + 7.95877117461449, + 4.096406313025051, + 7.919884221032476, + 4.424484759327438, + 0.09894099762703057, + 4.690024907987658, + 1.5277378145575349, + 5.929779749165696, + 6.06647154134714 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 2.693697690963745, + 2.790419816970825, + 1.1698113679885864, + 2.8378541469573975, + 3.0218021869659424, + 2.919893980026245, + 2.20693302154541, + 2.7615139484405518, + 1.644696593284607, + 2.9512035846710205, + 1.8079805374145508, + 2.170917510986328, + 2.944347381591797, + 2.9714653491973877, + 0.7435740828514099, + 2.821129322052002, + 2.023958206176758, + 2.8142287731170654, + 2.1034460067749023, + 0.31454887986183167, + 2.165646553039551, + 1.2360169887542725, + 2.4351139068603516, + 2.4630208015441895 + ], + "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 5f9d5c93a41..1e31886c9c5 100644 --- a/tests/wpt/tests/webnn/resources/utils.js +++ b/tests/wpt/tests/webnn/resources/utils.js @@ -4,6 +4,9 @@ const ExecutionArray = ['sync', 'async']; // https://webmachinelearning.github.io/webnn/#enumdef-mloperanddatatype const TypedArrayDict = { + // workaround use Uint16 for Float16 + float16: Uint16Array, + float32: Float32Array, int32: Int32Array, uint32: Uint32Array, @@ -11,6 +14,20 @@ const TypedArrayDict = { uint8: Uint8Array, }; +const getTypedArrayData = (type, data) => { + let outData; + if (type === 'float16') { + // workaround to convert Float16 to Uint16 + outData = new TypedArrayDict[type](data.length); + for (let i = 0; i < data.length; i++) { + outData[i] = toHalf(data[i]); + } + } else { + outData = new TypedArrayDict[type](data); + } + return outData; +}; + const sizeOfShape = (array) => { return array.reduce((accumulator, currentValue) => accumulator * currentValue, 1); }; @@ -277,15 +294,26 @@ const PrecisionMetrics = { min: {ULP: {float32: 0, float16: 0}}, pow: {ULP: {float32: 32, float16: 2}}, // End Element-wise binary operations + // Begin Element-wise logical operations + equal: {ULP: {uint8: 0}}, + greater: {ULP: {uint8: 0}}, + greaterOrEqual: {ULP: {uint8: 0}}, + lesser: {ULP: {uint8: 0}}, + lesserOrEqual: {ULP: {uint8: 0}}, + logicalNot: {ULP: {uint8: 0}}, + // End Element-wise logical operations // Begin Element-wise unary operations abs: {ULP: {float32: 0, float16: 0}}, ceil: {ULP: {float32: 0, float16: 0}}, cos: {ATOL: {float32: 1/1024, float16: 1/512}}, exp: {ULP: {float32: 32, float16: 1}}, floor: {ULP: {float32: 0, float16: 0}}, + identity: {ULP: {float32: 0, float16: 0}}, log: {ATOL: {float32: 1/1024, float16: 1/1024}}, neg: {ULP: {float32: 0, float16: 0}}, + reciprocal: {ULP: {float32: 2, float16: 2}}, sin: {ATOL: {float32: 1/1024, float16: 1/512}}, + sqrt: {ULP: {float32: 1, float16: 1}}, tan: {ATOL: {float32: 1/1024, float16: 1/512}}, // End Element-wise unary operations elu: {ULP: {float32: 18, float16: 18}}, @@ -390,8 +418,14 @@ const assert_array_approx_equals_ulp = (actual, expected, nulp, dataType, descri continue; } else { // measure the ULP distance - actualBitwise = getBitwise(actual[i], dataType); - expectedBitwise = getBitwise(expected[i], dataType); + if (dataType === 'float32') { + actualBitwise = getBitwise(actual[i], dataType); + expectedBitwise = getBitwise(expected[i], dataType); + } else if (dataType === 'float16') { + actualBitwise = actual[i]; + // convert expected data of Float16 to Uint16 + expectedBitwise = toHalf(expected[i]); + } distance = actualBitwise - expectedBitwise; distance = distance >= 0 ? distance : -distance; assert_true(distance <= nulp, @@ -609,7 +643,7 @@ const buildGemm = (operationName, builder, resources) => { } else { // MLOperand c; // Create a single-value operand when c is a scalar - gemmOptions.c = builder.constant(gemmOptions.c); + gemmOptions.c = builder.constant({dataType: 'float32', type: 'float32', dimensions: [1]}, new Float32Array([gemmOptions.c])); } } namedOutputOperand[resources.expected.name] = builder[operationName](inputOperandA, inputOperandB, gemmOptions); @@ -672,14 +706,14 @@ const buildGraph = (operationName, builder, resources, buildFunc) => { // the inputs of concat() is a sequence for (let subInput of resources.inputs) { if (!subInput.hasOwnProperty('constant') || !subInput.constant) { - inputs[subInput.name] = new TypedArrayDict[subInput.type](subInput.data); + inputs[subInput.name] = getTypedArrayData(subInput.type, subInput.data); } } } else { for (let inputName in resources.inputs) { const subTestByName = resources.inputs[inputName]; if (!subTestByName.hasOwnProperty('constant') || !subTestByName.constant) { - inputs[inputName] = new TypedArrayDict[subTestByName.type](subTestByName.data); + inputs[inputName] = getTypedArrayData(subTestByName.type, subTestByName.data); } } } @@ -785,4 +819,51 @@ const testWebNNOperation = (operationName, buildFunc, deviceType = 'cpu') => { }); } }); +}; + +// ref: http://stackoverflow.com/questions/32633585/how-do-you-convert-to-half-floats-in-javascript +const toHalf = (value) => { + let floatView = new Float32Array(1); + let int32View = new Int32Array(floatView.buffer); + + /* This method is faster than the OpenEXR implementation (very often + * used, eg. in Ogre), with the additional benefit of rounding, inspired + * by James Tursa's half-precision code. */ + + floatView[0] = value; + let x = int32View[0]; + + let bits = (x >> 16) & 0x8000; /* Get the sign */ + let m = (x >> 12) & 0x07ff; /* Keep one extra bit for rounding */ + let e = (x >> 23) & 0xff; /* Using int is faster here */ + + /* If zero, or denormal, or exponent underflows too much for a denormal + * half, return signed zero. */ + if (e < 103) { + return bits; + } + + /* If NaN, return NaN. If Inf or exponent overflow, return Inf. */ + if (e > 142) { + bits |= 0x7c00; + /* If exponent was 0xff and one mantissa bit was set, it means NaN, + * not Inf, so make sure we set one mantissa bit too. */ + bits |= ((e == 255) ? 0 : 1) && (x & 0x007fffff); + return bits; + } + + /* If exponent underflows but not too much, return a denormal */ + if (e < 113) { + m |= 0x0800; + /* Extra rounding may overflow and set mantissa to 0 and exponent + * to 1, which is OK. */ + bits |= (m >> (114 - e)) + ((m >> (113 - e)) & 1); + return bits; + } + + bits |= ((e - 112) << 10) | (m >> 1); + /* Extra rounding. An overflow will set mantissa to 0 and increment + * the exponent, which is OK. */ + bits += m & 1; + return bits; }; \ No newline at end of file diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-audio.https.html b/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-audio.https.html index 9bf852763a5..23af1c2b636 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-audio.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-audio.https.html @@ -12,10 +12,10 @@ diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-errors.https.html b/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-errors.https.html index 56ba3ee9729..d36df8227bf 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-errors.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-errors.https.html @@ -12,47 +12,6 @@ + + + + + + + + + diff --git a/tests/wpt/tests/webusb/WEB_FEATURES.yml b/tests/wpt/tests/webusb/WEB_FEATURES.yml new file mode 100644 index 00000000000..5f1fff3e3e2 --- /dev/null +++ b/tests/wpt/tests/webusb/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webusb + files: "**" diff --git a/tests/wpt/tests/webvtt/WEB_FEATURES.yml b/tests/wpt/tests/webvtt/WEB_FEATURES.yml new file mode 100644 index 00000000000..5b5544deec2 --- /dev/null +++ b/tests/wpt/tests/webvtt/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webvtt + files: "**"