diff --git a/tests/wpt/meta-legacy-layout/css/css-conditional/idlharness.html.ini b/tests/wpt/meta-legacy-layout/css/css-conditional/idlharness.html.ini index 8c7dd1bebc2..57726269de9 100644 --- a/tests/wpt/meta-legacy-layout/css/css-conditional/idlharness.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-conditional/idlharness.html.ini @@ -1,3 +1,15 @@ [idlharness.html] [css-conditional IDL tests] expected: FAIL + + [CSSMediaRule interface: attribute matches] + expected: FAIL + + [CSSMediaRule interface: cssMediaRule must inherit property "matches" with the proper type] + expected: FAIL + + [CSSSupportsRule interface: attribute matches] + expected: FAIL + + [CSSSupportsRule interface: cssSupportsRule must inherit property "matches" with the proper type] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-fonts/generic-family-keywords-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-fonts/generic-family-keywords-001.html.ini index d7dc377ea4a..3ae4884abe8 100644 --- a/tests/wpt/meta-legacy-layout/css/css-fonts/generic-family-keywords-001.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-fonts/generic-family-keywords-001.html.ini @@ -17,9 +17,6 @@ [@font-face matching for quoted and unquoted ui-sans-serif] expected: FAIL - [@font-face matching for quoted and unquoted ui-monospace] - expected: FAIL - [@font-face matching for quoted and unquoted ui-serif] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-sizing/dynamic-available-size-iframe.html.ini b/tests/wpt/meta-legacy-layout/css/css-sizing/dynamic-available-size-iframe.html.ini deleted file mode 100644 index 35256741d38..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-sizing/dynamic-available-size-iframe.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[dynamic-available-size-iframe.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-sizing/fit-content-max-inline-size.tentative.html.ini b/tests/wpt/meta-legacy-layout/css/css-sizing/fit-content-max-inline-size.tentative.html.ini new file mode 100644 index 00000000000..5dfa8f46575 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-sizing/fit-content-max-inline-size.tentative.html.ini @@ -0,0 +1,2 @@ +[fit-content-max-inline-size.tentative.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-sizing/fit-content-min-inline-size.tentative.html.ini b/tests/wpt/meta-legacy-layout/css/css-sizing/fit-content-min-inline-size.tentative.html.ini new file mode 100644 index 00000000000..88d110ee31c --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-sizing/fit-content-min-inline-size.tentative.html.ini @@ -0,0 +1,2 @@ +[fit-content-min-inline-size.tentative.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-sizing/intrinsic-percent-replaced-dynamic-011.html.ini b/tests/wpt/meta-legacy-layout/css/css-sizing/intrinsic-percent-replaced-dynamic-011.html.ini new file mode 100644 index 00000000000..732a1e9cfc7 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-sizing/intrinsic-percent-replaced-dynamic-011.html.ini @@ -0,0 +1,2 @@ +[intrinsic-percent-replaced-dynamic-011.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-sizing/intrinsic-percent-replaced-dynamic-012.html.ini b/tests/wpt/meta-legacy-layout/css/css-sizing/intrinsic-percent-replaced-dynamic-012.html.ini new file mode 100644 index 00000000000..67865199efb --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-sizing/intrinsic-percent-replaced-dynamic-012.html.ini @@ -0,0 +1,2 @@ +[intrinsic-percent-replaced-dynamic-012.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/animation/calc-size-interpolation-expansion.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/animation/calc-size-interpolation-expansion.html.ini index eac708dbfbc..92c2f421196 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/animation/calc-size-interpolation-expansion.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/animation/calc-size-interpolation-expansion.html.ini @@ -19,3 +19,6 @@ [value at progress 0.75 in animation of "width" from "calc-size(fit-content, 20px)" to "calc-size(calc-size(fit-content, 3 * size + 10px), min(size + 20px, size * 2 - 30px) + size * 2 + 80px)"] expected: FAIL + + [value at progress 0.75 in animation of "height" from "auto" to "calc-size(any, 0px)"] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-height-box-sizing.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-height-box-sizing.html.ini new file mode 100644 index 00000000000..e36e03b65e9 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-height-box-sizing.html.ini @@ -0,0 +1,39 @@ +[calc-size-height-box-sizing.html] + [resolved height with styles {"height":"auto","box-sizing":"border-box"}] + expected: FAIL + + [resolved height with styles {"height":"calc-size(auto, size)","box-sizing":"border-box"}] + expected: FAIL + + [resolved height with styles {"height":"calc-size(auto, size * 2)"}] + expected: FAIL + + [resolved height with styles {"height":"calc-size(auto, size * 2)","box-sizing":"content-box"}] + expected: FAIL + + [resolved height with styles {"height":"calc-size(auto, size * 2)","box-sizing":"border-box"}] + expected: FAIL + + [resolved height with styles {"height":"calc-size(min-content, size * 2)"}] + expected: FAIL + + [resolved height with styles {"height":"calc-size(fit-content, size * 2)","box-sizing":"border-box"}] + expected: FAIL + + [resolved height with styles {"min-height":"calc-size(min-content, size * 2)"}] + expected: FAIL + + [resolved height with styles {"min-height":"calc-size(fit-content, size * 2)","box-sizing":"border-box"}] + expected: FAIL + + [resolved height with styles {"height":"200px","max-height":"calc-size(min-content, size * 2)"}] + expected: FAIL + + [resolved height with styles {"height":"200px","max-height":"calc-size(fit-content, size * 2)","box-sizing":"border-box"}] + expected: FAIL + + [resolved height with styles {"height":"calc-size(11px, size * 2)"}] + expected: FAIL + + [resolved height with styles {"height":"calc-size(11px, size * 2)","box-sizing":"border-box"}] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-001.html.ini new file mode 100644 index 00000000000..18846692600 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-001.html.ini @@ -0,0 +1,2 @@ +[calc-size-min-max-sizes-001.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-002.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-002.html.ini new file mode 100644 index 00000000000..d5a5eb20fb9 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-002.html.ini @@ -0,0 +1,2 @@ +[calc-size-min-max-sizes-002.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-004.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-004.html.ini new file mode 100644 index 00000000000..89d9b51d078 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-004.html.ini @@ -0,0 +1,2 @@ +[calc-size-min-max-sizes-004.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-005.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-005.html.ini new file mode 100644 index 00000000000..185dbef0739 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-min-max-sizes-005.html.ini @@ -0,0 +1,2 @@ +[calc-size-min-max-sizes-005.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-typed-om.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-typed-om.html.ini index c09540c8fc8..a1d7d5ca05d 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-typed-om.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-typed-om.html.ini @@ -61,3 +61,15 @@ [computedStyleMap serialization of width: calc-size(calc-size(30px))] expected: FAIL + + [computedStyleMap serialization of width: calc-size(any, 30px)] + expected: FAIL + + [computedStyleMap serialization of width: calc-size(any, min(30px, 2em))] + expected: FAIL + + [computedStyleMap serialization of width: calc-size(calc-size(any, 30px), size)] + expected: FAIL + + [computedStyleMap serialization of width: calc-size(calc-size(fit-content, size * 2), size)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-width-box-sizing.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-width-box-sizing.html.ini new file mode 100644 index 00000000000..6f5e2b238f3 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-width-box-sizing.html.ini @@ -0,0 +1,45 @@ +[calc-size-width-box-sizing.html] + [resolved width with styles {"width":"auto"}] + expected: FAIL + + [resolved width with styles {"width":"auto","box-sizing":"border-box"}] + expected: FAIL + + [resolved width with styles {"width":"calc-size(auto, size)"}] + expected: FAIL + + [resolved width with styles {"width":"calc-size(auto, size)","box-sizing":"border-box"}] + expected: FAIL + + [resolved width with styles {"width":"calc-size(auto, size * 2)"}] + expected: FAIL + + [resolved width with styles {"width":"calc-size(auto, size * 2)","box-sizing":"content-box"}] + expected: FAIL + + [resolved width with styles {"width":"calc-size(auto, size * 2)","box-sizing":"border-box"}] + expected: FAIL + + [resolved width with styles {"width":"calc-size(min-content, size * 2)"}] + expected: FAIL + + [resolved width with styles {"width":"calc-size(fit-content, size * 2)","box-sizing":"border-box"}] + expected: FAIL + + [resolved width with styles {"min-width":"calc-size(min-content, size * 2)"}] + expected: FAIL + + [resolved width with styles {"min-width":"calc-size(max-content, size * 2)","box-sizing":"border-box"}] + expected: FAIL + + [resolved width with styles {"width":"200px","max-width":"calc-size(max-content, size * 2)"}] + expected: FAIL + + [resolved width with styles {"width":"200px","max-width":"calc-size(min-content, size * 2)","box-sizing":"border-box"}] + expected: FAIL + + [resolved width with styles {"width":"calc-size(11px, size * 2)"}] + expected: FAIL + + [resolved width with styles {"width":"calc-size(11px, size * 2)","box-sizing":"border-box"}] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini index 70cbb50e1a5..037d7e0f951 100644 --- a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini @@ -1,13 +1,6 @@ [MediaQueryList-addListener-handleEvent.html] - expected: TIMEOUT [throws if handleEvent is falsy and not callable] - expected: NOTRUN + expected: FAIL [throws if handleEvent is thruthy and not callable] - expected: NOTRUN - - [doesn't look up handleEvent method on callable event listeners] - expected: NOTRUN - - [rethrows errors when getting handleEvent] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index 40181360afd..314dca9c1f5 100644 --- a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -1,22 +1,3 @@ [MediaQueryList-addListener-removeListener.html] - expected: TIMEOUT [listeners are called when + + + diff --git a/tests/wpt/tests/css/css-fonts/WEB_FEATURES.yml b/tests/wpt/tests/css/css-fonts/WEB_FEATURES.yml index 6739fa2d06a..e20c3d7ab57 100644 --- a/tests/wpt/tests/css/css-fonts/WEB_FEATURES.yml +++ b/tests/wpt/tests/css/css-fonts/WEB_FEATURES.yml @@ -4,6 +4,11 @@ features: - font-palette.html - font-palette-* - palette-values-rule-* +- name: font-size-adjust + files: + - font-size-adjust-* + - size-adjust-02.html + - size-adjust-03.html - name: font-synthesis files: - font-synthesis-0*.html diff --git a/tests/wpt/tests/css/css-fonts/animations/WEB_FEATURES.yml b/tests/wpt/tests/css/css-fonts/animations/WEB_FEATURES.yml index f99e4bb4e0f..6a3e58e9f54 100644 --- a/tests/wpt/tests/css/css-fonts/animations/WEB_FEATURES.yml +++ b/tests/wpt/tests/css/css-fonts/animations/WEB_FEATURES.yml @@ -4,3 +4,6 @@ features: - font-palette-animation-not-specified-endpoints.html - font-palette-interpolation.html - multiple-elements-font-palette-animation.html +- name: font-size-adjust + files: + - font-size-adjust-* diff --git a/tests/wpt/tests/css/css-fonts/parsing/WEB_FEATURES.yml b/tests/wpt/tests/css/css-fonts/parsing/WEB_FEATURES.yml index a3bc09cb1f1..b21b7a700e9 100644 --- a/tests/wpt/tests/css/css-fonts/parsing/WEB_FEATURES.yml +++ b/tests/wpt/tests/css/css-fonts/parsing/WEB_FEATURES.yml @@ -6,6 +6,9 @@ features: files: - font-palette-* - font-palette-values-* +- name: font-size-adjust + files: + - font-size-adjust-* - name: font-synthesis files: - font-synthesis-computed.html diff --git a/tests/wpt/tests/css/css-overflow/line-clamp/line-clamp-auto-034.tentative.html b/tests/wpt/tests/css/css-overflow/line-clamp/line-clamp-auto-034.tentative.html index d581c31e100..ebb676dfd8e 100644 --- a/tests/wpt/tests/css/css-overflow/line-clamp/line-clamp-auto-034.tentative.html +++ b/tests/wpt/tests/css/css-overflow/line-clamp/line-clamp-auto-034.tentative.html @@ -1,10 +1,10 @@ -CSS Overflow: `line-clamp: auto` ellipsis before +CSS Overflow: `line-clamp: auto` clamp between IFCs - + + +
+
+
+
+
+ + diff --git a/tests/wpt/tests/css/css-values/calc-size/calc-size-height.html b/tests/wpt/tests/css/css-values/calc-size/calc-size-height.html index c3d58931b87..f2232943bd3 100644 --- a/tests/wpt/tests/css/css-values/calc-size/calc-size-height.html +++ b/tests/wpt/tests/css/css-values/calc-size/calc-size-height.html @@ -43,6 +43,8 @@ let basic_tests = [ const container = document.getElementById("container"); const target = document.getElementById("target"); const target_cs = getComputedStyle(target); +const child = document.getElementById("child"); +const child_cs = getComputedStyle(child); for (const obj of basic_tests) { test((t) => { target.style.removeProperty("height"); @@ -60,4 +62,16 @@ for (const obj of basic_tests) { }, `resolved height for height in definite height container: ${obj.value}`); } +test((t) => { + t.add_cleanup(() => { + child.style.height = ""; + child.innerHTML = ""; + }); + container.style.height = "auto"; + target.style.height = "calc-size(min-content, size + 23px)"; + child.style.height = "100%"; + child.innerHTML = "
"; + assert_equals(child_cs.height, "7px"); +}, "calc-size() is indefinite when the intrinsic size is indefinite"); + diff --git a/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-001.html b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-001.html new file mode 100644 index 00000000000..d64a1fdc24d --- /dev/null +++ b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-001.html @@ -0,0 +1,12 @@ + + + +

Test passes if there is a filled green square.

+
+ +
+
+ +
+
+
diff --git a/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-002.html b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-002.html new file mode 100644 index 00000000000..cfd71d49248 --- /dev/null +++ b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-002.html @@ -0,0 +1,12 @@ + + + +

Test passes if there is a filled green square.

+
+ +
+
+ +
+
+
diff --git a/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-003.html b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-003.html new file mode 100644 index 00000000000..dee45b8d55e --- /dev/null +++ b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-003.html @@ -0,0 +1,12 @@ + + + +

Test passes if there is a filled green square.

+
+ +
+
+ +
+
+
diff --git a/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-004.html b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-004.html new file mode 100644 index 00000000000..b2ed44adbcd --- /dev/null +++ b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-004.html @@ -0,0 +1,12 @@ + + + +

Test passes if there is a filled green square.

+
+ +
+
+ +
+
+
diff --git a/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-005.html b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-005.html new file mode 100644 index 00000000000..592fd5c53ed --- /dev/null +++ b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-005.html @@ -0,0 +1,12 @@ + + + +

Test passes if there is a filled green square.

+
+ +
+
+ +
+
+
diff --git a/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-006.html b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-006.html new file mode 100644 index 00000000000..47a136c7170 --- /dev/null +++ b/tests/wpt/tests/css/css-values/calc-size/calc-size-min-max-sizes-006.html @@ -0,0 +1,12 @@ + + + +

Test passes if there is a filled green square.

+
+ +
+
+ +
+
+
diff --git a/tests/wpt/tests/css/css-values/calc-size/calc-size-parsing.html b/tests/wpt/tests/css/css-values/calc-size/calc-size-parsing.html index 37eb933c713..0cc34923dd3 100644 --- a/tests/wpt/tests/css/css-values/calc-size/calc-size-parsing.html +++ b/tests/wpt/tests/css/css-values/calc-size/calc-size-parsing.html @@ -83,17 +83,14 @@ test_valid_value("width", "calc-size(calc-size(min-content, size), size)"); test_invalid_value("height", "calc(12% + calc-size(any, 31%))"); -// Based on the discussion in https://github.com/w3c/csswg-drafts/issues/10259 -// this presumes parse-time conversion of the one-argument form to the -// two-argument form, but this isn't yet specified. -test_valid_value("width", "calc-size(30px)", "calc-size(any, 30px)"); -test_valid_value("width", "calc-size(min(30px, 2em))", "calc-size(any, min(30px, 2em))"); +test_invalid_value("width", "calc-size(30px)"); +test_invalid_value("width", "calc-size(min(30px, 2em))"); test_invalid_value("width", "calc-size(any)"); -test_valid_value("width", "calc-size(calc-size(any, 30px))", "calc-size(calc-size(any, 30px), size)"); +test_invalid_value("width", "calc-size(calc-size(any, 30px))"); test_invalid_value("width", "calc-size(size)"); -test_valid_value("width", "calc-size(fit-content)", "calc-size(fit-content, size)"); -test_valid_value("width", "calc-size(calc-size(fit-content, size * 2))", "calc-size(calc-size(fit-content, size * 2), size)"); -test_valid_value("width", "calc-size(calc-size(30px))", "calc-size(calc-size(any, 30px), size)"); +test_invalid_value("width", "calc-size(fit-content)"); +test_invalid_value("width", "calc-size(calc-size(fit-content, size * 2))"); +test_invalid_value("width", "calc-size(calc-size(30px))"); test_valid_value("flex-basis", "calc-size(any, 50px)"); test_valid_value("flex-basis", "calc-size(auto, size)"); diff --git a/tests/wpt/tests/css/css-values/calc-size/calc-size-typed-om.html b/tests/wpt/tests/css/css-values/calc-size/calc-size-typed-om.html index 3af431b4d5c..8f9600e26a9 100644 --- a/tests/wpt/tests/css/css-values/calc-size/calc-size-typed-om.html +++ b/tests/wpt/tests/css/css-values/calc-size/calc-size-typed-om.html @@ -29,24 +29,18 @@ test_typed_om_string("height", "calc-size(min-content, size * 2)"); test_typed_om_string("max-width", "calc-size(max-content, size / 2)", "calc-size(max-content, size * 0.5)"); test_typed_om_string("max-height", "calc-size(fit-content, 30px + size / 2)", "calc-size(fit-content, 30px + size * 0.5)"); test_typed_om_string("width", "calc-size(fit-content, 50% + size / 2)", "calc-size(fit-content, 50% + size * 0.5)"); +test_typed_om_string("width", "calc-size(any, 30px)"); test_typed_om_string("width", "calc-size(any, 25em)", "calc-size(any, 400px)"); test_typed_om_string("width", "calc-size(any, 40%)"); test_typed_om_string("width", "calc-size(any, 50px + 30%)", "calc-size(any, 30% + 50px)"); +test_typed_om_string("width", "calc-size(any, min(30px, 2em))", "calc-size(any, 30px)"); test_typed_om_string("width", "calc-size(10px, sign(size) * size)"); test_typed_om_string("width", "calc-size(30px, 25em)", "calc-size(30px, 400px)"); +test_typed_om_string("width", "calc-size(calc-size(any, 30px), size)"); test_typed_om_string("width", "calc-size(calc-size(any, 30px), 25em)", "calc-size(calc-size(any, 30px), 400px)"); test_typed_om_string("width", "calc-size(calc-size(2in, 30px), 25em)", "calc-size(calc-size(192px, 30px), 400px)"); test_typed_om_string("width", "calc-size(calc-size(min-content, 30px), 25em)", "calc-size(calc-size(min-content, 30px), 400px)"); test_typed_om_string("width", "calc-size(calc-size(min-content, size), size)"); - -// Based on the discussion in https://github.com/w3c/csswg-drafts/issues/10259 -// this presumes parse-time conversion of the one-argument form to the -// two-argument form, but this isn't yet specified. -test_typed_om_string("width", "calc-size(30px)", "calc-size(any, 30px)"); -test_typed_om_string("width", "calc-size(min(30px, 2em))", "calc-size(any, 30px)"); -test_typed_om_string("width", "calc-size(calc-size(any, 30px))", "calc-size(calc-size(any, 30px), size)"); -test_typed_om_string("width", "calc-size(fit-content)", "calc-size(fit-content, size)"); -test_typed_om_string("width", "calc-size(calc-size(fit-content, size * 2))", "calc-size(calc-size(fit-content, size * 2), size)"); -test_typed_om_string("width", "calc-size(calc-size(30px))", "calc-size(calc-size(any, 30px), size)"); +test_typed_om_string("width", "calc-size(calc-size(fit-content, size * 2), size)"); diff --git a/tests/wpt/tests/css/css-values/calc-size/calc-size-width-box-sizing.html b/tests/wpt/tests/css/css-values/calc-size/calc-size-width-box-sizing.html new file mode 100644 index 00000000000..7c6a3db6af6 --- /dev/null +++ b/tests/wpt/tests/css/css-values/calc-size/calc-size-width-box-sizing.html @@ -0,0 +1,190 @@ + +calc-size() on width, with border/padding/margin/box-sizing + + + + + +
+
+
+
+
+ + diff --git a/tests/wpt/tests/css/css-view-transitions/nested/adjust-transform-with-scale.html b/tests/wpt/tests/css/css-view-transitions/nested/adjust-transform-with-scale.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/adjust-transform-with-scale.html rename to tests/wpt/tests/css/css-view-transitions/nested/adjust-transform-with-scale.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/adjust-transform.html b/tests/wpt/tests/css/css-view-transitions/nested/adjust-transform.tenative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/adjust-transform.html rename to tests/wpt/tests/css/css-view-transitions/nested/adjust-transform.tenative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-direct.html b/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-direct.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-direct.html rename to tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-direct.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-nested-vt-names.html b/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-nested-vt-names.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-nested-vt-names.html rename to tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-nested-vt-names.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-nested.html b/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-nested.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-nested.html rename to tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-nested.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-non-ancestor.html b/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-non-ancestor.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-non-ancestor.html rename to tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-non-ancestor.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-non-existent.html b/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-non-existent.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-non-existent.html rename to tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-non-existent.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-self.html b/tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-self.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-self.html rename to tests/wpt/tests/css/css-view-transitions/nested/compute-explicit-name-self.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/contain-direct.tentative.html b/tests/wpt/tests/css/css-view-transitions/nested/contain-direct.tentative.html new file mode 100644 index 00000000000..f4b5cf659cd --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/nested/contain-direct.tentative.html @@ -0,0 +1,16 @@ + + +view-transition: contain should match direct parent + + + + + + + +
+
+
+
+
+ \ No newline at end of file diff --git a/tests/wpt/tests/css/css-view-transitions/nested/contain-nested.tentative.html b/tests/wpt/tests/css/css-view-transitions/nested/contain-nested.tentative.html new file mode 100644 index 00000000000..34d100800b0 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/nested/contain-nested.tentative.html @@ -0,0 +1,16 @@ + + +view-transition: contain should match nested parent + + + + + + + +
+
+
+
+
+ \ No newline at end of file diff --git a/tests/wpt/tests/css/css-view-transitions/nested/contain-on-self.tentative.html b/tests/wpt/tests/css/css-view-transitions/nested/contain-on-self.tentative.html new file mode 100644 index 00000000000..bc5e5b49f27 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/nested/contain-on-self.tentative.html @@ -0,0 +1,16 @@ + + +view-transition: contain doesn't apply to self + + + + + + + +
+
+
+
+
+ \ No newline at end of file diff --git a/tests/wpt/tests/css/css-view-transitions/nested/nearest-direct.html b/tests/wpt/tests/css/css-view-transitions/nested/nearest-direct.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/nearest-direct.html rename to tests/wpt/tests/css/css-view-transitions/nested/nearest-direct.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/nearest-ignores-nearest-name.html b/tests/wpt/tests/css/css-view-transitions/nested/nearest-ignores-nearest-name.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/nearest-ignores-nearest-name.html rename to tests/wpt/tests/css/css-view-transitions/nested/nearest-ignores-nearest-name.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/nearest-nested.html b/tests/wpt/tests/css/css-view-transitions/nested/nearest-nested.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/nearest-nested.html rename to tests/wpt/tests/css/css-view-transitions/nested/nearest-nested.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/nested-exit.tentative.html b/tests/wpt/tests/css/css-view-transitions/nested/nested-exit.tentative.html new file mode 100644 index 00000000000..4612a88a130 --- /dev/null +++ b/tests/wpt/tests/css/css-view-transitions/nested/nested-exit.tentative.html @@ -0,0 +1,55 @@ + + +Nested group should stay nested in an exit transition + + + + + + + + +
+
+
+ \ No newline at end of file diff --git a/tests/wpt/tests/css/css-view-transitions/nested/nested-group-display-none.html b/tests/wpt/tests/css/css-view-transitions/nested/nested-group-display-none.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/nested-group-display-none.html rename to tests/wpt/tests/css/css-view-transitions/nested/nested-group-display-none.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/nested-group-in-pseudo-basic.html b/tests/wpt/tests/css/css-view-transitions/nested/nested-group-in-pseudo-basic.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/nested-group-in-pseudo-basic.html rename to tests/wpt/tests/css/css-view-transitions/nested/nested-group-in-pseudo-basic.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/normal-goes-up.html b/tests/wpt/tests/css/css-view-transitions/nested/normal-goes-up.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/normal-goes-up.html rename to tests/wpt/tests/css/css-view-transitions/nested/normal-goes-up.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/render-element.html b/tests/wpt/tests/css/css-view-transitions/nested/render-element.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/nested/render-element.html rename to tests/wpt/tests/css/css-view-transitions/nested/render-element.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/nested/resources/compute-common.css b/tests/wpt/tests/css/css-view-transitions/nested/resources/compute-common.css index 92cb8243c0b..762300d04fa 100644 --- a/tests/wpt/tests/css/css-view-transitions/nested/resources/compute-common.css +++ b/tests/wpt/tests/css/css-view-transitions/nested/resources/compute-common.css @@ -46,6 +46,11 @@ html.no-match::view-transition { .normal-ref { view-transition-group: normal; } + +.contain-ref { + view-transition-group: contain; +} + ::view-transition-group(green) { background: green; } diff --git a/tests/wpt/tests/css/css-view-transitions/nested/resources/compute-test.js b/tests/wpt/tests/css/css-view-transitions/nested/resources/compute-test.js index 6d3905239c7..b08b58287b0 100644 --- a/tests/wpt/tests/css/css-view-transitions/nested/resources/compute-test.js +++ b/tests/wpt/tests/css/css-view-transitions/nested/resources/compute-test.js @@ -1,7 +1,32 @@ failIfNot(document.startViewTransition, "Missing document.startViewTransition"); -function runTest() { - document.startViewTransition().ready.then(() => takeScreenshot()); +function add_rule() { + const style = document.createElement("style"); + style.innerHTML = "@view-transition { navigation: auto }"; + document.head.append(style); +} + +const mode = new URLSearchParams(location.search).get("vtmode"); +if (mode === "crossdoc") { + onload = () => { + const url = new URL(location.href); + url.searchParams.set("vtmode", "crossdoc-newpage"); + location.replace(url.href); + }; + add_rule(); +} else if (mode === "crossdoc-newpage") { + document.documentElement.classList.add("vt-new"); + add_rule(); + takeScreenshot(); +} else { + onload = async() => { + const transition = document.startViewTransition(() => { + document.documentElement.classList.add("vt-new"); + }); + transition.finished.then(() => { + document.documentElement.classList.remove("vt-new"); + }); + transition.ready.then(() => takeScreenshot()); + } } -onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); diff --git a/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-group-invalid.html b/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-group-invalid.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/parsing/view-transition-group-invalid.html rename to tests/wpt/tests/css/css-view-transitions/parsing/view-transition-group-invalid.tentative.html diff --git a/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-group-valid.html b/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-group-valid.tentative.html similarity index 100% rename from tests/wpt/tests/css/css-view-transitions/parsing/view-transition-group-valid.html rename to tests/wpt/tests/css/css-view-transitions/parsing/view-transition-group-valid.tentative.html diff --git a/tests/wpt/tests/css/selectors/WEB_FEATURES.yml b/tests/wpt/tests/css/selectors/WEB_FEATURES.yml index 89c6f53f8f9..ed4b7175a72 100644 --- a/tests/wpt/tests/css/selectors/WEB_FEATURES.yml +++ b/tests/wpt/tests/css/selectors/WEB_FEATURES.yml @@ -1,4 +1,9 @@ features: +- name: dir-pseudo + files: + - dir-pseudo-* + - dir-selector-* + - dir-style-* - name: focus-visible files: - focus-visible-* diff --git a/tests/wpt/tests/dom/ranges/Range-isPointInRange-shadowdom.tentative.html b/tests/wpt/tests/dom/ranges/Range-isPointInRange-shadowdom.tentative.html index a90ddcf5847..e6768693ff1 100644 --- a/tests/wpt/tests/dom/ranges/Range-isPointInRange-shadowdom.tentative.html +++ b/tests/wpt/tests/dom/ranges/Range-isPointInRange-shadowdom.tentative.html @@ -25,7 +25,7 @@ test(function() { window.getSelection().setBaseAndExtent(start.firstChild, 3, end.firstChild, 3); - const composedRange = window.getSelection().getComposedRanges(shadowRoot)[0]; + const composedRange = window.getSelection().getComposedRanges({ shadowRoots: [shadowRoot] })[0]; // Sanity check to make sure we have selected something across the shadow boundary. assert_true(composedRange.startContainer == start.firstChild); assert_true(composedRange.startOffset == 3); @@ -40,7 +40,6 @@ test(function() { }, "isPointInRange() test for collapsed selection"); test(function() { - assert_implements(window.getSelection().getComposedRanges, "GetComposedRanges is not supported"); const start = document.getElementById("start"); const shadowRoot = document.getElementById("host").shadowRoot; diff --git a/tests/wpt/tests/fedcm/fedcm-login-status/logged-out.https.html b/tests/wpt/tests/fedcm/fedcm-login-status/logged-out.https.html index 4d11e64ff37..51c7c1a710b 100644 --- a/tests/wpt/tests/fedcm/fedcm-login-status/logged-out.https.html +++ b/tests/wpt/tests/fedcm/fedcm-login-status/logged-out.https.html @@ -20,7 +20,11 @@ async function createIframeWithPermissionPolicyAndWaitForMessage(test, iframeUrl iframe.src = iframeUrl; iframe.allow = "identity-credentials-get"; document.body.appendChild(iframe); - const message = await messageWatcher.wait_for("message"); + let message = null; + // Ignore internal "testdriver-complete" messages. + do { + message = await messageWatcher.wait_for("message"); + } while (!("result" in message.data)); return message.data; } diff --git a/tests/wpt/tests/fenced-frame/notify-event-prevent-caching.https.html b/tests/wpt/tests/fenced-frame/notify-event-prevent-caching.https.html index 872bab5b872..ad2d0115131 100644 --- a/tests/wpt/tests/fenced-frame/notify-event-prevent-caching.https.html +++ b/tests/wpt/tests/fenced-frame/notify-event-prevent-caching.https.html @@ -1,4 +1,5 @@ + @@ -63,7 +64,7 @@ // 0 = NONE, no longer dispatching. assert_equals(window.cached_event.eventPhase, 0); window.fence.notifyEvent(window.cached_event); - reject('notifyEvent should not fire from a mousedown event.'); + reject('notifyEvent() should not fire.'); } catch (err) { if (err.name != 'SecurityError') { reject('Unexpected error: ' + err.message); @@ -95,7 +96,67 @@ ]); assert_equals(result, 'timeout'); - }, "Test that fenced frame notifyEvent() cannot reuse a cached event after dispatch finishes."); + }, 'Test that fenced frame notifyEvent() cannot reuse a cached event' + + ' after dispatch finishes.'); + + promise_test(async (t) => { + const fencedframe = await attachFencedFrameContext( + {generator_api: 'fledge'}); + + await fencedframe.execute(() => { + window.first_click_listener = (e) => { + window.cached_event = e; + }; + document.addEventListener('click', window.first_click_listener); + }); + + await multiClick(10, 10, fencedframe.element); + + let notified_promise = new Promise((resolve) => { + fencedframe.element.addEventListener('fencedtreeclick', () => resolve()); + }); + + await fencedframe.execute(() => { + document.removeEventListener('click', window.first_click_listener); + window.activation_promise = new Promise((resolve, reject) => { + document.addEventListener('click', (e) => { + try { + assert_equals(window.cached_event.type, 'click'); + assert_true(window.cached_event.isTrusted); + assert_true(navigator.userActivation.isActive); + // 0 = NONE, no longer dispatching. + assert_equals(window.cached_event.eventPhase, 0); + window.fence.notifyEvent(window.cached_event); + reject('notifyEvent() should not fire.'); + } catch (err) { + if (err.name != 'SecurityError') { + reject('Unexpected error: ' + err.message); + return; + } + resolve('PASS'); + } + }); + }); + }); + + await multiClick(10, 10, fencedframe.element); + + await fencedframe.execute(async () => { + await window.activation_promise; + }); + + // Lastly, we need to make sure the notifyEvent call never reached the + // parent frame. + let result = await Promise.race([ + notified_promise, + new Promise((resolve) => { + t.step_timeout(() => resolve('timeout'), 2000); + }) + ]); + assert_equals(result, 'timeout'); + + }, 'Test that fenced frame notifyEvent() cannot reuse a cached event' + + ' after dispatch finishes, even if it has never been notified before.'); diff --git a/tests/wpt/tests/fetch/api/resources/keepalive-helper.js b/tests/wpt/tests/fetch/api/resources/keepalive-helper.js index f6f511631e5..1e75c060aea 100644 --- a/tests/wpt/tests/fetch/api/resources/keepalive-helper.js +++ b/tests/wpt/tests/fetch/api/resources/keepalive-helper.js @@ -174,3 +174,26 @@ function keepaliveRedirectInUnloadTest(desc, { desc, token, {expectTokenExist: expectFetchSucceed}); }, `${desc}; setting up`); } + +/** +* utility to create pending keepalive fetch requests +* The pending request state is achieved by ensuring the server (trickle.py) does not +* immediately respond to the fetch requests. +* The response delay is set as a url parameter. +*/ + +function createPendingKeepAliveRequest(delay, remote = false) { + // trickle.py is a script that can make a delayed response to the client request + const trickleRemoteURL = get_host_info().HTTPS_REMOTE_ORIGIN + '/fetch/api/resources/trickle.py?count=1&ms='; + const trickleLocalURL = get_host_info().HTTP_ORIGIN + '/fetch/api/resources/trickle.py?count=1&ms='; + url = remote ? trickleRemoteURL : trickleLocalURL; + + const body = '*'.repeat(10); + return fetch(url + delay, { keepalive: true, body, method: 'POST' }).then(res => { + return res.text(); + }).then(() => { + return new Promise(resolve => step_timeout(resolve, 1)); + }).catch((error) => { + return Promise.reject(error);; + }) +} diff --git a/tests/wpt/tests/html/canvas/element/reset/2d.reset.after-rasterization-expected.html b/tests/wpt/tests/html/canvas/element/reset/2d.reset.after-rasterization-expected.html new file mode 100644 index 00000000000..048c6fca015 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/reset/2d.reset.after-rasterization-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.reset.after-rasterization +

2d.reset.after-rasterization

+

Reset after rasterizing a frame discards frame content.

+ +

FAIL (fallback content)

+
+ diff --git a/tests/wpt/tests/html/canvas/element/reset/2d.reset.after-rasterization.html b/tests/wpt/tests/html/canvas/element/reset/2d.reset.after-rasterization.html new file mode 100644 index 00000000000..365fdefbb44 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/reset/2d.reset.after-rasterization.html @@ -0,0 +1,22 @@ + + + +Canvas test: 2d.reset.after-rasterization +

2d.reset.after-rasterization

+

Reset after rasterizing a frame discards frame content.

+ +

FAIL (fallback content)

+
+ diff --git a/tests/wpt/tests/html/canvas/offscreen/reset/2d.reset.after-rasterization-expected.html b/tests/wpt/tests/html/canvas/offscreen/reset/2d.reset.after-rasterization-expected.html new file mode 100644 index 00000000000..048c6fca015 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/reset/2d.reset.after-rasterization-expected.html @@ -0,0 +1,15 @@ + + +Canvas test: 2d.reset.after-rasterization +

2d.reset.after-rasterization

+

Reset after rasterizing a frame discards frame content.

+ +

FAIL (fallback content)

+
+ diff --git a/tests/wpt/tests/html/canvas/offscreen/reset/2d.reset.after-rasterization.html b/tests/wpt/tests/html/canvas/offscreen/reset/2d.reset.after-rasterization.html new file mode 100644 index 00000000000..b78b19d2900 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/reset/2d.reset.after-rasterization.html @@ -0,0 +1,25 @@ + + + +Canvas test: 2d.reset.after-rasterization +

2d.reset.after-rasterization

+

Reset after rasterizing a frame discards frame content.

+ +

FAIL (fallback content)

+
+ diff --git a/tests/wpt/tests/html/canvas/offscreen/reset/2d.reset.after-rasterization.w.html b/tests/wpt/tests/html/canvas/offscreen/reset/2d.reset.after-rasterization.w.html new file mode 100644 index 00000000000..00ba44133c6 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/reset/2d.reset.after-rasterization.w.html @@ -0,0 +1,39 @@ + + + + +Canvas test: 2d.reset.after-rasterization +

2d.reset.after-rasterization

+

Reset after rasterizing a frame discards frame content.

+ +

FAIL (fallback content)

+
+ + + diff --git a/tests/wpt/tests/html/canvas/tools/yaml-new/reset.yaml b/tests/wpt/tests/html/canvas/tools/yaml-new/reset.yaml index 27764e4550e..903f16b7cee 100644 --- a/tests/wpt/tests/html/canvas/tools/yaml-new/reset.yaml +++ b/tests/wpt/tests/html/canvas/tools/yaml-new/reset.yaml @@ -12,6 +12,21 @@ @assert pixel 100,0 == 0,0,0,0; t.done(); +- name: 2d.reset.after-rasterization + desc: Reset after rasterizing a frame discards frame content. + code: | + ctx.fillStyle = 'rgba(255, 0, 0, 1)'; + ctx.fillRect(0, 0, {{ size[0] }}, {{ size[1] }}); + + ctx.getImageData(0, 0, 1, 1); // Force previous draw calls to be rendered. + ctx.reset(); + + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, {{ size[0] }}, {{ (size[1] / 2) | int }}); + reference: | + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, {{ size[0] }}, {{ (size[1] / 2) | int }}); + - name: 2d.reset.state desc: check that the state is reset code: | diff --git a/tests/wpt/tests/html/dom/elements/global-attributes/the-anchor-attribute-004.tentative.html b/tests/wpt/tests/html/dom/elements/global-attributes/the-anchor-attribute-004.tentative.html new file mode 100644 index 00000000000..388e7177662 --- /dev/null +++ b/tests/wpt/tests/html/dom/elements/global-attributes/the-anchor-attribute-004.tentative.html @@ -0,0 +1,17 @@ + + + + + + +
Anchor 1
+
Anchor 2
+ + + diff --git a/tests/wpt/tests/html/dom/elements/global-attributes/the-anchor-attribute-xml.tentative.html b/tests/wpt/tests/html/dom/elements/global-attributes/the-anchor-attribute-xml.tentative.html index c5e6d81826d..6e060529887 100644 --- a/tests/wpt/tests/html/dom/elements/global-attributes/the-anchor-attribute-xml.tentative.html +++ b/tests/wpt/tests/html/dom/elements/global-attributes/the-anchor-attribute-xml.tentative.html @@ -9,17 +9,16 @@ test(() => { const xmlDoc = document.implementation.createDocument(null, 'root', null); assert_equals(xmlDoc.contentType, 'application/xml'); - xmlDoc.documentElement.innerHTML = '
target
anchored
'; - assert_equals(xmlDoc.documentElement.innerHTML, - '
target
anchored
'); - const target = xmlDoc.documentElement.children[0]; - const anchored = xmlDoc.documentElement.children[1]; + const innerDoc = xmlDoc.documentElement; + const html = '
target
anchored
'; + innerDoc.innerHTML = html; + assert_equals(innerDoc.innerHTML, html); + const target = innerDoc.children[0]; + const anchored = innerDoc.children[1]; - assert_equals(xmlDoc.documentElement.children[1].anchorElement, null, - 'Setting the anchor attribute in XML should not set the anchorElement IDL.'); + assert_equals(anchored.anchorElement, target, 'Setting the anchor attribute in XML should work.'); anchored.anchorElement = target; - assert_equals(xmlDoc.documentElement.children[1].anchorElement, null, - 'Setting element.anchorElement in an XML document should not set the anchorElement IDL.'); + assert_equals(anchored.anchorElement, target, 'Setting element.anchorElement in an XML document should work.'); }); diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html index 2d18789896b..2f2608bbc0d 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/decode/image-decode-with-quick-attach.html @@ -7,26 +7,81 @@ - + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/update-the-image-data/current-request-microtask-002.html b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/update-the-image-data/current-request-microtask-002.html index a843f222822..636f5328b7b 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-img-element/update-the-image-data/current-request-microtask-002.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-img-element/update-the-image-data/current-request-microtask-002.html @@ -17,11 +17,15 @@ async_test(function(t) { testSrcOnMicrotask(""); img = new Image(); let png = "/images/green.png?" + Math.random(); + let resolved_png = new URL(png, document.documentURI).href; testSrcOnMicrotask(""); - // Both .src assignment and appendChild are relevant mutations. So the first task should be "canceled" (return early). + // Both .src and .srcset assignments are relevant mutations. So the first task should be "canceled" (return early). + // appendChild is not a relevant mutation unless in a element. img.src = png; testSrcOnMicrotask(""); + img.srcset = png; + testSrcOnMicrotask(resolved_png); document.body.appendChild(img); - testSrcOnMicrotask(new URL(png, document.documentURI).href, /* done = */ true); + testSrcOnMicrotask(resolved_png, /* done = */ true); }); diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-object-element/object-image-click.sub.html b/tests/wpt/tests/html/semantics/embedded-content/the-object-element/object-image-click.sub.html new file mode 100644 index 00000000000..ba8f1ecd9d7 --- /dev/null +++ b/tests/wpt/tests/html/semantics/embedded-content/the-object-element/object-image-click.sub.html @@ -0,0 +1,39 @@ + + +HTML Test: object - attributes + + + + + + + + + + + + diff --git a/tests/wpt/tests/html/semantics/forms/the-label-element/control-active-with-multiple-clicks.html b/tests/wpt/tests/html/semantics/forms/the-label-element/control-active-with-multiple-clicks.html new file mode 100644 index 00000000000..1b5c6a3b939 --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-label-element/control-active-with-multiple-clicks.html @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + +

Manual Testing Instructions

+

+ The test is automatic, but if you wish to test it manually, you can do so by following the steps below. +

+
    +
  1. + Click on the label of the interactive element of your choosing. For example, + you can click on the label of the first button element by clicking on the text "button1". + Do not click on anything afterwards before the next step. +
  2. +
  3. + Expected behavior: While mousedowning, the element on the right of the title text + should have received a red outline for the duration of the mousedown. +
  4. +
  5. + Click again on the same label (do not double-click, wait a second before clicking again). +
  6. +
  7. + Expected behavior: Again, while mousedowning on the click, + the element on the right of the title text should have received a red outline. +
  8. +
  9. + Expected behavior: The above steps should pass for all the labels on this page. +
  10. +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + + + diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/closed-listbox-rendering-ref.html b/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/closed-listbox-rendering-ref.html new file mode 100644 index 00000000000..d1a1f1bb61f --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/closed-listbox-rendering-ref.html @@ -0,0 +1,15 @@ + + + + + diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/closed-listbox-rendering.tentative.html b/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/closed-listbox-rendering.tentative.html new file mode 100644 index 00000000000..4d46aba2281 --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/closed-listbox-rendering.tentative.html @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/select-option-images-ref.html b/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/select-option-images-ref.html new file mode 100644 index 00000000000..814e01f8d8f --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/select-option-images-ref.html @@ -0,0 +1,15 @@ + + + +
+ +
+
green-16x16
+
red-16x16
+
+
+ + diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/select-option-images.tentative.html b/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/select-option-images.tentative.html new file mode 100644 index 00000000000..9768810f6f5 --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/select-option-images.tentative.html @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/selectedoptionelement-attr.tentative.html b/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/selectedoptionelement-attr.tentative.html new file mode 100644 index 00000000000..63b4af3abc8 --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-select-element/stylable-select/selectedoptionelement-attr.tentative.html @@ -0,0 +1,47 @@ + + + + + + + + + + diff --git a/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-option-arbitrary-content-not-displayed-ref.tentative.html b/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-option-arbitrary-content-not-displayed-ref.tentative.html deleted file mode 100644 index fa44198fff0..00000000000 --- a/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-option-arbitrary-content-not-displayed-ref.tentative.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-option-arbitrary-content-not-displayed.tentative.html b/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-option-arbitrary-content-not-displayed.tentative.html deleted file mode 100644 index e7cacdba271..00000000000 --- a/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-option-arbitrary-content-not-displayed.tentative.html +++ /dev/null @@ -1,25 +0,0 @@ - - -HTMLSelectListElement Test: option arbitrary content not displayed - - - - - - - - - - diff --git a/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-parts-structure.tentative.html b/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-parts-structure.tentative.html deleted file mode 100644 index 104ae841f71..00000000000 --- a/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-parts-structure.tentative.html +++ /dev/null @@ -1,495 +0,0 @@ - - -HTMLSelectListElement Test: part structure - - - - - - - - -
- - -
three
-
- -
- - - - - - - - - - - - -
- This is some text. - - More text. -
-
- - -
- -
- -
- - - -
-
- - -
-
-
- - -
- -
-
- - -
- - - -
-
-
- - - -
- -
- - - -
- -
- - -
-
- - -
-
-
- - -
- -
-
Test
-
- - - - - - - - - - -
-
- - -
- -
-
-
-
- - -
-
-
- - -
-
-
- - - - - - - - -
- -
- - -
-
- -
-
- -
- - diff --git a/tests/wpt/tests/html/semantics/selectors/pseudo-classes/WEB_FEATURES.yml b/tests/wpt/tests/html/semantics/selectors/pseudo-classes/WEB_FEATURES.yml index 2877344b649..c3855d6d730 100644 --- a/tests/wpt/tests/html/semantics/selectors/pseudo-classes/WEB_FEATURES.yml +++ b/tests/wpt/tests/html/semantics/selectors/pseudo-classes/WEB_FEATURES.yml @@ -5,6 +5,11 @@ features: - name: default files: - default.html +- name: dir-pseudo + files: + - dir-* + - dir.html + - dir01.html - name: indeterminate files: - checked-indeterminate.window.js diff --git a/tests/wpt/tests/interfaces/EXT_disjoint_timer_query.idl b/tests/wpt/tests/interfaces/EXT_disjoint_timer_query.idl index cf0c8d9a286..d2ed383c038 100644 --- a/tests/wpt/tests/interfaces/EXT_disjoint_timer_query.idl +++ b/tests/wpt/tests/interfaces/EXT_disjoint_timer_query.idl @@ -19,7 +19,7 @@ interface EXT_disjoint_timer_query { const GLenum TIMESTAMP_EXT = 0x8E28; const GLenum GPU_DISJOINT_EXT = 0x8FBB; - WebGLTimerQueryEXT? createQueryEXT(); + WebGLTimerQueryEXT createQueryEXT(); undefined deleteQueryEXT(WebGLTimerQueryEXT? query); [WebGLHandlesContextLoss] boolean isQueryEXT(WebGLTimerQueryEXT? query); undefined beginQueryEXT(GLenum target, WebGLTimerQueryEXT query); diff --git a/tests/wpt/tests/interfaces/META.yml b/tests/wpt/tests/interfaces/META.yml index c1dd8dddf9e..94e06fb1ce5 100644 --- a/tests/wpt/tests/interfaces/META.yml +++ b/tests/wpt/tests/interfaces/META.yml @@ -1,2 +1,4 @@ suggested_reviewers: - foolip + - past + - schenney-chromium diff --git a/tests/wpt/tests/interfaces/OES_vertex_array_object.idl b/tests/wpt/tests/interfaces/OES_vertex_array_object.idl index 8aeb7459f3b..e2252ad59d9 100644 --- a/tests/wpt/tests/interfaces/OES_vertex_array_object.idl +++ b/tests/wpt/tests/interfaces/OES_vertex_array_object.idl @@ -11,7 +11,7 @@ interface WebGLVertexArrayObjectOES : WebGLObject { interface OES_vertex_array_object { const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5; - WebGLVertexArrayObjectOES? createVertexArrayOES(); + WebGLVertexArrayObjectOES createVertexArrayOES(); undefined deleteVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); undefined bindVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); diff --git a/tests/wpt/tests/interfaces/css-anchor-position.idl b/tests/wpt/tests/interfaces/css-anchor-position.idl index 5eeaa030b85..890d9929086 100644 --- a/tests/wpt/tests/interfaces/css-anchor-position.idl +++ b/tests/wpt/tests/interfaces/css-anchor-position.idl @@ -79,6 +79,6 @@ interface CSSPositionTryDescriptors : CSSStyleDeclaration { attribute CSSOMString justify-self; attribute CSSOMString positionAnchor; attribute CSSOMString position-anchor; - attribute CSSOMString insetArea; - attribute CSSOMString inset-area; + attribute CSSOMString positionArea; + attribute CSSOMString position-area; }; diff --git a/tests/wpt/tests/interfaces/css-conditional.idl b/tests/wpt/tests/interfaces/css-conditional.idl index d87f305fddf..eace34c0f49 100644 --- a/tests/wpt/tests/interfaces/css-conditional.idl +++ b/tests/wpt/tests/interfaces/css-conditional.idl @@ -15,10 +15,12 @@ interface CSSConditionRule : CSSGroupingRule { [Exposed=Window] interface CSSMediaRule : CSSConditionRule { [SameObject, PutForwards=mediaText] readonly attribute MediaList media; + readonly attribute boolean matches; }; [Exposed=Window] interface CSSSupportsRule : CSSConditionRule { + readonly attribute boolean matches; }; partial namespace CSS { diff --git a/tests/wpt/tests/interfaces/css-font-loading.idl b/tests/wpt/tests/interfaces/css-font-loading.idl index 100f1f7fed5..5e5f4252a40 100644 --- a/tests/wpt/tests/interfaces/css-font-loading.idl +++ b/tests/wpt/tests/interfaces/css-font-loading.idl @@ -97,8 +97,6 @@ enum FontFaceSetLoadStatus { "loading", "loaded" }; [Exposed=(Window,Worker)] interface FontFaceSet : EventTarget { - constructor(sequence initialFaces); - setlike; FontFaceSet add(FontFace font); boolean delete(FontFace font); diff --git a/tests/wpt/tests/interfaces/css-mixins.idl b/tests/wpt/tests/interfaces/css-mixins.idl new file mode 100644 index 00000000000..49806ab5470 --- /dev/null +++ b/tests/wpt/tests/interfaces/css-mixins.idl @@ -0,0 +1,7 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: CSS Functions and Mixins Module (https://drafts.csswg.org/css-mixins-1/) + +[Exposed=Window] +interface CSSFunctionRule : CSSGroupingRule { }; diff --git a/tests/wpt/tests/interfaces/css-view-transitions-2.idl b/tests/wpt/tests/interfaces/css-view-transitions-2.idl index 559870751a2..774cb655bda 100644 --- a/tests/wpt/tests/interfaces/css-view-transitions-2.idl +++ b/tests/wpt/tests/interfaces/css-view-transitions-2.idl @@ -3,10 +3,6 @@ // (https://github.com/w3c/webref) // Source: CSS View Transitions Module Level 2 (https://drafts.csswg.org/css-view-transitions-2/) -partial interface CSSRule { - const unsigned short VIEW_TRANSITION_RULE = 15; -}; - enum ViewTransitionNavigation { "auto", "none" }; [Exposed=Window] diff --git a/tests/wpt/tests/interfaces/cssom.idl b/tests/wpt/tests/interfaces/cssom.idl index 1e70e1f8bca..7f9aefdb97e 100644 --- a/tests/wpt/tests/interfaces/cssom.idl +++ b/tests/wpt/tests/interfaces/cssom.idl @@ -130,7 +130,8 @@ interface CSSPageDescriptors : CSSStyleDeclaration { attribute [LegacyNullToEmptyString] CSSOMString margin-bottom; attribute [LegacyNullToEmptyString] CSSOMString margin-left; attribute [LegacyNullToEmptyString] CSSOMString size; - attribute [LegacyNullToEmptyString] CSSOMString orientation; + attribute [LegacyNullToEmptyString] CSSOMString pageOrientation; + attribute [LegacyNullToEmptyString] CSSOMString page-orientation; attribute [LegacyNullToEmptyString] CSSOMString marks; attribute [LegacyNullToEmptyString] CSSOMString bleed; }; diff --git a/tests/wpt/tests/interfaces/html.idl b/tests/wpt/tests/interfaces/html.idl index 4d6c0229bc1..f7ad9ac2dde 100644 --- a/tests/wpt/tests/interfaces/html.idl +++ b/tests/wpt/tests/interfaces/html.idl @@ -1411,8 +1411,6 @@ interface mixin CanvasDrawPath { interface mixin CanvasUserInterface { undefined drawFocusIfNeeded(Element element); undefined drawFocusIfNeeded(Path2D path, Element element); - undefined scrollPathIntoView(); - undefined scrollPathIntoView(Path2D path); }; interface mixin CanvasText { diff --git a/tests/wpt/tests/interfaces/mediasession.idl b/tests/wpt/tests/interfaces/mediasession.idl index 0630f48da4b..00bfe6ad216 100644 --- a/tests/wpt/tests/interfaces/mediasession.idl +++ b/tests/wpt/tests/interfaces/mediasession.idl @@ -30,7 +30,8 @@ enum MediaSessionAction { "hangup", "previousslide", "nextslide", - "enterpictureinpicture" + "enterpictureinpicture", + "voiceactivity" }; callback MediaSessionActionHandler = undefined(MediaSessionActionDetails details); diff --git a/tests/wpt/tests/interfaces/payment-request.idl b/tests/wpt/tests/interfaces/payment-request.idl index 0a97d4d75c1..50c12fe49c3 100644 --- a/tests/wpt/tests/interfaces/payment-request.idl +++ b/tests/wpt/tests/interfaces/payment-request.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Payment Request API 1.1 (https://w3c.github.io/payment-request/) +// Source: Payment Request API (https://w3c.github.io/payment-request/) [SecureContext, Exposed=Window] interface PaymentRequest : EventTarget { diff --git a/tests/wpt/tests/interfaces/shared-storage.idl b/tests/wpt/tests/interfaces/shared-storage.idl index 9582f872f94..7f4976b7b20 100644 --- a/tests/wpt/tests/interfaces/shared-storage.idl +++ b/tests/wpt/tests/interfaces/shared-storage.idl @@ -5,6 +5,8 @@ typedef (USVString or FencedFrameConfig) SharedStorageResponse; +enum SharedStorageDataOrigin { "context-origin", "script-origin" }; + [Exposed=(Window)] interface SharedStorageWorklet : Worklet { Promise selectURL(DOMString name, @@ -52,7 +54,7 @@ interface WindowSharedStorage : SharedStorage { Promise run(DOMString name, optional SharedStorageRunOperationMethodOptions options = {}); - Promise createWorklet(USVString moduleURL, optional WorkletOptions options = {}); + Promise createWorklet(USVString moduleURL, optional SharedStorageWorkletOptions options = {}); readonly attribute SharedStorageWorklet worklet; }; @@ -63,6 +65,10 @@ dictionary SharedStorageRunOperationMethodOptions { boolean keepAlive = false; }; +dictionary SharedStorageWorkletOptions : WorkletOptions { + SharedStorageDataOrigin dataOrigin = "context-origin"; +}; + partial interface Window { [SecureContext] readonly attribute WindowSharedStorage? sharedStorage; }; diff --git a/tests/wpt/tests/interfaces/touch-events.idl b/tests/wpt/tests/interfaces/touch-events.idl index 9844f085381..19f55156a6e 100644 --- a/tests/wpt/tests/interfaces/touch-events.idl +++ b/tests/wpt/tests/interfaces/touch-events.idl @@ -53,9 +53,9 @@ interface TouchList { }; dictionary TouchEventInit : EventModifierInit { - sequence touches = []; - sequence targetTouches = []; - sequence changedTouches = []; + sequence touches = []; + sequence targetTouches = []; + sequence changedTouches = []; }; [Exposed=Window] diff --git a/tests/wpt/tests/interfaces/turtledove.idl b/tests/wpt/tests/interfaces/turtledove.idl index b7a1775a2ce..314f2f07d92 100644 --- a/tests/wpt/tests/interfaces/turtledove.idl +++ b/tests/wpt/tests/interfaces/turtledove.idl @@ -67,6 +67,10 @@ partial interface Navigator { readonly attribute boolean deprecatedRunAdAuctionEnforcesKAnonymity; }; +dictionary AuctionRealTimeReportingConfig { + required DOMString type; +}; + dictionary AuctionAdConfig { required USVString seller; required USVString decisionLogicURL; @@ -95,6 +99,8 @@ dictionary AuctionAdConfig { sequence> allSlotsRequestedSizes; Promise additionalBids; DOMString auctionNonce; + AuctionRealTimeReportingConfig sellerRealTimeReportingConfig; + record perBuyerRealTimeReportingConfig; sequence componentAuctions = []; AbortSignal? signal; Promise resolveToConfig; @@ -120,11 +126,22 @@ interface ForDebuggingOnly { undefined reportAdAuctionLoss(USVString url); }; +[Exposed=InterestGroupBiddingAndScoringScriptRunnerGlobalScope] +interface RealTimeReporting { + undefined contributeToHistogram(RealTimeContribution contribution); +}; + +dictionary RealTimeContribution { + required long bucket; + required double priorityWeight; + long latencyThreshold; +}; + [Exposed=InterestGroupBiddingAndScoringScriptRunnerGlobalScope, Global=InterestGroupBiddingAndScoringScriptRunnerGlobalScope] interface InterestGroupBiddingAndScoringScriptRunnerGlobalScope : InterestGroupScriptRunnerGlobalScope { - readonly attribute ForDebuggingOnly forDebuggingOnly; + readonly attribute RealTimeReporting realTimeReporting; }; [Exposed=InterestGroupBiddingScriptRunnerGlobalScope, @@ -215,6 +232,7 @@ dictionary BiddingBrowserSignals { sequence prevWinsMs; object wasmHelper; unsigned long dataVersion; + unsigned long crossOriginDataVersion; boolean forDebuggingOnlyInCooldownOrLockout = false; }; @@ -227,6 +245,7 @@ dictionary ScoringBrowserSignals { record renderSize; unsigned long dataVersion; + unsigned long crossOriginDataVersion; sequence adComponents; boolean forDebuggingOnlyInCooldownOrLockout = false; }; diff --git a/tests/wpt/tests/interfaces/webaudio.idl b/tests/wpt/tests/interfaces/webaudio.idl index 73dc35d2609..74aab7e2362 100644 --- a/tests/wpt/tests/interfaces/webaudio.idl +++ b/tests/wpt/tests/interfaces/webaudio.idl @@ -82,6 +82,7 @@ interface AudioContext : BaseAudioContext { [SecureContext] readonly attribute (DOMString or AudioSinkInfo) sinkId; [SecureContext] readonly attribute AudioRenderCapacity renderCapacity; attribute EventHandler onsinkchange; + attribute EventHandler onerror; AudioTimestamp getOutputTimestamp (); Promise resume (); Promise suspend (); diff --git a/tests/wpt/tests/interfaces/webauthn.idl b/tests/wpt/tests/interfaces/webauthn.idl index e52b62b055e..c44df9b26a6 100644 --- a/tests/wpt/tests/interfaces/webauthn.idl +++ b/tests/wpt/tests/interfaces/webauthn.idl @@ -38,7 +38,7 @@ dictionary AuthenticatorAttestationResponseJSON { // algorithm then the public key must be parsed directly from // attestationObject or authenticatorData. Base64URLString publicKey; - required long long publicKeyAlgorithm; + required COSEAlgorithmIdentifier publicKeyAlgorithm; // This value contains copies of some of the fields above. See // section “Easily accessing credential data”. required Base64URLString attestationObject; @@ -272,6 +272,7 @@ enum ClientCapability { "hybridTransport", "passkeyPlatformAuthenticator", "userVerifyingPlatformAuthenticator", + "relatedOrigins" }; enum PublicKeyCredentialHints { diff --git a/tests/wpt/tests/interfaces/webcodecs.idl b/tests/wpt/tests/interfaces/webcodecs.idl index 690a8ac942e..52731257f1f 100644 --- a/tests/wpt/tests/interfaces/webcodecs.idl +++ b/tests/wpt/tests/interfaces/webcodecs.idl @@ -488,7 +488,7 @@ interface ImageDecoder { static Promise isTypeSupported(DOMString type); }; -typedef (BufferSource or ReadableStream) ImageBufferSource; +typedef (AllowSharedBufferSource or ReadableStream) ImageBufferSource; dictionary ImageDecoderInit { required DOMString type; required ImageBufferSource data; diff --git a/tests/wpt/tests/interfaces/webgl1.idl b/tests/wpt/tests/interfaces/webgl1.idl index 655c294fc1e..c345b142721 100644 --- a/tests/wpt/tests/interfaces/webgl1.idl +++ b/tests/wpt/tests/interfaces/webgl1.idl @@ -561,12 +561,12 @@ interface mixin WebGLRenderingContextBase undefined copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); - WebGLBuffer? createBuffer(); - WebGLFramebuffer? createFramebuffer(); - WebGLProgram? createProgram(); - WebGLRenderbuffer? createRenderbuffer(); + WebGLBuffer createBuffer(); + WebGLFramebuffer createFramebuffer(); + WebGLProgram createProgram(); + WebGLRenderbuffer createRenderbuffer(); WebGLShader? createShader(GLenum type); - WebGLTexture? createTexture(); + WebGLTexture createTexture(); undefined cullFace(GLenum mode); diff --git a/tests/wpt/tests/interfaces/webgl2.idl b/tests/wpt/tests/interfaces/webgl2.idl index 25c2b4dad28..92ff70b3f86 100644 --- a/tests/wpt/tests/interfaces/webgl2.idl +++ b/tests/wpt/tests/interfaces/webgl2.idl @@ -423,7 +423,7 @@ interface mixin WebGL2RenderingContextBase undefined clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); /* Query Objects */ - WebGLQuery? createQuery(); + WebGLQuery createQuery(); undefined deleteQuery(WebGLQuery? query); [WebGLHandlesContextLoss] GLboolean isQuery(WebGLQuery? query); undefined beginQuery(GLenum target, WebGLQuery query); @@ -432,7 +432,7 @@ interface mixin WebGL2RenderingContextBase any getQueryParameter(WebGLQuery query, GLenum pname); /* Sampler Objects */ - WebGLSampler? createSampler(); + WebGLSampler createSampler(); undefined deleteSampler(WebGLSampler? sampler); [WebGLHandlesContextLoss] GLboolean isSampler(WebGLSampler? sampler); undefined bindSampler(GLuint unit, WebGLSampler? sampler); @@ -449,7 +449,7 @@ interface mixin WebGL2RenderingContextBase any getSyncParameter(WebGLSync sync, GLenum pname); /* Transform Feedback */ - WebGLTransformFeedback? createTransformFeedback(); + WebGLTransformFeedback createTransformFeedback(); undefined deleteTransformFeedback(WebGLTransformFeedback? tf); [WebGLHandlesContextLoss] GLboolean isTransformFeedback(WebGLTransformFeedback? tf); undefined bindTransformFeedback (GLenum target, WebGLTransformFeedback? tf); @@ -472,7 +472,7 @@ interface mixin WebGL2RenderingContextBase undefined uniformBlockBinding(WebGLProgram program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); /* Vertex Array Objects */ - WebGLVertexArrayObject? createVertexArray(); + WebGLVertexArrayObject createVertexArray(); undefined deleteVertexArray(WebGLVertexArrayObject? vertexArray); [WebGLHandlesContextLoss] GLboolean isVertexArray(WebGLVertexArrayObject? vertexArray); undefined bindVertexArray(WebGLVertexArrayObject? array); diff --git a/tests/wpt/tests/interfaces/webgpu.idl b/tests/wpt/tests/interfaces/webgpu.idl index 00584589d5b..f575306efef 100644 --- a/tests/wpt/tests/interfaces/webgpu.idl +++ b/tests/wpt/tests/interfaces/webgpu.idl @@ -109,6 +109,7 @@ enum GPUFeatureName { "depth-clip-control", "depth32float-stencil8", "texture-compression-bc", + "texture-compression-bc-sliced-3d", "texture-compression-etc2", "texture-compression-astc", "timestamp-query", diff --git a/tests/wpt/tests/interfaces/webmidi.idl b/tests/wpt/tests/interfaces/webmidi.idl index 9bab8a5f961..f4a1a29b2e1 100644 --- a/tests/wpt/tests/interfaces/webmidi.idl +++ b/tests/wpt/tests/interfaces/webmidi.idl @@ -17,22 +17,22 @@ dictionary MIDIOptions { boolean software; }; -[SecureContext, Exposed=Window] interface MIDIInputMap { +[SecureContext, Exposed=(Window,Worker)] interface MIDIInputMap { readonly maplike ; }; -[SecureContext, Exposed=Window] interface MIDIOutputMap { +[SecureContext, Exposed=(Window,Worker)] interface MIDIOutputMap { readonly maplike ; }; -[SecureContext, Exposed=Window] interface MIDIAccess: EventTarget { +[SecureContext, Exposed=(Window,Worker), Transferable] interface MIDIAccess: EventTarget { readonly attribute MIDIInputMap inputs; readonly attribute MIDIOutputMap outputs; attribute EventHandler onstatechange; readonly attribute boolean sysexEnabled; }; -[SecureContext, Exposed=Window] interface MIDIPort: EventTarget { +[SecureContext, Exposed=(Window,Worker)] interface MIDIPort: EventTarget { readonly attribute DOMString id; readonly attribute DOMString? manufacturer; readonly attribute DOMString? name; @@ -45,11 +45,11 @@ dictionary MIDIOptions { Promise close(); }; -[SecureContext, Exposed=Window] interface MIDIInput: MIDIPort { +[SecureContext, Exposed=(Window,Worker)] interface MIDIInput: MIDIPort { attribute EventHandler onmidimessage; }; -[SecureContext, Exposed=Window] interface MIDIOutput : MIDIPort { +[SecureContext, Exposed=(Window,Worker)] interface MIDIOutput : MIDIPort { undefined send(sequence data, optional DOMHighResTimeStamp timestamp = 0); undefined clear(); }; @@ -70,7 +70,7 @@ enum MIDIPortConnectionState { "pending", }; -[SecureContext, Exposed=Window] +[SecureContext, Exposed=(Window,Worker)] interface MIDIMessageEvent : Event { constructor(DOMString type, optional MIDIMessageEventInit eventInitDict = {}); readonly attribute Uint8Array? data; @@ -80,7 +80,7 @@ dictionary MIDIMessageEventInit: EventInit { Uint8Array data; }; -[SecureContext, Exposed=Window] +[SecureContext, Exposed=(Window,Worker)] interface MIDIConnectionEvent : Event { constructor(DOMString type, optional MIDIConnectionEventInit eventInitDict = {}); readonly attribute MIDIPort? port; diff --git a/tests/wpt/tests/interfaces/webnn.idl b/tests/wpt/tests/interfaces/webnn.idl index ac8710049ab..ef29aaeefda 100644 --- a/tests/wpt/tests/interfaces/webnn.idl +++ b/tests/wpt/tests/interfaces/webnn.idl @@ -32,7 +32,7 @@ interface ML { Promise createContext(GPUDevice gpuDevice); }; -typedef record MLNamedArrayBufferViews; +typedef record MLNamedArrayBufferViews; dictionary MLComputeResult { MLNamedArrayBufferViews inputs; @@ -75,10 +75,13 @@ interface MLOperand { sequence shape(); }; -[SecureContext, Exposed=(Window, DedicatedWorker)] -interface MLActivation {}; +dictionary MLOperatorOptions { + USVString label = ""; +}; -typedef record MLNamedOperands; +typedef (bigint or unrestricted double) MLNumber; + +typedef record MLNamedOperands; [SecureContext, Exposed=(Window, DedicatedWorker)] interface MLGraphBuilder { @@ -86,34 +89,35 @@ interface MLGraphBuilder { constructor(MLContext context); // Create an operand for a graph input. - MLOperand input(DOMString name, MLOperandDescriptor descriptor); + MLOperand input(USVString name, MLOperandDescriptor descriptor); // Create an operand for a graph constant. MLOperand constant(MLOperandDescriptor descriptor, ArrayBufferView bufferView); // Create a scalar operand from the specified number of the specified type. - MLOperand constant(MLOperandDataType type, double value); + MLOperand constant(MLOperandDataType type, MLNumber value); // Compile the graph up to the specified output operands asynchronously. Promise build(MLNamedOperands outputs); }; -dictionary MLArgMinMaxOptions { - sequence<[EnforceRange] unsigned long> axes; +dictionary MLArgMinMaxOptions : MLOperatorOptions { boolean keepDimensions = false; - boolean selectLastIndex = false; + MLOperandDataType outputDataType = "int32"; }; partial interface MLGraphBuilder { - MLOperand argMin(MLOperand input, optional MLArgMinMaxOptions options = {}); - MLOperand argMax(MLOperand input, optional MLArgMinMaxOptions options = {}); + MLOperand argMin(MLOperand input, [EnforceRange] unsigned long axis, + optional MLArgMinMaxOptions options = {}); + MLOperand argMax(MLOperand input, [EnforceRange] unsigned long axis, + optional MLArgMinMaxOptions options = {}); }; -dictionary MLBatchNormalizationOptions { +dictionary MLBatchNormalizationOptions : MLOperatorOptions { MLOperand scale; MLOperand bias; [EnforceRange] unsigned long axis = 1; - float epsilon = 1e-5; + double epsilon = 1e-5; }; partial interface MLGraphBuilder { @@ -122,12 +126,14 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand cast(MLOperand input, MLOperandDataType type); + MLOperand cast(MLOperand input, + MLOperandDataType type, + optional MLOperatorOptions options = {}); }; -dictionary MLClampOptions { - float minValue; - float maxValue; +dictionary MLClampOptions : MLOperatorOptions { + MLNumber minValue; + MLNumber maxValue; }; partial interface MLGraphBuilder { @@ -135,7 +141,9 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand concat(sequence inputs, [EnforceRange] unsigned long axis); + MLOperand concat(sequence inputs, + [EnforceRange] unsigned long axis, + optional MLOperatorOptions options = {}); }; enum MLConv2dFilterOperandLayout { @@ -145,7 +153,7 @@ enum MLConv2dFilterOperandLayout { "ihwo" }; -dictionary MLConv2dOptions { +dictionary MLConv2dOptions : MLOperatorOptions { sequence<[EnforceRange] unsigned long> padding; sequence<[EnforceRange] unsigned long> strides; sequence<[EnforceRange] unsigned long> dilations; @@ -167,7 +175,7 @@ enum MLConvTranspose2dFilterOperandLayout { "ohwi" }; -dictionary MLConvTranspose2dOptions { +dictionary MLConvTranspose2dOptions : MLOperatorOptions { sequence<[EnforceRange] unsigned long> padding; sequence<[EnforceRange] unsigned long> strides; sequence<[EnforceRange] unsigned long> dilations; @@ -185,54 +193,65 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand add(MLOperand a, MLOperand b); - MLOperand sub(MLOperand a, MLOperand b); - MLOperand mul(MLOperand a, MLOperand b); - MLOperand div(MLOperand a, MLOperand b); - MLOperand max(MLOperand a, MLOperand b); - MLOperand min(MLOperand a, MLOperand b); - MLOperand pow(MLOperand a, MLOperand b); + MLOperand add(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); + MLOperand sub(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); + MLOperand mul(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); + MLOperand div(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); + MLOperand max(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); + MLOperand min(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); + MLOperand pow(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); }; partial interface MLGraphBuilder { - MLOperand equal(MLOperand a, MLOperand b); - MLOperand greater(MLOperand a, MLOperand b); - MLOperand greaterOrEqual(MLOperand a, MLOperand b); - MLOperand lesser(MLOperand a, MLOperand b); - MLOperand lesserOrEqual(MLOperand a, MLOperand b); - MLOperand logicalNot(MLOperand a); + MLOperand equal(MLOperand a, + MLOperand b, + optional MLOperatorOptions options = {}); + MLOperand greater(MLOperand a, + MLOperand b, + optional MLOperatorOptions options = {}); + MLOperand greaterOrEqual(MLOperand a, + MLOperand b, + optional MLOperatorOptions options = {}); + MLOperand lesser(MLOperand a, + MLOperand b, + optional MLOperatorOptions options = {}); + MLOperand lesserOrEqual(MLOperand a, + MLOperand b, + optional MLOperatorOptions options = {}); + MLOperand logicalNot(MLOperand a, optional MLOperatorOptions options = {}); }; partial interface MLGraphBuilder { - MLOperand abs(MLOperand input); - MLOperand ceil(MLOperand input); - MLOperand cos(MLOperand input); - MLOperand erf(MLOperand input); - MLOperand exp(MLOperand input); - MLOperand floor(MLOperand input); - MLOperand identity(MLOperand input); - MLOperand log(MLOperand input); - MLOperand neg(MLOperand input); - MLOperand reciprocal(MLOperand input); - MLOperand sin(MLOperand input); - MLOperand sqrt(MLOperand input); - MLOperand tan(MLOperand input); + MLOperand abs(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand ceil(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand cos(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand erf(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand exp(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand floor(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand identity(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand log(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand neg(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand reciprocal(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand sin(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand sqrt(MLOperand input, optional MLOperatorOptions options = {}); + MLOperand tan(MLOperand input, optional MLOperatorOptions options = {}); }; -dictionary MLEluOptions { - float alpha = 1; +dictionary MLEluOptions : MLOperatorOptions { + double alpha = 1; }; partial interface MLGraphBuilder { MLOperand elu(MLOperand input, optional MLEluOptions options = {}); - MLActivation elu(optional MLEluOptions options = {}); }; partial interface MLGraphBuilder { - MLOperand expand(MLOperand input, sequence<[EnforceRange] unsigned long> newShape); + MLOperand expand(MLOperand input, + sequence<[EnforceRange] unsigned long> newShape, + optional MLOperatorOptions options = {}); }; -dictionary MLGatherOptions { +dictionary MLGatherOptions : MLOperatorOptions { [EnforceRange] unsigned long axis = 0; }; @@ -243,14 +262,13 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand gelu(MLOperand input); - MLActivation gelu(); + MLOperand gelu(MLOperand input, optional MLOperatorOptions options = {}); }; -dictionary MLGemmOptions { +dictionary MLGemmOptions : MLOperatorOptions { MLOperand c; - float alpha = 1.0; - float beta = 1.0; + double alpha = 1.0; + double beta = 1.0; boolean aTranspose = false; boolean bTranspose = false; }; @@ -264,13 +282,19 @@ enum MLGruWeightLayout { "rzn" // reset-update-new gate ordering }; +enum MLRecurrentNetworkActivation { + "relu", + "sigmoid", + "tanh" +}; + enum MLRecurrentNetworkDirection { "forward", "backward", "both" }; -dictionary MLGruOptions { +dictionary MLGruOptions : MLOperatorOptions { MLOperand bias; MLOperand recurrentBias; MLOperand initialHiddenState; @@ -278,7 +302,7 @@ dictionary MLGruOptions { boolean returnSequence = false; MLRecurrentNetworkDirection direction = "forward"; MLGruWeightLayout layout = "zrn"; - sequence activations; + sequence activations; }; partial interface MLGraphBuilder { @@ -290,12 +314,12 @@ partial interface MLGraphBuilder { optional MLGruOptions options = {}); }; -dictionary MLGruCellOptions { +dictionary MLGruCellOptions : MLOperatorOptions { MLOperand bias; MLOperand recurrentBias; boolean resetAfter = true; MLGruWeightLayout layout = "zrn"; - sequence activations; + sequence activations; }; partial interface MLGraphBuilder { @@ -307,25 +331,23 @@ partial interface MLGraphBuilder { optional MLGruCellOptions options = {}); }; -dictionary MLHardSigmoidOptions { - float alpha = 0.2; - float beta = 0.5; +dictionary MLHardSigmoidOptions : MLOperatorOptions { + double alpha = 0.2; + double beta = 0.5; }; partial interface MLGraphBuilder { MLOperand hardSigmoid(MLOperand input, optional MLHardSigmoidOptions options = {}); - MLActivation hardSigmoid(optional MLHardSigmoidOptions options = {}); }; partial interface MLGraphBuilder { - MLOperand hardSwish(MLOperand input); - MLActivation hardSwish(); + MLOperand hardSwish(MLOperand input, optional MLOperatorOptions options = {}); }; -dictionary MLInstanceNormalizationOptions { +dictionary MLInstanceNormalizationOptions : MLOperatorOptions { MLOperand scale; MLOperand bias; - float epsilon = 1e-5; + double epsilon = 1e-5; MLInputOperandLayout layout = "nchw"; }; @@ -334,11 +356,11 @@ partial interface MLGraphBuilder { optional MLInstanceNormalizationOptions options = {}); }; -dictionary MLLayerNormalizationOptions { +dictionary MLLayerNormalizationOptions : MLOperatorOptions { MLOperand scale; MLOperand bias; sequence<[EnforceRange] unsigned long> axes; - float epsilon = 1e-5; + double epsilon = 1e-5; }; partial interface MLGraphBuilder { @@ -346,23 +368,21 @@ partial interface MLGraphBuilder { optional MLLayerNormalizationOptions options = {}); }; -dictionary MLLeakyReluOptions { - float alpha = 0.01; +dictionary MLLeakyReluOptions : MLOperatorOptions { + double alpha = 0.01; }; partial interface MLGraphBuilder { MLOperand leakyRelu(MLOperand input, optional MLLeakyReluOptions options = {}); - MLActivation leakyRelu(optional MLLeakyReluOptions options = {}); }; -dictionary MLLinearOptions { - float alpha = 1; - float beta = 0; +dictionary MLLinearOptions : MLOperatorOptions { + double alpha = 1; + double beta = 0; }; partial interface MLGraphBuilder { MLOperand linear(MLOperand input, optional MLLinearOptions options = {}); - MLActivation linear(optional MLLinearOptions options = {}); }; enum MLLstmWeightLayout { @@ -370,7 +390,7 @@ enum MLLstmWeightLayout { "ifgo" // input-forget-cell-output gate ordering }; -dictionary MLLstmOptions { +dictionary MLLstmOptions : MLOperatorOptions { MLOperand bias; MLOperand recurrentBias; MLOperand peepholeWeight; @@ -379,7 +399,7 @@ dictionary MLLstmOptions { boolean returnSequence = false; MLRecurrentNetworkDirection direction = "forward"; MLLstmWeightLayout layout = "iofg"; - sequence activations; + sequence activations; }; partial interface MLGraphBuilder { @@ -391,12 +411,12 @@ partial interface MLGraphBuilder { optional MLLstmOptions options = {}); }; -dictionary MLLstmCellOptions { +dictionary MLLstmCellOptions : MLOperatorOptions { MLOperand bias; MLOperand recurrentBias; MLOperand peepholeWeight; MLLstmWeightLayout layout = "iofg"; - sequence activations; + sequence activations; }; partial interface MLGraphBuilder { @@ -410,7 +430,7 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand matmul(MLOperand a, MLOperand b); + MLOperand matmul(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); }; enum MLPaddingMode { @@ -420,9 +440,9 @@ enum MLPaddingMode { "symmetric" }; -dictionary MLPadOptions { +dictionary MLPadOptions : MLOperatorOptions { MLPaddingMode mode = "constant"; - float value = 0; + MLNumber value = 0; }; partial interface MLGraphBuilder { @@ -437,7 +457,7 @@ enum MLRoundingType { "ceil" }; -dictionary MLPool2dOptions { +dictionary MLPool2dOptions : MLOperatorOptions { sequence<[EnforceRange] unsigned long> windowDimensions; sequence<[EnforceRange] unsigned long> padding; sequence<[EnforceRange] unsigned long> strides; @@ -454,10 +474,12 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand prelu(MLOperand input, MLOperand slope); + MLOperand prelu(MLOperand input, + MLOperand slope, + optional MLOperatorOptions options = {}); }; -dictionary MLReduceOptions { +dictionary MLReduceOptions : MLOperatorOptions { sequence<[EnforceRange] unsigned long> axes; boolean keepDimensions = false; }; @@ -476,8 +498,7 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand relu(MLOperand input); - MLActivation relu(); + MLOperand relu(MLOperand input, optional MLOperatorOptions options = {}); }; enum MLInterpolationMode { @@ -485,7 +506,7 @@ enum MLInterpolationMode { "linear" }; -dictionary MLResample2dOptions { +dictionary MLResample2dOptions : MLOperatorOptions { MLInterpolationMode mode = "nearest-neighbor"; sequence scales; sequence<[EnforceRange] unsigned long> sizes; @@ -497,35 +518,37 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand reshape(MLOperand input, sequence<[EnforceRange] unsigned long> newShape); + MLOperand reshape(MLOperand input, + sequence<[EnforceRange] unsigned long> newShape, + optional MLOperatorOptions options = {}); }; partial interface MLGraphBuilder { - MLOperand sigmoid(MLOperand input); - MLActivation sigmoid(); + MLOperand sigmoid(MLOperand input, optional MLOperatorOptions options = {}); }; partial interface MLGraphBuilder { MLOperand slice(MLOperand input, sequence<[EnforceRange] unsigned long> starts, - sequence<[EnforceRange] unsigned long> sizes); + sequence<[EnforceRange] unsigned long> sizes, + optional MLOperatorOptions options = {}); }; partial interface MLGraphBuilder { - MLOperand softmax(MLOperand input, unsigned long axis); + MLOperand softmax(MLOperand input, + [EnforceRange] unsigned long axis, + optional MLOperatorOptions options = {}); }; partial interface MLGraphBuilder { - MLOperand softplus(MLOperand input); - MLActivation softplus(); + MLOperand softplus(MLOperand input, optional MLOperatorOptions options = {}); }; partial interface MLGraphBuilder { - MLOperand softsign(MLOperand input); - MLActivation softsign(); + MLOperand softsign(MLOperand input, optional MLOperatorOptions options = {}); }; -dictionary MLSplitOptions { +dictionary MLSplitOptions : MLOperatorOptions { [EnforceRange] unsigned long axis = 0; }; @@ -537,11 +560,10 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand tanh(MLOperand input); - MLActivation tanh(); + MLOperand tanh(MLOperand input, optional MLOperatorOptions options = {}); }; -dictionary MLTransposeOptions { +dictionary MLTransposeOptions : MLOperatorOptions { sequence<[EnforceRange] unsigned long> permutation; }; @@ -549,7 +571,7 @@ partial interface MLGraphBuilder { MLOperand transpose(MLOperand input, optional MLTransposeOptions options = {}); }; -dictionary MLTriangularOptions { +dictionary MLTriangularOptions : MLOperatorOptions { boolean upper = true; [EnforceRange] long diagonal = 0; }; @@ -559,5 +581,8 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand where(MLOperand condition, MLOperand input, MLOperand other); + MLOperand where(MLOperand condition, + MLOperand trueValue, + MLOperand falseValue, + optional MLOperatorOptions options = {}); }; diff --git a/tests/wpt/tests/interfaces/webtransport.idl b/tests/wpt/tests/interfaces/webtransport.idl index e598059c93e..2136cad41e3 100644 --- a/tests/wpt/tests/interfaces/webtransport.idl +++ b/tests/wpt/tests/interfaces/webtransport.idl @@ -84,24 +84,24 @@ dictionary WebTransportSendStreamOptions { }; dictionary WebTransportConnectionStats { - unsigned long long bytesSent; - unsigned long long packetsSent; - unsigned long long bytesLost; - unsigned long long packetsLost; - unsigned long long bytesReceived; - unsigned long long packetsReceived; - DOMHighResTimeStamp smoothedRtt; - DOMHighResTimeStamp rttVariation; - DOMHighResTimeStamp minRtt; - WebTransportDatagramStats datagrams; - unsigned long long? estimatedSendRate; + unsigned long long bytesSent = 0; + unsigned long long packetsSent = 0; + unsigned long long bytesLost = 0; + unsigned long long packetsLost = 0; + unsigned long long bytesReceived = 0; + unsigned long long packetsReceived = 0; + required DOMHighResTimeStamp smoothedRtt; + required DOMHighResTimeStamp rttVariation; + required DOMHighResTimeStamp minRtt; + required WebTransportDatagramStats datagrams; + required unsigned long long? estimatedSendRate; }; dictionary WebTransportDatagramStats { - unsigned long long droppedIncoming; - unsigned long long expiredIncoming; - unsigned long long expiredOutgoing; - unsigned long long lostOutgoing; + unsigned long long droppedIncoming = 0; + unsigned long long expiredIncoming = 0; + unsigned long long expiredOutgoing = 0; + unsigned long long lostOutgoing = 0; }; [Exposed=(Window,Worker), SecureContext, Transferable] @@ -113,9 +113,9 @@ interface WebTransportSendStream : WritableStream { }; dictionary WebTransportSendStreamStats { - unsigned long long bytesWritten; - unsigned long long bytesSent; - unsigned long long bytesAcknowledged; + unsigned long long bytesWritten = 0; + unsigned long long bytesSent = 0; + unsigned long long bytesAcknowledged = 0; }; [Exposed=(Window,Worker), SecureContext] @@ -129,8 +129,8 @@ interface WebTransportReceiveStream : ReadableStream { }; dictionary WebTransportReceiveStreamStats { - unsigned long long bytesReceived; - unsigned long long bytesRead; + unsigned long long bytesReceived = 0; + unsigned long long bytesRead = 0; }; [Exposed=(Window,Worker), SecureContext] diff --git a/tests/wpt/tests/mathml/presentation-markup/operators/mo-lspace-rspace-4-ref.html b/tests/wpt/tests/mathml/presentation-markup/operators/mo-lspace-rspace-4-ref.html index ab4c08dde1e..ff34496b974 100644 --- a/tests/wpt/tests/mathml/presentation-markup/operators/mo-lspace-rspace-4-ref.html +++ b/tests/wpt/tests/mathml/presentation-markup/operators/mo-lspace-rspace-4-ref.html @@ -2,6 +2,12 @@ mo-lspace-rspace-4 (reference) + +

diff --git a/tests/wpt/tests/mathml/presentation-markup/operators/mo-lspace-rspace-4.html b/tests/wpt/tests/mathml/presentation-markup/operators/mo-lspace-rspace-4.html index 47984548685..c3254a56352 100644 --- a/tests/wpt/tests/mathml/presentation-markup/operators/mo-lspace-rspace-4.html +++ b/tests/wpt/tests/mathml/presentation-markup/operators/mo-lspace-rspace-4.html @@ -3,6 +3,12 @@ mo-lspace-rspace-4 + +

diff --git a/tests/wpt/tests/mathml/presentation-markup/tokens/tokens-rendering-from-in-flow.html b/tests/wpt/tests/mathml/presentation-markup/tokens/tokens-rendering-from-in-flow.html index ccc0f25452d..e0435113be3 100644 --- a/tests/wpt/tests/mathml/presentation-markup/tokens/tokens-rendering-from-in-flow.html +++ b/tests/wpt/tests/mathml/presentation-markup/tokens/tokens-rendering-from-in-flow.html @@ -47,7 +47,7 @@

- + @@ -56,14 +56,14 @@ - + - - - + + + diff --git a/tests/wpt/tests/mathml/relations/css-styling/padding-border-margin/border-002.html b/tests/wpt/tests/mathml/relations/css-styling/padding-border-margin/border-002.html index bfb7f76adc8..8d834256f22 100644 --- a/tests/wpt/tests/mathml/relations/css-styling/padding-border-margin/border-002.html +++ b/tests/wpt/tests/mathml/relations/css-styling/padding-border-margin/border-002.html @@ -5,16 +5,23 @@ border + + + + + + + +
+
+
+ + +
+ + +
+
+
+
+ +
+
+
+ + +
+ + +
+
+
+
+ + diff --git a/tests/wpt/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order-with-position-absolute.html b/tests/wpt/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order-with-position-absolute.html new file mode 100644 index 00000000000..239383dd6c4 --- /dev/null +++ b/tests/wpt/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order-with-position-absolute.html @@ -0,0 +1,47 @@ + + + +CSS Display: reading-flow with value grid-order and position: absolute elements + + + + + + + + + + + + +
+
+
+ + +
+
+
+
+
+ +
+
+ + + + + +
+
+ + diff --git a/tests/wpt/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order-with-position-fixed.html b/tests/wpt/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order-with-position-fixed.html new file mode 100644 index 00000000000..bc496c47b4c --- /dev/null +++ b/tests/wpt/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order-with-position-fixed.html @@ -0,0 +1,47 @@ + + + +CSS Display: reading-flow with value grid-order and position: fixed elements + + + + + + + + + + + + +
+
+
+ + +
+
+
+
+
+ +
+
+ + + + + +
+
+ + diff --git a/tests/wpt/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order.html b/tests/wpt/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order.html index b2dd197413e..55390d10a9d 100644 --- a/tests/wpt/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order.html +++ b/tests/wpt/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order.html @@ -59,34 +59,6 @@ -
-
-
- - -
- - -
-
-
-
- -
-
-
- - -
- - -
-
-
-
-
diff --git a/tests/wpt/tests/shadow-dom/selection-collapse-and-extend.tentative.html b/tests/wpt/tests/shadow-dom/selection-collapse-and-extend.tentative.html index 36cc036b384..3d0bc5009d5 100644 --- a/tests/wpt/tests/shadow-dom/selection-collapse-and-extend.tentative.html +++ b/tests/wpt/tests/shadow-dom/selection-collapse-and-extend.tentative.html @@ -18,7 +18,7 @@ test(() => { const textNode = shadowRoot.querySelector('p').firstChild; getSelection().removeAllRanges(); getSelection().collapse(textNode, 5); - const ranges = getSelection().getComposedRanges(shadowRoot); + const ranges = getSelection().getComposedRanges({ shadowRoots: [shadowRoot] }); assert_equals(ranges.length, 1); assert_equals(ranges[0].startContainer, textNode); assert_equals(ranges[0].startOffset, 5); @@ -34,7 +34,7 @@ test(() => { const textNode = shadowRoot.querySelector('p').firstChild; getSelection().removeAllRanges(); getSelection().collapse(textNode, 5); - const ranges = getSelection().getComposedRanges(shadowRoot); + const ranges = getSelection().getComposedRanges({ shadowRoots: [shadowRoot] }); assert_equals(ranges.length, 0); }, 'collapse abort steps when called with a disconnected node inside a shadow tree'); @@ -46,10 +46,10 @@ test(() => { const textNode = shadowRoot.querySelector('p').firstChild; getSelection().removeAllRanges(); getSelection().collapse(textNode, 5); - let ranges = getSelection().getComposedRanges(shadowRoot); + let ranges = getSelection().getComposedRanges({ shadowRoots: [shadowRoot] }); assert_equals(ranges.length, 1); getSelection().extend(textNode, 11); - ranges = getSelection().getComposedRanges(shadowRoot); + ranges = getSelection().getComposedRanges({ shadowRoots: [shadowRoot] }); assert_equals(ranges.length, 1); assert_equals(ranges[0].startContainer, textNode); assert_equals(ranges[0].startOffset, 5); @@ -66,7 +66,7 @@ test(() => { getSelection().removeAllRanges(); getSelection().collapse(container, 0); getSelection().extend(textNode, 5); - const ranges = getSelection().getComposedRanges(shadowRoot); + const ranges = getSelection().getComposedRanges({ shadowRoots: [shadowRoot] }); assert_equals(ranges.length, 1); assert_equals(ranges[0].startContainer, container); assert_equals(ranges[0].startOffset, 0); diff --git a/tests/wpt/tests/shadow-dom/selection-getComposedRanges-collapsed.tentative.html b/tests/wpt/tests/shadow-dom/selection-getComposedRanges-collapsed.tentative.html index 6af01fd8e0f..99ab82eb39c 100644 --- a/tests/wpt/tests/shadow-dom/selection-getComposedRanges-collapsed.tentative.html +++ b/tests/wpt/tests/shadow-dom/selection-getComposedRanges-collapsed.tentative.html @@ -51,20 +51,20 @@ test(() => { assert_equals(sel.getComposedRanges()[0].endContainer, container); assert_equals(sel.getComposedRanges()[0].endOffset, 4); - assert_equals(sel.getComposedRanges(c)[0].startContainer, c); - assert_equals(sel.getComposedRanges(c)[0].startOffset, 0); - assert_equals(sel.getComposedRanges(c)[0].endContainer, container); - assert_equals(sel.getComposedRanges(c)[0].endOffset, 4); + assert_equals(sel.getComposedRanges({ shadowRoots: [c] })[0].startContainer, c); + assert_equals(sel.getComposedRanges({ shadowRoots: [c] })[0].startOffset, 0); + assert_equals(sel.getComposedRanges({ shadowRoots: [c] })[0].endContainer, container); + assert_equals(sel.getComposedRanges({ shadowRoots: [c] })[0].endOffset, 4); - assert_equals(sel.getComposedRanges(d)[0].startContainer, container); - assert_equals(sel.getComposedRanges(d)[0].startOffset, 1); - assert_equals(sel.getComposedRanges(d)[0].endContainer, d); - assert_equals(sel.getComposedRanges(d)[0].endOffset, 0); + assert_equals(sel.getComposedRanges({ shadowRoots: [d] })[0].startContainer, container); + assert_equals(sel.getComposedRanges({ shadowRoots: [d] })[0].startOffset, 1); + assert_equals(sel.getComposedRanges({ shadowRoots: [d] })[0].endContainer, d); + assert_equals(sel.getComposedRanges({ shadowRoots: [d] })[0].endOffset, 0); - assert_equals(sel.getComposedRanges(c, d)[0].startContainer, c); - assert_equals(sel.getComposedRanges(c, d)[0].startOffset, 0); - assert_equals(sel.getComposedRanges(c, d)[0].endContainer, d); - assert_equals(sel.getComposedRanges(c, d)[0].endOffset, 0); + assert_equals(sel.getComposedRanges({ shadowRoots: [c, d] })[0].startContainer, c); + assert_equals(sel.getComposedRanges({ shadowRoots: [c, d] })[0].startOffset, 0); + assert_equals(sel.getComposedRanges({ shadowRoots: [c, d] })[0].endContainer, d); + assert_equals(sel.getComposedRanges({ shadowRoots: [c, d] })[0].endOffset, 0); // Re-setting the same range should never change the output sel.setBaseAndExtent(c, 0, d, 0); @@ -73,9 +73,9 @@ test(() => { assert_equals(sel.getRangeAt(0).endContainer, d); assert_equals(sel.getRangeAt(0).endOffset, 0); - assert_equals(sel.getComposedRanges(c, d)[0].startContainer, c); - assert_equals(sel.getComposedRanges(c, d)[0].startOffset, 0); - assert_equals(sel.getComposedRanges(c, d)[0].endContainer, d); - assert_equals(sel.getComposedRanges(c, d)[0].endOffset, 0); + assert_equals(sel.getComposedRanges({ shadowRoots: [c, d] })[0].startContainer, c); + assert_equals(sel.getComposedRanges({ shadowRoots: [c, d] })[0].startOffset, 0); + assert_equals(sel.getComposedRanges({ shadowRoots: [c, d] })[0].endContainer, d); + assert_equals(sel.getComposedRanges({ shadowRoots: [c, d] })[0].endOffset, 0); }, 'Setting the range to nodes in different shadow trees collapses ordinary ranges, but does not collapse composed ranges.'); diff --git a/tests/wpt/tests/shadow-dom/selection-getComposedRanges.tentative.html b/tests/wpt/tests/shadow-dom/selection-getComposedRanges.tentative.html index 9d5fa761627..a69188a62ee 100644 --- a/tests/wpt/tests/shadow-dom/selection-getComposedRanges.tentative.html +++ b/tests/wpt/tests/shadow-dom/selection-getComposedRanges.tentative.html @@ -18,10 +18,10 @@ test(() => { container.innerHTML = 'hello, world'; getSelection().setBaseAndExtent(container.firstChild, 0, container.firstChild, 5); try { - getSelection().getComposedRanges(container); + getSelection().getComposedRanges({ shadowRoots: [container] }); assert_unreached('executed without error; want error'); } catch (e) { - assert_equals(e.message, "Failed to execute 'getComposedRanges' on 'Selection': parameter 1 is not of type 'ShadowRoot'."); + assert_equals(e.message, "Failed to execute 'getComposedRanges' on 'Selection': Failed to read the 'shadowRoots' property from 'GetComposedRangesOptions': Failed to convert value to 'ShadowRoot'."); } }, 'getComposedRanges should fail if argument is not a shadow root'); @@ -53,7 +53,7 @@ test(() => { const shadowRoot = host.attachShadow({mode: 'closed'}); shadowRoot.innerHTML = 'hello, world'; getSelection().setBaseAndExtent(shadowRoot.firstChild, 0, shadowRoot.firstChild, 5); - const ranges = getSelection().getComposedRanges(shadowRoot); + const ranges = getSelection().getComposedRanges({ shadowRoots: [shadowRoot] }); assert_equals(ranges.length, 1); assert_equals(ranges[0].startContainer, shadowRoot.firstChild); assert_equals(ranges[0].startOffset, 0); @@ -95,7 +95,7 @@ test(() => { const shadowRoot = host.attachShadow({mode: 'closed'}); shadowRoot.innerHTML = 'hello, world'; getSelection().setBaseAndExtent(shadowRoot.firstChild, 7, container, 2); - const ranges = getSelection().getComposedRanges(shadowRoot); + const ranges = getSelection().getComposedRanges({ shadowRoots: [shadowRoot] }); assert_equals(ranges.length, 1); assert_equals(ranges[0].startContainer, shadowRoot.firstChild); assert_equals(ranges[0].startOffset, 7); @@ -129,7 +129,7 @@ test(() => { const innerShadowRoot = innerHost.attachShadow({mode: 'closed'}); innerShadowRoot.innerHTML = 'some text'; getSelection().setBaseAndExtent(innerShadowRoot.firstChild, 5, innerShadowRoot.firstChild, 9); - const ranges = getSelection().getComposedRanges(innerShadowRoot); + const ranges = getSelection().getComposedRanges({ shadowRoots: [innerShadowRoot] }); assert_equals(ranges.length, 1); assert_equals(ranges[0].startContainer, innerShadowRoot.firstChild); assert_equals(ranges[0].startOffset, 5); @@ -146,7 +146,7 @@ test(() => { const innerShadowRoot = innerHost.attachShadow({mode: 'closed'}); innerShadowRoot.innerHTML = 'some text'; getSelection().setBaseAndExtent(innerShadowRoot.firstChild, 5, innerShadowRoot.firstChild, 9); - const ranges = getSelection().getComposedRanges(outerShadowRoot); + const ranges = getSelection().getComposedRanges({ shadowRoots: [outerShadowRoot] }); assert_equals(ranges.length, 1); assert_equals(ranges[0].startContainer, outerShadowRoot); assert_equals(ranges[0].startOffset, 0); @@ -163,7 +163,7 @@ test(() => { const innerShadowRoot = innerHost.attachShadow({mode: 'closed'}); innerShadowRoot.innerHTML = 'some text'; getSelection().setBaseAndExtent(container.firstChild, 0, outerShadowRoot, 0); - const ranges = getSelection().getComposedRanges(innerShadowRoot); + const ranges = getSelection().getComposedRanges({ shadowRoots: [innerShadowRoot] }); assert_equals(ranges.length, 1); assert_equals(ranges[0].startContainer, container.firstChild, "A"); assert_equals(ranges[0].startOffset, 0, "B"); diff --git a/tests/wpt/tests/tools/wpt/android.py b/tests/wpt/tests/tools/wpt/android.py index 1e2d30fb389..e1eef88b609 100644 --- a/tests/wpt/tests/tools/wpt/android.py +++ b/tests/wpt/tests/tools/wpt/android.py @@ -288,8 +288,8 @@ def install(logger, dest=None, reinstall=False, prompt=True): if new_install: packages = ["platform-tools", - "build-tools;34.0.0", - "platforms;android-34", + "build-tools;35.0.0", + "platforms;android-35", "emulator"] install_android_packages(logger, paths, packages, prompt=prompt) diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/asyncactions.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/asyncactions.py index 6b4ee6fe70f..df8e874c0cd 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/asyncactions.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/asyncactions.py @@ -1,6 +1,6 @@ # mypy: allow-untyped-defs -from webdriver.bidi.protocol import BidiWindow +import webdriver class BidiSessionSubscribeAction: @@ -20,7 +20,7 @@ class BidiSessionSubscribeAction: # value is extracted from the serialized object. if isinstance(context, str): contexts.append(context) - elif isinstance(context, BidiWindow): + elif isinstance(context, webdriver.bidi.protocol.BidiWindow): contexts.append(context.browsing_context) else: raise ValueError("Unexpected context type: %s" % context) diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py index 76408aafc0d..a4ba76e6cd6 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/protocol.py @@ -5,7 +5,6 @@ from http.client import HTTPConnection from abc import ABCMeta, abstractmethod from typing import Any, Awaitable, Callable, ClassVar, List, Mapping, Optional, Type -from webdriver.bidi.modules.script import Target def merge_dicts(target, source): @@ -391,7 +390,7 @@ class BidiScriptProtocolPart(ProtocolPart): async def call_function( self, function_declaration: str, - target: Target, + target: Mapping[str, Any], arguments: Optional[List[Mapping[str, Any]]] = None ) -> Mapping[str, Any]: """ diff --git a/tests/wpt/tests/webcodecs/video-encoder-canvasImageSource.https.html b/tests/wpt/tests/webcodecs/video-encoder-canvasImageSource.https.html new file mode 100644 index 00000000000..0585dcd8783 --- /dev/null +++ b/tests/wpt/tests/webcodecs/video-encoder-canvasImageSource.https.html @@ -0,0 +1,110 @@ +Test Encode VideoFrame from CanvasImageSource. + + + + + + + + + diff --git a/tests/wpt/tests/webdriver/tests/bidi/input/perform_actions/key_tentative.py b/tests/wpt/tests/webdriver/tests/bidi/input/perform_actions/key_tentative.py new file mode 100644 index 00000000000..1f7053c2499 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/input/perform_actions/key_tentative.py @@ -0,0 +1,30 @@ +import pytest + +from webdriver.bidi.error import NoSuchFrameException +from webdriver.bidi.modules.input import Actions +from webdriver.bidi.modules.script import ContextTarget + +from tests.support.keys import Keys +from .. import get_keys_value +from . import get_shadow_root_from_test_page + +pytestmark = pytest.mark.asyncio + +@pytest.mark.parametrize( + "value", + [ + ("\u0e01\u0e33"), + ("🤷🏽‍♀️"), + ], +) +async def test_grapheme_cluster( + bidi_session, top_context, setup_key_test, value +): + actions = Actions() + (actions.add_key().key_down(value).key_up(value)) + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + # events sent by major browsers are inconsistent so only check key value + keys_value = await get_keys_value(bidi_session, top_context["context"]) + assert keys_value == value diff --git a/tests/wpt/tests/webdriver/tests/bidi/integration/cookies_with_network_events.py b/tests/wpt/tests/webdriver/tests/bidi/integration/cookies_with_network_events.py index 625628f0360..49ca96f6160 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/integration/cookies_with_network_events.py +++ b/tests/wpt/tests/webdriver/tests/bidi/integration/cookies_with_network_events.py @@ -12,6 +12,7 @@ from .. import assert_cookies pytestmark = pytest.mark.asyncio +BEFORE_REQUEST_SENT_EVENT = "network.beforeRequestSent" PNG_BLACK_DOT = "/webdriver/tests/bidi/storage/get_cookies/support/black_dot.png" @@ -34,7 +35,6 @@ async def test_top_context( context=new_tab["context"], url=url, wait="complete" ) - BEFORE_REQUEST_SENT_EVENT = "network.beforeRequestSent" network_events = await setup_network_test(events=[BEFORE_REQUEST_SENT_EVENT]) events = network_events[BEFORE_REQUEST_SENT_EVENT] on_before_request_sent = wait_for_event(BEFORE_REQUEST_SENT_EVENT) @@ -76,7 +76,6 @@ async def test_iframe( context=new_tab["context"], url=iframe_url, wait="complete" ) - BEFORE_REQUEST_SENT_EVENT = "network.beforeRequestSent" network_events = await setup_network_test(events=[BEFORE_REQUEST_SENT_EVENT]) events = network_events[BEFORE_REQUEST_SENT_EVENT] on_before_request_sent = wait_for_event(BEFORE_REQUEST_SENT_EVENT) @@ -125,7 +124,7 @@ async def test_fetch( await bidi_session.browsing_context.navigate( context=new_tab["context"], url=url("/webdriver/tests/bidi/network/support/empty.html"), - wait="complete" + wait="complete", ) cookie_name = "foo" @@ -143,7 +142,6 @@ async def test_fetch( await_promise=False, ) - BEFORE_REQUEST_SENT_EVENT = "network.beforeRequestSent" network_events = await setup_network_test(events=[BEFORE_REQUEST_SENT_EVENT]) events = network_events[BEFORE_REQUEST_SENT_EVENT] @@ -191,7 +189,6 @@ async def test_image( await_promise=False, ) - BEFORE_REQUEST_SENT_EVENT = "network.beforeRequestSent" network_events = await setup_network_test(events=[BEFORE_REQUEST_SENT_EVENT]) events = network_events[BEFORE_REQUEST_SENT_EVENT] @@ -203,10 +200,10 @@ async def test_image( ) await wait_for_future_safe(on_before_request_sent) - image_path = os.path.dirname(urlparse(image_url).path.replace("/", os.sep)) + image_path = os.path.dirname(urlparse(image_url).path) result = await bidi_session.storage.get_cookies( partition=StorageKeyPartitionDescriptor(source_origin=origin(domain=domain_1)), - filter={"path": image_path} + filter={"path": image_path}, ) # Find the network event which belongs to the image. diff --git a/tests/wpt/tests/webdriver/tests/classic/perform_actions/invalid.py b/tests/wpt/tests/webdriver/tests/classic/perform_actions/invalid.py index f000477376e..d83285abbe0 100644 --- a/tests/wpt/tests/webdriver/tests/classic/perform_actions/invalid.py +++ b/tests/wpt/tests/webdriver/tests/classic/perform_actions/invalid.py @@ -1,3 +1,4 @@ +# META: timeout=long import pytest from webdriver.error import InvalidArgumentException @@ -304,6 +305,28 @@ def test_key_action_value_invalid_type(session, key_action, value): assert_error(response, "invalid argument") +@pytest.mark.parametrize("action_type", ["keyDown", "keyUp"]) +@pytest.mark.parametrize( + "value", + ["fa", "\u0BA8\u0BBFb", "\u0BA8\u0BBF\u0BA8", "\u1100\u1161\u11A8c"], +) +def test_key_action_invalid_value(session, action_type, value): + actions = [ + { + "type": "key", + "id": "foo", + "actions": [ + { + "type": action_type, + "value": value, + } + ], + } + ] + response = perform_actions(session, actions) + assert_error(response, "invalid argument") + + @pytest.mark.parametrize("value", ["", "pointerDowns", "pointerMoves", "pointerUps"]) def test_pointer_action_subtype_invalid_value(session, value): if value == "pointerMoves": diff --git a/tests/wpt/tests/webdriver/tests/classic/perform_actions/key_tentative.py b/tests/wpt/tests/webdriver/tests/classic/perform_actions/key_tentative.py new file mode 100644 index 00000000000..62f380da0ec --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/classic/perform_actions/key_tentative.py @@ -0,0 +1,15 @@ +import pytest + +from tests.classic.perform_actions.support.refine import get_keys + +@pytest.mark.parametrize("value", + [ + ("\u0e01\u0e33"), + ("🤷🏽‍♀️"), + ]) +def test_grapheme_cluster(session, key_reporter, key_chain, value): + key_chain \ + .key_down(value) \ + .key_up(value) \ + .perform() + assert get_keys(key_reporter) == value diff --git a/tests/wpt/tests/webnn/conformance_tests/buffer.https.any.js b/tests/wpt/tests/webnn/conformance_tests/buffer.https.any.js index 2242ccdc7a0..75992f5de85 100644 --- a/tests/wpt/tests/webnn/conformance_tests/buffer.https.any.js +++ b/tests/wpt/tests/webnn/conformance_tests/buffer.https.any.js @@ -280,6 +280,14 @@ const testReadWebNNBuffer = (testName) => { await promise_rejects_dom(t, 'InvalidStateError', anotherPromise); }, `${testName} / read_before_destroy`); + promise_test(async () => { + let mlBuffer = + await mlContext.createBuffer({dataType: 'int32', dimensions: [1024]}); + + await assert_buffer_data_equals( + mlContext, mlBuffer, new Uint32Array(1024)); + }, `${testName} / uninitialized`); + promise_test(async () => { let mlBuffer = await mlContext.createBuffer({dataType: 'int32', dimensions: [1]}); diff --git a/tests/wpt/tests/webnn/conformance_tests/byob_readbuffer.https.any.js b/tests/wpt/tests/webnn/conformance_tests/byob_readbuffer.https.any.js new file mode 100644 index 00000000000..3b9546c50f0 --- /dev/null +++ b/tests/wpt/tests/webnn/conformance_tests/byob_readbuffer.https.any.js @@ -0,0 +1,168 @@ +// META: title=test WebNN API buffer operations +// META: global=window,dedicatedworker +// META: variant=?cpu +// META: variant=?gpu +// META: variant=?npu +// META: script=../resources/utils_validation.js +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// Skip tests if WebNN is unimplemented. +promise_setup(async () => { + assert_implements(navigator.ml, 'missing navigator.ml'); +}); + +// https://www.w3.org/TR/webnn/#api-mlbuffer + +const testContents = Uint32Array.from([0, 1, 2, 3, 4, 5, 6, 7]); + +let mlContext; +let mlBuffer; +promise_setup(async () => { + try { + mlContext = await navigator.ml.createContext(contextOptions); + } catch (e) { + throw new AssertionError( + `Unable to create context for ${variant} variant. ${e}`); + } + + try { + mlBuffer = + await mlContext.createBuffer({dataType: 'int32', dimensions: [2, 4]}); + } catch (e) { + throw new AssertionError( + `Unable to create buffer for ${variant} variant. ${e}`); + } + + mlContext.writeBuffer(mlBuffer, testContents); +}); + +promise_test(async (t) => { + const arrayBuffer = new ArrayBuffer(testContents.byteLength - 4); + + await promise_rejects_js( + t, TypeError, mlContext.readBuffer(mlBuffer, arrayBuffer)); +}, `readBuffer() with an ArrayBuffer that is too small should reject`); + +promise_test(async (t) => { + const typedArray = new Uint32Array(testContents.length - 1); + + await promise_rejects_js( + t, TypeError, mlContext.readBuffer(mlBuffer, typedArray)); +}, `readBuffer() with a TypedArray that is too small should reject`); + +promise_test(async (t) => { + const arrayBuffer = new ArrayBuffer(testContents.byteLength); + const typedArray = new Uint32Array(arrayBuffer); + + arrayBuffer.transfer(); + + await promise_rejects_js( + t, TypeError, mlContext.readBuffer(mlBuffer, arrayBuffer)); + + await promise_rejects_js( + t, TypeError, mlContext.readBuffer(mlBuffer, typedArray)); +}, `readBuffer() with a detached ArrayBuffer should reject`); + +promise_test(async (t) => { + const arrayBuffer = new ArrayBuffer(testContents.byteLength); + const typedArray = new Uint32Array(arrayBuffer); + + const checks = Promise.all([ + promise_rejects_js( + t, TypeError, mlContext.readBuffer(mlBuffer, arrayBuffer)), + promise_rejects_js( + t, TypeError, mlContext.readBuffer(mlBuffer, typedArray)), + ]); + + arrayBuffer.transfer(); + + await checks; +}, `Detaching an ArrayBuffer while readBuffer() is in progress should reject`); + +promise_test(async () => { + const arrayBuffer = new ArrayBuffer(testContents.byteLength); + + await mlContext.readBuffer(mlBuffer, arrayBuffer); + + assert_array_equals(new Uint32Array(arrayBuffer), testContents); +}, `readBuffer() with an ArrayBuffer`); + +promise_test(async () => { + // Create a slightly larger ArrayBuffer and set up the TypedArray at an + // offset to make sure the MLBuffer contents are written to the correct + // offset. + const arrayBuffer = new ArrayBuffer(testContents.byteLength + 4); + const typedArray = new Uint32Array(arrayBuffer, 4); + + await mlContext.readBuffer(mlBuffer, typedArray); + + assert_array_equals(typedArray, testContents); +}, `readBuffer() with a TypedArray`); + +promise_test(async () => { + const arrayBuffer = new ArrayBuffer(testContents.byteLength * 2); + + await mlContext.readBuffer(mlBuffer, arrayBuffer); + + assert_array_equals( + new Uint32Array(arrayBuffer).subarray(0, testContents.length), + testContents); + // The rest of the array should remain uninitialized. + assert_array_equals( + new Uint32Array(arrayBuffer) + .subarray(testContents.length, testContents.length * 2), + new Uint32Array(testContents.length)); +}, `readBuffer() with a larger ArrayBuffer`); + +promise_test(async () => { + // Create a slightly larger ArrayBuffer and set up the TypedArray at an + // offset to make sure the MLBuffer contents are written to the correct + // offset. + const arrayBuffer = new ArrayBuffer(testContents.byteLength * 2 + 4); + const typedArray = new Uint32Array(arrayBuffer, 4); + + await mlContext.readBuffer(mlBuffer, typedArray); + + assert_array_equals( + typedArray.subarray(0, testContents.length), testContents); + // The rest of the array should remain uninitialized. + assert_array_equals( + typedArray.subarray(testContents.length, testContents.length * 2), + new Uint32Array(testContents.length)); +}, `readBuffer() with a larger TypedArray`); + +promise_test(async (t) => { + const buffer = + await mlContext.createBuffer({dataType: 'int32', dimensions: [2, 2]}); + const arrayBufferView = new Int32Array(2 * 2); + const arrayBuffer = arrayBufferView.buffer; + + // Reading a destroyed MLBuffer should reject. + buffer.destroy(); + + await promise_rejects_dom( + t, 'InvalidStateError', mlContext.readBuffer(buffer, arrayBuffer)); + await promise_rejects_dom( + t, 'InvalidStateError', mlContext.readBuffer(buffer, arrayBufferView)); +}, `readBuffer() rejects on a destroyed MLBuffer`); + +promise_test(async (t) => { + const buffer = + await mlContext.createBuffer({dataType: 'int32', dimensions: [2, 2]}); + const arrayBufferView = new Int32Array(2 * 2); + const arrayBuffer = arrayBufferView.buffer; + + const checks = Promise.all([ + promise_rejects_dom( + t, 'InvalidStateError', mlContext.readBuffer(buffer, arrayBuffer)), + promise_rejects_dom( + t, 'InvalidStateError', mlContext.readBuffer(buffer, arrayBufferView)), + ]); + + buffer.destroy(); + + await checks; +}, `readBuffer() rejects when the MLBuffer is destroyed`); diff --git a/tests/wpt/tests/webnn/conformance_tests/gru.https.any.js b/tests/wpt/tests/webnn/conformance_tests/gru.https.any.js new file mode 100644 index 00000000000..d14fd2eec49 --- /dev/null +++ b/tests/wpt/tests/webnn/conformance_tests/gru.https.any.js @@ -0,0 +1,907 @@ +// META: title=test WebNN API gru operation +// META: global=window,dedicatedworker +// 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-gru +// Gated Recurrent Unit recurrent network uses an update, reset, and new gate +// to compute the output state that rolls into the output across the temporal +// sequence of the network. +// +// enum MLGruWeightLayout { +// "zrn", // update-reset-new gate ordering +// "rzn" // reset-update-new gate ordering +// }; +// +// enum MLRecurrentNetworkActivation { +// "relu", +// "sigmoid", +// "tanh" +// }; +// +// enum MLRecurrentNetworkDirection { +// "forward", +// "backward", +// "both" +// }; +// +// dictionary MLGruOptions { +// MLOperand bias; +// MLOperand recurrentBias; +// MLOperand initialHiddenState; +// boolean resetAfter = true; +// boolean returnSequence = false; +// MLRecurrentNetworkDirection direction = "forward"; +// MLGruWeightLayout layout = "zrn"; +// sequence activations; +// }; +// +// sequence gru(MLOperand input, +// MLOperand weight, +// MLOperand recurrentWeight, +// [EnforceRange] unsigned long steps, +// [EnforceRange] unsigned long hiddenSize, +// optional MLGruOptions options = {}); + + +const getGruPrecisionTolerance = (graphResources) => { + const toleranceValueDict = {float32: 3}; + const expectedDataType = + graphResources + .expectedOutputs[Object.keys(graphResources.expectedOutputs)[0]] + .descriptor.dataType; + return {metricType: 'ULP', value: toleranceValueDict[expectedDataType]}; +}; + +const gruTests = [ + { + 'name': + 'gru float32 tensors steps=1 with options.bias, options.recurrentBias and options.activations=[\'relu\', \'relu\']', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [1, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 1}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput'] + }], + 'expectedOutputs': { + 'gruOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gru float32 tensors steps=1 with options.bias, options.recurrentBias, options.activations=[\'relu\', \'relu\'] and explicit options.direction=\'forward\'', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [1, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 1}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'direction': 'forward', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput'] + }], + 'expectedOutputs': { + 'gruOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gru float32 tensors steps=1 with options.bias, options.recurrentBias, options.activations=[\'relu\', \'relu\'] and explicit options.layout=\'zrn\'', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [1, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 1}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'layout': 'zrn', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput'] + }], + 'expectedOutputs': { + 'gruOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gru float32 tensors steps=1 with options.bias, options.recurrentBias, options.activations=[\'relu\', \'relu\'] and options.layout=\'rzn\'', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [1, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 1, 1, 1, + 1, 2, 1, 2, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 1, 1, 1, + 1, 2, 1, 2, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 1}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'layout': 'rzn', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput'] + }], + 'expectedOutputs': { + 'gruOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gru float32 tensors steps=1 with options.bias, options.recurrentBias, options.activations=[\'relu\', \'relu\'] and options.initialHiddenState', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [1, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruInitialHiddenState': { + 'data': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 1}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'initialHiddenState': 'gruInitialHiddenState', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput'] + }], + 'expectedOutputs': { + 'gruOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gru float32 tensors steps=1 with options.bias, options.recurrentBias, options.activations=[\'relu\', \'relu\'] and explicit options.resetAfter=true', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [1, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 1}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'resetAfter': true, + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput'] + }], + 'expectedOutputs': { + 'gruOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': 'gru float32 tensors steps=1 all options', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [1, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruInitialHiddenState': { + 'data': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 1}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'initialHiddenState': 'gruInitialHiddenState', + 'resetAfter': true, + 'returnSequence': true, + 'direction': 'forward', + 'layout': 'zrn', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput1', 'gruOutput2'] + }], + 'expectedOutputs': { + 'gruOutput1': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + }, + 'gruOutput2': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [1, 1, 3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gru float32 tensors steps=2 with options.bias, options.recurrentBias, options.activations=[\'relu\', \'relu\'] and options.direction=\'backward\'', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1, 3, 4, 1, 2, 1, 1], + 'descriptor': {'dimensions': [2, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 2}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'direction': 'backward', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput'] + }], + 'expectedOutputs': { + 'gruOutput': { + 'data': [ + 0, 0, -0.24974998831748963, -18.59588623046875, -2.0657243728637697, + -10.551867485046387, -1.3937838077545167, -15.2454833984375, + -1.1589999198913575, -9.476999282836914, -1.1589999198913575, + -11.319169044494629 + ], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gru float32 tensors steps=2 with options.bias, options.recurrentBias, options.direction=\'backward\', options.activations=[\'relu\', \'relu\'] and explicit options.returnSequence=false', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1, 3, 4, 1, 2, 1, 1], + 'descriptor': {'dimensions': [2, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 2}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'returnSequence': false, + 'direction': 'backward', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput'] + }], + 'expectedOutputs': { + 'gruOutput': { + 'data': [ + 0, 0, -0.24974998831748963, -18.59588623046875, -2.0657243728637697, + -10.551867485046387, -1.3937838077545167, -15.2454833984375, + -1.1589999198913575, -9.476999282836914, -1.1589999198913575, + -11.319169044494629 + ], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gru float32 tensors steps=2 with options.bias, options.recurrentBias, options.direction=\'backward\', options.activations=[\'relu\', \'relu\'] and options.returnSequence=true', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1, 3, 4, 1, 2, 1, 1], + 'descriptor': {'dimensions': [2, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 2}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'returnSequence': true, + 'direction': 'backward', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput1', 'gruOutput2'] + }], + 'expectedOutputs': { + 'gruOutput1': { + 'data': [ + 0, 0, -0.24974998831748963, -18.59588623046875, -2.0657243728637697, + -10.551867485046387, -1.3937838077545167, -15.2454833984375, + -1.1589999198913575, -9.476999282836914, -1.1589999198913575, + -11.319169044494629 + ], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + }, + 'gruOutput2': { + 'data': [ + 0, + 0, + -0.24974998831748963, + -18.59588623046875, + -2.0657243728637697, + -10.551867485046387, + -1.3937838077545167, + -15.2454833984375, + -1.1589999198913575, + -9.476999282836914, + -1.1589999198913575, + -11.319169044494629, + 0, + 0, + -0.25, + -4.760000228881836, + 0, + 0, + -0.25, + -3.8399999141693117, + -1, + -3, + -1, + -3.4100000858306886 + ], + 'descriptor': {'dimensions': [2, 1, 3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': 'gru float32 tensors steps=2 with all options', + 'graph': { + 'inputs': { + 'gruInput': { + 'data': [1, 2, 2, 1, 1, 1, 3, 4, 1, 2, 1, 1], + 'descriptor': {'dimensions': [2, 3, 2], 'dataType': 'float32'} + }, + 'gruWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 2], 'dataType': 'float32'} + }, + 'gruRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [1, 12, 4], 'dataType': 'float32'} + }, + 'gruBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [1, 12], 'dataType': 'float32'} + }, + 'gruInitialHiddenState': { + 'data': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + } + }, + 'operators': [{ + 'name': 'gru', + 'arguments': [ + {'input': 'gruInput'}, {'weight': 'gruWeight'}, + {'recurrentWeight': 'gruRecurrentWeight'}, {'steps': 2}, + {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruBias', + 'recurrentBias': 'gruRecurrentBias', + 'initialHiddenState': 'gruInitialHiddenState', + 'resetAfter': true, + 'returnSequence': true, + 'direction': 'backward', + 'layout': 'zrn', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': ['gruOutput1', 'gruOutput2'] + }], + 'expectedOutputs': { + 'gruOutput1': { + 'data': [ + 0, 0, -0.24974998831748963, -18.59588623046875, -2.0657243728637697, + -10.551867485046387, -1.3937838077545167, -15.2454833984375, + -1.1589999198913575, -9.476999282836914, -1.1589999198913575, + -11.319169044494629 + ], + 'descriptor': {'dimensions': [1, 3, 4], 'dataType': 'float32'} + }, + 'gruOutput2': { + 'data': [ + 0, + 0, + -0.24974998831748963, + -18.59588623046875, + -2.0657243728637697, + -10.551867485046387, + -1.3937838077545167, + -15.2454833984375, + -1.1589999198913575, + -9.476999282836914, + -1.1589999198913575, + -11.319169044494629, + 0, + 0, + -0.25, + -4.760000228881836, + 0, + 0, + -0.25, + -3.8399999141693117, + -1, + -3, + -1, + -3.4100000858306886 + ], + 'descriptor': {'dimensions': [2, 1, 3, 4], 'dataType': 'float32'} + } + } + } + }, +]; + +if (navigator.ml) { + gruTests.forEach((test) => { + webnn_conformance_test( + buildGraphAndCompute, getGruPrecisionTolerance, test); + }); + +} else { + test(() => assert_implements(navigator.ml, 'missing navigator.ml')); +} diff --git a/tests/wpt/tests/webnn/conformance_tests/gru_cell.https.any.js b/tests/wpt/tests/webnn/conformance_tests/gru_cell.https.any.js new file mode 100644 index 00000000000..f8aa3ac9cf7 --- /dev/null +++ b/tests/wpt/tests/webnn/conformance_tests/gru_cell.https.any.js @@ -0,0 +1,416 @@ +// META: title=test WebNN API gruCell operation +// META: global=window,dedicatedworker +// 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-grucell +// A single time step of the Gated Recurrent Unit recurrent network using an +// update gate and a reset gate to compute the hidden state that rolls into the +// output across the temporal sequence of a recurrent network. +// +// enum MLGruWeightLayout { +// "zrn", // update-reset-new gate ordering +// "rzn" // reset-update-new gate ordering +// }; +// +// enum MLRecurrentNetworkActivation { +// "relu", +// "sigmoid", +// "tanh" +// }; +// +// dictionary MLGruCellOptions { +// MLOperand bias; +// MLOperand recurrentBias; +// boolean resetAfter = true; +// MLGruWeightLayout layout = "zrn"; +// sequence activations; +// }; +// +// MLOperand gruCell(MLOperand input, +// MLOperand weight, +// MLOperand recurrentWeight, +// MLOperand hiddenState, +// [EnforceRange] unsigned long hiddenSize, +// optional MLGruCellOptions options = {}); + + +const getGruCellPrecisionTolerance = (graphResources) => { + const toleranceValueDict = {float32: 3}; + const expectedDataType = + graphResources + .expectedOutputs[Object.keys(graphResources.expectedOutputs)[0]] + .descriptor.dataType; + return {metricType: 'ULP', value: toleranceValueDict[expectedDataType]}; +}; + +const gruCellTests = [ + { + 'name': + 'gruCell float32 tensors with options.bias, options.recurrentBias and options.activations=[\'relu\', \'relu\']', + 'graph': { + 'inputs': { + 'gruCellInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [3, 2], 'dataType': 'float32'} + }, + 'gruCellWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [12, 2], 'dataType': 'float32'} + }, + 'gruCellRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [12, 4], 'dataType': 'float32'} + }, + 'gruCellHiddenState': { + 'data': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + 'descriptor': {'dimensions': [3, 4], 'dataType': 'float32'} + }, + 'gruCellBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [12], 'dataType': 'float32'} + }, + 'gruCellRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [12], 'dataType': 'float32'} + } + }, + 'operators': [{ + 'name': 'gruCell', + 'arguments': [ + {'input': 'gruCellInput'}, {'weight': 'gruCellWeight'}, + {'recurrentWeight': 'gruCellRecurrentWeight'}, + {'hiddenState': 'gruCellHiddenState'}, {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruCellBias', + 'recurrentBias': 'gruCellRecurrentBias', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': 'gruCellOutput' + }], + 'expectedOutputs': { + 'gruCellOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gruCell float32 tensors with options.bias, options.recurrentBias, options.activations=[\'relu\', \'relu\'] and and explicit options.resetAfter=true', + 'graph': { + 'inputs': { + 'gruCellInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [3, 2], 'dataType': 'float32'} + }, + 'gruCellWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [12, 2], 'dataType': 'float32'} + }, + 'gruCellRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [12, 4], 'dataType': 'float32'} + }, + 'gruCellHiddenState': { + 'data': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + 'descriptor': {'dimensions': [3, 4], 'dataType': 'float32'} + }, + 'gruCellBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [12], 'dataType': 'float32'} + }, + 'gruCellRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [12], 'dataType': 'float32'} + } + }, + 'operators': [{ + 'name': 'gruCell', + 'arguments': [ + {'input': 'gruCellInput'}, {'weight': 'gruCellWeight'}, + {'recurrentWeight': 'gruCellRecurrentWeight'}, + {'hiddenState': 'gruCellHiddenState'}, {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruCellBias', + 'recurrentBias': 'gruCellRecurrentBias', + 'resetAfter': true, + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': 'gruCellOutput' + }], + 'expectedOutputs': { + 'gruCellOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gruCell float32 tensors with options.bias, options.recurrentBias, options.activations=[\'relu\', \'relu\'] and and explicit options.layout=\'zrn\'', + 'graph': { + 'inputs': { + 'gruCellInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [3, 2], 'dataType': 'float32'} + }, + 'gruCellWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [12, 2], 'dataType': 'float32'} + }, + 'gruCellRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 + ], + 'descriptor': {'dimensions': [12, 4], 'dataType': 'float32'} + }, + 'gruCellHiddenState': { + 'data': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + 'descriptor': {'dimensions': [3, 4], 'dataType': 'float32'} + }, + 'gruCellBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [12], 'dataType': 'float32'} + }, + 'gruCellRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [12], 'dataType': 'float32'} + } + }, + 'operators': [{ + 'name': 'gruCell', + 'arguments': [ + {'input': 'gruCellInput'}, {'weight': 'gruCellWeight'}, + {'recurrentWeight': 'gruCellRecurrentWeight'}, + {'hiddenState': 'gruCellHiddenState'}, {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruCellBias', + 'recurrentBias': 'gruCellRecurrentBias', + 'layout': 'zrn', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': 'gruCellOutput' + }], + 'expectedOutputs': { + 'gruCellOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': + 'gruCell float32 tensors with options.bias, options.recurrentBias, options.activations=[\'relu\', \'relu\'] and and options.layout=\'rzn\'', + 'graph': { + 'inputs': { + 'gruCellInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [3, 2], 'dataType': 'float32'} + }, + 'gruCellWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [12, 2], 'dataType': 'float32'} + }, + 'gruCellRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + ], + 'descriptor': {'dimensions': [12, 4], 'dataType': 'float32'} + }, + 'gruCellHiddenState': { + 'data': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + 'descriptor': {'dimensions': [3, 4], 'dataType': 'float32'} + }, + 'gruCellBias': { + 'data': [ + 1, 1, 1, 1, + 1, 2, 1, 2, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [12], 'dataType': 'float32'} + }, + 'gruCellRecurrentBias': { + 'data': [ + 1, 1, 1, 1, + 1, 2, 1, 2, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [12], 'dataType': 'float32'} + } + }, + 'operators': [{ + 'name': 'gruCell', + 'arguments': [ + {'input': 'gruCellInput'}, {'weight': 'gruCellWeight'}, + {'recurrentWeight': 'gruCellRecurrentWeight'}, + {'hiddenState': 'gruCellHiddenState'}, {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruCellBias', + 'recurrentBias': 'gruCellRecurrentBias', + 'layout': 'rzn', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': 'gruCellOutput' + }], + 'expectedOutputs': { + 'gruCellOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [3, 4], 'dataType': 'float32'} + } + } + } + }, + { + 'name': 'gruCell float32 tensors with all options', + 'graph': { + 'inputs': { + 'gruCellInput': { + 'data': [1, 2, 2, 1, 1, 1], + 'descriptor': {'dimensions': [3, 2], 'dataType': 'float32'} + }, + 'gruCellWeight': { + 'data': [ + 1, -1, 2, -2, 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, + 0.5, -0.5, 0, 0.1, 1, -1, 2, -2, 0.5, -0.5, 0, 0.1 + ], + 'descriptor': {'dimensions': [12, 2], 'dataType': 'float32'} + }, + 'gruCellRecurrentWeight': { + 'data': [ + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, + ], + 'descriptor': {'dimensions': [12, 4], 'dataType': 'float32'} + }, + 'gruCellHiddenState': { + 'data': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + 'descriptor': {'dimensions': [3, 4], 'dataType': 'float32'} + }, + 'gruCellBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [12], 'dataType': 'float32'} + }, + 'gruCellRecurrentBias': { + 'data': [ + 1, 2, 1, 2, + 1, 1, 1, 1, + 0.5, 0.5, 0.5, 0.5 + ], + 'descriptor': {'dimensions': [12], 'dataType': 'float32'} + } + }, + 'operators': [{ + 'name': 'gruCell', + 'arguments': [ + {'input': 'gruCellInput'}, {'weight': 'gruCellWeight'}, + {'recurrentWeight': 'gruCellRecurrentWeight'}, + {'hiddenState': 'gruCellHiddenState'}, {'hiddenSize': 4}, { + 'options': { + 'bias': 'gruCellBias', + 'recurrentBias': 'gruCellRecurrentBias', + 'resetAfter': true, + 'layout': 'zrn', + 'activations': ['relu', 'relu'] + } + } + ], + 'outputs': 'gruCellOutput' + }], + 'expectedOutputs': { + 'gruCellOutput': { + 'data': + [0, 0, -0.25, -3.84, -4, -15, -2.25, -3.41, -1, -3, -1, -3.41], + 'descriptor': {'dimensions': [3, 4], 'dataType': 'float32'} + } + } + } + }, +]; + +if (navigator.ml) { + gruCellTests.forEach((test) => { + webnn_conformance_test( + buildGraphAndCompute, getGruCellPrecisionTolerance, test); + }); +} else { + test(() => assert_implements(navigator.ml, 'missing navigator.ml')); +} diff --git a/tests/wpt/tests/webnn/validation_tests/destroyContext.https.any.js b/tests/wpt/tests/webnn/validation_tests/destroyContext.https.any.js new file mode 100644 index 00000000000..9aa3dbf6753 --- /dev/null +++ b/tests/wpt/tests/webnn/validation_tests/destroyContext.https.any.js @@ -0,0 +1,150 @@ +// META: timeout=long +// META: title=validation tests for WebNN API MLContext::destroy() +// META: global=window,dedicatedworker + +'use strict'; + +promise_test(async t => { + const context = await navigator.ml.createContext(); + context.destroy(); + await context.lost; +}, 'Context will be lost by destroyed.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + context.destroy(); + context.destroy(); + await context.lost; +}, 'Context can be destroyed twice.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + const builder = new MLGraphBuilder(context); + context.destroy(); + assert_throws_dom('InvalidStateError', () => { + const operandType = {dataType: 'float32', dimensions: [1]}; + builder.input('input', operandType); + }); +}, 'Destroyed context can not build operator.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + context.destroy(); + assert_throws_dom('InvalidStateError', () => { + new MLGraphBuilder(context); + }); +}, 'Destroyed context can not create graph builder.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + const builder = new MLGraphBuilder(context); + const operandType = {dataType: 'float32', dimensions: [1]}; + const input_operand = builder.input('input', operandType); + const const_operand = builder.constant(operandType, Float32Array.from([2])); + const output_operand = builder.mul(input_operand, const_operand); + + context.destroy(); + promise_rejects_dom( + t, 'InvalidStateError', builder.build({'output': output_operand})); +}, 'Destroyed context can not build graph.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + const builder = new MLGraphBuilder(context); + const operandType = {dataType: 'float32', dimensions: [1]}; + const input_operand = builder.input('input', operandType); + const const_operand = builder.constant(operandType, Float32Array.from([2])); + const output_operand = builder.mul(input_operand, const_operand); + const graph = await builder.build({'output': output_operand}); + + context.destroy(); + let inputs = {'input': Float32Array.from([1])}; + let outputs = {'output': new Float32Array(1)}; + promise_rejects_dom( + t, 'InvalidStateError', context.compute(graph, inputs, outputs)); +}, 'Destroyed context can not compute.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + const builder = new MLGraphBuilder(context); + const operandType = {dataType: 'float32', dimensions: [1]}; + const lhsOperand = builder.input('lhs', operandType); + const rhsOperand = builder.input('rhs', operandType); + const graph = + await builder.build({'output': builder.sub(lhsOperand, rhsOperand)}); + + const lhsBuffer = await context.createBuffer(operandType); + const rhsBuffer = await context.createBuffer(operandType); + + const dispatchOutputs = {'output': await context.createBuffer(operandType)}; + context.destroy(); + assert_throws_dom('InvalidStateError', () => { + context.dispatch( + graph, { + 'lhs': lhsBuffer, + 'rhs': rhsBuffer, + }, + dispatchOutputs); + }); +}, 'Destroyed context can not dispatch.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + const builder = new MLGraphBuilder(context); + const operandType = {dataType: 'float32', dimensions: [1]}; + const lhsOperand = builder.input('lhs', operandType); + const rhsOperand = builder.input('rhs', operandType); + const graph = + await builder.build({'output': builder.sub(lhsOperand, rhsOperand)}); + + const lhsBuffer = await context.createBuffer(operandType); + const rhsBuffer = await context.createBuffer(operandType); + + const dispatchOutputs = {'output': await context.createBuffer(operandType)}; + context.dispatch( + graph, { + 'lhs': lhsBuffer, + 'rhs': rhsBuffer, + }, + dispatchOutputs); + context.destroy(); +}, 'Executing dispatch() before context destroyed is OK.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + context.destroy(); + promise_rejects_dom( + t, 'InvalidStateError', + context.createBuffer({dataType: 'float32', dimensions: [1]})); +}, 'Destroyed context can not create buffer.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + const buffer = + await context.createBuffer({dataType: 'float32', dimensions: [1]}); + context.destroy(); + promise_rejects_dom(t, 'InvalidStateError', context.readBuffer(buffer)); +}, 'Destroyed context can not read buffer.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + const buffer = + await context.createBuffer({dataType: 'float32', dimensions: [1]}); + let promise = context.readBuffer(buffer); + context.destroy(); + promise_rejects_dom(t, 'InvalidStateError', promise); +}, 'Pending promise of readbuffer() will be rejected immediately when context is destroyed.'); + +promise_test(async t => { + const context = await navigator.ml.createContext(); + // Destroying another context doesn't impact the first context. + const another_context = await navigator.ml.createContext(); + another_context.destroy(); + const buffer = + await context.createBuffer({dataType: 'float32', dimensions: [1]}); + let arrayBuffer = new ArrayBuffer(4); + context.destroy(); + assert_throws_dom('InvalidStateError', () => { + context.writeBuffer(buffer, new Uint8Array(arrayBuffer)); + }); +}, 'Destroyed context can not write buffer.'); diff --git a/tests/wpt/tests/webvtt/api/VTTCue/WEB_FEATURES.yml b/tests/wpt/tests/webvtt/api/VTTCue/WEB_FEATURES.yml new file mode 100644 index 00000000000..bb2aa7cddd6 --- /dev/null +++ b/tests/wpt/tests/webvtt/api/VTTCue/WEB_FEATURES.yml @@ -0,0 +1,20 @@ +features: +- name: webvtt + files: + - align.html + - constructor-exceptions.html + - getCueAsHTML.html + - line.html + - position.html + - size.html + - snapToLines.html + - text.html + - vertical.html +- name: webvtt-cue-alignment + files: + - lineAlign.html + - positionAlign.html +- name: webvtt-regions + files: + - region.html +# Note: constructor.html spans features and is not mapped. diff --git a/tests/wpt/tests/webvtt/api/VTTRegion/WEB_FEATURES.yml b/tests/wpt/tests/webvtt/api/VTTRegion/WEB_FEATURES.yml new file mode 100644 index 00000000000..c80f6b830b6 --- /dev/null +++ b/tests/wpt/tests/webvtt/api/VTTRegion/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webvtt-regions + files: "**" diff --git a/tests/wpt/tests/webvtt/WEB_FEATURES.yml b/tests/wpt/tests/webvtt/parsing/cue-text-parsing/tests/WEB_FEATURES.yml similarity index 100% rename from tests/wpt/tests/webvtt/WEB_FEATURES.yml rename to tests/wpt/tests/webvtt/parsing/cue-text-parsing/tests/WEB_FEATURES.yml diff --git a/tests/wpt/tests/webvtt/parsing/file-parsing/WEB_FEATURES.yml b/tests/wpt/tests/webvtt/parsing/file-parsing/WEB_FEATURES.yml new file mode 100644 index 00000000000..32c42f69ed5 --- /dev/null +++ b/tests/wpt/tests/webvtt/parsing/file-parsing/WEB_FEATURES.yml @@ -0,0 +1,4 @@ +features: +- name: webvtt + files: + - signature-invalid.html diff --git a/tests/wpt/tests/webvtt/parsing/file-parsing/tests/WEB_FEATURES.yml b/tests/wpt/tests/webvtt/parsing/file-parsing/tests/WEB_FEATURES.yml new file mode 100644 index 00000000000..b85b127d102 --- /dev/null +++ b/tests/wpt/tests/webvtt/parsing/file-parsing/tests/WEB_FEATURES.yml @@ -0,0 +1,47 @@ +features: +- name: webvtt + files: + - arrows.html + - comment-in-cue-text.html + - header-garbage.html + - header-space.html + - header-tab.html + - header-timings.html + - ids.html + - newlines.html + - nulls.html + - settings-align.html + - settings-multiple.html + - settings-size.html + - settings-vertical.html + - signature-bom.html + - signature-no-newline.html + - signature-space-no-newline.html + - signature-space.html + - signature-tab-no-newline.html + - signature-tab.html + - signature-timings.html + - stylesheets.html + - timings-60.html + - timings-eof.html + - timings-garbage.html + - timings-negative.html + - timings-omitted-hours.html + - timings-too-long.html + - timings-too-short.html + - whitespace-chars.html +- name: webvtt-cue-alignment + files: + - settings-line.html + - settings-position.html +- name: webvtt-regions + files: + - header-regions.html + - regions-edge-case.html + - regions-id.html + - regions-lines.html + - regions-old.html + - regions-regionanchor.html + - regions-scroll.html + - regions-viewportanchor.html + - settings-region.html diff --git a/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/WEB_FEATURES.yml b/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/WEB_FEATURES.yml new file mode 100644 index 00000000000..5b5544deec2 --- /dev/null +++ b/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webvtt + files: "**" diff --git a/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/regions/WEB_FEATURES.yml b/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/regions/WEB_FEATURES.yml new file mode 100644 index 00000000000..c80f6b830b6 --- /dev/null +++ b/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/regions/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webvtt-regions + files: "**" diff --git a/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/selectors/cue-region/WEB_FEATURES.yml b/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/selectors/cue-region/WEB_FEATURES.yml new file mode 100644 index 00000000000..c80f6b830b6 --- /dev/null +++ b/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/selectors/cue-region/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webvtt-regions + files: "**" diff --git a/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/selectors/cue-region_function/WEB_FEATURES.yml b/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/selectors/cue-region_function/WEB_FEATURES.yml new file mode 100644 index 00000000000..c80f6b830b6 --- /dev/null +++ b/tests/wpt/tests/webvtt/rendering/cues-with-video/processing-model/selectors/cue-region_function/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: webvtt-regions + files: "**"