aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt')
-rw-r--r--tests/wpt/meta/FileAPI/url/url-with-fetch.any.js.ini3
-rw-r--r--tests/wpt/meta/MANIFEST.json2274
-rw-r--r--tests/wpt/meta/css/css-gaps/flex/flex-gap-decorations-025.html.ini2
-rw-r--r--tests/wpt/meta/css/css-gaps/grid/grid-gap-decorations-046.html.ini2
-rw-r--r--tests/wpt/meta/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html.ini2
-rw-r--r--tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.html.ini2
-rw-r--r--tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.html.ini2
-rw-r--r--tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.html.ini2
-rw-r--r--tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.html.ini2
-rw-r--r--tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html.ini2
-rw-r--r--tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/overflow-rtl-scroll-left.html.ini3
-rw-r--r--tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-computed.html.ini24
-rw-r--r--tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-valid.html.ini18
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-marker-contain-001.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-marker-contain-002.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-marker-contain-003.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-marker-contain-004.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-marker-contain-005.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-marker-contain-006.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-marker-contain-007.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-marker-contain-009.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-marker-contain-010.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-marker-contain-011.tentative.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-target-group-001.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-target-group-002.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-target-group-003.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-target-group-004.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-target-group-005.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-target-group-006.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-target-group-007.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-target-group-009.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-target-group-010.html.ini2
-rw-r--r--tests/wpt/meta/css/css-overflow/scroll-target-group-011.html.ini2
-rw-r--r--tests/wpt/meta/css/css-sizing/stretch/flex-line-002.html.ini3
-rw-r--r--tests/wpt/meta/css/css-sizing/stretch/flex-line-003.html.ini3
-rw-r--r--tests/wpt/meta/css/css-sizing/stretch/flex-line-004.html.ini3
-rw-r--r--tests/wpt/meta/css/css-sizing/stretch/flex-line-005.html.ini3
-rw-r--r--tests/wpt/meta/css/css-text/parsing/text-autospace-computed.html.ini3
-rw-r--r--tests/wpt/meta/css/css-text/parsing/text-spacing-computed.html.ini3
-rw-r--r--tests/wpt/meta/css/css-text/text-autospace/text-autospace-zh-001.html.ini2
-rw-r--r--tests/wpt/meta/css/cssom-view/idlharness.html.ini9
-rw-r--r--tests/wpt/meta/css/filter-effects/css-backdrop-filter-transform-clip.html.ini2
-rw-r--r--tests/wpt/meta/custom-elements/registries/idlharness.window.js.ini42
-rw-r--r--tests/wpt/meta/custom-elements/registries/valid-custom-element-names.tentative.html.ini3
-rw-r--r--tests/wpt/meta/dom/nodes/name-validation.tentative.html.ini15
-rw-r--r--tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/max-payload.tentative.https.window.js.ini6
-rw-r--r--tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/oversized-payload.tentative.https.window.js.ini14
-rw-r--r--tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/max-payload.tentative.https.window.js.ini2
-rw-r--r--tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/oversized-payload.tentative.https.window.js.ini14
-rw-r--r--tests/wpt/meta/fetch/metadata/generated/css-font-face.sub.tentative.html.ini3
-rw-r--r--tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/008.html.ini3
-rw-r--r--tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/009.html.ini3
-rw-r--r--tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini6
-rw-r--r--tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-nosrc.html.ini3
-rw-r--r--tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html.ini3
-rw-r--r--tests/wpt/meta/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js.ini59
-rw-r--r--tests/wpt/meta/html/canvas/element/manual/text/canvas.2d.disconnected.html.ini2
-rw-r--r--tests/wpt/meta/html/dom/idlharness.https.html.ini6
-rw-r--r--tests/wpt/meta/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini21
-rw-r--r--tests/wpt/meta/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini3
-rw-r--r--tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html.ini2
-rw-r--r--tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html.ini2
-rw-r--r--tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html.ini2
-rw-r--r--tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html.ini2
-rw-r--r--tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini2
-rw-r--r--tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini3
-rw-r--r--tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini3
-rw-r--r--tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html.ini90
-rw-r--r--tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html.ini594
-rw-r--r--tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html.ini2
-rw-r--r--tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html.ini2
-rw-r--r--tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html.ini2
-rw-r--r--tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html.ini2
-rw-r--r--tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html.ini2
-rw-r--r--tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html.ini2
-rw-r--r--tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html.ini2
-rw-r--r--tests/wpt/meta/html/semantics/popovers/popover-toggle-source.html.ini (renamed from tests/wpt/meta/html/semantics/popovers/popover-toggle-source.tentative.html.ini)2
-rw-r--r--tests/wpt/meta/navigation-timing/test-navigation-type-reload.html.ini21
-rw-r--r--tests/wpt/meta/preload/preload-error.sub.html.ini3
-rw-r--r--tests/wpt/meta/resource-timing/idlharness.any.js.ini12
-rw-r--r--tests/wpt/meta/service-workers/service-worker/add-routes.https.html.ini3
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-001-outerHTML.xhtml.ini3
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-001.html.ini78
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-002-outerHTML.xhtml.ini3
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-002.html.ini78
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-003.html.ini16
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-004.html.ini90
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-005.html.ini12
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-006.html.ini10
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-007.html.ini9
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-008.https.html.ini12
-rw-r--r--tests/wpt/meta/trusted-types/script-enforcement-009.https.html.ini12
-rw-r--r--tests/wpt/meta/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html.ini3
-rw-r--r--tests/wpt/meta/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html.ini6
-rw-r--r--tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini9
-rw-r--r--tests/wpt/tests/.github/workflows/docker.yml2
-rw-r--r--tests/wpt/tests/.github/workflows/pull_request_test_jobs.yml59
-rw-r--r--tests/wpt/tests/.github/workflows/safari-wptrunner.yml47
-rw-r--r--tests/wpt/tests/.github/workflows/safari_stable.yml12
-rw-r--r--tests/wpt/tests/.github/workflows/safari_technology_preview.yml12
-rw-r--r--tests/wpt/tests/ai/language_detection/detector-locale.https.window.js19
-rw-r--r--tests/wpt/tests/ai/language_detection/detector.https.window.js11
-rw-r--r--tests/wpt/tests/ai/resources/locale-util.js17
-rw-r--r--tests/wpt/tests/ai/resources/util.js14
-rw-r--r--tests/wpt/tests/ai/translator/translator-locale.https.window.js75
-rw-r--r--tests/wpt/tests/ai/translator/translator.https.window.js16
-rw-r--r--tests/wpt/tests/ai/translator/translator.optional.https.window.js3
-rw-r--r--tests/wpt/tests/css/css-anchor-position/anchor-function-pseudo-element-basic.html55
-rw-r--r--tests/wpt/tests/css/css-anchor-position/anchor-position-non-anchored-fallback.html32
-rw-r--r--tests/wpt/tests/css/css-anchor-position/inherit-height-from-fallback.html36
-rw-r--r--tests/wpt/tests/css/css-break/WEB_FEATURES.yml3
-rw-r--r--tests/wpt/tests/css/css-cascade/scope-visited-cssom.html60
-rw-r--r--tests/wpt/tests/css/css-contain/parsing/contain-invalid.html1
-rw-r--r--tests/wpt/tests/css/css-contain/parsing/contain-valid.tentative.html23
-rw-r--r--tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-007-crash.html8
-rw-r--r--tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-008-crash.html14
-rw-r--r--tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025-ref.html34
-rw-r--r--tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025.html29
-rw-r--r--tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-043-crash.html17
-rw-r--r--tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-044-crash.html17
-rw-r--r--tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045-ref.html28
-rw-r--r--tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045.html38
-rw-r--r--tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-046.html15
-rw-r--r--tests/wpt/tests/css/css-gaps/parsing/gap-decorations-rule-initial-value-crash.html15
-rw-r--r--tests/wpt/tests/css/css-highlight-api/Highlight-setlike.html9
-rw-r--r--tests/wpt/tests/css/css-highlight-api/HighlightRegistry-maplike.html3
-rw-r--r--tests/wpt/tests/css/css-images/image-orientation/image-orientation-exif-png-3.html2
-rw-r--r--tests/wpt/tests/css/css-masking/animations/clip-path-interpolation-shape-control-points.html (renamed from tests/wpt/tests/css/css-masking/animations/clip-path-interpolation-shape-control-points.tentative.html)0
-rw-r--r--tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-007.html (renamed from tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-007.tentative.html)0
-rw-r--r--tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-008.html (renamed from tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-008.tentative.html)0
-rw-r--r--tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-009.html (renamed from tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-009.tentative.html)0
-rw-r--r--tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-010.html (renamed from tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-010.tentative.html)0
-rw-r--r--tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html (renamed from tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html)0
-rw-r--r--tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-001.html33
-rw-r--r--tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-002.html (renamed from tests/wpt/tests/css/css-nesting/contextually-invalid-selectors.html)7
-rw-r--r--tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-003.html33
-rw-r--r--tests/wpt/tests/css/css-overflow/chrome-421199213-crash.html13
-rw-r--r--tests/wpt/tests/css/css-overflow/clip-008.html30
-rw-r--r--tests/wpt/tests/css/css-overflow/overflow-rtl-scroll-left.html49
-rw-r--r--tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-computed.html27
-rw-r--r--tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-invalid.html15
-rw-r--r--tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-valid.html17
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-marker-focus-scroll-crash.html62
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-001-ref.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-001-ref.tentative.html)3
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-001.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-001.tentative.html)9
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-002-ref.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-002-ref.tentative.html)3
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-002.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-002.tentative.html)9
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-003-ref.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-003-ref.tentative.html)0
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-003.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-003.tentative.html)7
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-004.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-004.tentative.html)8
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-005.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-005.tentative.html)8
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-006.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-006.tentative.html)8
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-007.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-007.tentative.html)8
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-008-ref.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-008-ref.tentative.html)2
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-008.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-008.tentative.html)8
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-009-ref.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-009-ref.tentative.html)2
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-009.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-009.tentative.html)8
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-010.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-010.tentative.html)8
-rw-r--r--tests/wpt/tests/css/css-overflow/scroll-target-group-011.html (renamed from tests/wpt/tests/css/css-overflow/scroll-marker-contain-011.tentative.html)8
-rw-r--r--tests/wpt/tests/css/css-scoping/host-defined.html4
-rw-r--r--tests/wpt/tests/css/css-scroll-snap/scroll-start/scroll-start-with-text-fragment-navigation-target.html4
-rw-r--r--tests/wpt/tests/css/css-shapes/shape-functions/shape-function-computed.html (renamed from tests/wpt/tests/css/css-shapes/shape-functions/shape-function-computed.tentative.html)0
-rw-r--r--tests/wpt/tests/css/css-shapes/shape-functions/shape-function-invalid.html (renamed from tests/wpt/tests/css/css-shapes/shape-functions/shape-function-invalid.tentative.html)0
-rw-r--r--tests/wpt/tests/css/css-shapes/shape-functions/shape-function-valid.html (renamed from tests/wpt/tests/css/css-shapes/shape-functions/shape-function-valid.tentative.html)0
-rw-r--r--tests/wpt/tests/css/css-sizing/replaced-aspect-ratio-stretch-fit-003.html4
-rw-r--r--tests/wpt/tests/css/css-sizing/stretch/flex-line-001.html49
-rw-r--r--tests/wpt/tests/css/css-sizing/stretch/flex-line-002.html48
-rw-r--r--tests/wpt/tests/css/css-sizing/stretch/flex-line-003.html49
-rw-r--r--tests/wpt/tests/css/css-sizing/stretch/flex-line-004.html50
-rw-r--r--tests/wpt/tests/css/css-sizing/stretch/flex-line-005.html35
-rw-r--r--tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2-ref.html1
-rw-r--r--tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2.html1
-rw-r--r--tests/wpt/tests/css/css-text/i18n/zh/css-text-line-break-zh-in-loose.html1
-rw-r--r--tests/wpt/tests/css/css-text/parsing/text-autospace-computed.html2
-rw-r--r--tests/wpt/tests/css/css-text/parsing/text-spacing-computed.html2
-rw-r--r--tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html3
-rw-r--r--tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001.html3
-rw-r--r--tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-002.html3
-rw-r--r--tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-003.html3
-rw-r--r--tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-004.html3
-rw-r--r--tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001-ref.html18
-rw-r--r--tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001.html15
-rw-r--r--tests/wpt/tests/css/css-values/acos-asin-atan-atan2-invalid.html2
-rw-r--r--tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-ref.html51
-rw-r--r--tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border-ref.html55
-rw-r--r--tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border.html70
-rw-r--r--tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing.html66
-rw-r--r--tests/wpt/tests/css/css-view-transitions/nested/rounded-border-clipper.html3
-rw-r--r--tests/wpt/tests/css/css-view-transitions/no-crash-set-exception.html26
-rw-r--r--tests/wpt/tests/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html4
-rw-r--r--tests/wpt/tests/css/css-view-transitions/scoped/contain-view-transition-name-discovery.html106
-rw-r--r--tests/wpt/tests/css/css-view-transitions/scoped/crashtests/shuffle.html40
-rw-r--r--tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip-ref.html21
-rw-r--r--tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip.html63
-rw-r--r--tests/wpt/tests/css/filter-effects/drop-shadow-currentcolor-inheritance.html33
-rw-r--r--tests/wpt/tests/custom-elements/registries/idlharness.window.js20
-rw-r--r--tests/wpt/tests/custom-elements/registries/valid-custom-element-names.tentative.html138
-rw-r--r--tests/wpt/tests/device-bound-session-credentials/refresh_session.py6
-rw-r--r--tests/wpt/tests/device-bound-session-credentials/start_session.py3
-rw-r--r--tests/wpt/tests/dom/nodes/name-validation.tentative.html296
-rw-r--r--tests/wpt/tests/fedcm/fedcm-login-status/idp-login-with-failed-accounts-fetch.https.html31
-rw-r--r--tests/wpt/tests/fedcm/support/login_delay.html11
-rw-r--r--tests/wpt/tests/fedcm/support/manifest_no_accounts_login_delay.json6
-rw-r--r--tests/wpt/tests/fetch/fetch-later/resources/fetch-later-helper.js5
-rw-r--r--tests/wpt/tests/fetch/fetch-later/resources/fetch-later.html6
-rw-r--r--tests/wpt/tests/fetch/local-network-access/fetch.tentative.https.html12
-rw-r--r--tests/wpt/tests/fetch/local-network-access/resources/fetch-local-http.html (renamed from tests/wpt/tests/fetch/local-network-access/resources/fetch-private-http.html)10
-rw-r--r--tests/wpt/tests/fetch/local-network-access/resources/fetch-local.html (renamed from tests/wpt/tests/fetch/local-network-access/resources/fetch-private.html)6
-rw-r--r--tests/wpt/tests/fetch/local-network-access/resources/fetch-public-http-wrong-address-space.html6
-rw-r--r--tests/wpt/tests/fetch/local-network-access/resources/support.sub.js26
-rw-r--r--tests/wpt/tests/fullscreen/model/remove-first-sibling.html46
-rw-r--r--tests/wpt/tests/fullscreen/model/remove-last-sibling.html44
-rw-r--r--tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js159
-rw-r--r--tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js5
-rw-r--r--tests/wpt/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js117
-rw-r--r--tests/wpt/tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html127
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex-ref.html15
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex.html30
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-notref.html18
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html19
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref2.html19
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html14
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-notref.html18
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html19
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref2.html19
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html14
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex-ref.html12
-rw-r--r--tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex.html23
-rw-r--r--tests/wpt/tests/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html (renamed from tests/wpt/tests/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html)194
-rw-r--r--tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors-ref.html29
-rw-r--r--tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors.html32
-rw-r--r--tests/wpt/tests/html/semantics/interactive-elements/the-details-element/details-toggle-source.html (renamed from tests/wpt/tests/html/semantics/interactive-elements/the-details-element/details-toggle-source.tentative.html)0
-rw-r--r--tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.html (renamed from tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.tentative.html)36
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/bounded-css-properties.tentative.html6
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html11
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html11
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html11
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html13
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest.html12
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html11
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html11
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest-ref.html12
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html11
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html6
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-hidden-reftest.html2
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-restricted-css-no-effect-reftest.html16
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-unique-per-type-reftest.html2
-rw-r--r--tests/wpt/tests/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html2
-rw-r--r--tests/wpt/tests/html/semantics/popovers/popover-toggle-source.html (renamed from tests/wpt/tests/html/semantics/popovers/popover-toggle-source.tentative.html)0
-rw-r--r--tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-invoker-descendants.tentative.html79
-rw-r--r--tests/wpt/tests/images/pattern.webmbin1121 -> 826 bytes
-rw-r--r--tests/wpt/tests/interfaces/crash-reporting.idl2
-rw-r--r--tests/wpt/tests/interfaces/cssom-view.idl1
-rw-r--r--tests/wpt/tests/interfaces/element-timing.idl2
-rw-r--r--tests/wpt/tests/interfaces/html.idl10
-rw-r--r--tests/wpt/tests/interfaces/privacy-preserving-attribution.idl5
-rw-r--r--tests/wpt/tests/interfaces/resource-timing.idl1
-rw-r--r--tests/wpt/tests/interfaces/scoped-custom-elements-registry.idl38
-rw-r--r--tests/wpt/tests/interfaces/screen-capture.idl7
-rw-r--r--tests/wpt/tests/interfaces/secure-payment-confirmation.idl8
-rw-r--r--tests/wpt/tests/interfaces/speech-api.idl17
-rw-r--r--tests/wpt/tests/interfaces/wai-aria.idl2
-rw-r--r--tests/wpt/tests/interfaces/web-animations-2.idl6
-rw-r--r--tests/wpt/tests/interfaces/webgpu.idl15
-rw-r--r--tests/wpt/tests/interfaces/writing-assistance-apis.idl2
-rw-r--r--tests/wpt/tests/lint.ignore3
-rw-r--r--tests/wpt/tests/paint-timing/idlharness.window.js2
-rw-r--r--tests/wpt/tests/pointerevents/crashtests/longpress-crash.html34
-rw-r--r--tests/wpt/tests/pointerevents/pointerevent_click_during_parent_capture.html1
-rw-r--r--tests/wpt/tests/resources/test/conftest.py1
-rw-r--r--tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-addAnimation.tentative.html148
-rw-r--r--tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html132
-rw-r--r--tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html175
-rw-r--r--tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html169
-rw-r--r--tests/wpt/tests/service-workers/service-worker/add-routes.https.html27
-rw-r--r--tests/wpt/tests/service-workers/service-worker/resources/add-routes.js37
-rw-r--r--tests/wpt/tests/soft-navigation-heuristics/detection/tentative/racing-soft-navigations.html268
-rw-r--r--tests/wpt/tests/soft-navigation-heuristics/dom/tentative/distant-leaf.window.js47
-rw-r--r--tests/wpt/tests/soft-navigation-heuristics/dom/tentative/insert-image-div-before.window.js47
-rw-r--r--tests/wpt/tests/soft-navigation-heuristics/history/tentative/navigation-api-prevent-default.window.js48
-rw-r--r--tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html35
-rw-r--r--tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html135
-rw-r--r--tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js30
-rw-r--r--tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/supported-entry-types.window.js7
-rw-r--r--tests/wpt/tests/soft-navigation-heuristics/supported-entry-types.tentative.html15
-rw-r--r--tests/wpt/tests/speculation-rules/invalid-rules.https.html31
-rw-r--r--tests/wpt/tests/speculation-rules/prefetch/clear-prefetch-cache-after-clear-site-data-cache.https.html (renamed from tests/wpt/tests/speculation-rules/prefetch/clear-prefetch-cache-after-clear-site-data-cache.tentative.https.html)5
-rw-r--r--tests/wpt/tests/speculation-rules/prefetch/invalid-rules.https.html19
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/activation-start.https.html6
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-different-origins.https.html (renamed from tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-different-origins.tentative.https.html)18
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-same-origin.https.html (renamed from tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-same-origin.tentative.https.html)28
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-not-opt-in.https.html7
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-opt-in.https.html6
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/headers.https.html10
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/navigation-api-location-replace.https.html6
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/navigation-api-multiple-entries.https.html6
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/navigation-api.https.html6
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/referrer-policy-mismatch.https.html18
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/resources/background-sync.https.html2
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/resources/utils.js184
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/restriction-background-sync.https.html (renamed from tests/wpt/tests/speculation-rules/prerender/restriction-background-sync.tentative.https.html)0
-rw-r--r--tests/wpt/tests/speculation-rules/prerender/visibility-state.https.html6
-rw-r--r--tests/wpt/tests/speculation-rules/resources/utils.js48
-rw-r--r--tests/wpt/tests/speculation-rules/script-supports.https.html (renamed from tests/wpt/tests/speculation-rules/prerender/script-supports-speculationrules.https.html)8
-rw-r--r--tests/wpt/tests/speculation-rules/speculation-tags/no-tags.https.html6
-rw-r--r--tests/wpt/tests/speech-api/SpeechRecognition-availableOnDevice.https.html49
-rw-r--r--tests/wpt/tests/speech-api/SpeechRecognition-basics.https.html2
-rw-r--r--tests/wpt/tests/speech-api/SpeechRecognition-installOnDevice.https.html128
-rw-r--r--tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html32
-rw-r--r--tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html16
-rw-r--r--tests/wpt/tests/subresource-integrity/integrity-policy/tentative/signature.https.html51
-rw-r--r--tests/wpt/tests/svg/animations/svgpath-animation-2.tentative.html34
-rw-r--r--tests/wpt/tests/svg/embedded/image-embedding-nesteder-data-url.html9
-rw-r--r--tests/wpt/tests/svg/embedded/image-modify-href-4.svg8
-rw-r--r--tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform-ref.html13
-rw-r--r--tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform.html27
-rw-r--r--tests/wpt/tests/svg/painting/reftests/small-nested-viewbox.html4
-rw-r--r--tests/wpt/tests/svg/painting/reftests/support/svg-marker-context-paint.svg29
-rw-r--r--tests/wpt/tests/svg/painting/reftests/support/svg-marker-ref.svg20
-rw-r--r--tests/wpt/tests/svg/styling/nested-svg-sizing-expected.svg5
-rw-r--r--tests/wpt/tests/svg/styling/nested-svg-sizing-with-use-expected.svg5
-rw-r--r--tests/wpt/tests/svg/styling/nested-svg-sizing-with-use.svg12
-rw-r--r--tests/wpt/tests/svg/styling/nested-svg-sizing.svg8
-rw-r--r--tests/wpt/tests/tools/META.yml1
-rw-r--r--tests/wpt/tests/tools/ci/jobs.py4
-rw-r--r--tests/wpt/tests/tools/webdriver/webdriver/client.py72
-rw-r--r--tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py1
-rw-r--r--tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py8
-rw-r--r--tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js2
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-001-outerHTML.xhtml35
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-001.html327
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-002-outerHTML.xhtml48
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-002.html398
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-003.html354
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-004.html432
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-005.html78
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-006.html72
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-007.html69
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-008.https.html87
-rw-r--r--tests/wpt/tests/trusted-types/script-enforcement-009.https.html82
-rw-r--r--tests/wpt/tests/trusted-types/support/csp-violations.js2
-rw-r--r--tests/wpt/tests/trusted-types/support/logMessage-module.sub.js1
-rw-r--r--tests/wpt/tests/trusted-types/support/passthroughpolicy.js7
-rw-r--r--tests/wpt/tests/trusted-types/support/script-messages.js104
-rw-r--r--tests/wpt/tests/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html42
-rw-r--r--tests/wpt/tests/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html42
-rw-r--r--tests/wpt/tests/uievents/order-of-events/focus-events/focus-management-expectations.html4
-rw-r--r--tests/wpt/tests/web-animations/interfaces/Animation/style-change-events.html7
-rw-r--r--tests/wpt/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html112
-rw-r--r--tests/wpt/tests/webdriver/tests/bidi/browser/create_user_context/invalid.py104
-rw-r--r--tests/wpt/tests/webdriver/tests/bidi/browsing_context/fragment_navigated/fragment_navigated.py14
-rw-r--r--tests/wpt/tests/webdriver/tests/bidi/browsing_context/history_updated/history_updated.py343
-rw-r--r--tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py1
-rw-r--r--tests/wpt/tests/webdriver/tests/classic/add_cookie/add.py3
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/averagePool2d.https.any.js1753
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/equal.https.any.js3
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/graph_devices.https.any.js22
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/greater.https.any.js3
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/greater_or_equal.https.any.js3
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/l2Pool2d.https.any.js1366
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/lesser.https.any.js3
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/lesser_or_equal.https.any.js3
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/logical_and.https.any.js4
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/logical_not.https.any.js3
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/logical_or.https.any.js4
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/logical_xor.https.any.js4
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/maxPool2d.https.any.js1216
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/not_equal.https.any.js461
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/pooling.https.any.js2312
-rw-r--r--tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js236
-rw-r--r--tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-audiolevel.html79
-rw-r--r--tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-metadata.https.html10
-rw-r--r--tests/wpt/tests/webrtc/protocol/h264-unidirectional-codec-offer.https.html107
-rw-r--r--tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini24
379 files changed, 15881 insertions, 4419 deletions
diff --git a/tests/wpt/meta/FileAPI/url/url-with-fetch.any.js.ini b/tests/wpt/meta/FileAPI/url/url-with-fetch.any.js.ini
index b275cb58343..292dc852b9f 100644
--- a/tests/wpt/meta/FileAPI/url/url-with-fetch.any.js.ini
+++ b/tests/wpt/meta/FileAPI/url/url-with-fetch.any.js.ini
@@ -12,6 +12,3 @@
[Revoke blob URL after creating Request, then clone Request, will fetch]
expected: FAIL
-
- [Revoke blob URL after calling fetch, fetch should succeed]
- expected: FAIL
diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json
index 8c88bd5d094..2e311c7ceb4 100644
--- a/tests/wpt/meta/MANIFEST.json
+++ b/tests/wpt/meta/MANIFEST.json
@@ -2849,6 +2849,22 @@
]
},
"css-gaps": {
+ "agnostic": {
+ "gap-decorations-007-crash.html": [
+ "46306a8ffaa200780a4413f72609131acecf3aee",
+ [
+ null,
+ {}
+ ]
+ ],
+ "gap-decorations-008-crash.html": [
+ "9c03f592cfec44750532d2f4f7e3bf6c327efd7c",
+ [
+ null,
+ {}
+ ]
+ ]
+ },
"grid": {
"grid-gap-decorations-041-crash.html": [
"be3e2280b5f52dcc60a4fe418ae67af3ec23da6b",
@@ -2856,6 +2872,29 @@
null,
{}
]
+ ],
+ "grid-gap-decorations-043-crash.html": [
+ "920e1b4d05a63922614e5717a526df283075cb17",
+ [
+ null,
+ {}
+ ]
+ ],
+ "grid-gap-decorations-044-crash.html": [
+ "b4e69929d2de8f05b2d345461c4f3ac0abfbe8ff",
+ [
+ null,
+ {}
+ ]
+ ]
+ },
+ "parsing": {
+ "gap-decorations-rule-initial-value-crash.html": [
+ "19309e87efca3efe22d0263e349d614910493849",
+ [
+ null,
+ {}
+ ]
]
}
},
@@ -4274,6 +4313,13 @@
]
},
"css-overflow": {
+ "chrome-421199213-crash.html": [
+ "1ab02f1a78736b96f6e24b8fa028634224742086",
+ [
+ null,
+ {}
+ ]
+ ],
"chrome-body-overflow-propagation-crash.html": [
"22607b4a4d037cdd9185ead784c9480f0926a79a",
[
@@ -4411,6 +4457,15 @@
{}
]
],
+ "scroll-marker-focus-scroll-crash.html": [
+ "97b3be1e8fb24c003cf0dec4c8cdc89da18b4f70",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ],
"scroll-marker-with-content-visibility-hidden-ancestor-crash.html": [
"451e9e9709a9a5b1bc2c371884249a26cfb6e391",
[
@@ -5991,6 +6046,13 @@
null,
{}
]
+ ],
+ "shuffle.html": [
+ "fe110dbfe50d40f7e5ae0473082cd0e4cbedc67a",
+ [
+ null,
+ {}
+ ]
]
}
}
@@ -9535,6 +9597,19 @@
]
]
},
+ "pointerevents": {
+ "crashtests": {
+ "longpress-crash.html": [
+ "0ace661d5a9904b77e8edc73bab5f933c1dc45bc",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ]
+ }
+ },
"print": {
"crashtests": {
"reload-crash.html": [
@@ -26548,7 +26623,7 @@
]
],
"SpeechRecognition-phrases-manual.https.html": [
- "2d0b19ab46ce3c41610b298750cbb0ca85832513",
+ "0f596a88015a1e7384618fa0e734e0683ff2b98e",
[
null,
{}
@@ -125845,6 +125920,19 @@
{}
]
],
+ "anchor-position-non-anchored-fallback.html": [
+ "26965fe8bf413ca199dae0a09940d46f0b29f62c",
+ [
+ null,
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square-only.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"anchor-position-top-layer-001.html": [
"f40cc0dccf3ccbef010629ebc809229ba83c9b45",
[
@@ -126303,6 +126391,19 @@
{}
]
],
+ "inherit-height-from-fallback.html": [
+ "a1179c62ed04d671e9fdb5c43a270d066a13da38",
+ [
+ null,
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square-only.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"position-anchor-001.html": [
"b0a964485c65ed1c8eeff89a1406bda9f4ea9b48",
[
@@ -187470,6 +187571,19 @@
],
{}
]
+ ],
+ "flex-gap-decorations-025.html": [
+ "42b46a301c3b0c0d9c0d50423334290fe1d781c0",
+ [
+ null,
+ [
+ [
+ "/css/css-gaps/flex/flex-gap-decorations-025-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
]
},
"grid": {
@@ -187980,6 +188094,32 @@
{}
]
],
+ "grid-gap-decorations-045.html": [
+ "a90d45df4423225f78c9dda739640ac2cebcae40",
+ [
+ null,
+ [
+ [
+ "/css/css-gaps/grid/grid-gap-decorations-045-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "grid-gap-decorations-046.html": [
+ "64ca1cdddffc856803726ec361a624a64572f1b7",
+ [
+ null,
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"grid-gap-decorations-38.html": [
"8b87bcd4860ac50a1c2f3de98cec9599bebb77a3",
[
@@ -202065,7 +202205,7 @@
]
],
"image-orientation-exif-png-3.html": [
- "536b7d2560c2fb1e595033b5397a654ff68533c2",
+ "355c2f601fa903c36199559247c30d31a8e1ed33",
[
null,
[
@@ -215735,7 +215875,7 @@
{}
]
],
- "clip-path-shape-007.tentative.html": [
+ "clip-path-shape-007.html": [
"5e71923c01b54f937c8faf858987b6034fecc2f6",
[
null,
@@ -215748,7 +215888,7 @@
{}
]
],
- "clip-path-shape-008.tentative.html": [
+ "clip-path-shape-008.html": [
"fdeb79714296e6eb88ff37d8da40f4adc2cbc2df",
[
null,
@@ -215761,7 +215901,7 @@
{}
]
],
- "clip-path-shape-009.tentative.html": [
+ "clip-path-shape-009.html": [
"8fda73b055e7aafa62bf17eb1769d996dc6b327c",
[
null,
@@ -215774,7 +215914,7 @@
{}
]
],
- "clip-path-shape-010.tentative.html": [
+ "clip-path-shape-010.html": [
"d089a90104cedcda476c2ebde3c2424f071976f1",
[
null,
@@ -215829,7 +215969,7 @@
{}
]
],
- "clip-path-shape-hline-vline-keywords.tentative.html": [
+ "clip-path-shape-hline-vline-keywords.html": [
"11c28021741385facdd127dd78f157a342d6e6ec",
[
null,
@@ -225503,8 +225643,34 @@
{}
]
],
- "contextually-invalid-selectors.html": [
- "f3cdc674fd5ff937cdb9db908cc38efc662d82c2",
+ "contextually-invalid-selectors-001.html": [
+ "37c6c44f57b62953e193cb695503efc31bbd4caa",
+ [
+ null,
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square-only.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "contextually-invalid-selectors-002.html": [
+ "7c722468e1c2ab54f5a1fb8246f4c1727702b68a",
+ [
+ null,
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square-only.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "contextually-invalid-selectors-003.html": [
+ "01d0a819fa53328ec1690e9f48e386d764d9fbc9",
[
null,
[
@@ -225778,6 +225944,19 @@
{}
]
],
+ "clip-008.html": [
+ "8fb45252aa758c3044498f27c3d6f01923b8ced8",
+ [
+ null,
+ [
+ [
+ "/css/reference/ref-filled-green-100px-square.xht",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"clipped-scroller-add-content.html": [
"d7f2eb1c919e3bf48a045cb73cd632821b1fa5b2",
[
@@ -229984,307 +230163,307 @@
{}
]
],
- "scroll-marker-contain-001.tentative.html": [
- "93d7df72508d19d89ac6c2d775e24a1937b660aa",
+ "scroll-marker-counters.html": [
+ "25e4fdfd24f849128c711cdc5a8610abba5e1d8f",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-001-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-counters-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-contain-002.tentative.html": [
- "af2a5e668be4673ae5d976fa901fd5106dc8ad1c",
+ "scroll-marker-dynamic.html": [
+ "8d52c0e59164fc2bf10409b7ec1f7158b0d25b85",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-002-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-dynamic-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-contain-003.tentative.html": [
- "59daa5cf5ced7c57248cfbbf4fef637ad91728be",
+ "scroll-marker-group-001.html": [
+ "bbde726f4ba2455cbea7545b473b90660b3c1aab",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-003-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-group-001-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-contain-004.tentative.html": [
- "2ec6f6bde76fb3c16b04628f49415edda014985e",
+ "scroll-marker-group-002.html": [
+ "9e91039c95ee5821232af9891fdea69e1903f477",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-001-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-group-001-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-contain-005.tentative.html": [
- "3d435bf74cbe204857b62974bcd0f12ee1ec8430",
+ "scroll-marker-group-005.html": [
+ "e80a95873d2cbfd5e4b958e6280ffdee32448bf4",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-001-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-group-005-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-contain-006.tentative.html": [
- "234b57e5bbea2b29a1beb2671fb1b6a1ec1de976",
+ "scroll-marker-group-006.html": [
+ "f24105ac5d2b1eb55e69e643885ed332f7805a0a",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-001-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-group-006-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-contain-007.tentative.html": [
- "5f15c85819a3d00ca9d3088425345bbc9be60cb3",
+ "scroll-marker-group-007.html": [
+ "b0910e138206fe4994d74703d9118d363c62690a",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-001-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-group-007-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-contain-008.tentative.html": [
- "80801854a0f05abb47243873ae084a1564e5cd30",
+ "scroll-marker-group-008.html": [
+ "ae1304b2c20f96389a7a3398c07905529fbcc077",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-008-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-group-008-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-contain-009.tentative.html": [
- "8037adf8441168ec87f118c1da3a6a7bede7ef77",
+ "scroll-marker-group-009.html": [
+ "9863f94f047565e503a5b044a0eef9f4d8740d26",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-009-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-group-009-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-contain-010.tentative.html": [
- "fbdad62f84665ea55b8c7d647b631b0f215f1e19",
+ "scroll-marker-group-010.html": [
+ "f63f2b85a26790a1cb4fc6acb2b4c93964106e97",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-009-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-group-006-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-contain-011.tentative.html": [
- "8cfc78130e0f93ddf3a768b0b582f292d9c4291c",
+ "scroll-marker-group-011.html": [
+ "7b64367e5f8c541f27837ec87a6fd4b98263c93b",
[
null,
[
[
- "/css/css-overflow/scroll-marker-contain-009-ref.tentative.html",
+ "/css/css-overflow/scroll-marker-group-011-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-counters.html": [
- "25e4fdfd24f849128c711cdc5a8610abba5e1d8f",
+ "scroll-marker-group-013.html": [
+ "48a59c7d0cb75bca15d54f9a05c092a1c5f05f86",
[
null,
[
[
- "/css/css-overflow/scroll-marker-counters-ref.html",
+ "/css/css-overflow/scroll-marker-group-013-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-dynamic.html": [
- "8d52c0e59164fc2bf10409b7ec1f7158b0d25b85",
+ "scroll-marker-group-015.html": [
+ "49a5f2df73c60604860144afc43c17720a6d1e57",
[
null,
[
[
- "/css/css-overflow/scroll-marker-dynamic-ref.html",
+ "/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
- "scroll-marker-group-001.html": [
- "bbde726f4ba2455cbea7545b473b90660b3c1aab",
+ "scroll-marker-group-016.html": [
+ "c2c99c664055a5f7b8b5597458e73b182930e018",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-001-ref.html",
+ "/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
- "scroll-marker-group-002.html": [
- "9e91039c95ee5821232af9891fdea69e1903f477",
+ "scroll-marker-group-017.html": [
+ "54d5bcf178b23b4e96d5cb4abd5618862cc8c44b",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-001-ref.html",
+ "/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
- "scroll-marker-group-005.html": [
- "e80a95873d2cbfd5e4b958e6280ffdee32448bf4",
+ "scroll-marker-group-018.html": [
+ "927d8ba61b80b6a264c3c4b577a249e32029dc88",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-005-ref.html",
+ "/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
- "scroll-marker-group-006.html": [
- "f24105ac5d2b1eb55e69e643885ed332f7805a0a",
+ "scroll-marker-group-019.html": [
+ "9c2c5a0c0dc3360ab3a9ecde998a52277831ec0e",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-006-ref.html",
+ "/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
- "scroll-marker-group-007.html": [
- "b0910e138206fe4994d74703d9118d363c62690a",
+ "scroll-marker-group-020.html": [
+ "1f69fc80d3d991cfef992992702fc5b1b2b9f274",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-007-ref.html",
+ "/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
- "scroll-marker-group-008.html": [
- "ae1304b2c20f96389a7a3398c07905529fbcc077",
+ "scroll-marker-group-add-dynamic-001.html": [
+ "b12fcdef1b1259e916c3670223289b26b02cce22",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-008-ref.html",
+ "/css/css-overflow/scroll-marker-group-add-dynamic-001-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-009.html": [
- "9863f94f047565e503a5b044a0eef9f4d8740d26",
+ "scroll-marker-group-add-dynamic-002.html": [
+ "aecf2d732703c2d4edf7a85c254b37703d12510c",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-009-ref.html",
+ "/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
- "scroll-marker-group-010.html": [
- "f63f2b85a26790a1cb4fc6acb2b4c93964106e97",
+ "scroll-marker-group-add-dynamic-003.html": [
+ "38f1a7b05c9488446f26d618fec72fb5ef72aaa6",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-006-ref.html",
+ "/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
- "scroll-marker-group-011.html": [
- "7b64367e5f8c541f27837ec87a6fd4b98263c93b",
+ "scroll-marker-group-add-dynamic-004.html": [
+ "e4e26fbf81b2065018aa8f6fac9ecd90432a30a8",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-011-ref.html",
+ "/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
- "scroll-marker-group-013.html": [
- "48a59c7d0cb75bca15d54f9a05c092a1c5f05f86",
+ "scroll-marker-group-keeps-active-in-view.html": [
+ "b553ebef2481724c72eb56094f1e8b0f0d574d75",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-013-ref.html",
+ "/css/css-overflow/scroll-marker-group-keeps-active-in-view-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-015.html": [
- "49a5f2df73c60604860144afc43c17720a6d1e57",
+ "scroll-marker-group-layout-parent.html": [
+ "c3ff8419ee660f0a61c43addc182be3d24008119",
[
null,
[
@@ -230296,221 +230475,221 @@
{}
]
],
- "scroll-marker-group-016.html": [
- "c2c99c664055a5f7b8b5597458e73b182930e018",
+ "scroll-marker-group-snap-aligns-to-active.tentative.html": [
+ "5db171c800aba1adb62eef5df530357773c3cc64",
[
null,
[
[
- "/css/reference/ref-filled-green-100px-square.xht",
+ "/css/css-overflow/scroll-marker-group-snap-aligns-to-active-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-017.html": [
- "54d5bcf178b23b4e96d5cb4abd5618862cc8c44b",
+ "scroll-marker-group-style-remove.html": [
+ "b9551181f856f4aa3f3a08881d046953e76b0d8a",
[
null,
[
[
- "/css/reference/ref-filled-green-100px-square.xht",
+ "/css/css-overflow/scroll-marker-group-style-remove-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-018.html": [
- "927d8ba61b80b6a264c3c4b577a249e32029dc88",
+ "scroll-marker-selection-in-2d.html": [
+ "2ec7806d4631f85567c2f10f95b6c8046e86a528",
[
null,
[
[
- "/css/reference/ref-filled-green-100px-square.xht",
+ "/css/css-overflow/scroll-marker-selection-in-2d-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-019.html": [
- "9c2c5a0c0dc3360ab3a9ecde998a52277831ec0e",
+ "scroll-markers-added-after-content-visibility-auto.html": [
+ "f58b6b5ff00707dd68fb5166b25c91819233fe4e",
[
null,
[
[
- "/css/reference/ref-filled-green-100px-square.xht",
+ "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-020.html": [
- "1f69fc80d3d991cfef992992702fc5b1b2b9f274",
+ "scroll-markers-added-before-content-visibility-auto.html": [
+ "9da4bc5b352c07041c88aac74a194f7e134ace5d",
[
null,
[
[
- "/css/reference/ref-filled-green-100px-square.xht",
+ "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-add-dynamic-001.html": [
- "b12fcdef1b1259e916c3670223289b26b02cce22",
+ "scroll-markers-under-content-visibility-auto.html": [
+ "a87f1f1e19673b8ad33a4db0fc7ba4419ae1f0e2",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-add-dynamic-001-ref.html",
+ "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-add-dynamic-002.html": [
- "aecf2d732703c2d4edf7a85c254b37703d12510c",
+ "scroll-target-group-001.html": [
+ "c0f96cc557492e0ba9133596a5847e1b57f1ef1e",
[
null,
[
[
- "/css/reference/ref-filled-green-100px-square.xht",
+ "/css/css-overflow/scroll-target-group-001-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-add-dynamic-003.html": [
- "38f1a7b05c9488446f26d618fec72fb5ef72aaa6",
+ "scroll-target-group-002.html": [
+ "e3e83769db2ffab1b8cbab1b00e795bfc9ec4c4f",
[
null,
[
[
- "/css/reference/ref-filled-green-100px-square.xht",
+ "/css/css-overflow/scroll-target-group-002-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-add-dynamic-004.html": [
- "e4e26fbf81b2065018aa8f6fac9ecd90432a30a8",
+ "scroll-target-group-003.html": [
+ "39e1beff02acd0f29577e067f8e2cbe7aa42b82d",
[
null,
[
[
- "/css/reference/ref-filled-green-100px-square.xht",
+ "/css/css-overflow/scroll-target-group-003-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-keeps-active-in-view.html": [
- "b553ebef2481724c72eb56094f1e8b0f0d574d75",
+ "scroll-target-group-004.html": [
+ "3a61a6d8c8cf3cd9630e29197030a9c4036c1e4d",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-keeps-active-in-view-ref.html",
+ "/css/css-overflow/scroll-target-group-001-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-layout-parent.html": [
- "c3ff8419ee660f0a61c43addc182be3d24008119",
+ "scroll-target-group-005.html": [
+ "c7da0d404ec4a5ebb8d08920cf661fb47dd9a6aa",
[
null,
[
[
- "/css/reference/ref-filled-green-100px-square.xht",
+ "/css/css-overflow/scroll-target-group-001-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-snap-aligns-to-active.tentative.html": [
- "5db171c800aba1adb62eef5df530357773c3cc64",
+ "scroll-target-group-006.html": [
+ "6154845199a15cd1aa503f05e92ee15bf24f8754",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-snap-aligns-to-active-ref.html",
+ "/css/css-overflow/scroll-target-group-001-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-group-style-remove.html": [
- "b9551181f856f4aa3f3a08881d046953e76b0d8a",
+ "scroll-target-group-007.html": [
+ "9c736381c3440c5758c908a15afa9f92c7d7d2fb",
[
null,
[
[
- "/css/css-overflow/scroll-marker-group-style-remove-ref.html",
+ "/css/css-overflow/scroll-target-group-001-ref.html",
"=="
]
],
{}
]
],
- "scroll-marker-selection-in-2d.html": [
- "2ec7806d4631f85567c2f10f95b6c8046e86a528",
+ "scroll-target-group-008.html": [
+ "217ff1aabe62d6cf30de44cca333df3c33d96662",
[
null,
[
[
- "/css/css-overflow/scroll-marker-selection-in-2d-ref.html",
+ "/css/css-overflow/scroll-target-group-008-ref.html",
"=="
]
],
{}
]
],
- "scroll-markers-added-after-content-visibility-auto.html": [
- "f58b6b5ff00707dd68fb5166b25c91819233fe4e",
+ "scroll-target-group-009.html": [
+ "c9df1e3ca4cef89d7ba18627d59a59262a52bc4f",
[
null,
[
[
- "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html",
+ "/css/css-overflow/scroll-target-group-009-ref.html",
"=="
]
],
{}
]
],
- "scroll-markers-added-before-content-visibility-auto.html": [
- "9da4bc5b352c07041c88aac74a194f7e134ace5d",
+ "scroll-target-group-010.html": [
+ "fa311bf9fee0ee6ecc2cc64f8bdf2fd6206d0511",
[
null,
[
[
- "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html",
+ "/css/css-overflow/scroll-target-group-009-ref.html",
"=="
]
],
{}
]
],
- "scroll-markers-under-content-visibility-auto.html": [
- "a87f1f1e19673b8ad33a4db0fc7ba4419ae1f0e2",
+ "scroll-target-group-011.html": [
+ "9062fef7a813bf4b31a8b0ee1a1a9ad3b8e0d7c8",
[
null,
[
[
- "/css/css-overflow/scroll-markers-under-content-visibility-auto-ref.html",
+ "/css/css-overflow/scroll-target-group-009-ref.html",
"=="
]
],
@@ -241176,7 +241355,7 @@
]
],
"host-defined.html": [
- "9e9776754a3f360537e899e064a0d3b36dbe14c3",
+ "563bc52e527927030270658c4c965d51045edcbb",
[
null,
[
@@ -252421,7 +252600,7 @@
]
],
"replaced-aspect-ratio-stretch-fit-003.html": [
- "06dac275cabf3cdcbed864df9c5422745ea2d37f",
+ "0f6bffc2dceb1b02086ff2b88ea5a4705343afb6",
[
null,
[
@@ -264247,6 +264426,58 @@
{}
]
],
+ "text-autospace-dynamic-text-001.html": [
+ "32c9c175d97b9877206cc7664cd196145bcc7073",
+ [
+ null,
+ [
+ [
+ "/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "text-autospace-dynamic-text-002.html": [
+ "bd0a1107dae498f1f0f01e9e1795bfa061b1cc6c",
+ [
+ null,
+ [
+ [
+ "/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "text-autospace-dynamic-text-003.html": [
+ "d53762233cc6f040d865d20505f2207fa917cd47",
+ [
+ null,
+ [
+ [
+ "/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "text-autospace-dynamic-text-004.html": [
+ "4b3854c9608ab16d375833d7da768e2f7025da77",
+ [
+ null,
+ [
+ [
+ "/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"text-autospace-edit-001.html": [
"80c46f54d20ff9249a49d73e55b331a8368df4e1",
[
@@ -264367,6 +264598,19 @@
],
{}
]
+ ],
+ "text-autospace-zh-001.html": [
+ "e8afdca931044d59ec56a05e72c9c9ce0dae58e8",
+ [
+ null,
+ [
+ [
+ "/css/css-text/text-autospace/text-autospace-zh-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
]
},
"text-encoding": {
@@ -276604,7 +276848,7 @@
]
],
"text-emphasis-punctuation-2.html": [
- "1a48f9d32cb27be5cf2cd77832569e402d489b6f",
+ "53d261e9c8c11ae33642c893b8f3e098fb4c3e8c",
[
null,
[
@@ -310312,6 +310556,32 @@
}
]
],
+ "group-children-sizing-with-border.html": [
+ "cb0cf819b428ed19b2e9c0071ce8ea2304aca0bf",
+ [
+ null,
+ [
+ [
+ "/css/css-view-transitions/nested/group-children-sizing-with-border-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "group-children-sizing.html": [
+ "88916ddf48618717cac97c27fd3e1b6c55faab0b",
+ [
+ null,
+ [
+ [
+ "/css/css-view-transitions/nested/group-children-sizing-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"nearest-direct.tentative.html": [
"9bfd2e29c83a17c4244af589aa2877d4437da07f",
[
@@ -310603,7 +310873,7 @@
]
],
"rounded-border-clipper.html": [
- "098e5566585930a89378c5a8a6ede536fea9e124",
+ "239bcdd791db41383dd66765269590d84627a0a3",
[
null,
[
@@ -330933,6 +331203,19 @@
{}
]
],
+ "css-backdrop-filter-transform-clip.html": [
+ "29e8ce71e5a1e2ff3ef016c069d40dc993ea42d6",
+ [
+ null,
+ [
+ [
+ "/css/filter-effects/css-backdrop-filter-transform-clip-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"css-backdrop-filters-animation-blur.html": [
"0b3e429dc32cc48bce8750080202f527572b79c3",
[
@@ -353217,6 +353500,112 @@
]
},
"the-select-element": {
+ "customizable-select": {
+ "min-height-in-flex.html": [
+ "628c7ec51f4ec4ecc1c22964ecd89b4b6226b6f6",
+ [
+ null,
+ [
+ [
+ "/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "min-size-empty-001-ref.html": [
+ "1c37e12b0bc4662faf2157216a5945490340e290",
+ [
+ null,
+ [
+ [
+ "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref2.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "min-size-empty-001-ref2.html": [
+ "69170af04b552602820d645c2df00aa217fdbe09",
+ [
+ null,
+ [
+ [
+ "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-notref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "min-size-empty-001.html": [
+ "fd5cc4a0d022fff91f2edd294d68ceb034bfd4d6",
+ [
+ null,
+ [
+ [
+ "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "min-size-empty-002-ref.html": [
+ "c9e2d2333e7262fdcf043b68f6094cf0f70c169d",
+ [
+ null,
+ [
+ [
+ "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref2.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "min-size-empty-002-ref2.html": [
+ "dfbbbcac53308279e4b61e51f46e00db0d22df64",
+ [
+ null,
+ [
+ [
+ "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-notref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "min-size-empty-002.html": [
+ "b6256c93b28939abee4617eba29db8e75797ec7e",
+ [
+ null,
+ [
+ [
+ "/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "min-width-in-flex.html": [
+ "f3510a295856a988cb8a7a3e54db3e1d60c97b5a",
+ [
+ null,
+ [
+ [
+ "/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ]
+ },
"select-1-block-size-001-ref.html": [
"3d30c2bd9d0a105595ca6b1c75448fcdb801b101",
[
@@ -356537,6 +356926,21 @@
]
]
},
+ "list-box-important-colors.html": [
+ "c05d595c30c0c0ce0369100c904295478910f068",
+ [
+ null,
+ [
+ [
+ "/html/semantics/forms/the-select-element/list-box-important-colors-ref.html",
+ "=="
+ ]
+ ],
+ {
+ "testdriver": true
+ }
+ ]
+ ],
"reset-algorithm-rendering.html": [
"67da173ff2eb0d90c063294db486eaa34ea8878a",
[
@@ -357759,8 +358163,112 @@
]
],
"permission-icon": {
+ "icon-css-property-fill-reftest.html": [
+ "130849e79ba0b572d453dbaf1e92764ae7d9acfe",
+ [
+ null,
+ [
+ [
+ "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "icon-css-property-height-reftest.html": [
+ "9f52fd754797d1726b9d3ae04628861935b58c9d",
+ [
+ null,
+ [
+ [
+ "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "icon-css-property-margin-inline-end-reftest.html": [
+ "b4edffbf00bc4544070d3f452c2dce6f5fcb236e",
+ [
+ null,
+ [
+ [
+ "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "icon-css-property-max-height-reftest.html": [
+ "45abc0ffd471f9e78679578a8d35539a44779524",
+ [
+ null,
+ [
+ [
+ "/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "icon-css-property-min-height-reftest.html": [
+ "d1fe8d0724c1204c7f5d1dce0834a75bd5bb98f7",
+ [
+ null,
+ [
+ [
+ "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "icon-css-property-stroke-reftest.html": [
+ "9d0ff75c3d8da9a74178d9a91a55a5f17887e72e",
+ [
+ null,
+ [
+ [
+ "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "icon-css-property-stroke-width-reftest.html": [
+ "a268e3c5fba911cabab1d8ac59f95b2542a62788",
+ [
+ null,
+ [
+ [
+ "/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest-ref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "icon-different-for-precise-location-reftest.html": [
+ "bf58fdf93e5f45a439c6ba92c4ed99bfe071affc",
+ [
+ null,
+ [
+ [
+ "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html",
+ "!="
+ ]
+ ],
+ {}
+ ]
+ ],
"icon-hidden-reftest.html": [
- "79055da1badfc827e5cc02ed3be7db3842b49855",
+ "a5b5bb61d2b9de0499de45648a10597dc3a08f70",
[
null,
[
@@ -357772,8 +358280,21 @@
{}
]
],
+ "icon-restricted-css-no-effect-reftest.html": [
+ "5c0ea13fde75c98796b1d034c1e3c3e082934d7a",
+ [
+ null,
+ [
+ [
+ "/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"icon-unique-per-type-reftest.html": [
- "d51b1c4d398a42c8e59f047c0e457c533eae16ee",
+ "162a785852cea4410d9a824d2fa2b097d1027752",
[
null,
[
@@ -365534,7 +366055,7 @@
]
],
"image-embedding-nesteder-data-url.html": [
- "48fb4fa48b7439dde62fbe82a0ff20ff5d64e550",
+ "4f8335dcd19f3b592ec3e5da6a208da3b3694a2a",
[
null,
[
@@ -365690,7 +366211,7 @@
]
],
"image-modify-href-4.svg": [
- "f7e550e5defb0b1eba85edad430b0cef760223e6",
+ "e900ee7138700d81fd74c5e0822c9c3a820a5d15",
[
null,
[
@@ -367046,6 +367567,19 @@
{}
]
],
+ "marker-context-fill-transform.html": [
+ "507e9a360cc9fc472e6324721a4f974e4ca6cd6d",
+ [
+ null,
+ [
+ [
+ "/svg/painting/reftests/marker-context-fill-transform-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"marker-external-reference.svg": [
"18dfe41c0f44b3a200d2b1768442b415b6d7c0d8",
[
@@ -367544,7 +368078,7 @@
]
],
"small-nested-viewbox.html": [
- "3d9fb8cb45f57cc2e2fcf6293e9ebef5987704ce",
+ "308835ce5b45bf22920994d9b889e2a8d629c2fc",
[
null,
[
@@ -369422,6 +369956,32 @@
]
]
},
+ "nested-svg-sizing-with-use.svg": [
+ "5f3c4eed49024530cf05e0f832877974aa2b9d20",
+ [
+ null,
+ [
+ [
+ "/svg/styling/nested-svg-sizing-with-use-expected.svg",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "nested-svg-sizing.svg": [
+ "6c8c45f6d42373d420f752c5d1d9c5ccd8946560",
+ [
+ null,
+ [
+ [
+ "/svg/styling/nested-svg-sizing-expected.svg",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"padding-on-svg-via-img.tentative.html": [
"bdb0ce0212268ab0594a7d1a4a3def4b621dadf9",
[
@@ -373746,7 +374306,7 @@
[]
],
"docker.yml": [
- "06704fff106e8160ae54d66842dd6af6f49444c4",
+ "12b5adc7ee9d9d5391ff4b21b9a3a2de29a6b02a",
[]
],
"documentation.yml": [
@@ -373765,20 +374325,24 @@
"4ac2c8b27005a5468482f34364c6387debd9c9cb",
[]
],
+ "pull_request_test_jobs.yml": [
+ "4a4f623e84bf746dad558b1f7e6a688bad13a450",
+ []
+ ],
"regen_certs.yml": [
"d60c6b04b30800c6ffe2576cc81bb65d28d8d55c",
[]
],
"safari-wptrunner.yml": [
- "9cfc8a7eeeb56da91aa7456cc7cc36b67af9a73f",
+ "d90414d524193ff1b6dce932b1d8ce6707e0c897",
[]
],
"safari_stable.yml": [
- "7c344fe667f7dbf738f114bdc82893c8130e466e",
+ "4c2acce5c273ea0d90ebb721c0786293523a6c1d",
[]
],
"safari_technology_preview.yml": [
- "70827a365ac048f374a8f98ecf5d695bc472d78e",
+ "e2f4c64f46054411458b3a5d21f8cf08b24a8b66",
[]
],
"update-wasm-tests.yml": [
@@ -374498,11 +375062,11 @@
},
"resources": {
"locale-util.js": [
- "cacb11f4f25e04555a4d2a29b9344b19fc79c4d1",
+ "70a00a5630b79cf40810ee5455db3c463771a5d9",
[]
],
"util.js": [
- "84507a409e94c58001c0197efb12e63eafab9767",
+ "eda6a17a24ff7377aa4252e0cc23382972257cc4",
[]
]
},
@@ -419640,7 +420204,7 @@
[]
],
"WEB_FEATURES.yml": [
- "49ecf06d287f792b35b5d58ba28225f6b4bce965",
+ "1f47ce3fbaf4432b0bd509004339a3a8a61ac5f5",
[]
],
"abspos-in-clipped-overflow-print-ref.html": [
@@ -433789,6 +434353,10 @@
"flex-gap-decorations-021-ref.html": [
"1e28d73b4e2ce48d62880be1aa66e26f511ab7b1",
[]
+ ],
+ "flex-gap-decorations-025-ref.html": [
+ "d4cbf509854b9b7e8e9e003f0d785635c987cb21",
+ []
]
},
"grid": {
@@ -433931,6 +434499,10 @@
"grid-gap-decorations-042-ref.html": [
"ed44f7a2de37d31d57391731b2b8d7f7886790ad",
[]
+ ],
+ "grid-gap-decorations-045-ref.html": [
+ "b002cf0fb3a3481e476ee6fc5adfed14b8d19f79",
+ []
]
},
"multicol": {
@@ -441361,26 +441933,6 @@
"dca775fcecadf26d115e3961da6affb519b0fdba",
[]
],
- "scroll-marker-contain-001-ref.tentative.html": [
- "69e9167cc33a2ec61e47ea9c2199141c028424b2",
- []
- ],
- "scroll-marker-contain-002-ref.tentative.html": [
- "3fa777f7863f1f5e395e3304f6fbd763a9cf206e",
- []
- ],
- "scroll-marker-contain-003-ref.tentative.html": [
- "09bb93d4ebcefa99f22ae932626bf21c0b6ba528",
- []
- ],
- "scroll-marker-contain-008-ref.tentative.html": [
- "d74777d3bbf0b230048a17320afa6040a6b8eb62",
- []
- ],
- "scroll-marker-contain-009-ref.tentative.html": [
- "07b797ff789a382d91ee3207ba0172009bef0c77",
- []
- ],
"scroll-marker-counters-ref.html": [
"7113a5c5d23a97cf83f173a72ef96b57ecf09263",
[]
@@ -441445,6 +441997,26 @@
"559ff4e5aa2cffec5966938a824826a41fbc07d8",
[]
],
+ "scroll-target-group-001-ref.html": [
+ "ed2cb595c9a24fa916ca74ec2b3ef612109c59c9",
+ []
+ ],
+ "scroll-target-group-002-ref.html": [
+ "8571b11ba6adb78a90eb20467c1f1088edfd313d",
+ []
+ ],
+ "scroll-target-group-003-ref.html": [
+ "09bb93d4ebcefa99f22ae932626bf21c0b6ba528",
+ []
+ ],
+ "scroll-target-group-008-ref.html": [
+ "d2ba909f6445b7a095add1ea10acd2da8ae1f5fa",
+ []
+ ],
+ "scroll-target-group-009-ref.html": [
+ "82fbb988dfa9726a81be6a20bfa5ea28adc0f861",
+ []
+ ],
"scrollable-overflow-input-001-ref.html": [
"151843a72c00616dfb7ad723be6b1d3435cde65b",
[]
@@ -444595,7 +445167,7 @@
[]
],
"scroll-start-with-text-fragment-navigation-target.html": [
- "c399a975732125f3792f9786ffc5ac26daaffe20",
+ "8b9fab966973ba2eca53125d15996a38d9e87230",
[]
],
"stash.py": [
@@ -449235,7 +449807,7 @@
[]
],
"text-autospace-dynamic-text-001-ref.html": [
- "d26fae09b03fc19fc561abcc4ab4487b3be91b3f",
+ "499f8322fe4b7569b473e411b60955a4fac35a9a",
[]
],
"text-autospace-edit-001-ref.html": [
@@ -449277,6 +449849,10 @@
"text-autospace-vs-001-ref.html": [
"b02b4f7a20deeffd4f72b8ed8aa5103e3e2e6518",
[]
+ ],
+ "text-autospace-zh-001-ref.html": [
+ "266a69b298e458e0d8d431a6c3a1f13bcf9d2b07",
+ []
]
},
"text-encoding": {
@@ -451466,7 +452042,7 @@
[]
],
"text-emphasis-punctuation-2-ref.html": [
- "503e999788c55edf915b1e54ed8627fd22f39c41",
+ "6d824e73d560940249715614a0fa6872e675980b",
[]
],
"text-emphasis-punctuation-3-ref.html": [
@@ -456046,6 +456622,14 @@
}
},
"nested": {
+ "group-children-sizing-ref.html": [
+ "4f994bd03f67c7e73b03bb58b8eec220cb7720c5",
+ []
+ ],
+ "group-children-sizing-with-border-ref.html": [
+ "f1a484400e77b69372808af4d40c376c9a00aa14",
+ []
+ ],
"nested-opacity-ref.html": [
"7db20046e030aaa08582d44e3024cafe93f3fb2a",
[]
@@ -459885,6 +460469,10 @@
"3f57da1f706696789525adf24c6a9519850cd9ea",
[]
],
+ "css-backdrop-filter-transform-clip-ref.html": [
+ "73cfab22e7dbab00ad83c2e74faf0ffac1c6db2e",
+ []
+ ],
"css-backdrop-filters-animation-blur-ref.html": [
"643d084cecde6353a993013eaba93455bd9bd899",
[]
@@ -462249,7 +462837,7 @@
[]
],
"refresh_session.py": [
- "d05340a318ce6bd0183d157e55db136fa5d98156",
+ "ab491e30104202d61857d976eb49d927a8a96a7c",
[]
],
"request_early_challenge.py": [
@@ -462269,7 +462857,7 @@
[]
],
"start_session.py": [
- "b9d745e3ed60f900dadd077817da87a6675ccf1d",
+ "d2b7ee878188e0c928959445cc7722f5725e0da1",
[]
],
"verify_authenticated.py": [
@@ -465639,6 +466227,10 @@
"78d241cda952bccdeff05653f0cc7311afa73710",
[]
],
+ "login_delay.html": [
+ "469a7ee5cbe75fb842bcd247af6cba1963e6df86",
+ []
+ ],
"manifest-not-in-list.json": [
"00700666675413d378bba7c3f8bed12f2b9b4849",
[]
@@ -465679,6 +466271,10 @@
"e098cc4511a1980392097d0a26c020db3243ae35",
[]
],
+ "manifest_no_accounts_login_delay.json": [
+ "030e4a85bfa83927c2f2c2ac2c6ec6ecb9f48619",
+ []
+ ],
"manifest_no_login_url.json": [
"15a657c679df7b0dfb0be1058e7086b439781762",
[]
@@ -467577,11 +468173,11 @@
},
"resources": {
"fetch-later-helper.js": [
- "ef1d7090a8f5e6f81d0db9572d7d2d4cc8dd7658",
+ "32220ae39e3e3abf3c8a69c584289a222e7e422b",
[]
],
"fetch-later.html": [
- "b295be116c731c5ceec2d222ecd999fc5342d5c6",
+ "955f815d940bf853a9c84a367bf2023d9738e1a0",
[]
],
"get_beacon.py": [
@@ -467676,20 +468272,20 @@
[]
],
"resources": {
- "fetch-private-http.html": [
- "517629b758e89d4e07f2278d0ae7cb1a45b19c17",
+ "fetch-local-http.html": [
+ "dcad775bfece90756358236ff9d87cb924a2cb13",
[]
],
- "fetch-private.html": [
- "b96a207ec33a13e5dd4c53083ac3d73123b23cbb",
+ "fetch-local.html": [
+ "bc12e2660bc65cfffa3b322a86d1bbf7b22471ed",
[]
],
"fetch-public-http-wrong-address-space.html": [
- "c15a87ff7b9206576710b5763a64ac6a9a704d71",
+ "fb306f99d3c8269a09109bcd4f473dd55adf52ba",
[]
],
"support.sub.js": [
- "6b7813fa89d3fd022840518e21bf275560a6295a",
+ "09e234c5f24218f556109881f50c6551286e252f",
[]
],
"target.py": [
@@ -470833,7 +471429,7 @@
[]
],
"remote-context-helper.js": [
- "6c88b49fd4a0fdc4f1fe315ca2a85183a7c1a3d9",
+ "0181394f32dfcdc7e010277935f6c60692fb3b8f",
[]
]
}
@@ -473613,7 +474209,7 @@
},
"imagebitmap": {
"common.sub.js": [
- "525d28553aa0a6725db234df1dce1536b917ffd8",
+ "160a0cbf9ac373994a7bfbe56ef5aa2f4bf9c3f7",
[]
],
"createImageBitmap-worker.js": [
@@ -481153,6 +481749,24 @@
]
},
"the-select-element": {
+ "customizable-select": {
+ "min-height-in-flex-ref.html": [
+ "04c000ad5ada7efadc135bb504c0a4deaa48f2b0",
+ []
+ ],
+ "min-size-empty-001-notref.html": [
+ "422f187dc69483030a213974aedbd5ca9694b46a",
+ []
+ ],
+ "min-size-empty-002-notref.html": [
+ "0500b54b75869ab1b1e509c5b8d513557fa91bba",
+ []
+ ],
+ "min-width-in-flex-ref.html": [
+ "33df77bd0f14c62891e7df494b892df28a1145a0",
+ []
+ ]
+ },
"select-1-block-size-001-ref-2.html": [
"52461231862cfc998ccdb7ce9423d54b59d9e17e",
[]
@@ -483339,6 +483953,10 @@
]
}
},
+ "list-box-important-colors-ref.html": [
+ "8e75a4e21e8966713245299f515608aa4666843e",
+ []
+ ],
"reset-algorithm-rendering-ref.html": [
"acf192d1d55b7da110d04651093e3ebe0cd48214",
[]
@@ -483823,8 +484441,16 @@
[]
],
"permission-icon": {
+ "icon-css-property-max-height-reftest-ref.html": [
+ "abda1adc1d88d6eb05c8daa49e5328158113159f",
+ []
+ ],
+ "icon-css-property-stroke-width-reftest-ref.html": [
+ "5ed8af57313a89d99644325bc3e2548b2c48416d",
+ []
+ ],
"standard-location-permission-element-ref.html": [
- "15ffe751c51b3f8caeaa8b93f1286a3950c9a815",
+ "d9f55b345f74aef0b5d1879e2919ea7f2bc0ae32",
[]
]
},
@@ -487683,7 +488309,7 @@
[]
],
"pattern.webm": [
- "7cd3d31155723f61fc8678922c1626e1c7e99500",
+ "8b7ff388b8811952953eb75c10efef8f9c9ceef6",
[]
],
"red-16x16.png": [
@@ -488917,7 +489543,7 @@
[]
],
"crash-reporting.idl": [
- "6eaee138a828f7749026458265e7db598822330f",
+ "ba21afcf39718207fe8f56308adc18f9287b9e88",
[]
],
"credential-management.idl": [
@@ -489069,7 +489695,7 @@
[]
],
"cssom-view.idl": [
- "88abb078485fc2159c15b5401dc9944d47a47940",
+ "160c27ca05046cf543ecb575019826f2e9379a78",
[]
],
"cssom.idl": [
@@ -489121,7 +489747,7 @@
[]
],
"element-timing.idl": [
- "ef73ca6c0f610ff8cdb14a8bd0859efb8eca743b",
+ "4f42823704a42d9c40beed4cce8ec9824cfcd65e",
[]
],
"encoding.idl": [
@@ -489229,7 +489855,7 @@
[]
],
"html.idl": [
- "9c84e6a67efa4f7ffe6f9638c582af4424c473db",
+ "3a7dce9693ef3ecaaf1ea274029663b8068c4222",
[]
],
"idle-detection.idl": [
@@ -489493,7 +490119,7 @@
[]
],
"privacy-preserving-attribution.idl": [
- "0ab5d0fc21e49d2140ee014819debc26998473ef",
+ "02a3579820469e72913220ce4e6086d486c33d28",
[]
],
"private-aggregation-api.idl": [
@@ -489549,7 +490175,7 @@
[]
],
"resource-timing.idl": [
- "66f2841d744af3a39a55c907c739a9f1bb92aff0",
+ "499d27b6ee69b984ad57c66c929352be1eb17ab7",
[]
],
"saa-non-cookie-storage.idl": [
@@ -489568,12 +490194,8 @@
"6f93db15a74e052913a277e5130226280a3f9311",
[]
],
- "scoped-custom-elements-registry.idl": [
- "46ca2d6b9c45805d8aa684af7fe91af6dd5d7919",
- []
- ],
"screen-capture.idl": [
- "db9282ce0a57bb3b84ea45f5ed2d7e69bc3a8a32",
+ "eb5685eee4117d03d2b6dbad15edf430c1c2cac4",
[]
],
"screen-orientation.idl": [
@@ -489593,7 +490215,7 @@
[]
],
"secure-payment-confirmation.idl": [
- "5b67ca6267839c4c54ba75c55a9da03231642303",
+ "0a2207684ec71074ffea786bf459b6073799e8d3",
[]
],
"selection-api.idl": [
@@ -489621,7 +490243,7 @@
[]
],
"speech-api.idl": [
- "94a416f262b361e326c5b3c89fa8d160c1118b48",
+ "9620e60dc5057b5f48100bc4563d01aaf174d303",
[]
],
"sri.idl": [
@@ -489717,7 +490339,7 @@
[]
],
"wai-aria.idl": [
- "deebc5626e2a925c4b7c7bad92c8492ebb4dcb08",
+ "3364bc9a76936b1eed3873af339e5c11feb10458",
[]
],
"wasm-js-api.idl": [
@@ -489729,7 +490351,7 @@
[]
],
"web-animations-2.idl": [
- "c4a0c2532d97806eeead38d1e1924c485d775491",
+ "f18cdd4f4583d959119a07e4248e94210fad1036",
[]
],
"web-animations.idl": [
@@ -489825,7 +490447,7 @@
[]
],
"webgpu.idl": [
- "4fec46a2557033a941b5da7a7481aa8125696ed2",
+ "1fc896c6b1625f13c6ed00ce14a34ce1dfa4db88",
[]
],
"webhid.idl": [
@@ -489941,7 +490563,7 @@
[]
],
"writing-assistance-apis.idl": [
- "916daee754e3ef992ad8fa282882c88dd9aa0734",
+ "82acfdb48e2d3a051ae0e43d6d34355cf8259ae3",
[]
],
"xhr.idl": [
@@ -490306,7 +490928,7 @@
}
},
"lint.ignore": [
- "60b0f65a6f43a560c5d86ffe937359d5c9717597",
+ "cf83e458213668188c73dc0b98048be24c31ffe4",
[]
],
"loading": {
@@ -497706,7 +498328,7 @@
[]
],
"conftest.py": [
- "1301e7a9f7701d40390ad19d9439d7d95bfc9ebc",
+ "0b67ca76761a9c59b56bba083f36489c56225016",
[]
],
"harness.html": [
@@ -499868,6 +500490,10 @@
"f43598e41c1acd8b425e6f07cbbbdb6eefb0d615",
[]
],
+ "add-routes.js": [
+ "796acd19c12f4f79b587fa816516ed5e0993da31",
+ []
+ ],
"basic-module-2.js": [
"189b1c87fee75c86ca08351872e402b84b8b844f",
[]
@@ -502424,7 +503050,7 @@
[]
],
"soft-navigation-helper.js": [
- "5860738225b8ed03a2063b1c2b9eef7884f33ee5",
+ "4bc16b44e00097ce2e3ee63ac7d64c14db565b7a",
[]
],
"soft-navigation-test-helper.js": [
@@ -502569,7 +503195,7 @@
[]
],
"background-sync.https.html": [
- "dd452aa34518c08b02340bec0469e830b60745de",
+ "6589b69b22f9d72baece7393b0cbe3bb264b162d",
[]
],
"battery-status.https.html": [
@@ -502937,7 +503563,7 @@
[]
],
"utils.js": [
- "259f71f6a70c7f07e65c7620f5fafeb810e2de6f",
+ "e8397042e7f53a56da6c34a166dae00ad535b065",
[]
],
"wake-lock.https.html": [
@@ -503012,7 +503638,7 @@
},
"resources": {
"utils.js": [
- "cb72f4468132896689de081ce45a1da97b48923d",
+ "f2fc21691133a0c7dd47d1469dabfda69d10e6c6",
[]
]
},
@@ -503982,6 +504608,10 @@
"120941444a4898197d6b6001f9908a6cd48b62ba",
[]
],
+ "marker-context-fill-transform-ref.html": [
+ "78117251a36ec26b26c74e40dc4bf822902bb38f",
+ []
+ ],
"marker-path-001-ref.svg": [
"202ac3420dc080f85c4a2cac5e13ccbea6d0235e",
[]
@@ -504098,6 +504728,14 @@
"resources.svg": [
"85b6833a6601a45d1847320efb7259080cba5359",
[]
+ ],
+ "svg-marker-context-paint.svg": [
+ "8c97058d71ee7a055f221f21e3fdc3f2adab3777",
+ []
+ ],
+ "svg-marker-ref.svg": [
+ "1e823431105069ea997566360358515fb29e1414",
+ []
]
}
},
@@ -504561,6 +505199,14 @@
[]
]
},
+ "nested-svg-sizing-expected.svg": [
+ "a8fa5211842b3a351660e047626517aeafe960b5",
+ []
+ ],
+ "nested-svg-sizing-with-use-expected.svg": [
+ "daef973aa5d1b0ae0a5c29cc3d94e8f893273ace",
+ []
+ ],
"padding-on-svg-via-img-ref.tentative.html": [
"37608e4b823b7b9e9a4cf9a1cc14bc00b23ae845",
[]
@@ -504853,7 +505499,7 @@
[]
],
"META.yml": [
- "db7d4d786b4051882dc31aae67456a71848e33e3",
+ "b204d814921de6370dc74599491425eef2a355f7",
[]
],
"__init__.py": [
@@ -505006,7 +505652,7 @@
[]
],
"jobs.py": [
- "be600ee397472dc0f4c9175dfd467dc89f08d3cb",
+ "f18cd66e42048fed58360fcdb2b00e503d0d8b4f",
[]
],
"macos_color_profile.py": [
@@ -515999,7 +516645,7 @@
]
},
"client.py": [
- "5a54bf66ac6bf58bf2953bc99cabfd966c91907c",
+ "f4e6259d547a662a42e01eb94034732e5782c530",
[]
],
"error.py": [
@@ -516352,7 +516998,7 @@
[]
],
"firefox.py": [
- "f8629878213f3d00c90858e945bacb08cd30ced7",
+ "e5635c361cc75fff518233421cdd9ace8eba167c",
[]
],
"firefox_android.py": [
@@ -516432,7 +517078,7 @@
[]
],
"base.py": [
- "76d703e78299c0e9728d18deed08f1b4e8c44908",
+ "4efe1660eb48816c22f7d4528fcccebf271349a1",
[]
],
"executorchrome.py": [
@@ -516583,7 +517229,7 @@
[]
],
"testdriver-extra.js": [
- "3c2dd8b42dd5b572841b5b5529b42a17f724cef9",
+ "2a5bb3937fdd57b7223b09c9b881e17527e023a1",
[]
],
"testdriver-vendor.js": [
@@ -517404,7 +518050,7 @@
[]
],
"csp-violations.js": [
- "46c2ca1b30f33bec538b2245ed8e9a8c1a1b7c6d",
+ "bc38da9e2210c2882cb70f1313e1cfd3b7bda245",
[]
],
"event-handler-attributes.mjs": [
@@ -517419,6 +518065,10 @@
"b680256b7a260655a1d90a63ea624725f23b43c3",
[]
],
+ "logMessage-module.sub.js": [
+ "e886bd54b31b577234a95bd00636365eb2836aa3",
+ []
+ ],
"namespaces.js": [
"72271293baea3f57deeec54a540235005b3912cc",
[]
@@ -517443,6 +518093,14 @@
"8449dd202b6c76d1830dc348fc84ef927baae9f4",
[]
],
+ "passthroughpolicy.js": [
+ "efe3ea62c0dd9eae79c03e9de6a5643fc76c16d6",
+ []
+ ],
+ "script-messages.js": [
+ "ad4138be25b9120ea7879438a437aa869cc2d309",
+ []
+ ],
"send-plain-string-to-trusted-type-sink.html": [
"73b297a7205e40f575a1e040c7fb501945d5a14f",
[]
@@ -553914,14 +554572,14 @@
]
],
"detector-locale.https.window.js": [
- "80cbfa485e3944ba13de2aec3ba317e2cc84026f",
+ "1e2efd11c6204421b24a240d9b159a9983a13039",
[
"ai/language_detection/detector-locale.https.window.html",
{
"script_metadata": [
[
"title",
- "Detect english"
+ "LanguageDetector locale tests"
],
[
"global",
@@ -553953,7 +554611,7 @@
]
],
"detector.https.window.js": [
- "379b87415347a1980209fb471d9b1ccb78ccd032",
+ "ae21b4635383772032a0b979932679895b06e2bd",
[
"ai/language_detection/detector.https.window.html",
{
@@ -554554,14 +555212,14 @@
]
],
"translator-locale.https.window.js": [
- "73e7eff20d211c9eefcffd25b123920bdd35275c",
+ "27dd260557605d5b1a048fc0be5f6ca585b7289d",
[
"ai/translator/translator-locale.https.window.html",
{
"script_metadata": [
[
"title",
- "Detect english"
+ "Translator locale tests"
],
[
"global",
@@ -554592,15 +555250,15 @@
}
]
],
- "translator.optional.https.window.js": [
- "2a4c5a6c5dd3cd8b2fea087aa910428c2a3041bf",
+ "translator.https.window.js": [
+ "722430fe631c8b625ad95511b3ced26a770888c4",
[
- "ai/translator/translator.optional.https.window.html",
+ "ai/translator/translator.https.window.html",
{
"script_metadata": [
[
"title",
- "Translator Translate"
+ "Translator tests"
],
[
"global",
@@ -554616,7 +555274,38 @@
],
[
"script",
- "../resources/language_codes.js"
+ "/resources/testdriver.js"
+ ],
+ [
+ "script",
+ "resources/util.js"
+ ]
+ ],
+ "timeout": "long"
+ }
+ ]
+ ],
+ "translator.optional.https.window.js": [
+ "ce01efed14399414c3617e0677c1f720b4cc872a",
+ [
+ "ai/translator/translator.optional.https.window.html",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "Optional Translator tests"
+ ],
+ [
+ "global",
+ "window"
+ ],
+ [
+ "timeout",
+ "long"
+ ],
+ [
+ "script",
+ "../resources/util.js"
],
[
"script",
@@ -580720,6 +581409,13 @@
{}
]
],
+ "anchor-function-pseudo-element-basic.html": [
+ "70977ca4c406e7ff405f42059ca8b2913f7a44ec",
+ [
+ null,
+ {}
+ ]
+ ],
"anchor-getComputedStyle-001.html": [
"7c2cbbb67955db11eef9874744d333e07bc45172",
[
@@ -585659,7 +586355,7 @@
]
],
"scope-visited-cssom.html": [
- "aba4b752b2f04d84e6816df83a08ba0b282e1a6f",
+ "3dc29da6dd3e38ad62d5793722e2f8c12c12beef",
[
null,
{}
@@ -588092,7 +588788,7 @@
]
],
"contain-invalid.html": [
- "9f96bbc2fed11a6db4516442e68393672c7a4356",
+ "d73e4b4c357c2eea7a23a8628e44e87431e4351d",
[
null,
{}
@@ -588104,6 +588800,13 @@
null,
{}
]
+ ],
+ "contain-valid.tentative.html": [
+ "da358741b7b30d30eb5793c7fec64387170bfe17",
+ [
+ null,
+ {}
+ ]
]
}
},
@@ -596275,7 +596978,7 @@
]
],
"Highlight-setlike.html": [
- "0093f9be232b5544c635ee343e660c4ee4b489e8",
+ "26b30d2a0be97e842981d8507bb84bed2d2e41d6",
[
null,
{}
@@ -596324,7 +597027,7 @@
]
],
"HighlightRegistry-maplike.html": [
- "d8bbe4731f6a332efbf223bd69d48244d95560ca",
+ "50fccd2347d92607c1da94c5a30a3a94a40a243a",
[
null,
{}
@@ -597968,7 +598671,7 @@
{}
]
],
- "clip-path-interpolation-shape-control-points.tentative.html": [
+ "clip-path-interpolation-shape-control-points.html": [
"03545a155835d3a5200ea37e7626221451789765",
[
null,
@@ -599583,6 +600286,13 @@
{}
]
],
+ "overflow-rtl-scroll-left.html": [
+ "0c837737546a2ffbc21d29d4f95630bea706aed0",
+ [
+ null,
+ {}
+ ]
+ ],
"overflow-shorthand-001.html": [
"f425636c3bb4297e4e6564d1c2629dc10dde5607",
[
@@ -599689,6 +600399,29 @@
{}
]
],
+ "parsing": {
+ "scroll-target-group-computed.html": [
+ "589ae8835da2ddc75490d2d2a53f86e2ffd7722f",
+ [
+ null,
+ {}
+ ]
+ ],
+ "scroll-target-group-invalid.html": [
+ "ac6a6fa3191f8de193d06bb70f1fd16d019b7ef7",
+ [
+ null,
+ {}
+ ]
+ ],
+ "scroll-target-group-valid.html": [
+ "0da79fc118cbda6333fca3442333ccdb4d8c7797",
+ [
+ null,
+ {}
+ ]
+ ]
+ },
"scroll-buttons-invalid.html": [
"a7306df84d6bd9695ec389a3dfa58e2c97065fe6",
[
@@ -605434,21 +606167,21 @@
{}
]
],
- "shape-function-computed.tentative.html": [
+ "shape-function-computed.html": [
"a87bc2391a882930d9e068e79a2c831b2fad6f53",
[
null,
{}
]
],
- "shape-function-invalid.tentative.html": [
+ "shape-function-invalid.html": [
"9abe483c703119d87dda5a15535aad07e89d81f7",
[
null,
{}
]
],
- "shape-function-valid.tentative.html": [
+ "shape-function-valid.html": [
"2372290cb69f8b22b3ab764ff088bc7bb8984125",
[
null,
@@ -606994,6 +607727,41 @@
{}
]
],
+ "flex-line-001.html": [
+ "04c12f20cdadf643c4e2c285680f7f44f2bf8913",
+ [
+ null,
+ {}
+ ]
+ ],
+ "flex-line-002.html": [
+ "232554d7eaf37f9a23d6c3543ad4874c00f54b3c",
+ [
+ null,
+ {}
+ ]
+ ],
+ "flex-line-003.html": [
+ "9aeb014ac1621d150cf33b4f569a06930e66af1b",
+ [
+ null,
+ {}
+ ]
+ ],
+ "flex-line-004.html": [
+ "4be0d02c393dd68594fd05c073b6f9472dd712a3",
+ [
+ null,
+ {}
+ ]
+ ],
+ "flex-line-005.html": [
+ "99cd331049260b71f32fbbd1d6f28702f96ec4b5",
+ [
+ null,
+ {}
+ ]
+ ],
"indefinite-1.html": [
"e69689c939f42b330f68eaa2ae07885557f65657",
[
@@ -609796,7 +610564,7 @@
]
],
"css-text-line-break-zh-in-loose.html": [
- "56fec0bd3edba1ee681a0dc6ae906120f28c6677",
+ "54ce3c15735fd74f607029639e103ec5cd2c1b23",
[
null,
{}
@@ -610183,7 +610951,7 @@
]
],
"text-autospace-computed.html": [
- "9656f70956e01304629368fd488d83310428b5ef",
+ "c8a4091eb99c19bb4355a8ed10a4f14a24fdbf39",
[
null,
{}
@@ -610267,7 +611035,7 @@
]
],
"text-spacing-computed.html": [
- "845cf075a9b91cd1ebf59a3723db0c41714e7afc",
+ "2ba02e87c9f34291c1b997b4c802e718a5dbc82e",
[
null,
{}
@@ -615969,7 +616737,7 @@
]
],
"acos-asin-atan-atan2-invalid.html": [
- "727fc4df18a59df19f1f90b37bd96e76d50359f6",
+ "5f894e35a56c910af74d0dedae6e40dbafa51257",
[
null,
{}
@@ -618029,7 +618797,7 @@
]
},
"no-crash-set-exception.html": [
- "cc401b8bd6f91e7f98e628950827011908208585",
+ "b57fce0d73f27878efe733877201f05df9239bf0",
[
null,
{}
@@ -618203,7 +618971,7 @@
]
],
"pseudo-computed-style-stays-in-sync-with-new-element.html": [
- "0a34a4b73ff0051f48445d7b461ef21fae04881b",
+ "9914097185b9c0b42f80835a24ab28061eb844af",
[
null,
{}
@@ -618266,6 +619034,13 @@
{}
]
],
+ "contain-view-transition-name-discovery.html": [
+ "10a1a1197b10a76f239f85339286d1245b22e2a0",
+ [
+ null,
+ {}
+ ]
+ ],
"display-none-during-transition.html": [
"f94d6f7fd76af7a889e5a9a1cf6fc6538377eb0e",
[
@@ -621725,6 +622500,13 @@
{}
]
],
+ "drop-shadow-currentcolor-inheritance.html": [
+ "92cf94e29b09037108c9f98c0c673a458d2957d7",
+ [
+ null,
+ {}
+ ]
+ ],
"filter-sign-function.html": [
"97e5a26073b097728cf4571712bb9bd472ed69fd",
[
@@ -625439,24 +626221,6 @@
{}
]
],
- "idlharness.window.js": [
- "b2727e3a8742a791ba51fabf0de02c744ae0d732",
- [
- "custom-elements/registries/idlharness.window.html",
- {
- "script_metadata": [
- [
- "script",
- "/resources/WebIDLParser.js"
- ],
- [
- "script",
- "/resources/idlharness.js"
- ]
- ]
- }
- ]
- ],
"initial-about-blank.window.js": [
"b3bb7e139b5c543bae2d4cc86d3f5ebe1fe197f1",
[
@@ -625512,6 +626276,13 @@
null,
{}
]
+ ],
+ "valid-custom-element-names.tentative.html": [
+ "72a5999e3a9a76bd35b3f17402cf13f6ef43dc4d",
+ [
+ null,
+ {}
+ ]
]
},
"scoped-registry-initialize.html": [
@@ -630595,6 +631366,15 @@
]
]
},
+ "name-validation.tentative.html": [
+ "ca5e9c118248990c6ea629eafa41a331d79539a6",
+ [
+ null,
+ {
+ "timeout": "long"
+ }
+ ]
+ ],
"prepend-on-Document.html": [
"1d6d43a46392650796cbcaae413f7ad630633a57",
[
@@ -652634,6 +653414,15 @@
}
]
],
+ "idp-login-with-failed-accounts-fetch.https.html": [
+ "75d2c589b1d1fe5d39d0c52b9732976b9bdf4e32",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ],
"logged-out.https.html": [
"51c7c1a710b5e3d9cca1783d031350a5e98b6d4a",
[
@@ -666501,7 +667290,7 @@
},
"local-network-access": {
"fetch.tentative.https.html": [
- "ac2c3cca28eaf2c0a36d3350aa92d87d1ba75b34",
+ "b783269207b8906c2739f9b720f2bf517b1e437e",
[
null,
{
@@ -686471,6 +687260,15 @@
}
]
],
+ "remove-first-sibling.html": [
+ "be1f501afff701c57f71bc5441d59bf69b88a482",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ],
"remove-first.html": [
"ff1b251271c9cfd9b9ef2dbe432e7cb41d97c737",
[
@@ -686480,6 +687278,15 @@
}
]
],
+ "remove-last-sibling.html": [
+ "f893a3f9d5a35d3300d7677cd8944399e81bae9c",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ],
"remove-last.html": [
"72e7ed850aeef510642cac2ac546bd66698d9870",
[
@@ -700601,6 +701408,47 @@
{}
]
],
+ "createImageBitmap-resolves-in-task.any.js": [
+ "0d2ddf5855eba935a495819bcbea22570903d8ce",
+ [
+ "html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.html",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "createImageBitmap resolves in a task"
+ ],
+ [
+ "script",
+ "/common/media.js"
+ ],
+ [
+ "script",
+ "./common.sub.js"
+ ]
+ ]
+ }
+ ],
+ [
+ "html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.worker.html",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "createImageBitmap resolves in a task"
+ ],
+ [
+ "script",
+ "/common/media.js"
+ ],
+ [
+ "script",
+ "./common.sub.js"
+ ]
+ ]
+ }
+ ]
+ ],
"createImageBitmap-serializable.html": [
"c185cd9cbd9c4964fac8a1f9d0a899d945a206c7",
[
@@ -727705,7 +728553,7 @@
},
"processing-model": {
"focus-fixup-rule-one-no-dialogs.html": [
- "2413fe266737720d6c3155c4c298d193ae6311fa",
+ "5471e8e9ec1ccfd3b75b20dbd7bf22ebb6518c32",
[
null,
{}
@@ -734584,8 +735432,8 @@
{}
]
],
- "naturalWidth-naturalHeight-unavailable.tentative.html": [
- "ae6fa0e432853d111aa63bd87f43206acec86024",
+ "naturalWidth-naturalHeight-width-height.tentative.html": [
+ "c10a942069c775c3470a34d9fe1465267b100813",
[
null,
{}
@@ -738110,7 +738958,7 @@
}
]
],
- "details-toggle-source.tentative.html": [
+ "details-toggle-source.html": [
"1a571f5441449a964bf9aea27246ef13f937944c",
[
null,
@@ -738508,8 +739356,8 @@
{}
]
],
- "dialog-toggle-source.tentative.html": [
- "7e6fe25dabf79d9430fcfa98afe83f3520d62686",
+ "dialog-toggle-source.html": [
+ "130d76451da4f26788cc08c10a910487b426aaac",
[
null,
{
@@ -739040,7 +739888,7 @@
},
"permission-element": {
"bounded-css-properties.tentative.html": [
- "9678286179ac494d92864836f4bb09e809e3382a",
+ "1455ba98bb31a5a07b701b9861ce8149dd5b3fe8",
[
null,
{}
@@ -739546,7 +740394,7 @@
{}
]
],
- "popover-toggle-source.tentative.html": [
+ "popover-toggle-source.html": [
"00ced8f7070aa4ac677c7fc0a64b3b150f95039b",
[
null,
@@ -744396,6 +745244,15 @@
}
]
],
+ "interesttarget-invoker-descendants.tentative.html": [
+ "d976c0eb011d4240d162418df077c412db5fb9b1",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ],
"interesttarget-keyboard-behavior.tentative.html": [
"997c2b9382508902ae2025bb4f71d6f2de0f56f5",
[
@@ -767564,7 +768421,7 @@
]
],
"idlharness.window.js": [
- "049f0f18f1be64ad5d250f045b0dda3edbc931a4",
+ "9843a604b80dc7967798dcdc85df16e4f32041ef",
[
"paint-timing/idlharness.window.html",
{
@@ -773206,7 +774063,7 @@
]
],
"pointerevent_click_during_parent_capture.html": [
- "f25e61aade3abb3d95185e4981b4740f15bfab52",
+ "fd6de4d0899ad5ed397fdd7f84f88d7f0a376855",
[
"pointerevents/pointerevent_click_during_parent_capture.html?pointerType=mouse&preventDefault=",
{
@@ -791672,6 +792529,13 @@
},
"scroll-animations": {
"animation-trigger": {
+ "animation-trigger-addAnimation.tentative.html": [
+ "71fedebbcea1b54a67343045650c6372703b1114",
+ [
+ null,
+ {}
+ ]
+ ],
"animation-trigger-alternate.tentative.html": [
"aa92e32c5628392813cd576b64eb2bb32129e2ef",
[
@@ -791693,6 +792557,20 @@
{}
]
],
+ "animation-trigger-multiple-animations.tentative.html": [
+ "6914cb09b89c24263f9bc13cdeb3b7bc0d99501c",
+ [
+ null,
+ {}
+ ]
+ ],
+ "animation-trigger-multiple-triggers.tentative.html": [
+ "5fccdf27550946564faf774c14cdc6e74b37d125",
+ [
+ null,
+ {}
+ ]
+ ],
"animation-trigger-once-play-state.tentative.html": [
"23c6aa8ce9f697cab4121e713556b544cb4202cf",
[
@@ -791720,13 +792598,6 @@
null,
{}
]
- ],
- "animation-trigger.html": [
- "7506fb05829d8d2c84dbaf3915a9e08314302af1",
- [
- null,
- {}
- ]
]
},
"css": {
@@ -795675,6 +796546,13 @@
{}
]
],
+ "add-routes.https.html": [
+ "fbab7cdedfa388d8dbd47e1887beb2a02fd18721",
+ [
+ null,
+ {}
+ ]
+ ],
"claim-affect-other-registration.https.html": [
"52555ac271b5bad279ab37352c9d9937c780909a",
[
@@ -800804,7 +801682,7 @@
"detection": {
"tentative": {
"racing-soft-navigations.html": [
- "d485f90813471704ffa62ce362b3d4517e41bec1",
+ "b513ff4f99bf8d3714fc8b6f12909747ca4fd549",
[
null,
{
@@ -800814,6 +801692,54 @@
]
}
},
+ "dom": {
+ "tentative": {
+ "distant-leaf.window.js": [
+ "c599985a2a29de4fe9472dddfce9ce6c1d95116e",
+ [
+ "soft-navigation-heuristics/dom/tentative/distant-leaf.window.html",
+ {
+ "script_metadata": [
+ [
+ "script",
+ "/resources/testdriver.js"
+ ],
+ [
+ "script",
+ "/resources/testdriver-vendor.js"
+ ],
+ [
+ "script",
+ "../../resources/soft-navigation-test-helper.js"
+ ]
+ ]
+ }
+ ]
+ ],
+ "insert-image-div-before.window.js": [
+ "19e8a397c348be1f91b654ab48a93e4f2badfd93",
+ [
+ "soft-navigation-heuristics/dom/tentative/insert-image-div-before.window.html",
+ {
+ "script_metadata": [
+ [
+ "script",
+ "/resources/testdriver.js"
+ ],
+ [
+ "script",
+ "/resources/testdriver-vendor.js"
+ ],
+ [
+ "script",
+ "../../resources/soft-navigation-test-helper.js"
+ ]
+ ]
+ }
+ ]
+ ]
+ }
+ },
"dropped-entries.tentative.html": [
"d27ad452be07b778aea1aff5525d1670fb66ec5f",
[
@@ -800842,6 +801768,28 @@
}
]
],
+ "history": {
+ "tentative": {
+ "navigation-api-prevent-default.window.js": [
+ "3df2192f560c8dfb5c85c0a956b3f80e4bae8d31",
+ [
+ "soft-navigation-heuristics/history/tentative/navigation-api-prevent-default.window.html",
+ {
+ "script_metadata": [
+ [
+ "script",
+ "/resources/testdriver.js"
+ ],
+ [
+ "script",
+ "/resources/testdriver-vendor.js"
+ ]
+ ]
+ }
+ ]
+ ]
+ }
+ },
"image-lcp-followed-by-image-softnav-lcp.tentative.html": [
"7a2018d20ee811ff1ec9ca88c80038b0f1239874",
[
@@ -800960,15 +801908,6 @@
}
]
],
- "navigation-api-preventDefault.tentative.html": [
- "b7b2a24c94203080d052411f080a0dd3c0d11cbe",
- [
- null,
- {
- "testdriver": true
- }
- ]
- ],
"navigation-api-rejected.tentative.html": [
"693f876b6e188b4c8ec8531aa7723c6afada70af",
[
@@ -801006,7 +801945,7 @@
]
],
"popstate-multiple-backs.tentative.html": [
- "fd87f5f03e753b3ac5a8d8268a76496d93c15969",
+ "a460b922eb798f61825b18e2802560056722628c",
[
null,
{
@@ -801079,6 +802018,13 @@
}
]
],
+ "supported-entry-types.window.js": [
+ "50e22df0f3ef666ed93d343d9cef91b56e00cf84",
+ [
+ "soft-navigation-heuristics/smoke/tentative/supported-entry-types.window.html",
+ {}
+ ]
+ ],
"task-attribution.html": [
"0c27fbb06058b3fb949e609dee9ea857a9682d27",
[
@@ -801171,13 +802117,6 @@
}
]
],
- "supported-entry-types.tentative.html": [
- "4ab408e10b1e504961715779d3f08e70f37dc665",
- [
- null,
- {}
- ]
- ],
"text-lcp-followed-by-anim-image-softnav-lcp.tentative.html": [
"b34a6e81a58333c61ccedb4e25551feba4893736",
[
@@ -801216,6 +802155,21 @@
]
},
"speculation-rules": {
+ "invalid-rules.https.html": [
+ "d887c6cafc88fc629b86ba86c1882673bd36b682",
+ [
+ "speculation-rules/invalid-rules.https.html?prefetch",
+ {
+ "timeout": "long"
+ }
+ ],
+ [
+ "speculation-rules/invalid-rules.https.html?prerender",
+ {
+ "timeout": "long"
+ }
+ ]
+ ],
"prefetch": {
"anonymous-client.https.html": [
"902724cdb0e08e603d0d41566a2fe889646088f0",
@@ -801224,8 +802178,8 @@
{}
]
],
- "clear-prefetch-cache-after-clear-site-data-cache.tentative.https.html": [
- "48f6264e852b0e32e6be06367e16b27f7cc6d14b",
+ "clear-prefetch-cache-after-clear-site-data-cache.https.html": [
+ "79078d30ab6dc1ce6aab1d4386bd44d00db1b72a",
[
null,
{}
@@ -801457,13 +802411,6 @@
}
]
],
- "invalid-rules.https.html": [
- "0fdfacde643958093d4b190f5bb8a5bfa733e47d",
- [
- null,
- {}
- ]
- ],
"multiple-url.https.html": [
"34a8817a98213d50bc8c129356fc92fc6ca97d2a",
[
@@ -802327,7 +803274,7 @@
]
],
"activation-start.https.html": [
- "7aee20c3465dcfb02e370ada84b62af6e99f35d0",
+ "a26af01161404cb98773a151f605668be2b65a0b",
[
null,
{
@@ -802353,8 +803300,8 @@
}
]
],
- "cancel-prerendering-after-clear-site-data-cache-different-origins.tentative.https.html": [
- "db52e758750f2757f722c025e3accf6fce13a9cc",
+ "cancel-prerendering-after-clear-site-data-cache-different-origins.https.html": [
+ "c18df9e0cd9be13f69cd4e438901b075327c43cc",
[
null,
{
@@ -802362,8 +803309,8 @@
}
]
],
- "cancel-prerendering-after-clear-site-data-cache-same-origin.tentative.https.html": [
- "23d862c5130139bc5e20242e73cb8d2e4a93e332",
+ "cancel-prerendering-after-clear-site-data-cache-same-origin.https.html": [
+ "a2668fc3bcac6e744ee171b8bb7b0f7752ce7c5c",
[
null,
{
@@ -802390,7 +803337,7 @@
]
],
"credentialed-prerender-not-opt-in.https.html": [
- "697382a6dc8569600a34f866288f4a2405d62188",
+ "a02a2860990f50eb4b802d4dd0856d8a8acac3c2",
[
null,
{
@@ -802399,7 +803346,7 @@
]
],
"credentialed-prerender-opt-in.https.html": [
- "91626bafce677b96fef8115a1a90ca533dd31482",
+ "c309abd2c6da89c47c0518986558639ffeb0d110",
[
null,
{
@@ -802537,7 +803484,7 @@
]
],
"headers.https.html": [
- "2ef6b5ce072866d3c88ce7a86fcea6436de3364a",
+ "e05f72434e4f279c2fbd0efacda161bfdbe2c80c",
[
null,
{
@@ -802597,7 +803544,7 @@
]
],
"navigation-api-location-replace.https.html": [
- "e3ecf1b72b61f5cfbb610906c2c4049ace2d51eb",
+ "3b4fb4195ca432cbce42ffedf09bb3efd5bc6daf",
[
null,
{
@@ -802606,7 +803553,7 @@
]
],
"navigation-api-multiple-entries.https.html": [
- "e8e0f874597081ca12e653e04c3c9c43716778cf",
+ "060091e171e26e5a84fd99d5fde1dddf50d9321d",
[
null,
{
@@ -802615,7 +803562,7 @@
]
],
"navigation-api.https.html": [
- "fd25e94b5b32d56faac7875f88f48fe484cde3d0",
+ "c6ee974271699e9f063f546d33beb1c83477fb23",
[
null,
{
@@ -803058,7 +804005,7 @@
]
],
"referrer-policy-mismatch.https.html": [
- "fa2d424660a3674ba7c7db7a248df70ba6acde73",
+ "09cd98eb243e791902d926dfeada4cb7a54c8ddd",
[
null,
{
@@ -803237,17 +804184,17 @@
}
]
],
- "restriction-background-sync.tentative.https.html": [
+ "restriction-background-sync.https.html": [
"53dbb56d99fc34c7c81fd259d3b819a066db7eb7",
[
- "speculation-rules/prerender/restriction-background-sync.tentative.https.html?target_hint=_blank",
+ "speculation-rules/prerender/restriction-background-sync.https.html?target_hint=_blank",
{
"testdriver": true,
"timeout": "long"
}
],
[
- "speculation-rules/prerender/restriction-background-sync.tentative.https.html?target_hint=_self",
+ "speculation-rules/prerender/restriction-background-sync.https.html?target_hint=_self",
{
"testdriver": true,
"timeout": "long"
@@ -803832,15 +804779,6 @@
}
]
],
- "script-supports-speculationrules.https.html": [
- "2dc856fce5da7c8fa2fb24a8df70348fe5aa84e8",
- [
- null,
- {
- "timeout": "long"
- }
- ]
- ],
"send-beacon.https.html": [
"34843efcde78c5338116ab2ae2dfbfab023df389",
[
@@ -803938,7 +804876,7 @@
]
],
"visibility-state.https.html": [
- "e9e8548c4f686bd55b56210f8b9dd94d5900f7fa",
+ "8ab18113fda4416f43dd878e6f49fa0f4065810b",
[
null,
{
@@ -803992,6 +804930,13 @@
]
]
},
+ "script-supports.https.html": [
+ "7446f2b6b5f2f8e1caecb09a9274abb1052c03bf",
+ [
+ null,
+ {}
+ ]
+ ],
"speculation-tags": {
"cross-site-prefetch.https.html": [
"b10aecf40350cf9849b6e36e577a29cd9100ee64",
@@ -804054,7 +804999,7 @@
]
],
"no-tags.https.html": [
- "176b3d20bb259e15692228266760ccd679c91429",
+ "088f0ba66b5177d0388777d472e3bf97895e9fd2",
[
null,
{
@@ -804131,14 +805076,14 @@
},
"speech-api": {
"SpeechRecognition-availableOnDevice.https.html": [
- "ace8edd91647dc0fb08d32353a68d4adde93f53f",
+ "fb4273f739219bd3083751461b7d6b86ebd0d62d",
[
null,
{}
]
],
"SpeechRecognition-basics.https.html": [
- "91cf8e6d3e54a64a6cac0cf776fa618b99966cbc",
+ "0fbc4aa842634aff10bdab20af3fed5d0e2ee71d",
[
null,
{}
@@ -804159,7 +805104,7 @@
]
],
"SpeechRecognition-installOnDevice.https.html": [
- "5f78fc8c9c17fffb544775f28c1bd11fb8ebba7c",
+ "52281f61b6c377bfdc12ec2cae02bff67d69d388",
[
null,
{
@@ -817632,14 +818577,23 @@
]
],
"script.https.html": [
- "783374db920a24ae32a3492d8cfe2edc5d8eb5d3",
+ "57b4d3e35823adbef985b403516a8c76bfe0e980",
[
null,
{
"timeout": "long"
}
]
- ]
+ ],
+ "tentative": {
+ "signature.https.html": [
+ "d54a6dfb7b0fade8dc9cb864ba0482aae41b487e",
+ [
+ null,
+ {}
+ ]
+ ]
+ }
},
"signatures": {
"tentative": {
@@ -819634,6 +820588,13 @@
{}
]
],
+ "svgpath-animation-2.tentative.html": [
+ "68114581172fdf83d0317e3be397a5a6cd0e5926",
+ [
+ null,
+ {}
+ ]
+ ],
"svgpointlist-animation-1.html": [
"a3340ba83a2a0f6846d0a9e7faa1c27dd49a1383",
[
@@ -822972,6 +823933,83 @@
{}
]
],
+ "script-enforcement-001-outerHTML.xhtml": [
+ "f8ce7fee89d90b6997bf31861a94f38fb42e2aee",
+ [
+ null,
+ {}
+ ]
+ ],
+ "script-enforcement-001.html": [
+ "9548987a22d67f952cb49ad472c28f5a37a21180",
+ [
+ null,
+ {}
+ ]
+ ],
+ "script-enforcement-002-outerHTML.xhtml": [
+ "79bb64852ce21caa271aff7917743c20ab23bb4b",
+ [
+ null,
+ {}
+ ]
+ ],
+ "script-enforcement-002.html": [
+ "ddbbc99ea6b3254dafe447af6aaef985587bd33a",
+ [
+ null,
+ {}
+ ]
+ ],
+ "script-enforcement-003.html": [
+ "9ad31b795bc36e1cc4b83c63220be2d3d1e2fee9",
+ [
+ null,
+ {}
+ ]
+ ],
+ "script-enforcement-004.html": [
+ "86e1020c3ad153a5fcbbbac2e3df6f65eb90e710",
+ [
+ null,
+ {}
+ ]
+ ],
+ "script-enforcement-005.html": [
+ "77b1e6b03c61fe891de0db817fd2e63e6789efdb",
+ [
+ null,
+ {}
+ ]
+ ],
+ "script-enforcement-006.html": [
+ "7673a686f4ec70376a50406f2f2518f51259962d",
+ [
+ null,
+ {}
+ ]
+ ],
+ "script-enforcement-007.html": [
+ "34d3831ab74006f7529e3a82855708db2b612187",
+ [
+ null,
+ {}
+ ]
+ ],
+ "script-enforcement-008.https.html": [
+ "86d9ec6985a5a248816a2b8c6e315e1cfcee732b",
+ [
+ null,
+ {}
+ ]
+ ],
+ "script-enforcement-009.https.html": [
+ "45f21b41eda59e913c01606a09e404ced613ec17",
+ [
+ null,
+ {}
+ ]
+ ],
"set-attributes-mutations-in-callback.tentative.html": [
"76ea84cf2543a11269983c871be09c8ec1fb18ea",
[
@@ -823310,6 +824348,13 @@
{}
]
],
+ "trusted-types-reporting-for-HTMLScriptElement-children-change.html": [
+ "c006bc2315fc7ef248be15d55cd492d6bb1b22cb",
+ [
+ null,
+ {}
+ ]
+ ],
"trusted-types-reporting-for-HTMLScriptElement-innerHTML.html": [
"edb7d674b2c766c62c7944cb06ad0a4f00054612",
[
@@ -823331,6 +824376,13 @@
{}
]
],
+ "trusted-types-reporting-for-SVGScriptElement-children-change.html": [
+ "c187971f7264e6e294cdf61424671f81c833a311",
+ [
+ null,
+ {}
+ ]
+ ],
"trusted-types-reporting-for-SVGScriptElement-innerHTML.html": [
"707c9d37a029e63d39834ac03fab8e8b26ead905",
[
@@ -823951,7 +825003,7 @@
]
],
"focus-management-expectations.html": [
- "1845c15d71679276b6fbf4a19188d111da5ea70b",
+ "65fe639e95849196fb6ef5cd05ece4ceccc0b704",
[
null,
{
@@ -839046,7 +840098,7 @@
]
],
"style-change-events.html": [
- "c64400e869df5e844e276facb7d975827027f68a",
+ "d1c1c96f7b03e8f8cd6596f1ae24772d292e77b4",
[
null,
{}
@@ -841554,7 +842606,7 @@
]
],
"audiobuffer.html": [
- "a2c4581c4e80069f227fe29078bc3eb6409c8b4e",
+ "115e8aff1ac246a26762e4805cb17fd02eb9924c",
[
null,
{}
@@ -854959,6 +856011,117 @@
}
]
],
+ "averagePool2d.https.any.js": [
+ "c112cd89c036a5961d8e6b55a35c3581651e168c",
+ [
+ "webnn/conformance_tests/averagePool2d.https.any.html?cpu",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "test WebNN API averagePool2d operation"
+ ],
+ [
+ "global",
+ "window"
+ ],
+ [
+ "variant",
+ "?cpu"
+ ],
+ [
+ "variant",
+ "?gpu"
+ ],
+ [
+ "variant",
+ "?npu"
+ ],
+ [
+ "script",
+ "../resources/utils.js"
+ ],
+ [
+ "timeout",
+ "long"
+ ]
+ ],
+ "timeout": "long"
+ }
+ ],
+ [
+ "webnn/conformance_tests/averagePool2d.https.any.html?gpu",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "test WebNN API averagePool2d operation"
+ ],
+ [
+ "global",
+ "window"
+ ],
+ [
+ "variant",
+ "?cpu"
+ ],
+ [
+ "variant",
+ "?gpu"
+ ],
+ [
+ "variant",
+ "?npu"
+ ],
+ [
+ "script",
+ "../resources/utils.js"
+ ],
+ [
+ "timeout",
+ "long"
+ ]
+ ],
+ "timeout": "long"
+ }
+ ],
+ [
+ "webnn/conformance_tests/averagePool2d.https.any.html?npu",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "test WebNN API averagePool2d operation"
+ ],
+ [
+ "global",
+ "window"
+ ],
+ [
+ "variant",
+ "?cpu"
+ ],
+ [
+ "variant",
+ "?gpu"
+ ],
+ [
+ "variant",
+ "?npu"
+ ],
+ [
+ "script",
+ "../resources/utils.js"
+ ],
+ [
+ "timeout",
+ "long"
+ ]
+ ],
+ "timeout": "long"
+ }
+ ]
+ ],
"batch_normalization.https.any.js": [
"1da85777342c9cead346f2cfd96eaf965544a088",
[
@@ -856886,7 +858049,7 @@
]
],
"equal.https.any.js": [
- "dc01aa19379465a4e9ea43cd0f621ab3613daef2",
+ "a974ec0004f1b9e7312dd03515dc2f49f7340681",
[
"webnn/conformance_tests/equal.https.any.html?cpu",
{
@@ -857995,8 +859158,119 @@
}
]
],
+ "graph_devices.https.any.js": [
+ "c380d810f36d2a0dc966058fd987d95ed0577345",
+ [
+ "webnn/conformance_tests/graph_devices.https.any.html?cpu",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "test graph.devices"
+ ],
+ [
+ "global",
+ "window"
+ ],
+ [
+ "variant",
+ "?cpu"
+ ],
+ [
+ "variant",
+ "?gpu"
+ ],
+ [
+ "variant",
+ "?npu"
+ ],
+ [
+ "script",
+ "../resources/utils.js"
+ ],
+ [
+ "timeout",
+ "long"
+ ]
+ ],
+ "timeout": "long"
+ }
+ ],
+ [
+ "webnn/conformance_tests/graph_devices.https.any.html?gpu",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "test graph.devices"
+ ],
+ [
+ "global",
+ "window"
+ ],
+ [
+ "variant",
+ "?cpu"
+ ],
+ [
+ "variant",
+ "?gpu"
+ ],
+ [
+ "variant",
+ "?npu"
+ ],
+ [
+ "script",
+ "../resources/utils.js"
+ ],
+ [
+ "timeout",
+ "long"
+ ]
+ ],
+ "timeout": "long"
+ }
+ ],
+ [
+ "webnn/conformance_tests/graph_devices.https.any.html?npu",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "test graph.devices"
+ ],
+ [
+ "global",
+ "window"
+ ],
+ [
+ "variant",
+ "?cpu"
+ ],
+ [
+ "variant",
+ "?gpu"
+ ],
+ [
+ "variant",
+ "?npu"
+ ],
+ [
+ "script",
+ "../resources/utils.js"
+ ],
+ [
+ "timeout",
+ "long"
+ ]
+ ],
+ "timeout": "long"
+ }
+ ]
+ ],
"greater.https.any.js": [
- "704e0c45776c96c426fa8a5921d978ada173de7e",
+ "21e8b07bd4788496eb3d5ddb28c9f05301aef44c",
[
"webnn/conformance_tests/greater.https.any.html?cpu",
{
@@ -858107,7 +859381,7 @@
]
],
"greater_or_equal.https.any.js": [
- "28a2e896027a5ced3d0f8971154b6abd988644f4",
+ "f9ab2d668147c4d8b9250dcb67f5b2d132ec1027",
[
"webnn/conformance_tests/greater_or_equal.https.any.html?cpu",
{
@@ -859753,6 +861027,117 @@
}
]
],
+ "l2Pool2d.https.any.js": [
+ "f0e16be927bd637fbebd4eb3a63a4fba237e0e8d",
+ [
+ "webnn/conformance_tests/l2Pool2d.https.any.html?cpu",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "test WebNN API l2Pool2d operation"
+ ],
+ [
+ "global",
+ "window"
+ ],
+ [
+ "variant",
+ "?cpu"
+ ],
+ [
+ "variant",
+ "?gpu"
+ ],
+ [
+ "variant",
+ "?npu"
+ ],
+ [
+ "script",
+ "../resources/utils.js"
+ ],
+ [
+ "timeout",
+ "long"
+ ]
+ ],
+ "timeout": "long"
+ }
+ ],
+ [
+ "webnn/conformance_tests/l2Pool2d.https.any.html?gpu",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "test WebNN API l2Pool2d operation"
+ ],
+ [
+ "global",
+ "window"
+ ],
+ [
+ "variant",
+ "?cpu"
+ ],
+ [
+ "variant",
+ "?gpu"
+ ],
+ [
+ "variant",
+ "?npu"
+ ],
+ [
+ "script",
+ "../resources/utils.js"
+ ],
+ [
+ "timeout",
+ "long"
+ ]
+ ],
+ "timeout": "long"
+ }
+ ],
+ [
+ "webnn/conformance_tests/l2Pool2d.https.any.html?npu",
+ {
+ "script_metadata": [
+ [
+ "title",
+ "test WebNN API l2Pool2d operation"
+ ],
+ [
+ "global",
+ "window"
+ ],
+ [
+ "variant",
+ "?cpu"
+ ],
+ [
+ "variant",
+ "?gpu"
+ ],
+ [
+ "variant",
+ "?npu"
+ ],
+ [
+ "script",
+ "../resources/utils.js"
+ ],
+ [
+ "timeout",
+ "long"
+ ]
+ ],
+ "timeout": "long"
+ }
+ ]
+ ],
"layer_normalization.https.any.js": [
"f22d0444cfa79285cc9860b7b5a75a7cdfb0f18e",
[
@@ -859976,7 +861361,7 @@
]
],
"lesser.https.any.js": [
- "0588f3bcd6a26b6d81f4027158334f8c2b4950a9",
+ "8978435c6e3298b980056c7e498a3ad20737a87a",
[
"webnn/conformance_tests/lesser.https.any.html?cpu",
{
@@ -860087,7 +861472,7 @@
]
],
"lesser_or_equal.https.any.js": [
- "cfcc74063ec34264ba990ee17fb1caad36c82529",
+ "16aa5888cc275e61869d1f5ab4e7eedc07a321c3",
[
"webnn/conformance_tests/lesser_or_equal.https.any.html?cpu",
{
@@ -860420,7 +861805,7 @@
]
],
"logical_and.https.any.js": [
- "a4d71654bcb4c42629935c7cbf4166be05605527",
+ "1a03ef5444de4d5a5005b3de5fc1fb88aee26b29",
[
"webnn/conformance_tests/logical_and.https.any.html?cpu",
{
@@ -860531,7 +861916,7 @@
]
],
"logical_not.https.any.js": [
- "9d1861dd548ec014367c1804cf71d7212d88ae61",
+ "f8949672cc5623a4f3810f32c3c50173a3623ba3",
[
"webnn/conformance_tests/logical_not.https.any.html?cpu",
{
@@ -860642,7 +862027,7 @@
]
],
"logical_or.https.any.js": [
- "f8941b633c90583e95744086bcb221d13c8e773e",
+ "83c261969f62f1c6ab5e78ebc5ac6aebde9fca6b",
[
"webnn/conformance_tests/logical_or.https.any.html?cpu",
{
@@ -860753,7 +862138,7 @@
]
],
"logical_xor.https.any.js": [
- "533d52aa6be38cb25c6c48cac3f92422ac1b27c0",
+ "7a9446ea2e4c6ab40dbc9976d6be404180e1d99b",
[
"webnn/conformance_tests/logical_xor.https.any.html?cpu",
{
@@ -861307,15 +862692,15 @@
}
]
],
- "min.https.any.js": [
- "5e324e412bf291b9973c6a5fb9594015a911c899",
+ "maxPool2d.https.any.js": [
+ "6ee8b1976d27b3a7418ccdf9fea56a7ee62e1052",
[
- "webnn/conformance_tests/min.https.any.html?cpu",
+ "webnn/conformance_tests/maxPool2d.https.any.html?cpu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise min operation"
+ "test WebNN API maxPool2d operation"
],
[
"global",
@@ -861346,12 +862731,12 @@
}
],
[
- "webnn/conformance_tests/min.https.any.html?gpu",
+ "webnn/conformance_tests/maxPool2d.https.any.html?gpu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise min operation"
+ "test WebNN API maxPool2d operation"
],
[
"global",
@@ -861382,12 +862767,12 @@
}
],
[
- "webnn/conformance_tests/min.https.any.html?npu",
+ "webnn/conformance_tests/maxPool2d.https.any.html?npu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise min operation"
+ "test WebNN API maxPool2d operation"
],
[
"global",
@@ -861418,15 +862803,15 @@
}
]
],
- "mul.https.any.js": [
- "277d3e2fa0d5e1005781ba400d4870c6459e6f6e",
+ "min.https.any.js": [
+ "5e324e412bf291b9973c6a5fb9594015a911c899",
[
- "webnn/conformance_tests/mul.https.any.html?cpu",
+ "webnn/conformance_tests/min.https.any.html?cpu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise mul operation"
+ "test WebNN API element-wise min operation"
],
[
"global",
@@ -861457,12 +862842,12 @@
}
],
[
- "webnn/conformance_tests/mul.https.any.html?gpu",
+ "webnn/conformance_tests/min.https.any.html?gpu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise mul operation"
+ "test WebNN API element-wise min operation"
],
[
"global",
@@ -861493,12 +862878,12 @@
}
],
[
- "webnn/conformance_tests/mul.https.any.html?npu",
+ "webnn/conformance_tests/min.https.any.html?npu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise mul operation"
+ "test WebNN API element-wise min operation"
],
[
"global",
@@ -861529,15 +862914,15 @@
}
]
],
- "neg.https.any.js": [
- "5c5045d355ef1a0f2e7abab561cf48e848189a59",
+ "mul.https.any.js": [
+ "277d3e2fa0d5e1005781ba400d4870c6459e6f6e",
[
- "webnn/conformance_tests/neg.https.any.html?cpu",
+ "webnn/conformance_tests/mul.https.any.html?cpu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise neg operation"
+ "test WebNN API element-wise mul operation"
],
[
"global",
@@ -861568,12 +862953,12 @@
}
],
[
- "webnn/conformance_tests/neg.https.any.html?gpu",
+ "webnn/conformance_tests/mul.https.any.html?gpu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise neg operation"
+ "test WebNN API element-wise mul operation"
],
[
"global",
@@ -861604,12 +862989,12 @@
}
],
[
- "webnn/conformance_tests/neg.https.any.html?npu",
+ "webnn/conformance_tests/mul.https.any.html?npu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise neg operation"
+ "test WebNN API element-wise mul operation"
],
[
"global",
@@ -861640,15 +863025,15 @@
}
]
],
- "not_equal.https.any.js": [
- "3bba726d58528c2bab5e37cf311c638a791b444c",
+ "neg.https.any.js": [
+ "5c5045d355ef1a0f2e7abab561cf48e848189a59",
[
- "webnn/conformance_tests/not_equal.https.any.html?cpu",
+ "webnn/conformance_tests/neg.https.any.html?cpu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise notEqual operation"
+ "test WebNN API element-wise neg operation"
],
[
"global",
@@ -861679,12 +863064,12 @@
}
],
[
- "webnn/conformance_tests/not_equal.https.any.html?gpu",
+ "webnn/conformance_tests/neg.https.any.html?gpu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise notEqual operation"
+ "test WebNN API element-wise neg operation"
],
[
"global",
@@ -861715,12 +863100,12 @@
}
],
[
- "webnn/conformance_tests/not_equal.https.any.html?npu",
+ "webnn/conformance_tests/neg.https.any.html?npu",
{
"script_metadata": [
[
"title",
- "test WebNN API element-wise notEqual operation"
+ "test WebNN API element-wise neg operation"
],
[
"global",
@@ -861751,15 +863136,15 @@
}
]
],
- "pad.https.any.js": [
- "c2ba0e45b8f56fd4e4f75f780780c94cc4838df7",
+ "not_equal.https.any.js": [
+ "5aed1247e06a6f7362bc90ba817c466d91ede332",
[
- "webnn/conformance_tests/pad.https.any.html?cpu",
+ "webnn/conformance_tests/not_equal.https.any.html?cpu",
{
"script_metadata": [
[
"title",
- "test WebNN API pad operation"
+ "test WebNN API element-wise notEqual operation"
],
[
"global",
@@ -861790,12 +863175,12 @@
}
],
[
- "webnn/conformance_tests/pad.https.any.html?gpu",
+ "webnn/conformance_tests/not_equal.https.any.html?gpu",
{
"script_metadata": [
[
"title",
- "test WebNN API pad operation"
+ "test WebNN API element-wise notEqual operation"
],
[
"global",
@@ -861826,12 +863211,12 @@
}
],
[
- "webnn/conformance_tests/pad.https.any.html?npu",
+ "webnn/conformance_tests/not_equal.https.any.html?npu",
{
"script_metadata": [
[
"title",
- "test WebNN API pad operation"
+ "test WebNN API element-wise notEqual operation"
],
[
"global",
@@ -861862,19 +863247,19 @@
}
]
],
- "parallel-dispatch.https.any.js": [
- "6ad4cd93d65d059790a8d82e2678eca54411846f",
+ "pad.https.any.js": [
+ "c2ba0e45b8f56fd4e4f75f780780c94cc4838df7",
[
- "webnn/conformance_tests/parallel-dispatch.https.any.html?cpu",
+ "webnn/conformance_tests/pad.https.any.html?cpu",
{
"script_metadata": [
[
"title",
- "test parallel WebNN API dispatch calls"
+ "test WebNN API pad operation"
],
[
"global",
- "window,worker"
+ "window"
],
[
"variant",
@@ -861901,16 +863286,16 @@
}
],
[
- "webnn/conformance_tests/parallel-dispatch.https.any.html?gpu",
+ "webnn/conformance_tests/pad.https.any.html?gpu",
{
"script_metadata": [
[
"title",
- "test parallel WebNN API dispatch calls"
+ "test WebNN API pad operation"
],
[
"global",
- "window,worker"
+ "window"
],
[
"variant",
@@ -861937,16 +863322,16 @@
}
],
[
- "webnn/conformance_tests/parallel-dispatch.https.any.html?npu",
+ "webnn/conformance_tests/pad.https.any.html?npu",
{
"script_metadata": [
[
"title",
- "test parallel WebNN API dispatch calls"
+ "test WebNN API pad operation"
],
[
"global",
- "window,worker"
+ "window"
],
[
"variant",
@@ -861971,9 +863356,12 @@
],
"timeout": "long"
}
- ],
+ ]
+ ],
+ "parallel-dispatch.https.any.js": [
+ "6ad4cd93d65d059790a8d82e2678eca54411846f",
[
- "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?cpu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.html?cpu",
{
"script_metadata": [
[
@@ -862009,7 +863397,7 @@
}
],
[
- "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?gpu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.html?gpu",
{
"script_metadata": [
[
@@ -862045,7 +863433,7 @@
}
],
[
- "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?npu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.html?npu",
{
"script_metadata": [
[
@@ -862081,7 +863469,7 @@
}
],
[
- "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?cpu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?cpu",
{
"script_metadata": [
[
@@ -862117,7 +863505,7 @@
}
],
[
- "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?gpu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?gpu",
{
"script_metadata": [
[
@@ -862153,7 +863541,7 @@
}
],
[
- "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?npu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.serviceworker.html?npu",
{
"script_metadata": [
[
@@ -862189,7 +863577,7 @@
}
],
[
- "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?cpu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?cpu",
{
"script_metadata": [
[
@@ -862225,7 +863613,7 @@
}
],
[
- "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?gpu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?gpu",
{
"script_metadata": [
[
@@ -862261,7 +863649,7 @@
}
],
[
- "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?npu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.sharedworker.html?npu",
{
"script_metadata": [
[
@@ -862295,21 +863683,18 @@
],
"timeout": "long"
}
- ]
- ],
- "pooling.https.any.js": [
- "8f81ff565d232dec427381dfdae638cffceb0d91",
+ ],
[
- "webnn/conformance_tests/pooling.https.any.html?cpu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?cpu",
{
"script_metadata": [
[
"title",
- "test WebNN API pooling operations"
+ "test parallel WebNN API dispatch calls"
],
[
"global",
- "window"
+ "window,worker"
],
[
"variant",
@@ -862336,16 +863721,16 @@
}
],
[
- "webnn/conformance_tests/pooling.https.any.html?gpu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?gpu",
{
"script_metadata": [
[
"title",
- "test WebNN API pooling operations"
+ "test parallel WebNN API dispatch calls"
],
[
"global",
- "window"
+ "window,worker"
],
[
"variant",
@@ -862372,16 +863757,16 @@
}
],
[
- "webnn/conformance_tests/pooling.https.any.html?npu",
+ "webnn/conformance_tests/parallel-dispatch.https.any.worker.html?npu",
{
"script_metadata": [
[
"title",
- "test WebNN API pooling operations"
+ "test parallel WebNN API dispatch calls"
],
[
"global",
- "window"
+ "window,worker"
],
[
"variant",
@@ -862631,7 +864016,7 @@
]
],
"qdq_subgraph.https.any.js": [
- "996a6b472c5689bc082388d5c267d2f5fe460080",
+ "a6155fb25ce36b2dbee504e87a20ece86713adbc",
[
"webnn/conformance_tests/qdq_subgraph.https.any.html?cpu",
{
@@ -885149,7 +886534,7 @@
]
],
"h264-unidirectional-codec-offer.https.html": [
- "708d59e52423dae56f05ca04f913938831ac3844",
+ "d5429fa80fa94bf9980e8d7e6ff6d29542f3d6a0",
[
null,
{}
@@ -885752,6 +887137,13 @@
]
],
"tentative": {
+ "RTCEncodedAudioFrame-audiolevel.html": [
+ "14b76efb575513237911af4c628590433b9d0529",
+ [
+ null,
+ {}
+ ]
+ ],
"RTCEncodedAudioFrame-clone.https.html": [
"c93f8b3e54150b94334c33f30031d0b9f3afcd19",
[
@@ -885762,7 +887154,7 @@
]
],
"RTCEncodedAudioFrame-metadata.https.html": [
- "1e148fe1b29a167e6451162125b7390151ec90bd",
+ "b9461940c639c523b89b6e9ed3c2222b4f64151f",
[
null,
{
@@ -929291,36 +930683,6 @@
]
]
},
- "text-autospace": {
- "text-autospace-dynamic-text-001.html": [
- "dfde20a265adbc64b38e198ebfbd45af27e3a68b",
- [
- null,
- {}
- ]
- ],
- "text-autospace-dynamic-text-002.html": [
- "ffc3d907ee573861326042fb17dd45273d520b29",
- [
- null,
- {}
- ]
- ],
- "text-autospace-dynamic-text-003.html": [
- "cf2237d48ef689b7ce36a358e38a267885ffd231",
- [
- null,
- {}
- ]
- ],
- "text-autospace-dynamic-text-004.html": [
- "c1057fc90053005487b7ba0a30b760bd04a70edf",
- [
- null,
- {}
- ]
- ]
- },
"text-justify": {
"text-justify-002.html": [
"91b6381e7c07f67554139d216180318fa676ccf9",
@@ -931232,7 +932594,7 @@
]
],
"invalid.py": [
- "9af6cdd5232244b46a3a3bc76ee4694c0704ba53",
+ "01a2ce1d083a188ade8cb0cdbe1e1f2f85d8d02d",
[
null,
{}
@@ -931454,7 +932816,7 @@
},
"fragment_navigated": {
"fragment_navigated.py": [
- "45a65cacdf03503325bc5357e6971e747a13d2fd",
+ "57680c5f630543cf9dafca9da2b7d494f1079591",
[
null,
{}
@@ -931516,7 +932878,7 @@
},
"history_updated": {
"history_updated.py": [
- "9fbb0f26c9e445663b509f6e304134e9ace0e147",
+ "6ad4bd22b326cd4f4003606c6b616fc20a93d56c",
[
null,
{}
@@ -933281,7 +934643,7 @@
]
],
"partition.py": [
- "bb171c6141165ce321b3cd72cd861a187d2b7c9b",
+ "8866771b80c95100ae391c2f3a52854ce7be538f",
[
null,
{}
@@ -933336,7 +934698,7 @@
},
"add_cookie": {
"add.py": [
- "60b67d051ba18cf5eba33c3672b78d9c8cc2fe5d",
+ "581040f7000a37448160ac0a1e333192b679c822",
[
null,
{}
diff --git a/tests/wpt/meta/css/css-gaps/flex/flex-gap-decorations-025.html.ini b/tests/wpt/meta/css/css-gaps/flex/flex-gap-decorations-025.html.ini
new file mode 100644
index 00000000000..f1d853cdbe7
--- /dev/null
+++ b/tests/wpt/meta/css/css-gaps/flex/flex-gap-decorations-025.html.ini
@@ -0,0 +1,2 @@
+[flex-gap-decorations-025.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-gaps/grid/grid-gap-decorations-046.html.ini b/tests/wpt/meta/css/css-gaps/grid/grid-gap-decorations-046.html.ini
new file mode 100644
index 00000000000..0715aa55256
--- /dev/null
+++ b/tests/wpt/meta/css/css-gaps/grid/grid-gap-decorations-046.html.ini
@@ -0,0 +1,2 @@
+[grid-gap-decorations-046.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html.ini b/tests/wpt/meta/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html.ini
deleted file mode 100644
index 8c0fc3310eb..00000000000
--- a/tests/wpt/meta/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[grid-auto-margin-and-replaced-item-001.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.html.ini
new file mode 100644
index 00000000000..3fcf256a571
--- /dev/null
+++ b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.html.ini
@@ -0,0 +1,2 @@
+[clip-path-shape-007.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.tentative.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.tentative.html.ini
deleted file mode 100644
index caf8b4fe457..00000000000
--- a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-007.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[clip-path-shape-007.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.html.ini
new file mode 100644
index 00000000000..581637b4e9e
--- /dev/null
+++ b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.html.ini
@@ -0,0 +1,2 @@
+[clip-path-shape-008.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.tentative.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.tentative.html.ini
deleted file mode 100644
index 6e684dbce1e..00000000000
--- a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-008.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[clip-path-shape-008.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.html.ini
new file mode 100644
index 00000000000..be619ed82c5
--- /dev/null
+++ b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.html.ini
@@ -0,0 +1,2 @@
+[clip-path-shape-009.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.tentative.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.tentative.html.ini
deleted file mode 100644
index 2d52b5fb3ca..00000000000
--- a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-009.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[clip-path-shape-009.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.html.ini
new file mode 100644
index 00000000000..d49fb65ffa7
--- /dev/null
+++ b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.html.ini
@@ -0,0 +1,2 @@
+[clip-path-shape-010.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.tentative.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.tentative.html.ini
deleted file mode 100644
index 753d107a87c..00000000000
--- a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-010.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[clip-path-shape-010.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html.ini
new file mode 100644
index 00000000000..1d74c790586
--- /dev/null
+++ b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html.ini
@@ -0,0 +1,2 @@
+[clip-path-shape-hline-vline-keywords.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html.ini b/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html.ini
deleted file mode 100644
index bb49bedc129..00000000000
--- a/tests/wpt/meta/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[clip-path-shape-hline-vline-keywords.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/overflow-rtl-scroll-left.html.ini b/tests/wpt/meta/css/css-overflow/overflow-rtl-scroll-left.html.ini
new file mode 100644
index 00000000000..020fa118688
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/overflow-rtl-scroll-left.html.ini
@@ -0,0 +1,3 @@
+[overflow-rtl-scroll-left.html]
+ [rtl scroll left should be 0 when overflow size is empty]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-computed.html.ini b/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-computed.html.ini
new file mode 100644
index 00000000000..df8e332e478
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-computed.html.ini
@@ -0,0 +1,24 @@
+[scroll-target-group-computed.html]
+ [Property scroll-target-group value 'initial']
+ expected: FAIL
+
+ [Property scroll-target-group value 'inherit']
+ expected: FAIL
+
+ [Property scroll-target-group value 'unset']
+ expected: FAIL
+
+ [Property scroll-target-group value 'revert']
+ expected: FAIL
+
+ [Property scroll-target-group value 'none']
+ expected: FAIL
+
+ [Property scroll-target-group value 'auto']
+ expected: FAIL
+
+ [The scroll-target-group property shows up in CSSStyleDeclaration enumeration]
+ expected: FAIL
+
+ [The scroll-target-group property shows up in CSSStyleDeclaration.cssText]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-valid.html.ini b/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-valid.html.ini
new file mode 100644
index 00000000000..de1dbce0388
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/parsing/parsing/scroll-target-group-valid.html.ini
@@ -0,0 +1,18 @@
+[scroll-target-group-valid.html]
+ [e.style['scroll-target-group'\] = "initial" should set the property value]
+ expected: FAIL
+
+ [e.style['scroll-target-group'\] = "inherit" should set the property value]
+ expected: FAIL
+
+ [e.style['scroll-target-group'\] = "unset" should set the property value]
+ expected: FAIL
+
+ [e.style['scroll-target-group'\] = "revert" should set the property value]
+ expected: FAIL
+
+ [e.style['scroll-target-group'\] = "none" should set the property value]
+ expected: FAIL
+
+ [e.style['scroll-target-group'\] = "auto" should set the property value]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-001.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-001.tentative.html.ini
deleted file mode 100644
index 0d5590a9293..00000000000
--- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-001.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scroll-marker-contain-001.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-002.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-002.tentative.html.ini
deleted file mode 100644
index fd0d2f5788e..00000000000
--- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-002.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scroll-marker-contain-002.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-003.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-003.tentative.html.ini
deleted file mode 100644
index 04e56713889..00000000000
--- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-003.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scroll-marker-contain-003.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-004.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-004.tentative.html.ini
deleted file mode 100644
index 908e3e40d04..00000000000
--- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-004.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scroll-marker-contain-004.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-005.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-005.tentative.html.ini
deleted file mode 100644
index 47c67ec0661..00000000000
--- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-005.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scroll-marker-contain-005.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-006.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-006.tentative.html.ini
deleted file mode 100644
index d23cf1f17aa..00000000000
--- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-006.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scroll-marker-contain-006.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-007.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-007.tentative.html.ini
deleted file mode 100644
index 8d4a789ac8c..00000000000
--- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-007.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scroll-marker-contain-007.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-009.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-009.tentative.html.ini
deleted file mode 100644
index 795e1770941..00000000000
--- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-009.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scroll-marker-contain-009.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-010.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-010.tentative.html.ini
deleted file mode 100644
index a753743341b..00000000000
--- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-010.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scroll-marker-contain-010.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-011.tentative.html.ini b/tests/wpt/meta/css/css-overflow/scroll-marker-contain-011.tentative.html.ini
deleted file mode 100644
index 79b26077e52..00000000000
--- a/tests/wpt/meta/css/css-overflow/scroll-marker-contain-011.tentative.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scroll-marker-contain-011.tentative.html]
- expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-001.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-001.html.ini
new file mode 100644
index 00000000000..126202f90c1
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-001.html.ini
@@ -0,0 +1,2 @@
+[scroll-target-group-001.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-002.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-002.html.ini
new file mode 100644
index 00000000000..0bc1a1e1913
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-002.html.ini
@@ -0,0 +1,2 @@
+[scroll-target-group-002.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-003.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-003.html.ini
new file mode 100644
index 00000000000..4ee994dd132
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-003.html.ini
@@ -0,0 +1,2 @@
+[scroll-target-group-003.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-004.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-004.html.ini
new file mode 100644
index 00000000000..bfd1c548d32
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-004.html.ini
@@ -0,0 +1,2 @@
+[scroll-target-group-004.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-005.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-005.html.ini
new file mode 100644
index 00000000000..c2a0549c59a
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-005.html.ini
@@ -0,0 +1,2 @@
+[scroll-target-group-005.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-006.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-006.html.ini
new file mode 100644
index 00000000000..31e579146fe
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-006.html.ini
@@ -0,0 +1,2 @@
+[scroll-target-group-006.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-007.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-007.html.ini
new file mode 100644
index 00000000000..0ae72f84178
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-007.html.ini
@@ -0,0 +1,2 @@
+[scroll-target-group-007.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-009.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-009.html.ini
new file mode 100644
index 00000000000..295993e8bd4
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-009.html.ini
@@ -0,0 +1,2 @@
+[scroll-target-group-009.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-010.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-010.html.ini
new file mode 100644
index 00000000000..7b71301d0fd
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-010.html.ini
@@ -0,0 +1,2 @@
+[scroll-target-group-010.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-overflow/scroll-target-group-011.html.ini b/tests/wpt/meta/css/css-overflow/scroll-target-group-011.html.ini
new file mode 100644
index 00000000000..b86415ac7bb
--- /dev/null
+++ b/tests/wpt/meta/css/css-overflow/scroll-target-group-011.html.ini
@@ -0,0 +1,2 @@
+[scroll-target-group-011.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-sizing/stretch/flex-line-002.html.ini b/tests/wpt/meta/css/css-sizing/stretch/flex-line-002.html.ini
new file mode 100644
index 00000000000..b1608595b34
--- /dev/null
+++ b/tests/wpt/meta/css/css-sizing/stretch/flex-line-002.html.ini
@@ -0,0 +1,3 @@
+[flex-line-002.html]
+ [.stretch 3]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-sizing/stretch/flex-line-003.html.ini b/tests/wpt/meta/css/css-sizing/stretch/flex-line-003.html.ini
new file mode 100644
index 00000000000..b640cf72b73
--- /dev/null
+++ b/tests/wpt/meta/css/css-sizing/stretch/flex-line-003.html.ini
@@ -0,0 +1,3 @@
+[flex-line-003.html]
+ [.stretch 3]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-sizing/stretch/flex-line-004.html.ini b/tests/wpt/meta/css/css-sizing/stretch/flex-line-004.html.ini
new file mode 100644
index 00000000000..978f6b96efe
--- /dev/null
+++ b/tests/wpt/meta/css/css-sizing/stretch/flex-line-004.html.ini
@@ -0,0 +1,3 @@
+[flex-line-004.html]
+ [.stretch 3]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-sizing/stretch/flex-line-005.html.ini b/tests/wpt/meta/css/css-sizing/stretch/flex-line-005.html.ini
new file mode 100644
index 00000000000..5f0b034f9f1
--- /dev/null
+++ b/tests/wpt/meta/css/css-sizing/stretch/flex-line-005.html.ini
@@ -0,0 +1,3 @@
+[flex-line-005.html]
+ [.stretch 1]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-text/parsing/text-autospace-computed.html.ini b/tests/wpt/meta/css/css-text/parsing/text-autospace-computed.html.ini
index 9b0fc900654..b39c17ebe88 100644
--- a/tests/wpt/meta/css/css-text/parsing/text-autospace-computed.html.ini
+++ b/tests/wpt/meta/css/css-text/parsing/text-autospace-computed.html.ini
@@ -13,3 +13,6 @@
[Property text-autospace value 'ideograph-numeric']
expected: FAIL
+
+ [Property text-autospace value 'initial']
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-text/parsing/text-spacing-computed.html.ini b/tests/wpt/meta/css/css-text/parsing/text-spacing-computed.html.ini
index 45a3efb1821..d22c112b80f 100644
--- a/tests/wpt/meta/css/css-text/parsing/text-spacing-computed.html.ini
+++ b/tests/wpt/meta/css/css-text/parsing/text-spacing-computed.html.ini
@@ -58,3 +58,6 @@
[Property text-spacing value 'trim-start no-autospace']
expected: FAIL
+
+ [Property text-spacing value 'initial']
+ expected: FAIL
diff --git a/tests/wpt/meta/css/css-text/text-autospace/text-autospace-zh-001.html.ini b/tests/wpt/meta/css/css-text/text-autospace/text-autospace-zh-001.html.ini
new file mode 100644
index 00000000000..4141ac378ef
--- /dev/null
+++ b/tests/wpt/meta/css/css-text/text-autospace/text-autospace-zh-001.html.ini
@@ -0,0 +1,2 @@
+[text-autospace-zh-001.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/cssom-view/idlharness.html.ini b/tests/wpt/meta/css/cssom-view/idlharness.html.ini
index 497db91deed..ad39324b4c6 100644
--- a/tests/wpt/meta/css/cssom-view/idlharness.html.ini
+++ b/tests/wpt/meta/css/cssom-view/idlharness.html.ini
@@ -595,3 +595,12 @@
[Document interface: calling caretPositionFromPoint(double, double, optional CaretPositionFromPointOptions) on document with too few arguments must throw TypeError]
expected: FAIL
+
+ [HTMLElement interface: attribute scrollParent]
+ expected: FAIL
+
+ [HTMLElement interface: document.createElement("div") must inherit property "scrollParent" with the proper type]
+ expected: FAIL
+
+ [HTMLElement interface: document.createElement("img") must inherit property "scrollParent" with the proper type]
+ expected: FAIL
diff --git a/tests/wpt/meta/css/filter-effects/css-backdrop-filter-transform-clip.html.ini b/tests/wpt/meta/css/filter-effects/css-backdrop-filter-transform-clip.html.ini
new file mode 100644
index 00000000000..0087a88ea29
--- /dev/null
+++ b/tests/wpt/meta/css/filter-effects/css-backdrop-filter-transform-clip.html.ini
@@ -0,0 +1,2 @@
+[css-backdrop-filter-transform-clip.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/meta/custom-elements/registries/idlharness.window.js.ini b/tests/wpt/meta/custom-elements/registries/idlharness.window.js.ini
deleted file mode 100644
index e033f991a62..00000000000
--- a/tests/wpt/meta/custom-elements/registries/idlharness.window.js.ini
+++ /dev/null
@@ -1,42 +0,0 @@
-[idlharness.window.html]
- [idl_test setup]
- expected: FAIL
-
- [idl_test validation]
- expected: FAIL
-
- [Partial interface CustomElementRegistry: member names are unique]
- expected: FAIL
-
- [Partial interface HTMLTemplateElement: member names are unique]
- expected: FAIL
-
- [Partial interface Element: member names are unique]
- expected: FAIL
-
- [Partial dictionary ShadowRootInit: member names are unique]
- expected: FAIL
-
- [Partial dictionary ElementCreationOptions: member names are unique]
- expected: FAIL
-
- [Document includes DocumentOrShadowRoot: member names are unique]
- expected: FAIL
-
- [ShadowRoot includes DocumentOrShadowRoot: member names are unique]
- expected: FAIL
-
- [HTMLTemplateElement interface: attribute shadowRootCustomElementRegistry]
- expected: FAIL
-
- [CustomElementRegistry interface: operation initialize(Node)]
- expected: FAIL
-
- [Document interface: attribute customElementRegistry]
- expected: FAIL
-
- [ShadowRoot interface: attribute customElementRegistry]
- expected: FAIL
-
- [Element interface: attribute customElementRegistry]
- expected: FAIL
diff --git a/tests/wpt/meta/custom-elements/registries/valid-custom-element-names.tentative.html.ini b/tests/wpt/meta/custom-elements/registries/valid-custom-element-names.tentative.html.ini
new file mode 100644
index 00000000000..f8ef4dcdfc4
--- /dev/null
+++ b/tests/wpt/meta/custom-elements/registries/valid-custom-element-names.tentative.html.ini
@@ -0,0 +1,3 @@
+[valid-custom-element-names.tentative.html]
+ [valid-custom-element-names]
+ expected: FAIL
diff --git a/tests/wpt/meta/dom/nodes/name-validation.tentative.html.ini b/tests/wpt/meta/dom/nodes/name-validation.tentative.html.ini
new file mode 100644
index 00000000000..1cb0619a479
--- /dev/null
+++ b/tests/wpt/meta/dom/nodes/name-validation.tentative.html.ini
@@ -0,0 +1,15 @@
+[name-validation.tentative.html]
+ [Valid and invalid characters in createElement.]
+ expected: FAIL
+
+ [Valid and invalid characters in createElementNS and createDocument.]
+ expected: FAIL
+
+ [Valid and invalid characters in setAttribute, toggleAttribute, and createAttribute.]
+ expected: FAIL
+
+ [Valid and invalid characters in setAttributeNS and createAttributeNS.]
+ expected: FAIL
+
+ [Valid and invalid characters in createDocumentType.]
+ expected: FAIL
diff --git a/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/max-payload.tentative.https.window.js.ini b/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/max-payload.tentative.https.window.js.ini
index 3efe794ff69..bf00ced2c77 100644
--- a/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/max-payload.tentative.https.window.js.ini
+++ b/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/max-payload.tentative.https.window.js.ini
@@ -4,10 +4,10 @@
expected: FAIL
[fetchLater() rejects max+1 payload in a parent-frame-origin POST request body of String in a default cross-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() accepts max payload in a self-frame-origin POST request body of String in a default cross-origin iframe.]
- expected: FAIL
+ expected: NOTRUN
[fetchLater() rejects max+1 payload in a self-frame-origin POST request body of String in a default cross-origin iframe.]
- expected: FAIL
+ expected: NOTRUN
diff --git a/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/oversized-payload.tentative.https.window.js.ini b/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/oversized-payload.tentative.https.window.js.ini
index 5aff34a1a85..c3269924c44 100644
--- a/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/oversized-payload.tentative.https.window.js.ini
+++ b/tests/wpt/meta/fetch/fetch-later/quota/cross-origin-iframe/oversized-payload.tentative.https.window.js.ini
@@ -1,19 +1,19 @@
[oversized-payload.tentative.https.window.html]
- expected: ERROR
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of String in a default cross-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of ArrayBuffer in a default cross-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of FormData in a default cross-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of URLSearchParams in a default cross-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of Blob in a default cross-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=8193\] exceeding per-origin quota in a POST request body of File in a default cross-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
diff --git a/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/max-payload.tentative.https.window.js.ini b/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/max-payload.tentative.https.window.js.ini
index 38b9ade3bf9..0e2ee3973ed 100644
--- a/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/max-payload.tentative.https.window.js.ini
+++ b/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/max-payload.tentative.https.window.js.ini
@@ -4,4 +4,4 @@
expected: FAIL
[fetchLater() rejects max+1 payload in a POST request body of String in same-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
diff --git a/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/oversized-payload.tentative.https.window.js.ini b/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/oversized-payload.tentative.https.window.js.ini
index 967a5e13445..edf97053c56 100644
--- a/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/oversized-payload.tentative.https.window.js.ini
+++ b/tests/wpt/meta/fetch/fetch-later/quota/same-origin-iframe/oversized-payload.tentative.https.window.js.ini
@@ -1,19 +1,19 @@
[oversized-payload.tentative.https.window.html]
- expected: ERROR
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of String in same-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of ArrayBuffer in same-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of FormData in same-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of URLSearchParams in same-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of Blob in same-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
[fetchLater() does not accept payload[size=65537\] exceeding per-origin quota in a POST request body of File in same-origin iframe.]
- expected: FAIL
+ expected: TIMEOUT
diff --git a/tests/wpt/meta/fetch/metadata/generated/css-font-face.sub.tentative.html.ini b/tests/wpt/meta/fetch/metadata/generated/css-font-face.sub.tentative.html.ini
index 2254c59cae9..af4a680bb7a 100644
--- a/tests/wpt/meta/fetch/metadata/generated/css-font-face.sub.tentative.html.ini
+++ b/tests/wpt/meta/fetch/metadata/generated/css-font-face.sub.tentative.html.ini
@@ -49,3 +49,6 @@
[sec-fetch-storage-access - Not sent to non-trustworthy cross-site destination]
expected: FAIL
+
+ [sec-fetch-storage-access - Not sent to non-trustworthy same-site destination]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/008.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/008.html.ini
new file mode 100644
index 00000000000..c253f779d78
--- /dev/null
+++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/008.html.ini
@@ -0,0 +1,3 @@
+[008.html]
+ [Link with onclick form submit to javascript url and href navigation ]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/009.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/009.html.ini
deleted file mode 100644
index 3fb21c9b2c6..00000000000
--- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/009.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[009.html]
- [Link with onclick form submit to javascript url with document.write and href navigation ]
- expected: FAIL
diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini
new file mode 100644
index 00000000000..3e07e6b7d1f
--- /dev/null
+++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini
@@ -0,0 +1,6 @@
+[empty-iframe-load-event.html]
+ [Check execution order from nested timeout]
+ expected: FAIL
+
+ [Check execution order on load handler]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-nosrc.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-nosrc.html.ini
index 6313c3e33dd..02a8e91ea04 100644
--- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-nosrc.html.ini
+++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-nosrc.html.ini
@@ -4,3 +4,6 @@
[link click]
expected: FAIL
+
+ [form submission]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html.ini
new file mode 100644
index 00000000000..d55bacae6b4
--- /dev/null
+++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html.ini
@@ -0,0 +1,3 @@
+[same-document-refresh.html]
+ [Same-Document Referrer from Refresh]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js.ini b/tests/wpt/meta/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js.ini
new file mode 100644
index 00000000000..b01db0541f9
--- /dev/null
+++ b/tests/wpt/meta/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js.ini
@@ -0,0 +1,59 @@
+[createImageBitmap-resolves-in-task.any.html]
+ [createImageBitmap with an HTMLCanvasElement source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with an HTMLVideoElement source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with an HTMLVideoElement from a data URL source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with a bitmap HTMLImageElement source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with a vector HTMLImageElement source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with a bitmap SVGImageElement source and invalid cropHeight should reject sync]
+ expected: FAIL
+
+ [createImageBitmap with a bitmap SVGImageElement source and invalid resizeHeight should reject sync]
+ expected: FAIL
+
+ [createImageBitmap with a bitmap SVGImageElement source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with a vector SVGImageElement source and invalid cropHeight should reject sync]
+ expected: FAIL
+
+ [createImageBitmap with a vector SVGImageElement source and invalid resizeHeight should reject sync]
+ expected: FAIL
+
+ [createImageBitmap with a vector SVGImageElement source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with an OffscreenCanvas source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with an ImageData source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with an ImageBitmap source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with a Blob source should resolve async]
+ expected: FAIL
+
+
+[createImageBitmap-resolves-in-task.any.worker.html]
+ [createImageBitmap with an OffscreenCanvas source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with an ImageData source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with an ImageBitmap source should resolve async]
+ expected: FAIL
+
+ [createImageBitmap with a Blob source should resolve async]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/canvas/element/manual/text/canvas.2d.disconnected.html.ini b/tests/wpt/meta/html/canvas/element/manual/text/canvas.2d.disconnected.html.ini
deleted file mode 100644
index 5cdcce07c65..00000000000
--- a/tests/wpt/meta/html/canvas/element/manual/text/canvas.2d.disconnected.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[canvas.2d.disconnected.html]
- expected: FAIL
diff --git a/tests/wpt/meta/html/dom/idlharness.https.html.ini b/tests/wpt/meta/html/dom/idlharness.https.html.ini
index ed387df6221..82ed190e10f 100644
--- a/tests/wpt/meta/html/dom/idlharness.https.html.ini
+++ b/tests/wpt/meta/html/dom/idlharness.https.html.ini
@@ -5237,6 +5237,12 @@
[CustomElementRegistry interface: operation initialize(Node)]
expected: FAIL
+ [ToggleEvent interface: attribute source]
+ expected: FAIL
+
+ [ToggleEvent interface: new ToggleEvent("beforetoggle") must inherit property "source" with the proper type]
+ expected: FAIL
+
[idlharness.https.html?include=HTML.+]
[HTMLAllCollection interface: existence and properties of interface object]
diff --git a/tests/wpt/meta/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini b/tests/wpt/meta/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini
index 23aa1d4fb99..c89473579b6 100644
--- a/tests/wpt/meta/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini
+++ b/tests/wpt/meta/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html.ini
@@ -4,3 +4,24 @@
[Disabling contenteditable]
expected: FAIL
+
+ [#button1]
+ expected: FAIL
+
+ [#button2]
+ expected: FAIL
+
+ [#button4]
+ expected: FAIL
+
+ [#button5]
+ expected: FAIL
+
+ [#div]
+ expected: FAIL
+
+ [#editable]
+ expected: FAIL
+
+ [#button6]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini b/tests/wpt/meta/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini
index 865b8601bae..d30d032e7b5 100644
--- a/tests/wpt/meta/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini
+++ b/tests/wpt/meta/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini
@@ -1,3 +1,4 @@
[update-the-rendering.html]
+ expected: TIMEOUT
["Flush autofocus candidates" should be happen before a scroll event and animation frame callbacks]
- expected: FAIL
+ expected: TIMEOUT
diff --git a/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html.ini
new file mode 100644
index 00000000000..b80a9096991
--- /dev/null
+++ b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html.ini
@@ -0,0 +1,2 @@
+[min-size-empty-001-ref.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html.ini
new file mode 100644
index 00000000000..976e37fe020
--- /dev/null
+++ b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html.ini
@@ -0,0 +1,2 @@
+[min-size-empty-001.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html.ini
new file mode 100644
index 00000000000..eba3bf68651
--- /dev/null
+++ b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html.ini
@@ -0,0 +1,2 @@
+[min-size-empty-002-ref.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html.ini b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html.ini
new file mode 100644
index 00000000000..8b0c16d052b
--- /dev/null
+++ b/tests/wpt/meta/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html.ini
@@ -0,0 +1,2 @@
+[min-size-empty-002.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini
index d7e7d1b9815..24903b5f66f 100644
--- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini
+++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini
@@ -1,4 +1,4 @@
[iframe_sandbox_popups_escaping-1.html]
- expected: CRASH
+ expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT
diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini
index e8872b3585b..bbc1f35d8d9 100644
--- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini
+++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini
@@ -1,4 +1,3 @@
[iframe_sandbox_popups_nonescaping-1.html]
- expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
- expected: NOTRUN
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini
index c6f1e5d7d84..4034793cc72 100644
--- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini
+++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini
@@ -1,4 +1,3 @@
[iframe_sandbox_popups_nonescaping-2.html]
- expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
- expected: NOTRUN
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html.ini
deleted file mode 100644
index 5c4c37fa7e1..00000000000
--- a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html.ini
+++ /dev/null
@@ -1,90 +0,0 @@
-[naturalWidth-naturalHeight-unavailable.tentative.html]
- [SVG image, no natural dimensions]
- expected: FAIL
-
- [SVG image, percengage natural dimensions]
- expected: FAIL
-
- [SVG image, negative percengage natural dimensions]
- expected: FAIL
-
- [SVG image, with natural width]
- expected: FAIL
-
- [SVG image, with natural height]
- expected: FAIL
-
- [SVG image, with natural width of 0]
- expected: FAIL
-
- [SVG image, with natural height of 0]
- expected: FAIL
-
- [SVG image, with natural width being negative]
- expected: FAIL
-
- [SVG image, with natural height being negative]
- expected: FAIL
-
- [SVG image, no natural dimensions, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, percengage natural dimensions, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, with natural width, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, with natural height, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, with natural width of 0, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, with natural height of 0, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, with natural width being negative, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, with natural height being negative, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, no natural dimensions, viewBox with 0 width/height]
- expected: FAIL
-
- [SVG image, no natural dimensions, viewBox with 0 width]
- expected: FAIL
-
- [SVG image, no natural dimensions, viewBox with 0 height]
- expected: FAIL
-
- [SVG image, with natural width, viewBox with 0 width/height]
- expected: FAIL
-
- [SVG image, with natural width, viewBox with 0 width]
- expected: FAIL
-
- [SVG image, with natural width, viewBox with 0 height]
- expected: FAIL
-
- [SVG image, with natural height, viewBox with 0 width/height]
- expected: FAIL
-
- [SVG image, with natural height, viewBox with 0 width]
- expected: FAIL
-
- [SVG image, with natural height, viewBox with 0 height]
- expected: FAIL
-
- [SVG image, with natural width and height, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, with natural width and height of 0, and aspect ratio from viewBox]
- expected: FAIL
-
- [SVG image, with natural width and height being negative, and aspect ratio from viewBox]
- expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html.ini
new file mode 100644
index 00000000000..cc6b4f3f186
--- /dev/null
+++ b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html.ini
@@ -0,0 +1,594 @@
+[naturalWidth-naturalHeight-width-height.tentative.html]
+ [raster image]
+ expected: FAIL
+
+ [raster image with width/height attributes]
+ expected: FAIL
+
+ [raster image with width/height attributes (when not rendered)]
+ expected: FAIL
+
+ [non existent image with width/height attributes, no natural dimensions]
+ expected: FAIL
+
+ [non existent image with width/height attributes, no natural dimensions (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions]
+ expected: FAIL
+
+ [SVG image, no natural dimensions (when not rendered)]
+ expected: FAIL
+
+ [SVG image with width/height attrs, no natural dimensions]
+ expected: FAIL
+
+ [SVG image with width/height attrs, no natural dimensions (when not rendered)]
+ expected: FAIL
+
+ [SVG image with width attr, no natural dimensions]
+ expected: FAIL
+
+ [SVG image with width attr, no natural dimensions (when not rendered)]
+ expected: FAIL
+
+ [SVG image with height attr, no natural dimensions]
+ expected: FAIL
+
+ [SVG image with height attr, no natural dimensions (when not rendered)]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions (when not rendered)]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width]
+ expected: FAIL
+
+ [SVG image, with natural width (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height]
+ expected: FAIL
+
+ [SVG image, with natural height (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width of 0]
+ expected: FAIL
+
+ [SVG image, with natural width of 0 (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height of 0]
+ expected: FAIL
+
+ [SVG image, with natural height of 0 (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width being negative]
+ expected: FAIL
+
+ [SVG image, with natural width being negative (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height being negative]
+ expected: FAIL
+
+ [SVG image, with natural height being negative (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, and aspect ratio from viewBox (when not rendered)]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions, and aspect ratio from viewBox (when not rendered)]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, with natural width, and aspect ratio from viewBox (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, with natural height, and aspect ratio from viewBox (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width of 0, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, with natural height of 0, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, with natural width being negative, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, with natural height being negative, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width/height]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width/height (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 height]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 height (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width/height]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width/height (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 height]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 height (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width/height]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width/height (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 height]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 height (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width and height]
+ expected: FAIL
+
+ [SVG image, with natural width and height, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, with natural width and height of 0, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [SVG image, with natural width and height being negative, and aspect ratio from viewBox]
+ expected: FAIL
+
+ [raster image (with srcset/1x)]
+ expected: FAIL
+
+ [raster image with width/height attributes (with srcset/1x)]
+ expected: FAIL
+
+ [raster image with width/height attributes (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [non existent image with width/height attributes, no natural dimensions (with srcset/1x)]
+ expected: FAIL
+
+ [non existent image with width/height attributes, no natural dimensions (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image with width/height attrs, no natural dimensions (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image with width/height attrs, no natural dimensions (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image with width attr, no natural dimensions (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image with width attr, no natural dimensions (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image with height attr, no natural dimensions (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image with height attr, no natural dimensions (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural height (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width of 0 (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width of 0 (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height of 0 (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural height of 0 (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width being negative (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width being negative (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height being negative (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural height being negative (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width, and aspect ratio from viewBox (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural height, and aspect ratio from viewBox (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width of 0, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural height of 0, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width being negative, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural height being negative, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 height (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 height (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width/height (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width/height (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 height (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 height (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width/height (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width/height (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 height (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 height (with srcset/1x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width and height (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width and height, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width and height of 0, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [SVG image, with natural width and height being negative, and aspect ratio from viewBox (with srcset/1x)]
+ expected: FAIL
+
+ [raster image (with srcset/2x)]
+ expected: FAIL
+
+ [raster image (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [raster image with width/height attributes (with srcset/2x)]
+ expected: FAIL
+
+ [raster image with width/height attributes (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [non existent image with width/height attributes, no natural dimensions (with srcset/2x)]
+ expected: FAIL
+
+ [non existent image with width/height attributes, no natural dimensions (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image with width/height attrs, no natural dimensions (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image with width/height attrs, no natural dimensions (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image with width attr, no natural dimensions (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image with width attr, no natural dimensions (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image with height attr, no natural dimensions (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image with height attr, no natural dimensions (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural height (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width of 0 (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width of 0 (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height of 0 (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural height of 0 (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width being negative (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width being negative (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height being negative (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural height being negative (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, and aspect ratio from viewBox (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, negative percengage natural dimensions, and aspect ratio from viewBox (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width, and aspect ratio from viewBox (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural height, and aspect ratio from viewBox (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width of 0, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural height of 0, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width being negative, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural height being negative, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width/height (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 width (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 height (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, no natural dimensions, viewBox with 0 height (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width/height (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width/height (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 width (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 height (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width, viewBox with 0 height (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width/height (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width/height (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 width (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 height (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural height, viewBox with 0 height (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width and height (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width and height (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width and height, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width and height, and aspect ratio from viewBox (with srcset/2x) (when not rendered)]
+ expected: FAIL
+
+ [SVG image, with natural width and height of 0, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
+
+ [SVG image, with natural width and height being negative, and aspect ratio from viewBox (with srcset/2x)]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html.ini
new file mode 100644
index 00000000000..577341577fb
--- /dev/null
+++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html.ini
@@ -0,0 +1,2 @@
+[icon-css-property-fill-reftest.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html.ini
new file mode 100644
index 00000000000..94aceea648d
--- /dev/null
+++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html.ini
@@ -0,0 +1,2 @@
+[icon-css-property-height-reftest.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html.ini
new file mode 100644
index 00000000000..615bf22a217
--- /dev/null
+++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html.ini
@@ -0,0 +1,2 @@
+[icon-css-property-margin-inline-end-reftest.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html.ini
new file mode 100644
index 00000000000..6b0153832a2
--- /dev/null
+++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html.ini
@@ -0,0 +1,2 @@
+[icon-css-property-min-height-reftest.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html.ini
new file mode 100644
index 00000000000..5055af39a9e
--- /dev/null
+++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html.ini
@@ -0,0 +1,2 @@
+[icon-css-property-stroke-reftest.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html.ini
new file mode 100644
index 00000000000..4c9fe9a31b2
--- /dev/null
+++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html.ini
@@ -0,0 +1,2 @@
+[icon-css-property-stroke-width-reftest.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html.ini b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html.ini
new file mode 100644
index 00000000000..f5f9a936120
--- /dev/null
+++ b/tests/wpt/meta/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html.ini
@@ -0,0 +1,2 @@
+[icon-different-for-precise-location-reftest.html]
+ expected: FAIL
diff --git a/tests/wpt/meta/html/semantics/popovers/popover-toggle-source.tentative.html.ini b/tests/wpt/meta/html/semantics/popovers/popover-toggle-source.html.ini
index 0792a3bfa23..50c2b92dac0 100644
--- a/tests/wpt/meta/html/semantics/popovers/popover-toggle-source.tentative.html.ini
+++ b/tests/wpt/meta/html/semantics/popovers/popover-toggle-source.html.ini
@@ -1,4 +1,4 @@
-[popover-toggle-source.tentative.html]
+[popover-toggle-source.html]
[ToggleEvent.source on popover elements: showPopover() without source.]
expected: FAIL
diff --git a/tests/wpt/meta/navigation-timing/test-navigation-type-reload.html.ini b/tests/wpt/meta/navigation-timing/test-navigation-type-reload.html.ini
index 484aa044de7..4c0e53577a5 100644
--- a/tests/wpt/meta/navigation-timing/test-navigation-type-reload.html.ini
+++ b/tests/wpt/meta/navigation-timing/test-navigation-type-reload.html.ini
@@ -7,24 +7,3 @@
[Reload navigationStart > Original navigationStart]
expected: FAIL
-
- [Reload domInteractive > Original domInteractive]
- expected: FAIL
-
- [Reload domContentLoadedEventStart > Original domContentLoadedEventStart]
- expected: FAIL
-
- [Reload fetchStart > Original fetchStart]
- expected: FAIL
-
- [Reload domComplete > Original domComplete]
- expected: FAIL
-
- [Reload domContentLoadedEventEnd > Original domContentLoadedEventEnd]
- expected: FAIL
-
- [Reload loadEventEnd > Original loadEventEnd]
- expected: FAIL
-
- [Reload loadEventStart > Original loadEventStart]
- expected: FAIL
diff --git a/tests/wpt/meta/preload/preload-error.sub.html.ini b/tests/wpt/meta/preload/preload-error.sub.html.ini
index f383c31f2fd..a1e25cb7fcd 100644
--- a/tests/wpt/meta/preload/preload-error.sub.html.ini
+++ b/tests/wpt/meta/preload/preload-error.sub.html.ini
@@ -80,8 +80,5 @@
[404 (xhr): main]
expected: FAIL
- [CORS (xhr): main]
- expected: FAIL
-
[Decode-error (style): main]
expected: FAIL
diff --git a/tests/wpt/meta/resource-timing/idlharness.any.js.ini b/tests/wpt/meta/resource-timing/idlharness.any.js.ini
index 1b04db72e66..017a702e581 100644
--- a/tests/wpt/meta/resource-timing/idlharness.any.js.ini
+++ b/tests/wpt/meta/resource-timing/idlharness.any.js.ini
@@ -44,6 +44,12 @@
[PerformanceResourceTiming interface: resource must inherit property "finalResponseHeadersStart" with the proper type]
expected: FAIL
+ [PerformanceResourceTiming interface: attribute contentEncoding]
+ expected: FAIL
+
+ [PerformanceResourceTiming interface: resource must inherit property "contentEncoding" with the proper type]
+ expected: FAIL
+
[idlharness.any.worker.html]
[PerformanceResourceTiming interface: attribute workerStart]
@@ -90,3 +96,9 @@
[PerformanceResourceTiming interface: resource must inherit property "finalResponseHeadersStart" with the proper type]
expected: FAIL
+
+ [PerformanceResourceTiming interface: attribute contentEncoding]
+ expected: FAIL
+
+ [PerformanceResourceTiming interface: resource must inherit property "contentEncoding" with the proper type]
+ expected: FAIL
diff --git a/tests/wpt/meta/service-workers/service-worker/add-routes.https.html.ini b/tests/wpt/meta/service-workers/service-worker/add-routes.https.html.ini
new file mode 100644
index 00000000000..cc5bc5d7bcf
--- /dev/null
+++ b/tests/wpt/meta/service-workers/service-worker/add-routes.https.html.ini
@@ -0,0 +1,3 @@
+[add-routes.https.html]
+ [addRoutes() will not be executed outside of installing]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-001-outerHTML.xhtml.ini b/tests/wpt/meta/trusted-types/script-enforcement-001-outerHTML.xhtml.ini
new file mode 100644
index 00000000000..0c970ccf01d
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-001-outerHTML.xhtml.ini
@@ -0,0 +1,3 @@
+[script-enforcement-001-outerHTML.xhtml]
+ [Script source set via TrustedHTML sink Element.outerHTML drops trustworthiness.]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-001.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-001.html.ini
new file mode 100644
index 00000000000..2197bfc82f4
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-001.html.ini
@@ -0,0 +1,78 @@
+[script-enforcement-001.html]
+ [Script source set via TrustedHTML sink Element.innerHTML drops trustworthiness.]
+ expected: FAIL
+
+ [Script source set via TrustedHTML sink Element.setHTMLUnsafe() drops trustworthiness.]
+ expected: FAIL
+
+ [Script source set via Node.nodeValue drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via CharacterData.data drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via CharacterData.appendData() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via CharacterData.insertData() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via CharacterData.replaceData() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via CharacterData.deleteData() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via CharacterData.before() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via CharacterData.after() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via CharacterData.remove() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via CharacterData.replaceWith() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Node.appendChild() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Node.insertBefore() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Node.replaceChild() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Node.removeChild() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Element.prepend() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Element.append() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Element.replaceChildren() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Element.moveBefore() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via TrustedHTML sink Node.insertAdjacentHTML() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Node.insertAdjacentText() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Range.insertNode() drops trustworthiness.]
+ expected: FAIL
+
+ [Setting script source via Range.deleteContents() drops trustworthiness.]
+ expected: FAIL
+
+ [Cloning a script via Node.cloneNode() drops trustworthiness.]
+ expected: FAIL
+
+ [Cloning a script via Range.cloneContents() drops trustworthiness.]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-002-outerHTML.xhtml.ini b/tests/wpt/meta/trusted-types/script-enforcement-002-outerHTML.xhtml.ini
new file mode 100644
index 00000000000..1ef88f7b5b8
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-002-outerHTML.xhtml.ini
@@ -0,0 +1,3 @@
+[script-enforcement-002-outerHTML.xhtml]
+ [Default policy's calls when setting script source via Element.outerHTML.]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-002.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-002.html.ini
new file mode 100644
index 00000000000..41e7738ccf6
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-002.html.ini
@@ -0,0 +1,78 @@
+[script-enforcement-002.html]
+ [Default policy's calls when setting script source via Element.innerHTML.]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.setHTMLUnsafe().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.nodeValue.]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.data.]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.appendData().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.insertData().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.replaceData().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.deleteData().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.before().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.after().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.remove().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.replaceWith().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.appendChild().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.insertBefore().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.replaceChild().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.removeChild().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.prepend().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.append().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.replaceChildren().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.moveBefore().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.insertAdjacentText().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.insertAdjacentHTML().]
+ expected: FAIL
+
+ [Default policy's calls when setting source via Range.insertNode().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Range.deleteContents().]
+ expected: FAIL
+
+ [Default policy's calls when cloning a script via Node.cloneNode().]
+ expected: FAIL
+
+ [Default policy's calls when cloning a script via Range.cloneContents().]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-003.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-003.html.ini
new file mode 100644
index 00000000000..bba588f2494
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-003.html.ini
@@ -0,0 +1,16 @@
+[script-enforcement-003.html]
+ expected: ERROR
+ [The SVGScriptElement is initially trusted.]
+ expected: FAIL
+
+ [Script source set via Element.textContent drops trustworthiness.]
+ expected: FAIL
+
+ [Script source set via TrustedHTML sink Element.innerHTML drops trustworthiness.]
+ expected: FAIL
+
+ [Script source set via TrustedHTML sink Element.outerHTML drops trustworthiness.]
+ expected: FAIL
+
+ [Script source set via TrustedHTML sink Element.setHTMLUnsafe() drops trustworthiness.]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-004.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-004.html.ini
new file mode 100644
index 00000000000..4c417f4458c
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-004.html.ini
@@ -0,0 +1,90 @@
+[script-enforcement-004.html]
+ [Default policy's calls when setting script source via SVGScriptElement.textContent.]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.innerHTML.]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.outerHTML.]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.setHTMLUnsafe().]
+ expected: FAIL
+
+ [Default policy when splitting script source via Text.splitText().]
+ expected: FAIL
+
+ [Default policy when normalizing script source via Element.normalize().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.nodeValue.]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.data.]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.appendData().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.insertData().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.replaceData().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.deleteData().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.before().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.after().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.remove().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via CharacterData.replaceWith().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.appendChild().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.insertBefore().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.replaceChild().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.removeChild().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.prepend().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.append().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.replaceChildren().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Element.moveBefore().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.insertAdjacentText().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Node.insertAdjacentHTML().]
+ expected: FAIL
+
+ [Default policy's calls when setting source via Range.insertNode().]
+ expected: FAIL
+
+ [Default policy's calls when setting script source via Range.deleteContents().]
+ expected: FAIL
+
+ [Default policy's calls when cloning a script via Node.cloneNode().]
+ expected: FAIL
+
+ [Default policy's calls when cloning a script via Range.cloneContents().]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-005.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-005.html.ini
new file mode 100644
index 00000000000..f727541ba68
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-005.html.ini
@@ -0,0 +1,12 @@
+[script-enforcement-005.html]
+ [Empty HTMLScriptElement is executed if the default policy makes it non-empty.]
+ expected: FAIL
+
+ [Non-empty HTMLScriptElement is not executed if the default policy makes it empty.]
+ expected: FAIL
+
+ [Empty SVGScriptElement is executed if the default policy makes it non-empty.]
+ expected: FAIL
+
+ [Non-empty SVGScriptElement is not executed if the default policy makes it empty.]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-006.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-006.html.ini
new file mode 100644
index 00000000000..7c5a0f69776
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-006.html.ini
@@ -0,0 +1,10 @@
+[script-enforcement-006.html]
+ expected: ERROR
+ [Untrusted HTMLScriptElement with classic type uses the source text returned by the default policy.]
+ expected: FAIL
+
+ [Untrusted HTMLScriptElement of importmap type uses the source text returned by the default policy.]
+ expected: FAIL
+
+ [Untrusted HTMLScriptElement of module type uses the source text returned by the default policy.]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-007.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-007.html.ini
new file mode 100644
index 00000000000..17441bdba75
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-007.html.ini
@@ -0,0 +1,9 @@
+[script-enforcement-007.html]
+ [Untrusted SVGScriptElement with classic type uses the source text returned by the default policy.]
+ expected: FAIL
+
+ [Untrusted SVGScriptElement of importmap type uses the source text returned by the default policy.]
+ expected: FAIL
+
+ [Untrusted SVGScriptElement of module type uses the source text returned by the default policy.]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-008.https.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-008.https.html.ini
new file mode 100644
index 00000000000..d5038450204
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-008.https.html.ini
@@ -0,0 +1,12 @@
+[script-enforcement-008.https.html]
+ [script-src CSP directive is properly set.]
+ expected: FAIL
+
+ [Untrusted HTMLScriptElement with classic type uses the source text returned by the default policy for inline CSP check.]
+ expected: FAIL
+
+ [Untrusted HTMLScriptElement of importmap type uses the source text returned by the default policy for inline CSP check.]
+ expected: FAIL
+
+ [Untrusted HTMLScriptElement of module type uses the source text returned by the default policy for inline CSP check.]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/script-enforcement-009.https.html.ini b/tests/wpt/meta/trusted-types/script-enforcement-009.https.html.ini
new file mode 100644
index 00000000000..8f1e100dc66
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/script-enforcement-009.https.html.ini
@@ -0,0 +1,12 @@
+[script-enforcement-009.https.html]
+ [script-src CSP directive is properly set.]
+ expected: FAIL
+
+ [Untrusted SVGScriptElement with classic type uses the source text returned by the default policy for inline CSP check.]
+ expected: FAIL
+
+ [Untrusted SVGScriptElement of importmap type uses the source text returned by the default policy for inline CSP check.]
+ expected: FAIL
+
+ [Untrusted SVGScriptElement of module type uses the source text returned by the default policy for inline CSP check.]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html.ini b/tests/wpt/meta/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html.ini
new file mode 100644
index 00000000000..83853cd4511
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html.ini
@@ -0,0 +1,3 @@
+[trusted-types-reporting-for-HTMLScriptElement-children-change.html]
+ [sink mismatch violation report when the script text is changed by manipulating its children.]
+ expected: FAIL
diff --git a/tests/wpt/meta/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html.ini b/tests/wpt/meta/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html.ini
new file mode 100644
index 00000000000..0bb7b27f96d
--- /dev/null
+++ b/tests/wpt/meta/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html.ini
@@ -0,0 +1,6 @@
+[trusted-types-reporting-for-SVGScriptElement-children-change.html]
+ [sink mismatch violation report when the script text is changed by manipulating its children.]
+ expected: FAIL
+
+ [inline check violation report when the script text is changed by manipulating its children.]
+ expected: FAIL
diff --git a/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini b/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini
index 5d66c9ba352..9cb03196441 100644
--- a/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini
+++ b/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini
@@ -814,3 +814,12 @@
[X SNR (-9.749670615505378 dB) is not greater than or equal to 65.737. Got -9.749670615505378.]
expected: FAIL
+
+ [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[14650\]\t-1.5940678073099677e-36\t8.6956524848937988e-1\t8.6956524848937988e-1\t1.0000000000000000e+0\t3.8985999999999999e-3\n\t[14651\]\t3.0547976493835449e-1\t8.9879405498504639e-1\t5.9331429004669189e-1\t6.6012262403823208e-1\t3.8985999999999999e-3\n\tMax AbsError of 8.6956524848937988e-1 at index of 14650.\n\tMax RelError of 1.0000000000000000e+0 at index of 14650.\n]
+ expected: FAIL
+
+ [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[14650\]\t-2.9404888000000000e+7\t8.6956524848937988e-1\t2.9404888869565248e+7\t3.3815620990659192e+7\t3.8985999999999999e-3\n\t[14651\]\t3.0547976493835449e-1\t8.9879405498504639e-1\t5.9331429004669189e-1\t6.6012262403823208e-1\t3.8985999999999999e-3\n\tMax AbsError of 2.9404888869565248e+7 at index of 14650.\n\tMax RelError of 3.3815620990659192e+7 at index of 14650.\n]
+ expected: FAIL
+
+ [X SNR (-105.9343049040375 dB) is not greater than or equal to 65.737. Got -105.9343049040375.]
+ expected: FAIL
diff --git a/tests/wpt/tests/.github/workflows/docker.yml b/tests/wpt/tests/.github/workflows/docker.yml
index 06704fff106..12b5adc7ee9 100644
--- a/tests/wpt/tests/.github/workflows/docker.yml
+++ b/tests/wpt/tests/.github/workflows/docker.yml
@@ -40,7 +40,7 @@ jobs:
latest
type=raw,value=${{ inputs.tag }}
- name: Build and push the Docker image
- uses: docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0 # v6.17.0
+ uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: ./tools/docker
push: true
diff --git a/tests/wpt/tests/.github/workflows/pull_request_test_jobs.yml b/tests/wpt/tests/.github/workflows/pull_request_test_jobs.yml
new file mode 100644
index 00000000000..4a4f623e84b
--- /dev/null
+++ b/tests/wpt/tests/.github/workflows/pull_request_test_jobs.yml
@@ -0,0 +1,59 @@
+name: "test-jobs"
+on:
+ pull_request:
+
+jobs:
+ decision:
+ name: ./wpt test-jobs
+ runs-on: ubuntu-24.04
+ outputs:
+ test_jobs: ${{ steps.test_jobs.outputs.test_jobs }}
+ steps:
+ - name: checkout
+ uses: actions/checkout@v4.1.0
+ with:
+ fetch-depth: 2
+ - name: ./wpt test-jobs
+ id: test_jobs
+ run: |
+ set -eux
+ echo "test_jobs=$( ./wpt test-jobs --json HEAD^1..HEAD )" >> $GITHUB_OUTPUT
+
+ affected_safari_preview:
+ name: "affected tests: Safari Technology Preview"
+ needs: decision
+ if: contains(fromJSON(needs.decision.outputs.test_jobs), 'affected_tests')
+ uses: ./.github/workflows/safari-wptrunner.yml
+ with:
+ artifact-name: "safari-preview-affected-tests"
+ safari-technology-preview: true
+ safaridriver-diagnose: false
+ fetch-depth: 2
+ extra-options: "--affected ${{ github.sha }}^1"
+
+ affected_without_changes_safari_preview:
+ name: "affected tests without changes: Safari Technology Preview"
+ needs: decision
+ if: contains(fromJSON(needs.decision.outputs.test_jobs), 'affected_tests')
+ uses: ./.github/workflows/safari-wptrunner.yml
+ with:
+ artifact-name: safari-preview-affected-tests-without-changes
+ safari-technology-preview: true
+ safaridriver-diagnose: false
+ fetch-depth: 2
+ test-rev: "HEAD^1"
+ extra-options: "--affected ${{ github.sha }}"
+
+ infrastructure_mac:
+ name: "infrastructure/ tests: macOS"
+ needs: decision
+ if: contains(fromJSON(needs.decision.outputs.test_jobs), 'wptrunner_infrastructure')
+ uses: ./.github/workflows/safari-wptrunner.yml
+ with:
+ artifact-name: safari-infrastructure-results
+ safari-technology-preview: true
+ safaridriver-diagnose: false
+ extra-options: >-
+ --manifest MANIFEST.json
+ --metadata infrastructure/metadata/
+ --include infrastructure/
diff --git a/tests/wpt/tests/.github/workflows/safari-wptrunner.yml b/tests/wpt/tests/.github/workflows/safari-wptrunner.yml
index 9cfc8a7eeeb..d90414d5241 100644
--- a/tests/wpt/tests/.github/workflows/safari-wptrunner.yml
+++ b/tests/wpt/tests/.github/workflows/safari-wptrunner.yml
@@ -15,6 +15,26 @@ on:
description: "Run safaridriver capturing diagnostics"
required: true
type: boolean
+ fetch-ref:
+ description: "The ref to fetch and initially checkout"
+ required: false
+ type: string
+ fetch-depth:
+ description: "The fetch-depth to checkout"
+ required: false
+ type: number
+ test-rev:
+ description: "The rev to checkout before running the tests"
+ required: false
+ type: string
+ matrix-include:
+ description: "Extra items to include in the matrix, to override test-type/current-chunk/total-chunks"
+ required: false
+ type: string
+ extra-options:
+ description: "Extra options to pass to wpt run"
+ required: false
+ type: string
# We never interact with the GitHub API, thus we can simply disable all
# permissions the GitHub token would have.
@@ -29,13 +49,23 @@ jobs:
timeout-minutes: 180
strategy:
matrix:
- current-chunk: [1, 2, 3, 4, 5, 6, 7, 8]
- total-chunks: [8]
+ current-chunk:
+ - 1
+ total-chunks:
+ - 1
+ include: ${{ fromJSON(inputs.matrix-include || '[]') }}
steps:
- name: checkout
uses: actions/checkout@v4.1.0
with:
- fetch-depth: 1
+ fetch-depth: ${{ inputs.fetch-depth || 1 }}
+ ref: ${{ inputs.fetch-ref }}
+ - name: test-checkout
+ if: inputs.test-rev
+ env:
+ REV: ${{ inputs.test-rev }}
+ run: |-
+ git switch --force --progress -d "$REV"
- name: Set display color profile
run: |-
./wpt macos-color-profile
@@ -71,8 +101,9 @@ jobs:
--no-manifest-update \
--no-restart-on-unexpected \
--no-fail-on-unexpected \
- --this-chunk=${{ matrix.current-chunk }} \
- --total-chunks=${{ matrix.total-chunks }} \
+ --no-pause \
+ --this-chunk ${{ matrix.current-chunk }} \
+ --total-chunks ${{ matrix.total-chunks }} \
--chunk-type hash \
--log-wptreport ${{ runner.temp }}/wpt_report_${{ matrix.current-chunk }}.json \
--log-wptscreenshot ${{ runner.temp }}/wpt_screenshot_${{ matrix.current-chunk }}.txt \
@@ -81,6 +112,8 @@ jobs:
--channel ${{ inputs.safari-technology-preview && 'preview' || 'stable' }} \
--kill-safari \
--max-restarts 100 \
+ ${{ inputs.extra-options }} \
+ -- \
safari
- name: Publish results
uses: actions/upload-artifact@v4.1.0
@@ -105,8 +138,8 @@ jobs:
- name: Cleanup
if: always()
run: |-
- set -ux
- sudo sed -i '' '/^# Start web-platform-tests hosts$/,/^# End web-platform-tests hosts$/d' /etc/hosts
+ set -ux
+ sudo sed -i '' '/^# Start web-platform-tests hosts$/,/^# End web-platform-tests hosts$/d' /etc/hosts
safari-notify:
needs: safari-results
diff --git a/tests/wpt/tests/.github/workflows/safari_stable.yml b/tests/wpt/tests/.github/workflows/safari_stable.yml
index 7c344fe667f..4c2acce5c27 100644
--- a/tests/wpt/tests/.github/workflows/safari_stable.yml
+++ b/tests/wpt/tests/.github/workflows/safari_stable.yml
@@ -7,7 +7,8 @@ permissions: {}
on:
workflow_dispatch:
workflow_run:
- workflows: [epochs]
+ workflows:
+ - epochs
types:
- completed
push:
@@ -34,3 +35,12 @@ jobs:
artifact-name: "safari-results"
safari-technology-preview: false
safaridriver-diagnose: false
+ matrix-include: >-
+ [{"current-chunk": 1, "total-chunks": 8},
+ {"current-chunk": 2, "total-chunks": 8},
+ {"current-chunk": 3, "total-chunks": 8},
+ {"current-chunk": 4, "total-chunks": 8},
+ {"current-chunk": 5, "total-chunks": 8},
+ {"current-chunk": 6, "total-chunks": 8},
+ {"current-chunk": 7, "total-chunks": 8},
+ {"current-chunk": 8, "total-chunks": 8}]
diff --git a/tests/wpt/tests/.github/workflows/safari_technology_preview.yml b/tests/wpt/tests/.github/workflows/safari_technology_preview.yml
index 70827a365ac..e2f4c64f460 100644
--- a/tests/wpt/tests/.github/workflows/safari_technology_preview.yml
+++ b/tests/wpt/tests/.github/workflows/safari_technology_preview.yml
@@ -7,7 +7,8 @@ permissions: {}
on:
workflow_dispatch:
workflow_run:
- workflows: [epochs]
+ workflows:
+ - epochs
types:
- completed
push:
@@ -34,3 +35,12 @@ jobs:
artifact-name: "safari-technology-preview-results"
safari-technology-preview: true
safaridriver-diagnose: false
+ matrix-include: >-
+ [{"current-chunk": 1, "total-chunks": 8},
+ {"current-chunk": 2, "total-chunks": 8},
+ {"current-chunk": 3, "total-chunks": 8},
+ {"current-chunk": 4, "total-chunks": 8},
+ {"current-chunk": 5, "total-chunks": 8},
+ {"current-chunk": 6, "total-chunks": 8},
+ {"current-chunk": 7, "total-chunks": 8},
+ {"current-chunk": 8, "total-chunks": 8}]
diff --git a/tests/wpt/tests/ai/language_detection/detector-locale.https.window.js b/tests/wpt/tests/ai/language_detection/detector-locale.https.window.js
index 80cbfa485e3..1e2efd11c62 100644
--- a/tests/wpt/tests/ai/language_detection/detector-locale.https.window.js
+++ b/tests/wpt/tests/ai/language_detection/detector-locale.https.window.js
@@ -1,4 +1,4 @@
-// META: title=Detect english
+// META: title=LanguageDetector locale tests
// META: global=window
// META: timeout=long
// META: script=resources/util.js
@@ -12,23 +12,6 @@ function getAvailability(expectedInputLanguages) {
return LanguageDetector.availability({expectedInputLanguages});
}
-function assert_availability_consistent(
- language_subtag_availability, base_availability) {
- if (base_availability == 'unavailable') {
- // If the language subtag is not available then no variation of it should
- // be available.
- assert_equals(language_subtag_availability, 'unavailable');
- } else {
- // If the language subtag is available, then it definitely shouldn't be
- // unavailable since whatever backing it has could support any variation of
- // it. A variation could have a different availability if a more specific
- // backing is required.
- assert_in_array(
- language_subtag_availability,
- ['downloadable', 'downloading', 'available']);
- }
-}
-
promise_test(async t => {
for (const [languageSubtag, variations] of Object.entries(
valid_language_tags)) {
diff --git a/tests/wpt/tests/ai/language_detection/detector.https.window.js b/tests/wpt/tests/ai/language_detection/detector.https.window.js
index 379b8741534..ae21b463538 100644
--- a/tests/wpt/tests/ai/language_detection/detector.https.window.js
+++ b/tests/wpt/tests/ai/language_detection/detector.https.window.js
@@ -66,16 +66,7 @@ promise_test(async t => {
}, 'LanguageDetector.detect() returns valid results');
promise_test(async t => {
- const error = new Error('CreateMonitorCallback threw an error');
- function monitor(m) {
- m.addEventListener('downloadprogress', e => {
- assert_unreached(
- 'This should never be reached since monitor throws an error.');
- });
- throw error;
- }
-
- await promise_rejects_exactly(t, error, createLanguageDetector({monitor}));
+ await testCreateMonitorCallbackThrowsError(t, createLanguageDetector);
}, 'If monitor throws an error, LanguageDetector.create() rejects with that error');
promise_test(async t => {
diff --git a/tests/wpt/tests/ai/resources/locale-util.js b/tests/wpt/tests/ai/resources/locale-util.js
index cacb11f4f25..70a00a5630b 100644
--- a/tests/wpt/tests/ai/resources/locale-util.js
+++ b/tests/wpt/tests/ai/resources/locale-util.js
@@ -42,3 +42,20 @@ function assert_is_variation(variation_language_tag, expected_language_tag) {
const expected_locale = new Intl.Locale(expected_language_tag);
assert_equals(variation_locale.language, expected_locale.language);
}
+
+function assert_availability_consistent(
+ language_subtag_availability, variation_availability) {
+ if (variation_availability == 'unavailable') {
+ // If the language subtag is not available then no variation of it should
+ // be available.
+ assert_equals(language_subtag_availability, 'unavailable');
+ } else {
+ // If the language subtag is available, then it definitely shouldn't be
+ // unavailable since whatever backing it has could support any variation of
+ // it. A variation could have a different availability if a more specific
+ // backing is required.
+ assert_in_array(
+ language_subtag_availability,
+ ['downloadable', 'downloading', 'available']);
+ }
+}
diff --git a/tests/wpt/tests/ai/resources/util.js b/tests/wpt/tests/ai/resources/util.js
index 84507a409e9..eda6a17a24f 100644
--- a/tests/wpt/tests/ai/resources/util.js
+++ b/tests/wpt/tests/ai/resources/util.js
@@ -182,6 +182,20 @@ async function testMonitor(createFunc, options = {}) {
return result;
}
+async function testCreateMonitorCallbackThrowsError(
+ t, createFunc, options = {}) {
+ const error = new Error('CreateMonitorCallback threw an error');
+ function monitor(m) {
+ m.addEventListener('downloadprogress', e => {
+ assert_unreached(
+ 'This should never be reached since monitor throws an error.');
+ });
+ throw error;
+ }
+
+ await promise_rejects_exactly(t, error, createFunc({...options, monitor}));
+}
+
function run_iframe_test(iframe, test_name) {
const id = getId();
iframe.contentWindow.postMessage({id, type: test_name}, '*');
diff --git a/tests/wpt/tests/ai/translator/translator-locale.https.window.js b/tests/wpt/tests/ai/translator/translator-locale.https.window.js
index 73e7eff20d2..27dd2605576 100644
--- a/tests/wpt/tests/ai/translator/translator-locale.https.window.js
+++ b/tests/wpt/tests/ai/translator/translator-locale.https.window.js
@@ -1,4 +1,4 @@
-// META: title=Detect english
+// META: title=Translator locale tests
// META: global=window
// META: timeout=long
// META: script=resources/util.js
@@ -8,7 +8,68 @@
'use strict';
-function assert_rejects_invalid_expected_input_languages(
+function getAvailability(sourceLanguage, targetLanguage) {
+ return Translator.availability({sourceLanguage, targetLanguage});
+}
+
+promise_test(async t => {
+ for (const [sourceLanguageSubtag, sourceVariations] of Object.entries(
+ valid_language_tags)) {
+ for (const [targetLanguageSubtag, targetVariations] of Object.entries(
+ valid_language_tags)) {
+ const languageSubtagAvailability =
+ await getAvailability(sourceLanguageSubtag, targetLanguageSubtag);
+
+ // All variations should be consistent with the language subtag.
+ for (const sourceVariation of sourceVariations) {
+ for (const targetVariation of targetVariations) {
+ assert_availability_consistent(
+ await getAvailability(sourceVariation, targetVariation),
+ languageSubtagAvailability);
+ }
+ }
+ }
+ }
+}, 'Translator.availability() is consistent between language tag variations');
+
+async function assert_valid_languages(inSourceLanguage, inTargetLanguage) {
+ if (['downloading', 'downloadable'].includes(
+ await getAvailability(inSourceLanguage, inTargetLanguage))) {
+ await test_driver.bless();
+ }
+
+ const {sourceLanguage: outSourceLanguage, targetLanguage: outTargetLanguage} =
+ await Translator.create(
+ {sourceLanguage: inSourceLanguage, targetLanguage: inTargetLanguage});
+
+ assert_is_variation(inSourceLanguage, outSourceLanguage);
+ assert_is_canonical(outSourceLanguage);
+ assert_is_variation(inTargetLanguage, outTargetLanguage);
+ assert_is_canonical(outTargetLanguage);
+}
+
+promise_test(async t => {
+ for (const [sourceLanguageSubtag, sourceVariations] of Object.entries(
+ valid_language_tags)) {
+ for (const [targetLanguageSubtag, targetVariations] of Object.entries(
+ valid_language_tags)) {
+ if (await getAvailability(sourceLanguageSubtag, targetLanguageSubtag) ===
+ 'unavailable') {
+ continue;
+ }
+
+ await assert_valid_languages(sourceLanguageSubtag, targetLanguageSubtag);
+
+ for (const sourceVariation of sourceVariations) {
+ for (const targetVariation of targetVariations) {
+ await assert_valid_languages(sourceVariation, targetVariation);
+ }
+ }
+ }
+ }
+}, 'Translator has valid source and target languages');
+
+function assert_rejects_invalid_languages(
t, method, sourceLanguage, targetLanguage) {
return promise_rejects_js(
t, RangeError, method({sourceLanguage, targetLanguage}));
@@ -19,21 +80,21 @@ function testInvalidLanguagePairs(t, method) {
// Invalid source language.
for (const sourceLanguage of invalid_language_tags) {
for (const targetLanguage of allValidLanguageTags) {
- assert_rejects_invalid_expected_input_languages(
+ assert_rejects_invalid_languages(
t, method, sourceLanguage, targetLanguage);
}
}
// Invalid target language.
for (const sourceLanguage of allValidLanguageTags) {
for (const targetLanguage of invalid_language_tags) {
- assert_rejects_invalid_expected_input_languages(
+ assert_rejects_invalid_languages(
t, method, sourceLanguage, targetLanguage);
}
}
// Invalid source and target language
for (const sourceLanguage of invalid_language_tags) {
for (const targetLanguage of invalid_language_tags) {
- assert_rejects_invalid_expected_input_languages(
+ assert_rejects_invalid_languages(
t, method, sourceLanguage, targetLanguage);
}
}
@@ -43,8 +104,8 @@ promise_test(async t => {
// We don't need to consume user activation since it should throw a RangeError
// before it even can check if it needs to consume user activation.
testInvalidLanguagePairs(t, Translator.create);
-}, 'LanguageDetector.create() throws RangeError for invalid language tags');
+}, 'Translator.create() throws RangeError for invalid language tags');
promise_test(async t => {
testInvalidLanguagePairs(t, Translator.availability);
-}, 'LanguageDetector.availability() throws RangeError for invalid language tags');
+}, 'Translator.availability() throws RangeError for invalid language tags');
diff --git a/tests/wpt/tests/ai/translator/translator.https.window.js b/tests/wpt/tests/ai/translator/translator.https.window.js
new file mode 100644
index 00000000000..722430fe631
--- /dev/null
+++ b/tests/wpt/tests/ai/translator/translator.https.window.js
@@ -0,0 +1,16 @@
+// META: title=Translator tests
+// META: global=window
+// META: timeout=long
+// META: script=../resources/util.js
+// META: script=/resources/testdriver.js
+// META: script=resources/util.js
+//
+// Setting `timeout=long` as this test may require downloading the translation
+// library and the language models.
+
+promise_test(async t => {
+ // Can pass in valid but unsupported languages since the create monitor error
+ // should be thrown before language support is checked.
+ await testCreateMonitorCallbackThrowsError(
+ t, createTranslator, {sourceLanguage: 'und', targetLanguage: 'und'});
+}, 'If monitor throws an error, LanguageDetector.create() rejects with that error');
diff --git a/tests/wpt/tests/ai/translator/translator.optional.https.window.js b/tests/wpt/tests/ai/translator/translator.optional.https.window.js
index 2a4c5a6c5dd..ce01efed143 100644
--- a/tests/wpt/tests/ai/translator/translator.optional.https.window.js
+++ b/tests/wpt/tests/ai/translator/translator.optional.https.window.js
@@ -1,8 +1,7 @@
-// META: title=Translator Translate
+// META: title=Optional Translator tests
// META: global=window
// META: timeout=long
// META: script=../resources/util.js
-// META: script=../resources/language_codes.js
// META: script=/resources/testdriver.js
// META: script=resources/util.js
//
diff --git a/tests/wpt/tests/css/css-anchor-position/anchor-function-pseudo-element-basic.html b/tests/wpt/tests/css/css-anchor-position/anchor-function-pseudo-element-basic.html
new file mode 100644
index 00000000000..70977ca4c40
--- /dev/null
+++ b/tests/wpt/tests/css/css-anchor-position/anchor-function-pseudo-element-basic.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<title>Positioning pseudo-elements using anchor functions</title>
+<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#positioning">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+body { margin: 0 }
+#anchor, #target::before, #target::after {
+ width: 100px;
+ height: 100px;
+ position: absolute;
+}
+#anchor.moved {
+ left: 200px;
+ top: 200px;
+}
+#anchor {
+ left: 50px;
+ top: 100px;
+ anchor-name: --a;
+ background: blue;
+}
+#target::before {
+ position-anchor: --a;
+ left: anchor(right);
+ top: anchor(top);
+ background: green;
+ content:'';
+}
+#target::after {
+ position-anchor: --a;
+ left: anchor(left);
+ top: anchor(bottom);
+ background: green;
+ content:'';
+}
+</style>
+<div id=anchor></div>
+<div id=target></div>
+<script>
+test(() => {
+ assert_equals(getComputedStyle(target, '::before').top, '100px', "#target::before top is positioned against anchor");
+ assert_equals(getComputedStyle(target, '::before').left, '150px', "#target::before left is positioned against anchor");
+ assert_equals(getComputedStyle(target, '::after').top, '200px', "#target::after top is positioned against anchor");
+ assert_equals(getComputedStyle(target, '::after').left, '50px', "#target::after left is positioned against anchor");
+}, "Initial anchored position");
+
+test(() => {
+ anchor.classList.add("moved");
+ assert_equals(getComputedStyle(target, '::before').top, '200px', "#target::before top is positioned against anchor");
+ assert_equals(getComputedStyle(target, '::before').left, '300px', "#target::before left is positioned against anchor");
+ assert_equals(getComputedStyle(target, '::after').top, '300px', "#target::after top is positioned against anchor");
+ assert_equals(getComputedStyle(target, '::after').left, '200px', "#target::after left is positioned against anchor");
+}, "Anchored position after moving");
+</script>
diff --git a/tests/wpt/tests/css/css-anchor-position/anchor-position-non-anchored-fallback.html b/tests/wpt/tests/css/css-anchor-position/anchor-position-non-anchored-fallback.html
new file mode 100644
index 00000000000..26965fe8bf4
--- /dev/null
+++ b/tests/wpt/tests/css/css-anchor-position/anchor-position-non-anchored-fallback.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>CSS Anchor Positioning Test: Invalidation of fallback without anchor references</title>
+<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#fallback-apply">
+<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
+<style>
+ #anchor {
+ anchor-name: --anchor;
+ background: green;
+ width: 100px;
+ height: 100vh;
+ }
+ #anchored {
+ background: green;
+ top: anchor(--anchor bottom);
+ width: 100px;
+ height: 50px;
+ position: absolute;
+ position-try: --bottom;
+ }
+
+ @position-try --bottom {
+ top: auto;
+ bottom: 0px;
+ }
+</style>
+<p>Test passes if there is a filled green square.</p>
+<div id="anchor"></div>
+<div id="anchored"></div>
+<script>
+ anchor.offsetTop;
+ anchor.style.height = "50px";
+</script>
diff --git a/tests/wpt/tests/css/css-anchor-position/inherit-height-from-fallback.html b/tests/wpt/tests/css/css-anchor-position/inherit-height-from-fallback.html
new file mode 100644
index 00000000000..a1179c62ed0
--- /dev/null
+++ b/tests/wpt/tests/css/css-anchor-position/inherit-height-from-fallback.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>CSS Anchor Positioning Test: inherit height from fallback height</title>
+<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#position-try-fallbacks">
+<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
+<style>
+ #container {
+ position: relative;
+ }
+ #anchor {
+ anchor-name: --a1;
+ width: 0px;
+ height: 100px;
+ }
+ #anchored {
+ position-area: left center;
+ position: absolute;
+ position-anchor: --a1;
+ position-try-fallbacks: --f1;
+ width: 100px;
+ }
+ #child {
+ height: inherit;
+ background: green;
+ }
+ @position-try --f1 {
+ position-area: right center;
+ height: 100px;
+ }
+</style>
+<p>Test passes if there is a filled green square.</p>
+<div id="container">
+ <div id="anchor"></div>
+ <div id="anchored">
+ <div id="child"></div>
+ </div>
+</div>
diff --git a/tests/wpt/tests/css/css-break/WEB_FEATURES.yml b/tests/wpt/tests/css/css-break/WEB_FEATURES.yml
index 49ecf06d287..1f47ce3fbaf 100644
--- a/tests/wpt/tests/css/css-break/WEB_FEATURES.yml
+++ b/tests/wpt/tests/css/css-break/WEB_FEATURES.yml
@@ -2,3 +2,6 @@ features:
- name: box-decoration-break
files:
- box-decoration-break-*
+- name: page-break-aliases
+ files:
+ - page-break-legacy-shorthands.html
diff --git a/tests/wpt/tests/css/css-cascade/scope-visited-cssom.html b/tests/wpt/tests/css/css-cascade/scope-visited-cssom.html
index aba4b752b2f..3dc29da6dd3 100644
--- a/tests/wpt/tests/css/css-cascade/scope-visited-cssom.html
+++ b/tests/wpt/tests/css/css-cascade/scope-visited-cssom.html
@@ -50,8 +50,8 @@ test((t) => {
test((t) => {
main.append(test_visited.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited');
}, ':visited as scoped selector');
</script>
@@ -68,8 +68,8 @@ test((t) => {
test((t) => {
main.append(test_not_link.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited');
}, ':not(:link) as scoped selector');
</script>
@@ -86,8 +86,8 @@ test((t) => {
test((t) => {
main.append(test_not_visited.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)', 'unvisited');
}, ':not(:visited) as scoped selector');
</script>
@@ -106,8 +106,8 @@ test((t) => {
test((t) => {
main.append(test_link_root.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)');
- assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)');
+ assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)', 'visited');
+ assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)', 'unvisited');
}, ':link as scoping root');
</script>
@@ -124,8 +124,8 @@ test((t) => {
test((t) => {
main.append(test_visited_root.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)');
- assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)');
+ assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)', 'visited');
+ assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)', 'unvisited');
}, ':visited as scoping root');
</script>
@@ -142,8 +142,8 @@ test((t) => {
test((t) => {
main.append(test_not_visited_root.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)');
- assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)');
+ assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)', 'visited');
+ assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(0, 128, 0)', 'unvisited');
}, ':not(:visited) as scoping root');
</script>
@@ -160,8 +160,8 @@ test((t) => {
test((t) => {
main.append(test_not_link_root.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)');
- assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)');
+ assert_equals(getComputedStyle(visited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)', 'visited');
+ assert_equals(getComputedStyle(unvisited.firstElementChild).backgroundColor, 'rgb(255, 255, 255)', 'unvisited');
}, ':not(:link) as scoping root');
</script>
@@ -180,8 +180,8 @@ test((t) => {
test((t) => {
main.append(test_link_root_scope.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)', 'unvisited');
}, ':link as scoping root, :scope');
</script>
@@ -198,8 +198,8 @@ test((t) => {
test((t) => {
main.append(test_visited_root_scope.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited');
}, ':visited as scoping root, :scope');
</script>
@@ -216,8 +216,8 @@ test((t) => {
test((t) => {
main.append(test_not_visited_root_scope.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)', 'unvisited');
}, ':not(:visited) as scoping root, :scope');
</script>
@@ -234,8 +234,8 @@ test((t) => {
test((t) => {
main.append(test_not_link_root_scope.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited');
}, ':not(:link) as scoping root, :scope');
</script>
@@ -254,8 +254,8 @@ test((t) => {
test((t) => {
main.append(test_link_scoping_limit.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited');
}, ':link as scoping limit');
</script>
@@ -272,8 +272,8 @@ test((t) => {
test((t) => {
main.append(test_visited_scoping_limit.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)', 'unvisited');
}, ':visited as scoping limit');
</script>
@@ -290,8 +290,8 @@ test((t) => {
test((t) => {
main.append(test_not_link_scoping_limit.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(0, 128, 0)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(0, 128, 0)', 'unvisited');
}, ':not(:link) as scoping limit');
</script>
@@ -308,7 +308,7 @@ test((t) => {
test((t) => {
main.append(test_not_visited_scoping_limit.content.cloneNode(true));
t.add_cleanup(() => main.replaceChildren());
- assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)');
- assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)');
+ assert_equals(getComputedStyle(visited).backgroundColor, 'rgb(255, 255, 255)', 'visited');
+ assert_equals(getComputedStyle(unvisited).backgroundColor, 'rgb(255, 255, 255)', 'unvisited');
}, ':not(:visited) as scoping limit');
</script>
diff --git a/tests/wpt/tests/css/css-contain/parsing/contain-invalid.html b/tests/wpt/tests/css/css-contain/parsing/contain-invalid.html
index 9f96bbc2fed..d73e4b4c357 100644
--- a/tests/wpt/tests/css/css-contain/parsing/contain-invalid.html
+++ b/tests/wpt/tests/css/css-contain/parsing/contain-invalid.html
@@ -25,6 +25,7 @@ test_invalid_value("contain", "size layout size");
test_invalid_value("contain", "paint content");
test_invalid_value("contain", "size inline-size");
test_invalid_value("contain", "inline-size inline-size");
+test_invalid_value("contain", "view-transition view-transition");
</script>
</body>
</html>
diff --git a/tests/wpt/tests/css/css-contain/parsing/contain-valid.tentative.html b/tests/wpt/tests/css/css-contain/parsing/contain-valid.tentative.html
new file mode 100644
index 00000000000..da358741b7b
--- /dev/null
+++ b/tests/wpt/tests/css/css-contain/parsing/contain-valid.tentative.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#contain-property">
+<!-- TODO link scoped-view-transition-spec once available -->
+<meta name="assert" content="contain supports view-transition'.">
+<meta name="assert" content="contain serializes in canonical order.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+</body>
+<script>
+/* Note this test is an extension of contain-valid. Once
+ contain: view-transition" is resolved, this test should be moved or
+ replaced, depending on the resolution. */
+test_valid_value("contain", "view-transition");
+test_valid_value("contain", "view-transition layout", "layout view-transition");
+test_valid_value("contain",
+ "paint view-transition style",
+ "style paint view-transition");
+</script>
+</html>
diff --git a/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-007-crash.html b/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-007-crash.html
new file mode 100644
index 00000000000..46306a8ffaa
--- /dev/null
+++ b/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-007-crash.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<title>Crash test found by fuzzer. Multicol, non visible overflow without scrollable container and a visible gap rule
+</title>
+<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
+<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
+<div style="columns:2; column-fill:auto; height:100px; column-rule:solid; contain:paint;">
+ <div style="height:101px;"></div>
+</div>
diff --git a/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-008-crash.html b/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-008-crash.html
new file mode 100644
index 00000000000..9c03f592cfe
--- /dev/null
+++ b/tests/wpt/tests/css/css-gaps/agnostic/gap-decorations-008-crash.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<head>
+ <title>Crash test found by fuzzer.</title>
+ <link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
+ <link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
+</head>
+<style>
+ body > * {
+ column-rule: repeat(5, 100px);
+ }
+</style>
+<body>
+ <fieldset>
+</body>
diff --git a/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025-ref.html b/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025-ref.html
new file mode 100644
index 00000000000..d4cbf509854
--- /dev/null
+++ b/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025-ref.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
+<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
+<style>
+ body {
+ margin: 0;
+ }
+
+ main {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 10px;
+ }
+
+ .item {
+ background-color: teal;
+ height: 50px;
+ flex-basis: 100%;
+ }
+
+ .row-gap {
+ position: absolute;
+ top: 50px;
+ left: 0px;
+ background: gold;
+ width: 100%;
+ height: 10px;
+ }
+</style>
+<main>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="row-gap"></div>
+</main>
diff --git a/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025.html b/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025.html
new file mode 100644
index 00000000000..42b46a301c3
--- /dev/null
+++ b/tests/wpt/tests/css/css-gaps/flex/flex-gap-decorations-025.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>
+ CSS Gap Decorations: flex gaps are painted when there's only one flex line
+</title>
+<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
+<link rel="match" href="flex-gap-decorations-025-ref.html">
+<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
+<style>
+ body {
+ margin: 0;
+ }
+
+ main {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 10px;
+ row-rule: 10px solid gold;
+ }
+
+ .item {
+ background-color: teal;
+ height: 50px;
+ flex-basis: 100%;
+ }
+</style>
+<main>
+ <div class="item"></div>
+ <div class="item"></div>
+</main>
diff --git a/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-043-crash.html b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-043-crash.html
new file mode 100644
index 00000000000..920e1b4d05a
--- /dev/null
+++ b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-043-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<title>
+ CSS Gap Decorations: Column gutter with no column gaps and row gaps with no row gutter should not crash.
+</title>
+<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
+<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com">
+<style>
+ .grid-container {
+ display: grid;
+ column-gap: 40px;
+
+ grid-template: 1fr 1fr / 1fr;
+ column-rule: solid blue;
+ }
+</style>
+
+<div class="grid-container"></div>
diff --git a/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-044-crash.html b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-044-crash.html
new file mode 100644
index 00000000000..b4e69929d2d
--- /dev/null
+++ b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-044-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<title>
+ CSS Gap Decorations: Row gutter with no row gaps and column gaps with no column gutter should not crash.
+</title>
+<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
+<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com">
+<style>
+ .grid-container {
+ display: grid;
+ row-gap: 40px;
+
+ grid-template: 1fr/ 1fr 1fr;
+ row-rule: solid red;
+ }
+</style>
+
+<div class="grid-container"></div>
diff --git a/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045-ref.html b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045-ref.html
new file mode 100644
index 00000000000..b002cf0fb3a
--- /dev/null
+++ b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045-ref.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<link rel="help" href="https://drafts.csswg.org/css-gaps-1/#break">
+<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
+<style>
+ #container,
+ body {
+ overflow: hidden;
+ margin: 0px;
+ }
+
+ #container {
+ display: grid;
+ grid-template-rows: 4rem 2rem auto;
+ width: 80%;
+ gap: 2px;
+ border: solid 2px black;
+ row-rule: 2px solid hotpink, 1px dashed grey;
+ background-color: teal;
+ }
+
+ #one {
+ height: 100px;
+ width: 100px;
+ }
+</style>
+<div id="container">
+ <div id="one"></div>
+</div>
diff --git a/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045.html b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045.html
new file mode 100644
index 00000000000..a90d45df442
--- /dev/null
+++ b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-045.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>
+ CSS Gap Decorations: Make sure decorations resize when container/window resizes.
+</title>
+<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
+<link rel="match" href="grid-gap-decorations-045-ref.html">
+<link rel="author" title="Javier Contreras" href="mailto:javiercon@microsoft.com">
+<style>
+ #container,
+ body {
+ overflow: hidden;
+ margin: 0px;
+ }
+
+ #container {
+ display: grid;
+ grid-template-rows: 4rem 2rem auto;
+ width: 50%;
+ gap: 2px;
+ border: solid 2px black;
+ row-rule: 2px solid hotpink, 1px dashed grey;
+ background-color: teal;
+ }
+
+ #one {
+ height: 100px;
+ width: 100px;
+ }
+</style>
+<div id="container">
+ <div id="one"></div>
+</div>
+<script>
+ window.addEventListener('load', function () {
+ const container = document.getElementById('container');
+ container.style.width = '80%';
+ });
+</script>
diff --git a/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-046.html b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-046.html
new file mode 100644
index 00000000000..64ca1cdddff
--- /dev/null
+++ b/tests/wpt/tests/css/css-gaps/grid/grid-gap-decorations-046.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<title>
+ CSS Gap Decorations: rules are painted when container contains an OOF child.
+</title>
+<link rel="help" href="https://drafts.csswg.org/css-gaps-1/">
+<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
+<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div style="position: relative; display: grid; grid-template-columns: 0px 0px; grid-template-rows: 100px; column-gap: 100px; column-rule: solid green 100px; width: max-content; background:red;">
+ <div id="target" style="position: absolute; left: 0; top: 0;"></div>
+</div>
+<script>
+document.body.offsetTop;
+target.style.left = '10px';
+</script>
diff --git a/tests/wpt/tests/css/css-gaps/parsing/gap-decorations-rule-initial-value-crash.html b/tests/wpt/tests/css/css-gaps/parsing/gap-decorations-rule-initial-value-crash.html
new file mode 100644
index 00000000000..19309e87efc
--- /dev/null
+++ b/tests/wpt/tests/css/css-gaps/parsing/gap-decorations-rule-initial-value-crash.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Gap Decoration: renderer doesn't crash when rule values are set to initial</title>
+<link rel="help" href="https://drafts.csswg.org/css-gaps-1">
+<link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com">
+</head>
+<body>
+<div id="target" style="column-rule-width: initial; column-rule-color: initial; column-rule-style: solid;"></div>
+</body>
+<script>
+ document.getElementById("target").style.columnRule;
+</script>
+</html>
diff --git a/tests/wpt/tests/css/css-highlight-api/Highlight-setlike.html b/tests/wpt/tests/css/css-highlight-api/Highlight-setlike.html
index 0093f9be232..26b30d2a0be 100644
--- a/tests/wpt/tests/css/css-highlight-api/Highlight-setlike.html
+++ b/tests/wpt/tests/css/css-highlight-api/Highlight-setlike.html
@@ -62,6 +62,15 @@
}, 'Highlight add and has methods work as expected' + rangesCombinationDescription);
test(() => {
+ let customHighlight = new Highlight();
+ customHighlight.add(rangeCollections[i][0]).add(rangeCollections[i][1]);
+ assert_true(customHighlight.has(rangeCollections[i][0]), 'Highlight.has returns true when it contains the first range added');
+ assert_true(customHighlight.has(rangeCollections[i][1]), 'Highlight.has returns true when it contains the second range added');
+ assert_false(customHighlight.has(rangeCollections[i][2]), 'Highlight.has returns false when it doesn\'t contain the range which is passed as the argument');
+ assert_equals(customHighlight.size, 2, 'Highlight.size is 2 after adding two different ranges by chaining the add method');
+ }, "Highlight add method is chainable" + rangesCombinationDescription);
+
+ test(() => {
let customHighlight = new Highlight(rangeCollections[i][0], rangeCollections[i][1]);
assert_false(customHighlight.delete(rangeCollections[i][2]), 'Highlight.delete returns false when trying to delete a range that is not in the highlight');
assert_true(customHighlight.delete(rangeCollections[i][1]), 'Highlight.delete returns true when trying to delete a range that is in the highlight');
diff --git a/tests/wpt/tests/css/css-highlight-api/HighlightRegistry-maplike.html b/tests/wpt/tests/css/css-highlight-api/HighlightRegistry-maplike.html
index d8bbe4731f6..50fccd2347d 100644
--- a/tests/wpt/tests/css/css-highlight-api/HighlightRegistry-maplike.html
+++ b/tests/wpt/tests/css/css-highlight-api/HighlightRegistry-maplike.html
@@ -70,6 +70,9 @@
assert_equals(CSS.highlights.size, 0, 'HighlightRegistry.clear empties the map.');
CSS.highlights.clear();
assert_equals(CSS.highlights.size, 0, 'HighlightRegistry.clear called with an empty registry keeps it empty.');
+
+ CSS.highlights.set(name1, h1).set(name2, h2);
+ assert_equals(CSS.highlights.size, 2, 'HighlightRegistry.size is 2 after inserting two different Highlights by chaining the set method.');
}, 'HighlightRegistry has a maplike interface.');
</script>
diff --git a/tests/wpt/tests/css/css-images/image-orientation/image-orientation-exif-png-3.html b/tests/wpt/tests/css/css-images/image-orientation/image-orientation-exif-png-3.html
index 536b7d2560c..355c2f601fa 100644
--- a/tests/wpt/tests/css/css-images/image-orientation/image-orientation-exif-png-3.html
+++ b/tests/wpt/tests/css/css-images/image-orientation/image-orientation-exif-png-3.html
@@ -7,7 +7,7 @@
<link rel="help" href="https://w3c.github.io/PNG-spec/#eXIf">
<link rel="match" href="reference/image-orientation-exif-png-ref.html">
<style>
- div { width: 400px; height: 400px }
+ div { width: 400px; height: 400px; display: inline-block; }
div.early { background-image: url(support/F-exif-chunk-early.png)}
div.late {background-image: url(support/F-exif-late.png)}
</style>
diff --git a/tests/wpt/tests/css/css-masking/animations/clip-path-interpolation-shape-control-points.tentative.html b/tests/wpt/tests/css/css-masking/animations/clip-path-interpolation-shape-control-points.html
index 03545a15583..03545a15583 100644
--- a/tests/wpt/tests/css/css-masking/animations/clip-path-interpolation-shape-control-points.tentative.html
+++ b/tests/wpt/tests/css/css-masking/animations/clip-path-interpolation-shape-control-points.html
diff --git a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-007.tentative.html b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-007.html
index 5e71923c01b..5e71923c01b 100644
--- a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-007.tentative.html
+++ b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-007.html
diff --git a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-008.tentative.html b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-008.html
index fdeb7971429..fdeb7971429 100644
--- a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-008.tentative.html
+++ b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-008.html
diff --git a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-009.tentative.html b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-009.html
index 8fda73b055e..8fda73b055e 100644
--- a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-009.tentative.html
+++ b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-009.html
diff --git a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-010.tentative.html b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-010.html
index d089a90104c..d089a90104c 100644
--- a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-010.tentative.html
+++ b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-010.html
diff --git a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html
index 11c28021741..11c28021741 100644
--- a/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.tentative.html
+++ b/tests/wpt/tests/css/css-masking/clip-path/clip-path-shape-hline-vline-keywords.html
diff --git a/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-001.html b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-001.html
new file mode 100644
index 00000000000..37c6c44f57b
--- /dev/null
+++ b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-001.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<meta charset="utf-8" />
+<title>
+ Contextually invalid selectors due to implicit :is() in nesting should not match and have no
+ specificity
+</title>
+<link rel="help" href="https://drafts.csswg.org/css-nesting/#nest-selector" />
+<link
+ rel="match"
+ href="/css/reference/ref-filled-green-100px-square-only.html"
+/>
+<style>
+ div {
+ color: green;
+ background-color: currentColor;
+ width: 100px;
+ height: 100px;
+ }
+
+ p {
+ color: initial;
+ }
+
+ *,
+ ::before {
+ & * {
+ color: red;
+ }
+ }
+</style>
+
+<p>Test passes if there is a filled green square.</p>
+<div></div>
diff --git a/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors.html b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-002.html
index f3cdc674fd5..7c722468e1c 100644
--- a/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors.html
+++ b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-002.html
@@ -21,13 +21,6 @@
color: initial;
}
- *,
- ::before {
- & * {
- color: red;
- }
- }
-
:is(*, ::before) * {
color: purple;
}
diff --git a/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-003.html b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-003.html
new file mode 100644
index 00000000000..01d0a819fa5
--- /dev/null
+++ b/tests/wpt/tests/css/css-nesting/contextually-invalid-selectors-003.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<meta charset="utf-8" />
+<title>
+ Contextually invalid selectors due to :is() should not match and have no
+ specificity
+</title>
+<link rel="help" href="https://drafts.csswg.org/css-nesting/#nest-selector" />
+<link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=293230">
+<link
+ rel="match"
+ href="/css/reference/ref-filled-green-100px-square-only.html"
+/>
+<style>
+ div {
+ color: green;
+ background-color: currentColor;
+ width: 100px;
+ height: 100px;
+ }
+
+ p {
+ color: initial;
+ }
+
+ div::before {
+ & { /* `&` must not match the originating element */
+ color: red;
+ }
+ }
+</style>
+
+<p>Test passes if there is a filled green square.</p>
+<div></div>
diff --git a/tests/wpt/tests/css/css-overflow/chrome-421199213-crash.html b/tests/wpt/tests/css/css-overflow/chrome-421199213-crash.html
new file mode 100644
index 00000000000..1ab02f1a787
--- /dev/null
+++ b/tests/wpt/tests/css/css-overflow/chrome-421199213-crash.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<link rel="help" href="https://crbug.com/421199213">
+<style>
+ #scroller {
+ overflow: scroll;
+ scroll-marker-group: before;
+ }
+ #item::scroll-marker { content: counter(x); }
+</style>
+<p>Pass if no crash</p>
+<div id="scroller">
+ <div id="item"></div>
+</div>
diff --git a/tests/wpt/tests/css/css-overflow/clip-008.html b/tests/wpt/tests/css/css-overflow/clip-008.html
new file mode 100644
index 00000000000..8fb45252aa7
--- /dev/null
+++ b/tests/wpt/tests/css/css-overflow/clip-008.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<title>border-radius should not clip contents if overflow is clipped in only one direction</title>
+<link rel="author" title="Psychpsyo" href="mailto:psychpsyo@gmail.com" />
+<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#corner-clipping">
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+<style>
+ #testHolder {
+ width: 100px;
+ height: 100px;
+ background-color: red;
+ }
+ #clipped {
+ width: 100px;
+ height: 100px;
+ overflow-x: clip;
+ background-color: wheat;
+ border-radius: 50%;
+ }
+ #contents {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ }
+</style>
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div id="testHolder">
+ <div id="clipped">
+ <div id="contents"></div>
+ </div>
+</div>
diff --git a/tests/wpt/tests/css/css-overflow/overflow-rtl-scroll-left.html b/tests/wpt/tests/css/css-overflow/overflow-rtl-scroll-left.html
new file mode 100644
index 00000000000..0c837737546
--- /dev/null
+++ b/tests/wpt/tests/css/css-overflow/overflow-rtl-scroll-left.html
@@ -0,0 +1,49 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>overflow: rtl scroll left should return 0 when overflow size is empty</title>
+<link rel="author" href="mailto:perryuwang@gmail.com">
+<link rel="help" href="https://issues.chromium.org/issues/40064904">
+<script src="/css/css-transitions/support/helper.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+ #rtl-parent {
+ direction: rtl;
+ overflow: auto;
+ width: 300px;
+ height: 200px;
+ }
+ #rtl-child {
+ width: 500px;
+ height: 200px;
+ }
+</style>
+
+<div id="rtl-parent">
+ <div id="rtl-child"></div>
+</div>
+
+<script>
+promise_test(async () => {
+ const parent = document.getElementById('rtl-parent');
+ const child = document.getElementById('rtl-child');
+
+ await waitForAnimationFrames(5);
+ assert_equals(parent.offsetWidth, 300);
+ assert_equals(parent.offsetHeight, 200);
+ assert_equals(child.offsetWidth, 500);
+ assert_equals(child.offsetHeight, 200);
+
+ assert_equals(parent.scrollWidth, 500);
+ assert_equals(parent.scrollHeight, 200);
+ assert_equals(parent.scrollLeft, 0);
+
+ child.style.height = '0px';
+ parent.style.height = '0px';
+
+ await waitForAnimationFrames(5);
+ assert_equals(parent.offsetHeight, 0);
+ assert_equals(parent.scrollHeight, 0);
+ assert_equals(parent.scrollLeft, 0);
+}, 'rtl scroll left should be 0 when overflow size is empty');
+</script>
diff --git a/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-computed.html b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-computed.html
new file mode 100644
index 00000000000..589ae8835da
--- /dev/null
+++ b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-computed.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: parsing scroll-target-group property computed values</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<div id="target"></div>
+<script>
+ test_computed_value('scroll-target-group', 'initial', 'none');
+ test_computed_value('scroll-target-group', 'inherit', 'none');
+ test_computed_value('scroll-target-group', 'unset', 'none');
+ test_computed_value('scroll-target-group', 'revert', 'none');
+
+ test_computed_value('scroll-target-group', 'none');
+ test_computed_value('scroll-target-group', 'auto');
+
+ test(() => {
+ let style = getComputedStyle(document.getElementById('target'));
+ assert_not_equals(Array.from(style).indexOf('scroll-target-group'), -1);
+ }, 'The scroll-target-group property shows up in CSSStyleDeclaration enumeration');
+
+ test(() => {
+ let style = document.getElementById('target').style;
+ assert_not_equals(style.cssText.indexOf('scroll-target-group'), -1);
+ }, 'The scroll-target-group property shows up in CSSStyleDeclaration.cssText');
+</script>
diff --git a/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-invalid.html b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-invalid.html
new file mode 100644
index 00000000000..ac6a6fa3191
--- /dev/null
+++ b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-invalid.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: parsing scroll-target-group property invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+<div id="target"></div>
+<script>
+ test_invalid_value('scroll-target-group', '10');
+ test_invalid_value('scroll-target-group', 'true');
+ test_invalid_value('scroll-target-group', 'default');
+ test_invalid_value('scroll-target-group', 'all');
+ test_invalid_value('scroll-target-group', 'auto, auto');
+</script>
diff --git a/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-valid.html b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-valid.html
new file mode 100644
index 00000000000..0da79fc118c
--- /dev/null
+++ b/tests/wpt/tests/css/css-overflow/parsing/parsing/scroll-target-group-valid.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Overflow: parsing scroll-target-group property valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+<div id="target"></div>
+<script>
+ test_valid_value('scroll-target-group', 'initial');
+ test_valid_value('scroll-target-group', 'inherit');
+ test_valid_value('scroll-target-group', 'unset');
+ test_valid_value('scroll-target-group', 'revert');
+
+ test_valid_value("scroll-target-group", 'none');
+ test_valid_value("scroll-target-group", 'auto');
+</script>
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-focus-scroll-crash.html b/tests/wpt/tests/css/css-overflow/scroll-marker-focus-scroll-crash.html
new file mode 100644
index 00000000000..97b3be1e8fb
--- /dev/null
+++ b/tests/wpt/tests/css/css-overflow/scroll-marker-focus-scroll-crash.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<link rel="help" href="crbug.com/421471058">
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<style>
+ body {
+ margin: 0;
+ }
+
+ #scroller {
+ width: 600px;
+ height: 300px;
+ overflow: auto;
+ scroll-marker-group: before;
+ white-space: nowrap;
+ }
+
+ #scroller div {
+ background: blue;
+ display: inline-block;
+ width: 600px;
+ height: 270px;
+ }
+
+ #scroller::scroll-marker-group {
+ height: 20px;
+ width: 200px;
+ }
+
+ #scroller div::scroll-marker {
+ content: "Marker";
+ width: 100px;
+ height: 20px;
+ display: inline-block;
+ }
+
+ #scroller::scroll-button(left) {
+ content: "<";
+ }
+</style>
+<div id="scroller">
+ <div></div>
+ <div></div>
+</div>
+<script>
+ async function run() {
+ const kTab = '\uE004';
+ await new test_driver.Actions()
+ .keyDown(kTab)
+ .keyUp(kTab)
+ .send();
+ // With a focused scroll marker, scroll to next target.
+ document.querySelector('#scroller').scrollLeft = 600;
+ document.documentElement.classList.remove('reftest-wait');
+ }
+ run();
+</script>
+
+</html>
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-001-ref.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-001-ref.html
index 69e9167cc33..ed2cb595c9a 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-001-ref.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-001-ref.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test Reference: scroll-marker-contain property makes anchor elements scroll markers</title>
+<title>CSS Overflow Test Reference: scroll-target-group property makes anchor elements scroll markers</title>
<style>
#scroller {
overflow: auto;
@@ -35,4 +35,3 @@
<div id="target3"></div>
<div id="target4"></div>
</div>
-
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-001.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-001.html
index 93d7df72508..c0f96cc5574 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-001.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-001.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test: scroll-marker-contain property makes anchor elements scroll markers</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
-<link rel="match" href="scroll-marker-contain-001-ref.tentative.html">
+<title>CSS Overflow Test: scroll-target-group property makes anchor elements scroll markers</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<link rel="match" href="scroll-target-group-001-ref.html">
<style>
#wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
#scroller {
@@ -41,4 +41,3 @@
<div id="target3"></div>
<div id="target4"></div>
</div>
-
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-002-ref.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-002-ref.html
index 3fa777f7863..8571b11ba6a 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-002-ref.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-002-ref.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test Reference: scroll-marker-contain property makes anchor elements scroll markers and does scroll tracking</title>
+<title>CSS Overflow Test Reference: scroll-target-group property makes anchor elements scroll markers and does scroll tracking</title>
<style>
#scroller {
overflow: auto;
@@ -38,4 +38,3 @@
<script>
scroller.scrollTop = 400;
</script>
-
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-002.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-002.html
index af2a5e668be..e3e83769db2 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-002.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-002.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test: scroll-marker-contain property makes anchor elements scroll markers and does scroll tracking</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
-<link rel="match" href="scroll-marker-contain-002-ref.tentative.html">
+<title>CSS Overflow Test: scroll-target-group property makes anchor elements scroll markers and does scroll tracking</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<link rel="match" href="scroll-target-group-002-ref.html">
<style>
#wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
#scroller {
@@ -45,4 +45,3 @@
scroller.scrollTop = 400;
assert_equals(getComputedStyle(link4).color, "rgb(0, 128, 0)", "link4 should be :target-current");
</script>
-
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-003-ref.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-003-ref.html
index 09bb93d4ebc..09bb93d4ebc 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-003-ref.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-003-ref.html
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-003.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-003.html
index 59daa5cf5ce..39e1beff02a 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-003.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-003.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow Test: anchor scroll markers and pseudo element scroll markers</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker">
-<link rel="match" href="scroll-marker-contain-003-ref.tentative.html">
+<link rel="match" href="scroll-target-group-003-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
:root {
@@ -11,7 +11,7 @@
}
#wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
#scroller {
@@ -63,4 +63,3 @@
scroller.scrollTop = 400;
assert_equals(getComputedStyle(link4).color, "rgb(0, 128, 0)", "link4 should be :target-current");
</script>
-
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-004.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-004.html
index 2ec6f6bde76..3a61a6d8c8c 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-004.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-004.html
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test: scroll-marker-contain property makes anchor elements scroll markers inside size containers</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
-<link rel="match" href="scroll-marker-contain-001-ref.tentative.html">
+<title>CSS Overflow Test: scroll-target-group property makes anchor elements scroll markers inside size containers</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<link rel="match" href="scroll-target-group-001-ref.html">
<style>
html {
container: my-container / size;
}
#wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
#scroller {
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-005.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-005.html
index 3d435bf74cb..c7da0d404ec 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-005.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-005.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test: scroll-marker-contain property invalidation - reparenting nested anchors</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
-<link rel="match" href="scroll-marker-contain-001-ref.tentative.html">
+<title>CSS Overflow Test: scroll-target-group property invalidation - reparenting nested anchors</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<link rel="match" href="scroll-target-group-001-ref.html">
<style>
.wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
#scroller {
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-006.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-006.html
index 234b57e5bbe..6154845199a 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-006.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-006.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test: scroll-marker-contain property invalidation - anchor and target removal and addition</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
-<link rel="match" href="scroll-marker-contain-001-ref.tentative.html">
+<title>CSS Overflow Test: scroll-target-group property invalidation - anchor and target removal and addition</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<link rel="match" href="scroll-target-group-001-ref.html">
<style>
.wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
#scroller {
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-007.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-007.html
index 5f15c85819a..9c736381c34 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-007.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-007.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test: scroll-marker-contain property invalidation - dynamic creation</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
-<link rel="match" href="scroll-marker-contain-001-ref.tentative.html">
+<title>CSS Overflow Test: scroll-target-group property invalidation - dynamic creation</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<link rel="match" href="scroll-target-group-001-ref.html">
<style>
.wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
#scroller {
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-008-ref.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-008-ref.html
index d74777d3bbf..d2ba909f644 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-008-ref.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-008-ref.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test Reference: scroll-marker-contain property makes anchor elements scroll markers - </title>
+<title>CSS Overflow Test Reference: scroll-target-group property makes anchor elements scroll markers - </title>
<style>
#scroller {
overflow: auto;
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-008.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-008.html
index 80801854a0f..217ff1aabe6 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-008.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-008.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test: scroll-marker-contain property invalidation - dynamic removal</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
-<link rel="match" href="scroll-marker-contain-008-ref.tentative.html">
+<title>CSS Overflow Test: scroll-target-group property invalidation - dynamic removal</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<link rel="match" href="scroll-target-group-008-ref.html">
<style>
.wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
#scroller {
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-009-ref.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-009-ref.html
index 07b797ff789..82fbb988dfa 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-009-ref.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-009-ref.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test Reference: scroll-marker-contain property invalidation - dynamic change of href</title>
+<title>CSS Overflow Test Reference: scroll-target-group property invalidation - dynamic change of href</title>
<style>
.scroller {
overflow: auto;
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-009.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-009.html
index 8037adf8441..c9df1e3ca4c 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-009.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-009.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test: scroll-marker-contain property invalidation - dynamic change of href</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
-<link rel="match" href="scroll-marker-contain-009-ref.tentative.html">
+<title>CSS Overflow Test: scroll-target-group property invalidation - dynamic change of href</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<link rel="match" href="scroll-target-group-009-ref.html">
<style>
#wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
.scroller {
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-010.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-010.html
index fbdad62f846..fa311bf9fee 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-010.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-010.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test: scroll-marker-contain property invalidation - dynamic addition of href</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
-<link rel="match" href="scroll-marker-contain-009-ref.tentative.html">
+<title>CSS Overflow Test: scroll-target-group property invalidation - dynamic addition of href</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<link rel="match" href="scroll-target-group-009-ref.html">
<style>
#wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
.scroller {
diff --git a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-011.tentative.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-011.html
index 8cfc78130e0..9062fef7a81 100644
--- a/tests/wpt/tests/css/css-overflow/scroll-marker-contain-011.tentative.html
+++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-011.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>CSS Overflow Test: scroll-marker-contain property invalidation - dynamic removal of href</title>
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10916">
-<link rel="match" href="scroll-marker-contain-009-ref.tentative.html">
+<title>CSS Overflow Test: scroll-target-group property invalidation - dynamic removal of href</title>
+<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
+<link rel="match" href="scroll-target-group-009-ref.html">
<style>
#wrapper {
- scroll-marker-contain: auto;
+ scroll-target-group: auto;
}
.scroller {
diff --git a/tests/wpt/tests/css/css-scoping/host-defined.html b/tests/wpt/tests/css/css-scoping/host-defined.html
index 9e9776754a3..563bc52e527 100644
--- a/tests/wpt/tests/css/css-scoping/host-defined.html
+++ b/tests/wpt/tests/css/css-scoping/host-defined.html
@@ -13,10 +13,10 @@
:host div {
width: 100px;
height: 100px;
- background-color: red;
+ background-color: green;
}
:not(:defined) div {
- background-color: green;
+ background-color: red;
}
</style>
<div></div>
diff --git a/tests/wpt/tests/css/css-scroll-snap/scroll-start/scroll-start-with-text-fragment-navigation-target.html b/tests/wpt/tests/css/css-scroll-snap/scroll-start/scroll-start-with-text-fragment-navigation-target.html
index c399a975732..8b9fab96697 100644
--- a/tests/wpt/tests/css/css-scroll-snap/scroll-start/scroll-start-with-text-fragment-navigation-target.html
+++ b/tests/wpt/tests/css/css-scroll-snap/scroll-start/scroll-start-with-text-fragment-navigation-target.html
@@ -51,7 +51,7 @@
if (document.scrollingElement.scrollTop == 100) {
scroll_position = "AT_SCROLL_START";
- } else if (document.scrollingElement.scrollTop == expected_scroll_top) {
+ } else if (document.scrollingElement.scrollTop - expected_scroll_top < 1.0) {
scroll_position = "AT_TEXT_FRAGMENT";
}
@@ -71,4 +71,4 @@
</script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-computed.tentative.html b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-computed.html
index a87bc2391a8..a87bc2391a8 100644
--- a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-computed.tentative.html
+++ b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-computed.html
diff --git a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-invalid.tentative.html b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-invalid.html
index 9abe483c703..9abe483c703 100644
--- a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-invalid.tentative.html
+++ b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-invalid.html
diff --git a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-valid.tentative.html b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-valid.html
index 2372290cb69..2372290cb69 100644
--- a/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-valid.tentative.html
+++ b/tests/wpt/tests/css/css-shapes/shape-functions/shape-function-valid.html
diff --git a/tests/wpt/tests/css/css-sizing/replaced-aspect-ratio-stretch-fit-003.html b/tests/wpt/tests/css/css-sizing/replaced-aspect-ratio-stretch-fit-003.html
index 06dac275cab..0f6bffc2dce 100644
--- a/tests/wpt/tests/css/css-sizing/replaced-aspect-ratio-stretch-fit-003.html
+++ b/tests/wpt/tests/css/css-sizing/replaced-aspect-ratio-stretch-fit-003.html
@@ -3,6 +3,6 @@
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<p>Test passes if there is a filled green square.</p>
-<div style="width: 100px;">
- <svg viewBox="0 0 1 1" style="background: green; min-width: max-content; max-width: 50px;"></svg>
+<div style="width: 100px; height: 100px;">
+ <svg viewBox="0 0 1 1" style="background: green; min-width: max-content; max-width: 50px; height: 100%;"></svg>
</div>
diff --git a/tests/wpt/tests/css/css-sizing/stretch/flex-line-001.html b/tests/wpt/tests/css/css-sizing/stretch/flex-line-001.html
new file mode 100644
index 00000000000..04c12f20cda
--- /dev/null
+++ b/tests/wpt/tests/css/css-sizing/stretch/flex-line-001.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784">
+<script src='/resources/testharness.js'></script>
+<script src='/resources/testharnessreport.js'></script>
+<script src="/resources/check-layout-th.js"></script>
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<meta name="assert"
+ content="An item's cross-size:stretch should stretch to the line size, not the container size">
+<style>
+ .container {
+ /* inline just so they don't overflow on each other */
+ display: inline-flex;
+ width: 100px;
+ height: 100px;
+ border: solid;
+ flex-wrap: wrap;
+ /* Prevent the lines from stretching. */
+ align-content: start;
+ font: 20px/1 Ahem;
+ }
+
+ .container > div {
+ border: 3px solid;
+ }
+
+ .stretch {
+ width: -moz-available;
+ width: -webkit-fill-available;
+ width: stretch;
+ }
+</style>
+
+<div class="container">
+ <div class="stretch" style="width: 75px; border-color: cyan"
+ data-expected-height="26">a</div>
+ <div class="stretch" style="width: 75px; border-color: magenta"
+ data-expected-height="26">b</div>
+</div>
+<div class="container">
+ <div class="stretch" style="width: 75px; border-color: cyan"
+ data-expected-height="156">a</div>
+ <div style="border-color: orange; height: 150px"></div>
+ <div class="stretch" style="width: 75px; border-color: magenta"
+ data-expected-height="26">b</div>
+</div>
+
+<script>
+ document.fonts.ready.then(() => checkLayout(".stretch"));
+</script>
diff --git a/tests/wpt/tests/css/css-sizing/stretch/flex-line-002.html b/tests/wpt/tests/css/css-sizing/stretch/flex-line-002.html
new file mode 100644
index 00000000000..232554d7eaf
--- /dev/null
+++ b/tests/wpt/tests/css/css-sizing/stretch/flex-line-002.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784">
+<script src='/resources/testharness.js'></script>
+<script src='/resources/testharnessreport.js'></script>
+<script src="/resources/check-layout-th.js"></script>
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<meta name="assert"
+ content="An item's cross-size:stretch should stretch to the line size, not the container size; container has indefinite height">
+<style>
+ .container {
+ /* inline just so they don't overflow on each other */
+ display: inline-flex;
+ width: 100px;
+ border: solid;
+ flex-wrap: wrap;
+ /* Prevent the lines from stretching. */
+ align-content: start;
+ font: 20px/1 Ahem;
+ }
+
+ .container>div {
+ border: 3px solid;
+ }
+
+ .stretch {
+ height: -moz-available;
+ height: -webkit-fill-available;
+ height: stretch;
+ }
+</style>
+
+<div class="container">
+ <div class="stretch" style="width: 75px; border-color: cyan"
+ data-expected-height="26">a</div>
+ <div class="stretch" style="width: 75px; border-color: magenta"
+ data-expected-height="26">b</div>
+</div>
+<div class="container">
+ <div class="stretch" style="width: 75px; border-color: cyan"
+ data-expected-height="156">a</div>
+ <div style="border-color: orange; height: 150px"></div>
+ <div class="stretch" style="width: 75px; border-color: magenta"
+ data-expected-height="26">b</div>
+</div>
+
+<script>
+ document.fonts.ready.then(() => checkLayout(".stretch"));
+</script>
diff --git a/tests/wpt/tests/css/css-sizing/stretch/flex-line-003.html b/tests/wpt/tests/css/css-sizing/stretch/flex-line-003.html
new file mode 100644
index 00000000000..9aeb014ac16
--- /dev/null
+++ b/tests/wpt/tests/css/css-sizing/stretch/flex-line-003.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784">
+<script src='/resources/testharness.js'></script>
+<script src='/resources/testharnessreport.js'></script>
+<script src="/resources/check-layout-th.js"></script>
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<meta name="assert"
+ content="width:stretch item stretches to container width during the measure pass; container has definite width">
+<style>
+ .container {
+ display: flex;
+ flex-direction: column;
+ width: 100px;
+ height: 100px;
+ border: solid;
+ flex-wrap: wrap;
+ /* Prevent the lines from stretching. */
+ align-content: start;
+ font: 20px/1 Ahem;
+ }
+
+ .container>div {
+ border: 3px solid;
+ }
+
+ .stretch {
+ width: -moz-available;
+ width: -webkit-fill-available;
+ width: stretch;
+ }
+</style>
+
+<div class="container">
+ <div class="stretch" style="height: 75px; border-color: cyan"
+ data-expected-width="100">a</div>
+ <div class="stretch" style="height: 75px; border-color: magenta"
+ data-expected-width="100">b</div>
+</div>
+<div class="container">
+ <div class="stretch" style="height: 75px; border-color: cyan"
+ data-expected-width="156">a</div>
+ <div style="border-color: orange; width: 150px"></div>
+ <div class="stretch" style="height: 75px; border-color: magenta"
+ data-expected-width="100">b</div>
+</div>
+
+<script>
+ document.fonts.ready.then(() => checkLayout(".stretch"));
+</script>
diff --git a/tests/wpt/tests/css/css-sizing/stretch/flex-line-004.html b/tests/wpt/tests/css/css-sizing/stretch/flex-line-004.html
new file mode 100644
index 00000000000..4be0d02c393
--- /dev/null
+++ b/tests/wpt/tests/css/css-sizing/stretch/flex-line-004.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784">
+<script src='/resources/testharness.js'></script>
+<script src='/resources/testharnessreport.js'></script>
+<script src="/resources/check-layout-th.js"></script>
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<meta name="assert"
+ content="width:stretch item stretches to container width during the measure pass; container has min-content width">
+<style>
+ .container {
+ display: flex;
+ flex-direction: column;
+ max-width: 100px;
+ width: min-content;
+ height: 100px;
+ border: solid;
+ flex-wrap: wrap;
+ /* Prevent the lines from stretching. */
+ align-content: start;
+ font: 20px/1 Ahem;
+ }
+
+ .container>div {
+ border: 3px solid;
+ }
+
+ .stretch {
+ width: -moz-available;
+ width: -webkit-fill-available;
+ width: stretch;
+ }
+</style>
+
+<div class="container">
+ <div class="stretch" style="height: 75px; border-color: cyan"
+ data-expected-width="26">a</div>
+ <div class="stretch" style="height: 75px; border-color: magenta"
+ data-expected-width="26">b</div>
+</div>
+<div class="container">
+ <div class="stretch" style="height: 75px; border-color: cyan"
+ data-expected-width="156">c</div>
+ <div style="border-color: orange; width: 150px"></div>
+ <div class="stretch" style="height: 75px; border-color: magenta"
+ data-expected-width="100">d</div>
+</div>
+
+<script>
+ document.fonts.ready.then(() => checkLayout(".stretch"));
+</script>
diff --git a/tests/wpt/tests/css/css-sizing/stretch/flex-line-005.html b/tests/wpt/tests/css/css-sizing/stretch/flex-line-005.html
new file mode 100644
index 00000000000..99cd3310492
--- /dev/null
+++ b/tests/wpt/tests/css/css-sizing/stretch/flex-line-005.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11784">
+<script src='/resources/testharness.js'></script>
+<script src='/resources/testharnessreport.js'></script>
+<script src="/resources/check-layout-th.js"></script>
+<meta name="assert"
+ content="An item's cross-size:stretch should stretch to the line size, not the container size; single-line container has indefinite height">
+<style>
+ .container {
+ display: inline-flex;
+ width: 100px;
+ border: solid;
+ margin: 10px;
+ }
+
+ .container>div {
+ border: 3px solid;
+ }
+
+ .stretch {
+ height: -moz-available;
+ height: -webkit-fill-available;
+ height: stretch;
+ }
+</style>
+
+<div class="container">
+ <div class="stretch" style="width: 75px; border-color: cyan"
+ data-expected-height="156"></div>
+ <div style="border-color: orange; height: 150px"></div>
+</div>
+
+<script>
+ checkLayout(".stretch");
+</script>
diff --git a/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2-ref.html b/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2-ref.html
index 503e999788c..6d824e73d56 100644
--- a/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2-ref.html
+++ b/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2-ref.html
@@ -3,6 +3,7 @@
<title>CSS text decoration test: emphasis marks and punctuation</title>
<style>
+:root { text-autospace: no-autospace; }
span { text-emphasis: filled circle; }
</style>
diff --git a/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2.html b/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2.html
index 1a48f9d32cb..53d261e9c8c 100644
--- a/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2.html
+++ b/tests/wpt/tests/css/css-text-decor/text-emphasis-punctuation-2.html
@@ -6,6 +6,7 @@
<meta name="assert" content="emphasis marks are not drawn for punctuation (with a small set of exceptions)">
<style>
+:root { text-autospace: no-autospace; }
.emph { text-emphasis: filled circle; }
</style>
diff --git a/tests/wpt/tests/css/css-text/i18n/zh/css-text-line-break-zh-in-loose.html b/tests/wpt/tests/css/css-text/i18n/zh/css-text-line-break-zh-in-loose.html
index 56fec0bd3ed..54ce3c15735 100644
--- a/tests/wpt/tests/css/css-text/i18n/zh/css-text-line-break-zh-in-loose.html
+++ b/tests/wpt/tests/css/css-text/i18n/zh/css-text-line-break-zh-in-loose.html
@@ -9,6 +9,7 @@
<script src="/resources/testharnessreport.js"></script>
<meta name="assert" content="When the language is Chinese, and line-break:loose, a browser allows a break before an inseparable character.">
<style type="text/css">
+:root { text-autospace: no-autospace; }
@font-face {
font-family: 'mplus-1p-regular';
src: url('/fonts/mplus-1p-regular.woff') format('woff');
diff --git a/tests/wpt/tests/css/css-text/parsing/text-autospace-computed.html b/tests/wpt/tests/css/css-text/parsing/text-autospace-computed.html
index 9656f70956e..c8a4091eb99 100644
--- a/tests/wpt/tests/css/css-text/parsing/text-autospace-computed.html
+++ b/tests/wpt/tests/css/css-text/parsing/text-autospace-computed.html
@@ -11,6 +11,8 @@
<body>
<div id="target"></div>
<script>
+test_computed_value("text-autospace", "initial", "normal");
+
test_computed_value("text-autospace", "normal");
test_computed_value("text-autospace", "no-autospace");
test_computed_value("text-autospace", "auto");
diff --git a/tests/wpt/tests/css/css-text/parsing/text-spacing-computed.html b/tests/wpt/tests/css/css-text/parsing/text-spacing-computed.html
index 845cf075a9b..2ba02e87c9f 100644
--- a/tests/wpt/tests/css/css-text/parsing/text-spacing-computed.html
+++ b/tests/wpt/tests/css/css-text/parsing/text-spacing-computed.html
@@ -11,6 +11,8 @@
<body>
<div id="target"></div>
<script>
+test_computed_value("text-spacing", "initial", "normal");
+
test_computed_value("text-spacing", "normal");
test_computed_value("text-spacing", "none");
test_computed_value("text-spacing", "auto");
diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html
index d26fae09b03..499f8322fe4 100644
--- a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html
+++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001-ref.html
@@ -1,2 +1,3 @@
<!DOCTYPE html>
-<div id="target">国国AA国国AA国々</div>
+<meta charset="utf-8">
+<div id="target">国国AA国国AA国国</div>
diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001.html
index dfde20a265a..32c9c175d97 100644
--- a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001.html
+++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-001.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
+<meta charset="utf-8">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property">
-<link rel="help" href="text-autospace-dynamic-text-001-ref.html">
+<link rel="match" href="text-autospace-dynamic-text-001-ref.html">
<div id="target">国国</div>
<script>
const target_text = document.getElementById('target').firstChild;
diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-002.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-002.html
index ffc3d907ee5..bd0a1107dae 100644
--- a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-002.html
+++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-002.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
+<meta charset="utf-8">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property">
-<link rel="help" href="text-autospace-dynamic-text-001-ref.html">
+<link rel="match" href="text-autospace-dynamic-text-001-ref.html">
<div id="target">国国国国</div>
<script>
const target_text = document.getElementById('target').firstChild;
diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-003.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-003.html
index cf2237d48ef..d53762233cc 100644
--- a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-003.html
+++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-003.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
+<meta charset="utf-8">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property">
-<link rel="help" href="text-autospace-dynamic-text-001-ref.html">
+<link rel="match" href="text-autospace-dynamic-text-001-ref.html">
<div id="target">国国国国国</div>
<script>
const target_text = document.getElementById('target').firstChild;
diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-004.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-004.html
index c1057fc9005..4b3854c9608 100644
--- a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-004.html
+++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-dynamic-text-004.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
+<meta charset="utf-8">
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property">
-<link rel="help" href="text-autospace-dynamic-text-001-ref.html">
+<link rel="match" href="text-autospace-dynamic-text-001-ref.html">
<div id="target">国国AAAA国国AAAA国国</div>
<script>
const target_text = document.getElementById('target').firstChild;
diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001-ref.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001-ref.html
new file mode 100644
index 00000000000..266a69b298e
--- /dev/null
+++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<style>
+.test {
+ font-family: Ahem;
+ font-size: 40px;
+ text-autospace: no-autospace;
+
+ span {
+ margin-left: calc(1em / 8);
+ margin-right: calc(1em / 8);
+ }
+}
+</style>
+<div id="container">
+ <div lang="zh" class="test normal">国<span>!</span>国<span>#</span>国</div>
+</div>
diff --git a/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001.html b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001.html
new file mode 100644
index 00000000000..e8afdca9310
--- /dev/null
+++ b/tests/wpt/tests/css/css-text/text-autospace/text-autospace-zh-001.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-autospace-property">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<link rel="match" href="text-autospace-zh-001-ref.html">
+<style>
+.test {
+ font-family: Ahem;
+ font-size: 40px;
+ text-autospace: normal;
+}
+</style>
+<div id="container">
+ <div lang="zh" class="test">国!国#国</div>
+</div>
diff --git a/tests/wpt/tests/css/css-values/acos-asin-atan-atan2-invalid.html b/tests/wpt/tests/css/css-values/acos-asin-atan-atan2-invalid.html
index 727fc4df18a..5f894e35a56 100644
--- a/tests/wpt/tests/css/css-values/acos-asin-atan-atan2-invalid.html
+++ b/tests/wpt/tests/css/css-values/acos-asin-atan-atan2-invalid.html
@@ -74,4 +74,6 @@ test_invalid_angle('atan2( 0 ,)');
test_invalid_angle('atan2( () 30deg - 0.523599rad )');
test_invalid_angle('atan2(45deg )');
test_invalid_angle('atan2(30deg, + 0.261799rad)');
+test_invalid_angle('atan2(2, 1px)');
+test_invalid_angle('atan2(2, 1%)');
</script>
diff --git a/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-ref.html b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-ref.html
new file mode 100644
index 00000000000..4f994bd03f6
--- /dev/null
+++ b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-ref.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<html>
+<title>Nested View Transitions: group children sizing (ref)</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/">
+
+<style>
+#wrapper {
+ position: relative;
+}
+
+#clipper {
+ height: 200px;
+ width: 200px;
+ overflow: clip;
+}
+
+.item {
+ background: blue;
+ position: relative;
+ top: -25px;
+ left: -10px;
+
+ height: 50px;
+ width: 250px;
+ margin: 1px;
+ border: 1px solid black;
+}
+
+.popout {
+ position: absolute;
+ left: -9px;
+ top: 81px;
+ background: blue;
+
+ height: 50px;
+ width: 250px;
+ border: 1px solid black;
+}
+
+</style>
+
+<div id=wrapper>
+ <div id=clipper>
+ <div class=item></div>
+ <div class=item></div>
+ <div class=item></div>
+ <div class=item></div>
+ <div class=item></div>
+ </div>
+ <div class=popout></div>
+</div>
diff --git a/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border-ref.html b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border-ref.html
new file mode 100644
index 00000000000..f1a484400e7
--- /dev/null
+++ b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border-ref.html
@@ -0,0 +1,55 @@
+<!doctype html>
+<html>
+<title>Nested View Transitions: group children sizing (ref)</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/">
+
+<style>
+#wrapper {
+ position: relative;
+}
+
+#clipper {
+ height: 200px;
+ width: 200px;
+ overflow: clip;
+
+ border-width: 5px 10px 15px 20px;
+ border-style: solid;
+ border-color: green;
+}
+
+.item {
+ background: blue;
+ position: relative;
+ top: -25px;
+ left: -10px;
+
+ height: 50px;
+ width: 250px;
+ margin: 1px;
+ border: 1px solid black;
+}
+
+.popout {
+ position: absolute;
+ left: 11px;
+ top: 87px;
+ background: blue;
+
+ height: 50px;
+ width: 250px;
+ border: 1px solid black;
+}
+
+</style>
+
+<div id=wrapper>
+ <div id=clipper>
+ <div class=item></div>
+ <div class=item></div>
+ <div class=item></div>
+ <div class=item></div>
+ <div class=item></div>
+ </div>
+ <div class=popout></div>
+</div>
diff --git a/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border.html b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border.html
new file mode 100644
index 00000000000..cb0cf819b42
--- /dev/null
+++ b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing-with-border.html
@@ -0,0 +1,70 @@
+<!doctype html>
+<html class=reftest-wait>
+<title>Nested View Transitions: group children sizing with border</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/">
+<link rel="match" href="group-children-sizing-with-border-ref.html">
+<script src="/common/reftest-wait.js"></script>
+<script src="resources/compute-test.js"></script>
+<script src="/dom/events/scrolling/scroll_support.js"></script>
+
+<style>
+#clipper {
+ view-transition-group: contain;
+ view-transition-name: clipper;
+
+ border-width: 5px 10px 15px 20px;
+ border-style: solid;
+ border-color: green;
+
+ height: 200px;
+ width: 200px;
+}
+
+.item {
+ view-transition-name: match-element;
+ background: blue;
+ position: relative;
+ top: -25px;
+ left: -10px;
+
+ height: 50px;
+ width: 250px;
+ margin: 1px;
+ border: 1px solid black;
+}
+
+.item.popout {
+ view-transition-group: none;
+}
+
+::view-transition-group(*),
+::view-transition-old(*),
+::view-transition-new(*) {
+ animation-play-state: paused;
+}
+
+::view-transition-group-children(clipper) {
+ overflow: clip;
+}
+</style>
+
+<div id=clipper>
+ <div class=item></div>
+ <div class=item></div>
+ <div class="item popout"></div>
+ <div class=item></div>
+ <div class=item></div>
+</div>
+
+<script>
+
+function runTest() {
+ document.startViewTransition().ready.then(takeScreenshot);
+}
+
+onload = () => {
+ waitForCompositorReady().then(runTest);
+}
+</script>
+
+
diff --git a/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing.html b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing.html
new file mode 100644
index 00000000000..88916ddf486
--- /dev/null
+++ b/tests/wpt/tests/css/css-view-transitions/nested/group-children-sizing.html
@@ -0,0 +1,66 @@
+<!doctype html>
+<html class=reftest-wait>
+<title>Nested View Transitions: group children sizing</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/">
+<link rel="match" href="group-children-sizing-ref.html">
+<script src="/common/reftest-wait.js"></script>
+<script src="resources/compute-test.js"></script>
+<script src="/dom/events/scrolling/scroll_support.js"></script>
+
+<style>
+#clipper {
+ view-transition-group: contain;
+ view-transition-name: clipper;
+
+ height: 200px;
+ width: 200px;
+}
+
+.item {
+ view-transition-name: match-element;
+ background: blue;
+ position: relative;
+ top: -25px;
+ left: -10px;
+
+ height: 50px;
+ width: 250px;
+ margin: 1px;
+ border: 1px solid black;
+}
+
+.item.popout {
+ view-transition-group: root;
+}
+
+::view-transition-group(*),
+::view-transition-old(*),
+::view-transition-new(*) {
+ animation-play-state: paused;
+}
+
+::view-transition-group-children(clipper) {
+ overflow: clip;
+}
+</style>
+
+<div id=clipper>
+ <div class=item></div>
+ <div class=item></div>
+ <div class="item popout"></div>
+ <div class=item></div>
+ <div class=item></div>
+</div>
+
+<script>
+
+function runTest() {
+ document.startViewTransition().ready.then(takeScreenshot);
+}
+
+onload = () => {
+ waitForCompositorReady().then(runTest);
+}
+</script>
+
+
diff --git a/tests/wpt/tests/css/css-view-transitions/nested/rounded-border-clipper.html b/tests/wpt/tests/css/css-view-transitions/nested/rounded-border-clipper.html
index 098e5566585..239bcdd791d 100644
--- a/tests/wpt/tests/css/css-view-transitions/nested/rounded-border-clipper.html
+++ b/tests/wpt/tests/css/css-view-transitions/nested/rounded-border-clipper.html
@@ -33,9 +33,6 @@
::view-transition-group(clipper) {
animation-play-state: paused;
-}
-
-::view-transition-group-children(clipper) {
overflow: clip;
border-radius: 20px;
}
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 cc401b8bd6f..b57fce0d73f 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
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
-<title>View transitions: author styles ignored during prepare</title>
+<title>View transitions: exception thrown during transition</title>
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@@ -32,12 +32,26 @@ html::view-transition-new(shared) {
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
await waitForCompositorReady();
- return new Promise((resolve, reject) => {
- document.startViewTransition(() => {
- resolve();
- throw 'error';
- });
+ const vt = document.startViewTransition(() => {
+ throw "error";
});
+ let update_callback_resolution;
+ let ready_resolution;
+ let finished_resolution;
+
+ await vt.updateCallbackDone.then(
+ () => { update_callback_resolution = "fulfilled" },
+ () => { update_callback_resolution = "rejected" });
+ await vt.ready.then(
+ () => { ready_resolution = "fulfilled" },
+ () => { ready_resolution = "rejected" });
+ await vt.finished.then(
+ () => { finished_resolution = "fulfilled" },
+ () => { finished_resolution = "rejected" });
+
+ assert_equals(update_callback_resolution, "rejected");
+ assert_equals(ready_resolution, "rejected");
+ assert_equals(finished_resolution, "rejected");
}, "An exception thrown during a transition shouldn't crash.");
</script>
diff --git a/tests/wpt/tests/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html b/tests/wpt/tests/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html
index 0a34a4b73ff..9914097185b 100644
--- a/tests/wpt/tests/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html
+++ b/tests/wpt/tests/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html
@@ -29,12 +29,12 @@ promise_test(async t => {
let viewbox = window.getComputedStyle(
document.documentElement, "::view-transition-new(target)").objectViewBox;
- assert_equals(viewbox, "none", "incorrect viewbox " + viewbox);
+ assert_in_array(viewbox, ["none", undefined], "incorrect viewbox " + viewbox);
first.style.filter = "blur(5px)";
viewbox = window.getComputedStyle(
document.documentElement, "::view-transition-new(target)").objectViewBox;
- assert_equals(viewbox, "none", "incorrect viewbox " + viewbox);
+ assert_in_array(viewbox, ["none", undefined], "incorrect viewbox " + viewbox);
transition.finished.then(resolve, reject);
});
diff --git a/tests/wpt/tests/css/css-view-transitions/scoped/contain-view-transition-name-discovery.html b/tests/wpt/tests/css/css-view-transitions/scoped/contain-view-transition-name-discovery.html
new file mode 100644
index 00000000000..10a1a1197b1
--- /dev/null
+++ b/tests/wpt/tests/css/css-view-transitions/scoped/contain-view-transition-name-discovery.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <!-- TODO update link -->
+ <link rel="help" href="https://www.w3.org/TR/css-view-transitions-2/">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Contain and name discovery</title>
+</head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+ #outer {
+ view-transition-name: outer;
+ }
+
+ #inner {
+ view-transition-name: inner;
+ }
+
+ .containment {
+ contain: view-transition;
+ }
+</style>
+<body>
+ <div id="outer">
+ <div id="inner"></div>
+ </div>
+</body>
+<script>
+ function capturedNames() {
+ const regexp = /\((?<name>[^\)]+)/;
+ const names = document.getAnimations()
+ .map(a => a.effect.pseudoElement)
+ .map(name => name.match(regexp).groups.name);
+ return [...new Set(names)].sort();
+ }
+
+ promise_test(async t => {
+ const outer = document.getElementById('outer');
+ const inner = document.getElementById('inner');
+
+ let vt = document.startViewTransition(() => {});
+ await vt.ready;
+ assert_array_equals(
+ capturedNames(), ['inner', 'outer', 'root'],
+ 'Retrieve all names in absence of contain style');
+ vt.skipTransition();
+
+ document.documentElement.classList.toggle('containment');
+ vt = document.startViewTransition(() => {});
+ await vt.ready;
+ assert_array_equals(
+ capturedNames(), ['inner', 'outer', 'root'],
+ 'contain on the root element does not affect tag discovery');
+ vt.skipTransition();
+
+ outer.classList.toggle('containment');
+ vt = document.startViewTransition(() => {});
+ await vt.ready;
+ assert_array_equals(
+ capturedNames(), ['root'],
+ 'contain on outer element blocks tag discovery in subtree');
+ vt.skipTransition();
+
+ vt = outer.startViewTransition(() => {});
+ await vt.ready;
+ assert_array_equals(
+ capturedNames(), ['inner', 'outer'],
+ 'contain on the scoped element includes self');
+ vt.skipTransition();
+
+ vt = inner.startViewTransition(() => {});
+ await vt.ready;
+ assert_array_equals(
+ capturedNames(), ['inner'],
+ 'contain on ancestor of the scoped element does not affect tag ' +
+ 'discovery');
+ vt.skipTransition();
+
+ outer.classList.toggle('containment');
+ inner.classList.toggle('containment');
+ vt = document.startViewTransition(() => {});
+ await vt.ready;
+ assert_array_equals(
+ capturedNames(), ['outer', 'root'],
+ 'contain on inner element still permits tag discovery of ancestor ' +
+ 'elements');
+ vt.skipTransition();
+
+ vt = outer.startViewTransition(() => {});
+ await vt.ready;
+ assert_array_equals(
+ capturedNames(), ['outer'],
+ 'contain on inner element limits tag discovery on outer element');
+ vt.skipTransition();
+
+ vt = inner.startViewTransition(() => {});
+ await vt.ready;
+ assert_array_equals(
+ capturedNames(), ['inner'],
+ 'contain permits tag discovery on scoped element');
+ vt.skipTransition();
+ }, 'Contain: view-transition blocks propagation of name discovery.');
+</script>
+</html>
diff --git a/tests/wpt/tests/css/css-view-transitions/scoped/crashtests/shuffle.html b/tests/wpt/tests/css/css-view-transitions/scoped/crashtests/shuffle.html
new file mode 100644
index 00000000000..fe110dbfe50
--- /dev/null
+++ b/tests/wpt/tests/css/css-view-transitions/scoped/crashtests/shuffle.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html class="test-wait">
+<head>
+<style>
+
+#s {
+ position: relative;
+ view-transition-name: wrapper;
+ border: 5px solid lightgrey;
+ height: 200px;
+ width: 250px;
+}
+.i {
+ position: relative;
+ width: 150px; height: 60px;
+ border: 5px solid #ace;
+}
+::view-transition-group(*),
+::view-transition-old(*),
+::view-transition-new(*) { animation: unset; }
+
+</style>
+</head>
+<body>
+<div id="s">
+ <div class="i">A</div>
+ <div class="i">B</div>
+</div>
+<script>
+
+onload = async () => {
+ await s.startViewTransition(() => {
+ s.appendChild(s.children[0]);
+ }).finished;
+ document.documentElement.classList.remove('test-wait');
+}
+
+</script>
+</body>
+</html>
diff --git a/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip-ref.html b/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip-ref.html
new file mode 100644
index 00000000000..73cfab22e7d
--- /dev/null
+++ b/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip-ref.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>
+#wrapper {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ border-radius: 50px;
+ overflow: hidden;
+}
+#child {
+ position: absolute;
+ width: 300px;
+ height: 300px;
+ backdrop-filter: invert(100%);
+}
+</style>
+<body>
+<div id="wrapper">
+ <div id="child"></div>
+</div>
+</body>
diff --git a/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip.html b/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip.html
new file mode 100644
index 00000000000..29e8ce71e5a
--- /dev/null
+++ b/tests/wpt/tests/css/filter-effects/css-backdrop-filter-transform-clip.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+<title>CSS Backdrop Filter with transform and clip</title>
+<link rel="author" href="mailto:kevers@chromium.org">
+<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
+<link rel="match" href="css-backdrop-filter-transform-clip-ref.html">
+<link rel="help" href="https://crbug.com/401816608">
+<script src="/common/reftest-wait.js"></script>
+<style>
+#wrapper {
+ position: absolute;
+ width: 200px;
+ height: 200px;
+ border-radius: 50px;
+ overflow: hidden;
+}
+
+#child {
+ position: absolute;
+ left: 50px;
+ width: 300px;
+ height: 300px;
+ backdrop-filter: invert(100%);
+}
+@keyframes a {
+ 0% { transform: translateX(0px); }
+ 50% { transform: translateX(-100px); }
+ 100% { transform: translateX(100px); }
+}
+#animation {
+ animation: a 2s linear paused;
+}
+</style>
+<body>
+<div id="wrapper">
+ <div id="animation">
+ <div id="child"></div>
+ </div>
+</div>
+</body>
+<script>
+ function rAF() {
+ return new Promise(resolve => {
+ requestAnimationFrame(resolve);
+ });
+ }
+ async function runTest() {
+ await rAF();
+ const anim = document.getAnimations()[0];
+ anim.ready.then(async () => {
+ await rAF();
+ // Initially the backdrop filter does not completely cover the clip area
+ // because of left: 50px. Shift the backdrop filter 100px to left.
+ // Ensure the filter now completely covers the clip and is not applied
+ // outside the left boundary of the clip.
+ anim.currentTime = 1000;
+ await rAF();
+ takeScreenshot();
+ });
+ }
+ window.onload = runTest;
+</script>
+</html>
diff --git a/tests/wpt/tests/css/filter-effects/drop-shadow-currentcolor-inheritance.html b/tests/wpt/tests/css/filter-effects/drop-shadow-currentcolor-inheritance.html
new file mode 100644
index 00000000000..92cf94e29b0
--- /dev/null
+++ b/tests/wpt/tests/css/filter-effects/drop-shadow-currentcolor-inheritance.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<title>Filter Effects: Inheritance of 'currentcolor' in drop-shadow()</title>
+<link rel="help" href="https://drafts.fxtf.org/filter-effects/#funcdef-filter-drop-shadow">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+#filter {
+ color: red;
+ filter: drop-shadow(100px 0px 0px currentcolor);
+}
+#target {
+ background-color: black;
+ color: green;
+ width: 100px;
+ height: 100px;
+ filter: inherit;
+}
+</style>
+<div id="filter">
+ <div id="target"></div>
+</div>
+<script>
+test(function() {
+ assert_equals(getComputedStyle(target).filter, "drop-shadow(rgb(0, 128, 0) 100px 0px 0px)");
+}, "Test currentcolor inheritance in drop-shadow()");
+
+test(function() {
+ target.style.color = "blue";
+ assert_equals(getComputedStyle(target).filter, "drop-shadow(rgb(0, 0, 255) 100px 0px 0px)");
+}, "Test currentcolor inheritance in drop-shadow() after color mutation");
+
+</script>
diff --git a/tests/wpt/tests/custom-elements/registries/idlharness.window.js b/tests/wpt/tests/custom-elements/registries/idlharness.window.js
deleted file mode 100644
index b2727e3a874..00000000000
--- a/tests/wpt/tests/custom-elements/registries/idlharness.window.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// META: script=/resources/WebIDLParser.js
-// META: script=/resources/idlharness.js
-
-idl_test(
- ["scoped-custom-elements-registry"],
- ["html", "dom"],
- (idl_array) => {
- let element = document.createElement("div");
- let shadowRoot = element.attachShadow({ mode: "open" });
- let customElementRegistry = new CustomElementRegistry();
- let templateElement = document.createElement("template");
- idl_array.add_objects({
- document,
- element,
- shadowRoot,
- customElementRegistry,
- templateElement,
- });
- },
-);
diff --git a/tests/wpt/tests/custom-elements/registries/valid-custom-element-names.tentative.html b/tests/wpt/tests/custom-elements/registries/valid-custom-element-names.tentative.html
new file mode 100644
index 00000000000..72a5999e3a9
--- /dev/null
+++ b/tests/wpt/tests/custom-elements/registries/valid-custom-element-names.tentative.html
@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<link rel=author href="mailto:jarhar@chromium.org">
+<link rel=help href="https://github.com/whatwg/html/pull/7991">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script>
+function isAsciiLowerAlpha(codePoint) {
+ return codePoint >= 0x61 && codePoint <= 0x7A;
+}
+function isAsciiUpperAlpha(codePoint) {
+ return codePoint >= 0x41 && codePoint <= 0x5A;
+}
+function isAsciiAlpha(codePoint) {
+ return isAsciiLowerAlpha(codePoint) || isAsciiUpperAlpha(codePoint);
+}
+function isAsciiDigit(codePoint) {
+ return codePoint >= 0x30 && codePoint <= 0x39;
+}
+function isAsciiWhitespace(codePoint) {
+ return codePoint == 0x9 || codePoint == 0xA || codePoint == 0xC || codePoint == 0xD || codePoint == 0x20;
+}
+
+function debugString(str) {
+ const codePoints = [];
+ for (const c of str) {
+ codePoints.push(c.codePointAt(0));
+ }
+ return `code points: ${JSON.stringify(codePoints)}, string: "${str}"`;
+}
+
+const validCustomElementNames = [
+ 'annotation-xml-custom',
+];
+const invalidCustomElementNames = [
+ '',
+ 'annotation-xml',
+ 'color-profile',
+ 'font-face',
+ 'font-face-src',
+ 'font-face-uri',
+ 'font-face-format',
+ 'font-face-name',
+ 'missing-glyph',
+];
+
+const testCodePoints = [0x1F171, 0x1F196, 0x10000];
+for (let i = 0; i < 0x80; i++) {
+ testCodePoints.push(i);
+}
+
+const elementLocalNameRegex = /^(?:[A-Za-z][^\0\t\n\f\r\u0020/>]*|[:_\u0080-\u{10FFFF}][A-Za-z0-9-.:_\u0080-\u{10FFFF}]*)$/u;
+
+function isValidCustomElementName(str) {
+ if (!str.length) {
+ return false;
+ }
+
+ if (!str.includes('-')) {
+ return false;
+ }
+
+ let first = true;
+ for (const c of str) {
+ const codePoint = c.codePointAt(0);
+ if (first) {
+ if (!isAsciiLowerAlpha(codePoint)) {
+ return false;
+ }
+ first = false;
+ }
+ if (isAsciiUpperAlpha(codePoint)) {
+ return false;
+ }
+ }
+
+ return elementLocalNameRegex.test(str);
+}
+
+// In order to test the branching logic of valid element local names and the
+// requirement of having a '-' character, this method generates different
+// variations of potential custom element names given two code points.
+function createStringWithSeparatorMode(codePoint, prefix, separatorMode) {
+ const str = String.fromCodePoint(codePoint);
+ if (separatorMode == 0) {
+ return `${prefix}${str}`;
+ } else if (separatorMode == 1) {
+ return `${prefix}-${str}`;
+ } else if (separatorMode == 2) {
+ return `${prefix}${str}-element`;
+ }
+}
+
+for (const prefix of ['', 'a', 'A', ' ', '\0']) {
+ for (const codePoint of testCodePoints) {
+ for (const separatorMode of [0, 1, 2]) {
+ const str = createStringWithSeparatorMode(
+ codePoint, prefix, separatorMode);
+ if (isValidCustomElementName(str)) {
+ validCustomElementNames.push(str);
+ } else {
+ invalidCustomElementNames.push(str);
+ }
+ }
+ }
+}
+
+let nextClassNumber = 1;
+function createElementClass() {
+ const name = `CustomElement${nextClassNumber++}`;
+ const newClass = function() {};
+ newClass.prototype = HTMLElement;
+ return newClass;
+}
+
+promise_test(async t => {
+ for (const validName of validCustomElementNames) {
+ try {
+ const newClass = createElementClass();
+ customElements.define(validName, newClass);
+ await customElements.whenDefined(validName);
+ } catch (error) {
+ assert_unreached(`Custom element name should have been valid but threw error: ${debugString(validName)} ${error.toString()}`);
+ }
+ }
+
+ for (const invalidName of invalidCustomElementNames) {
+ const newClass = createElementClass();
+ assert_throws_dom(
+ 'SyntaxError',
+ () => customElements.define(invalidName, newClass),
+ `customElements.define should have thrown for invalid name: ${debugString(invalidName)}`);
+ await promise_rejects_dom(t, 'SyntaxError',
+ customElements.whenDefined(invalidName),
+ `customElements.whenDefined should have thrown for invalid name: ${debugString(invalidName)}`);
+ }
+});
+</script>
diff --git a/tests/wpt/tests/device-bound-session-credentials/refresh_session.py b/tests/wpt/tests/device-bound-session-credentials/refresh_session.py
index d05340a318c..ab491e30104 100644
--- a/tests/wpt/tests/device-bound-session-credentials/refresh_session.py
+++ b/tests/wpt/tests/device-bound-session-credentials/refresh_session.py
@@ -9,7 +9,8 @@ def main(request, response):
session_id_header = request.headers.get("Sec-Session-Id")
if session_id_header == None:
return (400, response.headers, "")
- session_id = int(session_id_header.decode('utf-8'))
+ session_id_header = session_id_header.decode('utf-8')
+ session_id = int(session_id_header)
if test_session_manager.get_should_refresh_end_session():
response_body = {
@@ -36,4 +37,7 @@ def main(request, response):
if not verified or jwt_payload.get("jti") != challenge:
return (400, response.headers, "")
+ if jwt_payload.get("sub") != session_id_header:
+ return (400, response.headers, "")
+
return test_session_manager.get_session_instructions_response(session_id, request)
diff --git a/tests/wpt/tests/device-bound-session-credentials/start_session.py b/tests/wpt/tests/device-bound-session-credentials/start_session.py
index b9d745e3ed6..d2b7ee87818 100644
--- a/tests/wpt/tests/device-bound-session-credentials/start_session.py
+++ b/tests/wpt/tests/device-bound-session-credentials/start_session.py
@@ -19,4 +19,7 @@ def main(request, response):
if jwt_payload.get("authorization") != test_session_manager.get_authorization_value():
return (400, response.headers, "")
+ if jwt_payload.get("sub") is not None:
+ return (400, response.headers, "")
+
return test_session_manager.get_session_instructions_response(session_id, request)
diff --git a/tests/wpt/tests/dom/nodes/name-validation.tentative.html b/tests/wpt/tests/dom/nodes/name-validation.tentative.html
new file mode 100644
index 00000000000..ca5e9c11824
--- /dev/null
+++ b/tests/wpt/tests/dom/nodes/name-validation.tentative.html
@@ -0,0 +1,296 @@
+<!DOCTYPE html>
+<meta name=timeout content=long>
+<link rel=author href="mailto:jarhar@chromium.org">
+<link rel=help href="https://github.com/whatwg/dom/pull/1079">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script>
+function isAsciiAlpha(codePoint) {
+ return (codePoint >= 0x41 && codePoint <= 0x5A) || (codePoint >= 0x61 && codePoint <= 0x7A);
+}
+function isAsciiDigit(codePoint) {
+ return codePoint >= 0x30 && codePoint <= 0x39;
+}
+function isAsciiWhitespace(codePoint) {
+ return codePoint == 0x9 || codePoint == 0xA || codePoint == 0xC || codePoint == 0xD || codePoint == 0x20;
+}
+
+function debugString(str) {
+ const codePoints = [];
+ for (let i = 0; i < str.length; i++) {
+ codePoints.push(str.charCodeAt(i));
+ }
+ return `code points: ${JSON.stringify(codePoints)}, string: "${str}"`;
+}
+
+const latin1CodePoint = 100;
+const latin1 = String.fromCodePoint(latin1CodePoint);
+const smallEmoji = 'smallEmoji🆖';
+const bigEmoji = 'bigEmoji🅱️';
+
+// Testing every variation of a namespace prefix with every variation of a
+// local name would make the test take too long to run, so use these instead when
+// combining with a namespace prefix.
+const validElementLocalNamesShortened = [
+ 'div', `latin1${latin1}`, smallEmoji, bigEmoji
+];
+const invalidElementLocalNamesShortened = [
+ '', 'space ', 'newline\n', 'null\0', `:soh${String.fromCodePoint(1)}`, '5'
+];
+const validAttributeLocalNamesShortened = [
+ 'attr', `latin1${latin1}`, smallEmoji, bigEmoji
+];
+const invalidAttributeLocalNamesShortened = [
+ '', 'space ', 'newline\n', 'null\0'
+];
+
+const validElementLocalNames = validElementLocalNamesShortened.slice();
+const invalidElementLocalNames = invalidElementLocalNamesShortened.slice();
+const validAttributeLocalNames = validAttributeLocalNamesShortened.slice();
+const invalidAttributeLocalNames = invalidAttributeLocalNamesShortened.slice();
+const validNamespacePrefixes = ['', smallEmoji, bigEmoji];
+const invalidNamespacePrefixes = [];
+const validDoctypes = [''];
+const invalidDoctypes = [];
+
+const codePoints = [];
+for (let i = 0; i < 0x80; i++) {
+ codePoints.push(i);
+}
+codePoints.push(latin1CodePoint);
+
+// attributes and namespaces
+for (const codePoint of codePoints) {
+ const str = String.fromCodePoint(codePoint);
+ if (codePoint == 0 || isAsciiWhitespace(codePoint) || codePoint == 0x2F || codePoint == 0x3E) {
+ invalidNamespacePrefixes.push(str);
+ invalidAttributeLocalNames.push(str);
+ } else if (codePoint == 0x3A) {
+ // colons are not valid namespace prefixes, but due to parsing they can
+ // never be considered as a namespace prefix, only as a separator between the
+ // prefix and the local name.
+ validAttributeLocalNames.push(str);
+ } else if (codePoint == 0x3D) {
+ validNamespacePrefixes.push(str);
+ invalidAttributeLocalNames.push(str);
+ } else {
+ validNamespacePrefixes.push(str);
+ validAttributeLocalNames.push(str);
+ }
+}
+
+// valid element local names
+for (const firstChar of codePoints) {
+ for (const secondChar of codePoints) {
+ const str = `${String.fromCodePoint(firstChar)}${String.fromCodePoint(secondChar)}`;
+ if (isAsciiAlpha(firstChar)) {
+ if (!secondChar || secondChar == 0x2F || secondChar == 0x3E || isAsciiWhitespace(secondChar)) {
+ invalidElementLocalNames.push(str);
+ } else {
+ validElementLocalNames.push(str);
+ }
+ } else {
+ if (firstChar == 0x3A || firstChar == 0x5F || firstChar >= 0x80) {
+ if (isAsciiAlpha(secondChar) ||
+ isAsciiDigit(secondChar) ||
+ secondChar == 0x2D ||
+ secondChar == 0x2E ||
+ secondChar == 0x3A ||
+ secondChar == 0x5F ||
+ secondChar >= 0x80) {
+ validElementLocalNames.push(str);
+ } else {
+ invalidElementLocalNames.push(str);
+ }
+ } else {
+ invalidElementLocalNames.push(str);
+ }
+ }
+ }
+}
+
+// doctypes
+for (const codePoint of codePoints) {
+ const str = String.fromCodePoint(codePoint);
+ if (codePoint == 0 || isAsciiWhitespace(codePoint) || codePoint == 0x3E) {
+ invalidDoctypes.push(str);
+ } else {
+ validDoctypes.push(str);
+ }
+}
+
+test(() => {
+ // This regex is provided in the spec and is used here to double check our
+ // test input.
+ const validNameRegex = /^(?:[A-Za-z][^\0\t\n\f\r\u0020/>]*|[:_\u0080-\u{10FFFF}][A-Za-z0-9-.:_\u0080-\u{10FFFF}]*)$/u;
+ for (const validName of validElementLocalNames) {
+ assert_true(
+ validNameRegex.test(validName),
+ `Regex should match: ${debugString(validName)}`);
+ try {
+ document.createElement(validName);
+ } catch (error) {
+ assert_unreached(
+ `document.createElement should not have thrown an error for: ${debugString(validName)} ${error.toString()}`);
+ }
+ }
+ for (const invalidName of invalidElementLocalNames) {
+ assert_false(
+ validNameRegex.test(invalidName),
+ `Regex should not match: ${debugString(invalidName)}`);
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => document.createElement(invalidName),
+ `document.createElement should throw an error for: ${debugString(invalidName)}`);
+ }
+}, 'Valid and invalid characters in createElement.');
+
+test(() => {
+ for (const validNamespace of validNamespacePrefixes) {
+ for (const validName of validElementLocalNamesShortened) {
+ try {
+ document.createElementNS('namespaceuri', `${validNamespace}:${validName}`);
+ } catch (error) {
+ assert_unreached(
+ `document.createElementNS should not have thrown an error for: ${debugString(validNamespace)} ${debugString(validName)} ${error.toString()}`);
+ }
+ try {
+ document.implementation.createDocument('namespaceuri', `${validNamespace}:${validName}`);
+ } catch (error) {
+ assert_unreached(
+ `createDocument should not have thrown an error for: ${debugString(validNamespace)} ${debugString(validName)} ${error.toString()}`);
+ }
+ }
+ for (const invalidName of invalidElementLocalNamesShortened) {
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => document.createElementNS('namespaceuri', `${validNamespace}:${invalidName}`),
+ `document.createElementNS should throw an error for: ${debugString(validNamespace)} ${debugString(invalidName)}`);
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => document.implementation.createDocument('namespaceuri', `${validNamespace}:${invalidName}`),
+ `createDocument should throw an error for: ${debugString(validNamespace)} ${debugString(invalidName)}`);
+ }
+ }
+ for (const invalidNamespace of invalidNamespacePrefixes) {
+ for (const localName of validElementLocalNamesShortened.concat(invalidElementLocalNamesShortened)) {
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => document.createElementNS('namespaceuri', `${invalidNamespace}:${localName}`),
+ `document.createElementNS should throw an error for: ${debugString(invalidNamespace)} ${debugString(localName)}`);
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => document.implementation.createDocument('namespaceuri', `${invalidNamespace}:${localName}`),
+ `createDocument should throw an error for: ${debugString(invalidNamespace)} ${debugString(localName)}`);
+ }
+ }
+}, 'Valid and invalid characters in createElementNS and createDocument.');
+
+test(() => {
+ for (const validAttributeName of validAttributeLocalNames) {
+ const element = document.createElement('div');
+ try {
+ element.setAttribute(validAttributeName, 'value');
+ } catch (error) {
+ assert_unreached(
+ `element.setAttribute should not have thrown an error for: ${debugString(validAttributeName)} ${error.toString()}`);
+ }
+ try {
+ element.toggleAttribute(validAttributeName);
+ } catch (error) {
+ assert_unreached(
+ `element.toggleAttribute should not have thrown an error for: ${debugString(validAttributeName)} ${error.toString()}`);
+ }
+ try {
+ element.toggleAttribute(validAttributeName, false);
+ } catch (error) {
+ assert_unreached(
+ `element.toggleAttribute with false should not have thrown an error for: ${debugString(validAttributeName)} ${error.toString()}`);
+ }
+ try {
+ document.createAttribute(validAttributeName);
+ } catch (error) {
+ assert_unreached(
+ `document.createAttribute should not have thrown an error for: ${debugString(validAttributeName)} ${error.toString()}`);
+ }
+ }
+ for (const invalidAttributeName of invalidAttributeLocalNames) {
+ const element = document.createElement('div');
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => element.setAttribute(invalidAttributeName, 'value'),
+ `element.setAttribute should throw an error for: ${debugString(invalidAttributeName)}`);
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => element.toggleAttribute(invalidAttributeName),
+ `element.toggleAttribute should throw an error for: ${debugString(invalidAttributeName)}`);
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => element.toggleAttribute(invalidAttributeName, false),
+ `element.toggleAttribute with false should throw an error for: ${debugString(invalidAttributeName)}`);
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => document.createAttribute(invalidAttributeName),
+ `document.createAttribute should throw an error for: ${debugString(invalidAttributeName)}`);
+ }
+}, 'Valid and invalid characters in setAttribute, toggleAttribute, and createAttribute.');
+
+test(() => {
+ for (const validNamespace of validNamespacePrefixes) {
+ for (const validLocalName of validAttributeLocalNamesShortened) {
+ const element = document.createElement('div');
+ try {
+ element.setAttributeNS('namespaceuri', `${validNamespace}:${validLocalName}`, 'value');
+ } catch (error) {
+ assert_unreached(`element.setAttributeNS should not have thrown an error for: ${debugString(validNamespace)} ${debugString(validLocalName)} ${error.toString()}`);
+ }
+ try {
+ document.createAttributeNS('namespaceuri', `${validNamespace}:${validLocalName}`);
+ } catch (error) {
+ assert_unreached(`document.createAttributeNS should not have thrown an error for: ${debugString(validNamespace)} ${debugString(validLocalName)} ${error.toString()}`);
+ }
+ }
+ for (const invalidLocalName of invalidAttributeLocalNamesShortened) {
+ const element = document.createElement('div');
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => element.setAttributeNS('namespaceuri', `${validNamespace}:${invalidLocalName}`, 'value'),
+ `element.setAttributeNS should have thrown an error for: ${debugString(validNamespace)} ${debugString(invalidLocalName)}`);
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => document.createAttributeNS('namespaceuri', `${validNamespace}:${invalidLocalName}`),
+ `document.createAttributeNS should have thrown an error for: ${debugString(validNamespace)} ${debugString(invalidLocalName)}`);
+ }
+ }
+ for (const invalidNamespace of invalidNamespacePrefixes) {
+ for (const localName of validAttributeLocalNamesShortened.concat(invalidAttributeLocalNamesShortened)) {
+ const element = document.createElement('div');
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => element.setAttributeNS('namespaceuri', `${invalidNamespace}:${localName}`, ''),
+ `element.setAttributeNS should have thrown an error for: ${debugString(invalidNamespace)} ${debugString(localName)}`);
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => document.createAttributeNS('namespaceuri', `${invalidNamespace}:${localName}`),
+ `document.createAttributeNS should have thrown an error for: ${debugString(invalidNamespace)} ${debugString(localName)}`);
+ }
+ }
+}, 'Valid and invalid characters in setAttributeNS and createAttributeNS.');
+
+test(() => {
+ for (const validDoctype of validDoctypes) {
+ try {
+ document.implementation.createDocumentType(validDoctype, 'publicid', 'systemid');
+ } catch (error) {
+ assert_unreached(`createDocumentType should not have thrown an error for ${debugString(validDoctype)} ${error.toString()}`);
+ }
+ }
+ for (const invalidDoctype of invalidDoctypes) {
+ assert_throws_dom(
+ 'InvalidCharacterError',
+ () => document.implementation.createDocumentType(invalidDoctype, 'publicid', 'systemid'),
+ `createDocumentType should have thrown an error for: ${debugString(invalidDoctype)}`);
+ }
+}, 'Valid and invalid characters in createDocumentType.');
+</script>
diff --git a/tests/wpt/tests/fedcm/fedcm-login-status/idp-login-with-failed-accounts-fetch.https.html b/tests/wpt/tests/fedcm/fedcm-login-status/idp-login-with-failed-accounts-fetch.https.html
new file mode 100644
index 00000000000..75d2c589b1d
--- /dev/null
+++ b/tests/wpt/tests/fedcm/fedcm-login-status/idp-login-with-failed-accounts-fetch.https.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>FedCM IDP log-in status API tests</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+
+<script type="module">
+import {request_options_with_mediation_required,
+ fedcm_test,
+ fedcm_get_dialog_type_promise,
+ select_manifest,
+ mark_signed_out} from '../support/fedcm-helper.sub.js';
+
+fedcm_test(async t => {
+ await mark_signed_out();
+
+ let test_options = request_options_with_mediation_required("manifest_no_accounts_login_delay.json");
+ await select_manifest(t, test_options);
+
+ test_options.identity.mode = "active";
+ let cred_promise = navigator.credentials.get(test_options);
+
+ // We should get the login popup window, which will automatically set
+ // the login status and close itself.
+ // The promise should get rejected because the accounts list is empty.
+
+ return promise_rejects_dom(t, 'NetworkError', cred_promise);
+}, 'Tests the IDP login dialog and subsequent account chooser.');
+</script>
diff --git a/tests/wpt/tests/fedcm/support/login_delay.html b/tests/wpt/tests/fedcm/support/login_delay.html
new file mode 100644
index 00000000000..469a7ee5cbe
--- /dev/null
+++ b/tests/wpt/tests/fedcm/support/login_delay.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<script>
+async function doLogin() {
+ navigator.login.setStatus("logged-in");
+ // Delay the close call to allow the accounts fetch to complete beforehand.
+ setTimeout(() => {
+ IdentityProvider.close();
+ }, 200);
+}
+window.onload = doLogin;
+</script>
diff --git a/tests/wpt/tests/fedcm/support/manifest_no_accounts_login_delay.json b/tests/wpt/tests/fedcm/support/manifest_no_accounts_login_delay.json
new file mode 100644
index 00000000000..030e4a85bfa
--- /dev/null
+++ b/tests/wpt/tests/fedcm/support/manifest_no_accounts_login_delay.json
@@ -0,0 +1,6 @@
+{
+ "accounts_endpoint": "no_accounts.py",
+ "client_metadata_endpoint": "client_metadata.py",
+ "id_assertion_endpoint": "token_with_account_id.py",
+ "login_url": "login_delay.html"
+}
diff --git a/tests/wpt/tests/fetch/fetch-later/resources/fetch-later-helper.js b/tests/wpt/tests/fetch/fetch-later/resources/fetch-later-helper.js
index ef1d7090a8f..32220ae39e3 100644
--- a/tests/wpt/tests/fetch/fetch-later/resources/fetch-later-helper.js
+++ b/tests/wpt/tests/fetch/fetch-later/resources/fetch-later-helper.js
@@ -415,7 +415,10 @@ class FetchLaterIframeExpectation {
}
if (e.data.type === FetchLaterIframeMessageType.ERROR) {
const actual = e.data.error.name || e.data.error.type;
- if (e.data.error.constructor.name === 'DOMException' &&
+ if (this.expectedDomErrorName === 'QuotaExceededError') {
+ return actual == this.expectedDomErrorName;
+ } else if (
+ e.data.error.constructor.name === 'DOMException' &&
actual == this.expectedDomErrorName) {
return true;
}
diff --git a/tests/wpt/tests/fetch/fetch-later/resources/fetch-later.html b/tests/wpt/tests/fetch/fetch-later/resources/fetch-later.html
index b295be116c7..955f815d940 100644
--- a/tests/wpt/tests/fetch/fetch-later/resources/fetch-later.html
+++ b/tests/wpt/tests/fetch/fetch-later/resources/fetch-later.html
@@ -30,6 +30,12 @@
fetchLater(TARGET_URL, REQUEST_INIT);
postMessageBack({type: FetchLaterIframeMessageType.DONE});
} catch (e) {
+ if (e.name == "QuotaExceededError" &&
+ e instanceof DOMException) {
+ // PostMessage is unable to serialize the QuotExceededError object.
+ // Therefore do basic checks here and pass error name if successful.
+ e = {name: e.name};
+ }
postMessageBack({type: FetchLaterIframeMessageType.ERROR, error: e});
}
</script>
diff --git a/tests/wpt/tests/fetch/local-network-access/fetch.tentative.https.html b/tests/wpt/tests/fetch/local-network-access/fetch.tentative.https.html
index ac2c3cca28e..b783269207b 100644
--- a/tests/wpt/tests/fetch/local-network-access/fetch.tentative.https.html
+++ b/tests/wpt/tests/fetch/local-network-access/fetch.tentative.https.html
@@ -11,7 +11,7 @@
"use strict";
promise_test(t => {
- const sourceUrl = resolveUrl("resources/fetch-private.html",
+ const sourceUrl = resolveUrl("resources/fetch-local.html",
sourceResolveOptions({ server: Server.HTTPS_PUBLIC }));
function checkResult(evt) {
@@ -26,12 +26,12 @@
t.add_cleanup(() => popup.close());
return promise;
- }, 'LNA Public to private with permission');
+ }, 'LNA Public to local with permission');
promise_test(t => {
// TODO(crbug.com/406991278): consider moving permission url param into
// options
- const sourceUrl = resolveUrl("resources/fetch-private.html?permission=denied",
+ const sourceUrl = resolveUrl("resources/fetch-local.html?permission=denied",
sourceResolveOptions({ server: Server.HTTPS_PUBLIC }));
function checkResult(evt) {
@@ -46,10 +46,10 @@
t.add_cleanup(() => popup.close());
return promise;
- }, 'LNA Public to private with permission denied');
+ }, 'LNA Public to local with permission denied');
promise_test(t => {
- const sourceUrl = resolveUrl("resources/fetch-private-http.html",
+ const sourceUrl = resolveUrl("resources/fetch-local-http.html",
sourceResolveOptions({ server: Server.HTTPS_PUBLIC }));
function checkResult(evt) {
@@ -64,7 +64,7 @@
t.add_cleanup(() => popup.close());
return promise;
- }, 'LNA Public to private http mixed content bypass');
+ }, 'LNA Public to local http mixed content bypass');
promise_test(t => {
const sourceUrl = resolveUrl("resources/fetch-public-http-wrong-address-space.html",
diff --git a/tests/wpt/tests/fetch/local-network-access/resources/fetch-private-http.html b/tests/wpt/tests/fetch/local-network-access/resources/fetch-local-http.html
index 517629b758e..dcad775bfec 100644
--- a/tests/wpt/tests/fetch/local-network-access/resources/fetch-private-http.html
+++ b/tests/wpt/tests/fetch/local-network-access/resources/fetch-local-http.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>Fetch HTTP private with targetAddressSpace private </title>
+<title>Fetch HTTP local with targetAddressSpace local </title>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
@@ -8,17 +8,17 @@
<script>
"use strict";
-// Fetch a private address over HTTP. Fetch is annotated with a
-// targetAddressSpace of private to allow for mixed content check bypassing.
+// Fetch a local address over HTTP. Fetch is annotated with a
+// targetAddressSpace of local to allow for mixed content check bypassing.
//
-// TODO(crbug.com/406991278): consolidate with fetch-private.html adding
+// TODO(crbug.com/406991278): consolidate with fetch-local.html adding
// options to minimize # of resources needed.
Promise.resolve().then(async () => {
test_driver.set_test_context(opener);
await test_driver.set_permission({ name: 'local-network-access' }, 'granted');
const target = {
- server: Server.HTTP_PRIVATE,
+ server: Server.HTTP_LOCAL,
behavior: { response: ResponseBehavior.allowCrossOrigin() },
};
const targetUrl = resolveTargetUrl(target);
diff --git a/tests/wpt/tests/fetch/local-network-access/resources/fetch-private.html b/tests/wpt/tests/fetch/local-network-access/resources/fetch-local.html
index b96a207ec33..bc12e2660bc 100644
--- a/tests/wpt/tests/fetch/local-network-access/resources/fetch-private.html
+++ b/tests/wpt/tests/fetch/local-network-access/resources/fetch-local.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>Fetch Private resource</title>
+<title>Fetch Local resource</title>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
@@ -9,7 +9,7 @@
"use strict";
// Set the 'local-network-access' permission then attempt to fetch a resource
-// in the private address space.
+// in the local address space.
//
// By default, 'local-network-access' permission is set to 'granted'. This can
// be changed by passing in a different value via the 'permission' URL parameter.
@@ -30,7 +30,7 @@ Promise.resolve().then(async () => {
await test_driver.set_permission({ name: 'local-network-access' }, permission_value);
const target = {
- server: Server.HTTPS_PRIVATE,
+ server: Server.HTTPS_LOCAL,
behavior: { response: ResponseBehavior.allowCrossOrigin() },
};
const targetUrl = resolveTargetUrl(target);
diff --git a/tests/wpt/tests/fetch/local-network-access/resources/fetch-public-http-wrong-address-space.html b/tests/wpt/tests/fetch/local-network-access/resources/fetch-public-http-wrong-address-space.html
index c15a87ff7b9..fb306f99d3c 100644
--- a/tests/wpt/tests/fetch/local-network-access/resources/fetch-public-http-wrong-address-space.html
+++ b/tests/wpt/tests/fetch/local-network-access/resources/fetch-public-http-wrong-address-space.html
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
-<title>Fetch HTTP public targetAddress private resource</title>
+<title>Fetch HTTP public targetAddress local resource</title>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
@@ -9,11 +9,11 @@
"use strict";
// Fetch a public address over HTTP. Fetch is annotated with a
-// targetAddressSpace of private to try to bypass mixed content, but should
+// targetAddressSpace of local to try to bypass mixed content, but should
// fail because the address space of the resource does not match the target
// address space.
//
-// TODO(crbug.com/406991278): consolidate with fetch-private.html adding
+// TODO(crbug.com/406991278): consolidate with fetch-local.html adding
// options to minimize # of resources needed.
Promise.resolve().then(async () => {
test_driver.set_test_context(opener);
diff --git a/tests/wpt/tests/fetch/local-network-access/resources/support.sub.js b/tests/wpt/tests/fetch/local-network-access/resources/support.sub.js
index 6b7813fa89d..09e234c5f24 100644
--- a/tests/wpt/tests/fetch/local-network-access/resources/support.sub.js
+++ b/tests/wpt/tests/fetch/local-network-access/resources/support.sub.js
@@ -4,28 +4,28 @@
// space names.
const SERVER_PORTS = {
"http": {
- "local": {{ports[http][0]}},
- "private": {{ports[http-local][0]}},
+ "loopback": {{ports[http][0]}},
+ "local": {{ports[http-local][0]}},
"public": {{ports[http-public][0]}},
},
"https": {
- "local": {{ports[https][0]}},
- "other-local": {{ports[https][1]}},
- "private": {{ports[https-local][0]}},
+ "loopback": {{ports[https][0]}},
+ "other-loopback": {{ports[https][1]}},
+ "local": {{ports[https-local][0]}},
"public": {{ports[https-public][0]}},
},
"ws": {
- "local": {{ports[ws][0]}},
+ "loopback": {{ports[ws][0]}},
},
"wss": {
- "local": {{ports[wss][0]}},
+ "loopback": {{ports[wss][0]}},
},
};
// A `Server` is a web server accessible by tests. It has the following shape:
//
// {
-// addressSpace: the IP address space of the server ("local", "private" or
+// addressSpace: the IP address space of the server ("loopback", "local" or
// "public"),
// name: a human-readable name for the server,
// port: the port on which the server listens for connections,
@@ -56,15 +56,15 @@ class Server {
};
}
+ static HTTP_LOOPBACK = Server.get("http", "loopback");
static HTTP_LOCAL = Server.get("http", "local");
- static HTTP_PRIVATE = Server.get("http", "private");
static HTTP_PUBLIC = Server.get("http", "public");
+ static HTTPS_LOOPBACK = Server.get("https", "loopback");
+ static OTHER_HTTPS_LOOPBACK = Server.get("https", "other-loopback");
static HTTPS_LOCAL = Server.get("https", "local");
- static OTHER_HTTPS_LOCAL = Server.get("https", "other-local");
- static HTTPS_PRIVATE = Server.get("https", "private");
static HTTPS_PUBLIC = Server.get("https", "public");
- static WS_LOCAL = Server.get("ws", "local");
- static WSS_LOCAL = Server.get("wss", "local");
+ static WS_LOOPBACK = Server.get("ws", "loopback");
+ static WSS_LOOPBACK = Server.get("wss", "loopback");
};
// Resolves a URL relative to the current location, returning an absolute URL.
diff --git a/tests/wpt/tests/fullscreen/model/remove-first-sibling.html b/tests/wpt/tests/fullscreen/model/remove-first-sibling.html
new file mode 100644
index 00000000000..be1f501afff
--- /dev/null
+++ b/tests/wpt/tests/fullscreen/model/remove-first-sibling.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<title>Remove the first of two sibling elements in the fullscreen stack</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="../trusted-click.js"></script>
+<div id="log"></div>
+<div id="a"></div>
+<div id="b"></div>
+<script>
+ promise_test(async (t) => {
+ t.add_cleanup(() => {
+ if (document.fullscreenElement) {
+ return document.exitFullscreen();
+ }
+ });
+
+ const a = document.getElementById("a");
+ const b = document.getElementById("b");
+ await Promise.all([trusted_request(a), fullScreenChange()]);
+
+ assert_equals(document.fullscreenElement, a, "fullscreen element after first request");
+ assert_true(a.matches(":fullscreen"), "a matches :fullscreen after first request");
+
+ await Promise.all([trusted_request(b, a), fullScreenChange()]);
+ assert_equals(document.fullscreenElement, b, "fullscreen element after second request");
+ assert_true(a.matches(":fullscreen"), "a matches :fullscreen after second request");
+ assert_true(b.matches(":fullscreen"), "b matches :fullscreen after second request");
+
+ // Removing /a/ now shouldn't do anything except remove it from the top
+ // layer, which causes it to no longer match :fullscreen.
+ a.remove();
+ assert_equals(document.fullscreenElement, b, "fullscreen element immediately after removal of a");
+ assert_false(a.matches(":fullscreen"), "a should no longer match :fullscreen immediately after removal");
+ assert_true(b.matches(":fullscreen"), "b matches :fullscreen immediately after removal of a");
+
+ // No fullscreenchange event should fire. If the removal triggered exiting
+ // fullscreen the event would be fired after an async section and an
+ // animation frame task, so wait until after that.
+ document.onfullscreenchange = t.unreached_func("fullscreenchange event");
+ await new Promise((resolve) => {
+ requestAnimationFrame(resolve);
+ });
+ });
+</script>
diff --git a/tests/wpt/tests/fullscreen/model/remove-last-sibling.html b/tests/wpt/tests/fullscreen/model/remove-last-sibling.html
new file mode 100644
index 00000000000..f893a3f9d5a
--- /dev/null
+++ b/tests/wpt/tests/fullscreen/model/remove-last-sibling.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<title>Remove the last of two sibling elements in the fullscreen stack</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="../trusted-click.js"></script>
+<div id="log"></div>
+<div id="a"></div>
+<div id="b"></div>
+<script>
+ promise_test(async (t) => {
+ t.add_cleanup(() => {
+ if (document.fullscreenElement) {
+ return document.exitFullscreen();
+ }
+ });
+
+ const a = document.getElementById("a");
+ const b = document.getElementById("b");
+ await Promise.all([trusted_request(a), fullScreenChange()]);
+
+ assert_equals(document.fullscreenElement, a, "fullscreen element after first request");
+ assert_true(a.matches(":fullscreen"), "a matches :fullscreen after first request");
+
+ await Promise.all([trusted_request(b, a), fullScreenChange()]);
+ assert_equals(document.fullscreenElement, b, "fullscreen element after second request");
+ assert_true(a.matches(":fullscreen"), "a matches :fullscreen after second request");
+ assert_true(b.matches(":fullscreen"), "b matches :fullscreen after second request");
+
+ // Removing the fullscreen element (b) triggers exiting fullscreen. Some changes are
+ // visible synchronously and the others come when the event fires.
+ b.remove();
+ assert_equals(document.fullscreenElement, a, "fullscreen element immediately after removal of b");
+ assert_true(a.matches(":fullscreen"), "a matches :fullscreen immediately after removal of b");
+ assert_false(b.matches(":fullscreen"), "b no longer matches :fullscreen immediately after removal");
+
+ // A fullscreenchange event should fire and all state should be cleared.
+ await fullScreenChange();
+ assert_equals(document.fullscreenElement, null, "fullscreen element after event");
+ assert_false(a.matches(":fullscreen"), "a no longer matches :fullscreen after event");
+ assert_false(b.matches(":fullscreen"), "b no longer matches :fullscreen after event");
+ });
+</script>
diff --git a/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js b/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
index 6c88b49fd4a..0181394f32d 100644
--- a/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
+++ b/tests/wpt/tests/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
@@ -228,82 +228,6 @@
const DEFAULT_CONTEXT_CONFIG = new RemoteContextConfig();
/**
- * This class represents a configuration for creating remote contexts. This is
- * the entry-point
- * for creating remote contexts, providing @see addWindow .
- */
- class RemoteContextHelper {
- /**
- * @param {RemoteContextConfig|object} config The configuration
- * for this remote context.
- */
- constructor(config) {
- this.config = RemoteContextConfig.ensure(config);
- }
-
- /**
- * Creates a new remote context and returns a `RemoteContextWrapper` giving
- * access to it.
- * @private
- * @param {Object} options
- * @param {(url: string) => Promise<undefined>} [options.executorCreator] A
- * function that takes a URL and causes the browser to navigate some
- * window to that URL, e.g. via an iframe or a new window. If this is
- * not supplied, then the returned RemoteContextWrapper won't actually
- * be communicating with something yet, and something will need to
- * navigate to it using its `url` property, before communication can be
- * established.
- * @param {RemoteContextConfig|object} [options.extraConfig] If supplied,
- * extra configuration for this remote context to be merged with
- * `this`'s existing config. If it's not a `RemoteContextConfig`, it
- * will be used to construct a new one.
- * @returns {Promise<RemoteContextWrapper>}
- */
- async createContext({
- executorCreator,
- extraConfig,
- isWorker = false,
- }) {
- const config =
- this.config.merged(RemoteContextConfig.ensure(extraConfig));
-
- // UUID is needed for executor.
- const uuid = token();
- const url = await config.createExecutorUrl(uuid, isWorker);
-
- if (executorCreator) {
- if (config.urlType == 'blank') {
- await executorCreator(undefined, await fetchText(url));
- } else {
- await executorCreator(url, undefined);
- }
- }
-
- return new RemoteContextWrapper(new RemoteContext(uuid), this, url);
- }
-
- /**
- * Creates a window with a remote context. @see createContext for
- * @param {RemoteContextConfig|object} [extraConfig] Will be
- * merged with `this`'s config.
- * @param {Object} [options]
- * @param {string} [options.target] Passed to `window.open` as the
- * 2nd argument
- * @param {string} [options.features] Passed to `window.open` as the
- * 3rd argument
- * @returns {Promise<RemoteContextWrapper>}
- */
- addWindow(extraConfig, options) {
- return this.createContext({
- executorCreator: windowExecutorCreator(options),
- extraConfig,
- });
- }
- }
- // Export this class.
- self.RemoteContextHelper = RemoteContextHelper;
-
- /**
* Attaches header to the URL. See
* https://web-platform-tests.org/writing-tests/server-pipes.html#headers
* @param {string} url the URL to which headers should be attached.
@@ -736,4 +660,87 @@
}
}
}
+
+
+ /**
+ * This class represents a configuration for creating remote contexts. This is
+ * the entry-point
+ * for creating remote contexts, providing @see addWindow .
+ */
+ class RemoteContextHelper {
+ /**
+ * The constructor to use when creating new remote context wrappers.
+ * Can be overridden by subclasses.
+ */
+ static RemoteContextWrapper = RemoteContextWrapper;
+
+ /**
+ * @param {RemoteContextConfig|object} config The configuration
+ * for this remote context.
+ */
+ constructor(config) {
+ this.config = RemoteContextConfig.ensure(config);
+ }
+
+ /**
+ * Creates a new remote context and returns a `RemoteContextWrapper` giving
+ * access to it.
+ * @private
+ * @param {Object} options
+ * @param {(url: string) => Promise<undefined>} [options.executorCreator] A
+ * function that takes a URL and causes the browser to navigate some
+ * window to that URL, e.g. via an iframe or a new window. If this is
+ * not supplied, then the returned RemoteContextWrapper won't actually
+ * be communicating with something yet, and something will need to
+ * navigate to it using its `url` property, before communication can be
+ * established.
+ * @param {RemoteContextConfig|object} [options.extraConfig] If supplied,
+ * extra configuration for this remote context to be merged with
+ * `this`'s existing config. If it's not a `RemoteContextConfig`, it
+ * will be used to construct a new one.
+ * @returns {Promise<RemoteContextWrapper>}
+ */
+ async createContext({
+ executorCreator,
+ extraConfig,
+ isWorker = false,
+ }) {
+ const config =
+ this.config.merged(RemoteContextConfig.ensure(extraConfig));
+
+ // UUID is needed for executor.
+ const uuid = token();
+ const url = await config.createExecutorUrl(uuid, isWorker);
+
+ if (executorCreator) {
+ if (config.urlType == 'blank') {
+ await executorCreator(undefined, await fetchText(url));
+ } else {
+ await executorCreator(url, undefined);
+ }
+ }
+
+ return new this.constructor.RemoteContextWrapper(new RemoteContext(uuid), this, url);
+ }
+
+ /**
+ * Creates a window with a remote context. @see createContext for
+ * @param {RemoteContextConfig|object} [extraConfig] Will be
+ * merged with `this`'s config.
+ * @param {Object} [options]
+ * @param {string} [options.target] Passed to `window.open` as the
+ * 2nd argument
+ * @param {string} [options.features] Passed to `window.open` as the
+ * 3rd argument
+ * @returns {Promise<RemoteContextWrapper>}
+ */
+ addWindow(extraConfig, options) {
+ return this.createContext({
+ executorCreator: windowExecutorCreator(options),
+ extraConfig,
+ });
+ }
+ }
+ // Export this class.
+ self.RemoteContextHelper = RemoteContextHelper;
}
diff --git a/tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js b/tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js
index 525d28553aa..160a0cbf9ac 100644
--- a/tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js
+++ b/tests/wpt/tests/html/canvas/element/manual/imagebitmap/common.sub.js
@@ -57,7 +57,10 @@ function makeVideo() {
return makeMakeVideo("/images/pattern")();
}
-var imageBitmapDataUrlVideoPromise = fetch(getVideoURI("/images/pattern"))
+var imageBitmapDataUrlVideoPromise = self.GLOBAL && self.GLOBAL.isWorker()
+ // /common/media.js can't load in a Worker so we don't have getVideoURI
+ ? null
+ : fetch(getVideoURI("/images/pattern"))
.then(response => Promise.all([response.headers.get("Content-Type"), response.arrayBuffer()]))
.then(([type, data]) => {
return new Promise(function(resolve, reject) {
diff --git a/tests/wpt/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js b/tests/wpt/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js
new file mode 100644
index 00000000000..0d2ddf5855e
--- /dev/null
+++ b/tests/wpt/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-resolves-in-task.any.js
@@ -0,0 +1,117 @@
+// META: title=createImageBitmap resolves in a task
+// META: script=/common/media.js
+// META: script=./common.sub.js
+function makeWorkerImageBitmap() {
+ return makeOffscreenCanvas().then(canvas => {
+ return createImageBitmap(canvas);
+ });
+}
+var imageSourceTypes = self.GLOBAL.isWorker() ?
+ [
+ { name: 'an OffscreenCanvas', factory: makeOffscreenCanvas },
+ { name: 'an ImageData', factory: makeImageData },
+ { name: 'an ImageBitmap', factory: makeWorkerImageBitmap },
+ { name: 'a Blob', factory: makeBlob('/images/pattern.png') },
+ ] :
+ imageSourceTypes;
+
+var testFuncs = {
+ reject_sync: (promiseFunc, source, t) => {
+ return new Promise((resolve, reject) => {
+ let rejected = false;
+ promiseFunc(source).then(() => {
+ reject(new Error('Expected this call to reject'));
+ }, (err) => {
+ rejected = true;
+ });
+ Promise.resolve().then(() => {
+ try {
+ assert_equals(rejected, true, 'The promise should be rejected synchronously')
+ resolve(t);
+ } catch (err) {
+ reject(err);
+ }
+ })
+ });
+
+ },
+ resolve_async: (promiseFunc, source, t) => {
+ return new Promise((resolve, reject) => {
+ let taskRan = false;
+ promiseFunc(source).then(() => {
+ try {
+ assert_equals(taskRan, true, 'The promise should be resolved asynchronously')
+ resolve(t);
+ } catch (err) {
+ reject(err)
+ }
+ }, t.unreached_func('Expected this call to resolve'))
+ Promise.resolve().then(() => {
+ taskRan = true;
+ });
+ });
+ },
+ reject_async: (promiseFunc, source, t) => {
+ return new Promise((resolve, reject) => {
+ let taskRan = false;
+ Promise.resolve().then(() => {
+ promiseFunc(source).then(
+ t.unreached_func('Expected this call to reject'),
+ () => {
+ try {
+ assert_equals(taskRan, true, 'The promise should be rejected asynchronously')
+ resolve(t);
+ } catch (err) {
+ reject(err)
+ }
+ },
+ );
+ });
+ Promise.resolve().then(() => {
+ taskRan = true;
+ });
+ });
+ },
+};
+
+var testCases = [{
+ description: 'createImageBitmap with <sourceType> source and ' +
+ 'invalid cropHeight',
+ promiseTestFunction: (source) => createImageBitmap(source, 0, 0, 0, 0),
+ resolution: 'reject_sync'
+ },
+ {
+ description: 'createImageBitmap with <sourceType> source and ' +
+ 'invalid resizeHeight',
+ promiseTestFunction: (source) => createImageBitmap(source, {
+ resizeWidth: 0,
+ resizeHeight: 0
+ }),
+ resolution: 'reject_sync'
+ },
+ {
+ description: 'createImageBitmap with <sourceType> source',
+ promiseTestFunction: (source) => createImageBitmap(source),
+ resolution: 'resolve_async'
+ },
+];
+
+imageSourceTypes.forEach(imageSourceType => {
+ testCases.forEach(testCase => {
+ let description = `${testCase.description.replace('<sourceType>',
+ imageSourceType.name)} should ${testCase.resolution.replace('_', ' ')}`;
+
+ promise_test(t => {
+ return imageSourceType.factory().then(source => {
+ const tester = testFuncs[testCase.resolution];
+ return tester(testCase.promiseTestFunction, source, t);
+ })
+ }, description);
+
+ });
+});
+promise_test(t => {
+ return makeBlob('data:,')().then(image => {
+ return testFuncs.reject_async((source) => createImageBitmap(source), image, t);
+ });
+}, 'Invalid Blob source should reject async'); \ No newline at end of file
diff --git a/tests/wpt/tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html b/tests/wpt/tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html
index 2413fe26673..5471e8e9ec1 100644
--- a/tests/wpt/tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html
+++ b/tests/wpt/tests/html/interaction/focus/processing-model/focus-fixup-rule-one-no-dialogs.html
@@ -15,95 +15,98 @@
<fieldset id="fieldset2" disabled><legend><button id="button5">Button 5</button></legend></fieldset>
<div id="div" tabindex="0">Div</div>
<div id="editable" contenteditable=true>editor</div>
+ <button id="button6">Button 6</button>
</div>
<script>
"use strict";
-test(() => {
- const button = document.querySelector("#button1");
- button.focus();
+function test_focus_fixup(selector, change, expectSync = false) {
+ promise_test(async function(t) {
+ // Make sure we're not running from a ResizeObserver / etc notification.
+ await new Promise(r => t.step_timeout(r, 0));
- assert_equals(document.activeElement, button, "Sanity check: the button must start focused");
+ const el = document.querySelector(selector);
+ el.focus();
- button.disabled = true;
-
- assert_not_equals(document.activeElement, button, "After disabling, the button must no longer be focused");
- assert_equals(document.activeElement, document.body, "After disabling, the body must be focused");
+ assert_equals(document.activeElement, el, `Sanity check: ${selector} must start focused`);
-}, "Disabling the active element (making it inert)");
+ change(el);
-test(() => {
- const button = document.querySelector("#button2");
- button.focus();
+ {
+ const fn = expectSync ? assert_not_equals : assert_equals;
+ fn(document.activeElement, el, `active element ${expectSync ? "is" : "isn't"} fixed-up sync`);
+ }
- assert_equals(document.activeElement, button, "Sanity check: the button must start focused");
+ // We don't expect blur events in the sync case per spec yet, at least.
+ if (!expectSync) {
+ // Fixup should run after animation frame callbacks, right before the end of
+ // "update the rendering", so after resize observations.
+ let ranFirstRaf = false;
+ let ranRO = false;
- button.hidden = true;
+ let resolveDone;
+ let done = new Promise(r => { resolveDone = r; });
- assert_not_equals(document.activeElement, button, "After hiding, the button must no longer be focused");
- assert_equals(document.activeElement, document.body, "After hiding, the body must be focused");
+ requestAnimationFrame(t.step_func(() => {
+ ranFirstRaf = true;
+ assert_equals(document.activeElement, el, "activeElement shouldn't have changed yet (rAF)");
+ requestAnimationFrame(t.step_func(() => {
+ assert_true(ranRO, "ResizeObserver should've ran on the previous frame");
+ resolveDone();
+ }));
+ }));
-}, "Hiding the active element");
+ let ro = new ResizeObserver(t.step_func(() => {
+ assert_true(ranFirstRaf, "requestAnimationFrame should run before ResizeObserver");
+ ranRO = true;
+ assert_equals(document.activeElement, el, "activeElement shouldn't have changed yet (ResizeObserver)");
+ }));
-test(() => {
- const button = document.querySelector("#button3");
- button.focus();
+ // TODO: Test IntersectionObserver timing. It's a bit trickier because it
+ // uses its own task source and so on.
+ ro.observe(document.documentElement);
- assert_equals(document.activeElement, button, "Sanity check: the button must start focused");
+ await done;
- button.remove();
+ ro.disconnect();
+ }
- assert_not_equals(document.activeElement, button, "After removing, the button must no longer be focused");
- assert_equals(document.activeElement, document.body, "After removing, the body must be focused");
+ assert_not_equals(document.activeElement, el, "focus is fixed up");
+ assert_equals(document.activeElement, document.body, "Body is focused");
+ }, selector);
+}
-}, "Removing the active element from the DOM");
+test_focus_fixup("#button1", function(button) {
+ button.disabled = true;
+});
-test(() => {
- const fieldset = document.querySelector("#fieldset1");
- const button = document.querySelector("#button4");
- button.focus();
- assert_equals(document.activeElement, button, "Sanity check: the button must start focused");
+test_focus_fixup("#button2", function(button) {
+ button.hidden = true;
+});
- fieldset.disabled = true;
+test_focus_fixup("#button3", function(button) {
+ button.remove();
+}, /* expectSync = */ true);
- assert_not_equals(document.activeElement, button, "After disabling ancestor fieldset, the button must no longer be focused");
- assert_equals(document.activeElement, document.body, "After disabling ancestor fieldset, the body must be focused");
-}, "Disabling <fieldset> affects its descendants");
+test_focus_fixup("#button4", function(button) {
+ document.querySelector("#fieldset1").disabled = true;
+});
-test(() => {
+test_focus_fixup("#button5", function(button) {
const fieldset = document.querySelector("#fieldset2");
- const button = document.querySelector("#button5");
- button.focus();
- assert_equals(document.activeElement, button, "Sanity check: the button must start focused");
-
fieldset.insertBefore(document.createElement("legend"), fieldset.firstChild);
+});
- assert_not_equals(document.activeElement, button, "After changing a legend element, the button must no longer be focused");
- assert_equals(document.activeElement, document.body, "After changing a legend element, the body must be focused");
-}, "Changing the first legend element in disabled <fieldset>");
-
-test(() => {
- const div = document.querySelector("#div");
- div.focus();
-
- assert_equals(document.activeElement, div, "Sanity check: the div must start focused");
-
+test_focus_fixup("#div", function(div) {
div.removeAttribute("tabindex");
+});
- assert_not_equals(document.activeElement, div, "After removing tabindex, the div must no longer be focused");
- assert_equals(document.activeElement, document.body, "After removing tabindex, the body must be focused");
-
-}, "Removing the tabindex attribute from a div");
-
-test(() => {
- const div = document.querySelector("#editable");
- div.focus();
- assert_equals(document.activeElement, div, "Sanity check: the div must start focused");
-
+test_focus_fixup("#editable", function(div) {
div.contentEditable = false;
+});
- assert_not_equals(document.activeElement, div, "After disabling contentEditable, the div must no longer be focused");
- assert_equals(document.activeElement, document.body, "After disabling contentEditable, the body must be focused");
-}, "Disabling contenteditable");
+test_focus_fixup("#button6", function(button) {
+ button.style.visibility = "hidden";
+});
</script>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex-ref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex-ref.html
new file mode 100644
index 00000000000..04c000ad5ad
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+select::picker-icon {
+ font-size: 60px;
+}
+
+</style>
+
+<select>
+ <option>Option</option>
+</select>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex.html
new file mode 100644
index 00000000000..628c7ec51f4
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-height-in-flex.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML>
+<link rel="match" href="min-height-in-flex-ref.html">
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+select::picker-icon {
+ font-size: 60px;
+}
+
+</style>
+
+<div style="display:flex; flex-direction: column; align-items: flex-start; height: 100px;">
+ <select>
+ <option>Option</option>
+ </select>
+ <div style="color: transparent">
+ This div has a lot of text in it but it should not make the select become smaller.
+ A lot of text. Really a lot of text.
+ A lot of text. Really a lot of text.
+ A lot of text. Really a lot of text.
+ A lot of text. Really a lot of text.
+ A lot of text. Really a lot of text.
+ A lot of text. Really a lot of text.
+ A lot of text. Really a lot of text.
+ A lot of text. Really a lot of text.
+ A lot of text. Really a lot of text.
+ </div>
+</div>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-notref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-notref.html
new file mode 100644
index 00000000000..422f187dc69
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-notref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+select::picker-icon {
+ display: none;
+}
+
+select {
+ width: 25px;
+ height: calc(max(1lh, 24px) + 1px);
+}
+
+</style>
+
+<select></select>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html
new file mode 100644
index 00000000000..1c37e12b0bc
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<link rel="match" href="min-size-empty-001-ref2.html">
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+select::picker-icon {
+ display: none;
+}
+
+select {
+ width: 24px;
+ height: max(1lh, 24px);
+}
+
+</style>
+
+<select></select>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref2.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref2.html
new file mode 100644
index 00000000000..69170af04b5
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001-ref2.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<link rel="mismatch" href="min-size-empty-001-notref.html">
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+select::picker-icon {
+ display: none;
+}
+
+select {
+ width: 23px;
+ height: calc(max(1lh, 24px) - 1px);
+}
+
+</style>
+
+<select></select>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html
new file mode 100644
index 00000000000..fd5cc4a0d02
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-001.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<link rel="match" href="min-size-empty-001-ref.html">
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+select::picker-icon {
+ display: none;
+}
+
+</style>
+
+<select></select>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-notref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-notref.html
new file mode 100644
index 00000000000..0500b54b758
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-notref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML>
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+select::picker-icon {
+ display: none;
+}
+
+select {
+ width: 25px;
+ height: calc(max(1lh, 24px) + 1px);
+}
+
+</style>
+
+<select><option></option></select>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html
new file mode 100644
index 00000000000..c9e2d2333e7
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<link rel="match" href="min-size-empty-002-ref2.html">
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+select::picker-icon {
+ display: none;
+}
+
+select {
+ width: 24px;
+ height: max(1lh, 24px);
+}
+
+</style>
+
+<select><option></option></select>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref2.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref2.html
new file mode 100644
index 00000000000..dfbbbcac533
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002-ref2.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<link rel="mismatch" href="min-size-empty-002-notref.html">
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+select::picker-icon {
+ display: none;
+}
+
+select {
+ width: 23px;
+ height: calc(max(1lh, 24px) - 1px);
+}
+
+</style>
+
+<select><option></option></select>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html
new file mode 100644
index 00000000000..b6256c93b28
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-size-empty-002.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML>
+<link rel="match" href="min-size-empty-002-ref.html">
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+select::picker-icon {
+ display: none;
+}
+
+</style>
+
+<select><option></option></select>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex-ref.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex-ref.html
new file mode 100644
index 00000000000..33df77bd0f1
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+
+</style>
+
+<select>
+ <option>This is an option</option>
+</select>
diff --git a/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex.html b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex.html
new file mode 100644
index 00000000000..f3510a29585
--- /dev/null
+++ b/tests/wpt/tests/html/rendering/replaced-elements/the-select-element/customizable-select/min-width-in-flex.html
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<link rel="match" href="min-width-in-flex-ref.html">
+<style>
+
+select, select::picker(select) {
+ appearance: base-select;
+}
+
+select {
+ white-space: nowrap;
+}
+
+</style>
+
+<div style="display:flex; flex-direction: row; width: 400px">
+ <select style="align-self: flex-start">
+ <option>This is an option</option>
+ </select>
+ <div style="color: transparent">
+ This div has a lot of text in it but it should not make the select become smaller.
+ A lot of text. Really a lot of text.
+ </div>
+</div>
diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html
index ae6fa0e4328..c10a942069c 100644
--- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-unavailable.tentative.html
+++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/naturalWidth-naturalHeight-width-height.tentative.html
@@ -1,7 +1,7 @@
<!doctype html>
<head>
<meta charset="utf-8">
-<title>HTMLImageElement naturalWidth/naturalHeight behavior for SVG that lacks at least one natural dimension</title>
+<title>HTMLImageElement attributes naturalWidth, naturalHeight, width, height</title>
<!-- Note: this test asserts a different expectation from what the HTML spec
requires, as of mid-2025 when this testcase is being written. The spec
behavior doesn't appear to be web-compatible for some of the cases here,
@@ -58,12 +58,50 @@ img {
* The "title" attribute is a description of the scenario being tested, and
it must be unique to satisfy the test harness requirements. -->
-<!-- FIRST PART OF TEST: No viewBox. Just a missing (or edge-casey, i.e.
- negative or percent-valued) values, for the width and height attrs on the
+<!-- JPG images -->
+<img src="resources/cat.jpg"
+ title="raster image"
+ data-natural-width="320" data-natural-height="240">
+<img src="resources/cat.jpg" width="10" height="10"
+ title="raster image with width/height attributes"
+ data-natural-width="320" data-natural-height="240"
+ data-width="10" data-height="10"
+ data-not-rendered-width="10" data-not-rendered-height="10">
+<!-- Use "size-comes-from-broken-image-icon" attribute to opt out of checking
+ img.width and img.height, because they come from the UA-dependent
+ size of the broken image icon: -->
+<img src="non-existent.jpg"
+ title="non existent image, no natural dimensions"
+ data-natural-width="0" data-natural-height="0"
+ size-comes-from-broken-image-icon>
+<img src="non-existent.jpg" width="10" height="10"
+ title="non existent image with width/height attributes, no natural dimensions"
+ data-natural-width="0" data-natural-height="0"
+ data-width="10" data-height="10"
+ data-not-rendered-width="10" data-not-rendered-height="10">
+
+<!-- First group of SVG images: no viewBox, with a missing (or edge-casey, i.e.
+ negative or percent-valued) value for the width and/or height attr on the
root svg element in a SVG image. -->
<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>"
title="SVG image, no natural dimensions"
data-natural-width="300" data-natural-height="150">
+<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>"
+ width="40" height="10"
+ data-width="40" data-height="10"
+ data-not-rendered-width="40" data-not-rendered-height="10"
+ title="SVG image with width/height attrs, no natural dimensions"
+ data-natural-width="300" data-natural-height="150">
+<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>"
+ width="40"
+ data-width="40" data-not-rendered-width="40"
+ title="SVG image with width attr, no natural dimensions"
+ data-natural-width="300" data-natural-height="150">
+<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>"
+ height="10"
+ data-height="10" data-not-rendered-height="10"
+ title="SVG image with height attr, no natural dimensions"
+ data-natural-width="300" data-natural-height="150">
<!-- Note: percent values can't be resolved when determining natural
dimensions, so the exact percentage shouldn't matter. -->
<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='400%' height='10%'></svg>"
@@ -95,7 +133,7 @@ img {
title="SVG image, with natural height being negative"
data-natural-width="300" data-natural-height="0">
-<!-- NEXT PART OF TEST: Same as above, but now with a viewBox that grants a
+<!-- Second group of SVG images: Same as above, but now with a viewBox that grants a
3:1 aspect-ratio; whenever we know one natural dimension, that should
combine with the aspect ratio to produce the other natural dimension.
@@ -137,7 +175,7 @@ img {
title="SVG image, with natural height being negative, and aspect ratio from viewBox"
data-natural-width="0" data-natural-height="0">
-<!-- THIRD PART OF TEST: Check a degenerate 0-sized viewBox for some of the
+<!-- Third group of SVG images: Check a degenerate 0-sized viewBox for some of the
cases; it should have no impact. -->
<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 0 0'></svg>"
title="SVG image, no natural dimensions, viewBox with 0 width/height"
@@ -167,12 +205,15 @@ img {
title="SVG image, with natural height, viewBox with 0 height"
data-natural-width="300" data-natural-height="60">
-<!~- FINAL PART OF TEST: we have width/height/viewBox all specified on the
- svg element. The width and height attrs should determine the natural
- dimensions, with no impact from viewBox. -->
-<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 600 200'></svg>"
+<!~- Final group of SVG images: we have pixel-valued width/height on the root
+ svg element, and possibly viewBox as well. The width and height attrs should
+ determine the natural dimensions, with no impact from viewBox. -->
+<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='40'></svg>"
+ title="SVG image, with natural width and height"
+ data-natural-width="60" data-natural-height="40">
+<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='40' viewBox='0 0 600 200'></svg>"
title="SVG image, with natural width and height, and aspect ratio from viewBox"
- data-natural-width="60" data-natural-height="60">
+ data-natural-width="60" data-natural-height="40">
<img src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='0' height='0' viewBox='0 0 600 200'></svg>"
title="SVG image, with natural width and height of 0, and aspect ratio from viewBox"
data-natural-width="0" data-natural-height="0">
@@ -191,33 +232,144 @@ img {
the window onload event: -->
<script>
setup({explicit_done:true});
+
+// Utility function to generate a clone of imgTemplates using "srcset" and a
+// given density value, with expectations adjusted per the density:
+function cloneTemplateWithDensity(density) {
+ if (typeof(density) !== "number" || density <= 0) {
+ // If we get here, there's a bug in the test itself; throw an exception:
+ throw new Error("test error: param should be a positive number");
+ }
+ let clone = imgTemplates.content.cloneNode("true");
+
+ for (let img of clone.children) {
+ // Swap out "src" for "srcset":
+ // The srcset attribute uses a space-separated list of tokens,
+ // so we need to encode any spaces that are in the URI itself
+ // before we put it in srcset:
+ let srcVal = img.getAttribute("src").replaceAll(" ", "%20");
+ img.removeAttribute("src");
+ img.setAttribute("srcSet", `${srcVal} ${density}x`);
+
+ // Mention the density in the 'title' to keep the title values unique:
+ img.setAttribute("title",
+ `${img.getAttribute("title")} (with srcset/${density}x)`);
+
+ const isUsingConcreteObjectWidth = (img.dataset.naturalWidth == "300");
+ const isUsingConcreteObjectHeight = (img.dataset.naturalHeight == "150");
+
+ // Scale our 'data-natural-{width,height}' expectations by the density.
+ // But also:
+ // * Preserve the original 'data-natural-{width,height}' as the
+ // 'data-{width,height}' expectation if it's just the concrete object size
+ // (which doesn't actually get scaled by the density in practice when
+ // the image actually renders).
+ // * Preserve the original 'data-natural-{width,height}' as the
+ // 'data-not-rendered-{width,height}' expectation (if we don't already have
+ // one) since browsers don't do density-correction on .width and .height when
+ // the image is not being rendered, as discussed in
+ // https://github.com/whatwg/html/issues/11287#issuecomment-2923467541
+ for (let name in img.dataset) {
+ if (name.startsWith("natural")) {
+ let origExpectation = img.dataset[name];
+
+ // Scale our img.natural{Width,Height} expectation:
+ img.dataset[name] = origExpectation / density;
+
+ let isWidthAxis = (name == "naturalWidth");
+ let nameWithoutNatural = (isWidthAxis ? "width" : "height");
+
+ let isConcreteObjectSize =
+ (isWidthAxis ? isUsingConcreteObjectWidth : isUsingConcreteObjectHeight);
+ if (isConcreteObjectSize && !(nameWithoutNatural in img.dataset)) {
+ img.dataset[nameWithoutNatural] = origExpectation;
+ }
+
+ // Construct a string for "data-not-rendered-{width,height}" for
+ // whichever axis we're currently handling, and stash the
+ // origExpectation in there if we don't already have some expectation
+ // set there:
+ let notRenderedName = name.replace("natural", "notRendered");
+ if (!(notRenderedName in img.dataset)) {
+ img.dataset[notRenderedName] = origExpectation;
+ }
+ }
+ }
+ }
+ return clone;
+}
+
// Clone and append a copy of the contents of imgTemplates, for testing:
let clone = imgTemplates.content.cloneNode("true");
containingBlock.appendChild(clone);
+// Append additional clones, modified to use srcset with specified density.
+// Note:
+// * '1' is the trivial case; we're just testing that for completeness,
+// to be sure there aren't any unexpected differences between
+// <img src="..."> and <img srcset="... 1x">).
+// * It's best for whatever density we test here to be something that evenly
+// divides all of the image sizes in this test (so 1 and 2 are easy choices).
+containingBlock.appendChild(cloneTemplateWithDensity(1));
+containingBlock.appendChild(cloneTemplateWithDensity(2));
+
// After all the img elements have loaded (indicated by the window load event),
// we run the various tests:
onload = function() {
Array.from(document.images).forEach(img => {
+ const expectedNaturalWidth = parseFloat(img.dataset.naturalWidth);
+ const expectedNaturalHeight = parseFloat(img.dataset.naturalHeight);
+
test(function() {
// We expect naturalWidth to match the provided data-natural-width
// (and similar for 'height').
- const expectedNaturalWidth = parseFloat(img.dataset.naturalWidth);
- const expectedNaturalHeight = parseFloat(img.dataset.naturalHeight);
assert_equals(img.naturalWidth, expectedNaturalWidth, 'naturalWidth');
assert_equals(img.naturalHeight, expectedNaturalHeight, 'naturalHeight');
- // If 'data-width' is provided, then we expect img.width to match it.
- // Otherwise we expect img.width to match the 'data-natural-width'.
- // (And similar for 'height'.)
- const expectedWidth = 'width' in img.dataset ?
- parseFloat(img.dataset.width) : expectedNaturalWidth;
- const expectedHeight = 'height' in img.dataset ?
- parseFloat(img.dataset.height) : expectedNaturalHeight;
- assert_equals(img.width, expectedWidth, 'width');
- assert_equals(img.height, expectedHeight, 'height');
+ let shouldCheckWidthAndHeight =
+ !img.hasAttribute("size-comes-from-broken-image-icon");
+ if (shouldCheckWidthAndHeight) {
+ // If 'data-width' is provided, then we expect img.width to match it.
+ // Otherwise we expect img.width to match the 'data-natural-width'.
+ // (And similar for 'height'.)
+ const expectedWidth = 'width' in img.dataset ?
+ parseFloat(img.dataset.width) : expectedNaturalWidth;
+ const expectedHeight = 'height' in img.dataset ?
+ parseFloat(img.dataset.height) : expectedNaturalHeight;
+ assert_equals(img.width, expectedWidth, 'width');
+ assert_equals(img.height, expectedHeight, 'height');
+ }
}, `${img.title}`);
+
+ test(function() {
+ // Now test what we get when the img is not rendered.
+ // * naturalWidth and naturalHeight shouldn't change.
+ // * width and height should generally match naturalWidth and
+ // naturalHeight. (Exceptions are indicated via the
+ // 'data-not-rendered-{width/height} attributes).
+ this.add_cleanup(function() {
+ img.style.display = "";
+ });
+
+ img.style.display = "none";
+ img.getBoundingClientRect(); // Flush layout.
+
+ assert_equals(img.naturalWidth, expectedNaturalWidth,
+ 'naturalWidth when not rendered');
+ assert_equals(img.naturalHeight, expectedNaturalHeight,
+ 'naturalHeight when not rendered');
+
+ const expectedNotRenderedWidth = 'notRenderedWidth' in img.dataset ?
+ parseFloat(img.dataset.notRenderedWidth) : expectedNaturalWidth;
+ const expectedNotRenderedHeight = 'notRenderedHeight' in img.dataset ?
+ parseFloat(img.dataset.notRenderedHeight) : expectedNaturalHeight;
+
+ assert_equals(img.width, expectedNotRenderedWidth,
+ 'width when not rendered');
+ assert_equals(img.height, expectedNotRenderedHeight,
+ 'height when not rendered');
+ }, `${img.title} (when not rendered)`);
});
done();
};
diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors-ref.html b/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors-ref.html
new file mode 100644
index 00000000000..8e75a4e21e8
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+
+<style>
+option:not(:checked) {
+ background-color: green;
+ color: blue;
+}
+</style>
+
+<select multiple size=4 autofocus>
+ <option>option</option>
+ <option id=target>focused and checked</option>
+</select>
+
+<script>
+const target = document.getElementById('target');
+(async () => {
+ await (new test_driver.Actions()
+ .pointerMove(0, 0, {origin: target})
+ .pointerDown()
+ .pointerUp())
+ .send();
+ document.documentElement.classList.remove('reftest-wait');
+})();
+</script>
diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors.html b/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors.html
new file mode 100644
index 00000000000..c05d595c30c
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/forms/the-select-element/list-box-important-colors.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<link rel=author href="mailto:jarhar@chromium.org">
+<link rel=help href="https://issues.chromium.org/issues/415953695">
+<link rel=match href="list-box-important-colors-ref.html">
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+
+<style>
+option {
+ background-color: green;
+ color: blue;
+}
+</style>
+
+<select multiple size=4 autofocus>
+ <option>option</option>
+ <option id=target>focused and checked</option>
+</select>
+
+<script>
+const target = document.getElementById('target');
+(async () => {
+ await (new test_driver.Actions()
+ .pointerMove(0, 0, {origin: target})
+ .pointerDown()
+ .pointerUp())
+ .send();
+ document.documentElement.classList.remove('reftest-wait');
+})();
+</script>
diff --git a/tests/wpt/tests/html/semantics/interactive-elements/the-details-element/details-toggle-source.tentative.html b/tests/wpt/tests/html/semantics/interactive-elements/the-details-element/details-toggle-source.html
index 1a571f54414..1a571f54414 100644
--- a/tests/wpt/tests/html/semantics/interactive-elements/the-details-element/details-toggle-source.tentative.html
+++ b/tests/wpt/tests/html/semantics/interactive-elements/the-details-element/details-toggle-source.html
diff --git a/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.tentative.html b/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.html
index 7e6fe25dabf..130d76451da 100644
--- a/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.tentative.html
+++ b/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/dialog-toggle-source.html
@@ -9,14 +9,18 @@
<script src="../../popovers/resources/toggle-event-source-test.js"></script>
<button id=showmodalbutton commandfor=dialog command=show-modal>show modal</button>
-<dialog id=dialog>
+<button id=lightdismiss>light dismiss</button>
+<dialog id=dialog closedby=any>
dialog
<button id=closebutton commandfor=dialog command=close>close</button>
+ <button id=requestclosebutton commandfor=dialog command=request-close>request close</button>
</dialog>
<script>
const showmodalbutton = document.getElementById('showmodalbutton');
const dialog = document.getElementById('dialog');
+const requestclosebutton = document.getElementById('requestclosebutton');
+const lightdismiss = document.getElementById('lightdismiss');
createToggleEventSourceTest({
description: 'ToggleEvent.source on <dialog> elements: dialog.showModal().',
@@ -53,4 +57,34 @@ createToggleEventSourceTest({
openSource: showmodalbutton,
closeSource: null
});
+
+createToggleEventSourceTest({
+ description: 'ToggleEvent.source on <dialog> elements: open with showModal, close with request-close button.',
+ target: dialog,
+ openFunc: async () => dialog.showModal(),
+ closeFunc: async () => requestclosebutton.click(),
+ openSource: null,
+ closeSource: requestclosebutton
+});
+
+createToggleEventSourceTest({
+ description: 'ToggleEvent.source on <dialog> elements: open with button, close with light dismiss.',
+ target: dialog,
+ openFunc: async () => {
+ await test_driver.click(showmodalbutton);
+ },
+ closeFunc: async () => {
+ dialog.addEventListener('cancel', event => event.preventDefault(), {once: true});
+ requestclosebutton.click();
+ assert_true(dialog.matches(':open'),
+ 'cancel preventDefault should have prevented dialog from closing.');
+ await (new test_driver.Actions()
+ .pointerMove(0, 0, {origin: lightdismiss})
+ .pointerDown()
+ .pointerUp())
+ .send();
+ },
+ openSource: showmodalbutton,
+ closeSource: null
+});
</script>
diff --git a/tests/wpt/tests/html/semantics/permission-element/bounded-css-properties.tentative.html b/tests/wpt/tests/html/semantics/permission-element/bounded-css-properties.tentative.html
index 9678286179a..1455ba98bb3 100644
--- a/tests/wpt/tests/html/semantics/permission-element/bounded-css-properties.tentative.html
+++ b/tests/wpt/tests/html/semantics/permission-element/bounded-css-properties.tentative.html
@@ -17,11 +17,13 @@
word-spacing: 1em;
font-size: 100px;
letter-spacing: 21px;
+ box-shadow: 5px 5px inset;
}
#id-under-bounds {
word-spacing: -1px;
font-size: 100px;
letter-spacing: -6px;
+ box-shadow: rgb(255, 0, 0) 5px 4px 3px 2px, 5px 5px inset;
}
#id-within-bounds {
font-weight: 300;
@@ -29,6 +31,7 @@
word-spacing: 0.4em;
font-size: 100px;
letter-spacing: 15px;
+ box-shadow: rgb(255, 0, 0) 5px 4px 3px 2px;
}
</style>
@@ -44,10 +47,12 @@
assert_equals(getComputedStyle(el).fontStyle, "normal", "font-style");
assert_equals(getComputedStyle(el).wordSpacing, "50px", "word-spacing");
assert_equals(getComputedStyle(el).letterSpacing, "20px", "letter-spacing");
+ assert_equals(getComputedStyle(el).boxShadow, "none", "box-shadow");
el = document.getElementById("id-under-bounds");
assert_equals(getComputedStyle(el).wordSpacing, "0px", "word-spacing, negative");
assert_equals(getComputedStyle(el).letterSpacing, "-5px", "letter-spacing, negative");
+ assert_equals(getComputedStyle(el).boxShadow, "none", "box-shadow, multiple");
}, "Properties with out-of-bounds values should be corrected");
test(function(){
@@ -56,6 +61,7 @@
assert_equals(getComputedStyle(el).fontStyle, "italic", "font-style");
assert_equals(getComputedStyle(el).wordSpacing, "40px", "word-spacing");
assert_equals(getComputedStyle(el).letterSpacing, "15px", "letter-spacing");
+ assert_equals(getComputedStyle(el).boxShadow, "rgb(255, 0, 0) 5px 4px 3px 2px", "box-shadow");
el.style.letterSpacing = "-4px";
assert_equals(getComputedStyle(el).letterSpacing, "-4px", "letter-spacing, negative");
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html
new file mode 100644
index 00000000000..130849e79ba
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-fill-reftest.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>The icon of the element should change if the fill color is changed</title>
+<!-- TODO: Update the link to the permission icon spec -->
+<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md">
+<link rel="mismatch" href="standard-location-permission-element-ref.html">
+<style>
+ ::permission-icon {
+ fill: red;
+ }
+</style>
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html
new file mode 100644
index 00000000000..9f52fd75479
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-height-reftest.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>The icon of the element should change if the height is changed</title>
+<!-- TODO: Update the link to the permission icon spec -->
+<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md">
+<link rel="mismatch" href="standard-location-permission-element-ref.html">
+<style>
+ ::permission-icon {
+ height: 20px;
+ }
+</style>
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html
new file mode 100644
index 00000000000..b4edffbf00b
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-margin-inline-end-reftest.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>The icon of the element should change if the margin-inline-end is changed</title>
+<!-- TODO: Update the link to the permission icon spec -->
+<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md">
+<link rel="mismatch" href="standard-location-permission-element-ref.html">
+<style>
+ ::permission-icon {
+ margin-inline-end: 50px;
+ }
+</style>
+<permission id="geolocation" type="geolocation"/>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html
new file mode 100644
index 00000000000..abda1adc1d8
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>
+ A standard permission element of type location, without 50px height.
+</title>
+
+<style>
+ ::permission-icon {
+ height: 50px;
+ }
+</style>
+
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest.html
new file mode 100644
index 00000000000..45abc0ffd47
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-max-height-reftest.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<title>The icon of the element should be restricted to 50px due to the max-height property.</title>
+<!-- TODO: Update the link to the permission icon spec -->
+<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md">
+<link rel="match" href="icon-css-property-max-height-reftest-ref.html">
+<style>
+ ::permission-icon {
+ height: 60px;
+ max-height: 50px;
+ }
+</style>
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html
new file mode 100644
index 00000000000..d1fe8d0724c
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-min-height-reftest.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>The icon of the element should change if the min-height is changed</title>
+<!-- TODO: Update the link to the permission icon spec -->
+<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md">
+<link rel="mismatch" href="standard-location-permission-element-ref.html">
+<style>
+ ::permission-icon {
+ min-height: 50px;
+ }
+</style>
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html
new file mode 100644
index 00000000000..9d0ff75c3d8
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-reftest.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>The icon of the element should change if the stroke is changed</title>
+<!-- TODO: Update the link to the permission icon spec -->
+<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md">
+<link rel="mismatch" href="standard-location-permission-element-ref.html">
+<style>
+ ::permission-icon {
+ stroke: red;
+ }
+</style>
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest-ref.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest-ref.html
new file mode 100644
index 00000000000..5ed8af57313
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest-ref.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<title>
+ A standard permission element of type location, with a red stroke with the
+ default stroke-width of 1px.
+</title>
+
+<style>
+ ::permission-icon {
+ stroke: red;
+ }
+</style>
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html
new file mode 100644
index 00000000000..a268e3c5fba
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-css-property-stroke-width-reftest.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<title>The icon of the element should change if the stroke-width is changed</title>
+<!-- TODO: Update the link to the permission icon spec -->
+<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md">
+<link rel="mismatch" href="icon-css-property-stroke-width-reftest-ref.html">
+<style>
+ ::permission-icon {
+ stroke-width: 2px;
+ }
+</style>
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html
new file mode 100644
index 00000000000..bf58fdf93e5
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-different-for-precise-location-reftest.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<title>The precise and non-precise location icons should be different.</title>
+<!-- TODO: Update the link to the permission icon spec -->
+<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md">
+<link rel="mismatch" href="standard-location-permission-element-ref.html">
+<permission id="geolocation" type="geolocation" preciselocation></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-hidden-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-hidden-reftest.html
index 79055da1bad..a5b5bb61d2b 100644
--- a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-hidden-reftest.html
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-hidden-reftest.html
@@ -8,4 +8,4 @@
display: none;
}
</style>
-<permission id="geolocation" type="geolocation"/>
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-restricted-css-no-effect-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-restricted-css-no-effect-reftest.html
new file mode 100644
index 00000000000..5c0ea13fde7
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-restricted-css-no-effect-reftest.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<title>The icon of the permission element should not change when any of the restricted CSS properties are changed.</title>
+<!-- TODO: Update the link to the permission icon spec -->
+<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md">
+<link rel="match" href="standard-location-permission-element-ref.html">
+<style>
+ ::permission-icon {
+ margin-inline-start: 100px;
+ float: inline-end;
+ padding: 50px;
+ opacity: 0.5;
+ stroke-opacity: 0.5;
+ fill-rule: evenodd;
+ }
+</style>
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-unique-per-type-reftest.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-unique-per-type-reftest.html
index d51b1c4d398..162a785852c 100644
--- a/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-unique-per-type-reftest.html
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/icon-unique-per-type-reftest.html
@@ -3,4 +3,4 @@
<!-- TODO: Update the link to the permission icon spec -->
<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md">
<link rel="mismatch" href="standard-location-permission-element-ref.html">
-<permission id="camera" type="camera"/>
+<permission id="camera" type="camera"></permission>
diff --git a/tests/wpt/tests/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html b/tests/wpt/tests/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html
index 15ffe751c51..d9f55b345f7 100644
--- a/tests/wpt/tests/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html
+++ b/tests/wpt/tests/html/semantics/permission-element/permission-icon/standard-location-permission-element-ref.html
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>A standard permission element of type location, without any non-default styling</title>
-<permission id="geolocation" type="geolocation"/>
+<permission id="geolocation" type="geolocation"></permission>
diff --git a/tests/wpt/tests/html/semantics/popovers/popover-toggle-source.tentative.html b/tests/wpt/tests/html/semantics/popovers/popover-toggle-source.html
index 00ced8f7070..00ced8f7070 100644
--- a/tests/wpt/tests/html/semantics/popovers/popover-toggle-source.tentative.html
+++ b/tests/wpt/tests/html/semantics/popovers/popover-toggle-source.html
diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-invoker-descendants.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-invoker-descendants.tentative.html
new file mode 100644
index 00000000000..d976c0eb011
--- /dev/null
+++ b/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-invoker-descendants.tentative.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<link rel="author" href="mailto:masonf@chromium.org">
+<link rel="help" href="https://open-ui.org/components/interest-invokers.explainer/" />
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="resources/invoker-utils.js"></script>
+
+<button id=invoker interesttarget=target>
+ Button content
+ <span id=inner tabindex=0>Inner content</span>
+</button>
+<div id=target>Target</div>
+<button id=otherbutton>Other button</button>
+<style>
+ [interesttarget] { interest-target-delay: 0s; }
+</style>
+
+<script>
+const invoker = document.getElementById('invoker');
+const innerSpan = document.getElementById('inner');
+const target = document.getElementById('target');
+const otherbutton = document.getElementById('otherbutton');
+
+promise_test(async function (t) {
+ t.add_cleanup(() => otherbutton.focus());
+ const signal = t.get_signal();
+ let interestCount = 0;
+ let loseInterestCount = 0;
+ target.addEventListener('interest',() => (++interestCount),{signal});
+ target.addEventListener('loseinterest',() => (++loseInterestCount),{signal});
+ await focusOn(invoker);
+ assert_true(invoker.matches(':has-interest'),'focusing invoker should show interest');
+ assert_equals(interestCount,1,'One interest event');
+ interestCount = 0;
+ assert_equals(loseInterestCount,0,'No loseinterest events');
+ await focusOn(innerSpan);
+ assert_true(invoker.matches(':has-interest'),'focusing inner span should keep interest');
+ assert_equals(interestCount,0,'No extra interest events');
+ assert_equals(loseInterestCount,0,'No loseinterest events');
+ await focusOn(invoker);
+ assert_true(invoker.matches(':has-interest'),'focusing back to outer button should keep interest');
+ assert_equals(interestCount,0,'No extra interest events');
+ assert_equals(loseInterestCount,0,'No loseinterest events');
+ await focusOn(otherbutton);
+ assert_false(invoker.matches(':has-interest'),'focusing outside should lose interest');
+ assert_equals(interestCount,0,'No extra interest events');
+ assert_equals(loseInterestCount,1,'Finally got loseinterest event');
+},'Moving focus within invoker works correctly');
+
+promise_test(async function (t) {
+ t.add_cleanup(() => otherbutton.focus());
+ const signal = t.get_signal();
+ let interestCount = 0;
+ let loseInterestCount = 0;
+ target.addEventListener('interest',() => (++interestCount),{signal});
+ target.addEventListener('loseinterest',() => (++loseInterestCount),{signal});
+ await hoverOver(invoker);
+ assert_true(invoker.matches(':has-interest'),'hovering invoker should show interest');
+ assert_equals(interestCount,1,'One interest event');
+ interestCount = 0;
+ assert_equals(loseInterestCount,0,'No loseinterest events');
+ await hoverOver(innerSpan);
+ assert_true(invoker.matches(':has-interest'),'hovering inner span should keep interest');
+ assert_equals(interestCount,0,'No extra interest events');
+ assert_equals(loseInterestCount,0,'No loseinterest events');
+ await hoverOver(invoker);
+ assert_true(invoker.matches(':has-interest'),'hovering back to outer button should keep interest');
+ assert_equals(interestCount,0,'No extra interest events');
+ assert_equals(loseInterestCount,0,'No loseinterest events');
+ await hoverOver(otherbutton);
+ assert_false(invoker.matches(':has-interest'),'hovering outside should lose interest');
+ assert_equals(interestCount,0,'No extra interest events');
+ assert_equals(loseInterestCount,1,'Finally got loseinterest event');
+},'Moving hover within invoker works correctly');
+</script>
diff --git a/tests/wpt/tests/images/pattern.webm b/tests/wpt/tests/images/pattern.webm
index 7cd3d311557..8b7ff388b88 100644
--- a/tests/wpt/tests/images/pattern.webm
+++ b/tests/wpt/tests/images/pattern.webm
Binary files differ
diff --git a/tests/wpt/tests/interfaces/crash-reporting.idl b/tests/wpt/tests/interfaces/crash-reporting.idl
index 6eaee138a82..ba21afcf397 100644
--- a/tests/wpt/tests/interfaces/crash-reporting.idl
+++ b/tests/wpt/tests/interfaces/crash-reporting.idl
@@ -8,6 +8,6 @@ interface CrashReportBody : ReportBody {
[Default] object toJSON();
readonly attribute DOMString? reason;
readonly attribute DOMString? stack;
- readonly attribute DOMString? is_top_level;
+ readonly attribute boolean? is_top_level;
readonly attribute DocumentVisibilityState? page_visibility;
};
diff --git a/tests/wpt/tests/interfaces/cssom-view.idl b/tests/wpt/tests/interfaces/cssom-view.idl
index 88abb078485..160c27ca050 100644
--- a/tests/wpt/tests/interfaces/cssom-view.idl
+++ b/tests/wpt/tests/interfaces/cssom-view.idl
@@ -141,6 +141,7 @@ partial interface Element {
};
partial interface HTMLElement {
+ readonly attribute Element? scrollParent;
readonly attribute Element? offsetParent;
readonly attribute long offsetTop;
readonly attribute long offsetLeft;
diff --git a/tests/wpt/tests/interfaces/element-timing.idl b/tests/wpt/tests/interfaces/element-timing.idl
index ef73ca6c0f6..4f42823704a 100644
--- a/tests/wpt/tests/interfaces/element-timing.idl
+++ b/tests/wpt/tests/interfaces/element-timing.idl
@@ -13,7 +13,7 @@ interface PerformanceElementTiming : PerformanceEntry {
readonly attribute unsigned long naturalHeight;
readonly attribute DOMString id;
readonly attribute Element? element;
- readonly attribute DOMString url;
+ readonly attribute USVString url;
[Default] object toJSON();
};
diff --git a/tests/wpt/tests/interfaces/html.idl b/tests/wpt/tests/interfaces/html.idl
index 9c84e6a67ef..3a7dce9693e 100644
--- a/tests/wpt/tests/interfaces/html.idl
+++ b/tests/wpt/tests/interfaces/html.idl
@@ -1235,18 +1235,19 @@ interface HTMLDialogElement : HTMLElement {
interface HTMLScriptElement : HTMLElement {
[HTMLConstructor] constructor();
- [CEReactions] attribute USVString src;
[CEReactions] attribute DOMString type;
+ [CEReactions] attribute USVString src;
[CEReactions] attribute boolean noModule;
[CEReactions] attribute boolean async;
[CEReactions] attribute boolean defer;
+ [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking;
[CEReactions] attribute DOMString? crossOrigin;
- [CEReactions] attribute DOMString text;
- [CEReactions] attribute DOMString integrity;
[CEReactions] attribute DOMString referrerPolicy;
- [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking;
+ [CEReactions] attribute DOMString integrity;
[CEReactions] attribute DOMString fetchPriority;
+ [CEReactions] attribute DOMString text;
+
static boolean supports(DOMString type);
// also has obsolete members
@@ -1694,6 +1695,7 @@ interface ToggleEvent : Event {
constructor(DOMString type, optional ToggleEventInit eventInitDict = {});
readonly attribute DOMString oldState;
readonly attribute DOMString newState;
+ readonly attribute Element source;
};
dictionary ToggleEventInit : EventInit {
diff --git a/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl b/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl
index 0ab5d0fc21e..02a35798204 100644
--- a/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl
+++ b/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl
@@ -30,9 +30,12 @@ dictionary PrivateAttributionImpressionOptions {
unsigned long lifetimeDays = 30;
};
+dictionary PrivateAttributionImpressionResult {
+};
+
[SecureContext, Exposed=Window]
partial interface PrivateAttribution {
- undefined saveImpression(PrivateAttributionImpressionOptions options);
+ Promise<PrivateAttributionImpressionResult> saveImpression(PrivateAttributionImpressionOptions options);
};
dictionary PrivateAttributionConversionOptions {
diff --git a/tests/wpt/tests/interfaces/resource-timing.idl b/tests/wpt/tests/interfaces/resource-timing.idl
index 66f2841d744..499d27b6ee6 100644
--- a/tests/wpt/tests/interfaces/resource-timing.idl
+++ b/tests/wpt/tests/interfaces/resource-timing.idl
@@ -28,6 +28,7 @@ interface PerformanceResourceTiming : PerformanceEntry {
readonly attribute unsigned short responseStatus;
readonly attribute RenderBlockingStatusType renderBlockingStatus;
readonly attribute DOMString contentType;
+ readonly attribute DOMString contentEncoding;
[Default] object toJSON();
};
diff --git a/tests/wpt/tests/interfaces/scoped-custom-elements-registry.idl b/tests/wpt/tests/interfaces/scoped-custom-elements-registry.idl
deleted file mode 100644
index 46ca2d6b9c4..00000000000
--- a/tests/wpt/tests/interfaces/scoped-custom-elements-registry.idl
+++ /dev/null
@@ -1,38 +0,0 @@
-[Exposed=Window]
-partial interface CustomElementRegistry {
- constructor();
- undefined initialize(Node root);
-};
-
-[Exposed=Window]
-partial interface HTMLTemplateElement {
- [CEReactions] attribute DOMString shadowRootCustomElementRegistry;
-};
-
-[Exposed=Window]
-partial interface Document {
- readonly attribute CustomElementRegistry? customElementRegistry;
-};
-
-[Exposed=Window]
-partial interface Element {
- readonly attribute CustomElementRegistry? customElementRegistry;
-};
-
-[Exposed=Window]
-partial interface ShadowRoot {
- readonly attribute CustomElementRegistry? customElementRegistry;
-};
-
-dictionary ImportNodeOptions {
- CustomElementRegistry customElementRegistry;
- boolean selfOnly = false;
-};
-
-partial dictionary ShadowRootInit {
- CustomElementRegistry customElementRegistry;
-};
-
-partial dictionary ElementCreationOptions {
- CustomElementRegistry customElementRegistry;
-};
diff --git a/tests/wpt/tests/interfaces/screen-capture.idl b/tests/wpt/tests/interfaces/screen-capture.idl
index db9282ce0a5..eb5685eee41 100644
--- a/tests/wpt/tests/interfaces/screen-capture.idl
+++ b/tests/wpt/tests/interfaces/screen-capture.idl
@@ -29,6 +29,12 @@ enum SystemAudioPreferenceEnum {
"exclude"
};
+enum WindowAudioPreferenceEnum {
+ "system",
+ "window",
+ "exclude"
+};
+
enum SurfaceSwitchingPreferenceEnum {
"include",
"exclude"
@@ -45,6 +51,7 @@ dictionary DisplayMediaStreamOptions {
CaptureController controller;
SelfCapturePreferenceEnum selfBrowserSurface;
SystemAudioPreferenceEnum systemAudio;
+ WindowAudioPreferenceEnum windowAudio;
SurfaceSwitchingPreferenceEnum surfaceSwitching;
MonitorTypeSurfacesEnum monitorTypeSurfaces;
};
diff --git a/tests/wpt/tests/interfaces/secure-payment-confirmation.idl b/tests/wpt/tests/interfaces/secure-payment-confirmation.idl
index 5b67ca62678..0a2207684ec 100644
--- a/tests/wpt/tests/interfaces/secure-payment-confirmation.idl
+++ b/tests/wpt/tests/interfaces/secure-payment-confirmation.idl
@@ -11,6 +11,7 @@ dictionary SecurePaymentConfirmationRequest {
unsigned long timeout;
USVString payeeName;
USVString payeeOrigin;
+ sequence<PaymentEntityLogo> paymentEntitiesLogos;
AuthenticationExtensionsClientInputs extensions;
sequence<USVString> locale;
boolean showOptOut;
@@ -40,6 +41,7 @@ dictionary AuthenticationExtensionsPaymentInputs {
USVString topOrigin;
USVString payeeName;
USVString payeeOrigin;
+ sequence<PaymentEntityLogo> paymentEntitiesLogos;
PaymentCurrencyAmount total;
PaymentCredentialInstrument instrument;
};
@@ -53,6 +55,7 @@ dictionary CollectedClientAdditionalPaymentData {
required USVString topOrigin;
USVString payeeName;
USVString payeeOrigin;
+ sequence<PaymentEntityLogo> paymentEntitiesLogos;
required PaymentCurrencyAmount total;
required PaymentCredentialInstrument instrument;
};
@@ -62,3 +65,8 @@ dictionary PaymentCredentialInstrument {
required USVString icon;
boolean iconMustBeShown = true;
};
+
+dictionary PaymentEntityLogo {
+ required USVString url;
+ required USVString label;
+};
diff --git a/tests/wpt/tests/interfaces/speech-api.idl b/tests/wpt/tests/interfaces/speech-api.idl
index 94a416f262b..9620e60dc50 100644
--- a/tests/wpt/tests/interfaces/speech-api.idl
+++ b/tests/wpt/tests/interfaces/speech-api.idl
@@ -12,7 +12,7 @@ interface SpeechRecognition : EventTarget {
attribute boolean continuous;
attribute boolean interimResults;
attribute unsigned long maxAlternatives;
- attribute SpeechRecognitionMode mode;
+ attribute boolean processLocally;
attribute SpeechRecognitionPhraseList phrases;
// methods to drive the speech interaction
@@ -20,8 +20,8 @@ interface SpeechRecognition : EventTarget {
undefined start(MediaStreamTrack audioTrack);
undefined stop();
undefined abort();
- static Promise<AvailabilityStatus> availableOnDevice(DOMString lang);
- static Promise<boolean> installOnDevice(DOMString lang);
+ static Promise<AvailabilityStatus> available(SpeechRecognitionOptions options);
+ static Promise<boolean> install(SpeechRecognitionOptions options);
// event methods
attribute EventHandler onaudiostart;
@@ -37,6 +37,11 @@ interface SpeechRecognition : EventTarget {
attribute EventHandler onend;
};
+dictionary SpeechRecognitionOptions {
+ required sequence<DOMString> langs;
+ boolean processLocally = false;
+};
+
enum SpeechRecognitionErrorCode {
"no-speech",
"aborted",
@@ -48,12 +53,6 @@ enum SpeechRecognitionErrorCode {
"phrases-not-supported"
};
-enum SpeechRecognitionMode {
- "ondevice-preferred", // On-device speech recognition if available, otherwise use Cloud speech recognition as a fallback.
- "ondevice-only", // On-device speech recognition only. Returns an error if on-device speech recognition is not available.
- "cloud-only", // Cloud speech recognition only.
-};
-
enum AvailabilityStatus {
"unavailable",
"downloadable",
diff --git a/tests/wpt/tests/interfaces/wai-aria.idl b/tests/wpt/tests/interfaces/wai-aria.idl
index deebc5626e2..3364bc9a769 100644
--- a/tests/wpt/tests/interfaces/wai-aria.idl
+++ b/tests/wpt/tests/interfaces/wai-aria.idl
@@ -57,4 +57,4 @@ interface mixin ARIAMixin {
[CEReactions] attribute DOMString? ariaValueNow;
[CEReactions] attribute DOMString? ariaValueText;
};
-Element includes ARIAMixin;
+ Element includes ARIAMixin;
diff --git a/tests/wpt/tests/interfaces/web-animations-2.idl b/tests/wpt/tests/interfaces/web-animations-2.idl
index c4a0c2532d9..f18cdd4f458 100644
--- a/tests/wpt/tests/interfaces/web-animations-2.idl
+++ b/tests/wpt/tests/interfaces/web-animations-2.idl
@@ -118,7 +118,7 @@ dictionary AnimationPlaybackEventInit : EventInit {
interface AnimationTrigger {
constructor(optional AnimationTriggerOptions options = {});
attribute AnimationTimeline timeline;
- attribute AnimationTriggerType type;
+ attribute AnimationTriggerBehavior behavior;
attribute any rangeStart;
attribute any rangeEnd;
attribute any exitRangeStart;
@@ -127,11 +127,11 @@ interface AnimationTrigger {
dictionary AnimationTriggerOptions {
AnimationTimeline? timeline;
- AnimationTriggerType? type = "once";
+ AnimationTriggerBehavior? behavior = "once";
(TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeStart = "normal";
(TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeEnd = "normal";
(TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) exitRangeStart = "auto";
(TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) exitRangeEnd = "auto";
};
-enum AnimationTriggerType { "once", "repeat", "alternate", "state" };
+enum AnimationTriggerBehavior { "once", "repeat", "alternate", "state" };
diff --git a/tests/wpt/tests/interfaces/webgpu.idl b/tests/wpt/tests/interfaces/webgpu.idl
index 4fec46a2557..1fc896c6b16 100644
--- a/tests/wpt/tests/interfaces/webgpu.idl
+++ b/tests/wpt/tests/interfaces/webgpu.idl
@@ -127,6 +127,7 @@ enum GPUFeatureName {
"clip-distances",
"dual-source-blending",
"subgroups",
+ "texture-formats-tier1",
};
[Exposed=(Window, Worker), SecureContext]
@@ -295,6 +296,8 @@ enum GPUTextureFormat {
"r8sint",
// 16-bit formats
+ "r16unorm",
+ "r16snorm",
"r16uint",
"r16sint",
"r16float",
@@ -307,6 +310,8 @@ enum GPUTextureFormat {
"r32uint",
"r32sint",
"r32float",
+ "rg16unorm",
+ "rg16snorm",
"rg16uint",
"rg16sint",
"rg16float",
@@ -327,6 +332,8 @@ enum GPUTextureFormat {
"rg32uint",
"rg32sint",
"rg32float",
+ "rgba16unorm",
+ "rgba16snorm",
"rgba16uint",
"rgba16sint",
"rgba16float",
@@ -556,7 +563,11 @@ dictionary GPUBindGroupDescriptor
required sequence<GPUBindGroupEntry> entries;
};
-typedef (GPUSampler or GPUTextureView or GPUBufferBinding or GPUExternalTexture) GPUBindingResource;
+typedef (GPUSampler or
+ GPUTextureView or
+ GPUBuffer or
+ GPUBufferBinding or
+ GPUExternalTexture) GPUBindingResource;
dictionary GPUBindGroupEntry {
required GPUIndex32 binding;
@@ -990,7 +1001,7 @@ interface mixin GPUBindingCommandsMixin {
optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []);
undefined setBindGroup(GPUIndex32 index, GPUBindGroup? bindGroup,
- Uint32Array dynamicOffsetsData,
+ [AllowShared] Uint32Array dynamicOffsetsData,
GPUSize64 dynamicOffsetsDataStart,
GPUSize32 dynamicOffsetsDataLength);
};
diff --git a/tests/wpt/tests/interfaces/writing-assistance-apis.idl b/tests/wpt/tests/interfaces/writing-assistance-apis.idl
index 916daee754e..82acfdb48e2 100644
--- a/tests/wpt/tests/interfaces/writing-assistance-apis.idl
+++ b/tests/wpt/tests/interfaces/writing-assistance-apis.idl
@@ -56,7 +56,7 @@ dictionary SummarizerSummarizeOptions {
DOMString context;
};
-enum SummarizerType { "tl;dr", "teaser", "key-points", "headline" };
+enum SummarizerType { "tldr", "teaser", "key-points", "headline" };
enum SummarizerFormat { "plain-text", "markdown" };
enum SummarizerLength { "short", "medium", "long" };
diff --git a/tests/wpt/tests/lint.ignore b/tests/wpt/tests/lint.ignore
index 60b0f65a6f4..cf83e458213 100644
--- a/tests/wpt/tests/lint.ignore
+++ b/tests/wpt/tests/lint.ignore
@@ -173,6 +173,7 @@ SET TIMEOUT: encrypted-media/polyfill/clearkey-polyfill.js
SET TIMEOUT: encrypted-media/scripts/playback-temporary-events.js
SET TIMEOUT: fedcm/support/fedcm-iframe.html
SET TIMEOUT: fedcm/support/fedcm/disconnect-iframe.html
+SET TIMEOUT: fedcm/support/login_delay.html
SET TIMEOUT: fetch/fetch-later/resources/fetch-later-helper.js
SET TIMEOUT: fetch/metadata/resources/helper.sub.js
SET TIMEOUT: fetch/metadata/resources/message-opener.html
@@ -423,6 +424,7 @@ SET TIMEOUT: speculation-rules/prerender/resources/media-play.html
SET TIMEOUT: html/browsers/browsing-the-web/back-forward-cache/timers.html
SET TIMEOUT: dom/abort/crashtests/timeout-close.html
SET TIMEOUT: storage-access-api/storage-access-beyond-cookies.locks.sub.https.window.js
+SET TIMEOUT: pointerevents/crashtests/longpress-crash.html
# setTimeout use in reftests
SET TIMEOUT: acid/acid3/test.html
@@ -818,6 +820,7 @@ TESTDRIVER-IN-UNSUPPORTED-TYPE: payment-handler/change-shipping-address-manual.h
TESTDRIVER-IN-UNSUPPORTED-TYPE: payment-handler/change-shipping-option-manual.https.html
TESTDRIVER-IN-UNSUPPORTED-TYPE: payment-handler/payment-request-event-manual.https.html
TESTDRIVER-IN-UNSUPPORTED-TYPE: payment-handler/supports-shipping-contact-delegation-manual.https.html
+TESTDRIVER-IN-UNSUPPORTED-TYPE: speech-api/SpeechRecognition-phrases-manual.https.html
# Tests automatically imported from the WebAssembly/spec repository that should be removed after getting fixed upstream.
SET TIMEOUT: wasm/core/js/harness/testharness.js
diff --git a/tests/wpt/tests/paint-timing/idlharness.window.js b/tests/wpt/tests/paint-timing/idlharness.window.js
index 049f0f18f1b..9843a604b80 100644
--- a/tests/wpt/tests/paint-timing/idlharness.window.js
+++ b/tests/wpt/tests/paint-timing/idlharness.window.js
@@ -7,7 +7,7 @@
idl_test(
['paint-timing'],
- ['performance-timeline'],
+ ['performance-timeline', 'hr-time'],
(idl_array, t) => {
idl_array.add_objects({
PerformancePaintTiming: ['paintTiming'],
diff --git a/tests/wpt/tests/pointerevents/crashtests/longpress-crash.html b/tests/wpt/tests/pointerevents/crashtests/longpress-crash.html
new file mode 100644
index 00000000000..0ace661d5a9
--- /dev/null
+++ b/tests/wpt/tests/pointerevents/crashtests/longpress-crash.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<link rel="author" href="mailto:masonf@chromium.org">
+<link rel="help" href="https://crbug.com/421119389">
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<html class=test-wait>
+
+<button>Button</button>
+
+<script>
+async function longPress(element) {
+ const actions = new test_driver.Actions();
+ await actions.addPointer("touchPointer", "touch")
+ .pointerMove(0, 0, {sourceName: "touchPointer",origin: element})
+ .pointerDown({sourceName: "touchPointer",origin: element})
+ .send();
+ // This needs to be long enough to trigger long-press:
+ await new Promise(resolve => setTimeout(resolve,1000));
+ await actions.pointerUp({sourceName: "touchPointer"})
+ .send();
+}
+
+async function test() {
+ const el = document.querySelector('button');
+ await longPress(el);
+ await longPress(el);
+ document.documentElement.classList.remove('test-wait');
+}
+// This test should pass if nothing crashes.
+test();
+
+</script>
diff --git a/tests/wpt/tests/pointerevents/pointerevent_click_during_parent_capture.html b/tests/wpt/tests/pointerevents/pointerevent_click_during_parent_capture.html
index f25e61aade3..fd6de4d0899 100644
--- a/tests/wpt/tests/pointerevents/pointerevent_click_during_parent_capture.html
+++ b/tests/wpt/tests/pointerevents/pointerevent_click_during_parent_capture.html
@@ -240,6 +240,7 @@ addEventListener(
.pointerMove(0, 0, { origin: target })
.pointerDown()
.pointerUp()
+ .pause(100) // XXX Required for preventing intermittent failure of Firefox
.send();
test(() => {
diff --git a/tests/wpt/tests/resources/test/conftest.py b/tests/wpt/tests/resources/test/conftest.py
index 1301e7a9f77..0b67ca76761 100644
--- a/tests/wpt/tests/resources/test/conftest.py
+++ b/tests/wpt/tests/resources/test/conftest.py
@@ -55,6 +55,7 @@ def pytest_configure(config):
config.driver = webdriver.Session("localhost", 4444,
capabilities=capabilities)
+ config.driver.start()
config.add_cleanup(config.driver.end)
# Although the name of the `_create_unverified_context` method suggests
diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-addAnimation.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-addAnimation.tentative.html
new file mode 100644
index 00000000000..71fedebbcea
--- /dev/null
+++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-addAnimation.tentative.html
@@ -0,0 +1,148 @@
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="help" src="https://drafts.csswg.org/css-animations-2/#animation-trigger">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/web-animations/testcommon.js"></script>
+ <script src="/dom/events/scrolling/scroll_support.js"></script>
+ <script src="support/support.js"></script>
+ </head>
+ <body>
+ <style>
+ .subject, .target {
+ height: 50px;
+ width: 50px;
+ background-color: red;
+ }
+ .scroller {
+ overflow-y: scroll;
+ height: 500px;
+ width: 500px;
+ border: solid 1px;
+ position: relative;
+ }
+ #space {
+ width: 50px;
+ height: 600px;
+ }
+ </style>
+ <div id="wrapper">
+ <div id="scroller" class="scroller">
+ <div id="space"></div>
+ <div id="subject" class="subject"></div>
+ <div id="space"></div>
+ </div>
+ <div id="target" class="target"></div>
+ </div>
+ <script>
+ // The trigger and exit ranges are the same for this test.
+ const TRIGGER_START_PX = 150;
+ const TRIGGER_END_PX = 200;
+ const scroller = document.getElementById("scroller");
+ const target = document.getElementById("target");
+ const COVER_START_OFFSET = 100;
+ const rangeBoundaries = getRangeBoundariesForTest(
+ COVER_START_OFFSET + TRIGGER_START_PX,
+ COVER_START_OFFSET + TRIGGER_END_PX,
+ COVER_START_OFFSET + TRIGGER_START_PX,
+ COVER_START_OFFSET + TRIGGER_END_PX,
+ scroller);
+ const ANIMATION_DURATION_MS = 1;
+ const view_timeline = new ViewTimeline({ subject: subject });
+ function setupAnimation() {
+ const animation = new Animation(
+ new KeyframeEffect(
+ target,
+ [
+ { transform: "scaleX(1)", backgroundColor: "pink", left: "0px" },
+ { transform: "scaleX(5)", backgroundColor: "pink", left: "10px" }
+ ],
+ { duration: ANIMATION_DURATION_MS, fill: "both" }
+ ));
+ return animation;
+ }
+ function setupAnimationTrigger(use_default_trigger=false) {
+ const trigger = use_default_trigger ? new AnimationTrigger()
+ : new AnimationTrigger({
+ type: "alternate",
+ timeline: view_timeline,
+ rangeStart: `${TRIGGER_START_PX}px`,
+ rangeEnd: `${TRIGGER_END_PX}px`
+ });
+ return trigger;
+ }
+
+ promise_test(async (test) => {
+ const animation = setupAnimation();
+ const trigger = setupAnimationTrigger(/*use_default_trigger=*/true);
+
+ // As the default trigger is always in the tripped state, the animation
+ // should be played right away.
+ trigger.addAnimation(animation);
+ await animation.finished;
+
+ assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS,
+ "animation finish reflected in currentTime");
+ assert_equals(animation.playState, "finished",
+ "animation finish reflected in playeState");
+ }, "Animation attached to tripped (default) trigger plays.");
+
+ promise_test(async (test) => {
+ const animation = setupAnimation();
+ const trigger = setupAnimationTrigger();
+
+ assert_equals(animation.playState, "idle", "animation is idle");
+ assert_equals(animation.currentTime, null, "currentTime is null");
+
+ assert_equals(scroller.scrollTop, 0, "scroller is not scrolled, i.e. " +
+ "not within the trigger range");
+
+ trigger.addAnimation(animation);
+
+ await waitForAnimationFrames(2);
+
+ assert_equals(animation.playState, "paused",
+ "animation is paused, awaiting trigger event");
+ assert_times_equal(animation.currentTime, 0, "currentTime is 0");
+
+ // Entering the trigger range should play the animation.
+ rangeBoundaries.enterTriggerRange();
+ await animation.finished;
+
+ assert_equals(animation.playState, "finished",
+ "animation is paused, awaiting trigger event");
+ assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS,
+ "currentTime is 0");
+ }, "Animation attached to untripped trigger is paused at the beginning.");
+
+ promise_test(async (test) => {
+ await waitForScrollReset(test, scroller);
+
+ assert_equals(scroller.scrollTop, 0, "scroller is not scrolled, i.e. " +
+ "not within the trigger range");
+
+ const animation = setupAnimation();
+ const trigger = setupAnimationTrigger();
+
+ assert_equals(animation.playState, "idle", "animation is idle");
+ assert_equals(animation.currentTime, null, "currentTime is null");
+
+ rangeBoundaries.enterTriggerRange();
+ await waitForAnimationFrames(2);
+
+ assert_equals(animation.playState, "idle", "animation is still idle");
+ assert_equals(animation.currentTime, null, "currentTime is still null");
+
+ trigger.addAnimation(animation);
+ await animation.finished;
+
+ assert_equals(animation.playState, "finished",
+ "animation is paused, awaiting trigger event");
+ assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS,
+ `currentTime is ${ANIMATION_DURATION_MS}`);
+ }, "Animation attached to tripped trigger is played immediately.");
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html
new file mode 100644
index 00000000000..6914cb09b89
--- /dev/null
+++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html
@@ -0,0 +1,132 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="help" src="https://drafts.csswg.org/css-animations-2/#animation-trigger">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/web-animations/testcommon.js"></script>
+ <script src="/dom/events/scrolling/scroll_support.js"></script>
+ <script src="support/support.js"></script>
+ </head>
+ <body>
+ <style>
+ .subject, .target {
+ height: 50px;
+ width: 50px;
+ background-color: red;
+ }
+ .scroller {
+ overflow-y: scroll;
+ height: 500px;
+ width: 500px;
+ border: solid 1px;
+ position: relative;
+ }
+ #space {
+ width: 50px;
+ height: 600px;
+ }
+ </style>
+ <div id="wrapper">
+ <div id="scroller" class="scroller">
+ <div id="space"></div>
+ <div id="subject" class="subject"></div>
+ <div id="space"></div>
+ </div>
+ <div id="target1" class="target"></div>
+ <div id="target2" class="target"></div>
+ </div>
+ <script>
+ // The trigger and exit ranges are the same for this test.
+ const TRIGGER_START_PX = 150;
+ const TRIGGER_END_PX = 200;
+ const scroller = document.getElementById("scroller");
+ const subject = document.getElementById("subject");
+ const target = document.getElementById("target");
+
+ const ANIMATION_DURATION_MS = 1;
+
+ const COVER_START_OFFSET = 100;
+ const rangeBoundaries = getRangeBoundariesForTest(
+ COVER_START_OFFSET + TRIGGER_START_PX,
+ COVER_START_OFFSET + TRIGGER_END_PX,
+ COVER_START_OFFSET + TRIGGER_START_PX,
+ COVER_START_OFFSET + TRIGGER_END_PX,
+ scroller);
+
+ function setupAnimation(target) {
+ const animation = new Animation(
+ new KeyframeEffect(
+ target,
+ [
+ { transform: "scaleX(1)", backgroundColor: "pink", left: "0px" },
+ { transform: "scaleX(5)", backgroundColor: "pink", left: "10px" }
+ ],
+ { duration: ANIMATION_DURATION_MS, fill: "both" }
+ ));
+ return animation;
+ }
+
+ const view_timeline = new ViewTimeline({ subject: subject });
+ function setupAnimationTrigger() {
+ const trigger = new AnimationTrigger({
+ type: "alternate",
+ timeline: view_timeline,
+ rangeStart: `${TRIGGER_START_PX}px`,
+ rangeEnd: `${TRIGGER_END_PX}px`
+ });
+ return trigger;
+ }
+
+ promise_test(async (test) => {
+ const animation1 = setupAnimation(target1);
+ const animation2 = setupAnimation(target2);
+ const trigger = setupAnimationTrigger();
+
+ assert_equals(animation1.playState, "idle", "animation1 is idle");
+ assert_equals(animation1.currentTime, null,
+ "animation1's currentTime is null");
+ assert_equals(animation2.playState, "idle", "animation is idle");
+ assert_equals(animation2.currentTime, null,
+ "animations2's currentTime is null");
+ assert_equals(scroller.scrollTop, 0,
+ "scroller is not scrolled, i.e. not within the trigger range");
+
+ trigger.addAnimation(animation1);
+
+ assert_equals(animation1.playState, "paused",
+ "animation1 is paused, awaiting trigger event");
+ assert_times_equal(animation1.currentTime, 0,
+ "animation1's currentTime is 0");
+ assert_equals(animation2.playState, "idle", "animation2 is idle");
+ assert_equals(animation2.currentTime, null,
+ "animations2's currentTime is null");
+
+ trigger.addAnimation(animation2);
+
+ assert_equals(animation1.playState, "paused",
+ "animation is paused, awaiting trigger event");
+ assert_times_equal(animation1.currentTime, 0,
+ "animation1's currentTime is 0");
+ assert_equals(animation2.playState, "paused",
+ "animation2 is paused, awaiting trigger event");
+ assert_times_equal(animation2.currentTime, 0,
+ "animation2's currentTime is 0");
+
+ rangeBoundaries.enterTriggerRange();
+
+ await animation1.finished;
+ await animation2.finished;
+
+ assert_equals(animation1.playState, "finished",
+ "animation1 is paused, awaiting trigger event");
+ assert_times_equal(animation1.currentTime, ANIMATION_DURATION_MS,
+ `animation1's currentTime is ${ANIMATION_DURATION_MS}`);
+ assert_equals(animation2.playState, "finished",
+ "animation2 is paused, awaiting trigger event");
+ assert_times_equal(animation2.currentTime, ANIMATION_DURATION_MS,
+ `animation2's currentTime is ${ANIMATION_DURATION_MS}`);
+ }, "Single trigger controls multiple animations");
+ </script>
+ </body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html
new file mode 100644
index 00000000000..5fccdf27550
--- /dev/null
+++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html
@@ -0,0 +1,175 @@
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="help" src="https://drafts.csswg.org/css-animations-2/#animation-trigger">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/web-animations/testcommon.js"></script>
+ <script src="/dom/events/scrolling/scroll_support.js"></script>
+ <script src="support/support.js"></script>
+ </head>
+ <body>
+ <style>
+ .subject, .target {
+ height: 50px;
+ width: 50px;
+ background-color: red;
+ }
+ .scroller {
+ overflow-y: scroll;
+ height: 500px;
+ width: 500px;
+ border: solid 1px;
+ position: relative;
+ }
+ #space {
+ width: 50px;
+ height: 600px;
+ }
+ </style>
+ <div id="wrapper">
+ <div id="scroller" class="scroller">
+ <div id="space"></div>
+ <div id="subject1" class="subject"></div>
+ <div id="space"></div>
+ <div id="subject2" class="subject"></div>
+ <div id="space"></div>
+ </div>
+ <div id="target" class="target"></div>
+ </div>
+ <script>
+ // The trigger and exit ranges are the same for this test.
+ const TRIGGER_START_PX = 150;
+ const TRIGGER_END_PX = 200;
+ const scroller = document.getElementById("scroller");
+ const subject1 = document.getElementById("subject1");
+ const subject2 = document.getElementById("subject2");
+ const target = document.getElementById("target");
+
+ function getRangeBoundariesForSubject(subject, scroller) {
+ const cover_start_offset = subject.offsetTop - scroller.clientHeight;
+ return getRangeBoundariesForTest(
+ cover_start_offset + TRIGGER_START_PX,
+ cover_start_offset + TRIGGER_END_PX,
+ cover_start_offset + TRIGGER_START_PX,
+ cover_start_offset + TRIGGER_END_PX,
+ scroller);
+ }
+ const rangeBoundaries1 = getRangeBoundariesForSubject(subject1,
+ scroller);
+ const rangeBoundaries2 = getRangeBoundariesForSubject(subject2,
+ scroller);
+
+ const ANIMATION_DURATION_MS = 1;
+ const view_timeline1 = new ViewTimeline({ subject: subject1 });
+ const view_timeline2 = new ViewTimeline({ subject: subject2 });
+ function setupAnimation() {
+ const animation = new Animation(
+ new KeyframeEffect(
+ target,
+ [
+ { transform: "scaleX(1)", backgroundColor: "pink" },
+ { transform: "scaleX(5)", backgroundColor: "pink" }
+ ],
+ { duration: ANIMATION_DURATION_MS, fill: "both" }
+ ));
+ return animation;
+ }
+ function setupAnimationTrigger(view_timeline) {
+ const trigger = new AnimationTrigger({
+ type: "repeat",
+ timeline: view_timeline,
+ rangeStart: `${TRIGGER_START_PX}px`,
+ rangeEnd: `${TRIGGER_END_PX}px`
+ });
+ return trigger;
+ }
+
+ promise_test(async (test) => {
+ const animation = setupAnimation();
+ const trigger1 = setupAnimationTrigger(view_timeline1);
+ const trigger2 = setupAnimationTrigger(view_timeline2);
+
+ // Test preconditions.
+ assert_equals(animation.playState, "idle", "animation is idle");
+ assert_equals(animation.currentTime, null, "currentTime is null");
+ assert_equals(scroller.scrollTop, 0, "scroller is not scrolled, i.e. " +
+ "not within the trigger range");
+
+ trigger1.addAnimation(animation);
+ trigger2.addAnimation(animation);
+
+ // Test preconditions.
+ assert_equals(animation.playState, "paused", "animation is idle");
+ assert_equals(animation.currentTime, 0, "currentTime is null");
+
+ await rangeBoundaries1.enterTriggerRange();
+ await animation.finished;
+ assert_equals(animation.playState, "finished",
+ "animation is played by trigger1");
+ assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS,
+ `currentTime is ${ANIMATION_DURATION_MS}`);
+
+ await rangeBoundaries1.exitExitRangeBelow();
+ await waitForNextFrame();
+ assert_equals(animation.playState, "paused",
+ "animation should be reset by trigger1");
+ assert_times_equal(animation.currentTime, 0, "currentTime is 0");
+
+ // animation should be played by trigger2.
+ rangeBoundaries2.enterTriggerRange();
+ await animation.finished;
+ assert_equals(animation.playState, "finished",
+ "animation is paused, awaiting trigger event");
+ assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS,
+ `currentTime is ${ANIMATION_DURATION_MS}`);
+
+ // animation should be reversed by trigger2.
+ rangeBoundaries2.exitExitRangeBelow();
+ await waitForNextFrame();
+ assert_equals(animation.playState, "paused",
+ "animation is paused, awaiting trigger event");
+ assert_times_equal(animation.currentTime, 0, `currentTime is 0`);
+ }, "Triggers on same animation; no conflict.");
+
+ promise_test(async (test) => {
+ await waitForScrollReset(test, scroller);
+ const animation = setupAnimation();
+ const trigger1 = setupAnimationTrigger(view_timeline1);
+ const trigger2 = setupAnimationTrigger(view_timeline2);
+
+ // Test preconditions.
+ assert_equals(animation.playState, "idle", "animation is idle");
+ assert_equals(animation.currentTime, null, "currentTime is null");
+ assert_equals(scroller.scrollTop, 0, "scroller is not scrolled, i.e. " +
+ "not within the trigger range");
+
+ trigger1.addAnimation(animation);
+ trigger2.addAnimation(animation);
+
+ // Test preconditions.
+ assert_equals(animation.playState, "paused", "animation is paused");
+ assert_equals(animation.currentTime, 0, "currentTime is null");
+
+ await rangeBoundaries1.enterTriggerRange();
+ await animation.finished;
+ assert_equals(animation.playState, "finished",
+ "animation is played by trigger1");
+ assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS,
+ `currentTime is ${ANIMATION_DURATION_MS}`);
+
+ // Entering trigger2's trigger range exits trigger1's exit range.
+ // So trigger1 wants to do a reset and trigger2 wants to play the
+ // animation. As trigger2 was the most recently created, it wins and the
+ // animation is played.
+ rangeBoundaries2.enterTriggerRange();
+ await animation.finished;
+ assert_equals(animation.playState, "finished",
+ "animation is paused, awaiting trigger event");
+ assert_times_equal(animation.currentTime, ANIMATION_DURATION_MS,
+ `currentTime is ${ANIMATION_DURATION_MS}`);
+ }, "Triggers on same animation; conflict.");
+ </script>
+ </body>
+</html>
diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html
deleted file mode 100644
index 7506fb05829..00000000000
--- a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger.html
+++ /dev/null
@@ -1,169 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <link rel="help" src="https://drafts.csswg.org/css-animations-2/#animation-trigger">
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- <script src="/web-animations/testcommon.js"></script>
- <script src="/css/css-typed-om/resources/testhelper.js"></script>
- </head>
- <body>
- <style>
- @keyframes myAnim {
- from { transform: scaleX(1); }
- to { transform: scaleX(5); }
- }
- .subject, .target {
- height: 50px;
- width: 50px;
- background-color: red;
- }
- .subject {
- view-timeline: --viewtimeline;
- }
- .target {
- animation: myAnim linear 0.5s forwards;
- }
- #scroll_target {
- animation-trigger: repeat scroll(inline) 150px 200px 100px 250px;
- }
- #view_target {
- animation-trigger: state view(x) contain 10% contain 90% cover 10% cover 90%;
- }
- #deferred_target {
- animation-trigger: alternate --viewtimeline contain 5% contain 80% cover 5% cover 80%;
- }
- .scroller {
- overflow-y: scroll;
- height: 500px;
- width: 500px;
- border: solid 1px;
- position: relative;
- }
- #wrapper {
- timeline-scope: --viewtimeline;
- }
- #space {
- width: 50px;
- height: 600px;
- }
- </style>
- <div id="wrapper">
- <div id="default_target" class="target"></div>
- <div id="scroller" class="scroller">
- <div id="space"></div>
- <div id="scroll_target" class="target"></div>
- <div id="space"></div>
- <div id="view_target" class="target"></div>
- <div id="space"></div>
- <div id="deferred_subject" class="subject"></div>
- <div id="space"></div>
- </div>
- <div id="deferred_target" class="target"></div>
- </div>
- <script>
- function assert_timeline_offset(actual, expected, errorMessage) {
- assert_equals(actual.rangeName, expected.rangeName, errorMessage);
- assert_style_value_equals(actual.offset, expected.offset);
- }
-
- function testTrigger(trigger, expectation) {
- assert_equals(trigger.type, expectation.type, "trigger type matches");
- assert_timeline_offset(trigger.rangeStart, expectation.rangeStart,
- "trigger rangeStart matches");
- assert_timeline_offset(trigger.rangeEnd, expectation.rangeEnd,
- "trigger rangeEnd matches");
- assert_timeline_offset(trigger.exitRangeStart, expectation.exitRangeStart,
- "trigger exitRangeStart matches");
- assert_timeline_offset(trigger.exitRangeEnd, expectation.exitRangeEnd,
- "trigger exitRangeEnd matches");
- if (expectation.timeline === document.timeline) {
- assert_equals(trigger.timeline, document.timeline, "timeline matches");
- } else {
- assert_equals(trigger.timeline.source, expectation.timelineSource,
- "trigger timeline source matches");
- assert_equals(trigger.timeline.axis, expectation.timelineAxis,
- "trigger timeline axis matches");
- assert_equals(trigger.timeline.subject, expectation.timelineSubject,
- "trigger timeline subject matches");
- }
- }
-
- promise_test(async() => {
- await waitForNextFrame();
- const animation = default_target.getAnimations()[0];
- const trigger = animation.trigger;
-
- const expectation = {
- type: "once",
- rangeStart: "normal",
- rangeEnd: "normal",
- exitRangeStart: "normal",
- exitRangeEnd: "normal",
- timeline: document.timeline
- };
-
- testTrigger(trigger, expectation);
- }, "Default AnimationTrigger for CSS Animation");
-
- promise_test(async() => {
- await waitForNextFrame();
- const animation = scroll_target.getAnimations()[0];
- const trigger = animation.trigger;
- await waitForNextFrame();
-
- const expectation = {
- type: "repeat",
- rangeStart: { rangeName: "none", offset: CSS.px(150) },
- rangeEnd: { rangeName: "none", offset: CSS.px(200) },
- exitRangeStart: { rangeName: "none", offset: CSS.px(100) },
- exitRangeEnd: { rangeName: "none", offset: CSS.px(250) },
- timelineSource: scroller,
- timelineAxis: "inline"
- };
-
- testTrigger(trigger, expectation);
- }, "AnimationTrigger for CSS Animation with scroll() timeline");
-
- promise_test(async() => {
- await waitForNextFrame();
- const animation = view_target.getAnimations()[0];
- const trigger = animation.trigger;
- await waitForNextFrame();
-
- const expectation = {
- type: "state",
- rangeStart: { rangeName: 'contain', offset: CSS.percent(10) },
- rangeEnd: { rangeName: 'contain', offset: CSS.percent(90) },
- exitRangeStart: { rangeName: 'cover', offset: CSS.percent(10) },
- exitRangeEnd: { rangeName: 'cover', offset: CSS.percent(90) },
- timelineSource: scroller,
- timelineAxis: "x",
- timelineSubject: view_target
- };
-
- testTrigger(trigger, expectation);
- }, "AnimationTrigger for CSS Animation with view() timeline");
-
- promise_test(async() => {
- await waitForNextFrame();
- const animation = deferred_target.getAnimations()[0];
- const trigger = animation.trigger;
- await waitForNextFrame();
-
- const expectation = {
- type: "alternate",
- rangeStart: { rangeName: 'contain', offset: CSS.percent(5) },
- rangeEnd: { rangeName: 'contain', offset: CSS.percent(80) },
- exitRangeStart: { rangeName: 'cover', offset: CSS.percent(5) },
- exitRangeEnd: { rangeName: 'cover', offset: CSS.percent(80) },
- timelineSource: scroller,
- timelineAxis: "block",
- timelineSubject: deferred_subject
- };
-
- testTrigger(trigger, expectation);
- }, "AnimationTrigger for CSS Animation with deferred timeline");
- </script>
- </body>
-</html> \ No newline at end of file
diff --git a/tests/wpt/tests/service-workers/service-worker/add-routes.https.html b/tests/wpt/tests/service-workers/service-worker/add-routes.https.html
new file mode 100644
index 00000000000..fbab7cdedfa
--- /dev/null
+++ b/tests/wpt/tests/service-workers/service-worker/add-routes.https.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Service Worker: addRoutes() executes in installing</title>
+<script src="/common/get-host-info.sub.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/test-helpers.sub.js"></script>
+<script src="resources/static-router-helpers.sub.js"></script>
+<script>
+
+promise_test(async t => {
+ const script = 'resources/add-routes.js';
+ const scope = 'resources/blank.html';
+ const reg = await service_worker_unregister_and_register(t, script, scope);
+ t.add_cleanup(() => reg.unregister());
+ await wait_for_state(t, reg.installing, 'activated');
+ const sw = reg.active;
+ const addRoutesError = await get_info_from_worker(sw);
+
+ assert_equals(addRoutesError.install, null,
+ 'addRoutes() should execute successfully in installing');
+ assert_true(addRoutesError.activate instanceof Error,
+ 'addRoutes() should throw outside of installing');
+
+}, 'addRoutes() will not be executed outside of installing');
+
+</script> \ No newline at end of file
diff --git a/tests/wpt/tests/service-workers/service-worker/resources/add-routes.js b/tests/wpt/tests/service-workers/service-worker/resources/add-routes.js
new file mode 100644
index 00000000000..796acd19c12
--- /dev/null
+++ b/tests/wpt/tests/service-workers/service-worker/resources/add-routes.js
@@ -0,0 +1,37 @@
+let globalAddRoutes;
+let addRoutesError = {};
+
+self.addEventListener('install', event => {
+ globalAddRoutes = event.addRoutes.bind(event);
+ globalAddRoutes([
+ {
+ condition: { urlPattern: '/', runningStatus: 'not-running' },
+ source: 'network',
+ },
+ ])
+ .then(() => {
+ addRoutesError.install = null;
+ })
+ .catch(error => {
+ addRoutesError.install = error;
+ });
+});
+
+self.addEventListener('activate', event => {
+ globalAddRoutes([
+ {
+ condition: { urlPattern: '/', runningStatus: 'not-running' },
+ source: 'network',
+ },
+ ])
+ .then(() => {
+ addRoutesError.activate = null;
+ })
+ .catch(error => {
+ addRoutesError.activate = error;
+ });
+});
+
+self.addEventListener('message', event => {
+ event.ports[0].postMessage(addRoutesError);
+}); \ No newline at end of file
diff --git a/tests/wpt/tests/soft-navigation-heuristics/detection/tentative/racing-soft-navigations.html b/tests/wpt/tests/soft-navigation-heuristics/detection/tentative/racing-soft-navigations.html
index d485f908134..b513ff4f99b 100644
--- a/tests/wpt/tests/soft-navigation-heuristics/detection/tentative/racing-soft-navigations.html
+++ b/tests/wpt/tests/soft-navigation-heuristics/detection/tentative/racing-soft-navigations.html
@@ -10,68 +10,240 @@
<script></script>
</head>
<body>
- <div id="slow-soft-navigation">Click here!</div>
- <div id="fast-soft-navigation">Click here!</div>
+ <div id="first_interaction">Click here!</div>
+ <div id="second_interaction">Click here!</div>
<script>
- // This soft navigation is slow - it will wait 1s before processing.
- function slowSoftNavigation(t) {
- t.step_timeout(() => {
+ const FIRST_URL = "first-url";
+ const SECOND_URL = "second-url";
+
+ const button1 = document.getElementById("first_interaction");
+ const button2 = document.getElementById("second_interaction");
+
+ async function updateUI() {
const greeting = document.createElement("div");
greeting.textContent = "Hello, World.";
document.body.appendChild(greeting);
- history.pushState({}, "", "/slow-soft-navigation");
- }, 1000);
}
- // This soft navigation is fast - it will process immediately.
- function fastSoftNavigation() {
- const greeting = document.createElement("div");
- greeting.textContent = "Hello, World.";
- document.body.appendChild(greeting);
- history.pushState({}, "", "/fast-soft-navigation");
+ function updateUrl(t, url) {
+ t.state.numPushStateCalls++;
+ const actual_url = t.state.urlPrefix + url;
+ history.pushState({}, "", actual_url);
+ }
+
+ async function waitForSoftNavEntry(t, count = 1) {
+ return t.step_wait(() => t.state.softNavEntries.length >= count);
}
- promise_test(async (t) => {
- document.getElementById("slow-soft-navigation").addEventListener("click", () => {
- slowSoftNavigation(t);
- });
- document
- .getElementById("fast-soft-navigation")
- .addEventListener("click", fastSoftNavigation);
-
- // Wait for both soft navigations to complete.
- const promise = new Promise((resolve) => {
- let entries = [];
- new PerformanceObserver((list, observer) => {
- entries.push(...list.getEntries());
- if (entries.length >= 2) {
- observer.disconnect();
- resolve(entries);
+ async function create_test(urlPrefix, callback) {
+ return promise_test(async (t) => {
+ const currentUrl = location.pathname.replace(/.*\//, "");
+ assert_equals(currentUrl, "racing-soft-navigations.html");
+
+ t.state = {};
+ t.state.urlPrefix = urlPrefix;
+ t.state.numPushStateCalls = 0;
+ t.state.softNavEntries = [];
+ const observer = new PerformanceObserver((list, observer) => {
+ // If we get two soft-navs in one observer callback...
+ // that is a sign that we emitted multiple for a single effect
+ const entries = list.getEntries();
+ assert_equals(entries.length, 1, "Expecting a single soft navigation");
+ t.state.softNavEntries.push(entries[0]);
+ });
+ observer.observe({ type: 'soft-navigation' });
+
+ // We have multiple test cases with side effects, so add some cleanup.
+ t.add_cleanup(async () => {
+ observer.disconnect();
+
+ // Go back to the original URL
+ for (let i = 0; i < t.state.numPushStateCalls; i++) {
+ history.back();
+ await new Promise(resolve => {
+ addEventListener('popstate', resolve, {once: true});
+ });
}
- }).observe({ type: "soft-navigation" });
- });
+ });
+
+ return callback(t);
+ }, "Racing multiple overlapping interactions and soft navs: " + urlPrefix);
+ }
+
+ async function expectationsMultipleInteractionTest(t, expected = [FIRST_URL, SECOND_URL]) {
+ const count = expected.length;
+ await t.step_wait(() => t.state.softNavEntries.length >= count, `Wait for ${count} soft navigation entries`);
+
+ // Although we await at least `count` (above), we also assert exactly `count` (here)
+ assert_equals(t.state.softNavEntries.length, count, `Expected ${count} soft navigation entries`);
+
+ for (let i = 0; i < count; i++) {
+ const entry = t.state.softNavEntries[i];
+ const actual_expected_url = t.state.urlPrefix + expected[i];
+ assert_equals(
+ entry.name.replace(/.*\//, ""),
+ actual_expected_url,
+ "Expect to observe the first URL change.",
+ );
+ }
+ }
+
+ // The following tests will trigger two interaction back to back, and each
+ // interaction will do a sequence of the following:
+ // - Triggers event listener, which schedules async work
+ // - updates URL
+ // - updates UI
+ // - yield, or timeout of some kind
+ // - Emit a soft nav entry
+ //
+ // Because there are two interactions per test, we manipulate the
+ // sequence of operations in various ways.
+
+ // Baseline, non overlapping interactions.
+ create_test("click1,url1,ui1,sn1,yield,click2,url2,ui2,sn2", async (t) => {
+ button1.addEventListener('click', async () => {
+ updateUrl(t, FIRST_URL);
+ updateUI();
+ }, { once: true });
+
+ button2.addEventListener('click', async () => {
+ updateUrl(t, SECOND_URL);
+ updateUI();
+ }, { once: true });
+
+ if (test_driver) {
+ test_driver.click(button1);
+ }
+
+ await waitForSoftNavEntry(t);
+
+ if(test_driver) {
+ test_driver.click(button2);
+ }
+
+ await expectationsMultipleInteractionTest(t);
+ });
+
+ // Both interactions start and yield (simulate network), then finish all
+ // required effects and emit soft nav without overlap. First interaction
+ // wins the "network" race.
+ create_test("click1,yield,click2,yield,url1,ui1,sn1,yield,url2,ui2,sn2", async (t) => {
+ button1.addEventListener('click', async () => {
+ t.step_timeout(() => {
+ updateUrl(t, FIRST_URL);
+ updateUI();
+ }, 0);
+ }, { once: true });
+
+ button2.addEventListener('click', async () => {
+ await waitForSoftNavEntry(t);
+
+ updateUrl(t, SECOND_URL);
+ updateUI();
+ }, { once: true });
+
+ // Start both soft navigations in rapid succession.
+ if (test_driver) {
+ test_driver.click(button1);
+ test_driver.click(button2);
+ }
+
+ await expectationsMultipleInteractionTest(t);
+
+ });
+
+ // Both interactions start and yield (simulate network), then finish all
+ // required effects and emit soft nav without overlap. Second interaction
+ // wins the "network" race.
+ create_test("click1,yield,click2,yield,url2,ui2,sn2,yield,url1,ui1,sn1", async (t) => {
+ button1.addEventListener('click', async () => {
+ await waitForSoftNavEntry(t);
+ // In this test, the first interaction sets the second URL
+ updateUrl(t, FIRST_URL);
+ updateUI();
+ }, { once: true });
+
+ button2.addEventListener('click', async () => {
+ t.step_timeout(() => {
+ updateUrl(t, SECOND_URL);
+ updateUI();
+ }, 0);
+ }, { once: true });
+
// Start both soft navigations in rapid succession.
if (test_driver) {
- test_driver.click(document.getElementById("slow-soft-navigation"));
- test_driver.click(document.getElementById("fast-soft-navigation"));
+ test_driver.click(button1);
+ test_driver.click(button2);
}
- // Notice that both navigations are detected, with the fast one
- // arriving first.
- const entries = await promise;
- assert_equals(entries.length, 2, "Expected two soft navigation entries");
- assert_equals(
- entries[0].name.replace(/.*\//, ""),
- "fast-soft-navigation",
- "First entry should be the fast soft navigation.",
- );
- assert_equals(
- entries[1].name.replace(/.*\//, ""),
- "slow-soft-navigation",
- "Second entry should be the slow soft navigation.",
- );
- }, "Two soft navigations that race each other should be detected correctly.");
+ await expectationsMultipleInteractionTest(t, [SECOND_URL, FIRST_URL]);
+ });
+
+ // Both interactions start, immediately update URL and yield (simulate
+ // navigate interception), then finish all required effects later.
+ // Only the second URL update emits a soft nav entry.
+ create_test("click1,url1,yield,click2,url2,ui1,yield,ui2,sn2", async (t) => {
+ let first_interaction_did_finish_paint = false;
+ let second_interaction_did_run = false;
+
+ button1.addEventListener('click', async () => {
+ updateUrl(t, FIRST_URL);
+
+ await t.step_wait(() => second_interaction_did_run);
+
+ updateUI();
+
+ await new Promise(r => requestAnimationFrame(r));
+ await new Promise(r => t.step_timeout(r, 0));
+ first_interaction_did_finish_paint = true;
+ }, { once: true });
+
+ button2.addEventListener('click', async () => {
+ updateUrl(t, SECOND_URL);
+ second_interaction_did_run = true;
+
+ await t.step_wait(() => first_interaction_did_finish_paint);
+
+ updateUI();
+ }, { once: true });
+
+ // Start both soft navigations in rapid succession.
+ if (test_driver) {
+ test_driver.click(button1);
+ test_driver.click(button2);
+ }
+
+ await expectationsMultipleInteractionTest(t,[SECOND_URL]);
+ });
+
+ // Both interactions start, immediately update URL and yield (simulate
+ // navigate interception), then finish all required effects later.
+ // Only the second URL update emits a soft nav entry.
+ create_test("click1,url1,yield,click2,url2,yield,ui2,sn2,yield,ui1", async (t) => {
+ button1.addEventListener('click', async () => {
+ updateUrl(t, FIRST_URL);
+ await waitForSoftNavEntry(t);
+ updateUI();
+ }, { once: true });
+
+ button2.addEventListener('click', async () => {
+ updateUrl(t, SECOND_URL);
+
+ t.step_timeout(async () => {
+ updateUI();
+ }, 100);
+ }, { once: true });
+
+ // Start both soft navigations in rapid succession.
+ if (test_driver) {
+ test_driver.click(button1);
+ test_driver.click(button2);
+ }
+
+ await expectationsMultipleInteractionTest(t,[SECOND_URL]);
+ });
+
</script>
</body>
</html>
diff --git a/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/distant-leaf.window.js b/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/distant-leaf.window.js
new file mode 100644
index 00000000000..c599985a2a2
--- /dev/null
+++ b/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/distant-leaf.window.js
@@ -0,0 +1,47 @@
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=../../resources/soft-navigation-test-helper.js
+
+// This test is intended to verify that when a distant leaf of a
+// deeply nested div element is attached to the DOM, its painting can
+// trigger a soft navigation.
+//
+// To show this, we create a button that, when clicked, creates a deeply
+// nested div element and attaches it to the DOM - only the leaf, a text
+// node saying "Hello, World.", 10 levels below the attachment point actually
+// gets painted.
+
+function clickHandler() {
+ let div = document.createElement('div');
+ div.textContent = 'Hello, World.'; // The leaf node that gets painted.
+ for (let i = 0; i < 10; i++) {
+ const tmp = document.createElement('div');
+ tmp.appendChild(div);
+ div = tmp;
+ }
+ document.body.appendChild(div);
+ history.pushState({}, '', '/greeting');
+}
+
+const button = document.createElement('div');
+button.textContent = 'Click here!';
+button.onclick = clickHandler;
+document.body.appendChild(button);
+
+promise_test(async (t) => {
+ if (test_driver) {
+ test_driver.click(button);
+ }
+ const helper = new SoftNavigationTestHelper(t);
+ const entries = await helper.getBufferedPerformanceEntriesWithTimeout(
+ /*type=*/ 'soft-navigation',
+ /*includeSoftNavigationObservations=*/ false,
+ /*minNumEntries=*/ 1,
+ );
+ assert_equals(entries.length, 1, 'Expected exactly one soft navigation.');
+ assert_equals(
+ entries[0].name.replace(/.*\//, ''),
+ 'greeting',
+ 'URL ends with \'greeting\'.',
+ );
+}, 'DOM: Distant leaf satisfies Soft Navigation paint criterion.');
diff --git a/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/insert-image-div-before.window.js b/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/insert-image-div-before.window.js
new file mode 100644
index 00000000000..19e8a397c34
--- /dev/null
+++ b/tests/wpt/tests/soft-navigation-heuristics/dom/tentative/insert-image-div-before.window.js
@@ -0,0 +1,47 @@
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+// META: script=../../resources/soft-navigation-test-helper.js
+
+// This test shows a relatively simple case where a div with an image inside
+// is inserted before another element, and the image is painted, and yet
+// we don't detect a soft navigation.
+// https://g-issues.chromium.org/issues/419822831#comment5
+
+function clickHandler() {
+ const div = document.createElement("div");
+ const img = new Image();
+ img.src = "/images/lcp-256x256.png"
+ // Uncomment the following line => test passes (image should work too though).
+ // div.textContent = "Hello, World.";
+ div.appendChild(img);
+ document.body.insertBefore(div, document.getElementById("insert-before"));
+ history.pushState({}, '', '/test');
+}
+
+const div = document.createElement('div');
+div.id = 'insert-before';
+document.body.appendChild(div);
+
+const button = document.createElement('div');
+button.textContent = 'Click here!';
+button.onclick = clickHandler;
+document.body.appendChild(button);
+
+promise_test(async (t) => {
+ if (test_driver) {
+ test_driver.click(button);
+ }
+ const helper = new SoftNavigationTestHelper(t);
+ const entries = await helper.getBufferedPerformanceEntriesWithTimeout(
+ /*type=*/ 'soft-navigation',
+ /*includeSoftNavigationObservations=*/ false,
+ /*minNumEntries=*/ 1,
+ /*timeout=*/ 3000,
+ );
+ assert_equals(entries.length, 1, 'Expected exactly one soft navigation.');
+ assert_equals(
+ entries[0].name.replace(/.*\//, ''),
+ 'test',
+ 'URL ends with \'test\'.',
+ );
+}, 'DOM: Insert image div satisfies Soft Navigation paint criterion.');
diff --git a/tests/wpt/tests/soft-navigation-heuristics/history/tentative/navigation-api-prevent-default.window.js b/tests/wpt/tests/soft-navigation-heuristics/history/tentative/navigation-api-prevent-default.window.js
new file mode 100644
index 00000000000..3df2192f560
--- /dev/null
+++ b/tests/wpt/tests/soft-navigation-heuristics/history/tentative/navigation-api-prevent-default.window.js
@@ -0,0 +1,48 @@
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
+
+// This test shows that preventDefault() on the navigate event can
+// prevent a soft navigation, because it ensures that neither the a.href
+// (foobar.html in our example) is visited, nor the handler specified in the
+// intercept on the navigate event is called.
+
+const link = document.createElement('a');
+link.href = 'foobar.html';
+link.textContent = 'Click me!';
+document.body.appendChild(link);
+
+promise_test(async (t) => {
+ let navigateProcessed = false;
+
+ navigation.addEventListener('navigate', (e) => {
+ e.intercept({
+ async handler() {
+ assert_unreached('preventDefault() should prevent the navigation');
+ },
+ });
+ e.preventDefault();
+ navigateProcessed = true;
+ });
+
+ if (test_driver) {
+ test_driver.click(link);
+ }
+
+ await t.step_wait(
+ () => navigateProcessed, '\'navigate\' event not processed');
+
+ const observer = new PerformanceObserver(() => {
+ assert_unreached('Soft navigation should not be triggered');
+ });
+ observer.observe({type: 'soft-navigation', buffered: true});
+
+ await new Promise((resolve) => {
+ t.step_timeout(resolve, 3000);
+ }).then(() => {
+ observer.disconnect();
+ });
+ if (document.softNavigations) {
+ assert_equals(document.softNavigations, 0, 'Soft Navigation not detected');
+ }
+ assert_false(location.href.includes('foobar.html'), 'foobar.html not visited');
+}, 'Navigation API: Aborted navigate event is not a soft navigation');
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
deleted file mode 100644
index b7b2a24c942..00000000000
--- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta charset="utf-8">
-<title>Don't detect a navigate event which got aborted as a soft navigation.
-</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="resources/soft-navigation-helper.js"></script>
-</head>
-<body>
- <main id=main>
- <a href="foobar.html" id=link>Click me!</a>
- </main>
- <script>
- const link = document.getElementById("link");
- testSoftNavigationNotDetected({
- testName: "Aborted navigate event is not a soft navigation",
- eventHandler: e => {
- e.intercept({handler: async () => {
- await addImageToMain();
- main.appendChild(img);
- }});
- e.preventDefault();
- timestamps[counter]["eventEnd"] = performance.now();
- },
- eventTarget: navigation,
- eventName: "navigate",
- link: link});
- </script>
-</body>
-</html>
-
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 fd87f5f03e7..a460b922eb7 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
@@ -1,64 +1,77 @@
-<!DOCTYPE HTML>
+<!DOCTYPE html>
<html>
-<head>
-<meta charset="utf-8">
-<title>Soft navigation with multiple popstate calls.</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="resources/soft-navigation-helper.js"></script>
-</head>
-<body>
- <main id=main>
- <div>
- <a id=link>Click me!</a>
- </div>
- </main>
- <script>
- // Push state 4 times, as history.back() calls will trigger popstate
- // events.
- history.pushState({}, "", "foobar.html");
- history.pushState({}, "", "another_one.html");
- history.pushState({}, "", "and_another.html");
- history.pushState({}, "", "and_yet_another.html");
+ <head>
+ <meta charset="utf-8" />
+ <title>Soft navigation with multiple popstate calls.</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/resources/testdriver.js"></script>
+ <script src="/resources/testdriver-vendor.js"></script>
+ <script src="resources/soft-navigation-helper.js"></script>
+ </head>
+ <body>
+ <main id="main">
+ <div>
+ <a id="link">Click me!</a>
+ </div>
+ </main>
+ <script>
+ // Push state 4 times, as history.back() calls will trigger popstate
+ // events.
+ history.pushState({}, "", "three.html");
+ history.pushState({}, "", "two.html");
+ history.pushState({}, "", "one.html");
+ history.pushState({}, "", "zero.html");
- // This function runs at the start of the popstate event.
- const eventPrepWork = t => {
- // If this is an event due to the first click, go back() twice more.
- if (!t.popped) {
- step_timeout(()=>history.back(), 0);
- step_timeout(()=>history.back(), 0);
- t.popped = 0;
- }
- ++t.popped;
- // return true for the second time the event fires, which is the first
- // back() triggered by the popstate event. The means that the first one
- // of those back() navigations would trigger a soft navigation, but not
- // the last one.
- return t.popped == 2;
- }
- const link = document.getElementById("link");
- link.addEventListener("click", () => {
- history.back();
- timestamps[counter]["eventEnd"] = performance.now();
- });
- testSoftNavigation({
- addContent: () => {
- // Add the content to the main element
- const main = document.getElementById("main");
- main.removeChild(document.getElementsByTagName("div")[0]);
- const div = document.createElement("div");
- const text = document.createTextNode("Lorem ipsum");
- div.appendChild(text);
- div.style="font-size: 3em";
- main.appendChild(div);
- },
- link: link,
- eventPrepWork: eventPrepWork,
- testName: "A soft navigation that started from a back() call inside a "
- + "popstate event is recognized by SoftNavigationHeuristics",
- eventType: "popstate"});
- </script>
-</body>
+ // When the link is clicked by the driver, this click handler will call
+ // history.back(), which will (of course) also trigger a popstate event.
+ // The history.back() destination is one.html, the first URL visited by
+ // this interaction.
+ const link = document.getElementById("link");
+ link.addEventListener("click", async () => {
+ history.back();
+ timestamps[counter]["eventEnd"] = performance.now();
+ await waitForUrlToEndWith("one.html");
+ });
+
+ let shouldPrepWorkFail = false;
+ testSoftNavigation({
+ link: link,
+ // The popstate event handler triggers two additional history.back()
+ // events, which don't cascade further (see shouldPrepWorkFail).
+ // After the pushState method runs, the contents get added, and the
+ // soft navigation is detected.
+ eventType: "popstate",
+ eventPrepWork: () => {
+ return !shouldPrepWorkFail;
+ },
+ pushState: async () => {
+ shouldPrepWorkFail = true;
+ history.back();
+ await waitForUrlToEndWith("two.html"); // Second URL visited by interaction.
+ history.back();
+ await waitForUrlToEndWith("three.html"); // Third and final URL visited by interaction.
+ },
+ // This is the URL we expect to see in the 'name' field of the soft navigation entry.
+ pushUrl: "one.html",
+ addContent: async () => {
+ assert_true(
+ location.href.endsWith("three.html"),
+ "addContent should see the effect of all history.back() calls",
+ );
+ // Add the content to the main element
+ const main = document.getElementById("main");
+ main.removeChild(document.getElementsByTagName("div")[0]);
+ const div = document.createElement("div");
+ const text = document.createTextNode("Lorem ipsum");
+ div.appendChild(text);
+ div.style = "font-size: 3em";
+ main.appendChild(div);
+ },
+ testName:
+ "A soft navigation that started from a back() call inside a " +
+ "popstate event is recognized by SoftNavigationHeuristics",
+ });
+ </script>
+ </body>
</html>
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 5860738225b..4bc16b44e00 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
@@ -24,7 +24,7 @@ const withTimeoutMessage =
// Helper method for use with history.back(), when we want to be
// sure that its asynchronous effect has completed.
const waitForUrlToEndWith = async (url) => {
- return new Promise((resolve) => {
+ return new Promise((resolve, reject) => {
window.addEventListener('popstate', () => {
if (location.href.endsWith(url)) {
resolve();
@@ -44,7 +44,7 @@ const testSoftNavigation = options => {
const clicks = readValue(options.clicks, 1);
const extraValidations = readValue(options.extraValidations, () => {});
const testName = options.testName;
- const pushUrl = readValue(options.pushUrl, true);
+ const pushUrl = readValue(options.pushUrl, URL);
const eventType = readValue(options.eventType, 'click');
const interactionFunc = options.interactionFunc;
const eventPrepWork = options.eventPrepWork;
@@ -67,7 +67,7 @@ const testSoftNavigation = options => {
interact(link, interactionFunc);
const navigation_id = await withTimeoutMessage(
- t, soft_nav_promise, 'Timed out waiting for soft navigation');
+ t, soft_nav_promise, 'Timed out waiting for soft navigation', 3000);
if (!first_navigation_id) {
first_navigation_id = navigation_id;
}
@@ -113,28 +113,6 @@ const testNavigationApi = (testName, navigateEventHandler, link) => {
}, testName);
};
-const testSoftNavigationNotDetected = options => {
- promise_test(async t => {
- const preClickLcp = await getLcpEntries();
- options.eventTarget.addEventListener(
- options.eventName, options.eventHandler);
- interact(options.link);
- await new Promise((resolve, reject) => {
- new PerformanceObserver(() => {
- reject('Soft navigation should not be triggered');
- }).observe({type: 'soft-navigation', buffered: true});
- t.step_timeout(resolve, 1000);
- });
- if (document.softNavigations) {
- assert_equals(
- document.softNavigations, 0, 'Soft Navigation not detected');
- }
- const postClickLcp = await getLcpEntries();
- assert_equals(
- preClickLcp.length, postClickLcp.length, 'No LCP entries accumulated');
- }, options.testName);
-};
-
const runEntryValidations = async (
preClickLcp, first_navigation_id, entries_expected_number = 2,
validate = null) => {
@@ -233,7 +211,7 @@ const validateSoftNavigationEntry =
for (let i = 0; i < entries.length; ++i) {
const entry = entries[i];
assert_true(
- entry.name.includes(pushUrl ? URL : document.location.href),
+ entry.name.includes(pushUrl ? pushUrl : document.location.href),
'The soft navigation name is properly set');
const entryTimestamp = entry.startTime;
assert_less_than_equal(
diff --git a/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/supported-entry-types.window.js b/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/supported-entry-types.window.js
new file mode 100644
index 00000000000..50e22df0f3e
--- /dev/null
+++ b/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/supported-entry-types.window.js
@@ -0,0 +1,7 @@
+// PerformanceObserver.supportedEntryTypes is a good way to detect whether
+// soft navigations are supported. See also:
+// https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/supportedEntryTypes_static
+
+test(() => {
+ assert_in_array('soft-navigation', PerformanceObserver.supportedEntryTypes);
+}, 'Soft navigations are a supported entry type for PerformanceObserver');
diff --git a/tests/wpt/tests/soft-navigation-heuristics/supported-entry-types.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/supported-entry-types.tentative.html
deleted file mode 100644
index 4ab408e10b1..00000000000
--- a/tests/wpt/tests/soft-navigation-heuristics/supported-entry-types.tentative.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta charset="utf-8">
-<title>Soft navigations are a supported entry type</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script>
- promise_test(async () => {
- assert_true(PerformanceObserver.supportedEntryTypes.includes(
- "soft-navigation"));
- }, "Soft navigations are a supported entry type");
-</script>
-
-
diff --git a/tests/wpt/tests/speculation-rules/invalid-rules.https.html b/tests/wpt/tests/speculation-rules/invalid-rules.https.html
new file mode 100644
index 00000000000..d887c6cafc8
--- /dev/null
+++ b/tests/wpt/tests/speculation-rules/invalid-rules.https.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<meta name="timeout" content="long">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/utils.js"></script>
+<script src="/common/dispatcher/dispatcher.js"></script>
+<script src="/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js"></script>
+<script src="resources/utils.js"></script>
+
+<meta name="variant" content="?prefetch">
+<meta name="variant" content="?prerender">
+
+<script>
+setup(() => assertSpeculationRulesIsSupported());
+
+const preloadingType = location.search.substring(1);
+
+promise_test(async t => {
+ const rcHelper = new PreloadingRemoteContextHelper();
+ const referrerRC = await rcHelper.addWindow();
+
+ const destinationRC = await referrerRC.addPreload(preloadingType, {
+ extrasInSpeculationRule: { invalid_key: "value" }
+ });
+
+ await referrerRC.navigateTo(destinationRC.url);
+
+ const headers = await destinationRC.getRequestHeaders();
+ assert_false(headers.has("Sec-Purpose"));
+}, `an unrecognized key in a ${preloadingType} rule should prevent it from being preloaded`);
+</script>
diff --git a/tests/wpt/tests/speculation-rules/prefetch/clear-prefetch-cache-after-clear-site-data-cache.tentative.https.html b/tests/wpt/tests/speculation-rules/prefetch/clear-prefetch-cache-after-clear-site-data-cache.https.html
index 48f6264e852..79078d30ab6 100644
--- a/tests/wpt/tests/speculation-rules/prefetch/clear-prefetch-cache-after-clear-site-data-cache.tentative.https.html
+++ b/tests/wpt/tests/speculation-rules/prefetch/clear-prefetch-cache-after-clear-site-data-cache.https.html
@@ -1,9 +1,4 @@
<!DOCTYPE html>
-<!--
-This file is marked as "tentative" until:
-* The feature flag ClearSiteDataPrefetchPrerenderCache is enabled and
- https://github.com/WICG/nav-speculation/issues/357 is added to the specification.
--->
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/dispatcher/dispatcher.js"></script>
diff --git a/tests/wpt/tests/speculation-rules/prefetch/invalid-rules.https.html b/tests/wpt/tests/speculation-rules/prefetch/invalid-rules.https.html
deleted file mode 100644
index 0fdfacde643..00000000000
--- a/tests/wpt/tests/speculation-rules/prefetch/invalid-rules.https.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/common/dispatcher/dispatcher.js"></script>
-<script src="/common/utils.js"></script>
-<script src="../resources/utils.js"></script>
-<script src="resources/utils.sub.js"></script>
-<script>
- setup(() => assertSpeculationRulesIsSupported());
-
- promise_test(async t => {
- let agent = await spawnWindow(t);
- let nextUrl = agent.getExecutorURL({ page: 2 });
- await agent.forceSinglePrefetch(nextUrl, { invalid_key: "value" });
- await agent.navigate(nextUrl);
-
- assert_not_prefetched(await agent.getRequestHeaders());
- }, "an unrecognized key in a prefetch rule should prevent it from being fetched");
-</script>
diff --git a/tests/wpt/tests/speculation-rules/prerender/activation-start.https.html b/tests/wpt/tests/speculation-rules/prerender/activation-start.https.html
index 7aee20c3465..a26af011614 100644
--- a/tests/wpt/tests/speculation-rules/prerender/activation-start.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/activation-start.https.html
@@ -16,9 +16,9 @@ setup(() => assertSpeculationRulesIsSupported());
promise_test(async t => {
const ACTIVATION_DELAY = 10;
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' });
- const prerenderedRC = await addPrerenderRC(referrerRC);
+ const prerenderedRC = await referrerRC.addPrerender();
const iframeRC = await prerenderedRC.addIframe();
assert_equals(
@@ -36,7 +36,7 @@ promise_test(async t => {
// Wait ACTIVATION_DELAY ms before activation.
await new Promise(resolve => t.step_timeout(resolve, ACTIVATION_DELAY));
- await activatePrerenderRC(referrerRC, prerenderedRC);
+ await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC);
assert_greater_than_equal(
await getActivationStart(prerenderedRC),
diff --git a/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-different-origins.tentative.https.html b/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-different-origins.https.html
index db52e758750..c18df9e0cd9 100644
--- a/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-different-origins.tentative.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-different-origins.https.html
@@ -1,32 +1,26 @@
<!DOCTYPE html>
-<!--
-This file is marked as "tentative" until:
-* The feature flag ClearSiteDataPrefetchPrerenderCache is enabled and
- https://github.com/WICG/nav-speculation/issues/357 is added to the specification.
--->
<title>clear-site-data-cache cancels prerenders</title>
<meta name="timeout" content="long">
-<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="/speculation-rules/resources/utils.js"></script>
-<script src="/speculation-rules/prerender/resources/utils.js"></script>
<script src="/common/utils.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="/common/dispatcher/dispatcher.js"></script>
<script src="/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js"></script>
+<script src="../resources/utils.js"></script>
+<script src="resources/utils.js"></script>
<script>
setup(() => assertSpeculationRulesIsSupported());
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow({
origin: 'HTTPS_ORIGIN'
}, {
features: 'noopener'
});
- const prerenderedRC = await addPrerenderRC(referrerRC, {
+ const prerenderedRC = await referrerRC.addPrerender({
origin: 'HTTPS_REMOTE_ORIGIN',
headers: [
['Supports-Loading-Mode', 'credentialed-prerender']
@@ -52,8 +46,6 @@ promise_test(async t => {
// the initiator origin, the existing prerender is not expected to be
// canceled.
// And the prerender is expected to be activated.
- await activatePrerenderRC(referrerRC, prerenderedRC);
+ await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC);
});
</script>
-</body>
-</html>
diff --git a/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-same-origin.tentative.https.html b/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-same-origin.https.html
index 23d862c5130..a2668fc3bca 100644
--- a/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-same-origin.tentative.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/cancel-prerendering-after-clear-site-data-cache-same-origin.https.html
@@ -1,33 +1,26 @@
<!DOCTYPE html>
-<!--
-This file is marked as "tentative" until:
-* The feature flag ClearSiteDataPrefetchPrerenderCache is enabled and
- https://github.com/WICG/nav-speculation/issues/357 is added to the specification.
--->
<title>clear-site-data-cache cancels prerenders</title>
<meta name="timeout" content="long">
-<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="/speculation-rules/resources/utils.js"></script>
-<script src="/speculation-rules/prerender/resources/utils.js"></script>
<script src="/common/utils.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="/common/dispatcher/dispatcher.js"></script>
<script src="/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js"></script>
+<script src="../resources/utils.js"></script>
+<script src="resources/utils.js"></script>
<script>
setup(() => assertSpeculationRulesIsSupported());
-// Test that Clear-Site-Data header value "prerenderCache" clears prerender cache
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow({
origin: 'HTTPS_ORIGIN'
}, {
features: 'noopener'
});
- const prerenderedRC = await addPrerenderRC(referrerRC, {
+ const prerenderedRC = await referrerRC.addPrerender({
origin: 'HTTPS_ORIGIN'
});
@@ -48,20 +41,18 @@ promise_test(async t => {
// Because Clear-Site-Data response header is sent, the existing prerender
// is expected to be canceled.
// And the navigation is expected to create another page instead of activation.
- referrerRC.navigateTo(prerenderedRC.url);
- assert_equals(await getActivationStart(prerenderedRC), 0);
+ await referrerRC.navigateExpectingNoPrerenderingActivation(prerenderedRC);
}, "clear-site-data prerenderCache headers should prevent it from being activated");
-// Test that Clear-Site-Data header value "cache" clears prerender cache
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow({
origin: 'HTTPS_ORIGIN'
}, {
features: 'noopener'
});
- const prerenderedRC = await addPrerenderRC(referrerRC, {
+ const prerenderedRC = await referrerRC.addPrerender({
origin: 'HTTPS_ORIGIN'
});
@@ -83,9 +74,6 @@ promise_test(async t => {
// Because Clear-Site-Data response header is sent, the existing prerender
// is expected to be canceled.
// And the navigation is expected to create another page instead of activation.
- referrerRC.navigateTo(prerenderedRC.url);
- assert_equals(await getActivationStart(prerenderedRC), 0);
+ await referrerRC.navigateExpectingNoPrerenderingActivation(prerenderedRC);
}, "clear-site-data cache headers should prevent it from being activated");
</script>
-</body>
-</html>
diff --git a/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-not-opt-in.https.html b/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-not-opt-in.https.html
index 697382a6dc8..a02a2860990 100644
--- a/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-not-opt-in.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-not-opt-in.https.html
@@ -15,13 +15,12 @@
setup(() => assertSpeculationRulesIsSupported());
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow({origin: 'HTTPS_ORIGIN'}, { features: 'noopener' });
- const prerenderedRC = await addPrerenderRC(referrerRC, {origin: 'HTTPS_REMOTE_ORIGIN'});
+ const prerenderedRC = await referrerRC.addPrerender({origin: 'HTTPS_REMOTE_ORIGIN'});
// Because the prerender doesn't use opt-in header, it is expected to be canceled.
// And the navigation is expected to create another page instead of activation.
- referrerRC.navigateTo(prerenderedRC.url);
- assert_equals(await getActivationStart(prerenderedRC), 0);
+ await referrerRC.navigateExpectingNoPrerenderingActivation(prerenderedRC);
});
</script>
diff --git a/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-opt-in.https.html b/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-opt-in.https.html
index 91626bafce6..c309abd2c6d 100644
--- a/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-opt-in.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/credentialed-prerender-opt-in.https.html
@@ -15,10 +15,10 @@
setup(() => assertSpeculationRulesIsSupported());
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow({origin: 'HTTPS_ORIGIN'}, { features: 'noopener' });
- const prerenderedRC = await addPrerenderRC(referrerRC, {origin: 'HTTPS_REMOTE_ORIGIN', headers: [['Supports-Loading-Mode', 'credentialed-prerender']] });
+ const prerenderedRC = await referrerRC.addPrerender({origin: 'HTTPS_REMOTE_ORIGIN', headers: [['Supports-Loading-Mode', 'credentialed-prerender']] });
- await activatePrerenderRC(referrerRC, prerenderedRC);
+ await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC);
});
</script>
diff --git a/tests/wpt/tests/speculation-rules/prerender/headers.https.html b/tests/wpt/tests/speculation-rules/prerender/headers.https.html
index 2ef6b5ce072..e05f72434e4 100644
--- a/tests/wpt/tests/speculation-rules/prerender/headers.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/headers.https.html
@@ -15,9 +15,9 @@
setup(() => assertSpeculationRulesIsSupported());
promise_test(async () => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' });
- const prerenderedRC = await addPrerenderRC(referrerRC);
+ const prerenderedRC = await referrerRC.addPrerender();
const prerenderedHeaders = await prerenderedRC.getRequestHeaders();
assertHeaders(prerenderedHeaders, true, true, 'prerendered page');
@@ -53,14 +53,14 @@ promise_test(async () => {
}, 'Headers before activation, including prerendered page navigation');
promise_test(async () => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' });
- const prerenderedRC = await addPrerenderRC(referrerRC);
+ const prerenderedRC = await referrerRC.addPrerender();
// Add the iframe now, but only check its headers after activation.
const crossOriginIframeBeforeActivationRC = await prerenderedRC.addIframe({ origin: 'HTTPS_REMOTE_ORIGIN' });
- await activatePrerenderRC(referrerRC, prerenderedRC);
+ await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC);
const crossOriginIframeBeforeActivationHeaders = await crossOriginIframeBeforeActivationRC.getRequestHeaders();
assertHeaders(crossOriginIframeBeforeActivationHeaders, true, false, 'cross-origin iframe before activation');
diff --git a/tests/wpt/tests/speculation-rules/prerender/navigation-api-location-replace.https.html b/tests/wpt/tests/speculation-rules/prerender/navigation-api-location-replace.https.html
index e3ecf1b72b6..3b4fb4195ca 100644
--- a/tests/wpt/tests/speculation-rules/prerender/navigation-api-location-replace.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/navigation-api-location-replace.https.html
@@ -13,12 +13,12 @@
setup(() => assertSpeculationRulesIsSupported());
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' });
assert_equals(await referrerRC.executeScript(() => navigation.entries().length), 1);
let referrerRCCurrentId = await referrerRC.executeScript(() => navigation.currentEntry.id);
- const prerenderedRC = await addPrerenderRC(referrerRC);
+ const prerenderedRC = await referrerRC.addPrerender();
let activationStateBeforeActivation = await prerenderedRC.executeScript(() => {
return {
entries: navigation.entries().map(e => ({ id: e.id, })),
@@ -35,7 +35,7 @@ promise_test(async t => {
// Save the current entry before activation.
await prerenderedRC.executeScript(() => window.currentEntryBeforeActivation = navigation.currentEntry);
- await activatePrerenderRC(referrerRC, prerenderedRC, url => {
+ await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC, url => {
location.replace(url);
});
diff --git a/tests/wpt/tests/speculation-rules/prerender/navigation-api-multiple-entries.https.html b/tests/wpt/tests/speculation-rules/prerender/navigation-api-multiple-entries.https.html
index e8e0f874597..060091e171e 100644
--- a/tests/wpt/tests/speculation-rules/prerender/navigation-api-multiple-entries.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/navigation-api-multiple-entries.https.html
@@ -13,7 +13,7 @@
setup(() => assertSpeculationRulesIsSupported());
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC1 = await rcHelper.addWindow(undefined, { features: 'noopener' });
const referrerRC2 = await referrerRC1.navigateToNew();
@@ -22,7 +22,7 @@ promise_test(async t => {
let referrerRC3CurrentId = await referrerRC3.executeScript(() => navigation.currentEntry.id);
- const prerenderedRC = await addPrerenderRC(referrerRC3);
+ const prerenderedRC = await referrerRC3.addPrerender();
let activationStateBeforeActivation = await prerenderedRC.executeScript(() => {
return {
entries: navigation.entries().map(e => ({ id: e.id, })),
@@ -36,7 +36,7 @@ promise_test(async t => {
assert_equals(activationStateBeforeActivation.activationEntryId, activationStateBeforeActivation.entries[0].id);
assert_equals(activationStateBeforeActivation.activationNavigationType, "push");
- await activatePrerenderRC(referrerRC3, prerenderedRC);
+ await referrerRC3.navigateExpectingPrerenderingActivation(prerenderedRC);
let activationStateAfterActivation = await prerenderedRC.executeScript(() => {
return {
diff --git a/tests/wpt/tests/speculation-rules/prerender/navigation-api.https.html b/tests/wpt/tests/speculation-rules/prerender/navigation-api.https.html
index fd25e94b5b3..c6ee9742716 100644
--- a/tests/wpt/tests/speculation-rules/prerender/navigation-api.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/navigation-api.https.html
@@ -13,12 +13,12 @@
setup(() => assertSpeculationRulesIsSupported());
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' });
assert_equals(await referrerRC.executeScript(() => navigation.entries().length), 1);
let referrerRCCurrentId = await referrerRC.executeScript(() => navigation.currentEntry.id);
- const prerenderedRC = await addPrerenderRC(referrerRC);
+ const prerenderedRC = await referrerRC.addPrerender();
let activationStateBeforeActivation = await prerenderedRC.executeScript(() => {
return {
entries: navigation.entries().map(e => ({ id: e.id, })),
@@ -35,7 +35,7 @@ promise_test(async t => {
// Save the current entry before activation.
await prerenderedRC.executeScript(() => window.currentEntryBeforeActivation = navigation.currentEntry);
- await activatePrerenderRC(referrerRC, prerenderedRC);
+ await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC);
let activationStateAfterActivation = await prerenderedRC.executeScript(() => {
return {
diff --git a/tests/wpt/tests/speculation-rules/prerender/referrer-policy-mismatch.https.html b/tests/wpt/tests/speculation-rules/prerender/referrer-policy-mismatch.https.html
index fa2d424660a..09cd98eb243 100644
--- a/tests/wpt/tests/speculation-rules/prerender/referrer-policy-mismatch.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/referrer-policy-mismatch.https.html
@@ -15,17 +15,17 @@
setup(() => assertSpeculationRulesIsSupported());
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow(undefined, { features: "noopener" });
await setReferrerPolicy(referrerRC, "strict-origin-when-cross-origin");
- const prerenderedRC = await addPrerenderRC(referrerRC);
+ const prerenderedRC = await referrerRC.addPrerender();
const referrerURL = await referrerRC.executeScript(() => location.href);
assert_equals(await prerenderedRC.executeScript(() => document.prerendering), true);
assert_equals(await prerenderedRC.executeScript(() => document.referrer), referrerURL);
- await activatePrerenderRC(referrerRC, prerenderedRC, url => {
+ await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC, url => {
const a = document.createElement("a");
a.href = url;
a.referrerPolicy = "no-referrer";
@@ -37,17 +37,17 @@ promise_test(async t => {
}, 'prerendered with "strict-origin-when-cross-origin", activated with "no-referrer"');
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow(undefined, { features: "noopener" });
await setReferrerPolicy(referrerRC, "strict-origin-when-cross-origin");
- const prerenderedRC = await addPrerenderRC(referrerRC);
+ const prerenderedRC = await referrerRC.addPrerender();
const referrerURL = await referrerRC.executeScript(() => location.href);
assert_equals(await prerenderedRC.executeScript(() => document.prerendering), true);
assert_equals(await prerenderedRC.executeScript(() => document.referrer), referrerURL);
- await activatePrerenderRC(referrerRC, prerenderedRC, url => {
+ await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC, url => {
const a = document.createElement("a");
a.href = url;
a.referrerPolicy = "strict-origin";
@@ -59,10 +59,10 @@ promise_test(async t => {
}, 'prerendered with "strict-origin-when-cross-origin", activated with "strict-origin"');
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow(undefined, { features: "noopener" });
await setReferrerPolicy(referrerRC, "strict-origin");
- const prerenderedRC = await addPrerenderRC(referrerRC);
+ const prerenderedRC = await referrerRC.addPrerender();
const referrerURL = await referrerRC.executeScript(() => location.href);
const referrerOrigin = (new URL(referrerURL)).origin + "/";
@@ -70,7 +70,7 @@ promise_test(async t => {
assert_equals(await prerenderedRC.executeScript(() => document.prerendering), true);
assert_equals(await prerenderedRC.executeScript(() => document.referrer), referrerOrigin);
- await activatePrerenderRC(referrerRC, prerenderedRC, url => {
+ await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC, url => {
const a = document.createElement("a");
a.href = url;
a.referrerPolicy = "unsafe-url";
diff --git a/tests/wpt/tests/speculation-rules/prerender/resources/background-sync.https.html b/tests/wpt/tests/speculation-rules/prerender/resources/background-sync.https.html
index dd452aa3451..6589b69b22f 100644
--- a/tests/wpt/tests/speculation-rules/prerender/resources/background-sync.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/resources/background-sync.https.html
@@ -5,7 +5,7 @@
<script src="/speculation-rules/prerender/resources/deferred-promise-utils.js"></script>
<script>
-// The main test page (restriction-background-sync.tentative.https.html)
+// The main test page (restriction-background-sync.https.html)
// loads the initiator page, then the initiator page will prerender itself
// with the `prerendering` parameter.
const params = new URLSearchParams(location.search);
diff --git a/tests/wpt/tests/speculation-rules/prerender/resources/utils.js b/tests/wpt/tests/speculation-rules/prerender/resources/utils.js
index 259f71f6a70..e8397042e7f 100644
--- a/tests/wpt/tests/speculation-rules/prerender/resources/utils.js
+++ b/tests/wpt/tests/speculation-rules/prerender/resources/utils.js
@@ -375,98 +375,108 @@ function test_prerender_defer(fn, label) {
}, label);
}
-/**
- * Starts prerendering a page from the given referrer `RemoteContextWrapper`,
- * using `<script type="speculationrules">`.
- *
- * See
- * /html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
- * for more details on the `RemoteContextWrapper` framework, and supported fields for extraConfig.
- *
- * The returned `RemoteContextWrapper` for the prerendered remote
- * context will have an extra `url` property, which is used by
- * @see activatePrerenderRC. (Most `RemoteContextWrapper` uses should not care
- * about the URL, but prerendering is unique in that you need to navigate to
- * a prerendered page after creating it.)
- *
- * @param {RemoteContextWrapper} referrerRemoteContext
- * @param {RemoteContextConfig|object} extraConfig
- * @returns {Promise<RemoteContextWrapper>}
- */
-function addPrerenderRC(referrerRemoteContext, extraConfig) {
- return referrerRemoteContext.helper.createContext({
- executorCreator(url) {
- return referrerRemoteContext.executeScript(url => {
- const script = document.createElement("script");
- script.type = "speculationrules";
- script.textContent = JSON.stringify({
- prerender: [
- {
- source: "list",
- urls: [url]
- }
- ]
+// If you want access to these, be sure to include
+// /html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
+// and /speculation-rules/resources/utils.js. So as to avoid requiring everyone
+// to do that, we only conditionally define this infrastructure.
+if (globalThis.PreloadingRemoteContextHelper) {
+ class PrerenderingRemoteContextWrapper extends PreloadingRemoteContextHelper.RemoteContextWrapper {
+ /**
+ * Activates a prerendered page represented by `destinationRC` by navigating
+ * the page currently displayed in this `PrerenderingRemoteContextWrapper` to
+ * it. If the navigation does not result in a prerender activation, the
+ * returned promise will be rejected with a testharness.js AssertionError.
+ *
+ * @param {PrerenderingRemoteContextWrapper} destinationRC - The
+ * `PrerenderingRemoteContextWrapper` pointing to the prerendered
+ * content. This is monitored to ensure the navigation results in a
+ * prerendering activation.
+ * @param {(string) => Promise<undefined>} [navigateFn] - An optional
+ * function to customize the navigation. It will be passed the URL of the
+ * prerendered content, and will run as a script in this (see
+ * `RemoteContextWrapper.prototype.executeScript`). If not given,
+ * navigation will be done via the `location.href` setter (see
+ * `RemoteContextWrapper.prototype.navigateTo`).
+ * @returns {Promise<undefined>}
+ */
+ async navigateExpectingPrerenderingActivation(destinationRC, navigateFn) {
+ // Store a promise that will fulfill when the `prerenderingchange` event
+ // fires.
+ await destinationRC.executeScript(() => {
+ window.activatedPromise = new Promise(resolve => {
+ document.addEventListener("prerenderingchange", () => resolve("activated"), { once: true });
});
- document.head.append(script);
- }, [url]);
- }, extraConfig
- });
-}
+ });
-/**
- * Activates a prerendered RemoteContextWrapper `prerenderedRC` by navigating
- * the referrer RemoteContextWrapper `referrerRC` to it. If the navigation does
- * not result in a prerender activation, the returned
- * promise will be rejected with a testharness.js AssertionError.
- *
- * See
- * /html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
- * for more on the RemoteContext helper framework.
- *
- * @param {RemoteContextWrapper} referrerRC - The referrer
- * `RemoteContextWrapper` in which the prerendering was triggered,
- * probably via `addPrerenderRC()`.
- * @param {RemoteContextWrapper} prerenderedRC - The `RemoteContextWrapper`
- * pointing to the prerendered content. This is monitored to ensure the
- * navigation results in a prerendering activation.
- * @param {(string) => Promise<undefined>} [navigateFn] - An optional function
- * to customize the navigation. It will be passed the URL of the prerendered
- * content, and will run as a script in `referrerRC` (see
- * `RemoteContextWrapper.prototype.executeScript`). If not given, navigation
- * will be done via the `location.href` setter (see
- * `RemoteContextWrapper.prototype.navigateTo`).
- * @returns {Promise<undefined>}
- */
-async function activatePrerenderRC(referrerRC, prerenderedRC, navigateFn) {
- // Store a promise that will fulfill when the prerenderingchange event fires.
- await prerenderedRC.executeScript(() => {
- window.activatedPromise = new Promise(resolve => {
- document.addEventListener("prerenderingchange", () => resolve("activated"));
- });
- });
+ if (navigateFn === undefined) {
+ await this.navigateTo(destinationRC.url);
+ } else {
+ await this.navigate(navigateFn, [destinationRC.url]);
+ }
- if (navigateFn === undefined) {
- referrerRC.navigateTo(prerenderedRC.url);
- } else {
- referrerRC.navigate(navigateFn, [prerenderedRC.url]);
- }
+ // Wait until that event fires. If the activation fails and a normal
+ // navigation happens instead, then `destinationRC` will start pointing to
+ // that other page, where `window.activatedPromise` is undefined. In that
+ // case this assert will fail since `undefined !== "activated"`.
+ assert_equals(
+ await destinationRC.executeScript(() => window.activatedPromise),
+ "activated",
+ "The prerendered page must be activated; instead a normal navigation happened."
+ );
+ }
- // Wait until that event fires. If the activation fails and a normal
- // navigation happens instead, then prerenderedRC will start pointing to that
- // other page, where window.activatedPromise is undefined. In that case this
- // assert will fail since undefined !== "activated".
- assert_equals(
- await prerenderedRC.executeScript(() => window.activatedPromise),
- "activated",
- "The prerendered page must be activated; instead a normal navigation happened."
- );
-}
+ /**
+ * Navigates to the URL identified by `destinationRC`, but expects that the
+ * navigation does not cause a prerendering activation. (E.g., because the
+ * prerender was canceled by something in the test code.) If the navigation
+ * results in a prerendering activation, the returned promise will be
+ * rejected with a testharness.js AssertionError.
+ * @param {RemoteContextWrapper} destinationRC - The `RemoteContextWrapper`
+ * pointing to the destination URL. Usually this is obtained by
+ * prerendering (e.g., via `addPrerender()`), even though we are testing
+ * that the prerendering does not activate.
+ * @param {(string) => Promise<undefined>} [navigateFn] - An optional
+ * function to customize the navigation. It will be passed the URL of the
+ * prerendered content, and will run as a script in this (see
+ * `RemoteContextWrapper.prototype.executeScript`). If not given,
+ * navigation will be done via the `location.href` setter (see
+ * `RemoteContextWrapper.prototype.navigateTo`).
+ * @returns {Promise<undefined>}
+ */
+ async navigateExpectingNoPrerenderingActivation(destinationRC, navigateFn) {
+ if (navigateFn === undefined) {
+ await this.navigateTo(destinationRC.url);
+ } else {
+ await this.navigate(navigateFn, [destinationRC.url]);
+ }
+
+ assert_equals(
+ await destinationRC.executeScript(() => {
+ return performance.getEntriesByType("navigation")[0].activationStart;
+ }),
+ 0,
+ "The prerendered page must not be activated."
+ );
+ }
-async function getActivationStart(prerenderedRC) {
- return await prerenderedRC.executeScript(() => {
- const entry = performance.getEntriesByType("navigation")[0];
- return entry.activationStart;
- });;
+ /**
+ * Starts prerendering a page with this `PreloadingRemoteContextWrapper` as the
+ * referrer, using `<script type="speculationrules">`.
+ *
+ * @param {object} [extrasInSpeculationRule] - Additional properties to add
+ * to the speculation rule JSON.
+ * @param {RemoteContextConfig|object} [extraConfig] - Additional remote
+ * context configuration for the preloaded context.
+ * @returns {Promise<PreloadingRemoteContextWrapper>}
+ */
+ addPrerender(options) {
+ return this.addPreload("prerender", options);
+ }
+ }
+
+ globalThis.PrerenderingRemoteContextHelper = class extends PreloadingRemoteContextHelper {
+ static RemoteContextWrapper = PrerenderingRemoteContextWrapper;
+ };
}
// Used by the opened window, to tell the main test runner to terminate a
diff --git a/tests/wpt/tests/speculation-rules/prerender/restriction-background-sync.tentative.https.html b/tests/wpt/tests/speculation-rules/prerender/restriction-background-sync.https.html
index 53dbb56d99f..53dbb56d99f 100644
--- a/tests/wpt/tests/speculation-rules/prerender/restriction-background-sync.tentative.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/restriction-background-sync.https.html
diff --git a/tests/wpt/tests/speculation-rules/prerender/visibility-state.https.html b/tests/wpt/tests/speculation-rules/prerender/visibility-state.https.html
index e9e8548c4f6..8ab18113fda 100644
--- a/tests/wpt/tests/speculation-rules/prerender/visibility-state.https.html
+++ b/tests/wpt/tests/speculation-rules/prerender/visibility-state.https.html
@@ -14,13 +14,13 @@
setup(() => assertSpeculationRulesIsSupported());
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' });
- const prerenderedRC = await addPrerenderRC(referrerRC);
+ const prerenderedRC = await referrerRC.addPrerender();
assert_equals(await prerenderedRC.executeScript(() => document.visibilityState), "hidden");
- await activatePrerenderRC(referrerRC, prerenderedRC);
+ await referrerRC.navigateExpectingPrerenderingActivation(prerenderedRC);
assert_equals(await prerenderedRC.executeScript(() => document.visibilityState), "visible");
});
diff --git a/tests/wpt/tests/speculation-rules/resources/utils.js b/tests/wpt/tests/speculation-rules/resources/utils.js
index cb72f446813..f2fc2169113 100644
--- a/tests/wpt/tests/speculation-rules/resources/utils.js
+++ b/tests/wpt/tests/speculation-rules/resources/utils.js
@@ -1,4 +1,4 @@
-window.assertSpeculationRulesIsSupported = () => {
+globalThis.assertSpeculationRulesIsSupported = () => {
assert_implements(
'supports' in HTMLScriptElement,
'HTMLScriptElement.supports must be supported');
@@ -6,3 +6,49 @@ window.assertSpeculationRulesIsSupported = () => {
HTMLScriptElement.supports('speculationrules'),
'<script type="speculationrules"> must be supported');
};
+
+// If you want access to these, be sure to include
+// /html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js.
+// So as to avoid requiring everyone to do that, we only conditionally define this infrastructure.
+if (globalThis.RemoteContextHelper) {
+ class PreloadingRemoteContextWrapper extends RemoteContextHelper.RemoteContextWrapper {
+ /**
+ * Starts preloading a page with this `PreloadingRemoteContextWrapper` as the
+ * referrer, using `<script type="speculationrules">`.
+ *
+ * @param {"prefetch"|"prerender"} preloadType - The preload type to use.
+ * @param {object} [extrasInSpeculationRule] - Additional properties to add
+ * to the speculation rule JSON.
+ * @param {RemoteContextConfig|object} [extraConfig] - Additional remote
+ * context configuration for the preloaded context.
+ * @returns {Promise<PreloadingRemoteContextWrapper>}
+ */
+ addPreload(preloadType, { extrasInSpeculationRule = {}, ...extraConfig } = {}) {
+ const referrerRemoteContext = this;
+
+ return this.helper.createContext({
+ executorCreator(url) {
+ return referrerRemoteContext.executeScript((url, preloadType, extrasInSpeculationRule) => {
+ const script = document.createElement("script");
+ script.type = "speculationrules";
+ script.textContent = JSON.stringify({
+ [preloadType]: [
+ {
+ source: "list",
+ urls: [url],
+ ...extrasInSpeculationRule
+ }
+ ]
+ });
+ document.head.append(script);
+ }, [url, preloadType, extrasInSpeculationRule]);
+ },
+ extraConfig
+ });
+ }
+ }
+
+ globalThis.PreloadingRemoteContextHelper = class extends RemoteContextHelper {
+ static RemoteContextWrapper = PreloadingRemoteContextWrapper;
+ };
+}
diff --git a/tests/wpt/tests/speculation-rules/prerender/script-supports-speculationrules.https.html b/tests/wpt/tests/speculation-rules/script-supports.https.html
index 2dc856fce5d..7446f2b6b5f 100644
--- a/tests/wpt/tests/speculation-rules/prerender/script-supports-speculationrules.https.html
+++ b/tests/wpt/tests/speculation-rules/script-supports.https.html
@@ -1,15 +1,14 @@
<!DOCTYPE html>
-<html>
<title>HTMLScriptElement.supports speculationrules</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
+
<script>
-test(function() {
+test(() => {
assert_true(HTMLScriptElement.supports('speculationrules'));
}, 'HTMLScriptElement.supports returns true for \'speculationrules\'');
-test(function() {
+test(() => {
assert_false(HTMLScriptElement.supports(' speculationrules'));
assert_false(HTMLScriptElement.supports('speculationrules '));
assert_false(HTMLScriptElement.supports('Speculationrules'));
@@ -17,5 +16,4 @@ test(function() {
assert_false(HTMLScriptElement.supports('speculationRules'));
assert_false(HTMLScriptElement.supports('speculation-rules'));
}, 'HTMLScriptElement.supports returns false for unsupported types');
-
</script>
diff --git a/tests/wpt/tests/speculation-rules/speculation-tags/no-tags.https.html b/tests/wpt/tests/speculation-rules/speculation-tags/no-tags.https.html
index 176b3d20bb2..088f0ba66b5 100644
--- a/tests/wpt/tests/speculation-rules/speculation-tags/no-tags.https.html
+++ b/tests/wpt/tests/speculation-rules/speculation-tags/no-tags.https.html
@@ -6,9 +6,9 @@
<script src="/common/dispatcher/dispatcher.js"></script>
<script src="/common/utils.js"></script>
<script src="/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js"></script>
-<script src="/speculation-rules/prerender/resources/utils.js"></script>
<script src="/speculation-rules/resources/utils.js"></script>
<script src="/speculation-rules/prefetch/resources/utils.sub.js"></script>
+<script src="/speculation-rules/prerender/resources/utils.js"></script>
<script src="resources/speculation-tags-utils.js"></script>
<script>
"use strict";
@@ -30,10 +30,10 @@ promise_test(async t => {
}, "Sec-Speculation-Tags: no tags (prefetch)");
promise_test(async t => {
- const rcHelper = new RemoteContextHelper();
+ const rcHelper = new PrerenderingRemoteContextHelper();
const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' });
- const prerenderedRC = await addPrerenderRC(referrerRC);
+ const prerenderedRC = await referrerRC.addPrerender();
const headers = await prerenderedRC.getRequestHeaders();
assert_equals(headers.get("sec-purpose"), "prefetch;prerender");
assert_equals(headers.get("sec-speculation-tags"), "null");
diff --git a/tests/wpt/tests/speech-api/SpeechRecognition-availableOnDevice.https.html b/tests/wpt/tests/speech-api/SpeechRecognition-availableOnDevice.https.html
index ace8edd9164..fb4273f7392 100644
--- a/tests/wpt/tests/speech-api/SpeechRecognition-availableOnDevice.https.html
+++ b/tests/wpt/tests/speech-api/SpeechRecognition-availableOnDevice.https.html
@@ -1,34 +1,34 @@
<!DOCTYPE html>
-<title>SpeechRecognition availableOnDevice</title>
+<title>SpeechRecognition available</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async (t) => {
- const lang = "en-US";
+ const options = { langs: ["en-US", "fr-FR"], processLocally: true };
window.SpeechRecognition = window.SpeechRecognition ||
window.webkitSpeechRecognition;
// Test that it returns a promise.
- const resultPromise = SpeechRecognition.availableOnDevice(lang);
+ const resultPromise = SpeechRecognition.available(options);
assert_true(
resultPromise instanceof Promise,
- "availableOnDevice should return a Promise."
+ "available should return a Promise."
);
// Verify the resolved value is a string.
const result = await resultPromise;
assert_true(
typeof result === "string",
- "The resolved value of the availableOnDevice promise should be a string."
+ "The resolved value of the available promise should be a string."
);
assert_true(
result === "unavailable" || result === "downloadable" ||
result === "downloading" || result === "available",
- "The resolved value of the availableOnDevice promise should be a " +
+ "The resolved value of the available promise should be a " +
"valid value."
);
-}, "SpeechRecognition.availableOnDevice resolves with a string value.");
+}, "SpeechRecognition.available resolves with a string value for on-device.");
promise_test(async (t) => {
const iframe = document.createElement("iframe");
@@ -38,14 +38,15 @@ promise_test(async (t) => {
const frameSpeechRecognition =
frameWindow.SpeechRecognition || frameWindow.webkitSpeechRecognition;
+ const options = { langs: ["en-US"], processLocally: true };
iframe.remove();
await promise_rejects_dom(
t,
"InvalidStateError",
frameDOMException,
- frameSpeechRecognition.availableOnDevice("en-US"),
+ frameSpeechRecognition.available(options),
);
-}, "SpeechRecognition.availableOnDevice rejects in a detached context.");
+}, "SpeechRecognition.available rejects in a detached context for on-device.");
promise_test(async (t) => {
const iframe = document.createElement("iframe");
@@ -70,17 +71,18 @@ promise_test(async (t) => {
assert_true(!!frameSpeechRecognition,
"SpeechRecognition should exist in iframe.");
- assert_true(!!frameSpeechRecognition.availableOnDevice,
- "availableOnDevice method should exist on SpeechRecognition in iframe.");
+ assert_true(!!frameSpeechRecognition.available,
+ "available method should exist on SpeechRecognition in iframe.");
- // Call availableOnDevice and expect it to resolve to "unavailable".
+ const options = { langs: ["en-US"], processLocally: true };
+ // Call available and expect it to resolve to "unavailable".
const availabilityStatus =
- await frameSpeechRecognition.availableOnDevice("en-US");
+ await frameSpeechRecognition.available(options);
assert_equals(availabilityStatus, "unavailable",
- "availableOnDevice should resolve to 'unavailable' if " +
+ "available should resolve to 'unavailable' if " +
"'on-device-speech-recognition' Permission Policy is 'none'."
);
-}, "SpeechRecognition.availableOnDevice resolves to 'unavailable' if " +
+}, "SpeechRecognition.available resolves to 'unavailable' for on-device if " +
"'on-device-speech-recognition' Permission Policy is 'none'.");
promise_test(async (t) => {
@@ -89,24 +91,25 @@ promise_test(async (t) => {
<script>
window.addEventListener('message', async (event) => {
// Ensure we only process the message intended to trigger the test.
- if (event.data !== "runTestCallAvailableOnDevice") return;
+ if (event.data !== "runTestCallAvailable") return;
try {
const SpeechRecognition = window.SpeechRecognition ||
window.webkitSpeechRecognition;
- if (!SpeechRecognition || !SpeechRecognition.availableOnDevice) {
+ if (!SpeechRecognition || !SpeechRecognition.available) {
parent.postMessage({
type: "error", // Use "error" for API not found or other issues.
name: "NotSupportedError",
- message: "SpeechRecognition.availableOnDevice API not " +
+ message: "SpeechRecognition.available API not " +
"available in iframe"
}, "*");
return;
}
- // Call availableOnDevice and post its resolution.
+ const options = { langs: ["en-US"], processLocally: true };
+ // Call available and post its resolution.
const availabilityStatus =
- await SpeechRecognition.availableOnDevice("en-US");
+ await SpeechRecognition.available(options);
parent.postMessage(
{ type: "resolution", result: availabilityStatus },
"*"
@@ -155,7 +158,7 @@ promise_test(async (t) => {
}));
// Send a distinct message to the iframe to trigger its test logic.
- iframe.contentWindow.postMessage("runTestCallAvailableOnDevice", "*");
+ iframe.contentWindow.postMessage("runTestCallAvailable", "*");
});
// Check if the iframe's script reported an error (e.g., API not found).
@@ -175,9 +178,9 @@ promise_test(async (t) => {
assert_equals(
testResult.result, // Expecting the string "unavailable".
"unavailable",
- "availableOnDevice should resolve to 'unavailable' in a cross-origin " +
+ "available should resolve to 'unavailable' for on-device in a cross-origin " +
"iframe."
);
-}, "SpeechRecognition.availableOnDevice should resolve to 'unavailable' " +
+}, "SpeechRecognition.available should resolve to 'unavailable' for on-device " +
"in a cross-origin iframe.");
</script>
diff --git a/tests/wpt/tests/speech-api/SpeechRecognition-basics.https.html b/tests/wpt/tests/speech-api/SpeechRecognition-basics.https.html
index 91cf8e6d3e5..0fbc4aa8426 100644
--- a/tests/wpt/tests/speech-api/SpeechRecognition-basics.https.html
+++ b/tests/wpt/tests/speech-api/SpeechRecognition-basics.https.html
@@ -11,7 +11,7 @@ test(function() {
assert_false(reco.continuous, 'SpeechRecognition.continuous');
assert_false(reco.interimResults, 'SpeechRecognition.interimResults');
assert_equals(reco.maxAlternatives, 1, 'SpeechRecognition.maxAlternatives');
- assert_equals(reco.mode, 'ondevice-preferred', 'SpeechRecognition.mode');
+ assert_false(reco.processLocally, 'SpeechRecognition.processLocally');
assert_equals(reco.phrases.length, 0, 'SpeechRecognition.phrases.length');
});
</script>
diff --git a/tests/wpt/tests/speech-api/SpeechRecognition-installOnDevice.https.html b/tests/wpt/tests/speech-api/SpeechRecognition-installOnDevice.https.html
index 5f78fc8c9c1..52281f61b6c 100644
--- a/tests/wpt/tests/speech-api/SpeechRecognition-installOnDevice.https.html
+++ b/tests/wpt/tests/speech-api/SpeechRecognition-installOnDevice.https.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<title>SpeechRecognition installOnDevice</title>
+<title>SpeechRecognition install</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
@@ -11,148 +11,155 @@ promise_test(async (t) => {
const invalidLang = "invalid language code";
window.SpeechRecognition =
window.SpeechRecognition || window.webkitSpeechRecognition;
+ const validOptions = { langs: [validLang], processLocally: true };
+ const validAlternateOptions = { langs: [validLangAlternateLocale], processLocally: true };
+ const invalidOptions = { langs: [invalidLang], processLocally: true };
// Check the availablility of the on-device language pack.
const initialAvailabilityPromise =
- SpeechRecognition.availableOnDevice(validLang);
+ SpeechRecognition.available(validOptions);
assert_true(
initialAvailabilityPromise instanceof Promise,
- "availableOnDevice should return a Promise."
+ "available should return a Promise."
);
const initialAvailabilityResult = await initialAvailabilityPromise;
assert_true(
typeof initialAvailabilityResult === "string",
- "The resolved value of the availableOnDevice promise should be a string."
+ "The resolved value of the available promise should be a string."
);
if (initialAvailabilityResult === "downloadable") {
- // Attempt to call installOnDevice directly, without a user gesture with a
+ // Attempt to call install directly, without a user gesture with a
// language that is downloadable but not installed.
const installWithoutUserGesturePromise =
- SpeechRecognition.installOnDevice(validLang);
+ SpeechRecognition.install(validOptions);
// Assert that the promise rejects with NotAllowedError.
await promise_rejects_dom(
t,
"NotAllowedError",
window.DOMException,
- installWithoutUserGesturePromise, "SpeechRecognition.installOnDevice() " +
- "must reject with NotAllowedError if called without a user gesture."
+ installWithoutUserGesturePromise, "SpeechRecognition.install() " +
+ "must reject with NotAllowedError if called without a user gesture for on-device."
);
// Test that it returns a promise when called with a valid language.
const validResultPromise = test_driver.bless(
- "Call SpeechRecognition.installOnDevice with a valid language",
- () => SpeechRecognition.installOnDevice(validLang)
+ "Call SpeechRecognition.install with a valid language",
+ () => SpeechRecognition.install(validOptions)
+ );
+ const validInstallPromise = test_driver.bless(
+ "Call SpeechRecognition.install with valid options for on-device",
+ () => SpeechRecognition.install(validOptions)
);
assert_true(
- validResultPromise instanceof Promise,
- "installOnDevice (with gesture) should return a Promise."
+ validInstallPromise instanceof Promise,
+ "install (with gesture, for on-device) should return a Promise."
);
// Verify the resolved value is a boolean.
- const validResult = await validResultPromise;
+ const validInstallResult = await validInstallPromise;
assert_true(
- typeof validResult === "boolean",
- "The resolved value of the installOnDevice promise should be a boolean."
+ typeof validInstallResult === "boolean",
+ "The resolved value of the install promise (on-device) should be a boolean."
);
// Verify that the method returns true when called with a supported language.
assert_equals(
- validResult,
+ validInstallResult,
true,
- "installOnDevice should resolve with `true` when called with a " +
- "supported language code."
+ "install should resolve with `true` when called with " +
+ "supported options for on-device."
);
// Verify that the newly installed language pack is available.
const availableOnDeviceResultPromise =
- SpeechRecognition.availableOnDevice(validLang);
+ SpeechRecognition.available(validOptions);
assert_true(
availableOnDeviceResultPromise instanceof Promise,
- "availableOnDevice should return a Promise."
+ "available should return a Promise."
);
const availableOnDeviceResult = await availableOnDeviceResultPromise;
assert_true(
typeof availableOnDeviceResult === "string",
- "The resolved value of the availableOnDevice promise should be a string."
+ "The resolved value of the available promise should be a string."
);
assert_true(
availableOnDeviceResult === "available",
- "The resolved value of the availableOnDevice promise should be " +
+ "The resolved value of the available promise (on-device) should be " +
"'available'."
);
// Verify that the newly installed language pack is available for an alternate locale.
const alternateLocaleResultPromise =
- SpeechRecognition.availableOnDevice(validLangAlternateLocale);
+ SpeechRecognition.available(validAlternateOptions);
assert_true(
alternateLocaleResultPromise instanceof Promise,
- "availableOnDevice should return a Promise."
+ "available should return a Promise."
);
const alternateLocaleResult = await alternateLocaleResultPromise;
assert_true(
typeof alternateLocaleResult === "string",
- "The resolved value of the availableOnDevice promise should be a string."
+ "The resolved value of the available promise should be a string."
);
assert_true(
alternateLocaleResult === "available",
- "The resolved value of the availableOnDevice promise should be " +
+ "The resolved value of the available promise (on-device, alternate locale) should be " +
"'available'."
);
// Verify that installing an already installed language resolves to true.
- const secondResultPromise = test_driver.bless(
- "Call SpeechRecognition.installOnDevice for an already installed language",
- () => SpeechRecognition.installOnDevice(validLang)
+ const secondInstallPromise = test_driver.bless(
+ "Call SpeechRecognition.install for an already installed on-device language",
+ () => SpeechRecognition.install(validOptions)
);
assert_true(
- secondResultPromise instanceof Promise,
- "installOnDevice (with gesture, for already installed language) should " +
+ secondInstallPromise instanceof Promise,
+ "install (with gesture, for already installed on-device language) should " +
"return a Promise."
);
- const secondResult = await secondResultPromise;
+ const secondInstallResult = await secondInstallPromise;
assert_true(
- typeof secondResult === "boolean",
- "The resolved value of the second installOnDevice promise should be a " +
+ typeof secondInstallResult === "boolean",
+ "The resolved value of the second install promise (on-device) should be a " +
"boolean."
);
assert_equals(
- secondResult,
+ secondInstallResult,
true,
- "installOnDevice should resolve with `true` if the language is already " +
+ "install should resolve with `true` if the on-device language is already " +
"installed."
);
}
// Test that it returns a promise and resolves to false for unsupported lang.
- const invalidResultPromise = test_driver.bless(
- "Call SpeechRecognition.installOnDevice with an unsupported language code",
- () => SpeechRecognition.installOnDevice(invalidLang)
+ const invalidInstallPromise = test_driver.bless(
+ "Call SpeechRecognition.install with unsupported on-device options",
+ () => SpeechRecognition.install(invalidOptions)
);
assert_true(
- invalidResultPromise instanceof Promise,
- "installOnDevice (with gesture, for unsupported language) should return " +
+ invalidInstallPromise instanceof Promise,
+ "install (with gesture, for unsupported on-device options) should return " +
"a Promise."
);
- const invalidResult = await invalidResultPromise;
+ const invalidInstallResult = await invalidInstallPromise;
assert_true(
- typeof invalidResult === "boolean",
- "The resolved value of the installOnDevice promise (unsupported language) " +
+ typeof invalidInstallResult === "boolean",
+ "The resolved value of the install promise (unsupported on-device options) " +
"should be a boolean."
);
assert_equals(
- invalidResult,
+ invalidInstallResult,
false,
- "installOnDevice should resolve with `false` when called with an " +
- "unsupported language code."
+ "install should resolve with `false` when called with " +
+ "unsupported on-device options."
);
-}, "SpeechRecognition.installOnDevice resolves with a boolean value " +
+}, "SpeechRecognition.install resolves with a boolean value for on-device " +
"(with user gesture).");
promise_test(async (t) => {
@@ -162,6 +169,7 @@ promise_test(async (t) => {
const frameDOMException = frameWindow.DOMException;
const frameSpeechRecognition =
frameWindow.SpeechRecognition || frameWindow.webkitSpeechRecognition;
+ const options = { langs: ["en-US"], processLocally: true };
iframe.remove();
await promise_rejects_dom(
@@ -169,13 +177,13 @@ promise_test(async (t) => {
"InvalidStateError",
frameDOMException,
test_driver.bless(
- "Call SpeechRecognition.installOnDevice in a detached frame context",
+ "Call SpeechRecognition.install in a detached frame context for on-device",
() => {
- return frameSpeechRecognition.installOnDevice("en-US");
+ return frameSpeechRecognition.install(options);
}
)
);
-}, "SpeechRecognition.installOnDevice rejects in a detached context.");
+}, "SpeechRecognition.install rejects in a detached context for on-device.");
promise_test(async (t) => {
const iframe = document.createElement("iframe");
@@ -200,19 +208,20 @@ promise_test(async (t) => {
assert_true(!!frameSpeechRecognition,
"SpeechRecognition should exist in iframe.");
- assert_true(!!frameSpeechRecognition.installOnDevice,
- "installOnDevice method should exist on SpeechRecognition in iframe.");
+ assert_true(!!frameSpeechRecognition.install,
+ "install method should exist on SpeechRecognition in iframe.");
+ const options = { langs: ["en-US"], processLocally: true };
await promise_rejects_dom(
t,
"NotAllowedError",
frameDOMException,
- frameSpeechRecognition.installOnDevice("en-US"),
- "installOnDevice should reject with NotAllowedError if " +
+ frameSpeechRecognition.install(options),
+ "install should reject with NotAllowedError if " +
"'install-on-device-speech-recognition' Permission Policy is " +
"disabled."
);
-}, "SpeechRecognition.installOnDevice rejects if " +
+}, "SpeechRecognition.install rejects for on-device if " +
"'install-on-device-speech-recognition' Permission Policy is disabled.");
promise_test(async (t) => {
@@ -223,7 +232,7 @@ promise_test(async (t) => {
try {
const SpeechRecognition = window.SpeechRecognition ||
window.webkitSpeechRecognition;
- if (!SpeechRecognition || !SpeechRecognition.installOnDevice) {
+ if (!SpeechRecognition || !SpeechRecognition.install) {
parent.postMessage({
type: "rejection",
name: "NotSupportedError",
@@ -232,7 +241,8 @@ promise_test(async (t) => {
return;
}
- await SpeechRecognition.installOnDevice("en-US");
+ const options = { langs: ["en-US"], processLocally: true };
+ await SpeechRecognition.install(options);
parent.postMessage({ type: "resolution", result: "success" }, "*");
} catch (err) {
parent.postMessage({
@@ -286,5 +296,5 @@ promise_test(async (t) => {
testResult.message.includes("cross-site subframe"),
`Error message should reference cross-origin. Got: "${testResult.message}"`
);
-}, "SpeechRecognition.installOnDevice should reject in a cross-origin iframe.");
+}, "SpeechRecognition.install should reject for on-device in a cross-origin iframe.");
</script>
diff --git a/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html b/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html
index 2d0b19ab46c..0f596a88015 100644
--- a/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html
+++ b/tests/wpt/tests/speech-api/SpeechRecognition-phrases-manual.https.html
@@ -1,7 +1,10 @@
<!DOCTYPE html>
<html lang="en">
+<meta name="timeout" content="long">
<title>SpeechRecognition Phrases</title>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
@@ -22,6 +25,24 @@ async function getAudioTrackFromFile(filePath) {
}
promise_test(async (t) => {
+ window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
+
+ // Install en-US for on-device speech recognition.
+ const installOptions = { langs: ["en-US"], processLocally: true };
+ const installPromise = test_driver.bless(
+ "Install on-device en-US speech recognition",
+ () => SpeechRecognition.install(installOptions)
+ );
+ assert_true(
+ installPromise instanceof Promise,
+ "SpeechRecognition.install() should return a Promise."
+ );
+ const installResult = await installPromise;
+ assert_true(
+ installResult,
+ "SpeechRecognition.install() for en-US should resolve with true."
+ );
+
// Verify the audio track for recognition context exists.
const audioTrack = await getAudioTrackFromFile("/media/recognition_context.mp3");
assert_true(
@@ -31,9 +52,8 @@ promise_test(async (t) => {
// Create the first speech recognition with a mode that does not support contextual biasing.
// Note that this may vary between browsers in the future.
- window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
const recognition1 = new SpeechRecognition();
- recognition1.mode = "cloud-only";
+ recognition1.processLocally = false;
recognition1.lang = "en-US";
recognition1.onerror = function(event) {
@@ -50,7 +70,7 @@ promise_test(async (t) => {
// Create the second speech recognition with a mode that supports contextual biasing.
const recognition2 = new SpeechRecognition();
- recognition2.mode = "ondevice-only";
+ recognition2.processLocally = true;
recognition2.lang = "en-US";
recognition2.onerror = function(event) {
@@ -67,7 +87,11 @@ promise_test(async (t) => {
const recognitionPromise = new Promise((resolve) => {
recognition2.onresult = (event) => {
const transcript = event.results[0][0].transcript;
- resolve(transcript);
+ const words = transcript.toLowerCase().split(' ');
+ // Resolve when the last word is "expectations".
+ if (words.length > 0 && words[words.length - 1] === "expectations") {
+ resolve(transcript);
+ }
};
});
recognition2.start(audioTrack);
diff --git a/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html b/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html
index 783374db920..57b4d3e3582 100644
--- a/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html
+++ b/tests/wpt/tests/subresource-integrity/integrity-policy/script.https.html
@@ -31,12 +31,6 @@
const blob_url = URL.createObjectURL(blob);
- // Generated using https://sha2.it/ed25519.html (In Chrome Canary, with Experimental Web Platform Features enabled)
- const signature = encodeURIComponent(
- 'header(Unencoded-Digest, sha-384=:tqyFpeo21WFM8HDeUtLqH20GUq\/q3D1R6mqTzW3RtyTZ3dAYZJhC1wUcnkgOE2ak:)' +
- '|header(Signature-Input, signature=\\("unencoded-digest";sf\\); keyid="JrQLj5P\/89iXES9+vFgrIy29clF9CC\/oPPsw3c5D0bs="; tag="sri")' +
- '|header(Signature, signature=:qM19uLskHm2TQG5LJcH/hY0n0BWWzYOJztVWYlwk0cZb3u0JdgUMre1J4Jn8Tma0x2u5/kPBfbXRMbB+X+vTBw==:)');
-
const test_cases = [
{
description: "Ensure that a script without integrity did not run",
@@ -99,16 +93,6 @@
expected: {blocked: "", ran: true },
},
{
- description: "Ensure that a script with signature integrity runs",
- url: "/content-security-policy/resources/ran.js?pipe=" + signature,
- cross_origin: true,
- integrity: "ed25519-JrQLj5P/89iXES9+vFgrIy29clF9CC/oPPsw3c5D0bs=",
- policy_violation: false,
- block: true,
- endpoints: true,
- expected: {blocked: "", ran: true },
- },
- {
description: "Ensure that a data URI script with no integrity runs",
url: "data:application/javascript,window.ran=true",
cross_origin: true,
diff --git a/tests/wpt/tests/subresource-integrity/integrity-policy/tentative/signature.https.html b/tests/wpt/tests/subresource-integrity/integrity-policy/tentative/signature.https.html
new file mode 100644
index 00000000000..d54a6dfb7b0
--- /dev/null
+++ b/tests/wpt/tests/subresource-integrity/integrity-policy/tentative/signature.https.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/dispatcher/dispatcher.js"></script>
+<script src="/common/utils.js"></script>
+<script src="/reporting/resources/report-helper.js"></script>
+
+<body>
+<script>
+ promise_test(async () => {
+ // Generated using https://sha2.it/ed25519.html in a browser that supports Signature-Based SRI (e.g. Chrome 136+, with Experimental Web Platform Features enabled)
+ const signature = encodeURIComponent(
+ 'header(Unencoded-Digest, sha-384=:tqyFpeo21WFM8HDeUtLqH20GUq\/q3D1R6mqTzW3RtyTZ3dAYZJhC1wUcnkgOE2ak:)' +
+ '|header(Signature-Input, signature=\\("unencoded-digest";sf\\); keyid="JrQLj5P\/89iXES9+vFgrIy29clF9CC\/oPPsw3c5D0bs="; tag="sri")' +
+ '|header(Signature, signature=:qM19uLskHm2TQG5LJcH/hY0n0BWWzYOJztVWYlwk0cZb3u0JdgUMre1J4Jn8Tma0x2u5/kPBfbXRMbB+X+vTBw==:)');
+
+ const REMOTE_EXECUTOR =
+ `/common/dispatcher/remote-executor.html`;
+ const iframe_uuid = token();
+
+ let header =
+ `header(Integrity-Policy,blocked-destinations=\\(script\\)\\, endpoints=\\(integrity-endpoint-1 integrity-endpoint-2\\))`;
+ header +=
+ `|header(Integrity-Policy-Report-Only,blocked-destinations=\\(script\\)\\, endpoints=\\(integrity-endpoint-3\\))`;
+ const params = new URLSearchParams();
+ params.set('uuid', iframe_uuid);
+ params.set('pipe', header);
+
+ const iframe = document.createElement('iframe');
+ iframe.src = `${REMOTE_EXECUTOR}?${params}`;
+ document.body.appendChild(iframe);
+
+ // Execute code directly from the iframe.
+ const ctx = new RemoteContext(iframe_uuid);
+ const result = await ctx.execute_script(async (signature) => {
+ window.ran = false;
+ // Load the script
+ await new Promise(resolve => {
+ const script = document.createElement('script');
+ script.crossOrigin="anonymous";
+ script.integrity = "ed25519-JrQLj5P/89iXES9+vFgrIy29clF9CC/oPPsw3c5D0bs=";
+ script.onload = resolve;
+ script.onerror = resolve;
+ script.src = "/content-security-policy/resources/ran.js?pipe=" + signature;
+ document.body.appendChild(script);
+ });
+ return { ran: window.ran };
+ }, [signature]);
+ assert_equals(result.ran, true);
+ }, "Ensure that a script with signature integrity runs");
+</script>
diff --git a/tests/wpt/tests/svg/animations/svgpath-animation-2.tentative.html b/tests/wpt/tests/svg/animations/svgpath-animation-2.tentative.html
new file mode 100644
index 00000000000..68114581172
--- /dev/null
+++ b/tests/wpt/tests/svg/animations/svgpath-animation-2.tentative.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<title>'inherit' path animation</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/SVGAnimationTestCase-testharness.js"></script>
+<script src="support/animated-path-helpers.js"></script>
+<svg>
+ <g style="d: path('M0,50h100')">
+ <path stroke-width="100" stroke="green">
+ <animate attributeName="d" attributeType="CSS" values="M0,50h50; inherit"
+ dur="5s" fill="freeze"/>
+ </path>
+ </g>
+</svg>
+<script>
+const rootSVGElement = document.querySelector("svg");
+
+smil_async_test(t => {
+ const path = document.querySelector("svg > g > path");
+ const expectedValues = [
+ // [animationId, time, sampleCallback]
+ ["animation", 0, () => {
+ assert_animated_path_equals(path, "M 0 50 h 50");
+ }],
+ ["animation", 2.5, () => {
+ assert_animated_path_equals(path, "M 0 50 h 75");
+ }],
+ ["animation", 5, () => {
+ assert_animated_path_equals(path, "M 0 50 h 100");
+ }]
+ ];
+ runAnimationTest(t, expectedValues);
+});
+</script>
diff --git a/tests/wpt/tests/svg/embedded/image-embedding-nesteder-data-url.html b/tests/wpt/tests/svg/embedded/image-embedding-nesteder-data-url.html
index 48fb4fa48b7..4f8335dcd19 100644
--- a/tests/wpt/tests/svg/embedded/image-embedding-nesteder-data-url.html
+++ b/tests/wpt/tests/svg/embedded/image-embedding-nesteder-data-url.html
@@ -1,6 +1,9 @@
<!doctype html>
+<html class="reftest-wait">
<title>SVG image that uses a data: URL and then again</title>
<link rel="match" href="../struct/reftests/reference/green-100x100.html">
+<script src="/common/reftest-wait.js"></script>
+<script src="/common/rendering-utils.js"></script>
<img src="data:image/svg+xml,
<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'>
<image href='data:image/svg+xml,
@@ -14,3 +17,9 @@
'/>
</svg>
">
+<script>
+waitForAtLeastOneFrame().then(() => {
+ takeScreenshot();
+});
+</script>
+</html>
diff --git a/tests/wpt/tests/svg/embedded/image-modify-href-4.svg b/tests/wpt/tests/svg/embedded/image-modify-href-4.svg
index f7e550e5def..e900ee71387 100644
--- a/tests/wpt/tests/svg/embedded/image-modify-href-4.svg
+++ b/tests/wpt/tests/svg/embedded/image-modify-href-4.svg
@@ -16,15 +16,17 @@
const doc = document.implementation.createDocument(SVG_NS, "svg");
const image = doc.createElementNS(SVG_NS, "image");
+ image.addEventListener('load', function() {
+ waitForAtLeastOneFrame().then(() => {
+ takeScreenshot();
+ });
+ });
image.setAttribute("width", 100);
image.setAttribute("height", 100);
image.setAttribute("href", "reference/green-rect-100x100.svg");
doc.documentElement.appendChild(image);
document.documentElement.appendChild(document.adoptNode(image));
-
- await waitForAtLeastOneFrame();
- takeScreenshot();
}
</script>
</svg>
diff --git a/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform-ref.html b/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform-ref.html
new file mode 100644
index 00000000000..78117251a36
--- /dev/null
+++ b/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+
+<style>
+iframe {
+ display: block;
+ border: none;
+}
+</style>
+
+<p>None of the marker rects should be visible as disruptions in the gradient, regardless of transforms:</p>
+<iframe width=300 height=150 src='support/svg-marker-ref.svg'></iframe>
+<iframe width=300 height=150 src='support/svg-marker-ref.svg'></iframe>
+<iframe width=300 height=150 src='support/svg-marker-ref.svg'></iframe>
diff --git a/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform.html b/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform.html
new file mode 100644
index 00000000000..507e9a360cc
--- /dev/null
+++ b/tests/wpt/tests/svg/painting/reftests/marker-context-fill-transform.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+
+<title>SVG rendering test: context-fill in markers with transform</title>
+
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1969782">
+<link rel="match" href="marker-context-fill-transform-ref.html">
+
+<style>
+iframe {
+ display: block;
+ border: none;
+}
+#a {
+ zoom: 1;
+}
+#b {
+ zoom: 2;
+}
+#c {
+ zoom: 0.25;
+}
+</style>
+
+<p>None of the marker rects should be visible as disruptions in the gradient, regardless of transforms:</p>
+<iframe id=a width=300 height=150 src='support/svg-marker-context-paint.svg'></iframe>
+<iframe id=b width=150 height=75 src='support/svg-marker-context-paint.svg'></iframe>
+<iframe id=c width=1200 height=600 src='support/svg-marker-context-paint.svg'></iframe>
diff --git a/tests/wpt/tests/svg/painting/reftests/small-nested-viewbox.html b/tests/wpt/tests/svg/painting/reftests/small-nested-viewbox.html
index 3d9fb8cb45f..308835ce5b4 100644
--- a/tests/wpt/tests/svg/painting/reftests/small-nested-viewbox.html
+++ b/tests/wpt/tests/svg/painting/reftests/small-nested-viewbox.html
@@ -5,14 +5,14 @@
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="match" href="small-nested-viewbox-ref.html">
<style>
- svg {
+ svg#root {
width: 16px;
padding: 4px;
background: #ccc;
color: #000;
}
</style>
-<svg viewBox="0 0 4 4">
+<svg id="root" viewBox="0 0 4 4">
<svg viewBox='0 0 256 256'>
<rect width="256" height="256" x="0" y="0" fill="green" />
</svg>
diff --git a/tests/wpt/tests/svg/painting/reftests/support/svg-marker-context-paint.svg b/tests/wpt/tests/svg/painting/reftests/support/svg-marker-context-paint.svg
new file mode 100644
index 00000000000..8c97058d71e
--- /dev/null
+++ b/tests/wpt/tests/svg/painting/reftests/support/svg-marker-context-paint.svg
@@ -0,0 +1,29 @@
+<svg id="svg-root" viewBox="0 0 1600 900"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <defs>
+ <linearGradient id="lg">
+ <stop offset="0" stop-color="red"/>
+ <stop offset="1" stop-color="blue"/>
+ </linearGradient>
+
+ <!--
+ This marker will render two rectangles, both within the filled area
+ of the path we're using, so they should be indistinguishable from it.
+ -->
+ <marker id="marker" refX="-10" refY="-10" markerWidth="600" markerHeight="400" >
+ <rect y="0" width="200" height="100" fill="context-fill"/>
+ <rect x="250" y="270" width="300" height="100" fill="context-fill"/>
+ </marker>
+ </defs>
+
+ <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z" marker-start="url(#marker)"/>
+
+ <g transform="translate(300 450) scale(0.75 0.5) rotate(60)">
+ <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z" marker-start="url(#marker)"/>
+ </g>
+
+ <g transform="translate(600 450) scale(1.5 0.5) rotate(-30)">
+ <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z" marker-start="url(#marker)"/>
+ </g>
+</svg>
diff --git a/tests/wpt/tests/svg/painting/reftests/support/svg-marker-ref.svg b/tests/wpt/tests/svg/painting/reftests/support/svg-marker-ref.svg
new file mode 100644
index 00000000000..1e823431105
--- /dev/null
+++ b/tests/wpt/tests/svg/painting/reftests/support/svg-marker-ref.svg
@@ -0,0 +1,20 @@
+<svg id="svg-root" viewBox="0 0 1600 900"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:html="http://www.w3.org/1999/xhtml">
+ <defs>
+ <linearGradient id="lg">
+ <stop offset="0" stop-color="red"/>
+ <stop offset="1" stop-color="blue"/>
+ </linearGradient>
+ </defs>
+
+ <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z"/>
+
+ <g transform="translate(300 450) scale(0.75 0.5) rotate(60)">
+ <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z"/>
+ </g>
+
+ <g transform="translate(600 450) scale(1.5 0.5) rotate(-30)">
+ <path fill="url(#lg)" d="M 10 10 h 600 v 400 h -600 Z"/>
+ </g>
+</svg>
diff --git a/tests/wpt/tests/svg/styling/nested-svg-sizing-expected.svg b/tests/wpt/tests/svg/styling/nested-svg-sizing-expected.svg
new file mode 100644
index 00000000000..a8fa5211842
--- /dev/null
+++ b/tests/wpt/tests/svg/styling/nested-svg-sizing-expected.svg
@@ -0,0 +1,5 @@
+<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
+ <svg width="50" height="50">
+ <circle cx="50" cy="50" r="40" fill="green" />
+ </svg>
+</svg>
diff --git a/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use-expected.svg b/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use-expected.svg
new file mode 100644
index 00000000000..daef973aa5d
--- /dev/null
+++ b/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use-expected.svg
@@ -0,0 +1,5 @@
+<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg">
+ <svg id="target" width="50" height="50">
+ <circle cx="50" cy="50" r="40" fill="green" />
+ </svg>
+</svg>
diff --git a/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use.svg b/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use.svg
new file mode 100644
index 00000000000..5f3c4eed490
--- /dev/null
+++ b/tests/wpt/tests/svg/styling/nested-svg-sizing-with-use.svg
@@ -0,0 +1,12 @@
+<svg width="400" height="400" xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml">
+ <title>Width and Height as presentation attributes on nested svg</title>
+ <html:link rel="help" href="https://svgwg.org/svg2-draft/styling.html#TermPresentationAttribute"/>
+ <html:link rel="match" href="nested-svg-sizing-with-use-expected.svg" />
+ <defs>
+ <svg id="target" style="width:50px; height:50px;">
+ <circle cx="50" cy="50" r="40" fill="green" />
+ </svg>
+ </defs>
+
+ <use href="#target"/>
+</svg>
diff --git a/tests/wpt/tests/svg/styling/nested-svg-sizing.svg b/tests/wpt/tests/svg/styling/nested-svg-sizing.svg
new file mode 100644
index 00000000000..6c8c45f6d42
--- /dev/null
+++ b/tests/wpt/tests/svg/styling/nested-svg-sizing.svg
@@ -0,0 +1,8 @@
+<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:html="http://www.w3.org/1999/xhtml">
+ <title>Width and Height as presentation attributes on nested svg</title>
+ <html:link rel="help" href="https://svgwg.org/svg2-draft/styling.html#TermPresentationAttribute"/>
+ <html:link rel="match" href="nested-svg-sizing-expected.svg" />
+ <svg style="width:50px;height:50px;">
+ <circle cx="50" cy="50" r="40" fill="green" />
+ </svg>
+</svg>
diff --git a/tests/wpt/tests/tools/META.yml b/tests/wpt/tests/tools/META.yml
index db7d4d786b4..b204d814921 100644
--- a/tests/wpt/tests/tools/META.yml
+++ b/tests/wpt/tests/tools/META.yml
@@ -2,3 +2,4 @@ suggested_reviewers:
- jgraham
- foolip
- DanielRyanSmith
+ - jonathan-j-lee
diff --git a/tests/wpt/tests/tools/ci/jobs.py b/tests/wpt/tests/tools/ci/jobs.py
index be600ee3974..f18cd66e420 100644
--- a/tests/wpt/tests/tools/ci/jobs.py
+++ b/tests/wpt/tests/tools/ci/jobs.py
@@ -145,6 +145,8 @@ def create_parser():
help="Jobs to check for. Return code is 0 if all jobs are found, otherwise 1")
parser.add_argument("--json", action="store_true",
help="Output jobs as JSON, instead of one per line")
+ parser.add_argument("--json-indent", type=int,
+ help="Indent the JSON with this many spaces (default: no indentation, single line output)")
return parser
@@ -153,7 +155,7 @@ def run(**kwargs):
jobs = get_jobs(paths, **kwargs)
if not kwargs["includes"]:
if kwargs["json"]:
- json.dump(sorted(jobs), sys.stdout, indent=2)
+ json.dump(sorted(jobs), sys.stdout, indent=kwargs["json_indent"])
sys.stdout.write("\n")
else:
for item in sorted(jobs):
diff --git a/tests/wpt/tests/tools/webdriver/webdriver/client.py b/tests/wpt/tests/tools/webdriver/webdriver/client.py
index 5a54bf66ac6..f4e6259d547 100644
--- a/tests/wpt/tests/tools/webdriver/webdriver/client.py
+++ b/tests/wpt/tests/tools/webdriver/webdriver/client.py
@@ -9,24 +9,6 @@ from . import transport
from .bidi.client import BidiSession
-def command(func):
- def inner(self, *args, **kwargs):
- if hasattr(self, "session"):
- session = self.session
- else:
- session = self
-
- if session.session_id is None:
- session.start()
-
- return func(self, *args, **kwargs)
-
- inner.__name__ = func.__name__
- inner.__doc__ = func.__doc__
-
- return inner
-
-
class Timeouts:
def __init__(self, session):
@@ -111,7 +93,6 @@ class ActionSequence:
d["parameters"] = self._pointer_params
return d
- @command
def perform(self):
"""Perform all queued actions."""
self.session.actions.perform([self.dict])
@@ -271,7 +252,6 @@ class Actions:
def __init__(self, session):
self.session = session
- @command
def perform(self, actions=None):
"""Performs actions by tick from each action sequence in `actions`.
@@ -283,7 +263,6 @@ class Actions:
actions = self.session.send_session_command("POST", "actions", body)
return actions
- @command
def release(self):
return self.session.send_session_command("DELETE", "actions")
@@ -299,7 +278,6 @@ class BrowserWindow:
def __init__(self, session):
self.session = session
- @command
def close(self):
handles = self.session.send_session_command("DELETE", "window")
if handles is not None and len(handles) == 0:
@@ -309,24 +287,20 @@ class BrowserWindow:
return handles
@property
- @command
def rect(self):
return self.session.send_session_command("GET", "window/rect")
@rect.setter
- @command
def rect(self, new_rect):
self.session.send_session_command("POST", "window/rect", new_rect)
@property
- @command
def size(self):
"""Gets the window size as a tuple of `(width, height)`."""
rect = self.rect
return (rect["width"], rect["height"])
@size.setter
- @command
def size(self, new_size):
"""Set window size by passing a tuple of `(width, height)`."""
try:
@@ -339,14 +313,12 @@ class BrowserWindow:
pass
@property
- @command
def position(self):
"""Gets the window position as a tuple of `(x, y)`."""
rect = self.rect
return (rect["x"], rect["y"])
@position.setter
- @command
def position(self, new_position):
"""Set window position by passing a tuple of `(x, y)`."""
try:
@@ -358,15 +330,12 @@ class BrowserWindow:
# for Android. Revert this once it is implemented.
pass
- @command
def maximize(self):
return self.session.send_session_command("POST", "window/maximize")
- @command
def minimize(self):
return self.session.send_session_command("POST", "window/minimize")
- @command
def fullscreen(self):
return self.session.send_session_command("POST", "window/fullscreen")
@@ -375,7 +344,6 @@ class Find:
def __init__(self, session):
self.session = session
- @command
def css(self, element_selector, all=True):
elements = self._find_element("css selector", element_selector, all)
return elements
@@ -391,21 +359,17 @@ class UserPrompt:
def __init__(self, session):
self.session = session
- @command
def dismiss(self):
self.session.send_session_command("POST", "alert/dismiss")
- @command
def accept(self):
self.session.send_session_command("POST", "alert/accept")
@property
- @command
def text(self):
return self.session.send_session_command("GET", "alert/text")
@text.setter
- @command
def text(self, value):
body = {"text": value}
self.session.send_session_command("POST", "alert/text", body=body)
@@ -591,41 +555,33 @@ class Session:
return self.send_command(method, url, body, timeout)
@property
- @command
def url(self):
return self.send_session_command("GET", "url")
@url.setter
- @command
def url(self, url):
if urlparse.urlsplit(url).netloc is None:
return self.url(url)
body = {"url": url}
return self.send_session_command("POST", "url", body)
- @command
def back(self):
return self.send_session_command("POST", "back")
- @command
def forward(self):
return self.send_session_command("POST", "forward")
- @command
def refresh(self):
return self.send_session_command("POST", "refresh")
@property
- @command
def title(self):
return self.send_session_command("GET", "title")
@property
- @command
def source(self):
return self.send_session_command("GET", "source")
- @command
def new_window(self, type_hint="tab"):
body = {"type": type_hint}
value = self.send_session_command("POST", "window/new", body)
@@ -633,12 +589,10 @@ class Session:
return value["handle"]
@property
- @command
def window_handle(self):
return self.send_session_command("GET", "window")
@window_handle.setter
- @command
def window_handle(self, handle):
body = {"handle": handle}
return self.send_session_command("POST", "window", body=body)
@@ -654,16 +608,13 @@ class Session:
return self.send_session_command("POST", url, body)
@property
- @command
def handles(self):
return self.send_session_command("GET", "window/handles")
@property
- @command
def active_element(self):
return self.send_session_command("GET", "element/active")
- @command
def cookies(self, name=None):
if name is None:
url = "cookie"
@@ -673,7 +624,6 @@ class Session:
raise TypeError("cookie name must be a str or None")
return self.send_session_command("GET", url, {})
- @command
def set_cookie(self, name, value, path=None, domain=None,
secure=None, expiry=None, http_only=None):
body = {
@@ -704,7 +654,6 @@ class Session:
#[...]
- @command
def execute_script(self, script, args=None):
if args is None:
args = []
@@ -715,7 +664,6 @@ class Session:
}
return self.send_session_command("POST", "execute/sync", body)
- @command
def execute_async_script(self, script, args=None):
if args is None:
args = []
@@ -728,11 +676,9 @@ class Session:
#[...]
- @command
def screenshot(self):
return self.send_session_command("GET", "screenshot")
- @command
def print(self,
background=None,
margin=None,
@@ -785,13 +731,11 @@ class ShadowRoot:
url = f"shadow/{self.id}/{uri}"
return self.session.send_session_command(method, url, body)
- @command
def find_element(self, strategy, selector):
body = {"using": strategy,
"value": selector}
return self.send_shadow_command("POST", "element", body)
- @command
def find_elements(self, strategy, selector):
body = {"using": strategy,
"value": selector}
@@ -839,39 +783,31 @@ class WebElement:
url = "element/%s/%s" % (self.id, uri)
return self.session.send_session_command(method, url, body)
- @command
def find_element(self, strategy, selector):
body = {"using": strategy,
"value": selector}
return self.send_element_command("POST", "element", body)
- @command
def click(self):
self.send_element_command("POST", "click", {})
- @command
def tap(self):
self.send_element_command("POST", "tap", {})
- @command
def clear(self):
self.send_element_command("POST", "clear", {})
- @command
def send_keys(self, text):
return self.send_element_command("POST", "value", {"text": text})
@property
- @command
def text(self):
return self.send_element_command("GET", "text")
@property
- @command
def name(self):
return self.send_element_command("GET", "name")
- @command
def style(self, property_name):
if not isinstance(property_name, str):
raise TypeError("property_name must be a str")
@@ -879,42 +815,34 @@ class WebElement:
return self.send_element_command("GET", "css/%s" % property_name)
@property
- @command
def rect(self):
return self.send_element_command("GET", "rect")
@property
- @command
def selected(self):
return self.send_element_command("GET", "selected")
- @command
def screenshot(self):
return self.send_element_command("GET", "screenshot")
@property
- @command
def shadow_root(self):
return self.send_element_command("GET", "shadow")
- @command
def attribute(self, name):
if not isinstance(name, str):
raise TypeError("name must be a str")
return self.send_element_command("GET", "attribute/%s" % name)
- @command
def get_computed_label(self):
return self.send_element_command("GET", "computedlabel")
- @command
def get_computed_role(self):
return self.send_element_command("GET", "computedrole")
# This MUST come last because otherwise @property decorators above
# will be overridden by this.
- @command
def property(self, name):
if not isinstance(name, str):
raise TypeError("name must be a str")
diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py
index f8629878213..e5635c361cc 100644
--- a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py
+++ b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py
@@ -256,6 +256,7 @@ def update_properties():
return ([
"os",
"debug",
+ "display",
"fission",
"processor",
"swgl",
diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py
index 76d703e7829..4efe1660eb4 100644
--- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py
+++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py
@@ -767,15 +767,16 @@ class CallbackHandler:
def process_action(self, url, payload):
action = payload["action"]
cmd_id = payload["id"]
+ params = payload["params"]
self.logger.debug(f"Got action: {action}")
try:
action_handler = self.actions[action]
except KeyError as e:
raise ValueError(f"Unknown action {action}") from e
try:
- with ActionContext(self.logger, self.protocol, payload.get("context")):
+ with ActionContext(self.logger, self.protocol, params.get("context")):
try:
- result = action_handler(payload)
+ result = action_handler(params)
except AttributeError as e:
# If we fail to get an attribute from the protocol presumably that's a
# ProtocolPart we don't implement
@@ -839,8 +840,9 @@ class AsyncCallbackHandler(CallbackHandler):
"""
async_action_handler = self.async_actions[action]
cmd_id = payload["id"]
+ params = payload["params"]
try:
- result = await async_action_handler(payload)
+ result = await async_action_handler(params)
except AttributeError as e:
# If we fail to get an attribute from the protocol presumably that's a
# ProtocolPart we don't implement
diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js
index 3c2dd8b42dd..2a5bb3937fd 100644
--- a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js
+++ b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js
@@ -160,7 +160,7 @@
let cmd_id;
const action_msg = {type: "action",
action: name,
- ...params};
+ params};
if (is_test_context()) {
cmd_id = window.__wptrunner_message_queue.push(action_msg);
} else {
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-001-outerHTML.xhtml b/tests/wpt/tests/trusted-types/script-enforcement-001-outerHTML.xhtml
new file mode 100644
index 00000000000..f8ce7fee89d
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-001-outerHTML.xhtml
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"/>
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';"/>
+</head>
+<body>
+ <!--- See script-enforcement-001.html an explanation of this test.
+ The HTML parser won't create a child element for the span child of
+ scriptForOuterHTMLTest below, so we instead rely on the XHTML parser. -->
+<div>
+ <script id="scriptForOuterHTMLTest" type="unknown"><span></span></script>
+</div>
+<div id="container"></div>
+<script>
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElement("script").outerHTML = LOG_RUN_MESSAGE;
+ }), "TrustedHTML required.");
+ await no_script_message_for(_ => {
+ let script = document.getElementById("scriptForOuterHTMLTest");
+ script.remove();
+ script.removeAttribute("type");
+ script.firstElementChild.outerHTML = passthroughpolicy.createHTML(LOG_RUN_MESSAGE);
+ document.getElementById("container").appendChild(script);
+ });
+ }, "Script source set via TrustedHTML sink Element.outerHTML drops trustworthiness.");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-001.html b/tests/wpt/tests/trusted-types/script-enforcement-001.html
new file mode 100644
index 00000000000..9548987a22d
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-001.html
@@ -0,0 +1,327 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts">
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
+<!-- This test modifies the source of a new (initially disconnected)
+ HTMLScriptElement by various DOM APIs and verifies whether it will
+ remain trustworthy. This can be done by checking whether the script
+ is actually executed after insertion, because this page enforces
+ Trusted Types without defining any default policy. -->
+<div id="container"></div>
+<script>
+ promise_test(async t => {
+ let message = await script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ assert_equals(message, "RUN");
+ }, "The HTMLScriptElement is initially trusted.");
+
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElement("script").innerText = LOG_RUN_MESSAGE;
+ }), "TrustedScript required.");
+ let message = await script_message_for(_ => {
+ let script = document.createElement("script");
+ script.innerText = passthroughpolicy.createScript(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ assert_equals(message, "RUN");
+ }, "Script source set via TrustedScript sink HTMLScriptElement.innerText keeps trustworthiness.");
+
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElement("script").textContent = LOG_RUN_MESSAGE;
+ }), "TrustedScript required.");
+ let message = await script_message_for(_ => {
+ let script = document.createElement("script");
+ script.textContent = passthroughpolicy.createScript(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ assert_equals(message, "RUN");
+ }, "Script source set via TrustedScript sink HTMLScriptElement.textContent keeps trustworthiness.");
+
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElement("script").text = LOG_RUN_MESSAGE;
+ }), "TrustedScript required.");
+ let message = await script_message_for(_ => {
+ let script = document.createElement("script");
+ script.text = passthroughpolicy.createScript(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ assert_equals(message, "RUN");
+ }, "Script source set via TrustedScript sink HTMLScriptElement.text keeps trustworthiness.");
+
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElement("script").innerHTML = LOG_RUN_MESSAGE;
+ }), "TrustedHTML required.");
+ await no_script_message_for(_ => {
+ let script = document.createElement("script");
+ script.innerHTML = passthroughpolicy.createHTML(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Script source set via TrustedHTML sink Element.innerHTML drops trustworthiness.");
+
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElement("script").setHTMLUnsafe(LOG_RUN_MESSAGE);
+ }), "TrustedHTML required.");
+ await no_script_message_for(_ => {
+ let script = document.createElement("script");
+ script.setHTMLUnsafe(passthroughpolicy.createHTML(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Script source set via TrustedHTML sink Element.setHTMLUnsafe() drops trustworthiness.");
+
+ if (HTMLScriptElement.prototype.setHTML) {
+ promise_test(async t => {
+ // https://wicg.github.io/sanitizer-api/#set-and-filter-html
+ let script = document.createElement("script");
+ script.setHTML(LOG_RUN_MESSAGE);
+ assert_equals(script.text, "");
+ }, "Script source cannot be set via Element.setHTML().");
+ }
+
+ promise_test(async t => {
+ let message = await script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`);
+ script.firstChild.splitText(3);
+ container.appendChild(script);
+ });
+ assert_equals(message, "RUN");
+ }, "Splitting script source via Text.splitText() keeps trustworthiness.");
+
+ promise_test(async t => {
+ let message = await script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`);
+ script.firstChild.splitText(3);
+ script.normalize();
+ container.appendChild(script);
+ });
+ assert_equals(message, "RUN");
+ }, "Normalizing script source via Element.normalize() keeps trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.firstChild.nodeValue = LOG_RUN_MESSAGE;
+ container.appendChild(script);
+ });
+ }, "Script source set via Node.nodeValue drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.firstChild.data = LOG_RUN_MESSAGE;
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.data drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.firstChild.appendData(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.appendData() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.firstChild.insertData(0, LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.insertData() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.firstChild.replaceData(0, 0, LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.replaceData() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`//${LOG_RUN_MESSAGE}`);
+ script.firstChild.deleteData(0, 2);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.deleteData() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.firstChild.before(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.before() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.firstChild.after(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.after() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(3);
+ script.firstChild.remove();
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.remove() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.firstChild.replaceWith(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.replaceWith() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.appendChild(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via Node.appendChild() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.insertBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ container.appendChild(script);
+ });
+ }, "Setting script source via Node.insertBefore() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.replaceChild(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ container.appendChild(script);
+ });
+ }, "Setting script source via Node.replaceChild() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(3);
+ script.removeChild(script.firstChild);
+ container.appendChild(script);
+ });
+ }, "Setting script source via Node.removeChild() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.prepend(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via Element.prepend() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.append(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via Element.append() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.replaceChildren(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via Element.replaceChildren() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ container.appendChild(script);
+ });
+ }, "Setting script source via Element.moveBefore() drops trustworthiness.");
+
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElement("script").insertAdjacentHTML("afterbegin", LOG_RUN_MESSAGE);
+ }), "TrustedHTML required.");
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.insertAdjacentHTML("afterbegin", passthroughpolicy.createHTML(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.insertAdjacentHTML("beforeend", passthroughpolicy.createHTML(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via TrustedHTML sink Node.insertAdjacentHTML() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.insertAdjacentText("afterbegin", LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ script.insertAdjacentText("beforeend", LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via Node.insertAdjacentText() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`;`);
+ let range = new Range();
+ range.selectNode(script.firstChild);
+ range.insertNode(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via Range.insertNode() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`//;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(2);
+ let range = new Range();
+ range.setStart(script.firstChild, 0);
+ range.setEnd(script.lastChild, 3);
+ range.deleteContents();
+ container.appendChild(script);
+ });
+ }, "Setting script source via Range.deleteContents() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`);
+ let clone = script.cloneNode(true);
+ container.appendChild(clone);
+ });
+ }, "Cloning a script via Node.cloneNode() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let div = document.createElement("div");
+ let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`);
+ div.appendChild(script);
+ let range = new Range();
+ range.selectNode(script);
+ let documentFragment = range.cloneContents();
+ container.appendChild(documentFragment.firstElementChild);
+ });
+ }, "Cloning a script via Range.cloneContents() drops trustworthiness.");
+</script>
+</body>
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-002-outerHTML.xhtml b/tests/wpt/tests/trusted-types/script-enforcement-002-outerHTML.xhtml
new file mode 100644
index 00000000000..79bb64852ce
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-002-outerHTML.xhtml
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts"/>
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';"/>
+</head>
+<body>
+ <!--- See script-enforcement-002.html an explanation of this test.
+ The HTML parser won't create a child element for the span child of
+ scriptForOuterHTMLTest below, so we instead rely on the XHTML parser. -->
+<div>
+ <script id="scriptForOuterHTMLTest" type="unknown"><span></span></script>
+</div>
+<div id="container"></div>
+<script>
+ trustedTypes.createPolicy("default", {
+ createHTML: (value, _, sink) => {
+ window.log_message("CREATE_HTML");
+ window.log_message(sink);
+ return value.replace("RUN", "RUN_TRUSTED_HTML");
+ },
+ createScript: (value, _, sink) => {
+ window.log_message("CREATE_SCRIPT");
+ window.log_message(sink);
+ return value.replace("RUN", "RUN_TRUSTED_SCRIPT");
+ },
+ });
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = document.getElementById("scriptForOuterHTMLTest");
+ script.remove();
+ script.removeAttribute("type");
+ window.log_message("SET");
+ script.firstElementChild.outerHTML = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ document.getElementById("container").appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "CREATE_HTML", "Element outerHTML", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]);
+ }, "Default policy's calls when setting script source via Element.outerHTML.");
+</script>
+</body>
+</html>
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-002.html b/tests/wpt/tests/trusted-types/script-enforcement-002.html
new file mode 100644
index 00000000000..ddbbc99ea6b
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-002.html
@@ -0,0 +1,398 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts">
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
+<!-- This test is similar to script-enforcement-001 but it defines a
+ default policy, so we can track precisely when its callbacks
+ are called, the sink names used as well as their effect on
+ the original script's source. -->
+<div id="container"></div>
+<script>
+ trustedTypes.createPolicy("default", {
+ createHTML: (value, _, sink) => {
+ window.log_message("CREATE_HTML");
+ window.log_message(sink);
+ return value.replace("RUN", "RUN_TRUSTED_HTML");
+ },
+ createScript: (value, _, sink) => {
+ window.log_message("CREATE_SCRIPT");
+ window.log_message(sink);
+ return value.replace("RUN", "RUN_TRUSTED_SCRIPT");
+ },
+ });
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = document.createElement("script");
+ window.log_message("SET");
+ script.innerText = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "CREATE_SCRIPT", "HTMLScriptElement innerText", "APPEND", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via HTMLScriptElement.innerText.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = document.createElement("script");
+ window.log_message("SET");
+ script.textContent = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "CREATE_SCRIPT", "HTMLScriptElement textContent", "APPEND", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via HTMLScriptElement.textContent.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = document.createElement("script");
+ window.log_message("SET");
+ script.text = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "CREATE_SCRIPT", "HTMLScriptElement text", "APPEND", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via HTMLScriptElement.text.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = document.createElement("script");
+ window.log_message("SET");
+ script.innerHTML = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "CREATE_HTML", "Element innerHTML", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]);
+ }, "Default policy's calls when setting script source via Element.innerHTML.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = document.createElement("script");
+ window.log_message("SET");
+ script.setHTMLUnsafe(LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "CREATE_HTML", "Element setHTMLUnsafe", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]);
+ }, "Default policy's calls when setting script source via Element.setHTMLUnsafe().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`);
+ window.log_message("SET");
+ script.firstChild.splitText(3);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "RUN"]);
+ }, "Default policy when splitting script source via Text.splitText().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`);
+ script.firstChild.splitText(3);
+ window.log_message("SET");
+ script.normalize();
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "RUN"]);
+ }, "Default policy when normalizing script source via Element.normalize().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.nodeValue = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.nodeValue.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.data = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.data.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.appendData(LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.appendData().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.insertData(0, LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.insertData().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.replaceData(0, 0, LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.replaceData().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`//${LOG_RUN_MESSAGE}`);
+ window.log_message("SET");
+ script.firstChild.deleteData(0, 2);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.deleteData().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.before(LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.before().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.after(LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.after().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(3);
+ window.log_message("SET");
+ script.firstChild.remove();
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.remove().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.replaceWith(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.replaceWith().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.appendChild(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.appendChild().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.insertBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.insertBefore().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.replaceChild(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.replaceChild().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(3);
+ window.log_message("SET");
+ script.removeChild(script.firstChild);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.removeChild().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.prepend(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Element.prepend().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.append(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Element.append().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.replaceChildren(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Element.replaceChildren().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Element.moveBefore().");
+
+ promise_test(async t => {
+ let messages1 = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.insertAdjacentText("afterbegin", LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages1, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ let messages2 = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.insertAdjacentText("beforeend", LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages2, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.insertAdjacentText().");
+
+ promise_test(async t => {
+ let messages1 = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.insertAdjacentHTML("afterbegin", LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages1, ["SET", "CREATE_HTML", "Element insertAdjacentHTML", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]);
+ let messages2 = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.insertAdjacentHTML("beforeend", LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages2, ["SET", "CREATE_HTML", "Element insertAdjacentHTML", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]);
+ }, "Default policy's calls when setting script source via Node.insertAdjacentHTML().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`;`);
+ let range = new Range();
+ range.selectNode(script.firstChild);
+ window.log_message("SET");
+ range.insertNode(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting source via Range.insertNode().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`//;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(2);
+ let range = new Range();
+ range.setStart(script.firstChild, 0);
+ range.setEnd(script.lastChild, 3);
+ window.log_message("SET");
+ range.deleteContents();
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Range.deleteContents().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`);
+ window.log_message("CLONE");
+ let clone = script.cloneNode(true);
+ window.log_message("APPEND");
+ container.appendChild(clone);
+ });
+ assert_array_equals(messages, ["CLONE", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when cloning a script via Node.cloneNode().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let div = document.createElement("div");
+ let script = create_html_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`);
+ div.appendChild(script);
+ let range = new Range();
+ range.selectNode(script);
+ window.log_message("CLONE");
+ let documentFragment = range.cloneContents();
+ window.log_message("APPEND");
+ container.appendChild(documentFragment.firstElementChild);
+ });
+ assert_array_equals(messages, ["CLONE", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when cloning a script via Range.cloneContents().");
+</script>
+</body>
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-003.html b/tests/wpt/tests/trusted-types/script-enforcement-003.html
new file mode 100644
index 00000000000..9ad31b795bc
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-003.html
@@ -0,0 +1,354 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts">
+<link rel="help" href="https://github.com/w3c/trusted-types/issues/512">
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
+<!-- This test is similar to script-enforcement-001 but for the
+ SVGScriptElement, which has slightly different behavior:
+ - No equivalent to HTMLElement.innerText.
+ - No equivalent to HTMLScriptElement.text.
+ - innerHTML and textContent are not Trusted sinks.
+ - The HTML parser can insert elements inside the <script> tag.
+ -->
+<svg>
+ <!-- Provide some static SVGScriptElements for use by
+ document.createElementNS(NSURI_SVG, "script"). See explanation in script-messages.js. -->
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">//;;;window.log_message("RUN")</script>
+ <script type="unknown">//;;;window.log_message("RUN")</script>
+ <script type="unknown">//window.log_message("RUN")</script>
+ <script type="unknown">;;;window.log_message("RUN")/////</script>
+ <script type="unknown">;;;window.log_message("RUN")</script>
+ <script type="unknown">;;;window.log_message("RUN")</script>
+ <script type="unknown">;;;window.log_message("RUN")</script>
+ <script type="unknown">window.log_message("RUN");;;</script>
+ <script type="unknown">window.log_message("RUN");;;</script>
+ <script type="unknown">window.log_message("RUN")</script>
+ <script type="unknown">window.log_message("RUN")</script>
+ <script type="unknown">window.log_message("RUN")</script>
+</svg>
+<svg>
+ <script id="scriptForOuterHTMLTest" type="unknown"><g></g></script>
+</svg>
+<svg id="container"></svg>
+<script>
+ promise_test(async t => {
+ let message = await script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ assert_equals(message, "RUN");
+ }, "The SVGScriptElement is initially trusted.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = document.createElementNS(NSURI_SVG, "script");
+ script.textContent = passthroughpolicy.createScript(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Script source set via Element.textContent drops trustworthiness.");
+
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElementNS(NSURI_SVG, "script").innerHTML = LOG_RUN_MESSAGE;
+ }), "TrustedHTML required.");
+ await no_script_message_for(_ => {
+ let script = document.createElementNS(NSURI_SVG, "script");
+ script.innerHTML = passthroughpolicy.createHTML(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Script source set via TrustedHTML sink Element.innerHTML drops trustworthiness.");
+
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElement("script").outerHTML = LOG_RUN_MESSAGE;
+ }), "TrustedHTML required.");
+ await no_script_message_for(_ => {
+ let script = document.getElementById("scriptForOuterHTMLTest");
+ script.remove();
+ script.removeAttribute("type");
+ script.firstElementChild.outerHTML = passthroughpolicy.createHTML(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Script source set via TrustedHTML sink Element.outerHTML drops trustworthiness.");
+
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElementNS(NSURI_SVG, "script").setHTMLUnsafe(LOG_RUN_MESSAGE);
+ }), "TrustedHTML required.");
+ await no_script_message_for(_ => {
+ let script = document.createElementNS(NSURI_SVG, "script");
+ script.setHTMLUnsafe(passthroughpolicy.createHTML(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Script source set via TrustedHTML sink Element.setHTMLUnsafe() drops trustworthiness.");
+
+ if (SVGScriptElement.prototype.setHTML) {
+ promise_test(async t => {
+ // https://wicg.github.io/sanitizer-api/#set-and-filter-html
+ let script = document.createElementNS(NSURI_SVG, "script");
+ script.setHTML(LOG_RUN_MESSAGE);
+ assert_equals(script.textContent, "");
+ }, "Script source cannot be set via Element.setHTML().");
+ }
+
+ promise_test(async t => {
+ let message = await script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`);
+ script.firstChild.splitText(3);
+ container.appendChild(script);
+ });
+ assert_equals(message, "RUN");
+ }, "Splitting script source via Text.splitText() keeps trustworthiness.");
+
+ promise_test(async t => {
+ let message = await script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`);
+ script.firstChild.splitText(3);
+ script.normalize();
+ container.appendChild(script);
+ });
+ assert_equals(message, "RUN");
+ }, "Normalizing script source via Element.normalize() keeps trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.firstChild.nodeValue = LOG_RUN_MESSAGE;
+ container.appendChild(script);
+ });
+ }, "Script source set via Node.nodeValue drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.firstChild.data = LOG_RUN_MESSAGE;
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.data drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.firstChild.appendData(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.appendData() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.firstChild.insertData(0, LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.insertData() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.firstChild.replaceData(0, 0, LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.replaceData() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`//${LOG_RUN_MESSAGE}`);
+ script.firstChild.deleteData(0, 2);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.deleteData() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.firstChild.before(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.before() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.firstChild.after(LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.after() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(3);
+ script.firstChild.remove();
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.remove() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.firstChild.replaceWith(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via CharacterData.replaceWith() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.appendChild(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via Node.appendChild() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.insertBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ container.appendChild(script);
+ });
+ }, "Setting script source via Node.insertBefore() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.replaceChild(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ container.appendChild(script);
+ });
+ }, "Setting script source via Node.replaceChild() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(3);
+ script.removeChild(script.firstChild);
+ container.appendChild(script);
+ });
+ }, "Setting script source via Node.removeChild() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.prepend(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via Element.prepend() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.append(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via Element.append() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.replaceChildren(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via Element.replaceChildren() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ container.appendChild(script);
+ });
+ }, "Setting script source via ElementmoveBefore() drops trustworthiness.");
+
+ promise_test(async t => {
+ await promise_rejects_js(t, TypeError, script_messages_for(_ => {
+ document.createElementNS(NSURI_SVG, "script").insertAdjacentHTML("afterbegin", LOG_RUN_MESSAGE);
+ }), "TrustedHTML required.");
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.insertAdjacentHTML("afterbegin", passthroughpolicy.createHTML(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.insertAdjacentHTML("beforeend", passthroughpolicy.createHTML(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via TrustedHTML sink Node.insertAdjacentHTML() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.insertAdjacentText("afterbegin", LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ script.insertAdjacentText("beforeend", LOG_RUN_MESSAGE);
+ container.appendChild(script);
+ });
+ }, "Setting script source via Node.insertAdjacentText() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`;`);
+ let range = new Range();
+ range.selectNode(script.firstChild);
+ range.insertNode(document.createTextNode(LOG_RUN_MESSAGE));
+ container.appendChild(script);
+ });
+ }, "Setting script source via Range.insertNode() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`//;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(2);
+ let range = new Range();
+ range.setStart(script.firstChild, 0);
+ range.setEnd(script.lastChild, 3);
+ range.deleteContents();
+ container.appendChild(script);
+ });
+ }, "Setting script source via Range.deleteContents() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`);
+ let clone = script.cloneNode(true);
+ container.appendChild(clone);
+ });
+ }, "Cloning a script via Node.cloneNode() drops trustworthiness.");
+
+ promise_test(async t => {
+ await no_script_message_for(_ => {
+ let div = document.createElement("div");
+ let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`);
+ div.appendChild(script);
+ let range = new Range();
+ range.selectNode(script);
+ let documentFragment = range.cloneContents();
+ container.appendChild(documentFragment.firstElementChild);
+ });
+ }, "Cloning a script via Range.cloneContents() drops trustworthiness.");
+</script>
+</body>
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-004.html b/tests/wpt/tests/trusted-types/script-enforcement-004.html
new file mode 100644
index 00000000000..86e1020c3ad
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-004.html
@@ -0,0 +1,432 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts">
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
+<!-- This test is similar to script-enforcement-002 but for the
+ SVGScriptElement, which has slightly different behavior:
+ - No equivalent to HTMLElement.innerText.
+ - No equivalent to HTMLScriptElement.text.
+ - innerHTML and textContent are not Trusted sinks.
+ - The HTML parser can insert elements inside the <script> tag.
+ - Sink name uses "SVGScriptElement".
+ -->
+<svg>
+ <!-- Provide some static SVGScriptElements for use by
+ document.createElementNS(NSURI_SVG, "script"). See explanation in script-messages.js. -->
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">;</script>
+ <script type="unknown">//;;;window.log_message("RUN")</script>
+ <script type="unknown">//;;;window.log_message("RUN")</script>
+ <script type="unknown">//window.log_message("RUN")</script>
+ <script type="unknown">;;;window.log_message("RUN")/////</script>
+ <script type="unknown">;;;window.log_message("RUN")</script>
+ <script type="unknown">;;;window.log_message("RUN")</script>
+ <script type="unknown">;;;window.log_message("RUN")</script>
+ <script type="unknown">window.log_message("RUN");;;</script>
+ <script type="unknown">window.log_message("RUN");;;</script>
+ <script type="unknown">window.log_message("RUN")</script>
+ <script type="unknown">window.log_message("RUN")</script>
+ <script type="unknown">window.log_message("RUN")</script>
+</svg>
+<svg>
+ <script id="scriptForOuterHTMLTest" type="unknown"><g></g></script>
+</svg>
+<svg id="container"></svg>
+<script>
+ trustedTypes.createPolicy("default", {
+ createHTML: (value, _, sink) => {
+ window.log_message("CREATE_HTML");
+ window.log_message(sink);
+ return value.replace("RUN", "RUN_TRUSTED_HTML");
+ },
+ createScript: (value, _, sink) => {
+ window.log_message("CREATE_SCRIPT");
+ window.log_message(sink);
+ return value.replace("RUN", "RUN_TRUSTED_SCRIPT");
+ },
+ });
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = document.createElementNS(NSURI_SVG, "script");
+ window.log_message("SET");
+ script.textContent = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via SVGScriptElement.textContent.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = document.createElementNS(NSURI_SVG, "script");
+ window.log_message("SET");
+ script.innerHTML = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "CREATE_HTML", "Element innerHTML", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]);
+ }, "Default policy's calls when setting script source via Element.innerHTML.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = document.getElementById("scriptForOuterHTMLTest");
+ script.remove();
+ script.removeAttribute("type");
+ window.log_message("SET");
+ script.firstElementChild.outerHTML = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "CREATE_HTML", "Element outerHTML", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]);
+ }, "Default policy's calls when setting script source via Element.outerHTML.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = document.createElementNS(NSURI_SVG, "script");
+ window.log_message("SET");
+ script.setHTMLUnsafe(LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "CREATE_HTML", "Element setHTMLUnsafe", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]);
+ }, "Default policy's calls when setting script source via Element.setHTMLUnsafe().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`);
+ window.log_message("SET");
+ script.firstChild.splitText(3);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "RUN"]);
+ }, "Default policy when splitting script source via Text.splitText().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE};;;`);
+ script.firstChild.splitText(3);
+ window.log_message("SET");
+ script.normalize();
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "RUN"]);
+ }, "Default policy when normalizing script source via Element.normalize().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.nodeValue = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.nodeValue.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.data = LOG_RUN_MESSAGE;
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.data.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.appendData(LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.appendData().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.insertData(0, LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.insertData().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.replaceData(0, 0, LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.replaceData().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`//${LOG_RUN_MESSAGE}`);
+ window.log_message("SET");
+ script.firstChild.deleteData(0, 2);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.deleteData().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.before(LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.before().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.after(LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.after().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(3);
+ window.log_message("SET");
+ script.firstChild.remove();
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.remove().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.firstChild.replaceWith(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via CharacterData.replaceWith().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.appendChild(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.appendChild().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.insertBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.insertBefore().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.replaceChild(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.replaceChild().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(3);
+ window.log_message("SET");
+ script.removeChild(script.firstChild);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.removeChild().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.prepend(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Element.prepend().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.append(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Element.append().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.replaceChildren(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Element.replaceChildren().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Element.moveBefore().");
+
+ promise_test(async t => {
+ let messages1 = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.insertAdjacentText("afterbegin", LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages1, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ let messages2 = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.insertAdjacentText("beforeend", LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages2, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Node.insertAdjacentText().");
+
+ promise_test(async t => {
+ let messages1 = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.insertAdjacentHTML("afterbegin", LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages1, ["SET", "CREATE_HTML", "Element insertAdjacentHTML", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]);
+ let messages2 = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(";");
+ window.log_message("SET");
+ script.insertAdjacentHTML("beforeend", LOG_RUN_MESSAGE);
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages2, ["SET", "CREATE_HTML", "Element insertAdjacentHTML", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT_TRUSTED_HTML"]);
+ }, "Default policy's calls when setting script source via Node.insertAdjacentHTML().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_trusted_source_text(`;`);
+ let range = new Range();
+ range.selectNode(script.firstChild);
+ window.log_message("SET");
+ range.insertNode(document.createTextNode(LOG_RUN_MESSAGE));
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "HTMLScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting source via Range.insertNode().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`//;;;${LOG_RUN_MESSAGE}`);
+ script.firstChild.splitText(2);
+ let range = new Range();
+ range.setStart(script.firstChild, 0);
+ range.setEnd(script.lastChild, 3);
+ window.log_message("SET");
+ range.deleteContents();
+ window.log_message("APPEND");
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["SET", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when setting script source via Range.deleteContents().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`);
+ window.log_message("CLONE");
+ let clone = script.cloneNode(true);
+ window.log_message("APPEND");
+ container.appendChild(clone);
+ });
+ assert_array_equals(messages, ["CLONE", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when cloning a script via Node.cloneNode().");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let div = document.createElement("div");
+ let script = create_svg_script_with_trusted_source_text(`${LOG_RUN_MESSAGE}`);
+ div.appendChild(script);
+ let range = new Range();
+ range.selectNode(script);
+ window.log_message("CLONE");
+ let documentFragment = range.cloneContents();
+ window.log_message("APPEND");
+ container.appendChild(documentFragment.firstElementChild);
+ });
+ assert_array_equals(messages, ["CLONE", "APPEND", "CREATE_SCRIPT", "SVGScriptElement text", "RUN_TRUSTED_SCRIPT"]);
+ }, "Default policy's calls when cloning a script via Range.cloneContents().");
+</script>
+</body>
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-005.html b/tests/wpt/tests/trusted-types/script-enforcement-005.html
new file mode 100644
index 00000000000..77b1e6b03c6
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-005.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts">
+<link rel="help" href="https://html.spec.whatwg.org/#prepare-the-script-element">
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script';">
+<!-- This test covers the following step from the "prepare the script element"
+ algorithm, verifying that "source text" is the one after application of
+ the default policy: "If el has no src attribute, and source text is the
+ empty string, then return." -->
+<div id="htmlContainer">
+ <script id="scriptToCreateNonEmptyHTMLScript" type="unknown">;</script>
+</div>
+<svg id="svgContainer">
+ <script id="scriptToCreateNonEmptySVGScript" type="unknown">;</script>
+</svg>
+<script>
+ // Define a default policy that transforms empty script string to some source
+ // logging a RUN message and other script strings to empty.
+ trustedTypes.createPolicy("default", {
+ createScript: (value, _, sink) => {
+ window.log_message("CREATE_SCRIPT");
+ window.log_message(sink);
+ return value.length ? "" : LOG_RUN_MESSAGE;
+ }
+ });
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ // Current version of the specification requires the script text to change
+ // in order to force a call to the default policy callback with sink
+ // "HTMLScriptElement text". If the following PR is accepted, this could
+ // be simplified to create_html_script_with_untrusted_source_text("").
+ // https://github.com/w3c/trusted-types/pull/579
+ let script = document.getElementById("scriptToCreateNonEmptyHTMLScript");
+ script.remove();
+ script.removeAttribute("type");
+ script.firstChild.remove();
+ htmlContainer.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "RUN"]);
+ }, "Empty HTMLScriptElement is executed if the default policy makes it non-empty.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_untrusted_source_text(LOG_RUN_MESSAGE);
+ htmlContainer.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text"]);
+
+ }, "Non-empty HTMLScriptElement is not executed if the default policy makes it empty.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ // Note: Using create_html_script_with_untrusted_source_text("") may not
+ // guarantee the script to be untrusted for implementations using a
+ // script-based enforcement mechanism. So make sure we do modify the text.
+ let script = document.getElementById("scriptToCreateNonEmptySVGScript");
+ script.remove();
+ script.removeAttribute("type");
+ script.firstChild.remove();
+ svgContainer.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "RUN"]);
+ }, "Empty SVGScriptElement is executed if the default policy makes it non-empty.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_untrusted_source_text(LOG_RUN_MESSAGE);
+ svgContainer.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text"]);
+
+ }, "Non-empty SVGScriptElement is not executed if the default policy makes it empty.");
+</script>
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-006.html b/tests/wpt/tests/trusted-types/script-enforcement-006.html
new file mode 100644
index 00000000000..7673a686f4e
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-006.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts">
+<link rel="help" href="https://html.spec.whatwg.org/#prepare-the-script-element">
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'">
+<!-- This test covers the following step from the "prepare the script element"
+ algorithm, verifying that "source text" is the one after application of
+ the default policy: "If el does not have a src content attribute: ...
+ Switch on el's type:" -->
+<div id="container"></div>
+<script>
+ const logMessageModulePath = "./support/logMessage-module.sub.js";
+
+ // Define a default policy that transforms the script's type to some valid
+ // source content.
+ trustedTypes.createPolicy("default", {
+ createScript: (value, _, sink) => {
+ window.log_message("CREATE_SCRIPT");
+ window.log_message(sink);
+ switch (value) {
+ case "classic":
+ return `window.log_message('CLASSIC');`;
+ case "module":
+ return `window.log_message('MODULE');`;
+ case "importmap":
+ return `{ "imports": { "${logMessageModulePath}?message=UNMAPPED": "${logMessageModulePath}?message=IMPORTMAP" }}`;
+ }
+ }
+ });
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_untrusted_source_text("classic");
+ script.setAttribute("type", "application/ecmascript");
+ // Appending the script will log "CLASSIC".
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "CLASSIC"]);
+ }, "Untrusted HTMLScriptElement with classic type uses the source text returned by the default policy.");
+
+ // Firefox disallows import map after a module load, so place this promise
+ // test before the module test.
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=1916277#c4
+ promise_test(async t => {
+ let messages = await script_messages_for(async _ => {
+ let script = create_html_script_with_untrusted_source_text("importmap");
+ script.setAttribute("type", "importmap");
+
+ // Appending the script sets up an import map for logMessageModulePath.
+ container.appendChild(script);
+
+ // Importing logMessageModulePath will log message "IMPORTMAP"
+ await import(`${logMessageModulePath}?message=UNMAPPED`);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "IMPORTMAP"]);
+ }, "Untrusted HTMLScriptElement of importmap type uses the source text returned by the default policy.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(async _ => {
+ let script = create_html_script_with_untrusted_source_text("module");
+ script.setAttribute("type", "module");
+
+ // Appending the script will log message "MODULE"
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "MODULE"]);
+ }, "Untrusted HTMLScriptElement of module type uses the source text returned by the default policy.");
+</script>
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-007.html b/tests/wpt/tests/trusted-types/script-enforcement-007.html
new file mode 100644
index 00000000000..34d3831ab74
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-007.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts">
+<link rel="help" href="https://html.spec.whatwg.org/#prepare-the-script-element">
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'">
+<!-- This is the same test as script-enforcement-006 but for SVGScriptElement. -->
+<svg id="container"></svg>
+<script>
+ const logMessageModulePath = "./support/logMessage-module.sub.js";
+
+ // Define a default policy that transforms the script's type to some valid
+ // source content.
+ trustedTypes.createPolicy("default", {
+ createScript: (value, _, sink) => {
+ window.log_message("CREATE_SCRIPT");
+ window.log_message(sink);
+ switch (value) {
+ case "classic":
+ return `window.log_message('CLASSIC');`;
+ case "module":
+ return `window.log_message('MODULE');`;
+ case "importmap":
+ return `{ "imports": { "${logMessageModulePath}?message=UNMAPPED": "${logMessageModulePath}?message=IMPORTMAP" }}`;
+ }
+ }
+ });
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_untrusted_source_text("classic");
+ script.setAttribute("type", "application/ecmascript");
+ // Appending the script will log "CLASSIC".
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "CLASSIC"]);
+ }, "Untrusted SVGScriptElement with classic type uses the source text returned by the default policy.");
+
+ // Firefox disallows import map after a module load, so place this promise
+ // test before the module test.
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=1916277#c4
+ promise_test(async t => {
+ let messages = await script_messages_for(async _ => {
+ let script = create_svg_script_with_untrusted_source_text("importmap");
+ script.setAttribute("type", "importmap");
+
+ // Appending the script sets up an import map for logMessageModulePath.
+ container.appendChild(script);
+
+ // Importing logMessageModulePath will log message "IMPORTMAP".
+ await import(`${logMessageModulePath}?message=UNMAPPED`);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "IMPORTMAP"]);
+ }, "Untrusted SVGScriptElement of importmap type uses the source text returned by the default policy.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(async _ => {
+ let script = create_svg_script_with_untrusted_source_text("module");
+ script.setAttribute("type", "module");
+
+ // Appending the script will log message "MODULE".
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "MODULE"]);
+ }, "Untrusted SVGScriptElement of module type uses the source text returned by the default policy.");
+</script>
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-008.https.html b/tests/wpt/tests/trusted-types/script-enforcement-008.https.html
new file mode 100644
index 00000000000..86d9ec6985a
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-008.https.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts">
+<link rel="help" href="https://html.spec.whatwg.org/#prepare-the-script-element">
+<link rel="help" href="https://w3c.github.io/webappsec-csp/#should-block-inline">
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'">
+<meta id="metaTagForScriptSrc" http-equiv="Content-Security-Policy" content="script-src 'nonce-script-messages' 'nonce-self' 'sha256-IpCtvKVFQbqDBhwCvQEsZoqgVXvAd6T2uRWd/Pz7FuI=' 'sha256-xanaWuoRdfLzI0+K8zpwr8eHi4RK2P6GglgCFXv0r00=' 'sha256-BPWjrQT1GMyyQ+6Fmycn7pSqh8L945ToMJ/nfGClLBc='">
+<!-- This test covers the following step from the "prepare the script element"
+ algorithm, verifying that "source text" is the one after application of
+ the default policy: "If el does not have a src content attribute, and the
+ Should element's inline behavior be blocked by Content Security Policy?
+ algorithm returns "Blocked" when given el, "script", and source text, then
+ return." -->
+<div id="container"></div>
+<script nonce="self">
+ const logMessageModulePath = "./support/logMessage-module.sub.js";
+
+ // Define a default policy that transforms the script's type to some valid
+ // source content.
+ function scriptTypeToValue(value) {
+ switch (value) {
+ case "classic":
+ return `window.log_message('CLASSIC');`;
+ case "module":
+ return `window.log_message('MODULE');`;
+ case "importmap":
+ return `{ "imports": { "${logMessageModulePath}?message=UNMAPPED": "${logMessageModulePath}?message=IMPORTMAP" }}`;
+ }
+ }
+ trustedTypes.createPolicy("default", {
+ createScript: (value, _, sink) => {
+ window.log_message("CREATE_SCRIPT");
+ window.log_message(sink);
+ return scriptTypeToValue(value);
+ }
+ });
+
+ promise_test(async t => {
+ let classicHash = await base64_hash_for_inline_script(scriptTypeToValue("classic"), "SHA-256");
+ let moduleHash = await base64_hash_for_inline_script(scriptTypeToValue("module"), "SHA-256");
+ let importmapHash = await base64_hash_for_inline_script(scriptTypeToValue("importmap"), "SHA-256");
+ let metaTagContent = document.getElementById("metaTagForScriptSrc").getAttribute("content");
+ assert_equals(metaTagContent, `script-src 'nonce-script-messages' 'nonce-self' 'sha256-${classicHash}' 'sha256-${moduleHash}' 'sha256-${importmapHash}'`);
+ }, "script-src CSP directive is properly set.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_html_script_with_untrusted_source_text("classic");
+ script.setAttribute("type", "application/ecmascript");
+ // Appending the script will log "CLASSIC".
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "CLASSIC"]);
+ }, "Untrusted HTMLScriptElement with classic type uses the source text returned by the default policy for inline CSP check.");
+
+ // Firefox disallows import map after a module load, so place this promise
+ // test before the module test.
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=1916277#c4
+ promise_test(async t => {
+ let messages = await script_messages_for(async _ => {
+ let script = create_html_script_with_untrusted_source_text("importmap");
+ script.setAttribute("type", "importmap");
+
+ // Appending the script sets up an import map for logMessageModulePath.
+ container.appendChild(script);
+
+ // Importing logMessageModulePath will log message "IMPORTMAP"
+ await import(`${logMessageModulePath}?message=UNMAPPED`);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "IMPORTMAP"]);
+ }, "Untrusted HTMLScriptElement of importmap type uses the source text returned by the default policy for inline CSP check.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(async _ => {
+ let script = create_html_script_with_untrusted_source_text("module");
+ script.setAttribute("type", "module");
+
+ // Appending the script will log message "MODULE"
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "HTMLScriptElement text", "MODULE"]);
+ }, "Untrusted HTMLScriptElement of module type uses the source text returned by the default policy for inline CSP check.");
+</script>
diff --git a/tests/wpt/tests/trusted-types/script-enforcement-009.https.html b/tests/wpt/tests/trusted-types/script-enforcement-009.https.html
new file mode 100644
index 00000000000..45f21b41eda
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/script-enforcement-009.https.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/passthroughpolicy.js"></script>
+<script src="support/script-messages.js"></script>
+<link rel="help" href="https://w3c.github.io/trusted-types/dist/spec/#enforcement-in-scripts">
+<link rel="help" href="https://html.spec.whatwg.org/#prepare-the-script-element">
+<link rel="help" href="https://w3c.github.io/webappsec-csp/#should-block-inline">
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types-for 'script'">
+<meta id="metaTagForScriptSrc" http-equiv="Content-Security-Policy" content="script-src 'nonce-script-messages' 'nonce-self' 'sha256-IpCtvKVFQbqDBhwCvQEsZoqgVXvAd6T2uRWd/Pz7FuI=' 'sha256-xanaWuoRdfLzI0+K8zpwr8eHi4RK2P6GglgCFXv0r00=' 'sha256-BPWjrQT1GMyyQ+6Fmycn7pSqh8L945ToMJ/nfGClLBc='">
+<!-- This is the same test as script-enforcement-008 but for SVGScriptElement. -->
+<svg id="container"></svg>
+<script nonce="self">
+ const logMessageModulePath = "./support/logMessage-module.sub.js";
+
+ // Define a default policy that transforms the script's type to some valid
+ // source content.
+ function scriptTypeToValue(value) {
+ switch (value) {
+ case "classic":
+ return `window.log_message('CLASSIC');`;
+ case "module":
+ return `window.log_message('MODULE');`;
+ case "importmap":
+ return `{ "imports": { "${logMessageModulePath}?message=UNMAPPED": "${logMessageModulePath}?message=IMPORTMAP" }}`;
+ }
+ }
+ trustedTypes.createPolicy("default", {
+ createScript: (value, _, sink) => {
+ window.log_message("CREATE_SCRIPT");
+ window.log_message(sink);
+ return scriptTypeToValue(value);
+ }
+ });
+
+ promise_test(async t => {
+ let classicHash = await base64_hash_for_inline_script(scriptTypeToValue("classic"), "SHA-256");
+ let moduleHash = await base64_hash_for_inline_script(scriptTypeToValue("module"), "SHA-256");
+ let importmapHash = await base64_hash_for_inline_script(scriptTypeToValue("importmap"), "SHA-256");
+ let metaTagContent = document.getElementById("metaTagForScriptSrc").getAttribute("content");
+ assert_equals(metaTagContent, `script-src 'nonce-script-messages' 'nonce-self' 'sha256-${classicHash}' 'sha256-${moduleHash}' 'sha256-${importmapHash}'`);
+ }, "script-src CSP directive is properly set.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(_ => {
+ let script = create_svg_script_with_untrusted_source_text("classic");
+ script.setAttribute("type", "application/ecmascript");
+ // Appending the script will log "CLASSIC".
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "CLASSIC"]);
+ }, "Untrusted SVGScriptElement with classic type uses the source text returned by the default policy for inline CSP check.");
+
+ // Firefox disallows import map after a module load, so place this promise
+ // test before the module test.
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=1916277#c4
+ promise_test(async t => {
+ let messages = await script_messages_for(async _ => {
+ let script = create_svg_script_with_untrusted_source_text("importmap");
+ script.setAttribute("type", "importmap");
+
+ // Appending the script sets up an import map for logMessageModulePath.
+ container.appendChild(script);
+
+ // Importing logMessageModulePath will log message "IMPORTMAP"
+ await import(`${logMessageModulePath}?message=UNMAPPED`);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "IMPORTMAP"]);
+ }, "Untrusted SVGScriptElement of importmap type uses the source text returned by the default policy for inline CSP check.");
+
+ promise_test(async t => {
+ let messages = await script_messages_for(async _ => {
+ let script = create_svg_script_with_untrusted_source_text("module");
+ script.setAttribute("type", "module");
+
+ // Appending the script will log message "MODULE"
+ container.appendChild(script);
+ });
+ assert_array_equals(messages, ["CREATE_SCRIPT", "SVGScriptElement text", "MODULE"]);
+ }, "Untrusted SVGScriptElement of module type uses the source text returned by the default policy for inline CSP check.");
+</script>
diff --git a/tests/wpt/tests/trusted-types/support/csp-violations.js b/tests/wpt/tests/trusted-types/support/csp-violations.js
index 46c2ca1b30f..bc38da9e221 100644
--- a/tests/wpt/tests/trusted-types/support/csp-violations.js
+++ b/tests/wpt/tests/trusted-types/support/csp-violations.js
@@ -5,6 +5,8 @@ const cspDirectives = [
"trusted-types",
// https://w3c.github.io/webappsec-csp/#script-src
"script-src",
+ // https://w3c.github.io/webappsec-csp/#directive-script-src-elem
+ "script-src-elem",
];
// A generic helper that runs function fn and returns a promise resolving with
diff --git a/tests/wpt/tests/trusted-types/support/logMessage-module.sub.js b/tests/wpt/tests/trusted-types/support/logMessage-module.sub.js
new file mode 100644
index 00000000000..e886bd54b31
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/support/logMessage-module.sub.js
@@ -0,0 +1 @@
+window.log_message("{{GET[message]}}");
diff --git a/tests/wpt/tests/trusted-types/support/passthroughpolicy.js b/tests/wpt/tests/trusted-types/support/passthroughpolicy.js
new file mode 100644
index 00000000000..efe3ea62c0d
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/support/passthroughpolicy.js
@@ -0,0 +1,7 @@
+'use strict'
+
+const passthroughpolicy = trustedTypes.createPolicy("passthroughpolicy", {
+ createHTML: s => s,
+ createScript: s => s,
+ createScriptURL: s => s,
+});
diff --git a/tests/wpt/tests/trusted-types/support/script-messages.js b/tests/wpt/tests/trusted-types/support/script-messages.js
new file mode 100644
index 00000000000..ad4138be25b
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/support/script-messages.js
@@ -0,0 +1,104 @@
+'use strict'
+
+const LOG_RUN_MESSAGE = `window.log_message("RUN")`;
+
+function create_html_script_with_trusted_source_text(source_text) {
+ let script = document.createElement("script");
+ script.text = passthroughpolicy.createScript(source_text);
+ return script;
+}
+
+function create_html_script_with_untrusted_source_text(source_text) {
+ let script = document.createElement("script");
+ // Setting script source via Node.appendChild() drops trustworthiness.
+ script.appendChild(document.createTextNode(source_text));
+ return script;
+}
+
+function create_svg_script_with_trusted_source_text(source_text) {
+ // SVGScriptElement has no API to set its source while preserving its
+ // trustworthiness. For now, we just expect a <script type="unknown"> tag
+ // with the desired source to already be present in the page, so we can just
+ // reuse it. See https://github.com/w3c/trusted-types/issues/512
+ let script =
+ Array.from(document.querySelectorAll("svg script[type='unknown']")).
+ find(script => script.textContent === source_text);
+ assert_true(!!script, `<script type="unknown">${source_text}</script> not found!`);
+ script.remove();
+ script.removeAttribute("type");
+ return script;
+}
+
+function create_svg_script_with_untrusted_source_text(source_text) {
+ let script = document.createElementNS(NSURI_SVG, "script")
+ // Setting script source via Node.appendChild() drops trustworthiness.
+ script.appendChild(document.createTextNode(source_text));
+ return script;
+}
+
+// A generic helper that runs function fn and returns a promise resolving with
+// an array of received messages. A script forcing a "done" message is appended
+// after calling fn, to make sure that all the messages reported by fn have been
+// delivered.
+function script_messages_for(fn) {
+ return new Promise(async (resolve, reject) => {
+ // Listen for messages.
+ let messages = [];
+ let exception = null;
+ window.log_message = message => {
+ if (message === "DONE") {
+ window.log_message = null;
+ if (exception) {
+ reject(exception);
+ } else {
+ resolve(messages);
+ }
+ } else {
+ messages.push(message);
+ }
+ };
+
+ // Execute the function.
+ try {
+ await fn();
+ } catch(e) {
+ exception = e;
+ }
+
+ // Indicate the last message.
+ // This is done by appending an inline script to make sure it is executed
+ // after processing any previously inserted inline script. Additionally, we
+ // delay by a double requestAnimationFrame to work around incompatible
+ // interop bugs:
+ // - WebKit/Chromium seems to give lower priority to module, so it looks
+ // like the appended script should have type="module" here to work with
+ // tests for inline modules.
+ // - but Firefox does not allow type="importmaps" after a type="module" so
+ // making the appended script a module would make importmap tests fail...
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=1916277#c4
+ requestAnimationFrame(_ => requestAnimationFrame(_ => {
+ let script = create_html_script_with_trusted_source_text(`window.log_message("DONE")`);
+ script.setAttribute("nonce", "script-messages");
+ document.body.appendChild(script);
+ }));
+ });
+}
+
+async function script_message_for(fn) {
+ let messages = await script_messages_for(fn);
+ assert_equals(messages.length, 1, `Number of messages (${messages})`);
+ return messages[0];
+}
+
+async function no_script_message_for(fn) {
+ let messages = await script_messages_for(fn);
+ assert_equals(messages.length, 0, `Number of messages (${messages})`);
+}
+
+async function base64_hash_for_inline_script(source_text, algorithm) {
+ const encoder = new TextEncoder();
+ const data = encoder.encode(source_text);
+ const hashBuffer = await window.crypto.subtle.digest(algorithm, data);
+ const base64Array = (new Uint8Array(hashBuffer)).toBase64();
+ return base64Array.toString();
+}
diff --git a/tests/wpt/tests/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html b/tests/wpt/tests/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html
new file mode 100644
index 00000000000..c006bc2315f
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/trusted-types-reporting-for-HTMLScriptElement-children-change.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/csp-violations.js"></script>
+<meta http-equiv="Content-Security-Policy"
+ content="require-trusted-types-for 'script'; connect-src 'none';">
+<meta http-equiv="Content-Security-Policy" content="script-src 'nonce-self'">
+<div id="container"></div>
+<script nonce="self">
+ const originalSource = `${';'.repeat(100)}`;
+ promise_test(async t => {
+ let violation = await trusted_type_violation_without_exception_for(_ => {
+ let script = document.createElement("script");
+ script.setAttribute("nonce", "self");
+
+ // Node.appendChild() makes the script text untrusted.
+ script.appendChild(document.createTextNode(originalSource));
+ document.body.appendChild(script);
+ });
+ assert_equals(violation.blockedURI, "trusted-types-sink");
+ assert_equals(violation.sample, `HTMLScriptElement text|${clipSampleIfNeeded(originalSource)}`);
+ }, `sink mismatch violation report when the script text is changed by manipulating its children.`);
+
+
+ promise_test(async t => {
+ const sourceAfterApplicationOfDefaultPolicy = `${';'.repeat(100)}`;
+ trustedTypes.createPolicy("default", {
+ createScript: value => sourceAfterApplicationOfDefaultPolicy,
+ });
+ let violation = await trusted_type_violation_without_exception_for(async _ => {
+ let script = document.createElement("script");
+
+ // Node.appendChild() makes the script text untrusted.
+ script.appendChild(document.createTextNode(originalSource));
+ document.body.appendChild(script);
+ });
+ assert_equals(violation.effectiveDirective, "script-src-elem");
+ assert_equals(violation.blockedURI, "inline");
+ assert_equals(violation.sample, "");
+ assert_equals(violation.originalPolicy, "script-src 'nonce-self'");
+ }, `inline check violation report when the script text is changed by manipulating its children.`);
+</script>
diff --git a/tests/wpt/tests/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html b/tests/wpt/tests/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html
new file mode 100644
index 00000000000..c187971f726
--- /dev/null
+++ b/tests/wpt/tests/trusted-types/trusted-types-reporting-for-SVGScriptElement-children-change.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/namespaces.js"></script>
+<script src="support/csp-violations.js"></script>
+<meta http-equiv="Content-Security-Policy"
+ content="require-trusted-types-for 'script'; connect-src 'none';">
+<meta http-equiv="Content-Security-Policy" content="script-src 'nonce-self'">
+<svg id="container"></svg>
+<script nonce="self">
+ const originalSource = `${';'.repeat(100)}`;
+ promise_test(async t => {
+ let violation = await trusted_type_violation_without_exception_for(_ => {
+ let script = document.createElementNS(NSURI_SVG, "script");
+ script.setAttribute("nonce", "self");
+
+ // Node.appendChild() makes the script text untrusted.
+ script.appendChild(document.createTextNode(originalSource));
+ document.body.appendChild(script);
+ });
+ assert_equals(violation.blockedURI, "trusted-types-sink");
+ assert_equals(violation.sample, `SVGScriptElement text|${clipSampleIfNeeded(originalSource)}`);
+ }, `sink mismatch violation report when the script text is changed by manipulating its children.`);
+
+ promise_test(async t => {
+ const sourceAfterApplicationOfDefaultPolicy = `${';'.repeat(100)}`;
+ trustedTypes.createPolicy("default", {
+ createScript: value => sourceAfterApplicationOfDefaultPolicy,
+ });
+ let violation = await trusted_type_violation_without_exception_for(async _ => {
+ let script = document.createElementNS(NSURI_SVG, "script");
+
+ // Node.appendChild() makes the script text untrusted.
+ script.appendChild(document.createTextNode(originalSource));
+ document.body.appendChild(script);
+ });
+ assert_equals(violation.effectiveDirective, "script-src-elem");
+ assert_equals(violation.blockedURI, "inline");
+ assert_equals(violation.sample, "");
+ assert_equals(violation.originalPolicy, "script-src 'nonce-self'");
+ }, `inline check violation report when the script text is changed by manipulating its children.`);
+</script>
diff --git a/tests/wpt/tests/uievents/order-of-events/focus-events/focus-management-expectations.html b/tests/wpt/tests/uievents/order-of-events/focus-events/focus-management-expectations.html
index 1845c15d716..65fe639e958 100644
--- a/tests/wpt/tests/uievents/order-of-events/focus-events/focus-management-expectations.html
+++ b/tests/wpt/tests/uievents/order-of-events/focus-events/focus-management-expectations.html
@@ -32,10 +32,10 @@
let buttonFocused = false
to.addEventListener("click", t.unreached_func("Button should not be clicked"))
to.addEventListener("focus", () => buttonFocused = true)
- endTest.addEventListener('click', () => {
+ endTest.addEventListener('click', t.step_func(() => {
assert_true(buttonFocused, "Button should be focused")
t.step_timeout(() => t.done(), 200)
- })
+ }))
// execute test
from.focus()
diff --git a/tests/wpt/tests/web-animations/interfaces/Animation/style-change-events.html b/tests/wpt/tests/web-animations/interfaces/Animation/style-change-events.html
index c64400e869d..d1c1c96f7b0 100644
--- a/tests/wpt/tests/web-animations/interfaces/Animation/style-change-events.html
+++ b/tests/wpt/tests/web-animations/interfaces/Animation/style-change-events.html
@@ -306,13 +306,6 @@ const tests = {
),
});
},
- trigger: UsePropertyTest(animation => {
- // Get the trigger property.
- animation.trigger;
-
- // Set the trigger property.
- animation.trigger = new AnimationTrigger();
- })
};
// Check that each enumerable property and the constructor follow the
diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html b/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html
index a2c4581c4e8..115e8aff1ac 100644
--- a/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html
+++ b/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html
@@ -1,71 +1,65 @@
<!DOCTYPE html>
<html>
- <head>
- <title>
- audiobuffer.html
- </title>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- <script src="/webaudio/resources/audit-util.js"></script>
- <script src="/webaudio/resources/audit.js"></script>
- </head>
- <body>
- <script id="layout-test-code">
- let sampleRate = 44100.0
- let lengthInSeconds = 2;
- let numberOfChannels = 4;
+<head>
+ <title>AudioBuffer API Test</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+ <script>
+ const sampleRate = 44100.0;
+ const lengthInSeconds = 2;
+ const numberOfChannels = 4;
- let audit = Audit.createTaskRunner();
-
- audit.define('Basic tests for AudioBuffer', function(task, should) {
- let context = new AudioContext();
- let buffer = context.createBuffer(
- numberOfChannels, sampleRate * lengthInSeconds, sampleRate);
-
- // Just for printing out a message describing what "buffer" is in the
- // following tests.
- should(
- true,
- 'buffer = context.createBuffer(' + numberOfChannels + ', ' +
- (sampleRate * lengthInSeconds) + ', ' + sampleRate + ')')
- .beTrue();
-
- should(buffer.sampleRate, 'buffer.sampleRate').beEqualTo(sampleRate);
-
- should(buffer.length, 'buffer.length')
- .beEqualTo(sampleRate * lengthInSeconds);
-
- should(buffer.duration, 'buffer.duration').beEqualTo(lengthInSeconds);
+ test(() => {
+ const buffer = new AudioBuffer({
+ numberOfChannels,
+ length: sampleRate * lengthInSeconds,
+ sampleRate
+ });
- should(buffer.numberOfChannels, 'buffer.numberOfChannels')
- .beEqualTo(numberOfChannels);
+ assert_true(
+ true,
+ `buffer = new AudioBuffer({numberOfChannels: ${numberOfChannels}, ` +
+ `length: ${sampleRate * lengthInSeconds}, ` +
+ `sampleRate: ${sampleRate}})`);
- for (let index = 0; index < buffer.numberOfChannels; ++index) {
- should(
- buffer.getChannelData(index) instanceof window.Float32Array,
- 'buffer.getChannelData(' + index +
- ') instanceof window.Float32Array')
- .beTrue();
- }
+ assert_equals(buffer.sampleRate, sampleRate, 'buffer.sampleRate');
+ assert_equals(
+ buffer.length, sampleRate * lengthInSeconds, 'buffer.length');
+ assert_equals(buffer.duration, lengthInSeconds, 'buffer.duration');
+ assert_equals(
+ buffer.numberOfChannels, numberOfChannels, 'buffer.numberOfChannels');
- should(
- function() {
- buffer.getChannelData(buffer.numberOfChannels);
- },
- 'buffer.getChannelData(' + buffer.numberOfChannels + ')')
- .throw(DOMException, 'IndexSizeError');
+ for (let i = 0; i < buffer.numberOfChannels; ++i) {
+ assert_true(
+ buffer.getChannelData(i) instanceof Float32Array,
+ `buffer.getChannelData(${i}) instanceof Float32Array`);
+ }
- let buffer2 = context.createBuffer(1, 1000, 24576);
- let expectedDuration = 1000 / 24576;
+ assert_throws_dom(
+ 'IndexSizeError',
+ () => buffer.getChannelData(buffer.numberOfChannels),
+ `buffer.getChannelData(${buffer.numberOfChannels}) throws`);
- should(
- buffer2.duration, 'context.createBuffer(1, 1000, 24576).duration')
- .beEqualTo(expectedDuration);
+ // Non-standard values (1000 & 24576) to test edge-case duration behavior.
+ const testSampleRate = 24576;
+ const testLength = 1000;
- task.done();
+ const buffer2 = new AudioBuffer({
+ numberOfChannels: 1,
+ length: testLength,
+ sampleRate: testSampleRate
});
- audit.run();
- </script>
- </body>
+ const expectedDuration = testLength / testSampleRate;
+
+ assert_equals(
+ buffer2.duration,
+ expectedDuration,
+ 'new AudioBuffer({numberOfChannels: 1,\n' +
+ `length: ${testLength},sampleRate: ${testSampleRate}}).duration`);
+ }, 'AudioBuffer: creation and property validation');
+ </script>
+</body>
</html>
diff --git a/tests/wpt/tests/webdriver/tests/bidi/browser/create_user_context/invalid.py b/tests/wpt/tests/webdriver/tests/bidi/browser/create_user_context/invalid.py
index 9af6cdd5232..01a2ce1d083 100644
--- a/tests/wpt/tests/webdriver/tests/bidi/browser/create_user_context/invalid.py
+++ b/tests/wpt/tests/webdriver/tests/bidi/browser/create_user_context/invalid.py
@@ -66,3 +66,107 @@ async def test_proxy_proxy_type_manual_socks_proxy_without_socks_version(
"proxyType": "manual",
"socksProxy": "127.0.0.1:1080"
})
+
+
+@pytest.mark.parametrize("value", [42, True, [], {}])
+async def test_params_proxy_ftp_proxy_invalid_type(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(proxy={"proxyType": "manual", "ftpProxy": value})
+
+
+@pytest.mark.parametrize("value", [42, True, [], {}])
+async def test_params_proxy_http_proxy_invalid_type(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(proxy={"proxyType": "manual", "httpProxy": value})
+
+
+@pytest.mark.parametrize("value", [
+ "http://foo",
+ "foo:-1",
+ "foo:65536",
+ "foo/test",
+ "foo#42",
+ "foo?foo=bar",
+ "2001:db8::1",
+])
+async def test_params_proxy_http_proxy_invalid_value(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(proxy={"proxyType": "manual", "httpProxy": value})
+
+
+@pytest.mark.parametrize("value", [42, True, [], {}])
+async def test_params_proxy_ssl_proxy_invalid_type(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(proxy={"proxyType": "manual", "sslProxy": value})
+
+
+@pytest.mark.parametrize("value", [
+ "https://foo",
+ "foo:-1",
+ "foo:65536",
+ "foo/test",
+ "foo#42",
+ "foo?foo=bar",
+ "2001:db8::1",
+])
+async def test_params_proxy_ssl_proxy_invalid_value(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(proxy={"proxyType": "manual", "sslProxy": value})
+
+
+@pytest.mark.parametrize("value", [42, True, [], {}])
+async def test_params_proxy_socks_proxy_invalid_type(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(
+ proxy={"proxyType": "manual", "socksProxy": value, "socksVersion": 4}
+ )
+
+
+@pytest.mark.parametrize("value", [
+ "https://foo",
+ "foo:-1",
+ "foo:65536",
+ "foo/test",
+ "foo#42",
+ "foo?foo=bar",
+ "2001:db8::1",
+])
+async def test_params_proxy_socks_proxy_invalid_value(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(proxy={"proxyType": "manual", "socksProxy": value})
+
+
+@pytest.mark.parametrize("value", ["foo", True, [], {}])
+async def test_params_socks_version_invalid_type(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(
+ proxy={"proxyType": "manual", "socksProxy": "foo:1", "socksVersion": value}
+ )
+
+
+@pytest.mark.parametrize("value", [42, True, "foo", {}])
+async def test_params_no_proxy_invalid_type(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(proxy={"proxyType": "manual", "noProxy": value})
+
+
+@pytest.mark.parametrize("value", [42, True, [], {}])
+async def test_params_no_proxy_element_invalid_type(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(proxy={"proxyType": "manual", "noProxy": [value]})
+
+
+@pytest.mark.parametrize("value", [42, True, [], {}, None])
+async def test_params_autoconfig_url_invalid_type(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(
+ proxy={"proxyType": "pac", "proxyAutoconfigUrl": value}
+ )
+
+
+@pytest.mark.parametrize("value", [42, True, [], {}])
+async def test_params_autoconfig_missing(create_user_context, value):
+ with pytest.raises(error.InvalidArgumentException):
+ await create_user_context(
+ proxy={"proxyType": "pac"}
+ )
diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/fragment_navigated/fragment_navigated.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/fragment_navigated/fragment_navigated.py
index 45a65cacdf0..57680c5f630 100644
--- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/fragment_navigated/fragment_navigated.py
+++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/fragment_navigated/fragment_navigated.py
@@ -143,6 +143,16 @@ async def test_iframe(
await subscribe_events([FRAGMENT_NAVIGATED_EVENT])
+ # Track all received browsingContext.fragmentNavigated events in the events array
+ events = []
+
+ async def on_event(method, data):
+ events.append(data)
+
+ remove_listener = bidi_session.add_event_listener(
+ FRAGMENT_NAVIGATED_EVENT, on_event
+ )
+
on_fragment_navigated = wait_for_event(FRAGMENT_NAVIGATED_EVENT)
target_url = url(EMPTY_PAGE + '#bar')
@@ -158,6 +168,10 @@ async def test_iframe(
await wait_for_future_safe(on_fragment_navigated),
)
+ # Check that we only received one event for the iframe navigation.
+ assert len(events) == 1
+ remove_listener()
+
@pytest.mark.parametrize(
"hash_before, hash_after",
diff --git a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/history_updated/history_updated.py b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/history_updated/history_updated.py
index 9fbb0f26c9e..6ad4bd22b32 100644
--- a/tests/wpt/tests/webdriver/tests/bidi/browsing_context/history_updated/history_updated.py
+++ b/tests/wpt/tests/webdriver/tests/bidi/browsing_context/history_updated/history_updated.py
@@ -4,7 +4,7 @@ from webdriver.bidi.modules.script import ContextTarget
from webdriver.error import TimeoutException
from tests.support.sync import AsyncPoll
-from ... import recursive_compare
+from ... import any_int, int_interval, recursive_compare
pytestmark = pytest.mark.asyncio
@@ -13,6 +13,7 @@ FRAGMENT_NAVIGATED_EVENT = "browsingContext.fragmentNavigated"
HISTORY_UPDATED_EVENT = "browsingContext.historyUpdated"
CREATED_EVENT = "browsingContext.contextCreated"
+
@pytest.mark.parametrize(
"hash_before, hash_after, history_method",
[
@@ -24,10 +25,17 @@ CREATED_EVENT = "browsingContext.contextCreated"
("#foo", "#bar", "replaceState"),
("#foo", "#foo", "replaceState"),
("#bar", "", "replaceState"),
- ]
+ ],
)
async def test_history_url_update(
- bidi_session, new_tab, url, subscribe_events, hash_before, hash_after, history_method
+ bidi_session,
+ new_tab,
+ url,
+ subscribe_events,
+ current_time,
+ hash_before,
+ hash_after,
+ history_method,
):
target_context = new_tab["context"]
@@ -39,43 +47,54 @@ async def test_history_url_update(
fragment_navigated_events = []
history_updated_events = []
+
async def on_event(method, data):
if method == FRAGMENT_NAVIGATED_EVENT:
- fragment_navigated_events.append(data)
+ fragment_navigated_events.append(data)
if method == HISTORY_UPDATED_EVENT:
- history_updated_events.append(data)
+ history_updated_events.append(data)
- remove_fragment_navigated_listener = bidi_session.add_event_listener(FRAGMENT_NAVIGATED_EVENT, on_event)
- remove_history_updated_listener = bidi_session.add_event_listener(HISTORY_UPDATED_EVENT, on_event)
+ remove_fragment_navigated_listener = bidi_session.add_event_listener(
+ FRAGMENT_NAVIGATED_EVENT, on_event
+ )
+ remove_history_updated_listener = bidi_session.add_event_listener(
+ HISTORY_UPDATED_EVENT, on_event
+ )
try:
- target_url = url(EMPTY_PAGE + hash_after)
-
- await bidi_session.script.call_function(
- raw_result=True,
- function_declaration="""(method, url) => {
- history[method](null, null, url);
- }""",
- arguments=[
- {"type": "string", "value": history_method},
- {"type": "string", "value": target_url},
- ],
- await_promise=False,
- target=ContextTarget(target_context),
- )
-
- recursive_compare(
- [{
- 'context': target_context,
- 'url': target_url
- }],
- history_updated_events
- )
-
- assert len(fragment_navigated_events) == 0
+ target_url = url(EMPTY_PAGE + hash_after)
+
+ await bidi_session.script.call_function(
+ raw_result=True,
+ function_declaration="""(method, url) => {
+ history[method](null, null, url);
+ }""",
+ arguments=[
+ {"type": "string", "value": history_method},
+ {"type": "string", "value": target_url},
+ ],
+ await_promise=False,
+ target=ContextTarget(target_context),
+ )
+
+ recursive_compare(
+ [
+ {
+ "context": target_context,
+ "timestamp": any_int,
+ "url": target_url,
+ }
+ ],
+ history_updated_events,
+ )
+
+ # browsingContext.historyUpdated should not contain any navigation id.
+ assert "navigation" not in history_updated_events[0]
+
+ assert len(fragment_navigated_events) == 0
finally:
- remove_fragment_navigated_listener()
- remove_history_updated_listener()
+ remove_fragment_navigated_listener()
+ remove_history_updated_listener()
@pytest.mark.parametrize(
@@ -83,7 +102,7 @@ async def test_history_url_update(
[
("pushState"),
("replaceState"),
- ]
+ ],
)
async def test_history_state_update(
bidi_session, new_tab, url, subscribe_events, history_method
@@ -99,45 +118,44 @@ async def test_history_state_update(
fragment_navigated_events = []
history_updated_events = []
+
async def on_event(method, data):
if method == FRAGMENT_NAVIGATED_EVENT:
- fragment_navigated_events.append(data)
+ fragment_navigated_events.append(data)
if method == HISTORY_UPDATED_EVENT:
- history_updated_events.append(data)
+ history_updated_events.append(data)
- remove_fragment_navigated_listener = bidi_session.add_event_listener(FRAGMENT_NAVIGATED_EVENT, on_event)
- remove_history_updated_listener = bidi_session.add_event_listener(HISTORY_UPDATED_EVENT, on_event)
+ remove_fragment_navigated_listener = bidi_session.add_event_listener(
+ FRAGMENT_NAVIGATED_EVENT, on_event
+ )
+ remove_history_updated_listener = bidi_session.add_event_listener(
+ HISTORY_UPDATED_EVENT, on_event
+ )
try:
- await bidi_session.script.call_function(
- raw_result=True,
- function_declaration="""(method) => {
- history[method]({}, null);
- }""",
- arguments=[
- {"type": "string", "value": history_method},
- ],
- await_promise=False,
- target=ContextTarget(target_context),
- )
-
- recursive_compare(
- [{
- 'context': target_context,
- 'url': target_url
- }],
- history_updated_events
- )
-
- assert len(fragment_navigated_events) == 0
+ await bidi_session.script.call_function(
+ raw_result=True,
+ function_declaration="""(method) => {
+ history[method]({}, null);
+ }""",
+ arguments=[
+ {"type": "string", "value": history_method},
+ ],
+ await_promise=False,
+ target=ContextTarget(target_context),
+ )
+
+ recursive_compare(
+ [{"context": target_context, "url": target_url}], history_updated_events
+ )
+
+ assert len(fragment_navigated_events) == 0
finally:
- remove_fragment_navigated_listener()
- remove_history_updated_listener()
+ remove_fragment_navigated_listener()
+ remove_history_updated_listener()
-async def test_history_document_open(
- bidi_session, new_tab, url, subscribe_events
-):
+async def test_history_document_open(bidi_session, new_tab, url, subscribe_events):
target_context = new_tab["context"]
target_url = url(EMPTY_PAGE)
@@ -145,30 +163,34 @@ async def test_history_document_open(
context=new_tab["context"], url=target_url, wait="complete"
)
- await subscribe_events([FRAGMENT_NAVIGATED_EVENT, HISTORY_UPDATED_EVENT, CREATED_EVENT])
+ await subscribe_events(
+ [FRAGMENT_NAVIGATED_EVENT, HISTORY_UPDATED_EVENT, CREATED_EVENT]
+ )
fragment_navigated_events = []
history_updated_events = []
browsing_context_created_events = []
-
async def on_event(method, data):
if method == FRAGMENT_NAVIGATED_EVENT:
- fragment_navigated_events.append(data)
+ fragment_navigated_events.append(data)
if method == HISTORY_UPDATED_EVENT:
- history_updated_events.append(data)
+ history_updated_events.append(data)
if method == CREATED_EVENT:
- browsing_context_created_events.append(data)
-
+ browsing_context_created_events.append(data)
- remove_fragment_navigated_listener = bidi_session.add_event_listener(FRAGMENT_NAVIGATED_EVENT, on_event)
- remove_history_updated_listener = bidi_session.add_event_listener(HISTORY_UPDATED_EVENT, on_event)
+ remove_fragment_navigated_listener = bidi_session.add_event_listener(
+ FRAGMENT_NAVIGATED_EVENT, on_event
+ )
+ remove_history_updated_listener = bidi_session.add_event_listener(
+ HISTORY_UPDATED_EVENT, on_event
+ )
remove_created_listener = bidi_session.add_event_listener(CREATED_EVENT, on_event)
try:
- await bidi_session.script.call_function(
- raw_result=True,
- function_declaration="""() => {
+ await bidi_session.script.call_function(
+ raw_result=True,
+ function_declaration="""() => {
const frame = document.createElement("iframe");
document.body.append(frame);
frame.contentDocument.open();
@@ -180,37 +202,144 @@ async def test_history_document_open(
window.location.hash = "heya";
});
}""",
- await_promise=True,
- target=ContextTarget(target_context),
- )
-
- recursive_compare(
- [{
- 'url': 'about:blank'
- }],
- browsing_context_created_events
- )
-
- recursive_compare(
- [{
- 'context': target_context,
- 'url': target_url + '#heya'
- }],
- fragment_navigated_events
- )
-
- # History updated URL should match the target_context's URL
- # without the fragment per
- # https://html.spec.whatwg.org/#document-open-steps step 12.2.
- recursive_compare(
- [{
- 'context': browsing_context_created_events[0]['context'],
- 'url': target_url
- }],
- history_updated_events
- )
+ await_promise=True,
+ target=ContextTarget(target_context),
+ )
+
+ recursive_compare([{"url": "about:blank"}], browsing_context_created_events)
+
+ recursive_compare(
+ [{"context": target_context, "url": target_url + "#heya"}],
+ fragment_navigated_events,
+ )
+
+ # History updated URL should match the target_context's URL
+ # without the fragment per
+ # https://html.spec.whatwg.org/#document-open-steps step 12.2.
+ recursive_compare(
+ [
+ {
+ # This event is for the first document.open before setting the
+ # location hash, per spec it should be set to the parent's document
+ # url.
+ "context": browsing_context_created_events[0]["context"],
+ "url": target_url,
+ },
+ {
+ # This is for the second document.open, after setting the hash.
+ # Again this should be set to target_url since the fragment should not
+ # be included.
+ "context": browsing_context_created_events[0]["context"],
+ "url": target_url,
+ },
+ ],
+ history_updated_events,
+ )
+
+ finally:
+ remove_fragment_navigated_listener()
+ remove_history_updated_listener()
+ remove_created_listener()
+
+
+async def test_history_back_forward(
+ bidi_session, new_tab, url, subscribe_events, wait_for_event, wait_for_future_safe
+):
+ target_context = new_tab["context"]
+
+ target_url = url(EMPTY_PAGE)
+ await bidi_session.browsing_context.navigate(
+ context=new_tab["context"], url=target_url, wait="complete"
+ )
+
+ await subscribe_events([FRAGMENT_NAVIGATED_EVENT, HISTORY_UPDATED_EVENT])
+
+ fragment_navigated_events = []
+ history_updated_events = []
+
+ async def on_event(method, data):
+ if method == FRAGMENT_NAVIGATED_EVENT:
+ fragment_navigated_events.append(data)
+ elif method == HISTORY_UPDATED_EVENT:
+ history_updated_events.append(data)
+
+ remove_fragment_navigated_listener = bidi_session.add_event_listener(
+ FRAGMENT_NAVIGATED_EVENT, on_event
+ )
+ remove_history_updated_listener = bidi_session.add_event_listener(
+ HISTORY_UPDATED_EVENT, on_event
+ )
+ try:
+ await bidi_session.script.evaluate(
+ expression="""
+ history.pushState({}, "", "test1.html");
+ history.pushState({}, "", "test2.html");
+ """,
+ await_promise=False,
+ target=ContextTarget(target_context),
+ )
+
+ assert len(history_updated_events) == 2
+ assert len(fragment_navigated_events) == 0
+
+ on_entry = wait_for_event(HISTORY_UPDATED_EVENT)
+ await bidi_session.script.evaluate(
+ expression="history.back();",
+ await_promise=False,
+ target=ContextTarget(target_context),
+ )
+
+ await wait_for_future_safe(on_entry)
+ assert len(history_updated_events) == 3
+ assert len(fragment_navigated_events) == 0
+
+ on_entry = wait_for_event(HISTORY_UPDATED_EVENT)
+ await bidi_session.script.evaluate(
+ expression="history.forward();",
+ await_promise=False,
+ target=ContextTarget(target_context),
+ )
+
+ await wait_for_future_safe(on_entry)
+ assert len(history_updated_events) == 4
+ assert len(fragment_navigated_events) == 0
finally:
- remove_fragment_navigated_listener()
- remove_history_updated_listener()
- remove_created_listener()
+ remove_fragment_navigated_listener()
+ remove_history_updated_listener()
+
+
+async def test_timestamp(
+ bidi_session,
+ current_time,
+ subscribe_events,
+ url,
+ new_tab,
+ wait_for_event,
+ wait_for_future_safe,
+):
+ target_context = new_tab["context"]
+ await bidi_session.browsing_context.navigate(
+ context=new_tab["context"], url=url(EMPTY_PAGE), wait="complete"
+ )
+
+ await subscribe_events(events=[HISTORY_UPDATED_EVENT])
+
+ on_entry = wait_for_event(HISTORY_UPDATED_EVENT)
+ time_start = await current_time()
+
+ await bidi_session.script.evaluate(
+ expression="""history.pushState({}, "", "test1.html")""",
+ await_promise=False,
+ target=ContextTarget(target_context),
+ )
+ event = await wait_for_future_safe(on_entry)
+ time_end = await current_time()
+
+ recursive_compare(
+ {
+ "context": target_context,
+ "timestamp": int_interval(time_start, time_end),
+ },
+ event,
+ )
diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py
index bb171c61411..8866771b80c 100644
--- a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py
+++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py
@@ -44,6 +44,7 @@ async def test_partition_context(bidi_session, set_cookie, top_context, test_pag
domain=domain_value(),
name=cookie_name,
value=NetworkStringValue(cookie_value),
+ secure=True,
),
partition=partition,
)
diff --git a/tests/wpt/tests/webdriver/tests/classic/add_cookie/add.py b/tests/wpt/tests/webdriver/tests/classic/add_cookie/add.py
index 60b67d051ba..581040f7000 100644
--- a/tests/wpt/tests/webdriver/tests/classic/add_cookie/add.py
+++ b/tests/wpt/tests/webdriver/tests/classic/add_cookie/add.py
@@ -237,7 +237,8 @@ def test_add_cookie_with_valid_samesite_flag(session, url, same_site):
new_cookie = {
"name": "hello",
"value": "world",
- "sameSite": same_site
+ "secure": True,
+ "sameSite": same_site,
}
session.url = url("/common/blank.html")
diff --git a/tests/wpt/tests/webnn/conformance_tests/averagePool2d.https.any.js b/tests/wpt/tests/webnn/conformance_tests/averagePool2d.https.any.js
new file mode 100644
index 00000000000..c112cd89c03
--- /dev/null
+++ b/tests/wpt/tests/webnn/conformance_tests/averagePool2d.https.any.js
@@ -0,0 +1,1753 @@
+// META: title=test WebNN API averagePool2d operation
+// META: global=window
+// META: variant=?cpu
+// META: variant=?gpu
+// META: variant=?npu
+// META: script=../resources/utils.js
+// META: timeout=long
+
+'use strict';
+
+// https://www.w3.org/TR/webnn/#api-mlgraphbuilder-pool2d
+// Compute a pooling operation across all the elements within the moving window
+// over the input tensor.
+//
+// enum MLRoundingType {
+// "floor",
+// "ceil"
+// };
+//
+// dictionary MLPool2dOptions {
+// sequence<[EnforceRange] unsigned long> windowDimensions;
+// sequence<[EnforceRange] unsigned long> padding;
+// sequence<[EnforceRange] unsigned long> strides;
+// sequence<[EnforceRange] unsigned long> dilations;
+// MLInputOperandLayout layout = "nchw";
+// MLRoundingType roundingType = "floor";
+// sequence<[EnforceRange] unsigned long> outputSizes;
+// };
+//
+// MLOperand averagePool2d(
+// MLOperand input, optional MLPool2dOptions options = {});
+
+const averagePool2dTests = [
+ // float32 tests
+ {
+ 'name':
+ 'averagePool2d float32 4D constant tensor all positive default options',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'},
+ 'constant': true
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [{'input': 'averagePool2dInput'}],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.26926803588867, 44.72445297241211],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float32 4D tensor all positive default options',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [{'input': 'averagePool2dInput'}],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.26926803588867, 44.72445297241211],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float32 4D tensor all negative default options',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ -83.87757873535156, -2.0740277767181396, -7.561108589172363,
+ -45.274261474609375, -16.36655616760254, -44.908512115478516,
+ -42.04186248779297, -44.77231979370117, -1.5066279172897339,
+ -52.65203857421875, -92.01856231689453, -48.004093170166016,
+ -61.522972106933594, -93.44403839111328, -25.780330657958984,
+ -95.51873779296875, -10.963757514953613, -59.132747650146484,
+ -32.60173797607422, -21.4510440826416, -87.115966796875,
+ -61.326114654541016, -41.989723205566406, -87.8764877319336,
+ -71.69316101074219, -80.24160766601562, -97.48886108398438,
+ -75.89422607421875, -45.08991622924805, -88.27134704589844,
+ -90.71282958984375, -93.32392120361328, -59.14753341674805,
+ -45.33106231689453, -51.32562255859375, -31.154796600341797,
+ -31.62424087524414, -62.80168151855469, -63.558509826660156,
+ -68.96183013916016, -43.09415054321289, -15.803443908691406,
+ -64.31092071533203, -66.45872497558594, -42.027252197265625,
+ -26.032955169677734, -22.73752784729004, -70.32036590576172,
+ -85.28227996826172, -92.10668182373047
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [{'input': 'averagePool2dInput'}],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [-49.258975982666016, -60.52408981323242],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float32 4D tensor options.windowDimensions',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'windowDimensions': [3, 3]}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 43.46498107910156, 49.37273406982422, 42.7481689453125,
+ 50.038944244384766, 52.452327728271484, 58.46046447753906,
+ 32.15948486328125, 34.75465393066406, 54.00202560424805,
+ 49.65404510498047, 41.824440002441406, 35.84912109375,
+ 43.23125457763672, 37.842769622802734, 32.67961120605469,
+ 41.17021942138672, 42.79708480834961, 38.987247467041016
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'global averagePool2d float32 4D tensor all positive options.windowDimensions',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'windowDimensions': [5, 5]}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.26926803588867, 44.72445297241211],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float32 4D tensor options.padding',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'padding': [1, 0, 0, 1]}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 52.43666076660156, 49.84208297729492, 47.26926803588867,
+ 46.15715408325195, 46.63268280029297, 43.616947174072266,
+ 44.72445297241211, 44.05451583862305
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float32 4D tensor options.strides',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 43.46498107910156, 42.7481689453125, 32.15948486328125,
+ 54.00202560424805, 49.65404510498047, 35.84912109375,
+ 41.17021942138672, 38.987247467041016
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float32 4D tensor options.dilations',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [32.2001838684082, 42.971012115478516],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float32 4D tensor options.layout=nchw',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments':
+ [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nchw'}}],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.26926803588867, 44.72445297241211],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float32 4D tensor options.layout=nhwc',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 91.59549713134766, 78.15438079833984,
+ 65.64701080322266, 9.686111450195312, 55.14215087890625,
+ 51.298038482666016, 18.432437896728516, 32.193084716796875,
+ 49.34624099731445, 87.65037536621094, 15.648024559020996,
+ 87.25082397460938, 68.02723693847656, 39.49794006347656,
+ 20.342548370361328, 80.0996322631836, 26.727949142456055,
+ 10.220142364501953, 64.87446594238281, 52.602699279785156,
+ 46.5671501159668, 1.4128639698028564, 79.57833099365234,
+ 11.95406436920166, 4.33846378326416, 85.00074768066406,
+ 38.183837890625, 64.78374481201172, 45.25398254394531,
+ 88.03128814697266, 80.9718017578125, 11.333850860595703,
+ 67.58124542236328, 70.61659240722656, 6.0264997482299805,
+ 84.90442657470703, 29.7788143157959, 79.06687927246094,
+ 58.58993148803711, 7.3287248611450195, 2.2384984493255615,
+ 35.97796630859375, 14.50549030303955, 10.177306175231934,
+ 68.72449493408203, 1.4140757322311401, 76.45657348632812,
+ 78.10037994384766, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments':
+ [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nhwc'}}],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.26926803588867, 44.72445297241211],
+ 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'global averagePool2d float32 4D tensor options.layout=nhwc and options.windowDimensions',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 91.59549713134766, 78.15438079833984,
+ 65.64701080322266, 9.686111450195312, 55.14215087890625,
+ 51.298038482666016, 18.432437896728516, 32.193084716796875,
+ 49.34624099731445, 87.65037536621094, 15.648024559020996,
+ 87.25082397460938, 68.02723693847656, 39.49794006347656,
+ 20.342548370361328, 80.0996322631836, 26.727949142456055,
+ 10.220142364501953, 64.87446594238281, 52.602699279785156,
+ 46.5671501159668, 1.4128639698028564, 79.57833099365234,
+ 11.95406436920166, 4.33846378326416, 85.00074768066406,
+ 38.183837890625, 64.78374481201172, 45.25398254394531,
+ 88.03128814697266, 80.9718017578125, 11.333850860595703,
+ 67.58124542236328, 70.61659240722656, 6.0264997482299805,
+ 84.90442657470703, 29.7788143157959, 79.06687927246094,
+ 58.58993148803711, 7.3287248611450195, 2.2384984493255615,
+ 35.97796630859375, 14.50549030303955, 10.177306175231934,
+ 68.72449493408203, 1.4140757322311401, 76.45657348632812,
+ 78.10037994384766, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'windowDimensions': [5, 5], 'layout': 'nhwc'}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.26926803588867, 44.72445297241211],
+ 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float32 4D tensor options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.20252990722656, 37.16582489013672, 50.038944244384766,
+ 58.46046447753906, 52.73374557495117, 39.1442985534668,
+ 43.23125457763672, 32.67961120605469
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float32 4D tensor options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.20252990722656, 37.16582489013672, 21.206613540649414,
+ 50.038944244384766, 58.46046447753906, 51.3569221496582,
+ 37.24428939819336, 54.04661178588867, 78.58363342285156,
+ 52.73374557495117, 39.1442985534668, 57.1103515625,
+ 43.23125457763672, 32.67961120605469, 56.23945999145508,
+ 40.00800323486328, 43.85149002075195, 41.061283111572266
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float32 4D tensor options.roundingType=ceil and no padding',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656
+ ],
+ 'descriptor': {shape: [1, 2, 4, 4], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 51.20364761352539, 40.29140853881836, 50.77684020996094,
+ 51.70764923095703, 50.63130187988281, 49.3919792175293,
+ 53.128265380859375, 51.11610412597656
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float32 4D tensor options.layout=nhwc and options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 91.59549713134766, 78.15438079833984,
+ 65.64701080322266, 9.686111450195312, 55.14215087890625,
+ 51.298038482666016, 18.432437896728516, 32.193084716796875,
+ 49.34624099731445, 87.65037536621094, 15.648024559020996,
+ 87.25082397460938, 68.02723693847656, 39.49794006347656,
+ 20.342548370361328, 80.0996322631836, 26.727949142456055,
+ 10.220142364501953, 64.87446594238281, 52.602699279785156,
+ 46.5671501159668, 1.4128639698028564, 79.57833099365234,
+ 11.95406436920166, 4.33846378326416, 85.00074768066406,
+ 38.183837890625, 64.78374481201172, 45.25398254394531,
+ 88.03128814697266, 80.9718017578125, 11.333850860595703,
+ 67.58124542236328, 70.61659240722656, 6.0264997482299805,
+ 84.90442657470703, 29.7788143157959, 79.06687927246094,
+ 58.58993148803711, 7.3287248611450195, 2.2384984493255615,
+ 35.97796630859375, 14.50549030303955, 10.177306175231934,
+ 68.72449493408203, 1.4140757322311401, 76.45657348632812,
+ 78.10037994384766, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'layout': 'nhwc',
+ 'roundingType': 'floor'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.20252990722656, 52.73374557495117, 37.16582489013672,
+ 39.1442985534668, 50.038944244384766, 43.23125457763672,
+ 58.46046447753906, 32.67961120605469
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float32 4D tensor options.layout=nhwc and options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 91.59549713134766, 78.15438079833984,
+ 65.64701080322266, 9.686111450195312, 55.14215087890625,
+ 51.298038482666016, 18.432437896728516, 32.193084716796875,
+ 49.34624099731445, 87.65037536621094, 15.648024559020996,
+ 87.25082397460938, 68.02723693847656, 39.49794006347656,
+ 20.342548370361328, 80.0996322631836, 26.727949142456055,
+ 10.220142364501953, 64.87446594238281, 52.602699279785156,
+ 46.5671501159668, 1.4128639698028564, 79.57833099365234,
+ 11.95406436920166, 4.33846378326416, 85.00074768066406,
+ 38.183837890625, 64.78374481201172, 45.25398254394531,
+ 88.03128814697266, 80.9718017578125, 11.333850860595703,
+ 67.58124542236328, 70.61659240722656, 6.0264997482299805,
+ 84.90442657470703, 29.7788143157959, 79.06687927246094,
+ 58.58993148803711, 7.3287248611450195, 2.2384984493255615,
+ 35.97796630859375, 14.50549030303955, 10.177306175231934,
+ 68.72449493408203, 1.4140757322311401, 76.45657348632812,
+ 78.10037994384766, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'layout': 'nhwc',
+ 'roundingType': 'ceil'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.20252990722656, 52.73374557495117, 37.16582489013672,
+ 39.1442985534668, 21.206613540649414, 57.1103515625,
+ 50.038944244384766, 43.23125457763672, 58.46046447753906,
+ 32.67961120605469, 51.3569221496582, 56.23945999145508,
+ 37.24428939819336, 40.00800323486328, 54.04661178588867,
+ 43.85149002075195, 78.58363342285156, 41.061283111572266
+ ],
+ 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor',
+ 'outputSizes': [3, 3]
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.20252990722656, 37.16582489013672, 21.206613540649414,
+ 50.038944244384766, 58.46046447753906, 51.3569221496582,
+ 37.24428939819336, 54.04661178588867, 78.58363342285156,
+ 52.73374557495117, 39.1442985534668, 57.1103515625,
+ 43.23125457763672, 32.67961120605469, 56.23945999145508,
+ 40.00800323486328, 43.85149002075195, 41.061283111572266
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.975555419921875, 78.15438079833984, 9.686111450195312,
+ 51.298038482666016, 32.193084716796875, 87.65037536621094,
+ 87.25082397460938, 39.49794006347656, 80.0996322631836,
+ 10.220142364501953, 52.602699279785156, 1.4128639698028564,
+ 11.95406436920166, 85.00074768066406, 64.78374481201172,
+ 88.03128814697266, 11.333850860595703, 70.61659240722656,
+ 84.90442657470703, 79.06687927246094, 7.3287248611450195,
+ 35.97796630859375, 10.177306175231934, 1.4140757322311401,
+ 78.10037994384766, 91.59549713134766, 65.64701080322266,
+ 55.14215087890625, 18.432437896728516, 49.34624099731445,
+ 15.648024559020996, 68.02723693847656, 20.342548370361328,
+ 26.727949142456055, 64.87446594238281, 46.5671501159668,
+ 79.57833099365234, 4.33846378326416, 38.183837890625,
+ 45.25398254394531, 80.9718017578125, 67.58124542236328,
+ 6.0264997482299805, 29.7788143157959, 58.58993148803711,
+ 2.2384984493255615, 14.50549030303955, 68.72449493408203,
+ 76.45657348632812, 23.53263282775879
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil',
+ 'outputSizes': [2, 2]
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.20252990722656, 37.16582489013672, 50.038944244384766,
+ 58.46046447753906, 52.73374557495117, 39.1442985534668,
+ 43.23125457763672, 32.67961120605469
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float32 4D tensor options.dilations with options.strides',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 70.71148681640625, 99.33489990234375, 76.41767883300781,
+ 39.40980911254883, 38.16328811645508, 45.971256256103516,
+ 65.3527603149414, 64.51607513427734, 7.725966930389404,
+ 41.7672004699707, 94.92633819580078, 53.475772857666016,
+ 95.46460723876953, 58.461795806884766, 15.831390380859375,
+ 78.41020202636719, 24.454092025756836, 20.630916595458984,
+ 32.06352233886719, 47.85192108154297, 91.60813903808594,
+ 72.3534927368164, 74.69429779052734, 28.860214233398438,
+ 71.82395935058594, 7.989691734313965, 88.16659545898438,
+ 58.69850540161133, 63.6061897277832, 55.88187789916992,
+ 52.809974670410156, 72.91474151611328, 46.957664489746094,
+ 22.10279655456543, 87.14309692382812, 89.6496810913086,
+ 63.19610595703125, 11.760882377624512, 70.68730926513672,
+ 57.70444107055664, 1.183821439743042, 25.26912498474121,
+ 95.29122924804688, 1.9658530950546265, 53.368465423583984,
+ 21.400854110717773, 55.86185836791992, 27.824508666992188,
+ 7.642839431762695, 82.34233093261719, 91.75215911865234,
+ 62.79155731201172, 28.11526107788086, 28.72478675842285,
+ 29.887035369873047, 66.4310302734375, 7.0103044509887695,
+ 34.33702087402344, 73.20159912109375, 7.8835601806640625,
+ 17.82563591003418, 33.799156188964844, 65.01251220703125,
+ 30.264028549194336, 75.76551818847656, 21.150800704956055,
+ 60.84249496459961, 98.56522369384766, 62.60990905761719,
+ 42.42991256713867, 53.142147064208984, 36.29545974731445,
+ 79.95863342285156, 79.60734558105469, 16.059114456176758,
+ 19.27552032470703, 53.93022918701172, 48.41620635986328,
+ 93.00965118408203, 62.086524963378906, 83.50532531738281,
+ 61.07964324951172, 75.51439666748047, 54.193782806396484,
+ 2.572873830795288, 59.47652053833008, 34.22541427612305,
+ 13.07015323638916, 12.419061660766602, 55.82337188720703,
+ 4.553813934326172, 63.47830581665039, 62.3555908203125,
+ 56.961090087890625, 34.77016067504883, 0.9611223936080933,
+ 35.30686950683594, 98.00790405273438
+ ],
+ 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'layout': 'nhwc'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 42.940242767333984, 55.268165588378906, 51.6013298034668,
+ 50.220027923583984, 72.13362884521484, 41.542198181152344,
+ 48.91604232788086, 38.775962829589844, 61.21329879760742,
+ 49.504154205322266, 57.72294998168945, 38.6922492980957,
+ 50.19099807739258, 29.15436363220215, 52.98439025878906,
+ 43.10562515258789, 66.77796936035156, 55.2725830078125
+ ],
+ 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+
+ // float16 tests
+ {
+ 'name':
+ 'averagePool2d float16 4D constant tensor all positive default options',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'},
+ 'constant': true
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [{'input': 'averagePool2dInput'}],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.28125, 44.71875],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float16 4D tensor all positive default options',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [{'input': 'averagePool2dInput'}],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.28125, 44.71875],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float16 4D tensor all negative default options',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ -83.875, -2.07421875, -7.5625, -45.28125, -16.359375,
+ -44.90625, -42.03125, -44.78125, -1.5068359375, -52.65625,
+ -92, -48, -61.53125, -93.4375, -25.78125,
+ -95.5, -10.9609375, -59.125, -32.59375, -21.453125,
+ -87.125, -61.3125, -42, -87.875, -71.6875,
+ -80.25, -97.5, -75.875, -45.09375, -88.25,
+ -90.6875, -93.3125, -59.15625, -45.34375, -51.3125,
+ -31.15625, -31.625, -62.8125, -63.5625, -68.9375,
+ -43.09375, -15.8046875, -64.3125, -66.4375, -42.03125,
+ -26.03125, -22.734375, -70.3125, -85.3125, -92.125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [{'input': 'averagePool2dInput'}],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [-49.25, -60.53125],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float16 4D tensor options.windowDimensions',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'windowDimensions': [3, 3]}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 43.46875, 49.375, 42.75, 50.03125, 52.4375, 58.46875, 32.15625,
+ 34.75, 54, 49.65625, 41.8125, 35.84375, 43.21875, 37.84375, 32.6875,
+ 41.1875, 42.78125, 39
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'global averagePool2d float16 4D tensor all positive options.windowDimensions',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'windowDimensions': [5, 5]}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.28125, 44.71875],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float16 4D tensor options.padding',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'padding': [1, 0, 0, 1]}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 52.4375, 49.84375, 47.28125, 46.15625, 46.625, 43.625, 44.71875,
+ 44.0625
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float16 4D tensor options.strides',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data':
+ [43.46875, 42.75, 32.15625, 54, 49.65625, 35.84375, 41.1875, 39],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float16 4D tensor options.dilations',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [32.21875, 42.96875],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float16 4D tensor options.layout=nchw',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments':
+ [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nchw'}}],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.28125, 44.71875],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float16 4D tensor options.layout=nhwc',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 91.625, 78.125, 65.625, 9.6875,
+ 55.15625, 51.3125, 18.4375, 32.1875, 49.34375,
+ 87.625, 15.6484375, 87.25, 68, 39.5,
+ 20.34375, 80.125, 26.734375, 10.21875, 64.875,
+ 52.59375, 46.5625, 1.4130859375, 79.5625, 11.953125,
+ 4.33984375, 85, 38.1875, 64.8125, 45.25,
+ 88.0625, 81, 11.3359375, 67.5625, 70.625,
+ 6.02734375, 84.875, 29.78125, 79.0625, 58.59375,
+ 7.328125, 2.23828125, 35.96875, 14.5078125, 10.1796875,
+ 68.75, 1.4140625, 76.4375, 78.125, 23.53125
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments':
+ [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nhwc'}}],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.28125, 44.71875],
+ 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'global averagePool2d float16 4D tensor options.layout=nhwc and options.windowDimensions',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 91.625, 78.125, 65.625, 9.6875,
+ 55.15625, 51.3125, 18.4375, 32.1875, 49.34375,
+ 87.625, 15.6484375, 87.25, 68, 39.5,
+ 20.34375, 80.125, 26.734375, 10.21875, 64.875,
+ 52.59375, 46.5625, 1.4130859375, 79.5625, 11.953125,
+ 4.33984375, 85, 38.1875, 64.8125, 45.25,
+ 88.0625, 81, 11.3359375, 67.5625, 70.625,
+ 6.02734375, 84.875, 29.78125, 79.0625, 58.59375,
+ 7.328125, 2.23828125, 35.96875, 14.5078125, 10.1796875,
+ 68.75, 1.4140625, 76.4375, 78.125, 23.53125
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'},
+ {'options': {'windowDimensions': [5, 5], 'layout': 'nhwc'}}
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [47.28125, 44.71875],
+ 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float16 4D tensor options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.1875, 37.1875, 50.03125, 58.46875, 52.71875, 39.15625, 43.21875,
+ 32.6875
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'averagePool2d float16 4D tensor options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.1875, 37.1875, 21.203125, 50.03125, 58.46875, 51.375, 37.25,
+ 54.0625, 78.625, 52.71875, 39.15625, 57.125, 43.21875, 32.6875,
+ 56.25, 40, 43.84375, 41.0625
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float16 4D tensor options.roundingType=ceil and no padding',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875, 87.625,
+ 87.25, 39.5, 80.125, 10.21875, 52.59375, 1.4130859375,
+ 11.953125, 85, 64.8125, 88.0625, 11.3359375, 70.625,
+ 84.875, 79.0625, 7.328125, 35.96875, 10.1796875, 1.4140625,
+ 78.125, 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68
+ ],
+ 'descriptor': {shape: [1, 2, 4, 4], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 51.1875, 40.28125, 50.78125, 51.71875, 50.625, 49.375, 53.125,
+ 51.09375
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float16 4D tensor options.layout=nhwc and options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 91.625, 78.125, 65.625, 9.6875,
+ 55.15625, 51.3125, 18.4375, 32.1875, 49.34375,
+ 87.625, 15.6484375, 87.25, 68, 39.5,
+ 20.34375, 80.125, 26.734375, 10.21875, 64.875,
+ 52.59375, 46.5625, 1.4130859375, 79.5625, 11.953125,
+ 4.33984375, 85, 38.1875, 64.8125, 45.25,
+ 88.0625, 81, 11.3359375, 67.5625, 70.625,
+ 6.02734375, 84.875, 29.78125, 79.0625, 58.59375,
+ 7.328125, 2.23828125, 35.96875, 14.5078125, 10.1796875,
+ 68.75, 1.4140625, 76.4375, 78.125, 23.53125
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'layout': 'nhwc',
+ 'roundingType': 'floor'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.1875, 52.71875, 37.1875, 39.15625, 50.03125, 43.21875, 58.46875,
+ 32.6875
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float16 4D tensor options.layout=nhwc and options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 91.625, 78.125, 65.625, 9.6875,
+ 55.15625, 51.3125, 18.4375, 32.1875, 49.34375,
+ 87.625, 15.6484375, 87.25, 68, 39.5,
+ 20.34375, 80.125, 26.734375, 10.21875, 64.875,
+ 52.59375, 46.5625, 1.4130859375, 79.5625, 11.953125,
+ 4.33984375, 85, 38.1875, 64.8125, 45.25,
+ 88.0625, 81, 11.3359375, 67.5625, 70.625,
+ 6.02734375, 84.875, 29.78125, 79.0625, 58.59375,
+ 7.328125, 2.23828125, 35.96875, 14.5078125, 10.1796875,
+ 68.75, 1.4140625, 76.4375, 78.125, 23.53125
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'layout': 'nhwc',
+ 'roundingType': 'ceil'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.1875, 52.71875, 37.1875, 39.15625, 21.203125, 57.125, 50.03125,
+ 43.21875, 58.46875, 32.6875, 51.375, 56.25, 37.25, 40, 54.0625,
+ 43.84375, 78.625, 41.0625
+ ],
+ 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float16 4D tensor options.outputSizes ignores options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor',
+ 'outputSizes': [3, 3]
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.1875, 37.1875, 21.203125, 50.03125, 58.46875, 51.375, 37.25,
+ 54.0625, 78.625, 52.71875, 39.15625, 57.125, 43.21875, 32.6875,
+ 56.25, 40, 43.84375, 41.0625
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float16 4D tensor options.outputSizes ignores options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 22.96875, 78.125, 9.6875, 51.3125, 32.1875,
+ 87.625, 87.25, 39.5, 80.125, 10.21875,
+ 52.59375, 1.4130859375, 11.953125, 85, 64.8125,
+ 88.0625, 11.3359375, 70.625, 84.875, 79.0625,
+ 7.328125, 35.96875, 10.1796875, 1.4140625, 78.125,
+ 91.625, 65.625, 55.15625, 18.4375, 49.34375,
+ 15.6484375, 68, 20.34375, 26.734375, 64.875,
+ 46.5625, 79.5625, 4.33984375, 38.1875, 45.25,
+ 81, 67.5625, 6.02734375, 29.78125, 58.59375,
+ 2.23828125, 14.5078125, 68.75, 76.4375, 23.53125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil',
+ 'outputSizes': [2, 2]
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 54.1875, 37.1875, 50.03125, 58.46875, 52.71875, 39.15625, 43.21875,
+ 32.6875
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'averagePool2d float16 4D tensor options.dilations with options.strides',
+ 'graph': {
+ 'inputs': {
+ 'averagePool2dInput': {
+ 'data': [
+ 70.6875, 99.3125, 76.4375, 39.40625, 38.15625,
+ 45.96875, 65.375, 64.5, 7.7265625, 41.78125,
+ 94.9375, 53.46875, 95.4375, 58.46875, 15.828125,
+ 78.4375, 24.453125, 20.625, 32.0625, 47.84375,
+ 91.625, 72.375, 74.6875, 28.859375, 71.8125,
+ 7.98828125, 88.1875, 58.6875, 63.59375, 55.875,
+ 52.8125, 72.9375, 46.96875, 22.109375, 87.125,
+ 89.625, 63.1875, 11.7578125, 70.6875, 57.71875,
+ 1.18359375, 25.265625, 95.3125, 1.9658203125, 53.375,
+ 21.40625, 55.875, 27.828125, 7.64453125, 82.3125,
+ 91.75, 62.78125, 28.109375, 28.71875, 29.890625,
+ 66.4375, 7.01171875, 34.34375, 73.1875, 7.8828125,
+ 17.828125, 33.8125, 65, 30.265625, 75.75,
+ 21.15625, 60.84375, 98.5625, 62.625, 42.4375,
+ 53.15625, 36.28125, 79.9375, 79.625, 16.0625,
+ 19.28125, 53.9375, 48.40625, 93, 62.09375,
+ 83.5, 61.09375, 75.5, 54.1875, 2.572265625,
+ 59.46875, 34.21875, 13.0703125, 12.421875, 55.8125,
+ 4.5546875, 63.46875, 62.34375, 56.96875, 34.78125,
+ 0.9609375, 35.3125, 98
+ ],
+ 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'averagePool2d',
+ 'arguments': [
+ {'input': 'averagePool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'layout': 'nhwc'
+ }
+ }
+ ],
+ 'outputs': 'averagePool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'averagePool2dOutput': {
+ 'data': [
+ 42.9375, 55.25, 51.59375, 50.21875, 72.125, 41.53125, 48.90625,
+ 38.78125, 61.21875, 49.5, 57.71875, 38.6875, 50.1875, 29.15625,
+ 52.96875, 43.09375, 66.75, 55.28125
+ ],
+ 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float16'}
+ }
+ }
+ }
+ }
+];
+
+if (navigator.ml) {
+ averagePool2dTests.forEach((test) => {
+ webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test);
+ });
+} else {
+ test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
+}
diff --git a/tests/wpt/tests/webnn/conformance_tests/equal.https.any.js b/tests/wpt/tests/webnn/conformance_tests/equal.https.any.js
index dc01aa19379..a974ec0004f 100644
--- a/tests/wpt/tests/webnn/conformance_tests/equal.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/equal.https.any.js
@@ -987,7 +987,8 @@ const equalTests = [
if (navigator.ml) {
equalTests.forEach((test) => {
webnn_conformance_test(
- buildAndExecuteGraph, getEqualPrecisionTolerance, test);
+ buildAndExecuteGraph, getEqualPrecisionTolerance, test,
+ /*cast_to_supported_type=*/true);
});
} else {
test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
diff --git a/tests/wpt/tests/webnn/conformance_tests/graph_devices.https.any.js b/tests/wpt/tests/webnn/conformance_tests/graph_devices.https.any.js
new file mode 100644
index 00000000000..c380d810f36
--- /dev/null
+++ b/tests/wpt/tests/webnn/conformance_tests/graph_devices.https.any.js
@@ -0,0 +1,22 @@
+// META: title=test graph.devices
+// META: global=window
+// META: variant=?cpu
+// META: variant=?gpu
+// META: variant=?npu
+// META: script=../resources/utils.js
+// META: timeout=long
+
+'use strict';
+
+if (navigator.ml) {
+ promise_test(async () => {
+ const context = await navigator.ml.createContext(contextOptions);
+ const builder = new MLGraphBuilder(context);
+ const a = builder.input('A', {dataType: 'float32', shape: []});
+ const o = builder.add(a, a);
+ const graph = await builder.build({'o': o});
+ assert_greater_than(graph.devices.length, 0, 'graph.devices is empty.');
+ });
+} else {
+ test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
+}
diff --git a/tests/wpt/tests/webnn/conformance_tests/greater.https.any.js b/tests/wpt/tests/webnn/conformance_tests/greater.https.any.js
index 704e0c45776..21e8b07bd47 100644
--- a/tests/wpt/tests/webnn/conformance_tests/greater.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/greater.https.any.js
@@ -991,7 +991,8 @@ const greaterTests = [
if (navigator.ml) {
greaterTests.forEach((test) => {
webnn_conformance_test(
- buildAndExecuteGraph, getGreaterPrecisionTolerance, test);
+ buildAndExecuteGraph, getGreaterPrecisionTolerance, test,
+ /*cast_to_supported_type=*/true);
});
} else {
test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
diff --git a/tests/wpt/tests/webnn/conformance_tests/greater_or_equal.https.any.js b/tests/wpt/tests/webnn/conformance_tests/greater_or_equal.https.any.js
index 28a2e896027..f9ab2d66814 100644
--- a/tests/wpt/tests/webnn/conformance_tests/greater_or_equal.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/greater_or_equal.https.any.js
@@ -986,7 +986,8 @@ const greaterOrEqualTests = [
if (navigator.ml) {
greaterOrEqualTests.forEach((test) => {
webnn_conformance_test(
- buildAndExecuteGraph, getGreaterOrEqualPrecisionTolerance, test);
+ buildAndExecuteGraph, getGreaterOrEqualPrecisionTolerance, test,
+ /*cast_to_supported_type=*/true);
});
} else {
test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
diff --git a/tests/wpt/tests/webnn/conformance_tests/l2Pool2d.https.any.js b/tests/wpt/tests/webnn/conformance_tests/l2Pool2d.https.any.js
new file mode 100644
index 00000000000..f0e16be927b
--- /dev/null
+++ b/tests/wpt/tests/webnn/conformance_tests/l2Pool2d.https.any.js
@@ -0,0 +1,1366 @@
+// META: title=test WebNN API l2Pool2d operation
+// META: global=window
+// META: variant=?cpu
+// META: variant=?gpu
+// META: variant=?npu
+// META: script=../resources/utils.js
+// META: timeout=long
+
+'use strict';
+
+// https://www.w3.org/TR/webnn/#api-mlgraphbuilder-pool2d
+// Compute a pooling operation across all the elements within the moving window
+// over the input tensor.
+//
+// enum MLRoundingType {
+// "floor",
+// "ceil"
+// };
+//
+// dictionary MLPool2dOptions {
+// sequence<[EnforceRange] unsigned long> windowDimensions;
+// sequence<[EnforceRange] unsigned long> padding;
+// sequence<[EnforceRange] unsigned long> strides;
+// sequence<[EnforceRange] unsigned long> dilations;
+// MLInputOperandLayout layout = "nchw";
+// MLRoundingType roundingType = "floor";
+// sequence<[EnforceRange] unsigned long> outputSizes;
+// };
+//
+// MLOperand l2Pool2d(
+// MLOperand input, optional MLPool2dOptions options = {});
+
+const l2Pool2dTests = [
+ // float32 tests
+ {
+ 'name': 'l2Pool2d float32 4D constant tensor all positive default options',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'},
+ 'constant': true
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [{'input': 'l2Pool2dInput'}],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [289.01953125, 292.6146545410156],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor all positive default options',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [{'input': 'l2Pool2dInput'}],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [289.01953125, 292.6146545410156],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor all negative default options',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ -1.1957088708877563, -9.706199645996094, -39.54935836791992,
+ -82.34971618652344, -32.87415313720703, -50.22603225708008,
+ -31.17849349975586, -55.817893981933594, -46.70829391479492,
+ -38.68181228637695, -63.299320220947266, -35.09224319458008,
+ -80.93848419189453, -82.8619613647461, -40.41627502441406,
+ -34.86458206176758, -84.33639526367188, -84.11852264404297,
+ -5.525088787078857, -99.03114318847656, -75.505126953125,
+ -91.43389129638672, -96.71258544921875, -16.722585678100586,
+ -17.98292350769043, -58.06570816040039, -11.846800804138184,
+ -97.90313720703125, -38.69822692871094, -80.19510650634766,
+ -48.72047805786133, -90.86722564697266, -99.10758209228516,
+ -79.70288848876953, -59.3824462890625, -9.967330932617188,
+ -39.27534866333008, -10.469644546508789, -27.565326690673828,
+ -2.0468990802764893, -81.88761901855469, -66.88040161132812,
+ -85.98504638671875, -29.674592971801758, -19.649417877197266,
+ -89.39192199707031, -61.13504409790039, -84.16869354248047,
+ -77.36112213134766, -91.17266082763672
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [{'input': 'l2Pool2dInput'}],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [298.928955078125, 326.83587646484375],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor options.windowDimensions',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {'options': {'windowDimensions': [3, 3]}}
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 194.45481872558594, 189.54539489746094, 189.85488891601562,
+ 160.0518341064453, 167.1435546875, 149.63897705078125,
+ 161.15570068359375, 190.5449981689453, 168.4636688232422,
+ 170.331787109375, 155.60073852539062, 174.72145080566406,
+ 165.07762145996094, 165.45819091796875, 161.11062622070312,
+ 176.6307373046875, 174.245361328125, 180.60714721679688
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor options.padding',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}}
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 254.81358337402344, 233.14259338378906, 289.01953125,
+ 269.777587890625, 241.52200317382812, 212.99337768554688,
+ 292.6146545410156, 253.77178955078125
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor options.strides',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 194.45481872558594, 189.85488891601562, 161.15570068359375,
+ 168.4636688232422, 170.331787109375, 174.72145080566406,
+ 176.6307373046875, 180.60714721679688
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor options.dilations',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [189.47933959960938, 207.25343322753906],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor options.layout=nchw',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments':
+ [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nchw'}}],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [289.01953125, 292.6146545410156],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor options.layout=nhwc',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 52.027313232421875, 76.55464172363281,
+ 6.397815227508545, 62.71847152709961, 84.54785919189453,
+ 83.8726577758789, 18.622516632080078, 73.10235595703125,
+ 34.10626220703125, 41.52470779418945, 73.96932220458984,
+ 39.3339729309082, 36.1437873840332, 86.59486389160156,
+ 60.73781967163086, 23.09039306640625, 55.09187316894531,
+ 53.650146484375, 63.8924446105957, 0.00902052316814661,
+ 59.36124038696289, 42.78899383544922, 50.91202926635742,
+ 81.03960418701172, 50.339813232421875, 33.48585510253906,
+ 59.31963348388672, 33.67196273803711, 70.78031921386719,
+ 0.42822372913360596, 35.56179428100586, 80.07991790771484,
+ 82.53382873535156, 5.929991722106934, 7.572360038757324,
+ 48.89164733886719, 61.90089416503906, 15.282920837402344,
+ 14.084012985229492, 13.335721969604492, 90.86540985107422,
+ 39.06557846069336, 39.56248474121094, 97.06050109863281,
+ 67.77167510986328, 83.68133544921875, 69.69512176513672,
+ 21.79571533203125, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments':
+ [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nhwc'}}],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [289.01953125, 292.6146545410156],
+ 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor'
+ }
+ }
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 171.5061492919922, 164.9919891357422, 160.0518341064453,
+ 149.63897705078125, 142.6990966796875, 139.51637268066406,
+ 165.07762145996094, 161.11062622070312
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil'
+ }
+ }
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 171.5061492919922, 164.9919891357422, 90.6768569946289,
+ 160.0518341064453, 149.63897705078125, 65.15908813476562,
+ 132.56260681152344, 139.84808349609375, 26.61993408203125,
+ 142.6990966796875, 139.51637268066406, 72.42569732666016,
+ 165.07762145996094, 161.11062622070312, 96.38701629638672,
+ 150.1616668701172, 146.8201904296875, 90.64601135253906
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'l2Pool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor',
+ 'outputSizes': [3, 3]
+ }
+ }
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 171.5061492919922, 164.9919891357422, 90.6768569946289,
+ 160.0518341064453, 149.63897705078125, 65.15908813476562,
+ 132.56260681152344, 139.84808349609375, 26.61993408203125,
+ 142.6990966796875, 139.51637268066406, 72.42569732666016,
+ 165.07762145996094, 161.11062622070312, 96.38701629638672,
+ 150.1616668701172, 146.8201904296875, 90.64601135253906
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'l2Pool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.07447814941406, 76.55464172363281, 62.71847152709961,
+ 83.8726577758789, 73.10235595703125, 41.52470779418945,
+ 39.3339729309082, 86.59486389160156, 23.09039306640625,
+ 53.650146484375, 0.00902052316814661, 42.78899383544922,
+ 81.03960418701172, 33.48585510253906, 33.67196273803711,
+ 0.42822372913360596, 80.07991790771484, 5.929991722106934,
+ 48.89164733886719, 15.282920837402344, 13.335721969604492,
+ 39.06557846069336, 97.06050109863281, 83.68133544921875,
+ 21.79571533203125, 52.027313232421875, 6.397815227508545,
+ 84.54785919189453, 18.622516632080078, 34.10626220703125,
+ 73.96932220458984, 36.1437873840332, 60.73781967163086,
+ 55.09187316894531, 63.8924446105957, 59.36124038696289,
+ 50.91202926635742, 50.339813232421875, 59.31963348388672,
+ 70.78031921386719, 35.56179428100586, 82.53382873535156,
+ 7.572360038757324, 61.90089416503906, 14.084012985229492,
+ 90.86540985107422, 39.56248474121094, 67.77167510986328,
+ 69.69512176513672, 89.54518127441406
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil',
+ 'outputSizes': [2, 2]
+ }
+ }
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 171.5061492919922, 164.9919891357422, 160.0518341064453,
+ 149.63897705078125, 142.6990966796875, 139.51637268066406,
+ 165.07762145996094, 161.11062622070312
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float32 4D tensor options.dilations with options.strides',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 6.5550384521484375, 26.254413604736328, 28.47271156311035,
+ 64.81202697753906, 39.65838623046875, 10.465584754943848,
+ 47.94060134887695, 42.208946228027344, 36.834041595458984,
+ 68.50249481201172, 2.0496721267700195, 49.73927688598633,
+ 59.97947311401367, 71.08380889892578, 0.20033331215381622,
+ 19.39293670654297, 70.1269302368164, 86.8837661743164,
+ 84.28858184814453, 9.695697784423828, 62.69126510620117,
+ 51.924110412597656, 5.412675857543945, 70.82118225097656,
+ 81.61302947998047, 29.148712158203125, 85.83409881591797,
+ 71.36548614501953, 44.09445571899414, 58.343570709228516,
+ 43.37118148803711, 54.025882720947266, 85.50556945800781,
+ 93.19215393066406, 10.992993354797363, 34.864158630371094,
+ 96.2605209350586, 44.29584503173828, 61.12482833862305,
+ 79.62699127197266, 4.066447734832764, 64.89644622802734,
+ 97.5897445678711, 11.257055282592773, 61.151283264160156,
+ 20.312341690063477, 39.862640380859375, 68.747314453125,
+ 89.61034393310547, 22.28224754333496, 41.36311721801758,
+ 62.9378662109375, 79.54936218261719, 55.64254379272461,
+ 54.47548294067383, 77.04864501953125, 56.83576965332031,
+ 80.57747650146484, 70.43293762207031, 85.67094421386719,
+ 19.527807235717773, 33.87490463256836, 14.498117446899414,
+ 92.85955810546875, 96.8167724609375, 28.399721145629883,
+ 99.917236328125, 48.76692199707031, 86.08634948730469,
+ 47.32324981689453, 7.223662376403809, 82.97200775146484,
+ 38.374778747558594, 22.10988426208496, 14.797550201416016,
+ 2.3872148990631104, 83.26342010498047, 46.41500473022461,
+ 28.659175872802734, 13.919462203979492, 55.413089752197266,
+ 62.68498992919922, 78.54127502441406, 31.142845153808594,
+ 4.806727886199951, 33.233642578125, 24.749773025512695,
+ 1.529007077217102, 42.976322174072266, 93.08572387695312,
+ 77.908935546875, 45.74395751953125, 62.868892669677734,
+ 60.689762115478516, 20.046878814697266, 13.203198432922363,
+ 33.33952713012695, 0.5279953479766846
+ ],
+ 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'dilations': [1, 1],
+ 'layout': 'nhwc'
+ }
+ }
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 120.20333862304688, 114.0977783203125, 127.63969421386719,
+ 119.95613861083984, 137.89837646484375, 152.24261474609375,
+ 194.9647216796875, 168.20205688476562, 197.7173309326172,
+ 169.85887145996094, 195.1484832763672, 190.96127319335938,
+ 158.64576721191406, 166.2051544189453, 171.07916259765625,
+ 148.70985412597656, 218.7123260498047, 153.33311462402344
+ ],
+ 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+
+ // float16 tests
+ {
+ 'name': 'l2Pool2d float16 4D constant tensor all positive default options',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'},
+ 'constant': true
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [{'input': 'l2Pool2dInput'}],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [289, 292.75],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor all positive default options',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [{'input': 'l2Pool2dInput'}],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [289, 292.75],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor all negative default options',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ -1.1953125, -9.703125, -39.5625, -82.375, -32.875, -50.21875,
+ -31.171875, -55.8125, -46.71875, -38.6875, -63.3125, -35.09375,
+ -80.9375, -82.875, -40.40625, -34.875, -84.3125, -84.125,
+ -5.5234375, -99, -75.5, -91.4375, -96.6875, -16.71875,
+ -17.984375, -58.0625, -11.84375, -97.875, -38.6875, -80.1875,
+ -48.71875, -90.875, -99.125, -79.6875, -59.375, -9.96875,
+ -39.28125, -10.46875, -27.5625, -2.046875, -81.875, -66.875,
+ -86, -29.671875, -19.65625, -89.375, -61.125, -84.1875,
+ -77.375, -91.1875
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [{'input': 'l2Pool2dInput'}],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [299, 326.75],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor options.windowDimensions',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {'options': {'windowDimensions': [3, 3]}}
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 194.5, 189.625, 189.875, 160.125, 167.125, 149.625, 161.125, 190.5,
+ 168.5, 170.375, 155.625, 174.75, 165.125, 165.5, 161.125, 176.625,
+ 174.25, 180.625
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor options.padding',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}}
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [254.875, 233.125, 289, 269.75, 241.5, 213, 292.75, 253.75],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor options.strides',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 194.5, 189.875, 161.125, 168.5, 170.375, 174.75, 176.625, 180.625
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor options.dilations',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [189.5, 207.25],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor options.layout=nchw',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments':
+ [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nchw'}}],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [289, 292.75],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor options.layout=nhwc',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 52.03125, 76.5625,
+ 6.3984375, 62.71875, 84.5625,
+ 83.875, 18.625, 73.125,
+ 34.09375, 41.53125, 74,
+ 39.34375, 36.15625, 86.625,
+ 60.75, 23.09375, 55.09375,
+ 53.65625, 63.90625, 0.0090179443359375,
+ 59.375, 42.78125, 50.90625,
+ 81.0625, 50.34375, 33.5,
+ 59.3125, 33.6875, 70.75,
+ 0.42822265625, 35.5625, 80.0625,
+ 82.5625, 5.9296875, 7.57421875,
+ 48.90625, 61.90625, 15.28125,
+ 14.0859375, 13.3359375, 90.875,
+ 39.0625, 39.5625, 97.0625,
+ 67.75, 83.6875, 69.6875,
+ 21.796875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments':
+ [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nhwc'}}],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [289, 292.75],
+ 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor'
+ }
+ }
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data':
+ [171.5, 165, 160.125, 149.625, 142.75, 139.5, 165.125, 161.125],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil'
+ }
+ }
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 171.5, 165, 90.6875, 160.125, 149.625, 65.1875, 132.5, 139.875,
+ 26.625, 142.75, 139.5, 72.4375, 165.125, 161.125, 96.375, 150.125,
+ 146.875, 90.6875
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'l2Pool2d float16 4D tensor options.outputSizes ignores options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor',
+ 'outputSizes': [3, 3]
+ }
+ }
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 171.5, 165, 90.6875, 160.125, 149.625, 65.1875, 132.5, 139.875,
+ 26.625, 142.75, 139.5, 72.4375, 165.125, 161.125, 96.375, 150.125,
+ 146.875, 90.6875
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'l2Pool2d float16 4D tensor options.outputSizes ignores options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 94.0625, 76.5625, 62.71875,
+ 83.875, 73.125, 41.53125,
+ 39.34375, 86.625, 23.09375,
+ 53.65625, 0.0090179443359375, 42.78125,
+ 81.0625, 33.5, 33.6875,
+ 0.42822265625, 80.0625, 5.9296875,
+ 48.90625, 15.28125, 13.3359375,
+ 39.0625, 97.0625, 83.6875,
+ 21.796875, 52.03125, 6.3984375,
+ 84.5625, 18.625, 34.09375,
+ 74, 36.15625, 60.75,
+ 55.09375, 63.90625, 59.375,
+ 50.90625, 50.34375, 59.3125,
+ 70.75, 35.5625, 82.5625,
+ 7.57421875, 61.90625, 14.0859375,
+ 90.875, 39.5625, 67.75,
+ 69.6875, 89.5625
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil',
+ 'outputSizes': [2, 2]
+ }
+ }
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data':
+ [171.5, 165, 160.125, 149.625, 142.75, 139.5, 165.125, 161.125],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'l2Pool2d float16 4D tensor options.dilations with options.strides',
+ 'graph': {
+ 'inputs': {
+ 'l2Pool2dInput': {
+ 'data': [
+ 6.5546875, 26.25, 28.46875, 64.8125, 39.65625,
+ 10.46875, 47.9375, 42.21875, 36.84375, 68.5,
+ 2.048828125, 49.75, 59.96875, 71.0625, 0.2003173828125,
+ 19.390625, 70.125, 86.875, 84.3125, 9.6953125,
+ 62.6875, 51.9375, 5.4140625, 70.8125, 81.625,
+ 29.15625, 85.8125, 71.375, 44.09375, 58.34375,
+ 43.375, 54.03125, 85.5, 93.1875, 10.9921875,
+ 34.875, 96.25, 44.28125, 61.125, 79.625,
+ 4.06640625, 64.875, 97.5625, 11.2578125, 61.15625,
+ 20.3125, 39.875, 68.75, 89.625, 22.28125,
+ 41.375, 62.9375, 79.5625, 55.65625, 54.46875,
+ 77.0625, 56.84375, 80.5625, 70.4375, 85.6875,
+ 19.53125, 33.875, 14.5, 92.875, 96.8125,
+ 28.40625, 99.9375, 48.78125, 86.0625, 47.3125,
+ 7.22265625, 83, 38.375, 22.109375, 14.796875,
+ 2.38671875, 83.25, 46.40625, 28.65625, 13.921875,
+ 55.40625, 62.6875, 78.5625, 31.140625, 4.80859375,
+ 33.21875, 24.75, 1.529296875, 42.96875, 93.0625,
+ 77.9375, 45.75, 62.875, 60.6875, 20.046875,
+ 13.203125, 33.34375, 0.52783203125
+ ],
+ 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'l2Pool2d',
+ 'arguments': [
+ {'input': 'l2Pool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'dilations': [1, 1],
+ 'layout': 'nhwc'
+ }
+ }
+ ],
+ 'outputs': 'l2Pool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'l2Pool2dOutput': {
+ 'data': [
+ 120.1875, 114.0625, 127.625, 119.9375, 137.875, 152.25, 195, 168.25,
+ 197.75, 169.875, 195.125, 191, 158.625, 166.25, 171.125, 148.75,
+ 218.75, 153.375
+ ],
+ 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float16'}
+ }
+ }
+ }
+ }
+];
+
+if (navigator.ml) {
+ l2Pool2dTests.forEach((test) => {
+ webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test);
+ });
+} else {
+ test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
+}
diff --git a/tests/wpt/tests/webnn/conformance_tests/lesser.https.any.js b/tests/wpt/tests/webnn/conformance_tests/lesser.https.any.js
index 0588f3bcd6a..8978435c6e3 100644
--- a/tests/wpt/tests/webnn/conformance_tests/lesser.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/lesser.https.any.js
@@ -998,7 +998,8 @@ const lesserTests = [
if (navigator.ml) {
lesserTests.forEach((test) => {
webnn_conformance_test(
- buildAndExecuteGraph, getLesserPrecisionTolerance, test);
+ buildAndExecuteGraph, getLesserPrecisionTolerance, test,
+ /*cast_to_supported_type=*/true);
});
} else {
test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
diff --git a/tests/wpt/tests/webnn/conformance_tests/lesser_or_equal.https.any.js b/tests/wpt/tests/webnn/conformance_tests/lesser_or_equal.https.any.js
index cfcc74063ec..16aa5888cc2 100644
--- a/tests/wpt/tests/webnn/conformance_tests/lesser_or_equal.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/lesser_or_equal.https.any.js
@@ -1105,7 +1105,8 @@ const lesserOrEqualTests = [
if (navigator.ml) {
lesserOrEqualTests.forEach((test) => {
webnn_conformance_test(
- buildAndExecuteGraph, getLesserOrEqualPrecisionTolerance, test);
+ buildAndExecuteGraph, getLesserOrEqualPrecisionTolerance, test,
+ /*cast_to_supported_type=*/true);
});
} else {
test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
diff --git a/tests/wpt/tests/webnn/conformance_tests/logical_and.https.any.js b/tests/wpt/tests/webnn/conformance_tests/logical_and.https.any.js
index a4d71654bcb..1a03ef5444d 100644
--- a/tests/wpt/tests/webnn/conformance_tests/logical_and.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/logical_and.https.any.js
@@ -414,7 +414,9 @@ const logicalAndTests = [
if (navigator.ml) {
logicalAndTests.forEach((test) => {
- webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test);
+ webnn_conformance_test(
+ buildAndExecuteGraph, getPrecisionTolerance, test,
+ /*cast_to_supported_type=*/true);
});
} else {
test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
diff --git a/tests/wpt/tests/webnn/conformance_tests/logical_not.https.any.js b/tests/wpt/tests/webnn/conformance_tests/logical_not.https.any.js
index 9d1861dd548..f8949672cc5 100644
--- a/tests/wpt/tests/webnn/conformance_tests/logical_not.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/logical_not.https.any.js
@@ -214,7 +214,8 @@ const logicalNotTests = [
if (navigator.ml) {
logicalNotTests.forEach((test) => {
webnn_conformance_test(
- buildAndExecuteGraph, getLogicalNotPrecisionTolerance, test);
+ buildAndExecuteGraph, getLogicalNotPrecisionTolerance, test,
+ /*cast_to_supported_type=*/true);
});
} else {
test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
diff --git a/tests/wpt/tests/webnn/conformance_tests/logical_or.https.any.js b/tests/wpt/tests/webnn/conformance_tests/logical_or.https.any.js
index f8941b633c9..83c261969f6 100644
--- a/tests/wpt/tests/webnn/conformance_tests/logical_or.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/logical_or.https.any.js
@@ -414,7 +414,9 @@ const logicalOrTests = [
if (navigator.ml) {
logicalOrTests.forEach((test) => {
- webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test);
+ webnn_conformance_test(
+ buildAndExecuteGraph, getPrecisionTolerance, test,
+ /*cast_to_supported_type=*/true);
});
} else {
test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
diff --git a/tests/wpt/tests/webnn/conformance_tests/logical_xor.https.any.js b/tests/wpt/tests/webnn/conformance_tests/logical_xor.https.any.js
index 533d52aa6be..7a9446ea2e4 100644
--- a/tests/wpt/tests/webnn/conformance_tests/logical_xor.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/logical_xor.https.any.js
@@ -414,7 +414,9 @@ const logicalXorTests = [
if (navigator.ml) {
logicalXorTests.forEach((test) => {
- webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test);
+ webnn_conformance_test(
+ buildAndExecuteGraph, getPrecisionTolerance, test,
+ /*cast_to_supported_type=*/true);
});
} else {
test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
diff --git a/tests/wpt/tests/webnn/conformance_tests/maxPool2d.https.any.js b/tests/wpt/tests/webnn/conformance_tests/maxPool2d.https.any.js
new file mode 100644
index 00000000000..6ee8b1976d2
--- /dev/null
+++ b/tests/wpt/tests/webnn/conformance_tests/maxPool2d.https.any.js
@@ -0,0 +1,1216 @@
+// META: title=test WebNN API maxPool2d operation
+// META: global=window
+// META: variant=?cpu
+// META: variant=?gpu
+// META: variant=?npu
+// META: script=../resources/utils.js
+// META: timeout=long
+
+'use strict';
+
+// https://www.w3.org/TR/webnn/#api-mlgraphbuilder-pool2d
+// Compute a pooling operation across all the elements within the moving window
+// over the input tensor.
+//
+// enum MLRoundingType {
+// "floor",
+// "ceil"
+// };
+//
+// dictionary MLPool2dOptions {
+// sequence<[EnforceRange] unsigned long> windowDimensions;
+// sequence<[EnforceRange] unsigned long> padding;
+// sequence<[EnforceRange] unsigned long> strides;
+// sequence<[EnforceRange] unsigned long> dilations;
+// MLInputOperandLayout layout = "nchw";
+// MLRoundingType roundingType = "floor";
+// sequence<[EnforceRange] unsigned long> outputSizes;
+// };
+//
+// MLOperand maxPool2d(
+// MLOperand input, optional MLPool2dOptions options = {});
+
+const maxPool2dTests = [
+ // float32 tests
+ {
+ 'name': 'maxPool2d float32 4D constant tensor default options',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'},
+ 'constant': true
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [{'input': 'maxPool2dInput'}],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [99.28312683105469, 81.73119354248047],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float32 4D tensor default options',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [{'input': 'maxPool2dInput'}],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [99.28312683105469, 81.73119354248047],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float32 4D tensor options.windowDimensions',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {'options': {'windowDimensions': [3, 3]}}
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.28312683105469, 99.28312683105469, 66.09259033203125,
+ 99.28312683105469, 99.28312683105469, 72.1085205078125,
+ 97.90348052978516, 72.1085205078125, 72.1085205078125,
+ 81.73119354248047, 72.44898986816406, 72.44898986816406,
+ 81.73119354248047, 72.8883056640625, 72.44898986816406,
+ 80.30484008789062, 72.8883056640625, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float32 4D tensor options.padding',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}}
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.28312683105469, 99.28312683105469, 99.28312683105469,
+ 99.28312683105469, 81.73119354248047, 72.8883056640625,
+ 81.73119354248047, 72.8883056640625
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float32 4D tensor options.strides',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.28312683105469, 66.09259033203125, 97.90348052978516,
+ 72.1085205078125, 81.73119354248047, 72.44898986816406,
+ 80.30484008789062, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float32 4D tensor options.dilations',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [89.00830078125, 72.33577728271484],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float32 4D tensor options.layout=nchw',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments':
+ [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nchw'}}],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [99.28312683105469, 81.73119354248047],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float32 4D tensor options.layout=nhwc',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -76.72171020507812, -45.72039031982422,
+ 50.217063903808594, -61.306129455566406, -52.895477294921875,
+ -4.014514446258545, -44.642333984375, -94.54893493652344,
+ -97.86752319335938, 46.28090286254883, 81.73119354248047,
+ 99.28312683105469, 5.428491115570068, -10.057873725891113,
+ -29.22772789001465, 9.742474555969238, 72.44898986816406,
+ -39.03501892089844, -59.34124755859375, 75.08192443847656,
+ 39.19960021972656, 12.819415092468262, -65.99439239501953,
+ -33.01505661010742, -4.204323768615723, 38.691341400146484,
+ -60.54586410522461, 66.09259033203125, 55.890525817871094,
+ 97.90348052978516, 80.30484008789062, -8.737770080566406,
+ 72.8883056640625, -53.42162322998047, -46.59611129760742,
+ 72.1085205078125, 20.50387954711914, -40.423091888427734,
+ -31.126462936401367, -35.68864440917969, -57.294559478759766,
+ -87.64779663085938, -26.623577117919922, 38.874244689941406,
+ 15.935754776000977, 39.383602142333984, -78.77953338623047,
+ 7.429088115692139, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments':
+ [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nhwc'}}],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [99.28312683105469, 81.73119354248047],
+ 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float32 4D tensor options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor'
+ }
+ }
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.28312683105469, 9.742474555969238, 99.28312683105469,
+ 72.1085205078125, 81.73119354248047, 72.44898986816406,
+ 81.73119354248047, 72.44898986816406
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float32 4D tensor options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil'
+ }
+ }
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.28312683105469, 9.742474555969238, -39.03501892089844,
+ 99.28312683105469, 72.1085205078125, 66.09259033203125,
+ 97.90348052978516, 72.1085205078125, 7.429088115692139,
+ 81.73119354248047, 72.44898986816406, -59.34124755859375,
+ 81.73119354248047, 72.44898986816406, 55.890525817871094,
+ 80.30484008789062, 72.33577728271484, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor',
+ 'outputSizes': [3, 3]
+ }
+ }
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.28312683105469, 9.742474555969238, -39.03501892089844,
+ 99.28312683105469, 72.1085205078125, 66.09259033203125,
+ 97.90348052978516, 72.1085205078125, 7.429088115692139,
+ 81.73119354248047, 72.44898986816406, -59.34124755859375,
+ 81.73119354248047, 72.44898986816406, 55.890525817871094,
+ 80.30484008789062, 72.33577728271484, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89.00830078125, -45.72039031982422, -61.306129455566406,
+ -4.014514446258545, -94.54893493652344, 46.28090286254883,
+ 99.28312683105469, -10.057873725891113, 9.742474555969238,
+ -39.03501892089844, 75.08192443847656, 12.819415092468262,
+ -33.01505661010742, 38.691341400146484, 66.09259033203125,
+ 97.90348052978516, -8.737770080566406, -53.42162322998047,
+ 72.1085205078125, -40.423091888427734, -35.68864440917969,
+ -87.64779663085938, 38.874244689941406, 39.383602142333984,
+ 7.429088115692139, -76.72171020507812, 50.217063903808594,
+ -52.895477294921875, -44.642333984375, -97.86752319335938,
+ 81.73119354248047, 5.428491115570068, -29.22772789001465,
+ 72.44898986816406, -59.34124755859375, 39.19960021972656,
+ -65.99439239501953, -4.204323768615723, -60.54586410522461,
+ 55.890525817871094, 80.30484008789062, 72.8883056640625,
+ -46.59611129760742, 20.50387954711914, -31.126462936401367,
+ -57.294559478759766, -26.623577117919922, 15.935754776000977,
+ -78.77953338623047, 72.33577728271484
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil',
+ 'outputSizes': [2, 2]
+ }
+ }
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.28312683105469, 9.742474555969238, 99.28312683105469,
+ 72.1085205078125, 81.73119354248047, 72.44898986816406,
+ 81.73119354248047, 72.44898986816406
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'maxPool2d float32 4D tensor options.dilations with options.strides',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 34.69258117675781, -24.706249237060547, -60.428070068359375,
+ 35.93883514404297, 60.896095275878906, 79.42220306396484,
+ -77.85906219482422, 54.188209533691406, -21.576934814453125,
+ -49.10390853881836, 78.55176544189453, 74.28213500976562,
+ -87.92769622802734, 79.82047271728516, 11.680922508239746,
+ -12.154505729675293, -22.33293914794922, 33.084861755371094,
+ 8.640676498413086, 47.040645599365234, 95.7823486328125,
+ -88.01998138427734, -98.53630065917969, 16.158977508544922,
+ 21.396089553833008, 95.1323471069336, -40.80724334716797,
+ -88.70922088623047, -40.772769927978516, 67.89842987060547,
+ -50.337467193603516, -96.56610870361328, 12.508098602294922,
+ -6.6358113288879395, -44.80198287963867, 80.27474212646484,
+ -65.68411254882812, -14.884790420532227, -66.54857635498047,
+ 20.072338104248047, -27.954269409179688, -56.62217330932617,
+ 82.7479476928711, 93.30175018310547, -34.073394775390625,
+ -22.87164306640625, 73.25525665283203, 41.14021682739258,
+ -19.75514793395996, 80.07701110839844, -69.89276885986328,
+ 14.013250350952148, -61.36640167236328, 51.53046417236328,
+ 43.53886413574219, -89.5888671875, 51.45121765136719,
+ 73.9239730834961, -80.25264739990234, 94.72747802734375,
+ 95.25411224365234, 58.12575149536133, 19.885723114013672,
+ -70.0301284790039, 63.419517517089844, -54.11785125732422,
+ -97.22807312011719, -60.65826416015625, -31.04998016357422,
+ -14.646553039550781, -63.73688888549805, 47.34630584716797,
+ 85.56405639648438, -53.389251708984375, -70.84739685058594,
+ 47.355045318603516, 83.38397979736328, 7.361695289611816,
+ 46.85823440551758, 98.13465881347656, -43.9396858215332,
+ 50.33780288696289, 37.45563507080078, -54.52760696411133,
+ -6.212307929992676, 34.41734313964844, 11.8167724609375,
+ 72.44517517089844, 86.3460922241211, 4.14656925201416,
+ 88.33040618896484, 98.29994201660156, -66.72379302978516,
+ 58.0643424987793, -51.168277740478516, -17.768583297729492,
+ 9.961172103881836, -52.73843002319336
+ ],
+ 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'dilations': [1, 1],
+ 'layout': 'nhwc'
+ }
+ }
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 60.896095275878906, 79.42220306396484, 95.7823486328125,
+ 79.42220306396484, 78.55176544189453, 95.1323471069336,
+ 82.7479476928711, 93.30175018310547, 95.7823486328125,
+ 80.27474212646484, 43.53886413574219, 95.1323471069336,
+ 95.25411224365234, 94.72747802734375, 95.25411224365234,
+ 98.13465881347656, 63.419517517089844, 98.13465881347656
+ ],
+ 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'}
+ }
+ }
+ }
+ },
+
+ // float16 tests
+ {
+ 'name': 'maxPool2d float16 4D constant tensor default options',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'},
+ 'constant': true
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [{'input': 'maxPool2dInput'}],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [99.3125, 81.75],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float16 4D tensor default options',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [{'input': 'maxPool2dInput'}],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [99.3125, 81.75],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float16 4D tensor options.windowDimensions',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {'options': {'windowDimensions': [3, 3]}}
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.3125, 99.3125, 66.0625, 99.3125, 99.3125, 72.125, 97.875, 72.125,
+ 72.125, 81.75, 72.4375, 72.4375, 81.75, 72.875, 72.4375, 80.3125,
+ 72.875, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float16 4D tensor options.padding',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}}
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.3125, 99.3125, 99.3125, 99.3125, 81.75, 72.875, 81.75, 72.875
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float16 4D tensor options.strides',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.3125, 66.0625, 97.875, 72.125, 81.75, 72.4375, 80.3125, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float16 4D tensor options.dilations',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'},
+ {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [89, 72.3125],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float16 4D tensor options.layout=nchw',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments':
+ [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nchw'}}],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [99.3125, 81.75],
+ 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float16 4D tensor options.layout=nhwc',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -76.75, -45.71875, 50.21875, -61.3125,
+ -52.90625, -4.015625, -44.65625, -94.5625, -97.875,
+ 46.28125, 81.75, 99.3125, 5.4296875, -10.0546875,
+ -29.234375, 9.7421875, 72.4375, -39.03125, -59.34375,
+ 75.0625, 39.1875, 12.8203125, -66, -33,
+ -4.203125, 38.6875, -60.53125, 66.0625, 55.875,
+ 97.875, 80.3125, -8.734375, 72.875, -53.40625,
+ -46.59375, 72.125, 20.5, -40.4375, -31.125,
+ -35.6875, -57.28125, -87.625, -26.625, 38.875,
+ 15.9375, 39.375, -78.75, 7.4296875, 72.3125
+ ],
+ 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments':
+ [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nhwc'}}],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [99.3125, 81.75],
+ 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float16 4D tensor options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor'
+ }
+ }
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.3125, 9.7421875, 99.3125, 72.125, 81.75, 72.4375, 81.75, 72.4375
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'maxPool2d float16 4D tensor options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil'
+ }
+ }
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.3125, 9.7421875, -39.03125, 99.3125, 72.125, 66.0625, 97.875,
+ 72.125, 7.4296875, 81.75, 72.4375, -59.34375, 81.75, 72.4375,
+ 55.875, 80.3125, 72.3125, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'maxPool2d float16 4D tensor options.outputSizes ignores options.roundingType=floor',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'floor',
+ 'outputSizes': [3, 3]
+ }
+ }
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.3125, 9.7421875, -39.03125, 99.3125, 72.125, 66.0625, 97.875,
+ 72.125, 7.4296875, 81.75, 72.4375, -59.34375, 81.75, 72.4375,
+ 55.875, 80.3125, 72.3125, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'maxPool2d float16 4D tensor options.outputSizes ignores options.roundingType=ceil',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 89, -45.71875, -61.3125, -4.015625, -94.5625,
+ 46.28125, 99.3125, -10.0546875, 9.7421875, -39.03125,
+ 75.0625, 12.8203125, -33, 38.6875, 66.0625,
+ 97.875, -8.734375, -53.40625, 72.125, -40.4375,
+ -35.6875, -87.625, 38.875, 39.375, 7.4296875,
+ -76.75, 50.21875, -52.90625, -44.65625, -97.875,
+ 81.75, 5.4296875, -29.234375, 72.4375, -59.34375,
+ 39.1875, -66, -4.203125, -60.53125, 55.875,
+ 80.3125, 72.875, -46.59375, 20.5, -31.125,
+ -57.28125, -26.625, 15.9375, -78.75, 72.3125
+ ],
+ 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'roundingType': 'ceil',
+ 'outputSizes': [2, 2]
+ }
+ }
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 99.3125, 9.7421875, 99.3125, 72.125, 81.75, 72.4375, 81.75, 72.4375
+ ],
+ 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
+ }
+ }
+ }
+ },
+ {
+ 'name':
+ 'maxPool2d float16 4D tensor options.dilations with options.strides',
+ 'graph': {
+ 'inputs': {
+ 'maxPool2dInput': {
+ 'data': [
+ 34.6875, -24.703125, -60.4375, 35.9375, 60.90625,
+ 79.4375, -77.875, 54.1875, -21.578125, -49.09375,
+ 78.5625, 74.3125, -87.9375, 79.8125, 11.6796875,
+ -12.15625, -22.328125, 33.09375, 8.640625, 47.03125,
+ 95.8125, -88, -98.5625, 16.15625, 21.390625,
+ 95.125, -40.8125, -88.6875, -40.78125, 67.875,
+ -50.34375, -96.5625, 12.5078125, -6.63671875, -44.8125,
+ 80.25, -65.6875, -14.8828125, -66.5625, 20.078125,
+ -27.953125, -56.625, 82.75, 93.3125, -34.0625,
+ -22.875, 73.25, 41.125, -19.75, 80.0625,
+ -69.875, 14.015625, -61.375, 51.53125, 43.53125,
+ -89.5625, 51.4375, 73.9375, -80.25, 94.75,
+ 95.25, 58.125, 19.890625, -70, 63.40625,
+ -54.125, -97.25, -60.65625, -31.046875, -14.6484375,
+ -63.75, 47.34375, 85.5625, -53.375, -70.875,
+ 47.34375, 83.375, 7.36328125, 46.84375, 98.125,
+ -43.9375, 50.34375, 37.46875, -54.53125, -6.2109375,
+ 34.40625, 11.8203125, 72.4375, 86.375, 4.1484375,
+ 88.3125, 98.3125, -66.75, 58.0625, -51.15625,
+ -17.765625, 9.9609375, -52.75
+ ],
+ 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'maxPool2d',
+ 'arguments': [
+ {'input': 'maxPool2dInput'}, {
+ 'options': {
+ 'windowDimensions': [3, 3],
+ 'padding': [1, 0, 0, 1],
+ 'strides': [2, 2],
+ 'dilations': [1, 1],
+ 'layout': 'nhwc'
+ }
+ }
+ ],
+ 'outputs': 'maxPool2dOutput'
+ }],
+ 'expectedOutputs': {
+ 'maxPool2dOutput': {
+ 'data': [
+ 60.90625, 79.4375, 95.8125, 79.4375, 78.5625, 95.125, 82.75,
+ 93.3125, 95.8125, 80.25, 43.53125, 95.125, 95.25, 94.75, 95.25,
+ 98.125, 63.40625, 98.125
+ ],
+ 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float16'}
+ }
+ }
+ }
+ }
+];
+
+if (navigator.ml) {
+ maxPool2dTests.forEach((test) => {
+ webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test);
+ });
+} else {
+ test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
+}
diff --git a/tests/wpt/tests/webnn/conformance_tests/not_equal.https.any.js b/tests/wpt/tests/webnn/conformance_tests/not_equal.https.any.js
index 3bba726d585..5aed1247e06 100644
--- a/tests/wpt/tests/webnn/conformance_tests/not_equal.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/not_equal.https.any.js
@@ -22,6 +22,7 @@ const getNotEqualPrecisionTolerance = (graphResources) => {
};
const notEqualTests = [
+ // float32 tests
{
'name': 'notEqual float32 0D scalar',
'graph': {
@@ -524,13 +525,471 @@ const notEqualTests = [
}
}
}
+ },
+
+ // float16 tests
+ {
+ 'name': 'notEqual float16 0D scalar',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [-0.62841796875],
+ 'descriptor': {shape: [], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [-4.41796875],
+ 'descriptor': {shape: [], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {'data': [1], 'descriptor': {shape: [], dataType: 'uint8'}}
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 1D constant tensors',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [24], dataType: 'float16'},
+ 'constant': true
+ },
+ 'inputB': {
+ 'data': [
+ 2.806640625, 5.58984375, -4.83984375, 4.99609375,
+ 0.97265625, -6.171875, 2.806640625, 5.58984375,
+ 7.765625, -4.30859375, -5.89453125, -8.53125,
+ 2.806640625, 5.58984375, 0.1783447265625, -4.48046875,
+ 0.68212890625, -6.6875, 2.806640625, 5.58984375,
+ -9.0390625, -1.97265625, -3.01171875, 3.626953125
+ ],
+ 'descriptor': {shape: [24], dataType: 'float16'},
+ 'constant': true
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1,
+ 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [24], dataType: 'uint8'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 1D tensors',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [24], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [
+ 2.806640625, 5.58984375, -4.83984375, 4.99609375,
+ 0.97265625, -6.171875, 2.806640625, 5.58984375,
+ 7.765625, -4.30859375, -5.89453125, -8.53125,
+ 2.806640625, 5.58984375, 0.1783447265625, -4.48046875,
+ 0.68212890625, -6.6875, 2.806640625, 5.58984375,
+ -9.0390625, -1.97265625, -3.01171875, 3.626953125
+ ],
+ 'descriptor': {shape: [24], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1,
+ 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [24], dataType: 'uint8'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 2D tensors',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [4, 6], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [
+ 2.806640625, 5.58984375, -4.83984375, 4.99609375,
+ 0.97265625, -6.171875, 2.806640625, 5.58984375,
+ 7.765625, -4.30859375, -5.89453125, -8.53125,
+ 2.806640625, 5.58984375, 0.1783447265625, -4.48046875,
+ 0.68212890625, -6.6875, 2.806640625, 5.58984375,
+ -9.0390625, -1.97265625, -3.01171875, 3.626953125
+ ],
+ 'descriptor': {shape: [4, 6], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1,
+ 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [4, 6], dataType: 'uint8'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 3D tensors',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [2, 3, 4], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [
+ 2.806640625, 5.58984375, -4.83984375, 4.99609375,
+ 0.97265625, -6.171875, 2.806640625, 5.58984375,
+ 7.765625, -4.30859375, -5.89453125, -8.53125,
+ 2.806640625, 5.58984375, 0.1783447265625, -4.48046875,
+ 0.68212890625, -6.6875, 2.806640625, 5.58984375,
+ -9.0390625, -1.97265625, -3.01171875, 3.626953125
+ ],
+ 'descriptor': {shape: [2, 3, 4], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1,
+ 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [2, 3, 4], dataType: 'uint8'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 4D tensors',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [
+ 2.806640625, 5.58984375, -4.83984375, 4.99609375,
+ 0.97265625, -6.171875, 2.806640625, 5.58984375,
+ 7.765625, -4.30859375, -5.89453125, -8.53125,
+ 2.806640625, 5.58984375, 0.1783447265625, -4.48046875,
+ 0.68212890625, -6.6875, 2.806640625, 5.58984375,
+ -9.0390625, -1.97265625, -3.01171875, 3.626953125
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1,
+ 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 5D tensors',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [2, 2, 1, 2, 3], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [
+ 2.806640625, 5.58984375, -4.83984375, 4.99609375,
+ 0.97265625, -6.171875, 2.806640625, 5.58984375,
+ 7.765625, -4.30859375, -5.89453125, -8.53125,
+ 2.806640625, 5.58984375, 0.1783447265625, -4.48046875,
+ 0.68212890625, -6.6875, 2.806640625, 5.58984375,
+ -9.0390625, -1.97265625, -3.01171875, 3.626953125
+ ],
+ 'descriptor': {shape: [2, 2, 1, 2, 3], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1,
+ 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [2, 2, 1, 2, 3], dataType: 'uint8'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 broadcast 0D to 4D',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [2.806640625],
+ 'descriptor': {shape: [], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 broadcast 1D to 4D',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [2.806640625],
+ 'descriptor': {shape: [1], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 broadcast 2D to 4D',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [
+ 2.806640625, 5.58984375, -4.9609375, -2.86328125, -3.01171875,
+ 3.626953125
+ ],
+ 'descriptor': {shape: [2, 3], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,
+ 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 broadcast 3D to 4D',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [2.806640625, 5.58984375, -9.0390625, 3.626953125],
+ 'descriptor': {shape: [2, 2, 1], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'notEqual float16 broadcast 4D to 4D',
+ 'graph': {
+ 'inputs': {
+ 'inputA': {
+ 'data': [2.806640625],
+ 'descriptor': {shape: [1, 1, 1, 1], dataType: 'float16'}
+ },
+ 'inputB': {
+ 'data': [
+ 2.806640625, 5.58984375, 2.85546875, 4.99609375, 0.97265625,
+ -4.7421875, 2.806640625, 5.58984375, -5.109375, 6.625,
+ -2.3203125, -7.0546875, 2.806640625, 5.58984375, 4.98046875,
+ -5.44140625, 1.1455078125, 7.7734375, 2.806640625, 5.58984375,
+ -6.24609375, -2.849609375, -2.6953125, 5.81640625
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'float16'}
+ }
+ },
+ 'operators': [{
+ 'name': 'notEqual',
+ 'arguments': [{'a': 'inputA'}, {'b': 'inputB'}],
+ 'outputs': 'output'
+ }],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1
+ ],
+ 'descriptor': {shape: [2, 2, 2, 3], dataType: 'uint8'}
+ }
+ }
+ }
}
];
if (navigator.ml) {
notEqualTests.forEach((test) => {
webnn_conformance_test(
- buildAndExecuteGraph, getNotEqualPrecisionTolerance, test);
+ buildAndExecuteGraph, getNotEqualPrecisionTolerance, test,
+ /*cast_to_supported_type=*/true);
});
} else {
test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
diff --git a/tests/wpt/tests/webnn/conformance_tests/pooling.https.any.js b/tests/wpt/tests/webnn/conformance_tests/pooling.https.any.js
deleted file mode 100644
index 8f81ff565d2..00000000000
--- a/tests/wpt/tests/webnn/conformance_tests/pooling.https.any.js
+++ /dev/null
@@ -1,2312 +0,0 @@
-// META: title=test WebNN API pooling operations
-// META: global=window
-// META: variant=?cpu
-// META: variant=?gpu
-// META: variant=?npu
-// META: script=../resources/utils.js
-// META: timeout=long
-
-'use strict';
-
-// https://www.w3.org/TR/webnn/#api-mlgraphbuilder-pool2d
-// Compute a pooling operation across all the elements within the moving window
-// over the input tensor.
-//
-// enum MLRoundingType {
-// "floor",
-// "ceil"
-// };
-//
-// dictionary MLPool2dOptions {
-// sequence<[EnforceRange] unsigned long> windowDimensions;
-// sequence<[EnforceRange] unsigned long> padding;
-// sequence<[EnforceRange] unsigned long> strides;
-// sequence<[EnforceRange] unsigned long> dilations;
-// MLInputOperandLayout layout = "nchw";
-// MLRoundingType roundingType = "floor";
-// sequence<[EnforceRange] unsigned long> outputSizes;
-// };
-//
-// MLOperand averagePool2d(
-// MLOperand input, optional MLPool2dOptions options = {});
-// MLOperand l2Pool2d(
-// MLOperand input, optional MLPool2dOptions options = {});
-// MLOperand maxPool2d(
-// MLOperand input, optional MLPool2dOptions options = {});
-
-const poolingOperatorsTests = [
- // averagePool2d tests
- {
- 'name':
- 'averagePool2d float32 4D constant tensor all positive default options',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'},
- 'constant': true
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [{'input': 'averagePool2dInput'}],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [47.26926803588867, 44.72445297241211],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'averagePool2d float32 4D tensor all positive default options',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [{'input': 'averagePool2dInput'}],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [47.26926803588867, 44.72445297241211],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'averagePool2d float32 4D tensor all negative default options',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- -83.87757873535156, -2.0740277767181396, -7.561108589172363,
- -45.274261474609375, -16.36655616760254, -44.908512115478516,
- -42.04186248779297, -44.77231979370117, -1.5066279172897339,
- -52.65203857421875, -92.01856231689453, -48.004093170166016,
- -61.522972106933594, -93.44403839111328, -25.780330657958984,
- -95.51873779296875, -10.963757514953613, -59.132747650146484,
- -32.60173797607422, -21.4510440826416, -87.115966796875,
- -61.326114654541016, -41.989723205566406, -87.8764877319336,
- -71.69316101074219, -80.24160766601562, -97.48886108398438,
- -75.89422607421875, -45.08991622924805, -88.27134704589844,
- -90.71282958984375, -93.32392120361328, -59.14753341674805,
- -45.33106231689453, -51.32562255859375, -31.154796600341797,
- -31.62424087524414, -62.80168151855469, -63.558509826660156,
- -68.96183013916016, -43.09415054321289, -15.803443908691406,
- -64.31092071533203, -66.45872497558594, -42.027252197265625,
- -26.032955169677734, -22.73752784729004, -70.32036590576172,
- -85.28227996826172, -92.10668182373047
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [{'input': 'averagePool2dInput'}],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [-49.258975982666016, -60.52408981323242],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'averagePool2d float32 4D tensor options.windowDimensions',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'},
- {'options': {'windowDimensions': [3, 3]}}
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 43.46498107910156, 49.37273406982422, 42.7481689453125,
- 50.038944244384766, 52.452327728271484, 58.46046447753906,
- 32.15948486328125, 34.75465393066406, 54.00202560424805,
- 49.65404510498047, 41.824440002441406, 35.84912109375,
- 43.23125457763672, 37.842769622802734, 32.67961120605469,
- 41.17021942138672, 42.79708480834961, 38.987247467041016
- ],
- 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'global averagePool2d float32 4D tensor all positive options.windowDimensions',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'},
- {'options': {'windowDimensions': [5, 5]}}
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [47.26926803588867, 44.72445297241211],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'averagePool2d float32 4D tensor options.padding',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'},
- {'options': {'padding': [1, 0, 0, 1]}}
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 52.43666076660156, 49.84208297729492, 47.26926803588867,
- 46.15715408325195, 46.63268280029297, 43.616947174072266,
- 44.72445297241211, 44.05451583862305
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'averagePool2d float32 4D tensor options.strides',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'},
- {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 43.46498107910156, 42.7481689453125, 32.15948486328125,
- 54.00202560424805, 49.65404510498047, 35.84912109375,
- 41.17021942138672, 38.987247467041016
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'averagePool2d float32 4D tensor options.dilations',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'},
- {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [32.2001838684082, 42.971012115478516],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'averagePool2d float32 4D tensor options.layout=nchw',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments':
- [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nchw'}}],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [47.26926803588867, 44.72445297241211],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'averagePool2d float32 4D tensor options.layout=nhwc',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 91.59549713134766, 78.15438079833984,
- 65.64701080322266, 9.686111450195312, 55.14215087890625,
- 51.298038482666016, 18.432437896728516, 32.193084716796875,
- 49.34624099731445, 87.65037536621094, 15.648024559020996,
- 87.25082397460938, 68.02723693847656, 39.49794006347656,
- 20.342548370361328, 80.0996322631836, 26.727949142456055,
- 10.220142364501953, 64.87446594238281, 52.602699279785156,
- 46.5671501159668, 1.4128639698028564, 79.57833099365234,
- 11.95406436920166, 4.33846378326416, 85.00074768066406,
- 38.183837890625, 64.78374481201172, 45.25398254394531,
- 88.03128814697266, 80.9718017578125, 11.333850860595703,
- 67.58124542236328, 70.61659240722656, 6.0264997482299805,
- 84.90442657470703, 29.7788143157959, 79.06687927246094,
- 58.58993148803711, 7.3287248611450195, 2.2384984493255615,
- 35.97796630859375, 14.50549030303955, 10.177306175231934,
- 68.72449493408203, 1.4140757322311401, 76.45657348632812,
- 78.10037994384766, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments':
- [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nhwc'}}],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [47.26926803588867, 44.72445297241211],
- 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'global averagePool2d float32 4D tensor options.layout=nhwc and options.windowDimensions',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 91.59549713134766, 78.15438079833984,
- 65.64701080322266, 9.686111450195312, 55.14215087890625,
- 51.298038482666016, 18.432437896728516, 32.193084716796875,
- 49.34624099731445, 87.65037536621094, 15.648024559020996,
- 87.25082397460938, 68.02723693847656, 39.49794006347656,
- 20.342548370361328, 80.0996322631836, 26.727949142456055,
- 10.220142364501953, 64.87446594238281, 52.602699279785156,
- 46.5671501159668, 1.4128639698028564, 79.57833099365234,
- 11.95406436920166, 4.33846378326416, 85.00074768066406,
- 38.183837890625, 64.78374481201172, 45.25398254394531,
- 88.03128814697266, 80.9718017578125, 11.333850860595703,
- 67.58124542236328, 70.61659240722656, 6.0264997482299805,
- 84.90442657470703, 29.7788143157959, 79.06687927246094,
- 58.58993148803711, 7.3287248611450195, 2.2384984493255615,
- 35.97796630859375, 14.50549030303955, 10.177306175231934,
- 68.72449493408203, 1.4140757322311401, 76.45657348632812,
- 78.10037994384766, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'},
- {'options': {'windowDimensions': [5, 5], 'layout': 'nhwc'}}
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [47.26926803588867, 44.72445297241211],
- 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'averagePool2d float32 4D tensor options.roundingType=floor',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'floor'
- }
- }
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 54.20252990722656, 37.16582489013672, 50.038944244384766,
- 58.46046447753906, 52.73374557495117, 39.1442985534668,
- 43.23125457763672, 32.67961120605469
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'averagePool2d float32 4D tensor options.roundingType=ceil',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'ceil'
- }
- }
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 54.20252990722656, 37.16582489013672, 21.206613540649414,
- 50.038944244384766, 58.46046447753906, 51.3569221496582,
- 37.24428939819336, 54.04661178588867, 78.58363342285156,
- 52.73374557495117, 39.1442985534668, 57.1103515625,
- 43.23125457763672, 32.67961120605469, 56.23945999145508,
- 40.00800323486328, 43.85149002075195, 41.061283111572266
- ],
- 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'averagePool2d float32 4D tensor options.roundingType=ceil and no padding',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656
- ],
- 'descriptor': {shape: [1, 2, 4, 4], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'strides': [2, 2],
- 'roundingType': 'ceil'
- }
- }
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 51.20364761352539, 40.29140853881836, 50.77684020996094,
- 51.70764923095703, 50.63130187988281, 49.3919792175293,
- 53.128265380859375, 51.11610412597656
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'averagePool2d float32 4D tensor options.layout=nhwc and options.roundingType=floor',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 91.59549713134766, 78.15438079833984,
- 65.64701080322266, 9.686111450195312, 55.14215087890625,
- 51.298038482666016, 18.432437896728516, 32.193084716796875,
- 49.34624099731445, 87.65037536621094, 15.648024559020996,
- 87.25082397460938, 68.02723693847656, 39.49794006347656,
- 20.342548370361328, 80.0996322631836, 26.727949142456055,
- 10.220142364501953, 64.87446594238281, 52.602699279785156,
- 46.5671501159668, 1.4128639698028564, 79.57833099365234,
- 11.95406436920166, 4.33846378326416, 85.00074768066406,
- 38.183837890625, 64.78374481201172, 45.25398254394531,
- 88.03128814697266, 80.9718017578125, 11.333850860595703,
- 67.58124542236328, 70.61659240722656, 6.0264997482299805,
- 84.90442657470703, 29.7788143157959, 79.06687927246094,
- 58.58993148803711, 7.3287248611450195, 2.2384984493255615,
- 35.97796630859375, 14.50549030303955, 10.177306175231934,
- 68.72449493408203, 1.4140757322311401, 76.45657348632812,
- 78.10037994384766, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'layout': 'nhwc',
- 'roundingType': 'floor'
- }
- }
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 54.20252990722656, 52.73374557495117, 37.16582489013672,
- 39.1442985534668, 50.038944244384766, 43.23125457763672,
- 58.46046447753906, 32.67961120605469
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'averagePool2d float32 4D tensor options.layout=nhwc and options.roundingType=ceil',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 91.59549713134766, 78.15438079833984,
- 65.64701080322266, 9.686111450195312, 55.14215087890625,
- 51.298038482666016, 18.432437896728516, 32.193084716796875,
- 49.34624099731445, 87.65037536621094, 15.648024559020996,
- 87.25082397460938, 68.02723693847656, 39.49794006347656,
- 20.342548370361328, 80.0996322631836, 26.727949142456055,
- 10.220142364501953, 64.87446594238281, 52.602699279785156,
- 46.5671501159668, 1.4128639698028564, 79.57833099365234,
- 11.95406436920166, 4.33846378326416, 85.00074768066406,
- 38.183837890625, 64.78374481201172, 45.25398254394531,
- 88.03128814697266, 80.9718017578125, 11.333850860595703,
- 67.58124542236328, 70.61659240722656, 6.0264997482299805,
- 84.90442657470703, 29.7788143157959, 79.06687927246094,
- 58.58993148803711, 7.3287248611450195, 2.2384984493255615,
- 35.97796630859375, 14.50549030303955, 10.177306175231934,
- 68.72449493408203, 1.4140757322311401, 76.45657348632812,
- 78.10037994384766, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'layout': 'nhwc',
- 'roundingType': 'ceil'
- }
- }
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 54.20252990722656, 52.73374557495117, 37.16582489013672,
- 39.1442985534668, 21.206613540649414, 57.1103515625,
- 50.038944244384766, 43.23125457763672, 58.46046447753906,
- 32.67961120605469, 51.3569221496582, 56.23945999145508,
- 37.24428939819336, 40.00800323486328, 54.04661178588867,
- 43.85149002075195, 78.58363342285156, 41.061283111572266
- ],
- 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'floor',
- 'outputSizes': [3, 3]
- }
- }
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 54.20252990722656, 37.16582489013672, 21.206613540649414,
- 50.038944244384766, 58.46046447753906, 51.3569221496582,
- 37.24428939819336, 54.04661178588867, 78.58363342285156,
- 52.73374557495117, 39.1442985534668, 57.1103515625,
- 43.23125457763672, 32.67961120605469, 56.23945999145508,
- 40.00800323486328, 43.85149002075195, 41.061283111572266
- ],
- 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 22.975555419921875, 78.15438079833984, 9.686111450195312,
- 51.298038482666016, 32.193084716796875, 87.65037536621094,
- 87.25082397460938, 39.49794006347656, 80.0996322631836,
- 10.220142364501953, 52.602699279785156, 1.4128639698028564,
- 11.95406436920166, 85.00074768066406, 64.78374481201172,
- 88.03128814697266, 11.333850860595703, 70.61659240722656,
- 84.90442657470703, 79.06687927246094, 7.3287248611450195,
- 35.97796630859375, 10.177306175231934, 1.4140757322311401,
- 78.10037994384766, 91.59549713134766, 65.64701080322266,
- 55.14215087890625, 18.432437896728516, 49.34624099731445,
- 15.648024559020996, 68.02723693847656, 20.342548370361328,
- 26.727949142456055, 64.87446594238281, 46.5671501159668,
- 79.57833099365234, 4.33846378326416, 38.183837890625,
- 45.25398254394531, 80.9718017578125, 67.58124542236328,
- 6.0264997482299805, 29.7788143157959, 58.58993148803711,
- 2.2384984493255615, 14.50549030303955, 68.72449493408203,
- 76.45657348632812, 23.53263282775879
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'ceil',
- 'outputSizes': [2, 2]
- }
- }
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 54.20252990722656, 37.16582489013672, 50.038944244384766,
- 58.46046447753906, 52.73374557495117, 39.1442985534668,
- 43.23125457763672, 32.67961120605469
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'averagePool2d float32 4D tensor options.dilations with options.strides',
- 'graph': {
- 'inputs': {
- 'averagePool2dInput': {
- 'data': [
- 70.71148681640625, 99.33489990234375, 76.41767883300781,
- 39.40980911254883, 38.16328811645508, 45.971256256103516,
- 65.3527603149414, 64.51607513427734, 7.725966930389404,
- 41.7672004699707, 94.92633819580078, 53.475772857666016,
- 95.46460723876953, 58.461795806884766, 15.831390380859375,
- 78.41020202636719, 24.454092025756836, 20.630916595458984,
- 32.06352233886719, 47.85192108154297, 91.60813903808594,
- 72.3534927368164, 74.69429779052734, 28.860214233398438,
- 71.82395935058594, 7.989691734313965, 88.16659545898438,
- 58.69850540161133, 63.6061897277832, 55.88187789916992,
- 52.809974670410156, 72.91474151611328, 46.957664489746094,
- 22.10279655456543, 87.14309692382812, 89.6496810913086,
- 63.19610595703125, 11.760882377624512, 70.68730926513672,
- 57.70444107055664, 1.183821439743042, 25.26912498474121,
- 95.29122924804688, 1.9658530950546265, 53.368465423583984,
- 21.400854110717773, 55.86185836791992, 27.824508666992188,
- 7.642839431762695, 82.34233093261719, 91.75215911865234,
- 62.79155731201172, 28.11526107788086, 28.72478675842285,
- 29.887035369873047, 66.4310302734375, 7.0103044509887695,
- 34.33702087402344, 73.20159912109375, 7.8835601806640625,
- 17.82563591003418, 33.799156188964844, 65.01251220703125,
- 30.264028549194336, 75.76551818847656, 21.150800704956055,
- 60.84249496459961, 98.56522369384766, 62.60990905761719,
- 42.42991256713867, 53.142147064208984, 36.29545974731445,
- 79.95863342285156, 79.60734558105469, 16.059114456176758,
- 19.27552032470703, 53.93022918701172, 48.41620635986328,
- 93.00965118408203, 62.086524963378906, 83.50532531738281,
- 61.07964324951172, 75.51439666748047, 54.193782806396484,
- 2.572873830795288, 59.47652053833008, 34.22541427612305,
- 13.07015323638916, 12.419061660766602, 55.82337188720703,
- 4.553813934326172, 63.47830581665039, 62.3555908203125,
- 56.961090087890625, 34.77016067504883, 0.9611223936080933,
- 35.30686950683594, 98.00790405273438
- ],
- 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'averagePool2d',
- 'arguments': [
- {'input': 'averagePool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'layout': 'nhwc'
- }
- }
- ],
- 'outputs': 'averagePool2dOutput'
- }],
- 'expectedOutputs': {
- 'averagePool2dOutput': {
- 'data': [
- 42.940242767333984, 55.268165588378906, 51.6013298034668,
- 50.220027923583984, 72.13362884521484, 41.542198181152344,
- 48.91604232788086, 38.775962829589844, 61.21329879760742,
- 49.504154205322266, 57.72294998168945, 38.6922492980957,
- 50.19099807739258, 29.15436363220215, 52.98439025878906,
- 43.10562515258789, 66.77796936035156, 55.2725830078125
- ],
- 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'}
- }
- }
- }
- },
-
- // l2Pool2d tests
- {
- 'name': 'l2Pool2d float32 4D constant tensor all positive default options',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'},
- 'constant': true
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [{'input': 'l2Pool2dInput'}],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [289.01953125, 292.6146545410156],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor default all positive options',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [{'input': 'l2Pool2dInput'}],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [289.01953125, 292.6146545410156],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor default all negative options',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- -1.1957088708877563, -9.706199645996094, -39.54935836791992,
- -82.34971618652344, -32.87415313720703, -50.22603225708008,
- -31.17849349975586, -55.817893981933594, -46.70829391479492,
- -38.68181228637695, -63.299320220947266, -35.09224319458008,
- -80.93848419189453, -82.8619613647461, -40.41627502441406,
- -34.86458206176758, -84.33639526367188, -84.11852264404297,
- -5.525088787078857, -99.03114318847656, -75.505126953125,
- -91.43389129638672, -96.71258544921875, -16.722585678100586,
- -17.98292350769043, -58.06570816040039, -11.846800804138184,
- -97.90313720703125, -38.69822692871094, -80.19510650634766,
- -48.72047805786133, -90.86722564697266, -99.10758209228516,
- -79.70288848876953, -59.3824462890625, -9.967330932617188,
- -39.27534866333008, -10.469644546508789, -27.565326690673828,
- -2.0468990802764893, -81.88761901855469, -66.88040161132812,
- -85.98504638671875, -29.674592971801758, -19.649417877197266,
- -89.39192199707031, -61.13504409790039, -84.16869354248047,
- -77.36112213134766, -91.17266082763672
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [{'input': 'l2Pool2dInput'}],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [298.928955078125, 326.83587646484375],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor options.windowDimensions',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [
- {'input': 'l2Pool2dInput'}, {'options': {'windowDimensions': [3, 3]}}
- ],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [
- 194.45481872558594, 189.54539489746094, 189.85488891601562,
- 160.0518341064453, 167.1435546875, 149.63897705078125,
- 161.15570068359375, 190.5449981689453, 168.4636688232422,
- 170.331787109375, 155.60073852539062, 174.72145080566406,
- 165.07762145996094, 165.45819091796875, 161.11062622070312,
- 176.6307373046875, 174.245361328125, 180.60714721679688
- ],
- 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor options.padding',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [
- {'input': 'l2Pool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}}
- ],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [
- 254.81358337402344, 233.14259338378906, 289.01953125,
- 269.777587890625, 241.52200317382812, 212.99337768554688,
- 292.6146545410156, 253.77178955078125
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor options.strides',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [
- {'input': 'l2Pool2dInput'},
- {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
- ],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [
- 194.45481872558594, 189.85488891601562, 161.15570068359375,
- 168.4636688232422, 170.331787109375, 174.72145080566406,
- 176.6307373046875, 180.60714721679688
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor options.dilations',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [
- {'input': 'l2Pool2dInput'},
- {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
- ],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [189.47933959960938, 207.25343322753906],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor options.layout=nchw',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments':
- [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nchw'}}],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [289.01953125, 292.6146545410156],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor options.layout=nhwc',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 52.027313232421875, 76.55464172363281,
- 6.397815227508545, 62.71847152709961, 84.54785919189453,
- 83.8726577758789, 18.622516632080078, 73.10235595703125,
- 34.10626220703125, 41.52470779418945, 73.96932220458984,
- 39.3339729309082, 36.1437873840332, 86.59486389160156,
- 60.73781967163086, 23.09039306640625, 55.09187316894531,
- 53.650146484375, 63.8924446105957, 0.00902052316814661,
- 59.36124038696289, 42.78899383544922, 50.91202926635742,
- 81.03960418701172, 50.339813232421875, 33.48585510253906,
- 59.31963348388672, 33.67196273803711, 70.78031921386719,
- 0.42822372913360596, 35.56179428100586, 80.07991790771484,
- 82.53382873535156, 5.929991722106934, 7.572360038757324,
- 48.89164733886719, 61.90089416503906, 15.282920837402344,
- 14.084012985229492, 13.335721969604492, 90.86540985107422,
- 39.06557846069336, 39.56248474121094, 97.06050109863281,
- 67.77167510986328, 83.68133544921875, 69.69512176513672,
- 21.79571533203125, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments':
- [{'input': 'l2Pool2dInput'}, {'options': {'layout': 'nhwc'}}],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [289.01953125, 292.6146545410156],
- 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor options.roundingType=floor',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [
- {'input': 'l2Pool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'floor'
- }
- }
- ],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [
- 171.5061492919922, 164.9919891357422, 160.0518341064453,
- 149.63897705078125, 142.6990966796875, 139.51637268066406,
- 165.07762145996094, 161.11062622070312
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor options.roundingType=ceil',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [
- {'input': 'l2Pool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'ceil'
- }
- }
- ],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [
- 171.5061492919922, 164.9919891357422, 90.6768569946289,
- 160.0518341064453, 149.63897705078125, 65.15908813476562,
- 132.56260681152344, 139.84808349609375, 26.61993408203125,
- 142.6990966796875, 139.51637268066406, 72.42569732666016,
- 165.07762145996094, 161.11062622070312, 96.38701629638672,
- 150.1616668701172, 146.8201904296875, 90.64601135253906
- ],
- 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'l2Pool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [
- {'input': 'l2Pool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'floor',
- 'outputSizes': [3, 3]
- }
- }
- ],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [
- 171.5061492919922, 164.9919891357422, 90.6768569946289,
- 160.0518341064453, 149.63897705078125, 65.15908813476562,
- 132.56260681152344, 139.84808349609375, 26.61993408203125,
- 142.6990966796875, 139.51637268066406, 72.42569732666016,
- 165.07762145996094, 161.11062622070312, 96.38701629638672,
- 150.1616668701172, 146.8201904296875, 90.64601135253906
- ],
- 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'l2Pool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 94.07447814941406, 76.55464172363281, 62.71847152709961,
- 83.8726577758789, 73.10235595703125, 41.52470779418945,
- 39.3339729309082, 86.59486389160156, 23.09039306640625,
- 53.650146484375, 0.00902052316814661, 42.78899383544922,
- 81.03960418701172, 33.48585510253906, 33.67196273803711,
- 0.42822372913360596, 80.07991790771484, 5.929991722106934,
- 48.89164733886719, 15.282920837402344, 13.335721969604492,
- 39.06557846069336, 97.06050109863281, 83.68133544921875,
- 21.79571533203125, 52.027313232421875, 6.397815227508545,
- 84.54785919189453, 18.622516632080078, 34.10626220703125,
- 73.96932220458984, 36.1437873840332, 60.73781967163086,
- 55.09187316894531, 63.8924446105957, 59.36124038696289,
- 50.91202926635742, 50.339813232421875, 59.31963348388672,
- 70.78031921386719, 35.56179428100586, 82.53382873535156,
- 7.572360038757324, 61.90089416503906, 14.084012985229492,
- 90.86540985107422, 39.56248474121094, 67.77167510986328,
- 69.69512176513672, 89.54518127441406
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [
- {'input': 'l2Pool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'ceil',
- 'outputSizes': [2, 2]
- }
- }
- ],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [
- 171.5061492919922, 164.9919891357422, 160.0518341064453,
- 149.63897705078125, 142.6990966796875, 139.51637268066406,
- 165.07762145996094, 161.11062622070312
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'l2Pool2d float32 4D tensor options.dilations with options.strides',
- 'graph': {
- 'inputs': {
- 'l2Pool2dInput': {
- 'data': [
- 6.5550384521484375, 26.254413604736328, 28.47271156311035,
- 64.81202697753906, 39.65838623046875, 10.465584754943848,
- 47.94060134887695, 42.208946228027344, 36.834041595458984,
- 68.50249481201172, 2.0496721267700195, 49.73927688598633,
- 59.97947311401367, 71.08380889892578, 0.20033331215381622,
- 19.39293670654297, 70.1269302368164, 86.8837661743164,
- 84.28858184814453, 9.695697784423828, 62.69126510620117,
- 51.924110412597656, 5.412675857543945, 70.82118225097656,
- 81.61302947998047, 29.148712158203125, 85.83409881591797,
- 71.36548614501953, 44.09445571899414, 58.343570709228516,
- 43.37118148803711, 54.025882720947266, 85.50556945800781,
- 93.19215393066406, 10.992993354797363, 34.864158630371094,
- 96.2605209350586, 44.29584503173828, 61.12482833862305,
- 79.62699127197266, 4.066447734832764, 64.89644622802734,
- 97.5897445678711, 11.257055282592773, 61.151283264160156,
- 20.312341690063477, 39.862640380859375, 68.747314453125,
- 89.61034393310547, 22.28224754333496, 41.36311721801758,
- 62.9378662109375, 79.54936218261719, 55.64254379272461,
- 54.47548294067383, 77.04864501953125, 56.83576965332031,
- 80.57747650146484, 70.43293762207031, 85.67094421386719,
- 19.527807235717773, 33.87490463256836, 14.498117446899414,
- 92.85955810546875, 96.8167724609375, 28.399721145629883,
- 99.917236328125, 48.76692199707031, 86.08634948730469,
- 47.32324981689453, 7.223662376403809, 82.97200775146484,
- 38.374778747558594, 22.10988426208496, 14.797550201416016,
- 2.3872148990631104, 83.26342010498047, 46.41500473022461,
- 28.659175872802734, 13.919462203979492, 55.413089752197266,
- 62.68498992919922, 78.54127502441406, 31.142845153808594,
- 4.806727886199951, 33.233642578125, 24.749773025512695,
- 1.529007077217102, 42.976322174072266, 93.08572387695312,
- 77.908935546875, 45.74395751953125, 62.868892669677734,
- 60.689762115478516, 20.046878814697266, 13.203198432922363,
- 33.33952713012695, 0.5279953479766846
- ],
- 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'l2Pool2d',
- 'arguments': [
- {'input': 'l2Pool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'dilations': [1, 1],
- 'layout': 'nhwc'
- }
- }
- ],
- 'outputs': 'l2Pool2dOutput'
- }],
- 'expectedOutputs': {
- 'l2Pool2dOutput': {
- 'data': [
- 120.20333862304688, 114.0977783203125, 127.63969421386719,
- 119.95613861083984, 137.89837646484375, 152.24261474609375,
- 194.9647216796875, 168.20205688476562, 197.7173309326172,
- 169.85887145996094, 195.1484832763672, 190.96127319335938,
- 158.64576721191406, 166.2051544189453, 171.07916259765625,
- 148.70985412597656, 218.7123260498047, 153.33311462402344
- ],
- 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'}
- }
- }
- }
- },
-
- // maxPool2d tests
- {
- 'name': 'maxPool2d float32 4D constant tensor default options',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'},
- 'constant': true
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [{'input': 'maxPool2dInput'}],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [99.28312683105469, 81.73119354248047],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'maxPool2d float32 4D tensor default options',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [{'input': 'maxPool2dInput'}],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [99.28312683105469, 81.73119354248047],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'maxPool2d float32 4D tensor options.windowDimensions',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [
- {'input': 'maxPool2dInput'}, {'options': {'windowDimensions': [3, 3]}}
- ],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [
- 99.28312683105469, 99.28312683105469, 66.09259033203125,
- 99.28312683105469, 99.28312683105469, 72.1085205078125,
- 97.90348052978516, 72.1085205078125, 72.1085205078125,
- 81.73119354248047, 72.44898986816406, 72.44898986816406,
- 81.73119354248047, 72.8883056640625, 72.44898986816406,
- 80.30484008789062, 72.8883056640625, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'maxPool2d float32 4D tensor options.padding',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [
- {'input': 'maxPool2dInput'}, {'options': {'padding': [1, 0, 0, 1]}}
- ],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [
- 99.28312683105469, 99.28312683105469, 99.28312683105469,
- 99.28312683105469, 81.73119354248047, 72.8883056640625,
- 81.73119354248047, 72.8883056640625
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'maxPool2d float32 4D tensor options.strides',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [
- {'input': 'maxPool2dInput'},
- {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
- ],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [
- 99.28312683105469, 66.09259033203125, 97.90348052978516,
- 72.1085205078125, 81.73119354248047, 72.44898986816406,
- 80.30484008789062, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'maxPool2d float32 4D tensor options.dilations',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [
- {'input': 'maxPool2dInput'},
- {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
- ],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [89.00830078125, 72.33577728271484],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'maxPool2d float32 4D tensor options.layout=nchw',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments':
- [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nchw'}}],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [99.28312683105469, 81.73119354248047],
- 'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'maxPool2d float32 4D tensor options.layout=nhwc',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -76.72171020507812, -45.72039031982422,
- 50.217063903808594, -61.306129455566406, -52.895477294921875,
- -4.014514446258545, -44.642333984375, -94.54893493652344,
- -97.86752319335938, 46.28090286254883, 81.73119354248047,
- 99.28312683105469, 5.428491115570068, -10.057873725891113,
- -29.22772789001465, 9.742474555969238, 72.44898986816406,
- -39.03501892089844, -59.34124755859375, 75.08192443847656,
- 39.19960021972656, 12.819415092468262, -65.99439239501953,
- -33.01505661010742, -4.204323768615723, 38.691341400146484,
- -60.54586410522461, 66.09259033203125, 55.890525817871094,
- 97.90348052978516, 80.30484008789062, -8.737770080566406,
- 72.8883056640625, -53.42162322998047, -46.59611129760742,
- 72.1085205078125, 20.50387954711914, -40.423091888427734,
- -31.126462936401367, -35.68864440917969, -57.294559478759766,
- -87.64779663085938, -26.623577117919922, 38.874244689941406,
- 15.935754776000977, 39.383602142333984, -78.77953338623047,
- 7.429088115692139, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments':
- [{'input': 'maxPool2dInput'}, {'options': {'layout': 'nhwc'}}],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [99.28312683105469, 81.73119354248047],
- 'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'maxPool2d float32 4D tensor options.roundingType=floor',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [
- {'input': 'maxPool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'floor'
- }
- }
- ],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [
- 99.28312683105469, 9.742474555969238, 99.28312683105469,
- 72.1085205078125, 81.73119354248047, 72.44898986816406,
- 81.73119354248047, 72.44898986816406
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name': 'maxPool2d float32 4D tensor options.roundingType=ceil',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [
- {'input': 'maxPool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'ceil'
- }
- }
- ],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [
- 99.28312683105469, 9.742474555969238, -39.03501892089844,
- 99.28312683105469, 72.1085205078125, 66.09259033203125,
- 97.90348052978516, 72.1085205078125, 7.429088115692139,
- 81.73119354248047, 72.44898986816406, -59.34124755859375,
- 81.73119354248047, 72.44898986816406, 55.890525817871094,
- 80.30484008789062, 72.33577728271484, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [
- {'input': 'maxPool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'floor',
- 'outputSizes': [3, 3]
- }
- }
- ],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [
- 99.28312683105469, 9.742474555969238, -39.03501892089844,
- 99.28312683105469, 72.1085205078125, 66.09259033203125,
- 97.90348052978516, 72.1085205078125, 7.429088115692139,
- 81.73119354248047, 72.44898986816406, -59.34124755859375,
- 81.73119354248047, 72.44898986816406, 55.890525817871094,
- 80.30484008789062, 72.33577728271484, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 89.00830078125, -45.72039031982422, -61.306129455566406,
- -4.014514446258545, -94.54893493652344, 46.28090286254883,
- 99.28312683105469, -10.057873725891113, 9.742474555969238,
- -39.03501892089844, 75.08192443847656, 12.819415092468262,
- -33.01505661010742, 38.691341400146484, 66.09259033203125,
- 97.90348052978516, -8.737770080566406, -53.42162322998047,
- 72.1085205078125, -40.423091888427734, -35.68864440917969,
- -87.64779663085938, 38.874244689941406, 39.383602142333984,
- 7.429088115692139, -76.72171020507812, 50.217063903808594,
- -52.895477294921875, -44.642333984375, -97.86752319335938,
- 81.73119354248047, 5.428491115570068, -29.22772789001465,
- 72.44898986816406, -59.34124755859375, 39.19960021972656,
- -65.99439239501953, -4.204323768615723, -60.54586410522461,
- 55.890525817871094, 80.30484008789062, 72.8883056640625,
- -46.59611129760742, 20.50387954711914, -31.126462936401367,
- -57.294559478759766, -26.623577117919922, 15.935754776000977,
- -78.77953338623047, 72.33577728271484
- ],
- 'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [
- {'input': 'maxPool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'roundingType': 'ceil',
- 'outputSizes': [2, 2]
- }
- }
- ],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [
- 99.28312683105469, 9.742474555969238, 99.28312683105469,
- 72.1085205078125, 81.73119354248047, 72.44898986816406,
- 81.73119354248047, 72.44898986816406
- ],
- 'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
- }
- }
- }
- },
- {
- 'name':
- 'maxPool2d float32 4D tensor options.dilations with options.strides',
- 'graph': {
- 'inputs': {
- 'maxPool2dInput': {
- 'data': [
- 34.69258117675781, -24.706249237060547, -60.428070068359375,
- 35.93883514404297, 60.896095275878906, 79.42220306396484,
- -77.85906219482422, 54.188209533691406, -21.576934814453125,
- -49.10390853881836, 78.55176544189453, 74.28213500976562,
- -87.92769622802734, 79.82047271728516, 11.680922508239746,
- -12.154505729675293, -22.33293914794922, 33.084861755371094,
- 8.640676498413086, 47.040645599365234, 95.7823486328125,
- -88.01998138427734, -98.53630065917969, 16.158977508544922,
- 21.396089553833008, 95.1323471069336, -40.80724334716797,
- -88.70922088623047, -40.772769927978516, 67.89842987060547,
- -50.337467193603516, -96.56610870361328, 12.508098602294922,
- -6.6358113288879395, -44.80198287963867, 80.27474212646484,
- -65.68411254882812, -14.884790420532227, -66.54857635498047,
- 20.072338104248047, -27.954269409179688, -56.62217330932617,
- 82.7479476928711, 93.30175018310547, -34.073394775390625,
- -22.87164306640625, 73.25525665283203, 41.14021682739258,
- -19.75514793395996, 80.07701110839844, -69.89276885986328,
- 14.013250350952148, -61.36640167236328, 51.53046417236328,
- 43.53886413574219, -89.5888671875, 51.45121765136719,
- 73.9239730834961, -80.25264739990234, 94.72747802734375,
- 95.25411224365234, 58.12575149536133, 19.885723114013672,
- -70.0301284790039, 63.419517517089844, -54.11785125732422,
- -97.22807312011719, -60.65826416015625, -31.04998016357422,
- -14.646553039550781, -63.73688888549805, 47.34630584716797,
- 85.56405639648438, -53.389251708984375, -70.84739685058594,
- 47.355045318603516, 83.38397979736328, 7.361695289611816,
- 46.85823440551758, 98.13465881347656, -43.9396858215332,
- 50.33780288696289, 37.45563507080078, -54.52760696411133,
- -6.212307929992676, 34.41734313964844, 11.8167724609375,
- 72.44517517089844, 86.3460922241211, 4.14656925201416,
- 88.33040618896484, 98.29994201660156, -66.72379302978516,
- 58.0643424987793, -51.168277740478516, -17.768583297729492,
- 9.961172103881836, -52.73843002319336
- ],
- 'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'}
- }
- },
- 'operators': [{
- 'name': 'maxPool2d',
- 'arguments': [
- {'input': 'maxPool2dInput'}, {
- 'options': {
- 'windowDimensions': [3, 3],
- 'padding': [1, 0, 0, 1],
- 'strides': [2, 2],
- 'dilations': [1, 1],
- 'layout': 'nhwc'
- }
- }
- ],
- 'outputs': 'maxPool2dOutput'
- }],
- 'expectedOutputs': {
- 'maxPool2dOutput': {
- 'data': [
- 60.896095275878906, 79.42220306396484, 95.7823486328125,
- 79.42220306396484, 78.55176544189453, 95.1323471069336,
- 82.7479476928711, 93.30175018310547, 95.7823486328125,
- 80.27474212646484, 43.53886413574219, 95.1323471069336,
- 95.25411224365234, 94.72747802734375, 95.25411224365234,
- 98.13465881347656, 63.419517517089844, 98.13465881347656
- ],
- 'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'}
- }
- }
- }
- }
-];
-
-if (navigator.ml) {
- poolingOperatorsTests.forEach((test) => {
- webnn_conformance_test(buildAndExecuteGraph, getPrecisionTolerance, test);
- });
-} else {
- test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
-}
diff --git a/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js b/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js
index 996a6b472c5..a6155fb25ce 100644
--- a/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js
+++ b/tests/wpt/tests/webnn/conformance_tests/qdq_subgraph.https.any.js
@@ -2041,6 +2041,72 @@ const subgraphTests = [
}
},
{
+ 'name': 'quantized argMax',
+ 'graph': {
+ 'inputs': {
+ 'input': {
+ 'data': [
+ 2.549168109893799, 4.794857501983643, 7.413617134094238,
+ 8.413617134094238, 6.108623504638672, 3.549168109893799,
+ ],
+ 'descriptor': {shape: [2, 3], dataType: 'float32'},
+ 'constant': false
+ },
+ 'inputScale': {
+ 'data': [0.343092918395996],
+ 'descriptor': {shape: [1], dataType: 'float32'},
+ 'constant': true
+ },
+ 'inputZeroPoint': {
+ 'data': [-128],
+ 'descriptor': {shape: [1], dataType: 'int8'},
+ 'constant': true
+ },
+ 'outputScale': {
+ 'data': [0.343092918395996],
+ 'descriptor': {shape: [1], dataType: 'float32'},
+ 'constant': true
+ },
+ 'outputZeroPoint': {
+ 'data': [-128],
+ 'descriptor': {shape: [1], dataType: 'int8'},
+ 'constant': true
+ },
+ },
+ 'operators': [
+ {
+ 'name': 'quantizeLinear',
+ 'arguments': [
+ {'input': 'input'},
+ {'scale': 'inputScale', 'zeroPoint': 'inputZeroPoint'}
+ ],
+ 'outputs': 'quantizedInput'
+ },
+ {
+ 'name': 'dequantizeLinear',
+ 'arguments': [
+ {'input': 'quantizedInput'},
+ {'scale': 'inputScale', 'zeroPoint': 'inputZeroPoint'}
+ ],
+ 'outputs': 'dequantizedInput'
+ },
+ {
+ 'name': 'argMax',
+ 'arguments': [{'input': 'dequantizedInput'}, {'axis': 0}],
+ 'outputs': 'output'
+ },
+ ],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 1, 1, 0,
+ ],
+ 'descriptor': {shape: [3], dataType: 'int32'}
+ }
+ }
+ }
+ },
+ {
'name': 'quantized softmax',
'graph': {
'inputs': {
@@ -2540,6 +2606,176 @@ const subgraphTests = [
}
}
},
+ {
+ 'name': 'quantized pad with reflection mode',
+ 'graph': {
+ 'inputs': {
+ 'input': {
+ 'data': [
+ 1.6811466217041016, 0.0479511022567749, 0.33355462551116943,
+ -0.1988269537687301, -0.0041167140007019, -0.0634240251779556,
+ ],
+ 'descriptor': {shape: [2, 3], dataType: 'float32'},
+ 'constant': false
+ },
+ 'inputScale': {
+ 'data': [0.003921568859368563],
+ 'descriptor': {shape: [1], dataType: 'float32'},
+ 'constant': true
+ },
+ 'inputZeroPoint': {
+ 'data': [0],
+ 'descriptor': {shape: [1], dataType: 'int8'},
+ 'constant': true
+ },
+ 'outputScale': {
+ 'data': [0.003921568859368563],
+ 'descriptor': {shape: [1], dataType: 'float32'},
+ 'constant': true
+ },
+ 'outputZeroPoint': {
+ 'data': [0],
+ 'descriptor': {shape: [1], dataType: 'int8'},
+ 'constant': true
+ },
+ },
+ 'operators': [
+ {
+ 'name': 'quantizeLinear',
+ 'arguments': [
+ {'input': 'input'},
+ {'scale': 'inputScale', 'zeroPoint': 'inputZeroPoint'}
+ ],
+ 'outputs': 'quantizedInput'
+ },
+ {
+ 'name': 'dequantizeLinear',
+ 'arguments': [
+ {'input': 'quantizedInput'},
+ {'scale': 'inputScale', 'zeroPoint': 'inputZeroPoint'}
+ ],
+ 'outputs': 'dequantizedInput'
+ },
+ {
+ 'name': 'pad',
+ 'arguments': [
+ {'input': 'dequantizedInput'}, {'beginningPadding': [1, 2]},
+ {'endingPadding': [1, 2]}, {'options': {'mode': 'reflection'}}
+ ],
+ 'outputs': 'padOutput'
+ },
+ {
+ 'name': 'quantizeLinear',
+ 'arguments': [
+ {'input': 'padOutput'},
+ {'scale': 'outputScale', 'zeroPoint': 'outputZeroPoint'}
+ ],
+ 'outputs': 'quantizedPadOutput'
+ },
+ {
+ 'name': 'dequantizeLinear',
+ 'arguments': [
+ {'input': 'quantizedPadOutput'},
+ {'scale': 'outputScale', 'zeroPoint': 'outputZeroPoint'}
+ ],
+ 'outputs': 'output'
+ }
+ ],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ -0.062745101749897, -0.003921568859368563, -0.20000001788139343,
+ -0.003921568859368563, -0.062745101749897, -0.003921568859368563,
+ -0.20000001788139343, 0.3333333432674408, 0.0470588281750679,
+ 0.49803924560546875, 0.0470588281750679, 0.3333333432674408,
+ 0.0470588281750679, 0.49803924560546875, -0.062745101749897,
+ -0.003921568859368563, -0.20000001788139343, -0.003921568859368563,
+ -0.062745101749897, -0.003921568859368563, -0.20000001788139343,
+ 0.3333333432674408, 0.0470588281750679, 0.49803924560546875,
+ 0.0470588281750679, 0.3333333432674408, 0.0470588281750679,
+ 0.49803924560546875,
+ ],
+ 'descriptor': {shape: [4, 7], dataType: 'float32'}
+ }
+ }
+ }
+ },
+ {
+ 'name': 'quantized clamp',
+ 'graph': {
+ 'inputs': {
+ 'input': {
+ 'data': [
+ 8.413617134094238, 6.108623504638672, 3.549168109893799,
+ 1.6811466217041016, -0.1988269537687301, -8.413617134094238,
+ ],
+ 'descriptor': {shape: [2, 3], dataType: 'float32'},
+ 'constant': false
+ },
+ 'scale': {
+ 'data': [0.343092918395996],
+ 'descriptor': {shape: [1], dataType: 'float32'},
+ 'constant': true
+ },
+ 'zeroPoint': {
+ 'data': [0],
+ 'descriptor': {shape: [1], dataType: 'int8'},
+ 'constant': true
+ },
+ },
+ 'operators': [
+ {
+ 'name': 'quantizeLinear',
+ 'arguments': [
+ {'input': 'input'},
+ {'scale': 'scale', 'zeroPoint': 'zeroPoint'}
+ ],
+ 'outputs': 'quantizedInput'
+ },
+ {
+ 'name': 'dequantizeLinear',
+ 'arguments': [
+ {'input': 'quantizedInput'},
+ {'scale': 'scale', 'zeroPoint': 'zeroPoint'}
+ ],
+ 'outputs': 'dequantizedInput'
+ },
+ {
+ 'name': 'clamp',
+ 'arguments': [
+ {'input': 'dequantizedInput'},
+ {'options': {'minValue': 0, 'maxValue': 6}}
+ ],
+ 'outputs': 'clampOutput'
+ },
+ {
+ 'name': 'quantizeLinear',
+ 'arguments': [
+ {'input': 'clampOutput'},
+ {'scale': 'scale', 'zeroPoint': 'zeroPoint'}
+ ],
+ 'outputs': 'quantizedClampOutput'
+ },
+ {
+ 'name': 'dequantizeLinear',
+ 'arguments': [
+ {'input': 'quantizedClampOutput'},
+ {'scale': 'scale', 'zeroPoint': 'zeroPoint'}
+ ],
+ 'outputs': 'output'
+ }
+ ],
+ 'expectedOutputs': {
+ 'output': {
+ 'data': [
+ 5.832579612731934, 5.832579612731934, 3.430929183959961,
+ 1.7154645919799805, 0, 0,
+ ],
+ 'descriptor': {shape: [2, 3], dataType: 'float32'}
+ }
+ }
+ }
+ },
];
if (navigator.ml) {
diff --git a/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-audiolevel.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-audiolevel.html
new file mode 100644
index 00000000000..14b76efb575
--- /dev/null
+++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-audiolevel.html
@@ -0,0 +1,79 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Audio Level in RTCEncodedAudioFrameMetadata</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/webrtc/RTCPeerConnection-helper.js"></script>
+<script src="RTCEncodedFrame-timestamps-helper.js"></script>
+<script>
+'use strict';
+
+function doWorkExpectingAudioLevel() {
+ onrtctransform = async e => {
+ const reader = e.transformer.readable.getReader();
+ const writer = e.transformer.writable.getWriter();
+ for (let i = 0; i<10; i++) {
+ const frameOrDone = await reader.read();
+ if (frameOrDone.done) {
+ self.postMessage("Unexpected end of stream");
+ return;
+ }
+ const metadata = frameOrDone.value.getMetadata();
+ if (metadata === undefined) {
+ self.postMessage("No audioLevel ");
+ return;
+ }
+ if (metadata.audioLevel < 0 || metadata.audioLevel > 1) {
+ self.postMessage("Invalid audioLevel value");
+ return;
+ }
+ if (metadata.senderCaptureTimeOffset != 0) {
+ await writer.write(frameOrDone.value);
+ }
+ }
+ self.postMessage("OK");
+ };
+}
+
+promise_test(async t => {
+ const worker = new Worker(`data:text/javascript,(${doWorkExpectingAudioLevel.toString()})()`);
+ const workerPromise = new Promise((resolve, reject) => {
+ worker.onmessage = t.step_func(message => {
+ if (message.data == "OK") {
+ resolve();
+ } else {
+ reject(message.data);
+ }
+ });
+ });
+
+ await initiateCall(
+ t, /*streamOptions=*/{audio: true, video: false},
+ /*enableAbsCaptureTime=*/false, worker, /*enableSenderTransform=*/false,
+ /*enableReceiverTransform=*/true);
+
+ return workerPromise;
+}, 'audioLevel present in audio receiver');
+
+promise_test(async t => {
+ const worker = new Worker(`data:text/javascript,(${doWorkExpectingAudioLevel.toString()})()`);
+ const workerPromise = new Promise((resolve, reject) => {
+ worker.onmessage = t.step_func(message => {
+ if (message.data == "OK") {
+ resolve();
+ } else {
+ reject(message.data);
+ }
+ });
+ });
+
+ await initiateCall(
+ t, /*streamOptions=*/{audio: true, video: false},
+ /*enableAbsCaptureTime=*/false, worker, /*enableSenderTransform=*/true,
+ /*enableReceiverTransform=*/false);
+
+ return workerPromise;
+}, 'audioLevel present in audio sender');
+
+
+</script>
diff --git a/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-metadata.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-metadata.https.html
index 1e148fe1b29..b9461940c63 100644
--- a/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-metadata.https.html
+++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-metadata.https.html
@@ -42,6 +42,8 @@ promise_test(async t => {
assert_equals(original.getMetadata().rtpTimestamp, newFrame.getMetadata().rtpTimestamp);
assert_equals(original.getMetadata().captureTime, newFrame.getMetadata().captureTime);
assert_equals(original.getMetadata().receiveTime, newFrame.getMetadata().receiveTime);
+ assert_true(original.getMetadata().hasOwnProperty('audioLevel'));
+ assert_equals(original.getMetadata().audioLevel, newFrame.getMetadata().audioLevel);
assert_array_equals(Array.from(original.data), Array.from(newFrame.data));
await writer2.write(newFrame);
resolve();
@@ -85,6 +87,7 @@ promise_test(async t => {
assert_equals(newMetadata.rtpTimestamp, newFrame.getMetadata().rtpTimestamp);
assert_equals(original.getMetadata().receiveTime, newFrame.getMetadata().receiveTime);
assert_equals(original.getMetadata().captureTime, newFrame.getMetadata().captureTime);
+ assert_equals(original.getMetadata().audioLevel, newFrame.getMetadata().audioLevel);
assert_array_equals(Array.from(original.data), Array.from(newFrame.data));
await writer2.write(newFrame);
resolve();
@@ -133,6 +136,7 @@ promise_test(async t => {
}, "Constructing audio frame with bad metadata argument before sending does not work");
promise_test(async t => {
+ const kAudioLevel = 0.5;
const kCaptureTime = 12345;
const pc1 = new RTCPeerConnection({encodedInsertableStreams:true});
t.add_cleanup(() => pc1.close());
@@ -147,6 +151,11 @@ promise_test(async t => {
const receiverTransformer = new TransformStream({
async transform(encodedFrame, controller) {
const metadata = encodedFrame.getMetadata();
+ if (metadata.audioLevel === undefined) {
+ reject("No audioLevel");
+ } else if (metadata.audioLevel < kAudioLevel - 0.1 || metadata.audioLevel > kAudioLevel + 0.1) {
+ reject("Unexpected audioLevel");
+ }
if (metadata.captureTime < kCaptureTime - 1 || metadata.captureTime > kCaptureTime + 1) {
reject("Unexpected captureTime");
}
@@ -169,6 +178,7 @@ promise_test(async t => {
const senderTransformer = new TransformStream({
async transform(encodedFrame, controller) {
let metadata = encodedFrame.getMetadata();
+ metadata.audioLevel = kAudioLevel;
metadata.captureTime = kCaptureTime;
controller.enqueue(new RTCEncodedAudioFrame(encodedFrame, {metadata}));
}
diff --git a/tests/wpt/tests/webrtc/protocol/h264-unidirectional-codec-offer.https.html b/tests/wpt/tests/webrtc/protocol/h264-unidirectional-codec-offer.https.html
index 708d59e5242..d5429fa80fa 100644
--- a/tests/wpt/tests/webrtc/protocol/h264-unidirectional-codec-offer.https.html
+++ b/tests/wpt/tests/webrtc/protocol/h264-unidirectional-codec-offer.https.html
@@ -3,7 +3,6 @@
<title>RTX codec integrity checks</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="../RTCPeerConnection-helper.js"></script>
<script>
'use strict';
@@ -52,61 +51,35 @@ function getCodecsWithDirection(mimeType, direction) {
return codecs;
}
-// Returns an array of { mimeType, payloadType, sdpFmtpLine } entries in the
-// order that they appeared in the SDP.
+// Returns an array of { mimeType, payloadType, sdpFmtpLine } entries in codec
+// preference order from the first m-section of the SDP.
function parseCodecsFromSdp(sdp) {
const codecs = [];
- // For each a=rtpmap:...
- const kRtpMapLineRegex = /\r\na=rtpmap:/g;
- for (const match of sdp.matchAll(kRtpMapLineRegex)) {
- const rtpmapIndex = match.index + 11;
- const rtpmapSpaceIndex = sdp.indexOf(' ', rtpmapIndex)
- const payloadType = Number(sdp.slice(rtpmapIndex, rtpmapSpaceIndex));
- const codecName = sdp.slice(rtpmapSpaceIndex + 1,
- sdp.indexOf('/', rtpmapSpaceIndex));
- let sdpFmtpLine = undefined; // Can be undefined e.g. VP8.
- const fmtpLineWithPT = `\r\na=fmtp:${payloadType} `;
- let fmtpIndex = sdp.indexOf(fmtpLineWithPT, rtpmapIndex);
- if (fmtpIndex != -1) {
- fmtpIndex += fmtpLineWithPT.length;
- const fmtpLineEnd = sdp.indexOf('\r\n', fmtpIndex);
- if (fmtpLineEnd == -1) {
- throw 'Parse error: Missing expected end of FMTP line';
- }
- sdpFmtpLine = sdp.slice(fmtpIndex, fmtpLineEnd);
- }
- const codec = { mimeType: `video/${codecName}`, payloadType, sdpFmtpLine };
+ const kMLineRegex = /\r\nm=video \d+ [A-Z\/]+ (?<pts>[\d\s]+)\r\n/;
+ const {groups: {pts}} = kMLineRegex.exec(sdp);
+ for (const pt of pts.split(" ")) {
+ const rtpmapRegex = new RegExp(`\r\na=rtpmap:${pt} (?<name>[^ \/]+)\/`);
+ const {groups: {name}} = rtpmapRegex.exec(sdp);
+ const fmtpRegex = new RegExp(`\r\na=fmtp:${pt} (?<sdpFmtpLine>.*)\r\n`);
+ // Guard against there not being an fmtp line.
+ const {groups: {sdpFmtpLine} = {}} = fmtpRegex.exec(sdp) ?? {};
+ const codec = { mimeType: `video/${name}`, payloadType: pt, sdpFmtpLine };
codecs.push(codec);
}
return codecs;
}
-function replaceAllInSubstr(
- str, startIndex, endIndex, pattern, replacement) {
- return str.slice(0, startIndex) +
- str.slice(startIndex, endIndex).replaceAll(pattern, replacement) +
- str.slice(endIndex);
-}
-
function replaceCodecInSdp(sdp, oldCodec, newCodec) {
// Replace the payload type in the m=video line.
- const mVideoStartIndex = sdp.indexOf('m=video');
- const mVideoEndIndex = sdp.indexOf('\r\n', mVideoStartIndex);
- if (mVideoStartIndex == -1 || mVideoEndIndex == -1) {
- throw 'Failed to parse m=video line in the codec replace algorithm';
- }
- sdp = replaceAllInSubstr(
- sdp, mVideoStartIndex, mVideoEndIndex, String(oldCodec.payloadType),
- String(newCodec.payloadType));
- // Replace the payload type in all the RTP map and FMTP lines.
- const rtpStartIndex = sdp.indexOf('a=rtpmap:' + oldCodec.payloadType);
- const rtpEndIndex = sdp.indexOf(oldCodec.sdpFmtpLine);
- if (rtpStartIndex == -1 || rtpEndIndex == -1) {
- throw 'Failed to parse RTP/FMTP lines in the codec replace algorithm';
- }
- sdp = replaceAllInSubstr(
- sdp, rtpStartIndex, rtpEndIndex, ':' + oldCodec.payloadType,
- ':' + newCodec.payloadType);
+ sdp = sdp.replace(
+ new RegExp(`(m=video [ \\dA-Z\/]+)${oldCodec.payloadType}`),
+ `$1${newCodec.payloadType}`
+ );
+ // Replace the payload type in all rtpmap, fmtp and rtcp-fb lines.
+ sdp = sdp.replaceAll(
+ new RegExp(`(a=(rtpmap|fmtp|rtcp-fb):)${oldCodec.payloadType}`, "g"),
+ `$1${newCodec.payloadType}`
+ );
// Lastly, replace the actual "sdpFmtpLine" string.
sdp = sdp.replace(oldCodec.sdpFmtpLine, newCodec.sdpFmtpLine);
return sdp;
@@ -173,6 +146,7 @@ promise_test(async t => {
t.add_cleanup(() => pc.close());
const h264RecvOnlyCodecs = getCodecsWithDirection('video/H264', 'recvonly');
+ const h264SendOnlyCodecs = getCodecsWithDirection('video/H264', 'sendonly');
const vp8SendRecvCodecs = getCodecsWithDirection('video/VP8', 'sendrecv');
// If any of the following optional asserts fail the test ends with
// [PRECONDITION_FAILED] as opposed to [FAIL].
@@ -182,15 +156,40 @@ promise_test(async t => {
assert_implements_optional(
vp8SendRecvCodecs.length > 0,
`There are no sendrecv VP8 codecs available in getCapabilities.`);
- // Pick a level (3.1) that we're required to support for both sending and
- // receiving. If such a codec is listed in `h264RecvOnlyCodecs` that means our
- // sender capability has an even greater level.
- const h264RecvOnlyCodec = h264RecvOnlyCodecs.find(
- codec => codec.sdpFmtpLine.includes('profile-level-id=64001f'));
+ // Find a recvonly codec with the required level (3.1) for both sending and
+ // receiving, that has a corresponding sendonly codec with the same profile
+ // but a higher level. If there is such a match, we should be able to use the
+ // lower level of the two for sendrecv.
+ const kProfileLevelIdRegex =
+ /profile-level-id=(?<profile_idc>..)(?<profile_iop>..)(?<level_idc>..)/;
+ const kProfileLevelIdReqLevelRegex = /profile-level-id=....1f/;
+ const h264RecvOnlyReqLevelCodecs = h264RecvOnlyCodecs.filter(
+ codec => codec.sdpFmtpLine.match(kProfileLevelIdReqLevelRegex));
+ const h264RecvOnlyCodec = h264RecvOnlyReqLevelCodecs.find(recv => {
+ const {groups: {
+ profile_idc: recvProfile,
+ profile_iop: recvConstraints,
+ level_idc: recvLevelIdc,
+ }
+ } = kProfileLevelIdRegex.exec(recv.sdpFmtpLine);
+ const recvLevel = parseInt(recvLevelIdc, 16);
+ return h264SendOnlyCodecs.find(send => {
+ const {groups: {
+ profile_idc: sendProfile,
+ profile_iop: sendConstraints,
+ level_idc: sendLevelIdc,
+ }
+ } = kProfileLevelIdRegex.exec(send.sdpFmtpLine);
+ const sendLevel = parseInt(sendLevelIdc, 16);
+ return sendProfile == recvProfile &&
+ sendConstraints == recvConstraints &&
+ sendLevelIdc > recvLevelIdc;
+ });
+ });
assert_implements_optional(
h264RecvOnlyCodec != undefined,
- `profile-level-id=64001f is not exclusive to ` +
- `RTCRtpReceiver.getCapabilities.`);
+ `No recvonly profile-level-id=....1f that matches a higher level ` +
+ `sendonly codec`);
const vp8SendRecvCodec = vp8SendRecvCodecs[0];
const transceiver = pc.addTransceiver('video', {direction: 'sendrecv'});
diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini
index e9f1c0ae3f3..dcee42d08d7 100644
--- a/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini
+++ b/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini
@@ -14,30 +14,6 @@
[WebGL test #588]
expected: FAIL
- [WebGL test #53]
- expected: FAIL
-
- [WebGL test #55]
- expected: FAIL
-
- [WebGL test #57]
- expected: FAIL
-
- [WebGL test #59]
- expected: FAIL
-
- [WebGL test #69]
- expected: FAIL
-
- [WebGL test #71]
- expected: FAIL
-
- [WebGL test #73]
- expected: FAIL
-
- [WebGL test #75]
- expected: FAIL
-
[WebGL test #85]
expected: FAIL