diff options
Diffstat (limited to 'tests')
476 files changed, 20431 insertions, 3706 deletions
diff --git a/tests/wpt/meta-legacy-layout/css/css-animations/animate-with-color-mix.html.ini b/tests/wpt/meta-legacy-layout/css/css-animations/animate-with-color-mix.html.ini new file mode 100644 index 00000000000..4172b4ec02b --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-animations/animate-with-color-mix.html.ini @@ -0,0 +1,18 @@ +[animate-with-color-mix.html] + [Animate from neutral keyframe with color-mix to legacy rgb] + expected: FAIL + + [Animate from legacy rgb to neutral keyframe with color-mix] + expected: FAIL + + [Animate from neutral keyframe with color-mix to srgb] + expected: FAIL + + [Animate from srgb to neutral keyframe with color-mix] + expected: FAIL + + [Animate from color-mix with transparency to legacy rgba] + expected: FAIL + + [Animate from legacy rgba to color-mix with transparency] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-relative-color.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-relative-color.html.ini index 6ca549e0935..718a1bf8f6b 100644 --- a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-relative-color.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-relative-color.html.ini @@ -3316,3 +3316,9 @@ [Property color value 'color(from color(xyz-d65 7 -20.5 100 / 0.8) xyz-d65 calc(x + 1) calc(y + 1) calc(z + 1) / calc(alpha + 0.01))'] expected: FAIL + + [Property color value 'color(from color(srgb 0.25 0.5 0.75) xyz-d50 x y z)'] + expected: FAIL + + [Property color value 'color(from color(srgb 0.25 0.5 0.75) xyz-d65 x y z)'] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-end-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-end-001.html.ini new file mode 100644 index 00000000000..175c900f1b4 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-end-001.html.ini @@ -0,0 +1,11 @@ +[text-spacing-trim-end-001.html?class=halt,vrl] + expected: FAIL + +[text-spacing-trim-end-001.html?class=chws,vrl] + expected: FAIL + +[text-spacing-trim-end-001.html?class=halt,htb] + expected: FAIL + +[text-spacing-trim-end-001.html?class=chws,htb] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-transform/math/text-transform-math-auto-003.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-transform/math/text-transform-math-auto-003.html.ini new file mode 100644 index 00000000000..f63461815af --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-text/text-transform/math/text-transform-math-auto-003.html.ini @@ -0,0 +1,336 @@ +[text-transform-math-auto-003.html] + [Selection.toString() for math-auto 'A' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'B' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'C' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'D' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'E' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'F' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'G' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'H' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'I' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'J' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'K' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'L' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'M' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'N' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'O' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'P' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Q' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'R' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'S' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'T' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'U' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'V' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'W' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'X' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Y' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Z' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'a' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'b' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'c' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'd' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'e' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'f' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'g' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'h' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'i' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'j' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'k' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'l' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'm' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'n' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'o' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'p' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'q' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'r' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 's' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 't' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'u' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'v' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'w' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'x' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'y' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'z' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ı' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ȷ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Α' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Β' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Γ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Δ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ε' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ζ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Η' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Θ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ι' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Κ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Λ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Μ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ν' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ξ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ο' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Π' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ρ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Σ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Τ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Υ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Φ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Χ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ψ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ω' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'α' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'β' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'γ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'δ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ε' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ζ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'η' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'θ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ι' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'κ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'λ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'μ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ν' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ξ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ο' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'π' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ρ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ς' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'σ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'τ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'υ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'φ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'χ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ψ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ω' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϑ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϕ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϖ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϰ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϱ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϴ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϵ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto '∂' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto '∇' returns the transformed character.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-transform/text-transform-upperlower-107.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-transform/text-transform-upperlower-107.html.ini new file mode 100644 index 00000000000..afffdbf6c3b --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-text/text-transform/text-transform-upperlower-107.html.ini @@ -0,0 +1,3 @@ +[text-transform-upperlower-107.html] + [Selection.toString() for 'ß' with text-transform: uppercase] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-transitions/animations/animate-with-color-mix.html.ini b/tests/wpt/meta-legacy-layout/css/css-transitions/animations/animate-with-color-mix.html.ini new file mode 100644 index 00000000000..b195b0e5f61 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-transitions/animations/animate-with-color-mix.html.ini @@ -0,0 +1,18 @@ +[animate-with-color-mix.html] + [Transition from color-mix to legacy rgb] + expected: FAIL + + [Transition from legacy rgb to color-mix] + expected: FAIL + + [Transition from color-mix to srgb] + expected: FAIL + + [Transition from srgb to color-mix] + expected: FAIL + + [Transition from color-mix with transparency to legacy rgba] + expected: FAIL + + [Transition from legacy rgba to color-mix with transparency] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini index a08341d7a0f..47102f89bf6 100644 --- a/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-values/progress-computed.tentative.html.ini @@ -55,3 +55,12 @@ [calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 2) should be used-value-equivalent to 4] expected: FAIL + + [calc(progress(abs(5%) from hypot(3%, 4%) to 10%)) should be used-value-equivalent to 0] + expected: FAIL + + [progress(1000em from 10em to 110em) should be used-value-equivalent to 9.9] + expected: FAIL + + [scale(progress(1000em from 10rem to 110em)) should be used-value-equivalent to scale(9.9)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index 314dca9c1f5..d52a3e77a70 100644 --- a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -1,3 +1,6 @@ [MediaQueryList-addListener-removeListener.html] [listeners are called when <iframe> is resized] expected: FAIL + + [listeners are called correct number of times] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/offsetTopLeft-border-box.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/offsetTopLeft-border-box.html.ini deleted file mode 100644 index 00753fab1d1..00000000000 --- a/tests/wpt/meta-legacy-layout/css/cssom-view/offsetTopLeft-border-box.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[offsetTopLeft-border-box.html] - [container: 0] - expected: FAIL - - [container: 1] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/selectors/has-display-none-checked.html.ini b/tests/wpt/meta-legacy-layout/css/selectors/has-display-none-checked.html.ini new file mode 100644 index 00000000000..17279e47d6c --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/selectors/has-display-none-checked.html.ini @@ -0,0 +1,2 @@ +[has-display-none-checked.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/css/selectors/invalidation/has-append-first-node.html.ini b/tests/wpt/meta-legacy-layout/css/selectors/invalidation/has-append-first-node.html.ini new file mode 100644 index 00000000000..ae43158a3da --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/selectors/invalidation/has-append-first-node.html.ini @@ -0,0 +1,2 @@ +[has-append-first-node.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/selectors/invalidation/has-sibling-insertion-removal.html.ini b/tests/wpt/meta-legacy-layout/css/selectors/invalidation/has-sibling-insertion-removal.html.ini index 78fdcc66a68..3fc80bbf3b9 100644 --- a/tests/wpt/meta-legacy-layout/css/selectors/invalidation/has-sibling-insertion-removal.html.ini +++ b/tests/wpt/meta-legacy-layout/css/selectors/invalidation/has-sibling-insertion-removal.html.ini @@ -37,3 +37,6 @@ [subject13: color after #sibling12_1 removed should be rgb(0, 128, 0)] expected: FAIL + + [subject14: initial color should be rgb(0, 128, 0)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/dom/events/scrolling/scrollend-fires-to-text-input.html.ini b/tests/wpt/meta-legacy-layout/dom/events/scrolling/scrollend-fires-to-text-input.html.ini new file mode 100644 index 00000000000..29dfee6fbdb --- /dev/null +++ b/tests/wpt/meta-legacy-layout/dom/events/scrolling/scrollend-fires-to-text-input.html.ini @@ -0,0 +1,4 @@ +[scrollend-fires-to-text-input.html] + expected: TIMEOUT + [scrolled input field should receive scrollend.] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/dom/observable/tentative/observable-toArray.any.js.ini b/tests/wpt/meta-legacy-layout/dom/observable/tentative/observable-toArray.any.js.ini new file mode 100644 index 00000000000..5d47bdd0b8b --- /dev/null +++ b/tests/wpt/meta-legacy-layout/dom/observable/tentative/observable-toArray.any.js.ini @@ -0,0 +1,38 @@ +[observable-toArray.any.html] + [toArray(): basic next/complete] + expected: FAIL + + [toArray(): first error() rejects promise; subsequent error()s report the exceptions] + expected: FAIL + + [toArray(): complete() resolves promise; subsequent error()s report the exceptions] + expected: FAIL + + [toArray(): Subscribing with an aborted signal returns an immediately rejected promise] + expected: FAIL + + [toArray(): Aborting the passed-in signal rejects the returned promise] + expected: FAIL + + [Operator Promise abort ordering] + expected: FAIL + + +[observable-toArray.any.worker.html] + [toArray(): basic next/complete] + expected: FAIL + + [toArray(): first error() rejects promise; subsequent error()s report the exceptions] + expected: FAIL + + [toArray(): complete() resolves promise; subsequent error()s report the exceptions] + expected: FAIL + + [toArray(): Subscribing with an aborted signal returns an immediately rejected promise] + expected: FAIL + + [toArray(): Aborting the passed-in signal rejects the returned promise] + expected: FAIL + + [Operator Promise abort ordering] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/api/basic/keepalive.any.js.ini b/tests/wpt/meta-legacy-layout/fetch/api/basic/keepalive.any.js.ini index 4c1c78640bb..9aa4b06752c 100644 --- a/tests/wpt/meta-legacy-layout/fetch/api/basic/keepalive.any.js.ini +++ b/tests/wpt/meta-legacy-layout/fetch/api/basic/keepalive.any.js.ini @@ -2,3 +2,18 @@ expected: TIMEOUT [keepalive in onunload in nested frame in another window] expected: FAIL + + [[keepalive\] simple GET request on 'pagehide' [no payload\]; setting up] + expected: TIMEOUT + + [[keepalive\] simple GET request on 'unload' [no payload\]; setting up] + expected: NOTRUN + + [[keepalive\] simple POST request on 'load' [no payload\]; setting up] + expected: NOTRUN + + [[keepalive\] simple POST request on 'pagehide' [no payload\]; setting up] + expected: NOTRUN + + [[keepalive\] simple POST request on 'unload' [no payload\]; setting up] + expected: NOTRUN diff --git a/tests/wpt/meta-legacy-layout/fetch/api/cors/cors-keepalive.any.js.ini b/tests/wpt/meta-legacy-layout/fetch/api/cors/cors-keepalive.any.js.ini index 6801d7d88bd..9f657f6abc0 100644 --- a/tests/wpt/meta-legacy-layout/fetch/api/cors/cors-keepalive.any.js.ini +++ b/tests/wpt/meta-legacy-layout/fetch/api/cors/cors-keepalive.any.js.ini @@ -1,2 +1,121 @@ [cors-keepalive.any.html] expected: TIMEOUT + [[keepalive\] Same domain different port GET request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: TIMEOUT + + [[keepalive\] Same domain different port GET request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port GET request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port GET request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port GET request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port GET request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port GET request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port GET request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage GET request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage GET request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage GET request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage GET request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port GET request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port GET request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port GET request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port GET request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol GET request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol GET request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol GET request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol GET request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port POST request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port POST request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port POST request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port POST request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port POST request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port POST request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port POST request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port POST request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage POST request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage POST request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage POST request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage POST request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port POST request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port POST request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port POST request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port POST request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol POST request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol POST request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol POST request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol POST request in unload [cors mode\]; setting up] + expected: NOTRUN diff --git a/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini b/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini index f9de5391ad6..0d48169e3cc 100644 --- a/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini +++ b/tests/wpt/meta-legacy-layout/fetch/metadata/generated/css-images.sub.tentative.html.ini @@ -146,3 +146,6 @@ [list-style-image sec-fetch-site - HTTPS downgrade-upgrade] expected: FAIL + + [background-image sec-fetch-site - HTTPS downgrade (header not sent)] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.https.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.https.window.js.ini deleted file mode 100644 index 4deb955ad92..00000000000 --- a/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.https.window.js.ini +++ /dev/null @@ -1,37 +0,0 @@ -[location.tentative.https.window.html?include=from-private] - [private to local: failed preflight.] - expected: FAIL - - [private to local: success.] - expected: FAIL - - -[location.tentative.https.window.html?include=from-public] - [public to local: failed preflight.] - expected: FAIL - - [public to local: success.] - expected: FAIL - - [public to private: failed preflight.] - expected: FAIL - - [public to private: success.] - expected: FAIL - - -[location.tentative.https.window.html?include=from-treat-as-public] - [treat-as-public-address to local: failed preflight.] - expected: FAIL - - [treat-as-public-address to local: success.] - expected: FAIL - - [treat-as-public-address to private: failed preflight.] - expected: FAIL - - [treat-as-public-address to private: success.] - expected: FAIL - - -[location.tentative.https.window.html?include=from-local] diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.window.js.ini deleted file mode 100644 index db5e79a6043..00000000000 --- a/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.window.js.ini +++ /dev/null @@ -1,15 +0,0 @@ -[location.tentative.window.html] - [private to local: failure.] - expected: FAIL - - [public to local: failure.] - expected: FAIL - - [public to private: failure.] - expected: FAIL - - [treat-as-public-address to local: failure.] - expected: FAIL - - [treat-as-public-address to private: failure.] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.https.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.https.window.js.ini deleted file mode 100644 index 1ce4ab5bc4e..00000000000 --- a/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.https.window.js.ini +++ /dev/null @@ -1,36 +0,0 @@ -[top-location.tentative.https.window.html?include=from-local] - -[top-location.tentative.https.window.html?include=from-public] - [public to local: failed preflight.] - expected: FAIL - - [public to local: success.] - expected: FAIL - - [public to private: failed preflight.] - expected: FAIL - - [public to private: success.] - expected: FAIL - - -[top-location.tentative.https.window.html?include=from-private] - [private to local: failed preflight.] - expected: FAIL - - [private to local: success.] - expected: FAIL - - -[top-location.tentative.https.window.html?include=from-treat-as-public] - [treat-as-public-address to local: failed preflight.] - expected: FAIL - - [treat-as-public-address to local: success.] - expected: FAIL - - [treat-as-public-address to private: failed preflight.] - expected: FAIL - - [treat-as-public-address to private: success.] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.window.js.ini deleted file mode 100644 index 0abfc3f7b03..00000000000 --- a/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.window.js.ini +++ /dev/null @@ -1,15 +0,0 @@ -[top-location.tentative.window.html] - [private to local: failure.] - expected: FAIL - - [public to local: failure.] - expected: FAIL - - [public to private: failure.] - expected: FAIL - - [treat-as-public-address to local: failure.] - expected: FAIL - - [treat-as-public-address to private: failure.] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini index b8fd22e2b81..149bcb4ff8c 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini @@ -10,6 +10,3 @@ [load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank'] expected: FAIL - - [load & pageshow events do not fire on contentWindow of <iframe> element created with src=''] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini index f27acdd3b9d..8ae58f9f1e2 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini @@ -4,3 +4,18 @@ [Test javascript URL string return values in direct and indirect (target) frame contexts. 9] expected: FAIL + + [0041 set in href="" targeting a frame and clicked] + expected: FAIL + + [0080 00FF set in href="" targeting a frame and clicked] + expected: FAIL + + [0080 00FF 0100 set in href="" targeting a frame and clicked] + expected: FAIL + + [D83D DE0D set in href="" targeting a frame and clicked] + expected: FAIL + + [DE0D 0041 set in href="" targeting a frame and clicked] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini new file mode 100644 index 00000000000..60a4fa51f8a --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini @@ -0,0 +1,3 @@ +[a-click.html] + [aElement.click() before the load event must NOT replace] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini deleted file mode 100644 index a03a8322165..00000000000 --- a/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[traverse_the_history_3.html] - [Multiple history traversals, last would be aborted] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini deleted file mode 100644 index d6188c03424..00000000000 --- a/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[traverse_the_history_4.html] - [Multiple history traversals, last would be aborted] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html.ini b/tests/wpt/meta-legacy-layout/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html.ini new file mode 100644 index 00000000000..addd810a23d --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected-font-size-math.html.ini @@ -0,0 +1,2 @@ +[canvas.2d.disconnected-font-size-math.html] + expected: CRASH diff --git a/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html.ini b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html.ini new file mode 100644 index 00000000000..bd5646ca17c --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.arc.w.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html.ini b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html.ini new file mode 100644 index 00000000000..b16f7642c5b --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.bezierCurve.w.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html.ini b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html.ini new file mode 100644 index 00000000000..a1f8bf3ca80 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.line.w.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html.ini b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html.ini new file mode 100644 index 00000000000..7ccc225dfa5 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.quadraticCurve.w.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/dom/aria-element-reflection.html.ini b/tests/wpt/meta-legacy-layout/html/dom/aria-element-reflection.html.ini index 73f2decc09a..97904ee9a5b 100644 --- a/tests/wpt/meta-legacy-layout/html/dom/aria-element-reflection.html.ini +++ b/tests/wpt/meta-legacy-layout/html/dom/aria-element-reflection.html.ini @@ -61,3 +61,6 @@ [Cross-document references and moves.] expected: FAIL + + [Passing values of the wrong type should throw a TypeError] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini b/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini index de7524f79ab..e4f1b2c2e47 100644 --- a/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini @@ -2042,6 +2042,9 @@ [SVGSVGElement interface: attribute onpagereveal] expected: FAIL + [MessagePort interface: attribute onclose] + expected: FAIL + [idlharness.https.html?include=(Document|Window)] [Document interface: documentWithHandlers must inherit property "queryCommandEnabled(DOMString)" with the proper type] diff --git a/tests/wpt/meta-legacy-layout/html/dom/idlharness.worker.js.ini b/tests/wpt/meta-legacy-layout/html/dom/idlharness.worker.js.ini index aaeb3cb9577..5da6b68d32c 100644 --- a/tests/wpt/meta-legacy-layout/html/dom/idlharness.worker.js.ini +++ b/tests/wpt/meta-legacy-layout/html/dom/idlharness.worker.js.ini @@ -649,3 +649,6 @@ [OffscreenCanvasRenderingContext2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional (unrestricted double or DOMPointInit or sequence<(unrestricted double or DOMPointInit)>))] expected: FAIL + + [MessagePort interface: attribute onclose] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html.ini b/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html.ini index 0cfee719c4e..9e6f4115b8c 100644 --- a/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html.ini +++ b/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html.ini @@ -1,7 +1,6 @@ [document-with-fragment-empty.html] - expected: TIMEOUT [Autofocus elements in iframed documents with empty fragments should work.] expected: FAIL [Autofocus elements in top-level browsing context's documents with empty fragments should work.] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index 8acae84e1e4..d169bd2e9fa 100644 --- a/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,5 +1,4 @@ [supported-elements.html] - expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL @@ -10,7 +9,7 @@ expected: FAIL [Area element should support autofocus] - expected: TIMEOUT + expected: FAIL [Host element with delegatesFocus should support autofocus] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/rendering/widgets/input-text-size.html.ini b/tests/wpt/meta-legacy-layout/html/rendering/widgets/input-text-size.html.ini new file mode 100644 index 00000000000..8aeb35c22e1 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/rendering/widgets/input-text-size.html.ini @@ -0,0 +1,3 @@ +[input-text-size.html] + [Size attribute value affects computed style] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/rendering/widgets/textarea-cols-rows.html.ini b/tests/wpt/meta-legacy-layout/html/rendering/widgets/textarea-cols-rows.html.ini new file mode 100644 index 00000000000..721bdd39ab0 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/rendering/widgets/textarea-cols-rows.html.ini @@ -0,0 +1,3 @@ +[textarea-cols-rows.html] + [Cols/rows attribute values affect computed style] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini index 2d3fbf0f308..7f5e282e3e2 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini @@ -1,5 +1,5 @@ [iframe_sandbox_popups_escaping-1.html] type: testharness - expected: TIMEOUT + expected: CRASH [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini index 841bafc6eca..7df8f9458e9 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini @@ -1,3 +1,4 @@ [iframe_sandbox_popups_escaping-2.html] + expected: CRASH [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini index 6bec7a732b8..76e34322dca 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,4 +1,5 @@ [iframe_sandbox_popups_nonescaping-2.html] type: testharness + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index d5fd800f09d..ff6467094b8 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,4 +1,3 @@ [iframe_sandbox_popups_nonescaping-3.html] - expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js.ini index 31928ad3947..3f9e0522fd4 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js.ini @@ -1,10 +1,13 @@ [sandbox-top-navigation-child-special-cases.tentative.sub.window.html] expected: TIMEOUT [Allow top with user activation + user activation] - expected: FAIL + expected: TIMEOUT [A cross-origin frame with frame sandbox flags can navigate top] - expected: FAIL + expected: NOTRUN [A cross-origin frame with delivered sandbox flags can not navigate top] - expected: FAIL + expected: NOTRUN + + [allow-top-navigation-by-user-activation set but no sticky activation] + expected: NOTRUN diff --git a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/text-plain.window.js.ini b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/text-plain.window.js.ini index 91ad54bd932..5ff6874a86e 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/text-plain.window.js.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/text-plain.window.js.ini @@ -158,9 +158,6 @@ [text/plain: Basic test (formdata event)] expected: FAIL - [text/plain: 0x00 in name (normal form)] - expected: FAIL - [text/plain: double quote in name (formdata event)] expected: FAIL @@ -178,3 +175,9 @@ [text/plain: single quote in name (normal form)] expected: FAIL + + [text/plain: Basic File test (formdata event)] + expected: FAIL + + [text/plain: single quote in value (formdata event)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/forms/the-select-element/select-parsing.tentative.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/forms/the-select-element/select-parsing.tentative.html.ini new file mode 100644 index 00000000000..b31f3485d6b --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/semantics/forms/the-select-element/select-parsing.tentative.html.ini @@ -0,0 +1,18 @@ +[select-parsing.tentative.html] + [<button>s and <datalist>s should be allowed in <select>.] + expected: FAIL + + [Nested <button>s in <select> should be flattened out.] + expected: FAIL + + [</select> should close <button>.] + expected: FAIL + + [</select> should close <datalist>.] + expected: FAIL + + [<select> in <button> in <select> should remove inner <select>.] + expected: FAIL + + [<select> in <select><button><div> should remove inner <select>.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini index 071b4378add..cc18f512574 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini @@ -11,3 +11,6 @@ [Check that rel=noopener with target=_parent does a normal load] expected: FAIL + + [Check that rel=noopener with target=_self does a normal load] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini deleted file mode 100644 index 6339abba6d9..00000000000 --- a/tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[async-script.html?reload] - expected: ERROR - -[async-script.html?default] diff --git a/tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html.ini index 9f98a2af558..2287365fc3d 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html.ini @@ -1,4 +1,3 @@ [parse-error.html] - expected: TIMEOUT [JSON modules: parse error] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/syntax/parsing/DOMContentLoaded-defer.html.ini b/tests/wpt/meta-legacy-layout/html/syntax/parsing/DOMContentLoaded-defer.html.ini new file mode 100644 index 00000000000..b8bdf33cb65 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/syntax/parsing/DOMContentLoaded-defer.html.ini @@ -0,0 +1,3 @@ +[DOMContentLoaded-defer.html] + [The end: DOMContentLoaded and defer scripts] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index 7d4c3a1b06d..e55f8f2ce3c 100644 --- a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -5,4 +5,4 @@ expected: TIMEOUT [The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini index 7237f5792de..dbe1def99e3 100644 --- a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini +++ b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini @@ -1,10 +1,9 @@ [promise-job-entry-different-function-realm.html] - expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: TIMEOUT + expected: FAIL [Thenable resolution] expected: FAIL @@ -13,4 +12,4 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js.ini b/tests/wpt/meta-legacy-layout/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js.ini new file mode 100644 index 00000000000..d1d7bbbe965 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js.ini @@ -0,0 +1,2 @@ +[abort-block-bfcache.window.html] + expected: CRASH diff --git a/tests/wpt/meta-legacy-layout/resource-timing/content-type-parsing.html.ini b/tests/wpt/meta-legacy-layout/resource-timing/content-type-parsing.html.ini index 71ca4ed5411..49b17a921b5 100644 --- a/tests/wpt/meta-legacy-layout/resource-timing/content-type-parsing.html.ini +++ b/tests/wpt/meta-legacy-layout/resource-timing/content-type-parsing.html.ini @@ -94,10 +94,10 @@ expected: FAIL [mime-type 16 : text/html;charset=\x0bgbk] - expected: FAIL + expected: TIMEOUT [mime-type 17 : text/html;charset=\x0cgbk] - expected: TIMEOUT + expected: NOTRUN [mime-type 18 : text/html;\x0bcharset=gbk] expected: NOTRUN diff --git a/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.html.ini b/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.html.ini index 12581463c49..86a2572b9b8 100644 --- a/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.html.ini +++ b/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.html.ini @@ -68,6 +68,3 @@ [PerformanceEntry has correct protocol attribute (xmlhttprequest)] expected: FAIL - - [PerformanceEntry has correct name, initiatorType, startTime, and duration (img)] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.https.html.ini b/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.https.html.ini index 0baf5d404c2..32d149c8ae9 100644 --- a/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.https.html.ini +++ b/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.https.html.ini @@ -69,3 +69,5 @@ [PerformanceEntry has correct name, initiatorType, startTime, and duration (link)] expected: NOTRUN + [PerformanceEntry has correct name, initiatorType, startTime, and duration (img)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html.ini b/tests/wpt/meta-legacy-layout/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html.ini new file mode 100644 index 00000000000..350b1091baa --- /dev/null +++ b/tests/wpt/meta-legacy-layout/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html.ini @@ -0,0 +1,2 @@ +[selectall-and-find-svg-text-on-selectstart.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/webidl/ecmascript-binding/global-mutable-prototype.any.js.ini b/tests/wpt/meta-legacy-layout/webidl/ecmascript-binding/global-mutable-prototype.any.js.ini new file mode 100644 index 00000000000..c5b8f38cc86 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/webidl/ecmascript-binding/global-mutable-prototype.any.js.ini @@ -0,0 +1,2 @@ +[global-mutable-prototype.any.shadowrealm.html] + expected: ERROR diff --git a/tests/wpt/meta-legacy-layout/webmessaging/without-ports/017.html.ini b/tests/wpt/meta-legacy-layout/webmessaging/with-ports/017.html.ini index c7946fc91b4..c7946fc91b4 100644 --- a/tests/wpt/meta-legacy-layout/webmessaging/without-ports/017.html.ini +++ b/tests/wpt/meta-legacy-layout/webmessaging/with-ports/017.html.ini diff --git a/tests/wpt/meta-legacy-layout/webmessaging/without-ports/018.html.ini b/tests/wpt/meta-legacy-layout/webmessaging/without-ports/018.html.ini deleted file mode 100644 index b7b36c1d3a4..00000000000 --- a/tests/wpt/meta-legacy-layout/webmessaging/without-ports/018.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[018.html] - expected: TIMEOUT - [origin of the script that invoked the method, javascript:] - expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini b/tests/wpt/meta-legacy-layout/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini new file mode 100644 index 00000000000..aa6c9e5b826 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini @@ -0,0 +1,4 @@ +[localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html] + expected: TIMEOUT + [StorageKey: test 3P about:blank window opened from a 3P iframe] + expected: TIMEOUT diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index 0a9e9a29c97..5264eba4e40 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -91,6 +91,13 @@ {} ] ], + "aria-owns-overlapping.html": [ + "e98ad6fb76ee8a140948955b5292d389d3596ed4", + [ + null, + {} + ] + ], "aria-owns-reparent.html": [ "2eaceb66f6957b0240a4f02b0c23b74e8ca4921a", [ @@ -1747,6 +1754,13 @@ {} ] ], + "display-ruby-text-crash.html": [ + "85ccd459af78d92c2f67aeae221a2ea48aa4c019", + [ + null, + {} + ] + ], "hidden-execcommand-crash.html": [ "67e297e6520b49325dd6091ca474c0151af5e0ea", [ @@ -5229,6 +5243,13 @@ {} ] ], + "delete-in-block-in-progress.html": [ + "233b834ab03ca7da9228fc3e293f91e5429a7e77", + [ + null, + {} + ] + ], "delete-in-dd-editing-host-after-selectall-with-focus.html": [ "585cd17bb82d8b763168cb14b52fe7d18ec457aa", [ @@ -5271,6 +5292,13 @@ {} ] ], + "designMode-on-of-lazy-loading-iframe.html": [ + "90a6c85c45c38ef8e106400dc0445e3fb582d13a", + [ + null, + {} + ] + ], "execCommand-at-load-with-changing-editing-host.html": [ "ec1dd30dc023205ce479df1038d08279c315ae62", [ @@ -7458,6 +7486,13 @@ }, "selection": { "crashtests": { + "selectall-and-find-svg-text-on-selectstart.html": [ + "9f9dfbc9384aa5a330a4304f9c586f62983564ca", + [ + null, + {} + ] + ], "selection-clip-crash.html": [ "66d10b47424226f79f676a87288b667aed2911e1", [ @@ -7472,6 +7507,13 @@ {} ] ], + "selection-modify-line-next-to-textarea.html": [ + "b685add01c004885a32e22211acad17843f1d132", + [ + null, + {} + ] + ], "selection-modify-per-word-in-table-header-group.html": [ "66a57381eda5db2c3bba532cad9f9ef8423072f3", [ @@ -7836,6 +7878,13 @@ } }, "crashtests": { + "color-mix-crashtest.html": [ + "91d29464f50d12985e791d889abfc482a188f767", + [ + null, + {} + ] + ], "get-computed-timing-crash.html": [ "b666eea91f67d1f26cbc88f1f26d4008ceb76af6", [ @@ -131723,6 +131772,32 @@ {} ] ], + "inset-area-abs-inline-container.html": [ + "52344614f0b31a57d470ab773420295e53f1cb49", + [ + null, + [ + [ + "/css/css-anchor-position/inset-area-inline-container-ref.html", + "==" + ] + ], + {} + ] + ], + "inset-area-inline-container.html": [ + "91c9b09735118e0d351af9531a91dd590ea4fde9", + [ + null, + [ + [ + "/css/css-anchor-position/inset-area-inline-container-ref.html", + "==" + ] + ], + {} + ] + ], "sticky-anchor-position-invalid.html": [ "f7c1e1a374fbd8a10ab1b70f7b959c65a01ea993", [ @@ -160197,6 +160272,32 @@ {} ] ], + "contain-layout-dynamic-004.html": [ + "d3c9eb686066eb4681975aca26d9e5962456ee01", + [ + null, + [ + [ + "/css/css-contain/contain-layout-dynamic-004-ref.html", + "==" + ] + ], + {} + ] + ], + "contain-layout-dynamic-005.html": [ + "a430ae5181ba9c97e5f8620c763a9e332acff17f", + [ + null, + [ + [ + "/css/css-contain/contain-layout-dynamic-005-ref.html", + "==" + ] + ], + {} + ] + ], "contain-layout-flexbox-001.html": [ "2b206edb57f46f3baa9dcfbcc24591b852cf8697", [ @@ -161217,6 +161318,32 @@ {} ] ], + "contain-paint-dynamic-004.html": [ + "8e286db8b107ad09bc9a846528c28d3a30d62de8", + [ + null, + [ + [ + "/css/css-contain/contain-paint-dynamic-004-ref.html", + "==" + ] + ], + {} + ] + ], + "contain-paint-dynamic-005.html": [ + "bedac635cec58218f53cd6137d23ca583d3fd0e9", + [ + null, + [ + [ + "/css/css-contain/contain-paint-dynamic-005-ref.html", + "==" + ] + ], + {} + ] + ], "contain-paint-formatting-context-float-001.html": [ "95242072b100ca3f27203f2f9c6748e4dd7c89b4", [ @@ -196330,6 +196457,19 @@ {} ] ], + "overflow-hidden-does-not-prohibit-subgrid.html": [ + "b0c73e0e24e1ed4cc266d4ed9661cdf400599342", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], "parent-repeat-auto-fit-001.html": [ "8ecbccbea64320054f940d9c2e2d31dd028daa14", [ @@ -197012,6 +197152,132 @@ } ] ], + "custom-highlight-dynamic-container-metrics-001.html": [ + "2c28f7d132a68e3c76b255220ade6bc8312c5bd8", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-001-ref.html", + "==" + ] + ], + {} + ] + ], + "custom-highlight-dynamic-container-metrics-002.html": [ + "1a0cbe87a557517125c18dba3cacf41705ff5071", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-container-metrics-002-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 60 + ], + [ + 0, + 25 + ] + ] + ] + ] + } + ] + ], + "custom-highlight-dynamic-container-metrics-003.html": [ + "38246a15affcaed2b1317a43b9c363fbd2cc6717", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-container-metrics-003-ref.html", + "==" + ] + ], + {} + ] + ], + "custom-highlight-dynamic-container-metrics-004.html": [ + "fbdbea32efcbb742083298e05794a0afa931736d", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-container-metrics-003-ref.html", + "==" + ] + ], + {} + ] + ], + "custom-highlight-dynamic-font-metrics-001.html": [ + "4bddbc02a1da53cc441ddad5d6131cbdde5737b5", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-font-metrics-001-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 80 + ], + [ + 0, + 4 + ] + ] + ] + ] + } + ] + ], + "custom-highlight-dynamic-logical-metrics-001.html": [ + "ff52aed6ab174fa36d6cffaf92ba7aff05901ca5", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-logical-metrics-002-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 30 + ], + [ + 0, + 10 + ] + ] + ] + ] + } + ] + ], "custom-highlight-font-metrics-001.html": [ "755409c6b18d1585e3ba10896c3e7ee5537a05ea", [ @@ -213214,6 +213480,19 @@ {} ] ], + "mask-image-svg-gradient-zoomed.html": [ + "17d2869f6e4595361efee89501368d60f1e0508c", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], "mask-image-url-image-hash.html": [ "b1efc90818bec85d5022a9b908a14c2e0c35ff3b", [ @@ -219736,7 +220015,7 @@ ] ], "conditional-rules.html": [ - "ec6f781960b17e46bbfc73478296b1fc05fbb0b3", + "0172db645b246a4ed84f0da6016bef76bae79533", [ null, [ @@ -221058,6 +221337,19 @@ {} ] ], + "scrollbar-gutter-dynamic-004.html": [ + "07b66eede73d471f594864022b13e823050379d1", + [ + null, + [ + [ + "/css/css-overflow/scrollbar-gutter-dynamic-004-ref.html", + "==" + ] + ], + {} + ] + ], "scrollbar-gutter-rtl-002.html": [ "8d0376defdfc69ecb44fc2134c81573e553db2bb", [ @@ -226047,7 +226339,7 @@ ] ], "active-selection-031.html": [ - "c7d79c8ac9fd300fa9f2704f64bb5cc28bfbbb7f", + "7b08269300e32f0257e90b3ce6b5ddecd2b4638d", [ null, [ @@ -251552,6 +251844,49 @@ {} ] ], + "text-spacing-trim-end-001.html": [ + "c5293f099810c41c2da9911b7a3a87b8990693f5", + [ + "css/css-text/text-spacing-trim/text-spacing-trim-end-001.html?class=chws,htb", + [ + [ + "/css/css-text/text-spacing-trim/text-spacing-trim-end-001-ref.html?class=chws,htb", + "==" + ] + ], + {} + ], + [ + "css/css-text/text-spacing-trim/text-spacing-trim-end-001.html?class=chws,vrl", + [ + [ + "/css/css-text/text-spacing-trim/text-spacing-trim-end-001-ref.html?class=chws,vrl", + "==" + ] + ], + {} + ], + [ + "css/css-text/text-spacing-trim/text-spacing-trim-end-001.html?class=halt,htb", + [ + [ + "/css/css-text/text-spacing-trim/text-spacing-trim-end-001-ref.html?class=halt,htb", + "==" + ] + ], + {} + ], + [ + "css/css-text/text-spacing-trim/text-spacing-trim-end-001.html?class=halt,vrl", + [ + [ + "/css/css-text/text-spacing-trim/text-spacing-trim-end-001-ref.html?class=halt,vrl", + "==" + ] + ], + {} + ] + ], "text-spacing-trim-feature-001.html": [ "25ddad34aee7d99ae1b17949773087f2ff558ac3", [ @@ -251785,7 +252120,7 @@ ] ], "text-spacing-trim-start-001.html": [ - "3d481df1da2f6bcf7c56abbfc05c0f218f1d48d4", + "f007245277b7c26bcc92ac5a70664b42b914a5fc", [ "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=chws,htb", [ @@ -316597,6 +316932,19 @@ {} ] ], + "has-display-none-checked.html": [ + "96b1f8bd0489658bdf5183c4772f780a25dc0bb9", + [ + null, + [ + [ + "/css/selectors/has-display-none-checked-ref.html", + "==" + ] + ], + {} + ] + ], "has-style-sharing-001.html": [ "bf45e98cf2d40700c40cacec84edfb26b6cdb55f", [ @@ -316769,6 +317117,19 @@ {} ] ], + "has-append-first-node.html": [ + "82060cc99fa0f181d59a1402120d916c9801f290", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "has-pseudo-element.html": [ "0dfd602e511fbca18f1c54de5ff04719f5935e3a", [ @@ -323062,6 +323423,60 @@ ] ] }, + "path-objects": { + "2d.path.stroke.prune.closePath.arc.html": [ + "4b1d069275881798716a6daee0aaeb110b14cfc5", + [ + null, + [ + [ + "/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.path.stroke.prune.closePath.bezierCurve.html": [ + "2c974bd2740e25ef291da13d39f17eab63013700", + [ + null, + [ + [ + "/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.path.stroke.prune.closePath.line.html": [ + "655b2e12fda4fa9f30c371fab87bcec53693934e", + [ + null, + [ + [ + "/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.path.stroke.prune.closePath.quadraticCurve.html": [ + "9066770e2213d71178c51e435f47ea38b7ef09db", + [ + null, + [ + [ + "/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html", + "==" + ] + ], + {} + ] + ] + }, "reset": { "2d.reset.render.drop_shadow.html": [ "264355c8b315b8a69b9d5007a2d450fa5a91e075", @@ -324917,6 +325332,112 @@ ] ] }, + "path-objects": { + "2d.path.stroke.prune.closePath.arc.html": [ + "aeff5bfd400aaa033c360094cdbc4f2317c3bad6", + [ + null, + [ + [ + "/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.path.stroke.prune.closePath.arc.w.html": [ + "f10836239f4c6b61563545312868d73924df408b", + [ + null, + [ + [ + "/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.path.stroke.prune.closePath.bezierCurve.html": [ + "09d3152a5e71832f29bf5a9be253c5999beb8d7f", + [ + null, + [ + [ + "/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.path.stroke.prune.closePath.bezierCurve.w.html": [ + "66f15eb3f1652bfc393ca8dc6585363b1fe6ccb7", + [ + null, + [ + [ + "/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.path.stroke.prune.closePath.line.html": [ + "5a020cce1718e18cc75df8b04c96cea137ec7d16", + [ + null, + [ + [ + "/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.path.stroke.prune.closePath.line.w.html": [ + "860ad7036c904b4fb7c21030daa2aa52cf8a3599", + [ + null, + [ + [ + "/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.path.stroke.prune.closePath.quadraticCurve.html": [ + "1d516710f2018e7663c93eecd3dffa0d43c6a39f", + [ + null, + [ + [ + "/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.path.stroke.prune.closePath.quadraticCurve.w.html": [ + "5bbd27326374f2ac72d6e002d0ef2a6c68b63a1a", + [ + null, + [ + [ + "/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html", + "==" + ] + ], + {} + ] + ] + }, "reset": { "2d.reset.render.drop_shadow.html": [ "e6decd1687e8dcf78036fdeb3cbfa866738db1ae", @@ -343068,7 +343589,7 @@ ] }, "side-effects-of-animations-current.html": [ - "b0de72bdbf9bcffef88ca5dc12bbe0f9ef239823", + "18b13be9fa689ea6b8fb7f5691bedb0e905fb9d0", [ null, [ @@ -343081,7 +343602,7 @@ ] ], "side-effects-of-animations-in-effect.html": [ - "ff53c98d79373bd048f5ec96051cb129d7ed5795", + "90ee05508270e8d025c94bc68c4464a8ceb58304", [ null, [ @@ -343094,7 +343615,7 @@ ] ], "side-effects-of-animations-none.html": [ - "b460ecc27fd1487075b9871e656e5a3bdbfb5399", + "d200409e647170105eb98d117dcaeaf78a6677ff", [ null, [ @@ -371787,7 +372308,7 @@ ] }, "fedcm-helper.sub.js": [ - "38cc26604ba328bab8562c7975f96ec1d5809ab0", + "765b3cc48a90198c8bd053eab039cd0e1f5ba768", [] ], "fedcm-iframe-level2.html": [ @@ -390588,6 +391109,10 @@ "dc7f77f2b3441ebee25f3e40a9480b668ee79ea4", [] ], + "inset-area-inline-container-ref.html": [ + "ecf54f1a9ac2d756cb78f4d2c0690c1ac8b65916", + [] + ], "reference": { "anchor-scroll-composited-scrolling-006-ref.html": [ "92fe187117ed3f55379797da7987e5272bd71301", @@ -394196,6 +394721,14 @@ "6ee9f4fb8f2111609c7573f199ab7958cfd9eb5a", [] ], + "contain-layout-dynamic-004-ref.html": [ + "40923d836ca0ad31a97de0776ccfe2f5e1051041", + [] + ], + "contain-layout-dynamic-005-ref.html": [ + "3c2e6cf2e41098c7915dd0cd66a5271d5312aa44", + [] + ], "contain-layout-formatting-context-margin-001-ref.html": [ "5a6d653862417ff7c1a6817434da2b2025a347ad", [] @@ -394268,6 +394801,14 @@ "b30f32d9c3d4a1ab037e6ca5cea92c958f340637", [] ], + "contain-paint-dynamic-004-ref.html": [ + "02f3d94ee937b7429584f28826827c4b6b722dd6", + [] + ], + "contain-paint-dynamic-005-ref.html": [ + "1d1ce904fc646925985c64dccd2509f42e1c1fbd", + [] + ], "contain-paint-formatting-context-float-001-ref.html": [ "ceff7f4569e1a7e6b0b36b9f9b3f50317b320bad", [] @@ -408025,6 +408566,10 @@ "98ccfa5b11c7dcb8c83beca3f863742792bb30af", [] ], + "custom-highlight-dynamic-container-metrics-001-ref.html": [ + "8c9732f1ddb934edcc3833adc69cf61f11bbedd2", + [] + ], "custom-highlight-font-metrics-001-ref.html": [ "76b7317caabe5bedf10a98bef5cade11a4f6458e", [] @@ -408164,6 +408709,10 @@ "a4a1829be229acb4c0cf75cbb0e2885060741d3f", [] ], + "iframe-container.html": [ + "c89680e28c920683c23583dee63d8793557c4a80", + [] + ], "run-after-layout-and-paint.js": [ "75d3e279a4cd6916f769a68f2c7f246e8ad354dc", [] @@ -412460,6 +413009,10 @@ "259afc014ec4c5ece4af5bb62a0a2d2d44d867d7", [] ], + "scrollbar-gutter-dynamic-004-ref.html": [ + "edafd49e524cb8a3b77ccccf4f24dc09e6e96ca4", + [] + ], "scrollbar-gutter-rtl-002-ref.html": [ "e6510a081353db996c4ead14ad6a167b90d48297", [] @@ -414058,7 +414611,7 @@ [] ], "active-selection-031-ref.html": [ - "3bb7c329d46e0573a8d58e35d039fdb7826b9e45", + "a9581d40c72d3c0f5feff8b749a4e85a6b13d471", [] ], "active-selection-041-notref.html": [ @@ -419305,6 +419858,10 @@ "acbf37f25060930a82e7c1381b226ff4fa4c80c0", [] ], + "text-spacing-trim-end-001-ref.html": [ + "57013882323048ccc8d651929fdb42f413953882", + [] + ], "text-spacing-trim-feature-001-ref.html": [ "86b61e064076ab4224a65021e31b5678a54e3ec0", [] @@ -419322,7 +419879,7 @@ [] ], "text-spacing-trim-start-001-ref.html": [ - "aef81fbbc0d3d0be562bd2cd4388c4be16bbf128", + "60a255160f2753157b7b46c79ec6d71c8d15f444", [] ], "text-spacing-trim-start-002-ref.html": [ @@ -419340,6 +419897,10 @@ ], "text-transform": { "math": { + "italic-mapping.js": [ + "ba17d3f6b608161239d9bf5ba41f45c949b82532", + [] + ], "text-transform-math-auto-001-ref.html": [ "d6418a346c81da1c1d21289549cb22625ea1081c", [] @@ -430230,6 +430791,10 @@ "6ab36318796dfebc78b62b258e261282fc6c9b98", [] ], + "has-display-none-checked-ref.html": [ + "6e855f52caf235d3c8aa714aecb0818279b46809", + [] + ], "has-style-sharing-001-ref.html": [ "6013cb47d3f4ed5c490bca27ee017aba0cf1afeb", [] @@ -430733,7 +431298,7 @@ [] ], "color-testcommon.js": [ - "44ca0bbb33c9e9571415c14180372ca0b96780a6", + "18ab4420f67946664380f4cabeb830d56ba74210", [] ], "computed-testcommon.js": [ @@ -431240,7 +431805,7 @@ [] ], "requirements.txt": [ - "d8fb98888fd7139ff30f50cbbcbd0d042d89f91f", + "7affe5ec629cfb7c215cb7713145983aafd2616a", [] ], "reviewing-tests": { @@ -431439,7 +432004,7 @@ [] ], "testharness-api.md": [ - "56dc4a4417a21d322c859e543b4d509e45921e96", + "19b96b550b2f7fefe648bab121f90dcc714396ed", [] ], "testharness-tutorial.md": [ @@ -431447,7 +432012,7 @@ [] ], "testharness.md": [ - "e88d5741ca6aeef6952a8fd1357e558cd2ec7476", + "e426e37f22b7afe3fda3a37755f46fb651356b5b", [] ], "tools.md": [ @@ -435016,14 +435581,6 @@ "6247f6d63211cd39dffca9fc507aefcdee586eba", [] ], - "resize-lock-inner-input.html": [ - "5513f89d393ceb3efb2055e4ceec0976be6f799f", - [] - ], - "resize-lock-inner-input.html.headers": [ - "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", - [] - ], "resize-lock-inner.html": [ "fbaf436330f5e6fe466110d4e0b0795f95b9a618", [] @@ -436500,11 +437057,7 @@ [] ], "support.sub.js": [ - "308e86b08ac2b6fd638e533f7538ed641fca1ccd", - [] - ], - "update-location.html": [ - "a0f2b43856abc4518ecd37b8d2c4aa59ee3aa48d", + "46a9d9e0764c06c640adb0f463e8ea432f032e60", [] ], "worker-blob-fetcher.html": [ @@ -436649,7 +437202,7 @@ "fledge": { "tentative": { "TODO": [ - "8a416f17e5717c8a10a4af7a61c1cba5adc75ff8", + "0f68a7c91464941de18e9dabfb8c6ec3cf29930f", [] ], "resources": { @@ -436674,13 +437227,17 @@ [] ], "fledge-util.sub.js": [ - "e9513ecb855b52b104ebf0acead6e7274445d651", + "69573d499832b1c7f61c8caae9b2c3bf8d839f02", [] ], "fledge_http_server_util.py": [ "a5c9c9715aa1013450b9cb60958a55c605b27701", [] ], + "incrementer.wasm": [ + "47afcdef2a2812acccecd0f203d30d3023593f3d", + [] + ], "redirect-to-trusted-signals.py": [ "7da27cd6872f9119c8647be939aecc4452526e50", [] @@ -436698,7 +437255,11 @@ [] ], "subordinate-frame.sub.html": [ - "e696ac0983d7811dd2bffa8b4ded2f0d353941ee", + "f5b1ef995956fbf5fa7359b4d23338ad0185d826", + [] + ], + "subordinate-frame.sub.html.headers": [ + "3e3bda1ec0676be2f9632fcd0cac9ea3391da4da", [] ], "trusted-bidding-signals.py": [ @@ -436709,6 +437270,10 @@ "fc6ec79096c4708b347e0cfc277fa248bf8ba9c3", [] ], + "wasm-helper.py": [ + "a945b4cd5fef0b163c19e302d8fceefc64ca9ffe", + [] + ], "worklet-helpers.js": [ "2147a026aec6818cb3204971037d8cebd14e9d30", [] @@ -442065,6 +442630,22 @@ "2d.path.stroke.overlap.png": [ "e2a35d48d4c4363294aec671a38cbd4b39c9a53c", [] + ], + "2d.path.stroke.prune.closePath.arc-expected.html": [ + "7c0faba5859584c5724ddc1d4acac018e2126d09", + [] + ], + "2d.path.stroke.prune.closePath.bezierCurve-expected.html": [ + "4b867f821fa70fb164fb2af2ce89550566fbab94", + [] + ], + "2d.path.stroke.prune.closePath.line-expected.html": [ + "87a99c793800364bc3e138564522470e367a4cfa", + [] + ], + "2d.path.stroke.prune.closePath.quadraticCurve-expected.html": [ + "03635b01483857d94e7e78884cb288c1642efdc4", + [] ] }, "pixel-manipulation": { @@ -442493,6 +443074,22 @@ "2d.path.stroke.overlap.png": [ "e2a35d48d4c4363294aec671a38cbd4b39c9a53c", [] + ], + "2d.path.stroke.prune.closePath.arc-expected.html": [ + "7c0faba5859584c5724ddc1d4acac018e2126d09", + [] + ], + "2d.path.stroke.prune.closePath.bezierCurve-expected.html": [ + "4b867f821fa70fb164fb2af2ce89550566fbab94", + [] + ], + "2d.path.stroke.prune.closePath.line-expected.html": [ + "87a99c793800364bc3e138564522470e367a4cfa", + [] + ], + "2d.path.stroke.prune.closePath.quadraticCurve-expected.html": [ + "03635b01483857d94e7e78884cb288c1642efdc4", + [] ] }, "pixel-manipulation": { @@ -442789,7 +443386,7 @@ [] ], "path-objects.yaml": [ - "673c9085744279e8331afe53cb05f72777782425", + "755d6fb8d54dcee228ed21d4ea1f40ce70eaaa8b", [] ], "pixel-manipulation.yaml": [ @@ -448726,7 +449323,7 @@ }, "support": { "test-ua-stylesheet.js": [ - "49757a36828476cc5fb4e0d7111607e54db54b0b", + "e23c9a672026ba91f10e89d9b02576fbd70b46cd", [] ] }, @@ -449752,7 +450349,7 @@ [] ], "sandbox-top-navigation-helper.js": [ - "7792c261309587a6434138dea98b80c74f411017", + "413f392dfc6e437a8fa382e86c7b8921c4d491d4", [] ], "subframe.html": [ @@ -456364,7 +456961,7 @@ [] ], "fenced-frame.idl": [ - "0eed6a6b4ba46e0eb30b26cc78a4b9cc65fc544d", + "2107655aa92e09258028f22754cd51ce90312352", [] ], "fetch.idl": [ @@ -456436,7 +457033,7 @@ [] ], "html.idl": [ - "434d0cc0ab1d0456583190224605912275cf2634", + "9193a7487eefb7b4eef7fb7119aa1b8743f5a12e", [] ], "idle-detection.idl": [ @@ -456504,7 +457101,7 @@ [] ], "longtasks.idl": [ - "71ab2ddc67ccda6f18e56fa65c83cc74203bae9a", + "13d4940c1c0aa5268310f799f2b4c17226147c45", [] ], "magnetometer.idl": [ @@ -456604,7 +457201,7 @@ [] ], "paint-timing.idl": [ - "052b74ef6c26dee833ac0980c79efc198a3f4d98", + "396f461e94c56e9ea36a0e7c71cb548e80e7971e", [] ], "parakeet.tentative.idl": [ @@ -456828,11 +457425,11 @@ [] ], "trust-token-api.idl": [ - "fb7f15b4b74a8c10ef510c4f087ee465f64b477c", + "9b74290da724b62fb91b3f5532b689cf70a10045", [] ], "trusted-types.idl": [ - "23562381294e59493880857584f6ac9200254ee2", + "6723994aae621f8d69022993c250a94649182dff", [] ], "turtledove.idl": [ @@ -456928,7 +457525,7 @@ [] ], "webauthn.idl": [ - "e56d61314af4a03ca1a98c3a822c33e8d6722fab", + "cf1a2fbdc48d36ba9d03bb446617eebd624e5e67", [] ], "webcodecs-aac-codec-registration.idl": [ @@ -457471,7 +458068,7 @@ ] }, "lint.ignore": [ - "c82f8027f690cb7184fd41053d3e02f972dcc80e", + "e9f91d80f0d61cd30709d9b6c7a7429a57755ca7", [] ], "loading": { @@ -458767,7 +459364,7 @@ [] ], "mathvariant-transforms.py": [ - "e4857d2a3e326fe981aa3ed2a5c3d0370ea0073b", + "dca85b55618c10c44e4f33f271b48dad2eecd7cf", [] ], "operator-dictionary.py": [ @@ -459485,6 +460082,10 @@ } }, "mediacapture-insertable-streams": { + "META.yml": [ + "0b7ae4d8159b06d48159dba509cf050edb8c43ff", + [] + ], "MediaStreamTrackProcessor-worker.js": [ "51eaef80a90a6e24fce8cad4fee03e05548e4517", [] @@ -460690,6 +461291,10 @@ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] ], + "going-back.html": [ + "f4a26669baa16304240a5c009fa969bdcb4726d2", + [] + ], "include-frames-helper.js": [ "a56489baaf4d06d0b46f659ae8be2d10ffc61238", [] @@ -461902,7 +462507,17 @@ "META.yml": [ "4886e6a70da668e136d3149ee760c79aaf34be39", [] - ] + ], + "noop-sw.js": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "resources": { + "helpers.js": [ + "8395c638f3ee0170e44b35bac866729371db70c6", + [] + ] + } }, "quirks": { "META.yml": [ @@ -464702,7 +465317,7 @@ [] ], "testharness.js": [ - "bc7fb8961b9f46ae77033ddfa6b88c9fb465ac5a", + "1a6a4bb3412cfb09e17e5a16d8fd23a1eb7b6e74", [] ], "testharness.js.headers": [ @@ -467787,6 +468402,10 @@ [] ], "resources": { + "direct.html": [ + "e98d70207afaead718c0c358a8aba0bbbc14da5b", + [] + ], "direct.txt": [ "f3d9861c137b2ddfdeff1690c544f57328df7447", [] @@ -467810,7 +468429,7 @@ ] }, "router-rules.js": [ - "f8fe403298604c0b4bfc09202fa75053447d6081", + "3ecd2025b39f54c78e84ae6838ec0272ff609c2d", [] ], "simple-test-for-condition-main-resource.html": [ @@ -467826,7 +468445,7 @@ [] ], "static-router-sw.js": [ - "1e02dbb56ded1924ba121c1719dd6084ffcba728", + "055c07113c5ecbb695a8c71cebb18a364e755121", [] ], "test-helpers.sub.js": [ @@ -468657,7 +469276,7 @@ [] ], "soft-navigation-helper.js": [ - "58ca9c22657b68c495f6c4662a1073352db6be32", + "d405adb4e7eb7690fe73f31db523d357a38734ee", [] ] } @@ -468959,6 +469578,18 @@ "34a59f07ee1c88c6e17a19c17cc6141d5b2f2650", [] ], + "prerender-while-prerender-initiator.html": [ + "1764271581830ebc124d466658ff82d429c124d7", + [] + ], + "prerender-while-prerender-inner.html": [ + "60b6c64dedc12b014db1925fe3f853a916943fb3", + [] + ], + "prerender-while-prerender-outer.html": [ + "313c34667f42d21dd39adf31a0490318b70baa97", + [] + ], "prerendered-iframe.html": [ "dcdfb9b65b9dd4b7be8137d0a9fec03affa5d301", [] @@ -469196,7 +469827,7 @@ [] ], "helpers.js": [ - "1ca0e121c6afffbd0babb27045f17d972abe1f98", + "0fd5d814dbb075ad39dd5eefeabc2bc1973fdba8", [] ], "resources": { @@ -469205,7 +469836,7 @@ [] ], "embedded_responder.js": [ - "4a956c5f39459022f7c7c63c54ee98e7fdb8b8a0", + "bc13c7e7e8259aa67a99a38dd6fa3c31f3bb269d", [] ], "embedded_worker.js": [ @@ -470719,7 +471350,7 @@ [] ], "manifest_build.py": [ - "6d93a35258398ef98e8f74d107dbb0e0cf171216", + "15b8679f00942e25686833717c8882737edbe396", [] ], "regen_certs.py": [ @@ -470727,7 +471358,7 @@ [] ], "requirements_build.txt": [ - "34baec00a5ee8be081ed6a7253e05bed3a3bc9cf", + "54f21efbd98ba0ce5b7823cc31205f3fbcebf238", [] ], "requirements_macos_color_profile.txt": [ @@ -470921,11 +471552,11 @@ [] ], "lint.py": [ - "cf164b6820f5351716705f96afe41cd2e9835c64", + "e3a555413b83178e34987a3a015159af29bbb34d", [] ], "rules.py": [ - "471ca06a49a5b4c85daf0923e67355a4609e60ac", + "c7b3a59b19e22f0aeda41374f7ba311d635bdbbb", [] ], "tests": { @@ -471122,7 +471753,7 @@ } }, "test_file_lints.py": [ - "b48549c1313e806bc36bf9db8d136419e909fdea", + "f2ebcd9080a32a7cce54e36877e9367360e28237", [] ], "test_lint.py": [ @@ -471187,7 +471818,7 @@ [] ], "sourcefile.py": [ - "832968e63234096700625bd4d93a3db17123c1c4", + "23aa7f491fcf0d225f4e45f3c9ffcd2cbb94da9c", [] ], "spec.py": [ @@ -471216,7 +471847,7 @@ [] ], "test_sourcefile.py": [ - "298e480c142c54bfabdc9d6de0ba3bfe695cc472", + "8a9d8c36ee1c624cec7c6ed7cc9e155b934285a3", [] ], "test_utils.py": [ @@ -471413,7 +472044,7 @@ [] ], "serve.py": [ - "5ba20e04580f2c81a97788c3fceb72983e66e06c", + "116a98c0fcd3a327bce93e781ce4e44fc39f71cf", [] ], "test_functional.py": [ @@ -480789,6 +481420,42 @@ } } }, + "web_features": { + "MANIFEST_SCHEMA.json": [ + "9fe4b68eb4587a86e76c71423eb2a36d31a141e8", + [] + ], + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "commands.json": [ + "9a54b1b00da6703f2f3929d13eda4b24d87c96d5", + [] + ], + "manifest.py": [ + "3a4ec1a6f27182a23430904fbda73cf4bc78fb91", + [] + ], + "tests": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "test_manifest.py": [ + "8b656876ff3a176f4cb010360b07530258891939", + [] + ], + "test_web_feature_map.py": [ + "06afa181fe570e504d4dc2303f2e0429f4021159", + [] + ] + }, + "web_feature_map.py": [ + "d66b07e1146f902f103baf67587f00de8aae0e46", + [] + ] + }, "webdriver": { ".gitignore": [ "e8413e0ee455adc5480098320d254fb9c5ced903", @@ -480813,16 +481480,16 @@ [] ], "client.py": [ - "8f891ffafd60d2a01565fb513d087a27c0346c95", + "73bba55791b3d469bbb6593626648cf4543a2603", [] ], "error.py": [ - "7e411d3b83ba85b37f23d7c66de0071a7621cb6a", + "b0cecce09f7fc835198f381b39dae49f5f40ddfa", [] ], "modules": { "__init__.py": [ - "6f63e85bcd06b8a2ded0c14136d8dddce55e0535", + "0a2ef500c42ce0d5d60b7b24ecc650e92d86a140", [] ], "_module.py": [ @@ -480845,6 +481512,10 @@ "f0a2a5b8026ca476ac52e838924800e1e84cfa48", [] ], + "permissions.py": [ + "3062260b34849f474730fce418f58257cd5baae9", + [] + ], "script.py": [ "737426a5d54641eae811844b84ad128426d25ef0", [] @@ -480854,7 +481525,7 @@ [] ], "storage.py": [ - "c13b196d26a6f5fbe8924b829bce6553ba771f4c", + "c6c51cd9bce6932d201444c69b6254230ec6a36c", [] ] }, @@ -480931,7 +481602,7 @@ [] ], "android.py": [ - "3def5cede44a7d017618fcff677efa5cc04401d1", + "89dc9fad25c31c30b59489f3169acfebbb24d898", [] ], "browser.py": [ @@ -480955,7 +481626,7 @@ [] ], "paths": [ - "7e9ae837ecf40caebdd36f80f312fa637cef0254", + "5a1303362b368be0dce52433adb1528de515a510", [] ], "requirements.txt": [ @@ -481233,11 +481904,11 @@ [] ], "firefox.py": [ - "0cb5ff5d1047b9beb400ea3ac773fbc747e9be2e", + "87b75d8c06b1a7f57c3a2faf5037bc929072c7c3", [] ], "firefox_android.py": [ - "6ebe4a69054579e80dfefa06a0691b53f580ff27", + "16ec605b726e5c8da48665f9b020513047a6707c", [] ], "ie.py": [ @@ -483430,7 +484101,7 @@ "animation-model": { "animation-types": { "property-list.js": [ - "39a92c7498df4902b5502602a796518143ad4d41", + "692ff01328799a075f2d76232cfec06934369088", [] ], "property-types.js": [ @@ -483456,6 +484127,12 @@ [] ] }, + "resources": { + "side-effects-common.js": [ + "2f6531d4fc4d518fd2c979939a5c20c4be65be2e", + [] + ] + }, "side-effects-of-animations-current-ref.html": [ "acc0465b074c2dddfeb1ac427d49a55e5dcecd64", [] @@ -483516,7 +484193,7 @@ ] }, "testcommon.js": [ - "a106cd9ac67464f16cb2a5c104e1dbf742bfc289", + "5b22c658d5cac8b513a4801074c8fa694bbe250d", [] ], "timing-model": { @@ -484491,6 +485168,10 @@ "utils.js": [ "50c39605a1bc187d54afbedb4422ea6965dc5462", [] + ], + "webauthn-subframe.sub.html": [ + "c97255924e14e3242ed88b87abf74c69afb4fb8c", + [] ] } }, @@ -484704,7 +485385,7 @@ [] ], "__init__.py": [ - "cae2e2576d6ce4d13ffa200d846af34d76e51804", + "98b670f89f1500ae10b039d1a9cb99f075aa8031", [] ], "browsing_context": { @@ -484875,6 +485556,20 @@ [] ] }, + "external": { + "permissions": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "set_permission": { + "__init__.py": [ + "b8f6358d61746af39d32612db6649f135e8d94c0", + [] + ] + } + } + }, "input": { "__init__.py": [ "809379d56dc3c28a3283c92561476d36e499c721", @@ -485133,7 +485828,7 @@ }, "storage": { "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + "763e0054f1d5983b4dd0dff79ef37bc18be062e1", [] ], "conftest.py": [ @@ -485934,276 +486629,280 @@ "resources": { "test_data": { "abs.json": [ - "c59054c3e500d90c0b9f4c919df2f421b0030e8d", + "d665da6bb4576cb0575dc5488394648c0421058e", [] ], "add.json": [ - "0a12871cebab50b0e826674107ff503e6ede5347", + "dba361228bdc411dd7665b3a0a3cd1dfbf660d88", [] ], "arg_max.json": [ - "9af47a95894223eb39d4f73f81f5b9c9a4112bff", + "d2fe9e62caf18b17fb69c0baa1335384416c12aa", [] ], "arg_min.json": [ - "dc0b5cdfd1a6bc822bce05f3ba014bb119f3e679", + "132a2dc3e8bf6d0f86357afc0fcbb52aaf1e7c1c", [] ], "average_pool2d.json": [ - "802e0d764621707c0b00d6a05627d0c1eeba9233", + "5a9f4e28b1044b2fcc640c4c88c49c399da17665", [] ], "batch_normalization.json": [ - "19f414bbfea80800c4caad2ceb7c5a83220b7a6e", + "04ab0d0d6f1f4bc6c4287f70026d2547d0e25420", [] ], "ceil.json": [ - "6fa623977fcba14892717a387bb7f7e2cda7ef23", + "b9bccbc3a07657e3ecc3a8dcbfd1c7c6a68896b7", [] ], "clamp.json": [ - "93ab5ca0c1cae95e77bab2405bc10901b4c769d1", + "0e948f99319468a2e1e9c80fc2a2ee4194ffd4c5", [] ], "concat.json": [ - "4230744e86faba47cc458aef147cee25c78d1afa", + "5e2285b75a0a0c17198832d9193855e6560474fc", [] ], "conv2d.json": [ - "850897df4e107c616ec3442563d4a73f642586a9", + "5f8cd814a90dc935ea083315ef13680e84c03f5d", [] ], "conv_transpose2d.json": [ - "980cc9f6629d5cd1f505d3f4acb0c0d3ad065f22", + "42274e6fa37f099cafa4c627fb56ac422a710ba5", [] ], "cos.json": [ - "4d992325509141a4e5959e84317567722624edc6", + "db7ade11e380a6c795d69d7f313b39abd01d3d13", [] ], "div.json": [ - "d72544e8ec4fcdf6b6da2a83829d59e1d9f8afb8", + "a60341181d1c87245bea89181142b8eadd74cb5b", [] ], "elu.json": [ - "68c0c80c59b0180b1b9e32cd4e920abd99996b52", + "b1c443282e43551e7dc2e098fdfa52e421bf776a", [] ], "equal.json": [ - "8350a25d594de6086c8c71e5142df6c92aaec799", + "bbd9143a0327dc999832e09fb78e2ce54e02f668", [] ], "erf.json": [ - "8a9ae6e68c1c4ab61e2d4c4838b014653c9049c9", + "6f0b550cf7933aed8c6fe04a1c5d2206f5f15887", [] ], "exp.json": [ - "8a86edec3b8e5ed460ca8d00242d97e5f110a35f", + "2de52d951e95fc98dae8ce637bd3be48e469cf18", [] ], "expand.json": [ - "be56ca14890db4b002efa72b57d92111e6c6befd", + "00bf4a37b4e9d5ee01138f1a9c722076113d3044", [] ], "floor.json": [ - "f2fa797d4162595fe86704cd2bc3b3719fa34ba0", + "3b5dba1576282692b474d3b57e06d5b12f5b35df", + [] + ], + "gather.json": [ + "a01654637f14e29d3cdb69609b583e2f223cb3d7", [] ], "gemm.json": [ - "3738e19f7c641020309de975b4474fd652fbcb35", + "23a18b316caab6b9531cface498d36808ec4796d", [] ], "greater.json": [ - "12e32d907289b5aae675bf3f514004619c433e58", + "d7dc34d18bbce203ddfc8aeb6c13eb3827b6c4a9", [] ], "greater_or_equal.json": [ - "93ae0b3a4bcc2fdbc53add54b11188f6bb3a27ba", + "e47ac4350abe80932b5560e45eb788e3cbcfbcf1", [] ], "hard_sigmoid.json": [ - "22fe7c6da0c2135ab663eec54d7bf3661c3d1e20", + "5d8c0c5daf1f100aa0847841c1e31fedab34765f", [] ], "hard_swish.json": [ - "8d7812d21e23a1e9aef93dfd14bf2872d556550e", + "e43f62ede0eaffa703b2597e96ddff204f6bbe4e", [] ], "identity.json": [ - "444b39dc06c182b6cfc275daf1cb6edf1bc843db", + "6024e8786fb2e6f6e6c655757001c421d0d4f748", + [] + ], + "layer_normalization.json": [ + "6005776de5e2234f6ef3f7332a574e4bb86b2e71", [] ], "leaky_relu.json": [ - "a95a9a0cfcee9bd549f2e1aed40429592b2049ba", + "be810a90cea061626ba6b707e50e2336ba9e4bdc", [] ], "lesser.json": [ - "64774d1621c23d8aa35674944bc514bd8276911b", + "7527ea5c53a34f0e981953a2deb300b6c7ea2e17", [] ], "lesser_or_equal.json": [ - "8daea5e13680db3f1b15e5a670582577ccfd5961", + "f47bd3b9d9c31f2723303b9768bab148a890301b", [] ], "linear.json": [ - "ded1d2d7e3537492497453b29c8dbaded5c6a3f3", + "6cbb84e9cb0ceeb66a11f2e52821880758889258", [] ], "log.json": [ - "c48406e707554630e93b074eafc34d3c4cb5d07b", + "0481061272dbfa450b3e112c3bdc388f73aa2bba", [] ], "logical_not.json": [ - "5cb3208c786acaa434f0335088b1c572cf039f3b", + "3a37652a134bc0aca13a840b6cc219e619ddde62", [] ], "matmul.json": [ - "6e0423a68d3e3a9c07ea3cd7a7bd83973ae34e46", + "2477b78add426b2d4579c26e12eddcd8614a76d8", [] ], "max.json": [ - "27a258248fcbfc38195e85809a665f3c62dd0fd6", + "26285042d0443a0cdcb9a887fe8c3797961915c3", [] ], "max_pool2d.json": [ - "cf426620e56a0cd568f724ac8f5635a636f70213", + "4532843d2b504222d1ca7518d2ed9af83a0ae123", [] ], "min.json": [ - "f5ea4779f409e86285ec0f5ab9f15f47a86976ec", + "a08e6514286886b4d11e5427a50240ffc87d3ab9", [] ], "mul.json": [ - "e6487cfc59114d83531c40bfa5911278d447687c", + "3de9018427372e2b3ef8f869544ee346507573bc", [] ], "neg.json": [ - "8a1eea34f95f52f024fb8e3b8977e037040f7584", + "34dee53df164b19ed922e9367bb88a6bdb54da7f", [] ], "pad.json": [ - "ac4834d7f09cd3ed788a16de8162fc7cb8b02c19", + "53e8ed8f5979e2adb1f4dfc09d1a9aab32e55dff", [] ], "pow.json": [ - "a097c21d9ef2005ae56856e1ae874a5bfa52608d", + "1738722b10bad4e14643df2e38015cac4b06d339", [] ], "prelu.json": [ - "e45e12cd4b6c9f6db1eeb2243396edea641813f6", + "cf79bee7a9d72ff233de9554240392219abe4d17", [] ], "reciprocal.json": [ - "dce56e5f57d8c08d4a67933e24836e96de110064", + "c71ac28005029c788b2a8600a76dd3caa796f701", [] ], "reduce_l1.json": [ - "aa169299c7c9f3d84bbb62a8c3c7c7b3fb24516a", + "7cbc442511845868aeb7ce5b34f33e35a1b8790d", [] ], "reduce_l2.json": [ - "73397cbb7a80fbc74aad146ff1223c6dbe0fbd1f", + "7e59a45d5e2061883b0b7055741df6c2e38af6e6", [] ], "reduce_log_sum.json": [ - "2e1fee804fd48278937b73b5901b4c4f50c4a6f1", + "250398d227e7a0e6f8dd6e132eb024242e6681dc", [] ], "reduce_log_sum_exp.json": [ - "e5ebb2aba39741928c4a3d8f87a48a6e395ed392", + "b7f39abd522465a80a3c924b573316599dedf8c0", [] ], "reduce_max.json": [ - "4dd7098d03f4fd89a25124b0d3ffdb2d43405704", + "967aea8bf4df442260fcee463363bcb85f49679b", [] ], "reduce_mean.json": [ - "db20b17a8357430bc9f04934b5b9469772a83a16", + "5a48952c0602e03829ec78fd4c193a30b53aebc3", [] ], "reduce_min.json": [ - "db6c0e22695a964291abd95912a35819cfaee113", + "92de75e92ab1c0b750bf31b24912ccbbbd69565a", [] ], "reduce_product.json": [ - "60484300bca4c76e3ddebc7fbcfc49cefafe9be0", + "691bf4da9b330fee90fc02662a57bc89911fccb9", [] ], "reduce_sum.json": [ - "6da78ae804a2e2c6662fa3c1f96897729811b730", + "df47a1a2b266e8787faa5afff1522daf3b01f783", [] ], "reduce_sum_square.json": [ - "cf6bbb65d41cf9f32c201d36e1bc5a67706d4f33", + "8ac373e4b36d765dda3de27fc845437f1784a24f", [] ], "relu.json": [ - "b4597891472edaf4721c2aea012773e16915b165", + "248902c6658a5142e7ed21689d246f6576894c31", [] ], "reshape.json": [ - "fbb93a8e03cc1130adb81d90e4e8d79462bb36a2", + "ada3daa4e2de4beaa718f976f0af094c4652cd1e", [] ], "sigmoid.json": [ - "c233336321775622eaf458ba7bb9d237e90e6d12", + "69756fbb9c2e30ebddf3cea243f16975277b7e27", [] ], "sin.json": [ - "3cc4771a336fe2ac74c48b768271b45d62e3496a", + "1fe76df45fbf5634abe32c4591e4ede8bbbcbbe8", [] ], "slice.json": [ - "ed193dd6563340ff8bd7d11e8e00d743492905d4", + "28cfd2c0e266cac15775570cb73711a2c1183351", [] ], "softmax.json": [ - "52ea57c7632d0d27b1745ddd4e983c37becf9832", + "ebb12114fc6e08ed51b1f9dd3ff820d3664e8f2f", [] ], "softplus.json": [ - "2b26e1439e30cd8c2f7bd504d9553ab6eb38138a", + "eb05b7b281144cbbb2d0a5ec4748883b46a7ad03", [] ], "softsign.json": [ - "e3208b18ad49a64dbbeb6a939dc69d2ea5ab3c43", + "290f6711d09324886c6cbf4a6f11545abc7b34ef", [] ], "split.json": [ - "e4216003c02f7fa8174d2d2734217477ca975407", + "6432044ea204243e75370c9c4861fc5946c6923b", [] ], "sqrt.json": [ - "be9666590bdbe817988f3f80360cc90e8b805ea4", - [] - ], - "squeeze.json": [ - "88890fe87029ad9b8a120d40af6f40ed818d725a", + "fa59308d45ba6cf75fa09bd7f6f7444ad36d9e27", [] ], "sub.json": [ - "4a3096313e1a45f41a8b426fc65ec9f0b47b89c6", + "207d9106b42056c538e7cee21d5d8490c6fe0800", [] ], "tan.json": [ - "857e2b65059e0b4868b9cfe3987d5d4ae135dce7", + "63c7056d90546670f421e128f7c093a9434f5214", [] ], "tanh.json": [ - "9e13b62472a93d0261890b7cc07e41a7b4909ee6", + "063c10623d83b8e03e8990d038164e5996d7f476", [] ], "transpose.json": [ - "03092031d9c407fe0df1009dc49b3aa138d3de38", + "f7e6a7d2dd2f74089f38cd7d43dd847bef452f6a", [] ], "where.json": [ - "ce3cda4bad3a079558c2e15a3272670cc01af0f2", + "7c55b3171aed789df628396d6999dfdaad40a749", [] ] }, "utils.js": [ - "0e2687ec22bac4a4dea3dbe938f9fc386a0a6a4e", + "955e01fb94948ec401fda13b21acd9e54adec398", [] ] } @@ -486332,35 +487031,13 @@ }, "webrtc-encoded-transform": { "META.yml": [ - "6365c8d16af94db42f2948a50c41c43bd296ca5f", - [] - ], - "RTCPeerConnection-insertable-streams.js": [ - "0bf820acde48058711163708b05d02e89501546b", - [] - ], - "RTCPeerConnection-sender-worker-single-frame.js": [ - "c943dafe5b154314132124e1d563df2a00b2aaf7", - [] - ], - "RTCPeerConnection-worker-transform.js": [ - "36e3949e4d584019a0d921858cc75ee7f6bd25c1", + "8947732b6fbf4a1799b6d3a73e69d5e29e2f7daa", [] ], "helper.js": [ "d4cec39ffce0f58b76da653c78dc384f22ffa43d", [] ], - "resources": { - "blank.html": [ - "a3c3a4689a62b45b1e429f6b7a94690e556a1259", - [] - ], - "serviceworker-failure.js": [ - "e7aa8e11be396cc32eda592ae9618391ad6fee40", - [] - ] - }, "routines.js": [ "0d3e2b9b286b5878204371891a6ec5b7ff5a867c", [] @@ -486396,7 +487073,31 @@ "sframe-transform-worker.js": [ "617cf0a38aa0859fa6ee8af01fdab5f94b5beb18", [] - ] + ], + "tentative": { + "RTCPeerConnection-insertable-streams.js": [ + "0bf820acde48058711163708b05d02e89501546b", + [] + ], + "RTCPeerConnection-sender-worker-single-frame.js": [ + "c943dafe5b154314132124e1d563df2a00b2aaf7", + [] + ], + "RTCPeerConnection-worker-transform.js": [ + "36e3949e4d584019a0d921858cc75ee7f6bd25c1", + [] + ], + "resources": { + "blank.html": [ + "a3c3a4689a62b45b1e429f6b7a94690e556a1259", + [] + ], + "serviceworker-failure.js": [ + "e7aa8e11be396cc32eda592ae9618391ad6fee40", + [] + ] + } + } }, "webrtc-extensions": { "META.yml": [ @@ -521065,7 +521766,7 @@ ] ], "report-same-origin-with-cookies.html": [ - "aa2ec6bd9d4e31dc704da8a7ac2bf65c1ed0baac", + "1fde8d0ffd1c2e54bdeda3e6a1d1e167e9caa52e", [ null, {} @@ -525283,7 +525984,7 @@ ] ], "fedcm-endpoint-redirects.https.html": [ - "224868c906cbc26abab6b98f74f11c24dd9a2204", + "cff5036f393231d4e7b275ddb495f4408589378d", [ null, { @@ -525318,7 +526019,7 @@ ] ], "cross-origin-status.https.html": [ - "09a4aa31c6b2ba0680ec6b14d0e661dd93abb69b", + "f32e18d40eda749d24d1a48e7f16d2ab33c262ce", [ null, { @@ -528096,7 +528797,7 @@ ] ], "inset-area-basic.html": [ - "dcb2c153308d80a35c5ac01345665b636297262f", + "4a636355583d4a41d168f5128b67ce5451fc112f", [ null, {} @@ -528131,7 +528832,7 @@ ] ], "inset-area-wm-dir.html": [ - "3acec2b10d6c0f36b275279d83233344dd7ada9d", + "5268cba7e5ec5dfbd1b0d0b675bb94c19fee3cdd", [ null, {} @@ -528407,6 +529108,13 @@ {} ] ], + "animate-with-color-mix.html": [ + "0b6d9bb4ab3ae911e7291e1da5e2259c0afbd0fc", + [ + null, + {} + ] + ], "animation-base-response-001.html": [ "c6731e179823584577f42a649f6f3665611a522a", [ @@ -531329,7 +532037,7 @@ ] ], "color-computed-relative-color.html": [ - "fd4de95370511115d19ee5694a302d620e5fea4f", + "aa2e48723ebb57f9f3859946ed80d4f3ec031ae5", [ null, {} @@ -531990,6 +532698,13 @@ {} ] ], + "container-selection-unknown-features.html": [ + "8e0e34db9a52c5d5c7901e2f22b8fbd2a3aa6c6c", + [ + null, + {} + ] + ], "container-selection.html": [ "cef20f85a2fdf60a08b2ad9ff4cc8e3ea30be6aa", [ @@ -532432,14 +533147,14 @@ ] ], "query-evaluation-style.html": [ - "4262f8bb0c2015e9da32bf8c96432563cb129c18", + "bf059f795a3536802e6f8f84a27a06773ca8bfdf", [ null, {} ] ], "query-evaluation.html": [ - "5b301f2d1d94097f51e4f21bf90a7a99531a9dda", + "469b7b0d7a25cbf8d3fb9b8eb48f17c9209440a9", [ null, {} @@ -532880,7 +533595,7 @@ ] ], "content-visibility-auto-state-changed-removed.html": [ - "ae1c946fa311166d49ee51c90cbe7d0c4b478253", + "5724aa1649c5c00e5d4c4f92f990f4b13b93532b", [ null, {} @@ -532991,7 +533706,7 @@ ] ], "content-visibility-vs-scrollIntoView-003.html": [ - "93b085a5318c0cc2fcaf44fbb1fe3f50485b6319", + "9fc9c5ff32f87c65270981761d27dbe988c50aa3", [ null, {} @@ -533005,14 +533720,21 @@ ] ], "content-visibility-with-popover-top-layer-006.html": [ - "fbe8b9fbb777b2fdd632ddc0f17e69fbfed06bd7", + "36989f79d1d0c06ff1e2bcb52b787ea0fd7e3e8d", [ null, {} ] ], "content-visibility-with-top-layer-006.html": [ - "36a79532a9a73bf13a675ac2b81537e5512b158f", + "79a7993e263e8b65ca55a4dfd68be150c31216bf", + [ + null, + {} + ] + ], + "content-visibility-with-top-layer-007.html": [ + "028f818133b89cadd67b6098188fe6a8de0d00da", [ null, {} @@ -540005,6 +540727,13 @@ ] ] }, + "grid-tracks-fractional-fr.html": [ + "6600cef65c5f8b5502499c8856f614792f293460", + [ + null, + {} + ] + ], "grid-tracks-stretched-with-different-flex-factors-sum.html": [ "f2c1d5e95a2df428432f30fc651b4bf06ae15322", [ @@ -543742,7 +544471,7 @@ ], "parsing": { "margin-rules-001.html": [ - "b73d1bc56fcd7ec66ed5944f4be79eaa63491d19", + "c4270fe606aa575b32b03c0645f634367de99af7", [ null, {} @@ -545148,7 +545877,7 @@ ] ], "unit-cycles.html": [ - "9454c95ac303cf0c2c7a0984c7b2297d549edcf2", + "de26e712c77f1de63f0d596a43e2c25ad5038db2", [ null, {} @@ -545764,6 +546493,13 @@ {} ] ], + "adjustment-followed-by-scrollBy.html": [ + "7428147b83562412903b8f9bfa76d37879a400ba", + [ + null, + {} + ] + ], "adjustments-in-scroll-event-handler.tentative.html": [ "84fd79cbcb91e2e906bfabca59941e42ea5db2d3", [ @@ -552494,6 +553230,24 @@ ] ] }, + "text-transform": { + "math": { + "text-transform-math-auto-003.html": [ + "eff01b08902fe7be675431cdb9322488b11ac578", + [ + null, + {} + ] + ] + }, + "text-transform-upperlower-107.html": [ + "791edd14c0e144a945b4766a338725bca13da6bd", + [ + null, + {} + ] + ] + }, "white-space": { "append-whitespace-only-node-crash-001.html": [ "b32555b18876898beb1b3b7b4559268d64ae9c1c", @@ -553665,13 +554419,20 @@ ] ], "all-with-discrete.tentative.html": [ - "c3642eeed8919e867ec66677f814969c7671e4b8", + "37946717b4c1df8d523cfcae8498a87975f9c30b", [ null, {} ] ], "animations": { + "animate-with-color-mix.html": [ + "3e630a7a2b1e190e3529de8b98ce239ecbda3f89", + [ + null, + {} + ] + ], "change-duration-during-transition.html": [ "cf03f2e1207988fbdb8df6e884422b43f9acc012", [ @@ -554488,7 +555249,7 @@ ] ], "cssUnparsedValue.html": [ - "6fc2e0284c15af2549011543e6550101ed4ff135", + "c87553dd917b124fbe42d82d5d4b13d4499749b9", [ null, {} @@ -557258,7 +558019,7 @@ ] ], "resize-invalid.html": [ - "7f9698f7aadd91cb4f44e44ad01a6a7c79f519ee", + "c6c19ebceac73d4086b1d12c75bfdd7862d8769d", [ null, {} @@ -557976,7 +558737,7 @@ ] ], "progress-computed.tentative.html": [ - "2ef09996d55a758f17cf33987c21ca9f26e36e7f", + "7f8a1ddd78957467c73b487a2373d6c94b5f0302", [ null, {} @@ -558717,7 +559478,7 @@ ] ], "view-transition-name-invalid.html": [ - "0151991436c824225d518ea23ce5f4860bfca8f0", + "00cd411d6ad726690cca6a53caf0c9d2d70ca072", [ null, {} @@ -560660,7 +561421,7 @@ ] ], "client-props-zoom.html": [ - "fb4c95cada42696f29b00c35b9cce67b19aa05e2", + "fc5b07abb5152bd94f9094308dce85a361ce96c8", [ null, {} @@ -561038,7 +561799,7 @@ ] ], "getClientRects-zoom.html": [ - "d4c249eadb0445b668213acf01892899a149529b", + "93d42aee87b5c401fe53e2b9ec389e8930277dbd", [ null, {} @@ -563606,7 +564367,7 @@ ] ], "has-sibling-insertion-removal.html": [ - "3c05a0f495a6d30a99165a59c1018563be029581", + "0655b230524ddb5e43bd0e3390ba887e0e55708f", [ null, {} @@ -563633,6 +564394,15 @@ {} ] ], + "has-with-nesting-parent-containing-hover.html": [ + "8082980e6261ab4bd9407e0a1e0a807a215f4731", + [ + null, + { + "testdriver": true + } + ] + ], "has-with-not.html": [ "b67ec5e3b7d05cee54666c079d197d2232609dad", [ @@ -564051,7 +564821,7 @@ ], "parsing": { "invalid-pseudos.html": [ - "a09572b6517a4e50b2babadcba90c15b49aa8191", + "4076e5302bdc6b5763abffe17712a4aeb63944ac", [ null, {} @@ -564149,7 +564919,7 @@ ] ], "parse-part.html": [ - "f0bec6fbc9b9ace2b7489ed4b655711f43abd470", + "2fbec3670ce78281b1eb60f3b81fa6eba526f694", [ null, {} @@ -567256,6 +568026,13 @@ } ] ], + "scrollend-fires-to-text-input.html": [ + "edc75d9121776e1be660112e1257402ddd1ab5d4", + [ + null, + {} + ] + ], "scrollend-with-snap-on-fractional-offset.html": [ "d1f50304add2ac1f1c3fb69a197150951b2e6a0a", [ @@ -569243,6 +570020,17 @@ "dom/observable/tentative/observable-event-target.window.html", {} ] + ], + "observable-toArray.any.js": [ + "9e6e3abee561de07d814925a57873353ab0b32ae", + [ + "dom/observable/tentative/observable-toArray.any.html", + {} + ], + [ + "dom/observable/tentative/observable-toArray.any.worker.html", + {} + ] ] } }, @@ -589785,7 +590573,7 @@ ] ], "resize-lock-input.https.html": [ - "9cee650f1a85fb04d4f730adbce3df7527da8c98", + "c72075ac250440df3616c48c6bc85dd3d0ad5f51", [ null, { @@ -590895,7 +591683,7 @@ ] ], "keepalive.any.js": [ - "899d41d676a4286cba49743cf06368545507194c", + "d6ec1f67920717d65e9dd550abebbb106fb1688a", [ "fetch/api/basic/keepalive.any.html", { @@ -590905,16 +591693,12 @@ "window" ], [ - "title", - "Fetch API: keepalive handling" - ], - [ - "script", - "/resources/testharness.js" + "timeout", + "long" ], [ - "script", - "/resources/testharnessreport.js" + "title", + "Fetch API: keepalive handling" ], [ "script", @@ -590928,7 +591712,8 @@ "script", "../resources/keepalive-helper.js" ] - ] + ], + "timeout": "long" } ] ], @@ -592307,7 +593092,7 @@ ] ], "cors-keepalive.any.js": [ - "08229f9cfc762e94c9140eaaa08d0b155c4a8e5e", + "f54bf4f9b602f62cb0b982c7a3b41b8702b69e26", [ "fetch/api/cors/cors-keepalive.any.html", { @@ -592326,14 +593111,6 @@ ], [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -594356,7 +595133,7 @@ ] ], "redirect-keepalive.any.js": [ - "beda8bb8e780d555e47b53514520ccfd8ce18df9", + "c9ac13f3dbb27d67af3c55ca2adc82628c71bc80", [ "fetch/api/redirect/redirect-keepalive.any.html", { @@ -594366,16 +595143,12 @@ "window" ], [ - "title", - "Fetch API: keepalive handling" - ], - [ - "script", - "/resources/testharness.js" + "timeout", + "long" ], [ - "script", - "/resources/testharnessreport.js" + "title", + "Fetch API: keepalive handling" ], [ "script", @@ -594389,12 +595162,13 @@ "script", "../resources/keepalive-helper.js" ] - ] + ], + "timeout": "long" } ] ], "redirect-keepalive.https.any.js": [ - "6765ecac6d75914f2fd8b216e1deba6439e74171", + "54e4bc31fa1bd0c770ce0ece37035fcae24274e0", [ "fetch/api/redirect/redirect-keepalive.https.any.html", { @@ -594409,14 +595183,6 @@ ], [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -598902,21 +599668,13 @@ }, "fetch-later": { "activate-after.tentative.https.window.js": [ - "08750dd3fe4762644f09c52be6b5f827c8db127e", + "18b368066b2dde72a950c1d623d856216ba7cf1d", [ "fetch/fetch-later/activate-after.tentative.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/dispatcher/dispatcher.js" ], [ @@ -598944,21 +599702,10 @@ ] ], "basic.tentative.https.window.js": [ - "bf92716681ef0fbaf386c487909283a9c750096e", + "37f72ab89e5bebfc8dae8b14fae5ff2488374647", [ "fetch/fetch-later/basic.tentative.https.window.html", - { - "script_metadata": [ - [ - "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ] - ] - } + {} ] ], "basic.tentative.https.worker.js": [ @@ -599027,21 +599774,13 @@ ] }, "iframe.tentative.https.window.js": [ - "62505bc81d99e6f6b6c3b93b33f7c8963e0ffe17", + "1e9fed11175fb26627318060d1e194173ebd41a5", [ "fetch/fetch-later/iframe.tentative.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -599057,21 +599796,13 @@ ] ], "new-window.tentative.https.window.js": [ - "37b38d7f1dc075535ac9ab9beeee8809e956f8f0", + "93705418f21d1c5d4536a689852b1c252bfdbbb3", [ "fetch/fetch-later/new-window.tentative.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -599087,26 +599818,15 @@ ] ], "non-secure.window.js": [ - "2f2c3ea8d34b9dfaf8bbc6b12acc304a4beb791d", + "c13932e353c96665b098d29dd6fa8bfcb26b7d93", [ "fetch/fetch-later/non-secure.window.html", - { - "script_metadata": [ - [ - "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ] - ] - } + {} ] ], "policies": { "csp-allowed.tentative.https.window.js": [ - "5aa759c2346bd76b6ecc5c04dc5094b7a48297fa", + "60730e0242be8b72a0f62df0e7aca03e0ca93605", [ "fetch/fetch-later/policies/csp-allowed.tentative.https.window.html", { @@ -599117,14 +599837,6 @@ ], [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -599140,7 +599852,7 @@ ] ], "csp-blocked.tentative.https.window.js": [ - "88490950d3a4ec8b10e6430aacdf74116cb1e680", + "b32ddaecfcb5ed7a2cc67411b6c588f4e47ebc4d", [ "fetch/fetch-later/policies/csp-blocked.tentative.https.window.html", { @@ -599151,14 +599863,6 @@ ], [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -599174,7 +599878,7 @@ ] ], "csp-redirect-to-blocked.tentative.https.window.js": [ - "db6b4234b97e1058bb0d884ed0589d43be9174f0", + "3c18727156fd86ea3099c15a221d14be56b6599e", [ "fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.html", { @@ -599185,14 +599889,6 @@ ], [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -599214,21 +599910,13 @@ ] }, "quota.tentative.https.window.js": [ - "4fc5979374c0e214f44d28982c7f22b86454d22f", + "1b5b85563d5798098b0bd3d7d5ec17ce6bbcf6d3", [ "fetch/fetch-later/quota.tentative.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/get-host-info.sub.js" ], [ @@ -599244,21 +599932,13 @@ ] ], "send-on-deactivate.tentative.https.window.js": [ - "94877e8321a768f76844466b722bc0a54f5d0b76", + "d91c73580a3ffdee8e7cf2607a5376cd02a25120", [ "fetch/fetch-later/send-on-deactivate.tentative.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/dispatcher/dispatcher.js" ], [ @@ -599287,21 +599967,13 @@ ], "send-on-discard": { "not-send-after-abort.tentative.https.window.js": [ - "c49e0bde87b803ee9b31a6410310511f40b6ac1c", + "ff8d9520e0e4ad0ee5ba1a80ea6819e32eb7b947", [ "fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -599313,21 +599985,13 @@ ] ], "send-multiple-with-activate-after.tentative.https.window.js": [ - "03078b2b51647cecaee424edf8b4fefaed65540c", + "11e85b31a795b81ecd6af7c89654cc869d0ad598", [ "fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -599344,21 +600008,13 @@ ] ], "send-multiple.tentative.https.window.js": [ - "25ce98d446eaba4b9e0f7d834f647da49d229d37", + "df34ec9ac06a19b7dd59af8ce5944e34a62b1e15", [ "fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -602787,212 +603443,6 @@ } ] ], - "location.tentative.https.window.js": [ - "2d839e060d48adce03e35c37e333317341e34874", - [ - "fetch/private-network-access/location.tentative.https.window.html?include=from-local", - { - "script_metadata": [ - [ - "script", - "/common/subset-tests-by-key.js" - ], - [ - "script", - "/common/dispatcher/dispatcher.js" - ], - [ - "script", - "/common/utils.js" - ], - [ - "script", - "resources/support.sub.js" - ], - [ - "timeout", - "long" - ], - [ - "variant", - "?include=from-local" - ], - [ - "variant", - "?include=from-private" - ], - [ - "variant", - "?include=from-public" - ], - [ - "variant", - "?include=from-treat-as-public" - ] - ], - "timeout": "long" - } - ], - [ - "fetch/private-network-access/location.tentative.https.window.html?include=from-private", - { - "script_metadata": [ - [ - "script", - "/common/subset-tests-by-key.js" - ], - [ - "script", - "/common/dispatcher/dispatcher.js" - ], - [ - "script", - "/common/utils.js" - ], - [ - "script", - "resources/support.sub.js" - ], - [ - "timeout", - "long" - ], - [ - "variant", - "?include=from-local" - ], - [ - "variant", - "?include=from-private" - ], - [ - "variant", - "?include=from-public" - ], - [ - "variant", - "?include=from-treat-as-public" - ] - ], - "timeout": "long" - } - ], - [ - "fetch/private-network-access/location.tentative.https.window.html?include=from-public", - { - "script_metadata": [ - [ - "script", - "/common/subset-tests-by-key.js" - ], - [ - "script", - "/common/dispatcher/dispatcher.js" - ], - [ - "script", - "/common/utils.js" - ], - [ - "script", - "resources/support.sub.js" - ], - [ - "timeout", - "long" - ], - [ - "variant", - "?include=from-local" - ], - [ - "variant", - "?include=from-private" - ], - [ - "variant", - "?include=from-public" - ], - [ - "variant", - "?include=from-treat-as-public" - ] - ], - "timeout": "long" - } - ], - [ - "fetch/private-network-access/location.tentative.https.window.html?include=from-treat-as-public", - { - "script_metadata": [ - [ - "script", - "/common/subset-tests-by-key.js" - ], - [ - "script", - "/common/dispatcher/dispatcher.js" - ], - [ - "script", - "/common/utils.js" - ], - [ - "script", - "resources/support.sub.js" - ], - [ - "timeout", - "long" - ], - [ - "variant", - "?include=from-local" - ], - [ - "variant", - "?include=from-private" - ], - [ - "variant", - "?include=from-public" - ], - [ - "variant", - "?include=from-treat-as-public" - ] - ], - "timeout": "long" - } - ] - ], - "location.tentative.window.js": [ - "180c2a4658ecfc5f645e0504bcc1d7750dad0d02", - [ - "fetch/private-network-access/location.tentative.window.html", - { - "script_metadata": [ - [ - "script", - "/common/dispatcher/dispatcher.js" - ], - [ - "script", - "/common/utils.js" - ], - [ - "script", - "resources/support.sub.js" - ], - [ - "timeout", - "long" - ] - ], - "timeout": "long" - } - ] - ], "mixed-content-fetch.tentative.https.window.js": [ "dbae5193b5cb02e3b0eba3531483aac372ba8700", [ @@ -603312,212 +603762,6 @@ } ] ], - "top-location.tentative.https.window.js": [ - "c22b76385ff3dab5526ab96bcd3d77d1c44b7ed5", - [ - "fetch/private-network-access/top-location.tentative.https.window.html?include=from-local", - { - "script_metadata": [ - [ - "script", - "/common/subset-tests-by-key.js" - ], - [ - "script", - "/common/dispatcher/dispatcher.js" - ], - [ - "script", - "/common/utils.js" - ], - [ - "script", - "resources/support.sub.js" - ], - [ - "timeout", - "long" - ], - [ - "variant", - "?include=from-local" - ], - [ - "variant", - "?include=from-private" - ], - [ - "variant", - "?include=from-public" - ], - [ - "variant", - "?include=from-treat-as-public" - ] - ], - "timeout": "long" - } - ], - [ - "fetch/private-network-access/top-location.tentative.https.window.html?include=from-private", - { - "script_metadata": [ - [ - "script", - "/common/subset-tests-by-key.js" - ], - [ - "script", - "/common/dispatcher/dispatcher.js" - ], - [ - "script", - "/common/utils.js" - ], - [ - "script", - "resources/support.sub.js" - ], - [ - "timeout", - "long" - ], - [ - "variant", - "?include=from-local" - ], - [ - "variant", - "?include=from-private" - ], - [ - "variant", - "?include=from-public" - ], - [ - "variant", - "?include=from-treat-as-public" - ] - ], - "timeout": "long" - } - ], - [ - "fetch/private-network-access/top-location.tentative.https.window.html?include=from-public", - { - "script_metadata": [ - [ - "script", - "/common/subset-tests-by-key.js" - ], - [ - "script", - "/common/dispatcher/dispatcher.js" - ], - [ - "script", - "/common/utils.js" - ], - [ - "script", - "resources/support.sub.js" - ], - [ - "timeout", - "long" - ], - [ - "variant", - "?include=from-local" - ], - [ - "variant", - "?include=from-private" - ], - [ - "variant", - "?include=from-public" - ], - [ - "variant", - "?include=from-treat-as-public" - ] - ], - "timeout": "long" - } - ], - [ - "fetch/private-network-access/top-location.tentative.https.window.html?include=from-treat-as-public", - { - "script_metadata": [ - [ - "script", - "/common/subset-tests-by-key.js" - ], - [ - "script", - "/common/dispatcher/dispatcher.js" - ], - [ - "script", - "/common/utils.js" - ], - [ - "script", - "resources/support.sub.js" - ], - [ - "timeout", - "long" - ], - [ - "variant", - "?include=from-local" - ], - [ - "variant", - "?include=from-private" - ], - [ - "variant", - "?include=from-public" - ], - [ - "variant", - "?include=from-treat-as-public" - ] - ], - "timeout": "long" - } - ] - ], - "top-location.tentative.window.js": [ - "a759852393b6e1a6543cf188409eb445b0053f21", - [ - "fetch/private-network-access/top-location.tentative.window.html", - { - "script_metadata": [ - [ - "script", - "/common/dispatcher/dispatcher.js" - ], - [ - "script", - "/common/utils.js" - ], - [ - "script", - "resources/support.sub.js" - ], - [ - "timeout", - "long" - ] - ], - "timeout": "long" - } - ] - ], "websocket.tentative.https.window.js": [ "0731896098bcefa614ebdf28765a04766b5e6cda", [ @@ -607225,7 +607469,7 @@ ] ], "interest-group-passed-to-generate-bid.https.window.js": [ - "11a63c1aa59bda716a0ab8caf05bc870f5d13bf5", + "2fb346bbe3ba14f0f7577de0111aba270cc87955", [ "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?1-5", { @@ -607276,7 +607520,47 @@ ], [ "variant", - "?31-last" + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" ] ], "timeout": "long" @@ -607332,7 +607616,47 @@ ], [ "variant", - "?31-last" + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" ] ], "timeout": "long" @@ -607388,7 +607712,47 @@ ], [ "variant", - "?31-last" + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" ] ], "timeout": "long" @@ -607444,7 +607808,47 @@ ], [ "variant", - "?31-last" + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" ] ], "timeout": "long" @@ -607500,14 +607904,54 @@ ], [ "variant", - "?31-last" + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" ] ], "timeout": "long" } ], [ - "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?31-last", + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?31-35", { "script_metadata": [ [ @@ -607556,7 +608000,527 @@ ], [ "variant", - "?31-last" + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?36-40", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?41-45", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?46-50", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?51-55", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?56-60", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" ] ], "timeout": "long" @@ -607612,7 +608576,527 @@ ], [ "variant", - "?31-last" + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?61-65", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?66-70", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?71-75", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?76-80", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?81-85", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-50" + ], + [ + "variant", + "?51-55" + ], + [ + "variant", + "?56-60" + ], + [ + "variant", + "?61-65" + ], + [ + "variant", + "?66-70" + ], + [ + "variant", + "?71-75" + ], + [ + "variant", + "?76-80" + ], + [ + "variant", + "?81-85" ] ], "timeout": "long" @@ -607743,7 +609227,7 @@ ] ], "join-leave-ad-interest-group.https.window.js": [ - "c3c97d60c614424262590027d415132ff8d8e756", + "b5dfe025bf275dbf8de24348147a3b6164ab5b2f", [ "fledge/tentative/join-leave-ad-interest-group.https.window.html?1-10", { @@ -608509,7 +609993,7 @@ ] ], "no-winner.https.window.js": [ - "f252aece5bff52572395a64255f945f0030a6c72", + "6e02139c810c4eec7b4e0e721ede858cde56b1c0", [ "fledge/tentative/no-winner.https.window.html?1-5", { @@ -608564,7 +610048,15 @@ ], [ "variant", - "?36-last" + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-last" ] ], "timeout": "long" @@ -608624,7 +610116,15 @@ ], [ "variant", - "?36-last" + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-last" ] ], "timeout": "long" @@ -608684,7 +610184,15 @@ ], [ "variant", - "?36-last" + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-last" ] ], "timeout": "long" @@ -608744,7 +610252,15 @@ ], [ "variant", - "?36-last" + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-last" ] ], "timeout": "long" @@ -608804,7 +610320,15 @@ ], [ "variant", - "?36-last" + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-last" ] ], "timeout": "long" @@ -608864,14 +610388,22 @@ ], [ "variant", - "?36-last" + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-last" ] ], "timeout": "long" } ], [ - "fledge/tentative/no-winner.https.window.html?36-last", + "fledge/tentative/no-winner.https.window.html?36-40", { "script_metadata": [ [ @@ -608924,7 +610456,151 @@ ], [ "variant", - "?36-last" + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-last" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/no-winner.https.window.html?41-45", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-last" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/no-winner.https.window.html?46-last", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-35" + ], + [ + "variant", + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-last" ] ], "timeout": "long" @@ -608984,7 +610660,15 @@ ], [ "variant", - "?36-last" + "?36-40" + ], + [ + "variant", + "?41-45" + ], + [ + "variant", + "?46-last" ] ], "timeout": "long" @@ -645192,13 +646876,13 @@ ] ], "websocket.https.window.js": [ - "7d0dd95d84b7a9e16bf3e27e9d23627f4d3adffa", + "2fe8d02879b8617295c7ddd6f7ca6e58b3eae476", [ "html/cross-origin-embedder-policy/credentialless/websocket.https.window.html", { "script_metadata": [ [ - "TIMEOUT", + "timeout", "long" ], [ @@ -645217,7 +646901,8 @@ "script", "./resources/common.js" ] - ] + ], + "timeout": "long" } ] ] @@ -647350,7 +649035,7 @@ ] ], "aria-element-reflection.html": [ - "8d4d4b8f6a652ac79fae69a03aef50772098b5a5", + "54b9d34eb175d1a18df3d628b1cc38ae74a10d78", [ null, {} @@ -651628,7 +653313,7 @@ ] ], "resets.html": [ - "20d6a565b46964aa1e606391e03d334e80a9b537", + "db21188ee37bc487312996c5afc87a8b1b57f88c", [ null, {} @@ -652403,6 +654088,13 @@ } ] ], + "input-text-size.html": [ + "7f2948280c072d120baf84cd56e540190911951b", + [ + null, + {} + ] + ], "select-wrap-no-spill.optional.html": [ "84aa5602ac1c8cdfb8f7d6e88f4270f72a4422c3", [ @@ -652410,6 +654102,13 @@ {} ] ], + "textarea-cols-rows.html": [ + "012c5aa153dc34541c02899da8f30bb0524d3f47", + [ + null, + {} + ] + ], "the-select-element": { "select-as-listbox-default-styles.tentative.html": [ "3e9b001f99589f0a223074aa8083c1617a2faa05", @@ -654220,7 +655919,7 @@ ] ], "preserves-pitch.html": [ - "d0f4d77a32b23f97e5ef00aaee4bc691683ea79b", + "ba76f51d47192f3248fe1f618e85f85ccc7cb0bf", [ null, { @@ -656548,7 +658247,7 @@ ] ], "sandbox-top-navigation-child-special-cases.tentative.sub.window.js": [ - "a9ea9e472323876d0fd21811450b76897071e40c", + "8681411dd71a296f5c2138274e3056d4ec2e89fb", [ "html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.html", { @@ -656579,14 +658278,6 @@ ], [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" ], [ @@ -656598,7 +658289,7 @@ ] ], "sandbox-top-navigation-child.tentative.sub.window.js": [ - "58133456970a79cb684beb45408fc7da1b5b811d", + "53faa99a4083e593d5e3effab4f682a66b3ada98", [ "html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child.tentative.sub.window.html", { @@ -656629,14 +658320,6 @@ ], [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" ], [ @@ -656648,7 +658331,7 @@ ] ], "sandbox-top-navigation-escalate-privileges.tentative.sub.window.js": [ - "999f056f334db02ddd6e326648e96f542de61ca9", + "a5cda9b0b981cc0a5281f85897ede3f87481e252", [ "html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.html", { @@ -656679,14 +658362,6 @@ ], [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" ], [ @@ -656698,7 +658373,7 @@ ] ], "sandbox-top-navigation-grandchild.tentative.sub.window.js": [ - "519efc94e516d5938b8329ca6591133ed6fb5fef", + "a07148f8029cad59b12d17d9945909b4f5311594", [ "html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-grandchild.tentative.sub.window.html", { @@ -656729,14 +658404,6 @@ ], [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js" ], [ @@ -659901,6 +661568,13 @@ {} ] ], + "select-parsing.tentative.html": [ + "d3576a26b7f9b721acf1ec31cd68544a3eb9e9f1", + [ + null, + {} + ] + ], "select-remove.html": [ "cf2128bd1584f3ca523ecdf8620c0c0f1f2329f6", [ @@ -663636,7 +665310,7 @@ ] ], "parse-error.html": [ - "68d3ef0a9ad3e6d033579c948faf5a8c2b23beb6", + "88fb23a00d963b97e789deb5750e8a6ad62b533a", [ null, {} @@ -663890,7 +665564,7 @@ ] ], "parse-error.html": [ - "68d3ef0a9ad3e6d033579c948faf5a8c2b23beb6", + "9d0e3284fec6e69476162c67f2aec81d2f5a3577", [ null, {} @@ -678989,6 +680663,13 @@ {} ] ], + "mathvariant-auto-selection.html": [ + "f915c44e4978f801ff530617fcfcc3a37ad100fa", + [ + null, + {} + ] + ], "multi-column-layout.html": [ "88db5047e941da6f2cf62f1b80476477a6d25827", [ @@ -680785,7 +682466,7 @@ ] ], "idlharness.any.js": [ - "d7975ab90fa7dc793b7289294cca5ec191522523", + "594753cc1abcfd48947aa9418d6702d658a0458b", [ "mediacapture-insertable-streams/idlharness.any.worker.html", { @@ -688308,21 +689989,10 @@ ] ], "pending_beacon-basic.window.js": [ - "01b37547f7995f520e5d9582d0556d0b18b7cb22", + "d6afd9fb5e5e6880fdcc82cdd5c4c916b411486c", [ "pending-beacon/pending_beacon-basic.window.html", - { - "script_metadata": [ - [ - "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ] - ] - } + {} ] ], "pending_beacon-deactivate.tentative.https.window.js": [ @@ -688358,21 +690028,13 @@ ] ], "pending_beacon-sendondiscard.tentative.https.window.js": [ - "55704388b7c6fe070bb9de3e7c44e165f2b434ea", + "b4283cecef73981296cd8252bc76e12f31db2231", [ "pending-beacon/pending_beacon-sendondiscard.tentative.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/utils.js" ], [ @@ -688384,21 +690046,13 @@ ] ], "pending_beacon-sendonhidden.tentative.https.window.js": [ - "8d7ff24e3f87d150cd7bdd5e5d2139aaa1128680", + "a0ede5dadd9c5175ce56d63c4fab7904864b6102", [ "pending-beacon/pending_beacon-sendonhidden.tentative.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/common/dispatcher/dispatcher.js" ], [ @@ -688745,6 +690399,25 @@ ] ], "not-restored-reasons": { + "abort-block-bfcache.window.js": [ + "8488dd60ccf0a1d6ed032c461e6bb714e24950a7", + [ + "performance-timeline/not-restored-reasons/abort-block-bfcache.window.html", + { + "script_metadata": [ + [ + "title", + "Aborting a parser should block bfcache" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "performance-navigation-timing-attributes.tentative.window.js": [ "2fabf45f351d983a1001d4e1ed6970e818c0c2b6", [ @@ -693215,6 +694888,28 @@ null, {} ] + ], + "subscribe-with-faulty-applicationServerKey.https.window.js": [ + "7d600803e4329da981f8f4be1a017a5e711e8698", + [ + "push-api/subscribe-with-faulty-applicationServerKey.https.window.html", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/resources/testdriver-vendor.js" + ], + [ + "script", + "resources/helpers.js" + ] + ] + } + ] ] }, "quirks": { @@ -709905,6 +711600,13 @@ {} ] ], + "fieldset-source.html": [ + "d75f30e664e325f4e43277b4036da0cbb157a990", + [ + null, + {} + ] + ], "get-keyframes-with-timeline-offset.html": [ "02f910d04e3316feaaa3512101d12bc9dcfa40f5", [ @@ -715181,7 +716883,7 @@ "tentative": { "static-router": { "static-router-main-resource.https.html": [ - "1673b97ca7b61e4c1c193ca548c92706868a56ff", + "30bbf60e83f849390a04a7795fd04184ed121ccd", [ null, {} @@ -715606,14 +717308,14 @@ ] ], "declarative-shadow-dom-attachment.html": [ - "dcee6cf8a103ac516b430e0330e4fbc387e14056", + "aec9a276f931f016ad39b285fa78e02ed0c55df0", [ null, {} ] ], "declarative-shadow-dom-basic.html": [ - "20ca34f6f3e2594f80b304c9a8339d4f751dafa7", + "8799978804a53b40d01a178707735b9d56d3ea36", [ null, {} @@ -715626,6 +717328,13 @@ {} ] ], + "declarative-shadow-dom-repeats.html": [ + "3da9cff360c64d73116cbe554a8243f8ef2ddbb6", + [ + null, + {} + ] + ], "declarative-with-disabled-shadow.html": [ "bcf53403addb673b609ecbc2a4299d84a701fc3e", [ @@ -715641,7 +717350,7 @@ ] ], "innerhtml-before-closing-tag.html": [ - "e87c425860004f512b5ed330614af78818ad4ef4", + "f038d3ecb2e50652e802132f03e5c41c10bd3dd2", [ null, {} @@ -716878,21 +718587,13 @@ ] ], "detection-ImageDataUint16StorageFormat.https.window.js": [ - "24dd3e597c9953260839883e6ed53f7336d8ca40", + "1afe087abf06a2cffdfab46d3dd99f28d31bc7b9", [ "shape-detection/detection-ImageDataUint16StorageFormat.https.window.html", { "script_metadata": [ [ "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ], - [ - "script", "/shape-detection/resources/shapedetection-helpers.js" ] ] @@ -717827,6 +719528,15 @@ } ] ], + "click-event-bubbles.tentative.html": [ + "ee9d1e12335c8dc775a391585b02d892081000f7", + [ + null, + { + "testdriver": true + } + ] + ], "disabled.html": [ "b53c2f701222c4a85e80d2f604ea34baef2b859b", [ @@ -717864,6 +719574,24 @@ } ] ], + "image-lcp-before-detection-second-softnav.tentative.html": [ + "4d26bb926955f6c86e3adae583d1828c8e6b833a", + [ + null, + { + "testdriver": true + } + ] + ], + "image-lcp-before-detection.tentative.html": [ + "0de675d372b68866d92eca772461cb0800f6e7f1", + [ + null, + { + "testdriver": true + } + ] + ], "image-lcp-followed-by-image-softnav-lcp.tentative.html": [ "7a2018d20ee811ff1ec9ca88c80038b0f1239874", [ @@ -717900,6 +719628,15 @@ } ] ], + "interaction-with-paint-before-back.tentative.html": [ + "b587411991383e47381e14fc6e00c0bcfc2dc447", + [ + null, + { + "testdriver": true + } + ] + ], "load-classic-script-history-push.tentative.html": [ "4e375b2164db87258132f4a6edba4b68c1c2b99b", [ @@ -717918,22 +719655,22 @@ } ] ], - "multiple-paint-entries-buffered.tentative.html": [ - "dbb945a0a811330a3efa74b8b34da3f7987e9f38", + "multiple-nested-events.tentative.html": [ + "e51841865d654a65e44fefc505e8102196a4093c", [ null, { - "testdriver": true, - "timeout": "long" + "testdriver": true } ] ], - "multiple_nested_events.tentative.html": [ - "196cfa06868ca9fd321db59755e1908a52c26c1e", + "multiple-paint-entries-buffered.tentative.html": [ + "dbb945a0a811330a3efa74b8b34da3f7987e9f38", [ null, { - "testdriver": true + "testdriver": true, + "timeout": "long" } ] ], @@ -717947,7 +719684,7 @@ ] ], "navigation-api-after-transition-commit.tentative.html": [ - "5c7d8f4f7a4fa4669ab42a18562bd1dceecc4c56", + "ae17db7d59f4c5cf2bf01af2b7224fa6aa8232df", [ null, { @@ -717974,7 +719711,7 @@ ] ], "navigation-api-hash.tentative.html": [ - "a63b177a63f4974423954a720b77b3874139057d", + "e20578ea79ed7a6564a2d960cc1148b520c55ef2", [ null, { @@ -717983,7 +719720,7 @@ ] ], "navigation-api-preventDefault.tentative.html": [ - "d6c61efb3cbc3da1412748b9b2c8a50ab537be63", + "b7b2a24c94203080d052411f080a0dd3c0d11cbe", [ null, { @@ -717992,7 +719729,7 @@ ] ], "navigation-api-rejected.tentative.html": [ - "bcc0451d5bd80203092b6ed769d4ab2c9ccfff19", + "693f876b6e188b4c8ec8531aa7723c6afada70af", [ null, { @@ -718010,7 +719747,7 @@ ] ], "navigation-api-view-transition.tentative.html": [ - "2755f9f9ac75b980018f0ef78055c3f7874621b8", + "4d88f3d0b7d9bee962f7b7e71c7695c421e7b560", [ null, { @@ -718019,7 +719756,7 @@ ] ], "navigation-api.tentative.html": [ - "ca11f684f49908855323e8a337092f9dc971823b", + "2d61736a486127cdfb37210906856cb4404a48d6", [ null, { @@ -718028,7 +719765,7 @@ ] ], "popstate-multiple-backs.tentative.html": [ - "2a12a352bffc3fed4f207daaf877c781b0799ff3", + "fd87f5f03e753b3ac5a8d8268a76496d93c15969", [ null, { @@ -718037,7 +719774,7 @@ ] ], "popstate.tentative.html": [ - "60a5ff72292c15abd281b1264e747a8f3c0d0d2b", + "f89991d76b044c5165c53b3b90b4620eb1e2d047", [ null, { @@ -718169,6 +719906,24 @@ {} ] ], + "text-lcp-before-detection-second-softnav.tentative.html": [ + "bed27c3506914e34cfb7d288ed745fd1fc2cea01", + [ + null, + { + "testdriver": true + } + ] + ], + "text-lcp-before-detection.tentative.html": [ + "11e82e539ff08b249be1fe79f64e4b8df0859601", + [ + null, + { + "testdriver": true + } + ] + ], "text-lcp-followed-by-anim-image-softnav-lcp.tentative.html": [ "0615b513e61319d61bcbed3540aa1a5d47289cb6", [ @@ -719154,9 +720909,15 @@ ] ], "local-storage.html": [ - "59ba3a6d79cc0024be2a69a5aeb7237858fe612c", + "73f760cfb089e5fa03a1aae42f654d5ef11d51ff", [ - null, + "speculation-rules/prerender/local-storage.html?target_hint=_blank", + { + "timeout": "long" + } + ], + [ + "speculation-rules/prerender/local-storage.html?target_hint=_self", { "timeout": "long" } @@ -719235,7 +720996,7 @@ ] ], "prerender-while-prerender.html": [ - "e04fafbfa8d78f8a855bfcd9c5d3c5e93b3a1881", + "8aa80baf5253f749ce1307b8ca013d753a84e96c", [ null, { @@ -721286,7 +723047,7 @@ ] ], "requestStorageAccess-cross-site-sibling-iframes.sub.https.window.js": [ - "06ee80e5a08951c7300dcb446d3e6bcf39a35583", + "528b1616368a16b9629f441ee7d9de7cfe54a392", [ "storage-access-api/requestStorageAccess-cross-site-sibling-iframes.sub.https.window.html", { @@ -744007,21 +745768,10 @@ ] ], "audiocontext-state-change-after-close.http.window.js": [ - "c2e845365079b775ebfbd6b294b265724f7c9e22", + "eccb0d172d02c9bafc07a358d80a0ac9aacff174", [ "webaudio/the-audio-api/the-audiocontext-interface/audiocontext-state-change-after-close.http.window.html", - { - "script_metadata": [ - [ - "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ] - ] - } + {} ] ], "audiocontext-suspend-resume-close.html": [ @@ -744187,21 +745937,10 @@ ] ], "audioparam-default-value.window.js": [ - "359df111846403c1ba9038792dabd6e8989f9d96", + "ae55f217f4cabf3192fe13b156c5af745d61f380", [ "webaudio/the-audio-api/the-audioparam-interface/audioparam-default-value.window.html", - { - "script_metadata": [ - [ - "script", - "/resources/testharness.js" - ], - [ - "script", - "/resources/testharnessreport.js" - ] - ] - } + {} ] ], "audioparam-exceptional-values.html": [ @@ -745602,6 +747341,16 @@ } ] ], + "createcredential-cross-origin-iframe.https.sub.html": [ + "ecf99f68a2b4688391ebaf4bd4be1aa79ba342df", + [ + null, + { + "testdriver": true, + "timeout": "long" + } + ] + ], "createcredential-excludecredentials.https.html": [ "2b1eec19b7b3a806150d13c77d8cfd1ea01973a6", [ @@ -750553,6 +752302,24 @@ } ] ], + "global-mutable-prototype.any.js": [ + "eba96e9adf4647e1beb89358f6f15a03610ebfb6", + [ + "webidl/ecmascript-binding/global-mutable-prototype.any.shadowrealm.html", + { + "script_metadata": [ + [ + "global", + "shadowrealm" + ], + [ + "title", + "Mutability of the global prototype chain" + ] + ] + } + ] + ], "global-object-implicit-this-value-cross-realm.html": [ "b9939b801cbd803dbb456425fba948d74e816ad7", [ @@ -752849,6 +754616,57 @@ } ] ], + "gather.https.any.js": [ + "52bcece8043ebf1ca7a4f227ad3a4243f49ff502", + [ + "webnn/gather.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API gather operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/gather.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API gather operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "gemm.https.any.js": [ "e5de9521fba767d5269b0829af3e55248e16f6fc", [ @@ -753462,6 +755280,57 @@ } ] ], + "gather.https.any.js": [ + "7c8a685c5cb3fa9b5a6a2ea267e19e5d4df1b31d", + [ + "webnn/gpu/gather.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API gather operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/gpu/gather.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API gather operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "gemm.https.any.js": [ "a19dc39bbc87e845eadbf74ea369780bd38e90dc", [ @@ -753615,6 +755484,57 @@ } ] ], + "layer_normalization.https.any.js": [ + "1deb43bee5dc326627d0141f3dd814543a677432", + [ + "webnn/gpu/layer_normalization.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API layerNormalization operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/gpu/layer_normalization.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API layerNormalization operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "../resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "leaky_relu.https.any.js": [ "f3a7bd8ba536003f55715f1a0c6d5311fd62a6a4", [ @@ -754380,57 +756300,6 @@ } ] ], - "squeeze.https.any.js": [ - "29ce3e4f91beac10dea19170b68fb91863a3ca7e", - [ - "webnn/gpu/squeeze.https.any.html", - { - "script_metadata": [ - [ - "title", - "test WebNN API squeeze operation" - ], - [ - "global", - "window,dedicatedworker" - ], - [ - "script", - "../resources/utils.js" - ], - [ - "timeout", - "long" - ] - ], - "timeout": "long" - } - ], - [ - "webnn/gpu/squeeze.https.any.worker.html", - { - "script_metadata": [ - [ - "title", - "test WebNN API squeeze operation" - ], - [ - "global", - "window,dedicatedworker" - ], - [ - "script", - "../resources/utils.js" - ], - [ - "timeout", - "long" - ] - ], - "timeout": "long" - } - ] - ], "tanh.https.any.js": [ "15a9eeb013c0559102292266c279685369ff1afe", [ @@ -754746,6 +756615,57 @@ } ] ], + "layer_normalization.https.any.js": [ + "380db4ea528f1b9fd13a43b8fe00b788a109c955", + [ + "webnn/layer_normalization.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API layerNormalization operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/layer_normalization.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API layerNormalization operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "leaky_relu.https.any.js": [ "61539ce92ea8611f0c929e390fb8d06a9259c7c4", [ @@ -755511,57 +757431,6 @@ } ] ], - "squeeze.https.any.js": [ - "8b9310d65d4abed071bc081e9efc5f758740fc10", - [ - "webnn/squeeze.https.any.html", - { - "script_metadata": [ - [ - "title", - "test WebNN API squeeze operation" - ], - [ - "global", - "window,dedicatedworker" - ], - [ - "script", - "./resources/utils.js" - ], - [ - "timeout", - "long" - ] - ], - "timeout": "long" - } - ], - [ - "webnn/squeeze.https.any.worker.html", - { - "script_metadata": [ - [ - "title", - "test WebNN API squeeze operation" - ], - [ - "global", - "window,dedicatedworker" - ], - [ - "script", - "./resources/utils.js" - ], - [ - "timeout", - "long" - ] - ], - "timeout": "long" - } - ] - ], "tanh.https.any.js": [ "d0d45e754b271d9bed389f3e2958ad1c15e3bf78", [ @@ -756508,6 +758377,15 @@ } ] ], + "RTCRtpSender-setParameters-keyFrame.html": [ + "c78dfa141c137c4672e4ca6bed6082f4f4914fed", + [ + null, + { + "timeout": "long" + } + ] + ], "RTCRtpSender-setParameters.html": [ "7c8740dd1dd42c6546d315eb496e9562470f6d48", [ @@ -756818,6 +758696,15 @@ } ] ], + "munge-dont.html": [ + "b5f0a4cb63ba728d76cdae6c6deeb724dc09f5ce", + [ + null, + { + "timeout": "long" + } + ] + ], "onaddstream.https.html": [ "b5e8a402b88aa29e0ffc0f3046ee46b88d4b6fed", [ @@ -757030,7 +758917,7 @@ ] ], "sdes-dont-dont-dont.html": [ - "e938c84c8bfe39683b689ac42e2a3f9d53244073", + "dcf7ad1b5467a17226cdb3144b00c0689cf8149b", [ null, { @@ -757231,114 +759118,6 @@ ] }, "webrtc-encoded-transform": { - "RTCEncodedAudioFrame-clone.https.html": [ - "83cf642d77f486cca425160fbc5a0b91517a0197", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCEncodedAudioFrame-receive-cloned.https.html": [ - "66ce0bbcefb80a6f143861179f55b5e121f0194d", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCEncodedAudioFrame-send-incoming.https.html": [ - "1e2bbc95bd1d45131b98e7378ad0f9ad90b5bbdb", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCEncodedAudioFrame-serviceworker-failure.https.html": [ - "d6d8578dbdf5385f4f1ba85f68f610ce3727cd38", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCEncodedVideoFrame-clone.https.html": [ - "0c51df25bbb3952772280ad5b9f46d96096c3079", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCEncodedVideoFrame-serviceworker-failure.https.html": [ - "b95c673f41eaa0fe91b5ea54063bef58550ab520", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCPeerConnection-insertable-streams-audio.https.html": [ - "23af1c2b63616449875dd98a9e32cf67d43528d6", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCPeerConnection-insertable-streams-errors.https.html": [ - "d36df8227bf4ed76e23c26ed8f21e478b5f90fe5", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCPeerConnection-insertable-streams-simulcast.https.html": [ - "cb33e458d18cdf65b3dd0e68a1da080efb8aa394", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCPeerConnection-insertable-streams-video-frames.https.html": [ - "d7fb0888468765f03e52dbf128e7c3766b636142", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCPeerConnection-insertable-streams-video.https.html": [ - "aa0ff474e9737e6562ed597c7d75afb3e0cf8004", - [ - null, - { - "testdriver": true - } - ] - ], - "RTCPeerConnection-insertable-streams-worker.https.html": [ - "cb31057cac9f52b70122838a41456eb1484bfa5a", - [ - null, - { - "testdriver": true - } - ] - ], "idlharness.https.window.js": [ "2c6ef19ca82a56c799b97b5eb9af3edb900a40b5", [ @@ -757493,7 +759272,117 @@ null, {} ] - ] + ], + "tentative": { + "RTCEncodedAudioFrame-clone.https.html": [ + "9f07713d4439c676fd7a5cc2f7d32af92a350e19", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCEncodedAudioFrame-receive-cloned.https.html": [ + "3077632a3b4408b2874b3345abfee511e4832710", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCEncodedAudioFrame-send-incoming.https.html": [ + "02f3b17e0c271b7e5c6f1b25d5bbb12b6156c4f4", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCEncodedAudioFrame-serviceworker-failure.https.html": [ + "b2f5f5e94c8ee19ef754213897a133d1fe06422e", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCEncodedVideoFrame-clone.https.html": [ + "324c44f1934522f4dc21aef2cc56ddcca528373d", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCEncodedVideoFrame-serviceworker-failure.https.html": [ + "e725e5ce12cec388270e9a10f760af77db7d402e", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCPeerConnection-insertable-streams-audio.https.html": [ + "83d284146a0c438200c5fc168f9f0a800ba971bb", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCPeerConnection-insertable-streams-errors.https.html": [ + "a0c68c400a291ffd5852a8ae1ee9dd58368a22c7", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCPeerConnection-insertable-streams-simulcast.https.html": [ + "834644674e811cdd3e211ae9b658142036e009c4", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCPeerConnection-insertable-streams-video-frames.https.html": [ + "d3db116ff603ffa59bcb0a2599cb446d321311f6", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCPeerConnection-insertable-streams-video.https.html": [ + "5334b8d1f94a5e66caf39867c6f56283c9288070", + [ + null, + { + "testdriver": true + } + ] + ], + "RTCPeerConnection-insertable-streams-worker.https.html": [ + "94943f8b6960e474b28c27afc5c9e779c67ef08e", + [ + null, + { + "testdriver": true + } + ] + ] + } }, "webrtc-extensions": { "RTCOAuthCredential.html": [ @@ -802640,6 +804529,26 @@ ] ] }, + "external": { + "permissions": { + "set_permission": { + "invalid.py": [ + "0ef8c57f4154e524ea95bea08454d914e0153f62", + [ + null, + {} + ] + ], + "set_permission.py": [ + "dc6ca14a8d5acab372581ace2290c298f02d7624", + [ + null, + {} + ] + ] + } + } + }, "input": { "perform_actions": { "invalid.py": [ @@ -802942,6 +804851,13 @@ null, {} ] + ], + "request.py": [ + "368e46ebe508c9a463e98f3f72a665b8144de51f", + [ + null, + {} + ] ] }, "fetch_error": { @@ -803495,8 +805411,78 @@ }, "storage": { "set_cookie": { - "set_cookie.py": [ - "7e4f3dbb9b0826d312b57b235432d8e99701b17d", + "cookie_domain.py": [ + "ef09fb3f7b2221bb4fce85aacc6bc5dc30184483", + [ + null, + {} + ] + ], + "cookie_expiry.py": [ + "79f02d31060e93cc8a5887fcd83b46a8a32a0113", + [ + null, + {} + ] + ], + "cookie_http_only.py": [ + "f5e1bf9a3d18242bfc773455a4b964b1db8a53da", + [ + null, + {} + ] + ], + "cookie_name.py": [ + "f2d967534a21a19c6138c9ec8b8fb9394cd87f84", + [ + null, + {} + ] + ], + "cookie_path.py": [ + "2395b032a69e19b598e0379d6bfa8342b468656c", + [ + null, + {} + ] + ], + "cookie_same_site.py": [ + "05f4790a80e81fde20ee5f330f816413f335231e", + [ + null, + {} + ] + ], + "cookie_secure.py": [ + "6da5991c11d986e5aa6e3018b4b08186080fe171", + [ + null, + {} + ] + ], + "cookie_value.py": [ + "5ecd83545731b08753f9e58536517129562f8800", + [ + null, + {} + ] + ], + "invalid.py": [ + "9c3e5cbe1dd1e65cd4c77da7ab8d0ac57119b50e", + [ + null, + {} + ] + ], + "page_protocols.py": [ + "c021c2fc26e89532cc6acdc6b6ff96b61a3fde10", + [ + null, + {} + ] + ], + "partition.py": [ + "b7a4a052ca0b3dff8ec3521262ddd3d48d810d69", [ null, {} diff --git a/tests/wpt/meta/css/css-animations/animate-with-color-mix.html.ini b/tests/wpt/meta/css/css-animations/animate-with-color-mix.html.ini new file mode 100644 index 00000000000..4172b4ec02b --- /dev/null +++ b/tests/wpt/meta/css/css-animations/animate-with-color-mix.html.ini @@ -0,0 +1,18 @@ +[animate-with-color-mix.html] + [Animate from neutral keyframe with color-mix to legacy rgb] + expected: FAIL + + [Animate from legacy rgb to neutral keyframe with color-mix] + expected: FAIL + + [Animate from neutral keyframe with color-mix to srgb] + expected: FAIL + + [Animate from srgb to neutral keyframe with color-mix] + expected: FAIL + + [Animate from color-mix with transparency to legacy rgba] + expected: FAIL + + [Animate from legacy rgba to color-mix with transparency] + expected: FAIL diff --git a/tests/wpt/meta/css/css-animations/animation-delay-010.html.ini b/tests/wpt/meta/css/css-animations/animation-delay-010.html.ini index fc9b4b878cc..e163339dcde 100644 --- a/tests/wpt/meta/css/css-animations/animation-delay-010.html.ini +++ b/tests/wpt/meta/css/css-animations/animation-delay-010.html.ini @@ -1,2 +1,2 @@ [animation-delay-010.html] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/meta/css/css-color/parsing/color-computed-relative-color.html.ini b/tests/wpt/meta/css/css-color/parsing/color-computed-relative-color.html.ini index 6ca549e0935..718a1bf8f6b 100644 --- a/tests/wpt/meta/css/css-color/parsing/color-computed-relative-color.html.ini +++ b/tests/wpt/meta/css/css-color/parsing/color-computed-relative-color.html.ini @@ -3316,3 +3316,9 @@ [Property color value 'color(from color(xyz-d65 7 -20.5 100 / 0.8) xyz-d65 calc(x + 1) calc(y + 1) calc(z + 1) / calc(alpha + 0.01))'] expected: FAIL + + [Property color value 'color(from color(srgb 0.25 0.5 0.75) xyz-d50 x y z)'] + expected: FAIL + + [Property color value 'color(from color(srgb 0.25 0.5 0.75) xyz-d65 x y z)'] + expected: FAIL diff --git a/tests/wpt/meta/css/css-flexbox/dynamic-baseline-change.html.ini b/tests/wpt/meta/css/css-flexbox/dynamic-baseline-change.html.ini deleted file mode 100644 index ea9b964da9e..00000000000 --- a/tests/wpt/meta/css/css-flexbox/dynamic-baseline-change.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[dynamic-baseline-change.html] - expected: FAIL diff --git a/tests/wpt/meta/css/css-fonts/variations/at-font-face-font-matching.html.ini b/tests/wpt/meta/css/css-fonts/variations/at-font-face-font-matching.html.ini index ec6ff4fc03e..b5b1ba2bd8c 100644 --- a/tests/wpt/meta/css/css-fonts/variations/at-font-face-font-matching.html.ini +++ b/tests/wpt/meta/css/css-fonts/variations/at-font-face-font-matching.html.ini @@ -74,9 +74,6 @@ [Matching font-weight: '430' should prefer '500' over '400 425'] expected: FAIL - [Matching font-style: 'normal' should prefer 'oblique 10deg 40deg' over 'oblique 20deg 30deg'] - expected: FAIL - [Matching font-style: 'oblique 20deg' should prefer 'oblique 0deg' over 'oblique -50deg -20deg'] expected: FAIL @@ -149,18 +146,12 @@ [Matching font-style: 'italic' should prefer 'oblique 0deg' over 'oblique -60deg -30deg'] expected: FAIL - [Matching font-style: 'oblique 10deg' should prefer 'italic' over 'oblique 0deg'] - expected: FAIL - [Matching font-style: 'oblique 0deg' should prefer 'oblique 40deg 50deg' over 'italic'] expected: FAIL [Matching font-style: 'oblique -20deg' should prefer 'oblique -60deg -40deg' over 'oblique -10deg'] expected: FAIL - [Matching font-style: 'oblique -21deg' should prefer 'oblique -10deg' over 'italic'] - expected: FAIL - [Matching font-weight: '501' should prefer '450 460' over '390 410'] expected: FAIL @@ -206,9 +197,6 @@ [Matching font-style: 'oblique -21deg' should prefer 'italic' over 'oblique 0deg'] expected: FAIL - [Matching font-stretch: '100%' should prefer '110% 120%' over '115% 116%'] - expected: FAIL - [Matching font-style: 'oblique 21deg' should prefer 'oblique 10deg' over 'italic'] expected: FAIL @@ -242,9 +230,6 @@ [Matching font-stretch: '110%' should prefer '115% 116%' over '105%'] expected: FAIL - [Matching font-style: 'italic' should prefer 'italic' over 'oblique 20deg'] - expected: FAIL - [Matching font-style: 'italic' should prefer 'oblique 20deg' over 'oblique 30deg 60deg'] expected: FAIL @@ -272,9 +257,6 @@ [Matching font-style: 'oblique -20deg' should prefer 'oblique -10deg' over 'italic'] expected: FAIL - [Matching font-weight: '430' should prefer '420 440' over '450 460'] - expected: FAIL - [Matching font-weight: '430' should prefer '350 399' over '340 398'] expected: FAIL @@ -295,3 +277,33 @@ [Matching font-style: 'oblique -20deg' should prefer 'oblique 0deg' over 'oblique 30deg 60deg'] expected: FAIL + + [Matching font-weight: '400' should prefer '351 398' over '501 550'] + expected: FAIL + + [Matching font-weight: '500' should prefer '500' over '450 460'] + expected: FAIL + + [Matching font-weight: '500' should prefer '400' over '350 399'] + expected: FAIL + + [Matching font-stretch: '100%' should prefer '100%' over '110% 120%'] + expected: FAIL + + [Matching font-stretch: '110%' should prefer '105%' over '100%'] + expected: FAIL + + [Matching font-style: 'normal' should prefer 'oblique 20deg 30deg' over 'oblique -50deg -20deg'] + expected: FAIL + + [Matching font-style: 'italic' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'] + expected: FAIL + + [Matching font-style: 'oblique 10deg' should prefer 'oblique 10deg' over 'oblique 5deg'] + expected: FAIL + + [Matching font-style: 'oblique -10deg' should prefer 'oblique -50deg -40deg' over 'italic'] + expected: FAIL + + [Matching font-style: 'oblique -20deg' should prefer 'oblique -20deg' over 'oblique -60deg -40deg'] + expected: FAIL diff --git a/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-end-001.html.ini b/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-end-001.html.ini new file mode 100644 index 00000000000..d33e4ce74ca --- /dev/null +++ b/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-end-001.html.ini @@ -0,0 +1,11 @@ +[text-spacing-trim-end-001.html?class=chws,vrl] + expected: FAIL + +[text-spacing-trim-end-001.html?class=chws,htb] + expected: FAIL + +[text-spacing-trim-end-001.html?class=halt,htb] + expected: FAIL + +[text-spacing-trim-end-001.html?class=halt,vrl] + expected: FAIL diff --git a/tests/wpt/meta/css/css-text/text-transform/math/text-transform-math-auto-003.html.ini b/tests/wpt/meta/css/css-text/text-transform/math/text-transform-math-auto-003.html.ini new file mode 100644 index 00000000000..f63461815af --- /dev/null +++ b/tests/wpt/meta/css/css-text/text-transform/math/text-transform-math-auto-003.html.ini @@ -0,0 +1,336 @@ +[text-transform-math-auto-003.html] + [Selection.toString() for math-auto 'A' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'B' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'C' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'D' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'E' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'F' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'G' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'H' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'I' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'J' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'K' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'L' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'M' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'N' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'O' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'P' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Q' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'R' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'S' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'T' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'U' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'V' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'W' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'X' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Y' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Z' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'a' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'b' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'c' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'd' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'e' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'f' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'g' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'h' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'i' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'j' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'k' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'l' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'm' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'n' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'o' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'p' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'q' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'r' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 's' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 't' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'u' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'v' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'w' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'x' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'y' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'z' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ı' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ȷ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Α' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Β' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Γ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Δ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ε' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ζ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Η' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Θ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ι' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Κ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Λ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Μ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ν' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ξ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ο' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Π' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ρ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Σ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Τ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Υ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Φ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Χ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ψ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'Ω' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'α' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'β' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'γ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'δ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ε' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ζ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'η' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'θ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ι' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'κ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'λ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'μ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ν' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ξ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ο' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'π' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ρ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ς' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'σ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'τ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'υ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'φ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'χ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ψ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ω' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϑ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϕ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϖ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϰ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϱ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϴ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto 'ϵ' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto '∂' returns the transformed character.] + expected: FAIL + + [Selection.toString() for math-auto '∇' returns the transformed character.] + expected: FAIL diff --git a/tests/wpt/meta/css/css-text/text-transform/text-transform-upperlower-107.html.ini b/tests/wpt/meta/css/css-text/text-transform/text-transform-upperlower-107.html.ini new file mode 100644 index 00000000000..afffdbf6c3b --- /dev/null +++ b/tests/wpt/meta/css/css-text/text-transform/text-transform-upperlower-107.html.ini @@ -0,0 +1,3 @@ +[text-transform-upperlower-107.html] + [Selection.toString() for 'ß' with text-transform: uppercase] + expected: FAIL diff --git a/tests/wpt/meta/css/css-transitions/animations/animate-with-color-mix.html.ini b/tests/wpt/meta/css/css-transitions/animations/animate-with-color-mix.html.ini new file mode 100644 index 00000000000..b195b0e5f61 --- /dev/null +++ b/tests/wpt/meta/css/css-transitions/animations/animate-with-color-mix.html.ini @@ -0,0 +1,18 @@ +[animate-with-color-mix.html] + [Transition from color-mix to legacy rgb] + expected: FAIL + + [Transition from legacy rgb to color-mix] + expected: FAIL + + [Transition from color-mix to srgb] + expected: FAIL + + [Transition from srgb to color-mix] + expected: FAIL + + [Transition from color-mix with transparency to legacy rgba] + expected: FAIL + + [Transition from legacy rgba to color-mix with transparency] + expected: FAIL diff --git a/tests/wpt/meta/css/css-values/progress-computed.tentative.html.ini b/tests/wpt/meta/css/css-values/progress-computed.tentative.html.ini index a08341d7a0f..47102f89bf6 100644 --- a/tests/wpt/meta/css/css-values/progress-computed.tentative.html.ini +++ b/tests/wpt/meta/css/css-values/progress-computed.tentative.html.ini @@ -55,3 +55,12 @@ [calc(progress(sign(1001em - 10lh * progress(100px from 2rex to 10ex)) * 20em from 2rem to 12em) * 2) should be used-value-equivalent to 4] expected: FAIL + + [calc(progress(abs(5%) from hypot(3%, 4%) to 10%)) should be used-value-equivalent to 0] + expected: FAIL + + [progress(1000em from 10em to 110em) should be used-value-equivalent to 9.9] + expected: FAIL + + [scale(progress(1000em from 10rem to 110em)) should be used-value-equivalent to scale(9.9)] + expected: FAIL diff --git a/tests/wpt/meta/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/meta/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index 314dca9c1f5..d52a3e77a70 100644 --- a/tests/wpt/meta/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/meta/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -1,3 +1,6 @@ [MediaQueryList-addListener-removeListener.html] [listeners are called when <iframe> is resized] expected: FAIL + + [listeners are called correct number of times] + expected: FAIL diff --git a/tests/wpt/meta/css/selectors/has-display-none-checked.html.ini b/tests/wpt/meta/css/selectors/has-display-none-checked.html.ini new file mode 100644 index 00000000000..17279e47d6c --- /dev/null +++ b/tests/wpt/meta/css/selectors/has-display-none-checked.html.ini @@ -0,0 +1,2 @@ +[has-display-none-checked.html] + expected: TIMEOUT diff --git a/tests/wpt/meta/css/selectors/invalidation/has-append-first-node.html.ini b/tests/wpt/meta/css/selectors/invalidation/has-append-first-node.html.ini new file mode 100644 index 00000000000..ae43158a3da --- /dev/null +++ b/tests/wpt/meta/css/selectors/invalidation/has-append-first-node.html.ini @@ -0,0 +1,2 @@ +[has-append-first-node.html] + expected: FAIL diff --git a/tests/wpt/meta/css/selectors/invalidation/has-sibling-insertion-removal.html.ini b/tests/wpt/meta/css/selectors/invalidation/has-sibling-insertion-removal.html.ini index 78fdcc66a68..3fc80bbf3b9 100644 --- a/tests/wpt/meta/css/selectors/invalidation/has-sibling-insertion-removal.html.ini +++ b/tests/wpt/meta/css/selectors/invalidation/has-sibling-insertion-removal.html.ini @@ -37,3 +37,6 @@ [subject13: color after #sibling12_1 removed should be rgb(0, 128, 0)] expected: FAIL + + [subject14: initial color should be rgb(0, 128, 0)] + expected: FAIL diff --git a/tests/wpt/meta/dom/events/scrolling/scrollend-fires-to-text-input.html.ini b/tests/wpt/meta/dom/events/scrolling/scrollend-fires-to-text-input.html.ini new file mode 100644 index 00000000000..29dfee6fbdb --- /dev/null +++ b/tests/wpt/meta/dom/events/scrolling/scrollend-fires-to-text-input.html.ini @@ -0,0 +1,4 @@ +[scrollend-fires-to-text-input.html] + expected: TIMEOUT + [scrolled input field should receive scrollend.] + expected: TIMEOUT diff --git a/tests/wpt/meta/dom/observable/tentative/observable-toArray.any.js.ini b/tests/wpt/meta/dom/observable/tentative/observable-toArray.any.js.ini new file mode 100644 index 00000000000..bcc49663221 --- /dev/null +++ b/tests/wpt/meta/dom/observable/tentative/observable-toArray.any.js.ini @@ -0,0 +1,38 @@ +[observable-toArray.any.worker.html] + [toArray(): basic next/complete] + expected: FAIL + + [toArray(): first error() rejects promise; subsequent error()s report the exceptions] + expected: FAIL + + [toArray(): complete() resolves promise; subsequent error()s report the exceptions] + expected: FAIL + + [toArray(): Subscribing with an aborted signal returns an immediately rejected promise] + expected: FAIL + + [toArray(): Aborting the passed-in signal rejects the returned promise] + expected: FAIL + + [Operator Promise abort ordering] + expected: FAIL + + +[observable-toArray.any.html] + [toArray(): basic next/complete] + expected: FAIL + + [toArray(): first error() rejects promise; subsequent error()s report the exceptions] + expected: FAIL + + [toArray(): complete() resolves promise; subsequent error()s report the exceptions] + expected: FAIL + + [toArray(): Subscribing with an aborted signal returns an immediately rejected promise] + expected: FAIL + + [toArray(): Aborting the passed-in signal rejects the returned promise] + expected: FAIL + + [Operator Promise abort ordering] + expected: FAIL diff --git a/tests/wpt/meta/fetch/api/basic/keepalive.any.js.ini b/tests/wpt/meta/fetch/api/basic/keepalive.any.js.ini index 4c1c78640bb..9aa4b06752c 100644 --- a/tests/wpt/meta/fetch/api/basic/keepalive.any.js.ini +++ b/tests/wpt/meta/fetch/api/basic/keepalive.any.js.ini @@ -2,3 +2,18 @@ expected: TIMEOUT [keepalive in onunload in nested frame in another window] expected: FAIL + + [[keepalive\] simple GET request on 'pagehide' [no payload\]; setting up] + expected: TIMEOUT + + [[keepalive\] simple GET request on 'unload' [no payload\]; setting up] + expected: NOTRUN + + [[keepalive\] simple POST request on 'load' [no payload\]; setting up] + expected: NOTRUN + + [[keepalive\] simple POST request on 'pagehide' [no payload\]; setting up] + expected: NOTRUN + + [[keepalive\] simple POST request on 'unload' [no payload\]; setting up] + expected: NOTRUN diff --git a/tests/wpt/meta/fetch/api/cors/cors-keepalive.any.js.ini b/tests/wpt/meta/fetch/api/cors/cors-keepalive.any.js.ini index 6801d7d88bd..9f657f6abc0 100644 --- a/tests/wpt/meta/fetch/api/cors/cors-keepalive.any.js.ini +++ b/tests/wpt/meta/fetch/api/cors/cors-keepalive.any.js.ini @@ -1,2 +1,121 @@ [cors-keepalive.any.html] expected: TIMEOUT + [[keepalive\] Same domain different port GET request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: TIMEOUT + + [[keepalive\] Same domain different port GET request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port GET request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port GET request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port GET request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port GET request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port GET request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port GET request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage GET request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage GET request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage GET request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage GET request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port GET request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port GET request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port GET request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port GET request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol GET request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol GET request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol GET request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol GET request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port POST request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port POST request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port POST request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different port POST request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port POST request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port POST request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port POST request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Same domain different protocol different port POST request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage POST request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage POST request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage POST request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain basic usage POST request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port POST request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port POST request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port POST request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different port POST request in unload [cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol POST request in unload [no-cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol POST request in unload [no-cors mode\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol POST request in unload [cors mode, server forbid CORS\]; setting up] + expected: NOTRUN + + [[keepalive\] Cross domain different protocol POST request in unload [cors mode\]; setting up] + expected: NOTRUN diff --git a/tests/wpt/meta/fetch/private-network-access/location.tentative.https.window.js.ini b/tests/wpt/meta/fetch/private-network-access/location.tentative.https.window.js.ini deleted file mode 100644 index bcbf60fdf3d..00000000000 --- a/tests/wpt/meta/fetch/private-network-access/location.tentative.https.window.js.ini +++ /dev/null @@ -1,36 +0,0 @@ -[location.tentative.https.window.html?include=from-private] - [private to local: failed preflight.] - expected: FAIL - - [private to local: success.] - expected: FAIL - - -[location.tentative.https.window.html?include=from-local] - -[location.tentative.https.window.html?include=from-public] - [public to local: failed preflight.] - expected: FAIL - - [public to local: success.] - expected: FAIL - - [public to private: failed preflight.] - expected: FAIL - - [public to private: success.] - expected: FAIL - - -[location.tentative.https.window.html?include=from-treat-as-public] - [treat-as-public-address to local: failed preflight.] - expected: FAIL - - [treat-as-public-address to local: success.] - expected: FAIL - - [treat-as-public-address to private: failed preflight.] - expected: FAIL - - [treat-as-public-address to private: success.] - expected: FAIL diff --git a/tests/wpt/meta/fetch/private-network-access/location.tentative.window.js.ini b/tests/wpt/meta/fetch/private-network-access/location.tentative.window.js.ini deleted file mode 100644 index db5e79a6043..00000000000 --- a/tests/wpt/meta/fetch/private-network-access/location.tentative.window.js.ini +++ /dev/null @@ -1,15 +0,0 @@ -[location.tentative.window.html] - [private to local: failure.] - expected: FAIL - - [public to local: failure.] - expected: FAIL - - [public to private: failure.] - expected: FAIL - - [treat-as-public-address to local: failure.] - expected: FAIL - - [treat-as-public-address to private: failure.] - expected: FAIL diff --git a/tests/wpt/meta/fetch/private-network-access/top-location.tentative.https.window.js.ini b/tests/wpt/meta/fetch/private-network-access/top-location.tentative.https.window.js.ini deleted file mode 100644 index f14d2bd8475..00000000000 --- a/tests/wpt/meta/fetch/private-network-access/top-location.tentative.https.window.js.ini +++ /dev/null @@ -1,36 +0,0 @@ -[top-location.tentative.https.window.html?include=from-treat-as-public] - [treat-as-public-address to local: failed preflight.] - expected: FAIL - - [treat-as-public-address to local: success.] - expected: FAIL - - [treat-as-public-address to private: failed preflight.] - expected: FAIL - - [treat-as-public-address to private: success.] - expected: FAIL - - -[top-location.tentative.https.window.html?include=from-local] - -[top-location.tentative.https.window.html?include=from-public] - [public to local: failed preflight.] - expected: FAIL - - [public to local: success.] - expected: FAIL - - [public to private: failed preflight.] - expected: FAIL - - [public to private: success.] - expected: FAIL - - -[top-location.tentative.https.window.html?include=from-private] - [private to local: failed preflight.] - expected: FAIL - - [private to local: success.] - expected: FAIL diff --git a/tests/wpt/meta/fetch/private-network-access/top-location.tentative.window.js.ini b/tests/wpt/meta/fetch/private-network-access/top-location.tentative.window.js.ini deleted file mode 100644 index 0abfc3f7b03..00000000000 --- a/tests/wpt/meta/fetch/private-network-access/top-location.tentative.window.js.ini +++ /dev/null @@ -1,15 +0,0 @@ -[top-location.tentative.window.html] - [private to local: failure.] - expected: FAIL - - [public to local: failure.] - expected: FAIL - - [public to private: failure.] - expected: FAIL - - [treat-as-public-address to local: failure.] - expected: FAIL - - [treat-as-public-address to private: failure.] - expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/history-traversal/srcdoc/consecutive-srcdoc.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/history-traversal/srcdoc/consecutive-srcdoc.html.ini index f2dee7b3ea9..eaebad750fe 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/history-traversal/srcdoc/consecutive-srcdoc.html.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/history-traversal/srcdoc/consecutive-srcdoc.html.ini @@ -1,6 +1,7 @@ [consecutive-srcdoc.html] + expected: TIMEOUT [changing srcdoc does a replace navigation since the URL is still about:srcdoc] expected: FAIL [changing srcdoc to about:srcdoc#yo then another srcdoc does two push navigations and we can navigate back] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/about-srcdoc-navigation-blocked.window.js.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/about-srcdoc-navigation-blocked.window.js.ini index ea9cbb0b4de..4f8ca6048f2 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/about-srcdoc-navigation-blocked.window.js.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/about-srcdoc-navigation-blocked.window.js.ini @@ -1,5 +1,4 @@ [about-srcdoc-navigation-blocked.window.html] - expected: TIMEOUT [Navigations to about:srcdoc via window.location must be blocked] expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini index 149bcb4ff8c..51fd557bd7f 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini @@ -7,6 +7,3 @@ [load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank#foo'] expected: FAIL - - [load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank'] - expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini index 24d2f8ac554..27889a98fb5 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini @@ -1,3 +1,6 @@ [navigate-to-unparseable-url.html] [location.href setter throws a SyntaxError DOMException for unparseable URLs] expected: FAIL + + [<a> tag navigate fails for unparseable URLs] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini index 4ecd6d9f753..4ecd6d9f753 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini diff --git a/tests/wpt/meta/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/meta/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini index d6188c03424..7a5fcb79165 100644 --- a/tests/wpt/meta/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini +++ b/tests/wpt/meta/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini @@ -1,3 +1,3 @@ -[traverse_the_history_4.html] +[traverse_the_history_5.html] [Multiple history traversals, last would be aborted] expected: FAIL diff --git a/tests/wpt/meta/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini b/tests/wpt/meta/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini deleted file mode 100644 index 4b4820d1729..00000000000 --- a/tests/wpt/meta/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[creating_browsing_context_test_01.html] - [first argument: absolute url] - expected: FAIL diff --git a/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.html.ini b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.html.ini new file mode 100644 index 00000000000..8b161ec63e7 --- /dev/null +++ b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.arc.html] + expected: FAIL diff --git a/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html.ini b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html.ini new file mode 100644 index 00000000000..bd5646ca17c --- /dev/null +++ b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.arc.w.html] + expected: TIMEOUT diff --git a/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html.ini b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html.ini new file mode 100644 index 00000000000..c64dd8daf6f --- /dev/null +++ b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.bezierCurve.html] + expected: FAIL diff --git a/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html.ini b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html.ini new file mode 100644 index 00000000000..b16f7642c5b --- /dev/null +++ b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.bezierCurve.w.html] + expected: TIMEOUT diff --git a/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.html.ini b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.html.ini new file mode 100644 index 00000000000..88b996cd49f --- /dev/null +++ b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.line.html] + expected: FAIL diff --git a/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html.ini b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html.ini new file mode 100644 index 00000000000..a1f8bf3ca80 --- /dev/null +++ b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.line.w.html] + expected: TIMEOUT diff --git a/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html.ini b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html.ini new file mode 100644 index 00000000000..27e16f3b0b3 --- /dev/null +++ b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.quadraticCurve.html] + expected: FAIL diff --git a/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html.ini b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html.ini new file mode 100644 index 00000000000..7ccc225dfa5 --- /dev/null +++ b/tests/wpt/meta/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html.ini @@ -0,0 +1,2 @@ +[2d.path.stroke.prune.closePath.quadraticCurve.w.html] + expected: TIMEOUT diff --git a/tests/wpt/meta/html/dom/aria-element-reflection.html.ini b/tests/wpt/meta/html/dom/aria-element-reflection.html.ini index 73f2decc09a..97904ee9a5b 100644 --- a/tests/wpt/meta/html/dom/aria-element-reflection.html.ini +++ b/tests/wpt/meta/html/dom/aria-element-reflection.html.ini @@ -61,3 +61,6 @@ [Cross-document references and moves.] expected: FAIL + + [Passing values of the wrong type should throw a TypeError] + expected: FAIL diff --git a/tests/wpt/meta/html/dom/idlharness.https.html.ini b/tests/wpt/meta/html/dom/idlharness.https.html.ini index 3c7048902d9..bb0a910c04e 100644 --- a/tests/wpt/meta/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta/html/dom/idlharness.https.html.ini @@ -1928,6 +1928,9 @@ [SVGSVGElement interface: attribute onpagereveal] expected: FAIL + [MessagePort interface: attribute onclose] + expected: FAIL + [idlharness.https.html?include=(Document|Window)] [Document interface: documentWithHandlers must inherit property "queryCommandEnabled(DOMString)" with the proper type] diff --git a/tests/wpt/meta/html/dom/idlharness.worker.js.ini b/tests/wpt/meta/html/dom/idlharness.worker.js.ini index 6436e807907..23f20a6d996 100644 --- a/tests/wpt/meta/html/dom/idlharness.worker.js.ini +++ b/tests/wpt/meta/html/dom/idlharness.worker.js.ini @@ -604,3 +604,6 @@ [WorkerGlobalScope interface: self must inherit property "createImageBitmap(ImageBitmapSource, long, long, long, long, optional ImageBitmapOptions)" with the proper type] expected: FAIL + + [MessagePort interface: attribute onclose] + expected: FAIL diff --git a/tests/wpt/meta/html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.js.ini b/tests/wpt/meta/html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.js.ini index 2ef0896e3b3..8b8af2b9c2e 100644 --- a/tests/wpt/meta/html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.js.ini +++ b/tests/wpt/meta/html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.js.ini @@ -1,4 +1,3 @@ [document-base-url-window-initiator-is-not-opener.https.window.html] - expected: TIMEOUT [window.open() gets base url from initiator not opener.] expected: [FAIL, PASS, TIMEOUT] diff --git a/tests/wpt/meta/html/rendering/widgets/textarea-cols-rows.html.ini b/tests/wpt/meta/html/rendering/widgets/textarea-cols-rows.html.ini new file mode 100644 index 00000000000..721bdd39ab0 --- /dev/null +++ b/tests/wpt/meta/html/rendering/widgets/textarea-cols-rows.html.ini @@ -0,0 +1,3 @@ +[textarea-cols-rows.html] + [Cols/rows attribute values affect computed style] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini index 7d28d586f51..f455bb20528 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini @@ -1,3 +1,4 @@ [iframe_sandbox_popups_escaping-1.html] + expected: CRASH [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini index c6f1e5d7d84..4034793cc72 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,4 +1,3 @@ [iframe_sandbox_popups_nonescaping-2.html] - expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index d5fd800f09d..ff6467094b8 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,4 +1,3 @@ [iframe_sandbox_popups_nonescaping-3.html] - expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html.ini new file mode 100644 index 00000000000..b4de496f4a0 --- /dev/null +++ b/tests/wpt/meta/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html.ini @@ -0,0 +1,2 @@ +[image-loading-lazy-slow.html] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini b/tests/wpt/meta/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini index c6c406d911d..35e8c2c7cb4 100644 --- a/tests/wpt/meta/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini +++ b/tests/wpt/meta/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini @@ -179,8 +179,5 @@ [multipart/form-data: backslash in value (formdata event)] expected: FAIL - [multipart/form-data: 0x00 in name (normal form)] - expected: FAIL - [multipart/form-data: \\r\\n in value (normal form)] expected: FAIL diff --git a/tests/wpt/meta/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini b/tests/wpt/meta/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini index 44ea234c7c4..077ecbcf187 100644 --- a/tests/wpt/meta/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini +++ b/tests/wpt/meta/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini @@ -181,3 +181,6 @@ [application/x-www-form-urlencoded: backslash in value (normal form)] expected: FAIL + + [application/x-www-form-urlencoded: 0x00 in value (formdata event)] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/forms/historical.html.ini b/tests/wpt/meta/html/semantics/forms/historical.html.ini deleted file mode 100644 index 5d8289307cc..00000000000 --- a/tests/wpt/meta/html/semantics/forms/historical.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[historical.html] - [<input name=isindex> should not be supported] - expected: FAIL diff --git a/tests/wpt/meta/html/semantics/forms/the-select-element/select-parsing.tentative.html.ini b/tests/wpt/meta/html/semantics/forms/the-select-element/select-parsing.tentative.html.ini new file mode 100644 index 00000000000..b31f3485d6b --- /dev/null +++ b/tests/wpt/meta/html/semantics/forms/the-select-element/select-parsing.tentative.html.ini @@ -0,0 +1,18 @@ +[select-parsing.tentative.html] + [<button>s and <datalist>s should be allowed in <select>.] + expected: FAIL + + [Nested <button>s in <select> should be flattened out.] + expected: FAIL + + [</select> should close <button>.] + expected: FAIL + + [</select> should close <datalist>.] + expected: FAIL + + [<select> in <button> in <select> should remove inner <select>.] + expected: FAIL + + [<select> in <select><button><div> should remove inner <select>.] + expected: FAIL diff --git a/tests/wpt/meta/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html.ini b/tests/wpt/meta/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html.ini index 9f98a2af558..2287365fc3d 100644 --- a/tests/wpt/meta/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html.ini +++ b/tests/wpt/meta/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html.ini @@ -1,4 +1,3 @@ [parse-error.html] - expected: TIMEOUT [JSON modules: parse error] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/meta/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index 6206f8c0210..1053fb90051 100644 --- a/tests/wpt/meta/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/meta/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -2,3 +2,6 @@ expected: TIMEOUT [The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] expected: TIMEOUT + + [The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] + expected: FAIL diff --git a/tests/wpt/meta/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js.ini b/tests/wpt/meta/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js.ini new file mode 100644 index 00000000000..d1d7bbbe965 --- /dev/null +++ b/tests/wpt/meta/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js.ini @@ -0,0 +1,2 @@ +[abort-block-bfcache.window.html] + expected: CRASH diff --git a/tests/wpt/meta/resource-timing/test_resource_timing.https.html.ini b/tests/wpt/meta/resource-timing/test_resource_timing.https.html.ini index 5a2e10ff69c..dac51c99110 100644 --- a/tests/wpt/meta/resource-timing/test_resource_timing.https.html.ini +++ b/tests/wpt/meta/resource-timing/test_resource_timing.https.html.ini @@ -68,3 +68,6 @@ [PerformanceEntry has correct protocol attribute (xmlhttprequest)] expected: FAIL + + [PerformanceEntry has correct name, initiatorType, startTime, and duration (img)] + expected: FAIL diff --git a/tests/wpt/meta/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html.ini b/tests/wpt/meta/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html.ini new file mode 100644 index 00000000000..350b1091baa --- /dev/null +++ b/tests/wpt/meta/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html.ini @@ -0,0 +1,2 @@ +[selectall-and-find-svg-text-on-selectstart.html] + expected: TIMEOUT diff --git a/tests/wpt/meta/webidl/ecmascript-binding/global-mutable-prototype.any.js.ini b/tests/wpt/meta/webidl/ecmascript-binding/global-mutable-prototype.any.js.ini new file mode 100644 index 00000000000..c5b8f38cc86 --- /dev/null +++ b/tests/wpt/meta/webidl/ecmascript-binding/global-mutable-prototype.any.js.ini @@ -0,0 +1,2 @@ +[global-mutable-prototype.any.shadowrealm.html] + expected: ERROR diff --git a/tests/wpt/meta/webmessaging/with-ports/017.html.ini b/tests/wpt/meta/webmessaging/with-ports/017.html.ini deleted file mode 100644 index c7946fc91b4..00000000000 --- a/tests/wpt/meta/webmessaging/with-ports/017.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[017.html] - expected: TIMEOUT - [origin of the script that invoked the method, about:blank] - expected: TIMEOUT diff --git a/tests/wpt/meta/workers/semantics/run-a-worker/003.html.ini b/tests/wpt/meta/workers/semantics/run-a-worker/003.html.ini index 365a9046674..89e55870b76 100644 --- a/tests/wpt/meta/workers/semantics/run-a-worker/003.html.ini +++ b/tests/wpt/meta/workers/semantics/run-a-worker/003.html.ini @@ -1,4 +1,3 @@ [003.html] - expected: ERROR [shared] expected: FAIL diff --git a/tests/wpt/tests/accessibility/crashtests/aria-owns-overlapping.html b/tests/wpt/tests/accessibility/crashtests/aria-owns-overlapping.html new file mode 100644 index 00000000000..e98ad6fb76e --- /dev/null +++ b/tests/wpt/tests/accessibility/crashtests/aria-owns-overlapping.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<!-- Test that multiple overlapping aria-owns relation do not crash --> + +<html class="test-wait"> +<main id='great-grandparent'> + <fieldset id="grandparent"> + <p id='parent'> + <i id='child'></i> + </p> + </fieldset> +</main> + +<script> +document.addEventListener("DOMContentLoaded", () => { + document.getElementById('child').setAttribute('aria-owns','grandparent'); + document.getElementById('great-grandparent').setAttribute('aria-owns','parent'); + requestAnimationFrame(() => { + requestAnimationFrame(() => { + document.documentElement.style.display="none"; + document.documentElement.className = ''; + }); + }); +}); +</script> +</html> diff --git a/tests/wpt/tests/content-security-policy/reporting/report-same-origin-with-cookies.html b/tests/wpt/tests/content-security-policy/reporting/report-same-origin-with-cookies.html index aa2ec6bd9d4..1fde8d0ffd1 100644 --- a/tests/wpt/tests/content-security-policy/reporting/report-same-origin-with-cookies.html +++ b/tests/wpt/tests/content-security-policy/reporting/report-same-origin-with-cookies.html @@ -15,11 +15,15 @@ "/cookies/resources/set-cookie.py?name=cspViolationReportCookie2&path=" + encodeURIComponent("/"), {mode: 'no-cors', credentials: 'include'}) .then(() => { - test.add_cleanup(() => { - document.cookie = "cspViolationReportCookie2=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT"; - }); - - // This image will generate a CSP violation report. + // Loading `img` will generate a CSP violation report. + // As this test is for covering the behavior of the deprecated "report-uri" directive [1], the + // underlying report is backed by a browser-initiated fetch "keepalive" request [2]. Per + // keepalive spec [3], such request may outlive this entire document itself. Hence, the cookie + // this test wants to test, i.e. "cspViolationReportCookie2", must NOT be cleared before the + // browser entirely sending out the report request. + // [1]: https://www.w3.org/TR/CSP3/#report-uri + // [2]: https://www.w3.org/TR/CSP3/#report-violation + // [3]: https://fetch.spec.whatwg.org/#request-keepalive-flag const img = new Image(); img.onerror = test.step_func_done(); img.onload = test.unreached_func("Should not have loaded the image"); diff --git a/tests/wpt/tests/credential-management/fedcm-endpoint-redirects.https.html b/tests/wpt/tests/credential-management/fedcm-endpoint-redirects.https.html index 224868c906c..cff5036f393 100644 --- a/tests/wpt/tests/credential-management/fedcm-endpoint-redirects.https.html +++ b/tests/wpt/tests/credential-management/fedcm-endpoint-redirects.https.html @@ -40,7 +40,8 @@ fedcm_test(async t => { } catch (e) { assert_true(e instanceof DOMException); assert_equals(e.name, "IdentityCredentialError"); - assert_equals(e.code, "server_error"); + // 308 should not produce a valid error code + assert_equals(e.code, ""); } }, 'Test that token endpoint does not follow redirects'); </script> diff --git a/tests/wpt/tests/credential-management/fedcm-login-status/cross-origin-status.https.html b/tests/wpt/tests/credential-management/fedcm-login-status/cross-origin-status.https.html index 09a4aa31c6b..f32e18d40ed 100644 --- a/tests/wpt/tests/credential-management/fedcm-login-status/cross-origin-status.https.html +++ b/tests/wpt/tests/credential-management/fedcm-login-status/cross-origin-status.https.html @@ -9,15 +9,35 @@ <script type="module"> import {fedcm_test, alt_manifest_origin, + same_site_manifest_origin, + set_fedcm_cookie, + select_manifest, + request_options_with_mediation_required, alt_request_options_with_mediation_required, + fedcm_get_and_select_first_account, open_and_wait_for_popup, mark_signed_out} from '../support/fedcm-helper.sub.js'; -const url_prefix = alt_manifest_origin + '/credential-management/support/'; +const path = '/credential-management/support/' +const url_prefix = alt_manifest_origin + path; +const same_site_url_prefix = same_site_manifest_origin + path; + +fedcm_test(async t => { + await set_fedcm_cookie(same_site_manifest_origin); + await mark_signed_out(same_site_manifest_origin); + // The header should be processed successfully because it is same-site. + const fetch_result = await fetch(same_site_url_prefix + "mark_signedin"); + assert_true(fetch_result.ok); + + const config = request_options_with_mediation_required(undefined, same_site_manifest_origin); + await select_manifest(t, config); + const cred = await fedcm_get_and_select_first_account(t, config); + assert_equals(cred.token, "token"); +}, 'Cross-origin same-site status header should work from fetch()'); fedcm_test(async t => { await mark_signed_out(alt_manifest_origin); - // The header should be ignored because it's a cross-origin fetch. + // The header should be ignored because it's a cross-site fetch. const fetch_result = await fetch(url_prefix + "mark_signedin"); assert_true(fetch_result.ok); @@ -28,7 +48,7 @@ fedcm_test(async t => { fedcm_test(async t => { await mark_signed_out(alt_manifest_origin); - // The header should be ignored because it's a cross-origin iframe. + // The header should be ignored because it's a cross-site iframe. let iframe = document.createElement("iframe"); let iframe_load = new Promise(resolve => {iframe.onload = resolve;}); iframe.src = url_prefix + "mark_signedin"; @@ -38,11 +58,11 @@ fedcm_test(async t => { const config = alt_request_options_with_mediation_required(); const result = navigator.credentials.get(config); return promise_rejects_dom(t, 'NetworkError', result); -}, 'Status header should be ignored from cross-origin iframe'); +}, 'Status header should be ignored from cross-site iframe'); fedcm_test(async t => { await mark_signed_out(alt_manifest_origin); - // The header in the subresource should be ignored because the iframe is cross-origin. + // The header in the subresource should be ignored because the iframe is cross-site. let iframe = document.createElement("iframe"); let iframe_load = new Promise(resolve => {iframe.onload = resolve;}); iframe.src = url_prefix + "iframe-mark-signedin.html"; @@ -52,7 +72,7 @@ fedcm_test(async t => { const config = alt_request_options_with_mediation_required(); const result = navigator.credentials.get(config); return promise_rejects_dom(t, 'NetworkError', result); -}, 'Status header should be ignored from cross-origin iframe that contains a subresource with the header'); +}, 'Status header should be ignored from cross-site iframe that contains a subresource with the header'); fedcm_test(async t => { await mark_signed_out(alt_manifest_origin); diff --git a/tests/wpt/tests/credential-management/support/fedcm-helper.sub.js b/tests/wpt/tests/credential-management/support/fedcm-helper.sub.js index 38cc26604ba..765b3cc48a9 100644 --- a/tests/wpt/tests/credential-management/support/fedcm-helper.sub.js +++ b/tests/wpt/tests/credential-management/support/fedcm-helper.sub.js @@ -1,5 +1,6 @@ export const manifest_origin = "https://{{host}}:{{ports[https][0]}}"; export const alt_manifest_origin = 'https://{{hosts[alt][]}}:{{ports[https][0]}}'; +export const same_site_manifest_origin = 'https://{{hosts[][www1]}}:{{ports[https][0]}}'; export function open_and_wait_for_popup(origin, path) { return new Promise(resolve => { @@ -43,11 +44,11 @@ export function mark_signed_out(origin = manifest_origin) { // Returns FedCM CredentialRequestOptions for which navigator.credentials.get() // succeeds. -export function request_options_with_mediation_required(manifest_filename) { +export function request_options_with_mediation_required(manifest_filename, origin = manifest_origin) { if (manifest_filename === undefined) { manifest_filename = "manifest.py"; } - const manifest_path = `${manifest_origin}/\ + const manifest_path = `${origin}/\ credential-management/support/fedcm/${manifest_filename}`; return { identity: { @@ -64,21 +65,7 @@ credential-management/support/fedcm/${manifest_filename}`; // Returns alternate FedCM CredentialRequestOptions for which navigator.credentials.get() // succeeds. export function alt_request_options_with_mediation_required(manifest_filename) { - if (manifest_filename === undefined) { - manifest_filename = "manifest.py"; - } - const manifest_path = `${alt_manifest_origin}/\ -credential-management/support/fedcm/${manifest_filename}`; - return { - identity: { - providers: [{ - configURL: manifest_path, - clientId: '1', - nonce: '2' - }] - }, - mediation: 'required' - }; + return request_options_with_mediation_required(manifest_filename, alt_manifest_origin); } // Returns FedCM CredentialRequestOptions with auto re-authentication. diff --git a/tests/wpt/tests/css/css-anchor-position/inset-area-abs-inline-container.html b/tests/wpt/tests/css/css-anchor-position/inset-area-abs-inline-container.html new file mode 100644 index 00000000000..52344614f0b --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/inset-area-abs-inline-container.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<title>CSS Anchor Positioning: inset-area positioning with absolute inline container</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position/#inset-area"> +<link rel="match" href="inset-area-inline-container-ref.html"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<style> + #in-flow { + font-family: Ahem; + font-size: 100px; + color: orange; + } + #inline-container { + position: absolute; + } + #anchor { + position: absolute; + top: 25px; + left: 100px; + width: 200px; + height: 50px; + anchor-name: --anchor; + background-color: cyan; + } + .anchored { + position: absolute; + align-self: stretch; + justify-self: stretch; + anchor-default: --anchor; + background-color: blue; + } + #top-left { inset-area: top / left; } + #top-right { inset-area: top / right; } + #bottom-left { inset-area: bottom / left; } + #bottom-right { inset-area: bottom / right; } +</style> +<div id="in-flow"> + <br> + <br> + <span id="inline-container">XXXX<span id="anchor"></span><div id="top-left" class="anchored"></div><div id="top-right" class="anchored"></div><div id="bottom-left" class="anchored"></div><div id="bottom-right" class="anchored"></div></span> +</div> diff --git a/tests/wpt/tests/css/css-anchor-position/inset-area-basic.html b/tests/wpt/tests/css/css-anchor-position/inset-area-basic.html index dcb2c153308..4a636355583 100644 --- a/tests/wpt/tests/css/css-anchor-position/inset-area-basic.html +++ b/tests/wpt/tests/css/css-anchor-position/inset-area-basic.html @@ -29,6 +29,8 @@ } #anchored { position: absolute; + align-self: stretch; + justify-self: stretch; anchor-default: --anchor; } #anchor { diff --git a/tests/wpt/tests/css/css-anchor-position/inset-area-inline-container-ref.html b/tests/wpt/tests/css/css-anchor-position/inset-area-inline-container-ref.html new file mode 100644 index 00000000000..ecf54f1a9ac --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/inset-area-inline-container-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<title>CSS Test Reference</title> +<div style="position:relative"> + <!-- The Ahem 'XXXX' text: --> + <div style="position:absolute; background-color:orange; left:200px; top:200px; width:400px; height:100px"></div> + <!-- The #anchor --> + <div style="position:absolute; background-color:cyan; left:300px; top:225px; width:200px; height:50px"></div> + <!-- top / left --> + <div style="position:absolute; background-color:blue; left:200px; top:200px; width:100px; height:25px"></div> + <!-- top / right --> + <div style="position:absolute; background-color:blue; left:500px; top:200px; width:100px; height:25px"></div> + <!-- bottom / left --> + <div style="position:absolute; background-color:blue; left:200px; top:275px; width:100px; height:25px"></div> + <!-- bottom / right --> + <div style="position:absolute; background-color:blue; left:500px; top:275px; width:100px; height:25px"></div> +</div> diff --git a/tests/wpt/tests/css/css-anchor-position/inset-area-inline-container.html b/tests/wpt/tests/css/css-anchor-position/inset-area-inline-container.html new file mode 100644 index 00000000000..91c9b097351 --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/inset-area-inline-container.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<title>CSS Anchor Positioning: inset-area positioning with inline container</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position/#inset-area"> +<link rel="match" href="inset-area-inline-container-ref.html"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> +<style> + #in-flow { + font-family: Ahem; + font-size: 100px; + color: orange; + } + #inline-container { + position: relative; + } + #anchor { + position: absolute; + top: 25px; + left: 100px; + width: 200px; + height: 50px; + anchor-name: --anchor; + background-color: cyan; + } + .anchored { + position: absolute; + anchor-default: --anchor; + background-color: blue; + } + #top-left { inset-area: top / left; } + #top-right { inset-area: top / right; } + #bottom-left { inset-area: bottom / left; } + #bottom-right { inset-area: bottom / right; } +</style> +<div id="in-flow"> + <br> + <br> + <span id="inline-container">XXXX<span id="anchor"></span><div id="top-left" class="anchored"></div><div id="top-right" class="anchored"></div><div id="bottom-left" class="anchored"></div><div id="bottom-right" class="anchored"></div></span> +</div> diff --git a/tests/wpt/tests/css/css-anchor-position/inset-area-wm-dir.html b/tests/wpt/tests/css/css-anchor-position/inset-area-wm-dir.html index 3acec2b10d6..5268cba7e5e 100644 --- a/tests/wpt/tests/css/css-anchor-position/inset-area-wm-dir.html +++ b/tests/wpt/tests/css/css-anchor-position/inset-area-wm-dir.html @@ -29,6 +29,8 @@ } #anchored { position: absolute; + align-self: stretch; + justify-self: stretch; anchor-default: --anchor; } #anchor { diff --git a/tests/wpt/tests/css/css-animations/animate-with-color-mix.html b/tests/wpt/tests/css/css-animations/animate-with-color-mix.html new file mode 100644 index 00000000000..0b6d9bb4ab3 --- /dev/null +++ b/tests/wpt/tests/css/css-animations/animate-with-color-mix.html @@ -0,0 +1,162 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>CSS animaitons with color-mix</title> +</head> +<style> + @keyframes missing-from-legacy-to { + to { background-color: rgb(0, 255, 0); } + } + + @keyframes missing-to-legacy-from { + from { background-color: rgb(0, 255, 0); } + } + + @keyframes missing-from-srgb-to { + to { background-color: color(srgb 0 1 0); } + } + + @keyframes missing-to-srgb-from { + from { background-color: color(srgb 0 1 0); } + } + + @keyframes missing-from-rgba-to { + to { background-color: rgba(255, 255, 255, 0.75); } + } + + @keyframes missing-to-rgba-from { + from { background-color: rgba(255, 255, 255, 0.75); } + } + + #target { + color: black; + background-color: color-mix(in srgb, white 50%, currentColor); + animation-duration: 1s; + animation-timing-function: linear; + animation-play-state: paused; + animation-fill-mode: forwards; + height: 100px; + width: 100px; + } + .missing-from-legacy-to { + animation-name: missing-from-legacy-to; + } + + .missing-to-legacy-from { + animation-name: missing-to-legacy-from; + } + + .missing-from-srgb-to { + animation-name: missing-from-srgb-to; + } + + .missing-to-srgb-from { + animation-name: missing-to-srgb-from; + } + + .missing-from-rgba-to { + background-color: color-mix(in srgb, transparent 50%, currentColor); + animation-name: missing-from-rgba-to; + } + + .missing-to-rgba-from { + background-color: color-mix(in srgb, transparent 50%, currentColor); + animation-name: missing-to-rgba-from; + } + +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/css/support/color-testcommon.js"></script> + +<body> + <div id="target"></div> + <div id="test"></div> +</body> +<script> + 'use strict'; + + async function runAnimationTest(t, name, expected_colors) { + const target = document.getElementById('target'); + target.classList.add(name); + t.add_cleanup(() => { + target.classList.remove(name); + }); + const anim = document.getAnimations()[0]; + await anim.ready; + expected_colors.forEach(data => { + anim.currentTime = 1000 * data.at; + const actual = getComputedStyle(target).backgroundColor; + const expected = data.value; + assert_oklab_color( + actual, expected, + `Background color at ${100*data.at}% animation progress`); + }); + } + + const gray_to_green = [ + { at: 0, value: 'oklab(0.5981 0.0000 0.0000)' }, + { at: 0.25, value: 'oklab(0.6652 -0.0584 0.0449)' }, + { at: 0.5, value: 'oklab(0.7323 -0.1169 0.0898)' }, + { at: 0.75, value: 'oklab(0.7994 -0.1754 0.1346)' }, + { at: 1, value: 'oklab(0.8664 -0.2338 0.1795)' } + ]; + + const green_to_gray = [ + { at: 0, value: 'oklab(0.8664 -0.2338 0.1795)' }, + { at: 0.25, value: 'oklab(0.7994 -0.1754 0.1346)' }, + { at: 0.5, value: 'oklab(0.7323 -0.1169 0.0898)' }, + { at: 0.75, value: 'oklab(0.6652 -0.0584 0.0449)' }, + { at: 1, value: 'oklab(0.5981 0.0000 0.0000)' } + ]; + + const translucent_black_to_white = [ + { at: 0, value: 'oklab(0.5981 0 0)' }, + { at: 0.25, value: 'oklab(0.6784 0 0 / 0.9373)' }, + { at: 0.5, value: 'oklab(0.7702 0 0 / 0.8745)' }, + { at: 0.75, value: 'oklab(0.8762 0 0 / 0.8118)' }, + { at: 1, value: 'oklab(1 0 0 / 0.75)' } + ]; + + const translucent_white_to_black = [ + { at: 0, value: 'oklab(1 0 0 / 0.75)' }, + { at: 0.25, value: 'oklab(0.8762 0 0 / 0.8118)' }, + { at: 0.5, value: 'oklab(0.7702 0 0 / 0.8745)' }, + { at: 0.75, value: 'oklab(0.6784 0 0 / 0.9373)' }, + { at: 1, value: 'oklab(0.5981 0 0)' } + ]; + + window.onload = async () => { + promise_test(t => { + return runAnimationTest(t, 'missing-from-legacy-to', gray_to_green); + }, 'Animate from neutral keyframe with color-mix to legacy rgb'); + + promise_test(t => { + return runAnimationTest(t, 'missing-to-legacy-from', green_to_gray); + }, 'Animate from legacy rgb to neutral keyframe with color-mix'); + + promise_test(t => { + return runAnimationTest(t, 'missing-from-srgb-to', gray_to_green); + }, 'Animate from neutral keyframe with color-mix to srgb'); + + promise_test(t => { + return runAnimationTest(t, 'missing-to-srgb-from', green_to_gray); + }, 'Animate from srgb to neutral keyframe with color-mix'); + + promise_test(t => { + return runAnimationTest(t, 'missing-from-rgba-to', + translucent_black_to_white); + }, 'Animate from color-mix with transparency to legacy rgba'); + + promise_test(t => { + return runAnimationTest(t, 'missing-to-rgba-from', + translucent_white_to_black); + }, 'Animate from legacy rgba to color-mix with transparency'); + }; + +</script> +</html> diff --git a/tests/wpt/tests/css/css-color/parsing/color-computed-relative-color.html b/tests/wpt/tests/css/css-color/parsing/color-computed-relative-color.html index fd4de953705..aa2e48723eb 100644 --- a/tests/wpt/tests/css/css-color/parsing/color-computed-relative-color.html +++ b/tests/wpt/tests/css/css-color/parsing/color-computed-relative-color.html @@ -77,13 +77,13 @@ // Testing permutation. fuzzy_test_computed_color(`rgb(from rebeccapurple g b r)`, `color(srgb 0.2 0.6 0.4)`); - fuzzy_test_computed_color(`rgb(from rebeccapurple b alpha r / g)`, `color(srgb 0.6 1 0.4 / 0.2)`); - fuzzy_test_computed_color(`rgb(from rebeccapurple r r r / r)`, `color(srgb 0.4 0.4 0.4 / 0.4)`); - fuzzy_test_computed_color(`rgb(from rebeccapurple alpha alpha alpha / alpha)`, `color(srgb 1 1 1)`); + fuzzy_test_computed_color(`rgb(from rebeccapurple b alpha r / g)`, `color(srgb 0.6 ${1/255} 0.4)`); + fuzzy_test_computed_color(`rgb(from rebeccapurple r r r / r)`, `color(srgb 0.4 0.4 0.4)`); + fuzzy_test_computed_color(`rgb(from rebeccapurple alpha alpha alpha / alpha)`, `color(srgb ${1/255} ${1/255} ${1/255})`); fuzzy_test_computed_color(`rgb(from rgb(20%, 40%, 60%, 80%) g b r)`, `color(srgb 0.4 0.6 0.2 / 0.8)`); - fuzzy_test_computed_color(`rgb(from rgb(20%, 40%, 60%, 80%) b alpha r / g)`, `color(srgb 0.6 0.8 0.2 / 0.4)`); - fuzzy_test_computed_color(`rgb(from rgb(20%, 40%, 60%, 80%) r r r / r)`, `color(srgb 0.2 0.2 0.2 / 0.2)`); - fuzzy_test_computed_color(`rgb(from rgb(20%, 40%, 60%, 80%) alpha alpha alpha / alpha)`, `color(srgb 0.8 0.8 0.8 / 0.8)`); + fuzzy_test_computed_color(`rgb(from rgb(20%, 40%, 60%, 80%) b alpha r / g)`, `color(srgb 0.6 ${0.8/255} 0.2)`); + fuzzy_test_computed_color(`rgb(from rgb(20%, 40%, 60%, 80%) r r r / r)`, `color(srgb 0.2 0.2 0.2)`); + fuzzy_test_computed_color(`rgb(from rgb(20%, 40%, 60%, 80%) alpha alpha alpha / alpha)`, `color(srgb ${0.8/255} ${0.8/255} ${0.8/255} / 0.8)`); // Testing mixes of number and percentage. (These would not be allowed in the non-relative syntax). fuzzy_test_computed_color(`rgb(from rebeccapurple r 20% 10)`, `color(srgb 0.4 0.2 0.0392)`); @@ -697,9 +697,9 @@ fuzzy_test_computed_color(`color(from color(rec2020 0.25 0.5 0.75) srgb r g b)`, `color(srgb -0.280102 0.565536 0.79958)`, 0.001); fuzzy_test_computed_color(`color(from color(srgb 0.25 0.5 0.75) rec2020 r g b)`, `color(rec2020 0.331976 0.440887 0.696358)`, 0.001); fuzzy_test_computed_color(`color(from color(xyz-d50 0.25 0.5 0.75) srgb r g b)`, `color(srgb -0.660065 0.874863 0.981117)`, 0.001); - fuzzy_test_computed_color(`color(from color(srgb 0.25 0.5 0.75) xyz-d50 r g b)`, `color(xyz-d50 0.179349 0.196389 0.394585)`, 0.001); + fuzzy_test_computed_color(`color(from color(srgb 0.25 0.5 0.75) xyz-d50 x y z)`, `color(xyz-d50 0.179349 0.196389 0.394585)`, 0.001); fuzzy_test_computed_color(`color(from color(xyz-d65 0.25 0.5 0.75) srgb r g b)`, `color(srgb -0.611881 0.868732 0.856899)`, 0.001); - fuzzy_test_computed_color(`color(from color(srgb 0.25 0.5 0.75) xyz-d65 r g b)`, `color(xyz-d65 0.191791 0.201562 0.523057)`, 0.001); + fuzzy_test_computed_color(`color(from color(srgb 0.25 0.5 0.75) xyz-d65 x y z)`, `color(xyz-d65 0.191791 0.201562 0.523057)`, 0.001); fuzzy_test_computed_color(`lab(from color(srgb 0.25 0.5 0.75) l a b)`, `lab(51.4265 -5.21401 -40.1491)`, 0.02); // Larger values means larger epsilon. fuzzy_test_computed_color(`color(from lab(67.5345 -8.6911 -41.6019) srgb r g b)`, `color(srgb 0.382744 0.672806 0.938545)`, 0.001); fuzzy_test_computed_color(`oklab(from color(srgb 0.25 0.5 0.75) l a b)`, `oklab(0.585502 -0.0393846 -0.111503)`, 0.001); diff --git a/tests/wpt/tests/css/css-contain/contain-layout-dynamic-004-ref.html b/tests/wpt/tests/css/css-contain/contain-layout-dynamic-004-ref.html new file mode 100644 index 00000000000..40923d836ca --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-layout-dynamic-004-ref.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>Dynamic change to layout containment (reference)</title> + +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> + +<style> + div { + font: 25px/1 Ahem; + } + #wrapper { + width: 15em; + background: lightgray; + } + .containment { + contain: layout; + } + .float { + box-sizing: border-box; + border: 1px solid black; + } + .left { + float: left; + width: 1em; + height: 2em; + } + .right { + float: right; + width: 1em; + height: 3em; + } +</style> + +<body> + <p>PASS if the boxes with dark colors are NOT floating next to the boxes with + light colors.</p> + <div id="wrapper"> + <div> + <div id="container" class="containment"> + <div><div class="float left" style="background: lightblue"></div></div> + <div class="float right" style="background: lightyellow"></div> + <div>XX XXX XXXX X</div> + </div> + <div class="float left" style="background: blue"></div> + <div> + <div> + <div><div class="float right" style="background: yellow"></div></div> + <div>XXX XXXXXX XXXX XX XX</div> + </div> + <div>XXXX XXXXX XX</div> + </div> + <div>XXX XXX XX XXXX</div> + </div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-layout-dynamic-004.html b/tests/wpt/tests/css/css-contain/contain-layout-dynamic-004.html new file mode 100644 index 00000000000..d3c9eb68606 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-layout-dynamic-004.html @@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>Dynamic change to layout containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1874826"> +<meta name="assert" content="Verify floats are properly displayed after dynamic change to layout containment."> +<link rel="match" href="contain-layout-dynamic-004-ref.html"> + +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> + +<style> + div { + font: 25px/1 Ahem; + } + #wrapper { + width: 15em; + background: lightgray; + } + .containment { + contain: layout; + } + .float { + box-sizing: border-box; + border: 1px solid black; + } + .left { + float: left; + width: 1em; + height: 2em; + } + .right { + float: right; + width: 1em; + height: 3em; + } +</style> + +<body> + <p>PASS if the boxes with dark colors are NOT floating next to the boxes with + light colors.</p> + <div id="wrapper"> + <div> + <div id="container"> + <div><div class="float left" style="background: lightblue"></div></div> + <div class="float right" style="background: lightyellow"></div> + <div>XX XXX XXXX X</div> + </div> + <div class="float left" style="background: blue"></div> + <div> + <div> + <div><div class="float right" style="background: yellow"></div></div> + <div>XXX XXXXXX XXXX XX XX</div> + </div> + <div>XXXX XXXXX XX</div> + </div> + <div>XXX XXX XX XXXX</div> + </div> + </div> + <script> + window.addEventListener("load", async () => { + container.classList.add('containment'); + await waitForAtLeastOneFrame(); + takeScreenshot(); + }); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-layout-dynamic-005-ref.html b/tests/wpt/tests/css/css-contain/contain-layout-dynamic-005-ref.html new file mode 100644 index 00000000000..3c2e6cf2e41 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-layout-dynamic-005-ref.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>Dynamic change to layout containment (reference)</title> + +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> + +<style> + div { + font: 25px/1 Ahem; + } + #wrapper { + width: 15em; + background: lightgray; + } + .containment { + contain: layout; + } + .float { + box-sizing: border-box; + border: 1px solid black; + } + .left { + float: left; + width: 1em; + height: 2em; + } + .right { + float: right; + width: 1em; + height: 3em; + } +</style> + +<body> + <p>PASS if the boxes with dark colors are floating next to the boxes with + light colors.</p> + <div id="wrapper"> + <div> + <div id="container"> + <div><div class="float left" style="background: lightblue"></div></div> + <div class="float right" style="background: lightyellow"></div> + <div>XX XXX XXXX X</div> + </div> + <div class="float left" style="background: blue"></div> + <div> + <div> + <div><div class="float right" style="background: yellow"></div></div> + <div>XXX XXXXXX XXXX XX XX</div> + </div> + <div>XXXX XXXXX XX</div> + </div> + <div>XXX XXX XX XXXX</div> + </div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-layout-dynamic-005.html b/tests/wpt/tests/css/css-contain/contain-layout-dynamic-005.html new file mode 100644 index 00000000000..a430ae5181b --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-layout-dynamic-005.html @@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>Dynamic change to layout containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1874826"> +<meta name="assert" content="Verify floats are properly displayed after dynamic change to layout containment."> +<link rel="match" href="contain-layout-dynamic-005-ref.html"> + +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> + +<style> + div { + font: 25px/1 Ahem; + } + #wrapper { + width: 15em; + background: lightgray; + } + .containment { + contain: layout; + } + .float { + box-sizing: border-box; + border: 1px solid black; + } + .left { + float: left; + width: 1em; + height: 2em; + } + .right { + float: right; + width: 1em; + height: 3em; + } +</style> + +<body> + <p>PASS if the boxes with dark colors are floating next to the boxes with + light colors.</p> + <div id="wrapper"> + <div> + <div id="container" class="containment"> + <div><div class="float left" style="background: lightblue"></div></div> + <div class="float right" style="background: lightyellow"></div> + <div>XX XXX XXXX X</div> + </div> + <div class="float left" style="background: blue"></div> + <div> + <div> + <div><div class="float right" style="background: yellow"></div></div> + <div>XXX XXXXXX XXXX XX XX</div> + </div> + <div>XXXX XXXXX XX</div> + </div> + <div>XXX XXX XX XXXX</div> + </div> + </div> + <script> + window.addEventListener("load", async () => { + container.classList.remove('containment'); + await waitForAtLeastOneFrame(); + takeScreenshot(); + }); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-paint-dynamic-004-ref.html b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-004-ref.html new file mode 100644 index 00000000000..02f3d94ee93 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-004-ref.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>Dynamic change to paint containment (reference)</title> + +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> + +<style> + div { + font: 25px/1 Ahem; + } + #wrapper { + width: 15em; + background: lightgray; + } + .containment { + contain: paint; + } + .float { + box-sizing: border-box; + border: 1px solid black; + } + .left { + float: left; + width: 1em; + height: 2em; + } + .right { + float: right; + width: 1em; + height: 3em; + } +</style> + +<body> + <p>PASS if the boxes with dark colors are NOT floating next to the boxes with + light colors.</p> + <div id="wrapper"> + <div> + <div id="container" class="containment"> + <div><div class="float left" style="background: lightblue"></div></div> + <div class="float right" style="background: lightyellow"></div> + <div>XX XXX XXXX X</div> + </div> + <div class="float left" style="background: blue"></div> + <div> + <div> + <div><div class="float right" style="background: yellow"></div></div> + <div>XXX XXXXXX XXXX XX XX</div> + </div> + <div>XXXX XXXXX XX</div> + </div> + <div>XXX XXX XX XXXX</div> + </div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-paint-dynamic-004.html b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-004.html new file mode 100644 index 00000000000..8e286db8b10 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-004.html @@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>Dynamic change to paint containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1874826"> +<meta name="assert" content="Verify floats are properly displayed after dynamic change to paint containment."> +<link rel="match" href="contain-paint-dynamic-004-ref.html"> + +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> + +<style> + div { + font: 25px/1 Ahem; + } + #wrapper { + width: 15em; + background: lightgray; + } + .containment { + contain: paint; + } + .float { + box-sizing: border-box; + border: 1px solid black; + } + .left { + float: left; + width: 1em; + height: 2em; + } + .right { + float: right; + width: 1em; + height: 3em; + } +</style> + +<body> + <p>PASS if the boxes with dark colors are NOT floating next to the boxes with + light colors.</p> + <div id="wrapper"> + <div> + <div id="container"> + <div><div class="float left" style="background: lightblue"></div></div> + <div class="float right" style="background: lightyellow"></div> + <div>XX XXX XXXX X</div> + </div> + <div class="float left" style="background: blue"></div> + <div> + <div> + <div><div class="float right" style="background: yellow"></div></div> + <div>XXX XXXXXX XXXX XX XX</div> + </div> + <div>XXXX XXXXX XX</div> + </div> + <div>XXX XXX XX XXXX</div> + </div> + </div> + <script> + window.addEventListener("load", async () => { + container.classList.add('containment'); + await waitForAtLeastOneFrame(); + takeScreenshot(); + }); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-paint-dynamic-005-ref.html b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-005-ref.html new file mode 100644 index 00000000000..1d1ce904fc6 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-005-ref.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>Dynamic change to paint containment (reference)</title> + +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> + +<style> + div { + font: 25px/1 Ahem; + } + #wrapper { + width: 15em; + background: lightgray; + } + .containment { + contain: paint; + } + .float { + box-sizing: border-box; + border: 1px solid black; + } + .left { + float: left; + width: 1em; + height: 2em; + } + .right { + float: right; + width: 1em; + height: 3em; + } +</style> + +<body> + <p>PASS if the boxes with dark colors are floating next to the boxes with + light colors.</p> + <div id="wrapper"> + <div> + <div id="container"> + <div><div class="float left" style="background: lightblue"></div></div> + <div class="float right" style="background: lightyellow"></div> + <div>XX XXX XXXX X</div> + </div> + <div class="float left" style="background: blue"></div> + <div> + <div> + <div><div class="float right" style="background: yellow"></div></div> + <div>XXX XXXXXX XXXX XX XX</div> + </div> + <div>XXXX XXXXX XX</div> + </div> + <div>XXX XXX XX XXXX</div> + </div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-paint-dynamic-005.html b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-005.html new file mode 100644 index 00000000000..bedac635cec --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-005.html @@ -0,0 +1,70 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>Dynamic change to paint containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1874826"> +<meta name="assert" content="Verify floats are properly displayed after dynamic change to paint containment."> +<link rel="match" href="contain-paint-dynamic-005-ref.html"> + +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> + +<style> + div { + font: 25px/1 Ahem; + } + #wrapper { + width: 15em; + background: lightgray; + } + .containment { + contain: paint; + } + .float { + box-sizing: border-box; + border: 1px solid black; + } + .left { + float: left; + width: 1em; + height: 2em; + } + .right { + float: right; + width: 1em; + height: 3em; + } +</style> + +<body> + <p>PASS if the boxes with dark colors are floating next to the boxes with + light colors.</p> + <div id="wrapper"> + <div> + <div id="container" class="containment"> + <div><div class="float left" style="background: lightblue"></div></div> + <div class="float right" style="background: lightyellow"></div> + <div>XX XXX XXXX X</div> + </div> + <div class="float left" style="background: blue"></div> + <div> + <div> + <div><div class="float right" style="background: yellow"></div></div> + <div>XXX XXXXXX XXXX XX XX</div> + </div> + <div>XXXX XXXXX XX</div> + </div> + <div>XXX XXX XX XXXX</div> + </div> + </div> + <script> + window.addEventListener("load", async () => { + container.classList.remove('containment'); + await waitForAtLeastOneFrame(); + takeScreenshot(); + }); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/container-queries/container-selection-unknown-features.html b/tests/wpt/tests/css/css-contain/container-queries/container-selection-unknown-features.html new file mode 100644 index 00000000000..8e0e34db9a5 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/container-queries/container-selection-unknown-features.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<title>@container: selection using name and implicit selection</title> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-rule"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/cq-testcommon.js"></script> +<style> + #container { + container-type: size; + width: 200px; + --foo: bar; + } + @container (width > 0px) { + div { color: green } + } + @container (width > 0px) or (foo: bar) { + #t1 { color: red } + } + @container (width > 0px) or foo(bar) { + #t2 { color: red } + } + @container style(--foo: bar) or (foo: bar) { + #t3 { color: red } + } +</style> +<div id="container"> + <div id="t1">Green</div> + <div id="t2">Green</div> + <div id="t3">Green</div> + <div id="t4">Green</div> +</div> +<script> + setup(() => assert_implements_container_queries()); + + const green = "rgb(0, 128, 0)"; + test(() => { assert_equals(getComputedStyle(t1).color, green); }, "width query with (foo: bar)"); + test(() => { assert_equals(getComputedStyle(t2).color, green); }, "width query with foo(bar)"); + test(() => { assert_equals(getComputedStyle(t3).color, green); }, "style query with (foo: bar)"); +</script> diff --git a/tests/wpt/tests/css/css-contain/container-queries/query-evaluation-style.html b/tests/wpt/tests/css/css-contain/container-queries/query-evaluation-style.html index 4262f8bb0c2..bf059f795a3 100644 --- a/tests/wpt/tests/css/css-contain/container-queries/query-evaluation-style.html +++ b/tests/wpt/tests/css/css-contain/container-queries/query-evaluation-style.html @@ -65,10 +65,10 @@ test_query('style((--baz: qux) or (--foo: bar) or (--foo: bar))', true); test_query('style((--foo: bar) or (--baz: qux) or (--foo: bar))', true); test_query('style((--foo: bar) or (--foo: bar) or (--baz: qux))', true); - test_query('style((unknown) or (--foo: bar) or (--foo: bar))', true); - test_query('style((--foo: bar) or (unknown) or (--foo: bar))', true); - test_query('style((--foo: bar) or (--foo: bar) or (unknown))', true); - test_query('style((unknown) or (--baz: qux) or (--foo: bar))', true); + test_query('style((unknown) or (--foo: bar) or (--foo: bar))', false); + test_query('style((--foo: bar) or (unknown) or (--foo: bar))', false); + test_query('style((--foo: bar) or (--foo: bar) or (unknown))', false); + test_query('style((unknown) or (--baz: qux) or (--foo: bar))', false); // Combinations, <style-query>: test_query('style(not ((--foo: bar) and (--foo: bar)))', false); diff --git a/tests/wpt/tests/css/css-contain/container-queries/query-evaluation.html b/tests/wpt/tests/css/css-contain/container-queries/query-evaluation.html index 5b301f2d1d9..469b7b0d7a2 100644 --- a/tests/wpt/tests/css/css-contain/container-queries/query-evaluation.html +++ b/tests/wpt/tests/css/css-contain/container-queries/query-evaluation.html @@ -72,10 +72,10 @@ test_query('((height) or (width) or (width))', true); test_query('((width) or (height) or (width))', true); test_query('((width) or (width) or (height))', true); - test_query('((unknown) or (width) or (width))', true); - test_query('((width) or (unknown) or (width))', true); - test_query('((width) or (width) or (unknown))', true); - test_query('((unknown) or (height) or (width))', true); + test_query('((unknown) or (width) or (width))', false); + test_query('((width) or (unknown) or (width))', false); + test_query('((width) or (width) or (unknown))', false); + test_query('((unknown) or (height) or (width))', false); // Combinations, <container-query>: test_query('(not ((width) and (width)))', false); diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-auto-state-changed-removed.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-auto-state-changed-removed.html index ae1c946fa31..5724aa1649c 100644 --- a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-auto-state-changed-removed.html +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-auto-state-changed-removed.html @@ -8,6 +8,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="/common/rendering-utils.js"></script> <style> .spacer { @@ -23,9 +24,8 @@ <script> promise_test(t => new Promise(async (resolve, reject) => { - await new Promise((waited, _) => { - requestAnimationFrame(() => requestAnimationFrame(waited)); - }); + // Make sure the first "contentvisibilityautostatechange" event has fired before the test. + await new Promise(resolve => bottomdiv.addEventListener("contentvisibilityautostatechange", resolve, { once: true })); let observed = false; bottomdiv.addEventListener("contentvisibilityautostatechange", () => { @@ -33,7 +33,7 @@ promise_test(t => new Promise(async (resolve, reject) => { }); bottomdiv.remove() - requestAnimationFrame(() => requestAnimationFrame(resolve)); + waitForAtLeastOneFrame().then(resolve); }), "ContentVisibilityAutoStateChange does not fire on disconnected element"); diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-vs-scrollIntoView-003.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-vs-scrollIntoView-003.html index 93b085a5318..9fc9c5ff32f 100644 --- a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-vs-scrollIntoView-003.html +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-vs-scrollIntoView-003.html @@ -1,14 +1,15 @@ <!doctype HTML> <html> <meta charset="utf8"> -<title>CSS Content Visibility: auto + overflow clip + scrollIntoView, ContentVisibilityAutoStateChange fires twice</title> +<title>CSS Content Visibility: auto + overflow clip + scrollIntoView, ContentVisibilityAutoStateChange fires trece</title> <link rel="author" title="Cathie Chen" href="mailto:cathiechen@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> <meta name="assert" - content="If content-visibility: auto element is not relevent to user after calling scrollIntoView of its descendant, contentvisibilityautostatechange twice"> + content="If content-visibility: auto element is not relevent to user after calling scrollIntoView of its descendant, contentvisibilityautostatechange trece"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="/common/rendering-utils.js"></script> <style> .auto { @@ -50,35 +51,30 @@ </div> <script> -function tick() { - return new Promise(resolve => { - requestAnimationFrame(() => requestAnimationFrame(resolve)); - }); -} - function waitForEvent() { - return new Promise(resolve => e3.addEventListener('contentvisibilityautostatechange', resolve)); + return new Promise(resolve => e3.addEventListener('contentvisibilityautostatechange', resolve, { once: true })); } promise_test(async (t) => { - // Make sure the first event has fired. - await waitForEvent(); - var eventCounter = 0; function eventHandler(e) { eventCounter++; if (eventCounter == 1) { - assert_equals(e.skipped, false, "the first event should be generated by visible"); + assert_equals(e.skipped, true, "the first event is the initial one"); } else if (eventCounter == 2) { - assert_equals(e.skipped, true, "the second event should be generated by hidden"); + assert_equals(e.skipped, false, "the second event should be generated by visible"); + } else if (eventCounter == 3) { + assert_equals(e.skipped, true, "the third event should be generated by hidden"); } } e3.addEventListener("contentvisibilityautostatechange", eventHandler); + // Make sure the first event has fired. + await waitForEvent(); target.scrollIntoView(); await waitForEvent(); await waitForEvent(); - await tick(); - assert_equals(eventCounter, 2, "There should be two contentvisibilityautostatechange events."); -}, "ContentVisibilityAutoStateChange fires twice when `scrollIntoView` a descendant of `content-visibility:auto` which is hidden after scrolling"); + await waitForAtLeastOneFrame(); + assert_equals(eventCounter, 3, "There should be three contentvisibilityautostatechange events."); +}, "ContentVisibilityAutoStateChange fires trece when `scrollIntoView` a descendant of `content-visibility:auto` which is hidden after scrolling"); </script> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-popover-top-layer-006.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-popover-top-layer-006.html index fbe8b9fbb77..36989f79d1d 100644 --- a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-popover-top-layer-006.html +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-popover-top-layer-006.html @@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="/common/rendering-utils.js"></script> <style> #inner { @@ -23,8 +24,10 @@ </div> <script> -test(() => { +promise_test(async () => { popover.showPopover(); + // It takes at least one frame to determine the proximity to the viewport. + await waitForAtLeastOneFrame(); // Even though the element with `content-visibility: auto` has an ancestor // in the top layer, this element is not in the top layer list (although diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-006.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-006.html index 36a79532a9a..79a7993e263 100644 --- a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-006.html +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-006.html @@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="/common/rendering-utils.js"></script> <style> #inner { @@ -23,9 +24,10 @@ </dialog> <script> -test(() => { +promise_test(async () => { dialog.show(); - + // It takes at least one frame to determine the proximity to the viewport. + await waitForAtLeastOneFrame(); assert_equals(inner.getBoundingClientRect().height, 100); dialog.close(); @@ -35,6 +37,9 @@ test(() => { // in the top layer, this element is not in the top layer list (although // it's in the top layer stacking context). This means it should not be // relevant to the user, because it is nevertheless not onscreen. + // It takes at least one frame to determine the proximity to the viewport. + await waitForAtLeastOneFrame(); assert_equals(inner.getBoundingClientRect().height, 100); + dialog.close(); }); </script> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-007.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-007.html new file mode 100644 index 00000000000..028f818133b --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-with-top-layer-007.html @@ -0,0 +1,41 @@ +<!doctype html> +<meta charset="utf8"> +<title>CSS Content Visibility: onscreen c-v auto content is relevant when in top layer</title> +<link rel="author" title="Cathie Chen" href="mailto:cathiechen@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> +<meta name="assert" content="onscreen c-v auto content is relevant when in top layer"> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/rendering-utils.js"></script> + +<style> +#inner { + content-visibility: auto; + contain-intrinsic-size: 100px 100px; +} +</style> + +<dialog id="dialog"> + <div id="inner"> + <div style="height: 200px; width: 200px;">content</div> + </div> + <div id="spacer" style="height: 100000px;"></div> +</dialog> + +<script> +promise_test(async () => { + dialog.show(); + // It takes at least one frame to determine the proximity to the viewport. + await waitForAtLeastOneFrame(); + assert_equals(inner.getBoundingClientRect().height, 200); + + dialog.close(); + dialog.showModal(); + + // It takes at least one frame to determine the proximity to the viewport. + await waitForAtLeastOneFrame(); + assert_equals(inner.getBoundingClientRect().height, 200); + dialog.close(); +}); +</script> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/display-ruby-text-crash.html b/tests/wpt/tests/css/css-contain/content-visibility/display-ruby-text-crash.html new file mode 100644 index 00000000000..85ccd459af7 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/display-ruby-text-crash.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel=author href="mailto:vmpstr@chromium.org"> +<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=1515531"> + +<style> +body,table,tbody{ + content-visibility: hidden; + display: ruby-text; +} +</style> + +<marquee></marquee> +<u style="height: 100px; width: 100px; overflow: scroll; display: block;" dir="ltr"></u> diff --git a/tests/wpt/tests/css/css-grid/grid-tracks-fractional-fr.html b/tests/wpt/tests/css/css-grid/grid-tracks-fractional-fr.html new file mode 100644 index 00000000000..6600cef65c5 --- /dev/null +++ b/tests/wpt/tests/css/css-grid/grid-tracks-fractional-fr.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<title>Tests fractional fr-units which should multiply to whole numbers.</title> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1515685"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="target" style="display: grid; grid-template-columns: 1.01fr 0.99fr 1fr; width: 600px;"> + <div></div> + <div></div> + <div></div> +</div> +<script> +test(() => { + const [a, b, c] = document.getElementById('target').children; + assert_equals(a.getBoundingClientRect().width, 202); + assert_equals(b.getBoundingClientRect().width, 198); + assert_equals(c.getBoundingClientRect().width, 200); +}); +</script> diff --git a/tests/wpt/tests/css/css-grid/subgrid/overflow-hidden-does-not-prohibit-subgrid.html b/tests/wpt/tests/css/css-grid/subgrid/overflow-hidden-does-not-prohibit-subgrid.html new file mode 100644 index 00000000000..b0c73e0e24e --- /dev/null +++ b/tests/wpt/tests/css/css-grid/subgrid/overflow-hidden-does-not-prohibit-subgrid.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<html> +<head> +<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com"> +<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#overflow-control"> +<link rel="help" href="https://drafts.csswg.org/css-grid-2/#track-sizing"> +<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> +<meta name="assert" content="overflow on a grid item does not cause it to establish an independent formatting context, and as a result does not prohibit subgrid"> +<style> +.grid { + display: inline-grid; + grid-template: auto auto / auto auto; + background-color: green; +} +.subgrid { + grid-row: span 2; + grid-column: 2; + display: grid; + grid-template-rows: subgrid; + overflow: hidden; +} +.item { + width: 50px; + height: 50px; +} +</style> +</head> +<body> +<p>Test passes if there is a filled green square.</p> +<div class="grid"> + <div class="item" style="grid-row: 1;"></div> + <div class="subgrid"> + <div class="item" style="grid-row: 2;"></div> + </div> +</div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-001-ref.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-001-ref.html new file mode 100644 index 00000000000..8c9732f1ddb --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-001-ref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Reference</title> +<head> + <style> + iframe { + width: 400px; + height: 200px; + } +</style> +</head> +<iframe id="iframe" src="resources/iframe-container.html"></iframe> +</html>
\ No newline at end of file diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-001.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-001.html new file mode 100644 index 00000000000..2c28f7d132a --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-001.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Highlights using container sizes update on container changes</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> +<link rel="match" href="custom-highlight-dynamic-container-metrics-001-ref.html"> +<meta name="assert" value="lengths depending on containers take the correct values in a universal highlight with no container when the container size changes"> +<script src="/common/reftest-wait.js"></script> +<head> + <style> + iframe { + width: 200px; + height: 100px; + } + + iframe.resize { + width: 400px; + height: 200px; + } +</style> +</head> +<iframe id="iframe" src="resources/iframe-container.html"></iframe> +<script> + function runtest() { + iframe.classList.add('resize'); + requestAnimationFrame(() => takeScreenshot()); + } + iframe.onload = runtest; +</script> +</html>
\ No newline at end of file diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-002.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-002.html new file mode 100644 index 00000000000..1a0cbe87a55 --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-002.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Highlights using dynamic container sizes</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> +<link rel="match" href="custom-highlight-container-metrics-002-ref.html"> +<meta name="assert" value="lengths depending on containers take the correct values when the container size chnages"> +<meta name="fuzzy" content="0-60;0-25"> +<script src="/common/reftest-wait.js"></script> +<head> + <style> + .wrapper { + container: wrapper / size; + width: 400px; + height: 200px; + } + .resize { + width: 200px; + height: 100px; + } + ::highlight(highlight1) { + text-underline-offset: 2cqw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4cqh; + } +</style> +</head> +<body> + <div id="container" class="wrapper"> + <div id="h1">With container size</div> + </div> + <div id="h2">Without container size</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + let r2 = new Range(); + r2.setStart(h2, 0); + r2.setEnd(h2, 1); + CSS.highlights.set("highlight1", new Highlight(r1, r2)); + requestAnimationFrame(() => { + container.classList.add('resize'); + requestAnimationFrame(() => takeScreenshot()); + }); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-003.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-003.html new file mode 100644 index 00000000000..38246a15aff --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-003.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Highlights using dynamic container sizes</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> +<link rel="match" href="custom-highlight-container-metrics-003-ref.html"> +<meta name="assert" value="lengths depending on containers update correctly for a highlight defined only inside a container query"> +<head> + <style> + .wrapper { + container: wrapper / size; + width: 400px; + height: 200px; + } + .resize { + width: 200px; + height: 100px; + } + @container (width < 300px) { + ::highlight(highlight1) { + text-underline-offset: 2cqw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4cqh; + } + } + </style> +</head> +<body> + <div id="container" class="wrapper"> + <div id="h1">With container size</div> + </div> + <div id="h2">Should be no highlight</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + let r2 = new Range(); + r2.setStart(h2, 0); + r2.setEnd(h2, 1); + CSS.highlights.set("highlight1", new Highlight(r1, r2)); + requestAnimationFrame(() => { + container.classList.add('resize'); + requestAnimationFrame(() => takeScreenshot()); + }); + </script> +</body> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-004.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-004.html new file mode 100644 index 00000000000..fbdbea32efc --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-container-metrics-004.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Highlights using container sizes</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> +<link rel="match" href="custom-highlight-container-metrics-003-ref.html"> +<meta name="assert" value="a highlight on a container itself renders at the correct size when the container changes"> +<head> + <style> + .wrapper { + container: wrapper / size; + width: 400px; + height: 200px; + } + .resize { + width: 200px; + height: 100px; + } + @container (width < 300px) { + .wrapper::highlight(highlight1) { + text-underline-offset: 2cqw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4cqh; + } + } + </style> +</head> +<body> + <div id="h1" class="wrapper">With container size</div> + <div id="h2">Should be no highlight</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + let r2 = new Range(); + r2.setStart(h2, 0); + r2.setEnd(h2, 1); + CSS.highlights.set("highlight1", new Highlight(r1, r2)); + requestAnimationFrame(() => { + h1.classList.add('resize'); + requestAnimationFrame(() => takeScreenshot()); + }); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-font-metrics-001.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-font-metrics-001.html new file mode 100644 index 00000000000..4bddbc02a1d --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-font-metrics-001.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: </title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="match" href="custom-highlight-font-metrics-001-ref.html"> +<meta name="assert" value="fonts relative units take the correct values, with correct cascade"> +<meta name="fuzzy" content="0-80;0-4"> +<head> + <style> + :root { + font-size: 8px; + } + div { + margin: 50px; + font-size: 10px; + } + ::highlight(highlight1) { + text-underline-offset: 0.5em; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 0.25rem; + } + </style> +</head> +<body> + <div id="h1">Font relative units with 40px font</div> + <div id="h2">Font relative units with 20px font</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + let r2 = new Range(); + r2.setStart(h2, 0); + r2.setEnd(h2, 1); + CSS.highlights.set("highlight1", new Highlight(r1, r2)); + requestAnimationFrame(() => { + requestAnimationFrame(() => { + h1.style.fontSize = '40px'; + h2.style.fontSize = '20px'; + document.documentElement.style.fontSize = '16px'; + requestAnimationFrame(() => takeScreenshot()); + }); + }); + </script> +</body> +</html>
\ No newline at end of file diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-logical-metrics-001.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-logical-metrics-001.html new file mode 100644 index 00000000000..ff52aed6ab1 --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-dynamic-logical-metrics-001.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Length relative to a changing logical direction</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="match" href="custom-highlight-logical-metrics-002-ref.html"> +<meta name="assert" value="lengths depending on viewports and logical direction when the direction changes"> +<meta name="fuzzy" content="0-30;0-10"> +<head> + <style> + div { + width: 100px; + height: 200px; + line-height: 3em; + } + .vertical { + writing-mode: vertical-lr; + } + ::highlight(highlight1) { + text-underline-offset: 1svb; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 1svi; + } +</style> +</head> +<body> + <div id="h1">With viewport size</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + CSS.highlights.set("highlight1", new Highlight(r1)); + requestAnimationFrame(() => { + h1.classList.add('vertical'); + requestAnimationFrame(() => takeScreenshot()); + }); + </script> +</body> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/resources/iframe-container.html b/tests/wpt/tests/css/css-highlight-api/painting/resources/iframe-container.html new file mode 100644 index 00000000000..c89680e28c9 --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/resources/iframe-container.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<style> + ::highlight(highlight1) { + text-underline-offset: 1cqw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 2cqh; + } +</style> +<div id="h1">With container size</div> +<script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + CSS.highlights.set("highlight1", new Highlight(r1)); +</script> diff --git a/tests/wpt/tests/css/css-masking/mask-image/mask-image-svg-gradient-zoomed.html b/tests/wpt/tests/css/css-masking/mask-image/mask-image-svg-gradient-zoomed.html new file mode 100644 index 00000000000..17d2869f6e4 --- /dev/null +++ b/tests/wpt/tests/css/css-masking/mask-image/mask-image-svg-gradient-zoomed.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>linear-gradient() mask-image on <rect> in zoomed SVG</title> +<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> +<link rel="help" href="https://drafts.fxtf.org/css-masking/#svg-masks"> +<style> + svg { + zoom: 2; + } +</style> +<p>Test passes if there is a filled green square.</p> +<svg> + <rect width="50" height="100" fill="green" + style="mask-image: linear-gradient(black 50px, transparent 50px)"/> +</svg> diff --git a/tests/wpt/tests/css/css-nesting/conditional-rules.html b/tests/wpt/tests/css/css-nesting/conditional-rules.html index ec6f781960b..0172db645b2 100644 --- a/tests/wpt/tests/css/css-nesting/conditional-rules.html +++ b/tests/wpt/tests/css/css-nesting/conditional-rules.html @@ -70,6 +70,6 @@ <div class="test test-6"></div> <div class="test test-10"></div> <div class="test test-11"></div> - <div class="test test-12"></div> + <div class="test test-12"><div class="test-12"></div></div> <div class="test"><div class="test-13"></div></div> </body> diff --git a/tests/wpt/tests/css/css-overflow/scrollbar-gutter-dynamic-004-ref.html b/tests/wpt/tests/css/css-overflow/scrollbar-gutter-dynamic-004-ref.html new file mode 100644 index 00000000000..edafd49e524 --- /dev/null +++ b/tests/wpt/tests/css/css-overflow/scrollbar-gutter-dynamic-004-ref.html @@ -0,0 +1,9 @@ +<!doctype html> +<meta charset="utf-8"> +<style> +p { + background-color: purple; + color: white; +} +</style> +<p>Should not have space around me in the inline axis.</p> diff --git a/tests/wpt/tests/css/css-overflow/scrollbar-gutter-dynamic-004.html b/tests/wpt/tests/css/css-overflow/scrollbar-gutter-dynamic-004.html new file mode 100644 index 00000000000..07b66eede73 --- /dev/null +++ b/tests/wpt/tests/css/css-overflow/scrollbar-gutter-dynamic-004.html @@ -0,0 +1,26 @@ +<!doctype html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>CSS Overflow: scrollbar-gutter changing dynamically on the root element</title> +<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> +<link rel="author" href="https://mozilla.org" title="Mozilla"> +<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#scrollbar-gutter-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1874093"> +<link rel="match" href="scrollbar-gutter-dynamic-004-ref.html"> +<style> +:root { + scrollbar-gutter: stable both-edges; +} +p { + background-color: purple; + color: white; +} +</style> +<p>Should not have space around me in the inline axis.</p> +<script> + document.documentElement.getBoundingClientRect(); + document.addEventListener("TestRendered", function() { + document.documentElement.style.scrollbarGutter = "initial"; + document.documentElement.className = ""; + }); +</script> diff --git a/tests/wpt/tests/css/css-page/parsing/margin-rules-001.html b/tests/wpt/tests/css/css-page/parsing/margin-rules-001.html index b73d1bc56fc..c4270fe606a 100644 --- a/tests/wpt/tests/css/css-page/parsing/margin-rules-001.html +++ b/tests/wpt/tests/css/css-page/parsing/margin-rules-001.html @@ -45,7 +45,7 @@ test(t => { } // Test that margin-rules are valid inside page-rules. for(let t in ruleTypes){ - test_valid_rule("@page{ " + ruleTypes[t] + "{ } }"); + test_valid_rule("@page { " + ruleTypes[t] + " { } }"); } }, "margin-rules-001"); </script> diff --git a/tests/wpt/tests/css/css-properties-values-api/unit-cycles.html b/tests/wpt/tests/css/css-properties-values-api/unit-cycles.html index 9454c95ac30..de26e712c77 100644 --- a/tests/wpt/tests/css/css-properties-values-api/unit-cycles.html +++ b/tests/wpt/tests/css/css-properties-values-api/unit-cycles.html @@ -4,15 +4,23 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> - function register_length(name, inherits=false) { + function register_property(name, syntax, inherits) { CSS.registerProperty({ name: name, - syntax: '<length>', + syntax: syntax, initialValue: '0px', inherits: inherits }); } + function register_length(name, inherits=false) { + register_property(name, '<length>', inherits); + } + + function register_universal(name) { + register_property(name, '*', false); + } + register_length('--font-size-em'); register_length('--font-size-rem'); register_length('--font-size-ex'); @@ -29,6 +37,12 @@ register_length('--line-height-lh'); register_length('--line-height-lh-via-var'); register_length('--line-height-lh-inherited', true); + register_universal('--font-size-em-universal'); + register_universal('--font-size-rem-universal'); + register_universal('--font-size-ex-universal'); + register_universal('--font-size-ch-universal'); + register_universal('--font-size-px-universal'); + register_universal('--font-size-lh-universal'); </script> <style> :root { @@ -52,6 +66,12 @@ --font-size-ex-via-var: var(--unregistered-ex); --font-size-ch-via-var: var(--unregistered-ch); --line-height-lh-via-var: var(--unregistered-lh); + --font-size-em-universal: 2em; + --font-size-rem-universal: 2rem; + --font-size-ex-universal: 2ex; + --font-size-ch-universal: 2ch; + --font-size-px-universal: 42px; + --font-size-lh-universal: 2lh; } #parent { @@ -74,14 +94,27 @@ <script> + function unset_dimension(element = ref) { + element.style.fontSize = ''; + element.style.marginBottom = ''; + } + + function compute_margin_bottom(dimension, element) { + try { + element.style.marginBottom = dimension; + return getComputedStyle(element).marginBottom; + } finally { + element.style.marginBottom = ''; + } + } + // Compute a dimension (e.g. 1em) given a certain fontSize. function compute_dimension(dimension, fontSize, element = ref) { try { - element.attributeStyleMap.set('font-size', fontSize); - element.attributeStyleMap.set('margin-bottom', dimension); - return getComputedStyle(element).marginBottom; + element.style.fontSize = fontSize; + return compute_margin_bottom(dimension, element); } finally { - element.attributeStyleMap.clear(); + element.style.fontSize = ''; } } @@ -94,11 +127,46 @@ const unsetLineHeight = "normal"; add_result_callback(function(){ - target.attributeStyleMap.clear(); - document.documentElement.attributeStyleMap.clear(); + unset_dimension(target); + unset_dimension(document.documentElement); }); test(function() { + // Unregistered variables behave as if they're copy & paste, so + // follow the regular font-relative size resolution. + const unregistered_variables = { + 'unregistered-em': target.parentElement, + 'unregistered-ex': target.parentElement, + 'unregistered-ch': target.parentElement, + 'unregistered-lh': target.parentElement, + 'unregistered-rem': document.documentElement, + }; + + for (let variable in unregistered_variables) { + const e = unregistered_variables[variable]; + const v = `var(--${variable})`; + target.style = `font-size: ${v};`; + assert_property_equals('font-size', compute_margin_bottom(v, e)); + } + }, 'Font-dependent unregistered variables can be used in font-size'); + + test(function() { + const universal_variables = { + 'font-size-em-universal': (v) => compute_dimension(v, 'unset', target), + 'font-size-ex-universal': (v) => compute_dimension(v, 'unset', target), + 'font-size-ch-universal': (v) => compute_dimension(v, 'unset', target), + 'font-size-lh-universal': (v) => compute_margin_bottom('2lh', target.parentElement), + 'font-size-rem-universal': (v) => compute_dimension(v, 'unset', target), + }; + for (let variable in universal_variables) { + const v = `var(--${variable})`; + const expected = universal_variables[variable](v); + target.style = `font-size: ${v};`; + assert_property_equals('font-size', expected); + } + }, 'Registered universal variables referencing font-dependent units can be used in font-size'); + + test(function() { target.style = 'font-size: var(--font-size-px);'; assert_property_equals('font-size', '42px'); assert_property_equals('--font-size-px', '42px'); diff --git a/tests/wpt/tests/css/css-pseudo/active-selection-031.html b/tests/wpt/tests/css/css-pseudo/active-selection-031.html index c7d79c8ac9f..7b08269300e 100644 --- a/tests/wpt/tests/css/css-pseudo/active-selection-031.html +++ b/tests/wpt/tests/css/css-pseudo/active-selection-031.html @@ -10,12 +10,18 @@ <link rel="stylesheet" href="support/highlights.css"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style> + .highlight_reftest { + overflow: hidden; + width: 300px; + height: 325px; + } div > div { color: red; float: left; - font-size: 32px; + font: 25px/1 Ahem; margin-left: 16px; } diff --git a/tests/wpt/tests/css/css-pseudo/reference/active-selection-031-ref.html b/tests/wpt/tests/css/css-pseudo/reference/active-selection-031-ref.html index 3bb7c329d46..a9581d40c72 100644 --- a/tests/wpt/tests/css/css-pseudo/reference/active-selection-031-ref.html +++ b/tests/wpt/tests/css/css-pseudo/reference/active-selection-031-ref.html @@ -7,12 +7,18 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <link rel="stylesheet" href="../support/highlights.css"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style> + .highlight_reftest { + overflow: hidden; + width: 300px; + height: 325px; + } div > div { color: green; float: left; - font-size: 32px; + font: 25px/1 Ahem; margin-left: 16px; } diff --git a/tests/wpt/tests/css/css-scroll-anchoring/adjustment-followed-by-scrollBy.html b/tests/wpt/tests/css/css-scroll-anchoring/adjustment-followed-by-scrollBy.html new file mode 100644 index 00000000000..7428147b835 --- /dev/null +++ b/tests/wpt/tests/css/css-scroll-anchoring/adjustment-followed-by-scrollBy.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html> +<meta name="viewport" content="width=device-width"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1874551"> +<style> +div { + height: round(20vh, 1px); +} +</style> +<div></div> +<div></div> +<div></div> +<div></div> +<div></div> +<div></div> +<div id="center" style="height: 100px; background-color: blue;"></div> +<div></div> +<div></div> +<div></div> +<div></div> +<div></div> +<div></div> +<script> +promise_test(async t => { + assert_equals(window.scrollY, 0); + + // Center an element. + center.scrollIntoView({ block: "center" }, { behavior: "instant" }); + await new Promise(resolve => window.addEventListener("scroll", resolve)); + + const originalPosition = center.getBoundingClientRect().top; + + // Given that now the element is centered, one of div elements above the + // centered element is used as the scroll anchor node. Hide two div elements, + // the first div and the div element just above the centered one to move the + // anchor node, thus it will trigger scroll anchoring adjustment. + center.previousElementSibling.style.display = "none"; + document.querySelectorAll("div")[0].style.display = "none"; + + // And adjust the scroll position where the centered element is still + // positioned at the center of the scroll container. + window.scrollBy(0, center.getBoundingClientRect().top - originalPosition); + await new Promise(resolve => window.addEventListener("scroll", resolve)); + + const centeredPosition = center.getBoundingClientRect().top; + + // Now try to scrollIntoView({ block: "center" }) and make sure the position + // is unchanged. + center.scrollIntoView({ block: "center" }, { behavior: "instant" }); + + // Wait two frames to be able to scroll if it's possible. + await new Promise(resolve => requestAnimationFrame(resolve)); + await new Promise(resolve => requestAnimationFrame(resolve)); + + assert_equals(centeredPosition, center.getBoundingClientRect().top); +}, "Scroll anchoring followed by scrollBy call"); +</script> +</html> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-end-001-ref.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-end-001-ref.html new file mode 100644 index 00000000000..57013882323 --- /dev/null +++ b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-end-001-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<script src="support/variant-class.js"></script> +<style> +@font-face { + font-family: halt-font; + src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); +} +#container { + font-family: halt-font; + font-size: 20px; +} +.vrl { + writing-mode: vertical-rl; +} +</style> +<div id="container"> + <div>国国国)<br>国国国)</div> +</div> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-end-001.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-end-001.html new file mode 100644 index 00000000000..c5293f09981 --- /dev/null +++ b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-end-001.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-spacing-trim-property"> +<link rel="match" href="text-spacing-trim-end-001-ref.html"> +<script src="support/variant-class.js"></script> +<meta name="variant" content="?class=halt,htb"> +<meta name="variant" content="?class=chws,htb"> +<meta name="variant" content="?class=halt,vrl"> +<meta name="variant" content="?class=chws,vrl"> +<style> +@font-face { + font-family: halt-font; + src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); +} +@font-face { + font-family: chws-font; + src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-chws.otf'); +} +#container { + font-family: halt-font; + font-size: 20px; + inline-size: 3.6em; + text-spacing-trim: trim-start; +} +.chws #container { + font-family: chws-font; +} +.vrl { + writing-mode: vertical-rl; +} +</style> +<div id="container"> + <div>国国国)国国国)</div> +</div> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html index aef81fbbc0d..60a255160f2 100644 --- a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html +++ b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html @@ -10,6 +10,7 @@ font-family: halt-font; font-size: 20px; inline-size: 4em; + text-spacing-trim: space-all; } .vrl { writing-mode: vertical-rl; @@ -26,6 +27,7 @@ halt { </style> <div id="container"> <div><ps>(</ps>国国国<ls>(</ls>国国国<ls>(</ls>国</div> + <div>国国国)<ls>(</ls>国国)<ls>(</ls>国</div> <div>国国国国<ls>(</ls></div> <div lang="zh-hans">国国国国<ls>“</ls></div> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001.html index 3d481df1da2..f007245277b 100644 --- a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001.html +++ b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001.html @@ -44,6 +44,7 @@ </style> <div id="container"> <div>(国国国(国国国(国</div> + <div>国国国)(国国)(国</div> <div>国国国国(</div> <div lang="zh-hans">国国国国“</div> diff --git a/tests/wpt/tests/css/css-text/text-transform/math/italic-mapping.js b/tests/wpt/tests/css/css-text/text-transform/math/italic-mapping.js new file mode 100644 index 00000000000..ba17d3f6b60 --- /dev/null +++ b/tests/wpt/tests/css/css-text/text-transform/math/italic-mapping.js @@ -0,0 +1,115 @@ +// Generated by mathml/tools/mathvariant.py; DO NOT EDIT. +let italic_mapping = { + 0x41: 0x1D434, + 0x42: 0x1D435, + 0x43: 0x1D436, + 0x44: 0x1D437, + 0x45: 0x1D438, + 0x46: 0x1D439, + 0x47: 0x1D43A, + 0x48: 0x1D43B, + 0x49: 0x1D43C, + 0x4A: 0x1D43D, + 0x4B: 0x1D43E, + 0x4C: 0x1D43F, + 0x4D: 0x1D440, + 0x4E: 0x1D441, + 0x4F: 0x1D442, + 0x50: 0x1D443, + 0x51: 0x1D444, + 0x52: 0x1D445, + 0x53: 0x1D446, + 0x54: 0x1D447, + 0x55: 0x1D448, + 0x56: 0x1D449, + 0x57: 0x1D44A, + 0x58: 0x1D44B, + 0x59: 0x1D44C, + 0x5A: 0x1D44D, + 0x61: 0x1D44E, + 0x62: 0x1D44F, + 0x63: 0x1D450, + 0x64: 0x1D451, + 0x65: 0x1D452, + 0x66: 0x1D453, + 0x67: 0x1D454, + 0x68: 0x210E, + 0x69: 0x1D456, + 0x6A: 0x1D457, + 0x6B: 0x1D458, + 0x6C: 0x1D459, + 0x6D: 0x1D45A, + 0x6E: 0x1D45B, + 0x6F: 0x1D45C, + 0x70: 0x1D45D, + 0x71: 0x1D45E, + 0x72: 0x1D45F, + 0x73: 0x1D460, + 0x74: 0x1D461, + 0x75: 0x1D462, + 0x76: 0x1D463, + 0x77: 0x1D464, + 0x78: 0x1D465, + 0x79: 0x1D466, + 0x7A: 0x1D467, + 0x131: 0x1D6A4, + 0x237: 0x1D6A5, + 0x391: 0x1D6E2, + 0x392: 0x1D6E3, + 0x393: 0x1D6E4, + 0x394: 0x1D6E5, + 0x395: 0x1D6E6, + 0x396: 0x1D6E7, + 0x397: 0x1D6E8, + 0x398: 0x1D6E9, + 0x399: 0x1D6EA, + 0x39A: 0x1D6EB, + 0x39B: 0x1D6EC, + 0x39C: 0x1D6ED, + 0x39D: 0x1D6EE, + 0x39E: 0x1D6EF, + 0x39F: 0x1D6F0, + 0x3A0: 0x1D6F1, + 0x3A1: 0x1D6F2, + 0x3F4: 0x1D6F3, + 0x3A3: 0x1D6F4, + 0x3A4: 0x1D6F5, + 0x3A5: 0x1D6F6, + 0x3A6: 0x1D6F7, + 0x3A7: 0x1D6F8, + 0x3A8: 0x1D6F9, + 0x3A9: 0x1D6FA, + 0x2207: 0x1D6FB, + 0x3B1: 0x1D6FC, + 0x3B2: 0x1D6FD, + 0x3B3: 0x1D6FE, + 0x3B4: 0x1D6FF, + 0x3B5: 0x1D700, + 0x3B6: 0x1D701, + 0x3B7: 0x1D702, + 0x3B8: 0x1D703, + 0x3B9: 0x1D704, + 0x3BA: 0x1D705, + 0x3BB: 0x1D706, + 0x3BC: 0x1D707, + 0x3BD: 0x1D708, + 0x3BE: 0x1D709, + 0x3BF: 0x1D70A, + 0x3C0: 0x1D70B, + 0x3C1: 0x1D70C, + 0x3C2: 0x1D70D, + 0x3C3: 0x1D70E, + 0x3C4: 0x1D70F, + 0x3C5: 0x1D710, + 0x3C6: 0x1D711, + 0x3C7: 0x1D712, + 0x3C8: 0x1D713, + 0x3C9: 0x1D714, + 0x2202: 0x1D715, + 0x3F5: 0x1D716, + 0x3D1: 0x1D717, + 0x3F0: 0x1D718, + 0x3D5: 0x1D719, + 0x3F1: 0x1D71A, + 0x3D6: 0x1D71B, +} diff --git a/tests/wpt/tests/css/css-text/text-transform/math/text-transform-math-auto-003.html b/tests/wpt/tests/css/css-text/text-transform/math/text-transform-math-auto-003.html new file mode 100644 index 00000000000..eff01b08902 --- /dev/null +++ b/tests/wpt/tests/css/css-text/text-transform/math/text-transform-math-auto-003.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>text-transform math-auto</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#new-text-transform-values"> + <link rel="help" href="https://w3c.github.io/mathml-core/#italic-mappings"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="italic-mapping.js"></script> + <meta name="assert" content="Verify Selection.toString() on a character with 'text-transform: math-auto' returns the transformed unicode character."> + <style> + #container { + text-transform: math-auto; + } + </style> + </head> + <body> + <span id="container"></span> + <script> + add_completion_callback(() => { + container.remove(); + }); + for (let code_point in italic_mapping) { + test(() => { + container.textContent = String.fromCodePoint(code_point); + window + .getSelection() + .setBaseAndExtent(container.firstChild, 0, container.firstChild, 1); + assert_equals( + window.getSelection().toString(), + String.fromCodePoint(italic_mapping[code_point]) + ); + }, `Selection.toString() for math-auto '${String.fromCodePoint(code_point)}' returns the transformed character.`); + } + </script> + </body> +</html> diff --git a/tests/wpt/tests/css/css-text/text-transform/text-transform-upperlower-107.html b/tests/wpt/tests/css/css-text/text-transform/text-transform-upperlower-107.html new file mode 100644 index 00000000000..791edd14c0e --- /dev/null +++ b/tests/wpt/tests/css/css-text/text-transform/text-transform-upperlower-107.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text Test: text-transform uppercase German sharp S and selection</title> +<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-text/#propdef-text-transform"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<meta name="assert" content="text-transform: uppercase will uppercase the German sharp S as SS, the whole 2 characters is selectable and should be returned when retriving the selected string."> +<style> + #target { + text-transform: uppercase; + } +</style> + +<span id="target" lang="de">ß</span> + +<script> + test(() => { + window.getSelection().setBaseAndExtent(target, 0, target, 1); + assert_equals(window.getSelection().toString(), "SS"); + }, "Selection.toString() for 'ß' with text-transform: uppercase"); +</script> diff --git a/tests/wpt/tests/css/css-transitions/all-with-discrete.tentative.html b/tests/wpt/tests/css/css-transitions/all-with-discrete.tentative.html index c3642eeed89..37946717b4c 100644 --- a/tests/wpt/tests/css/css-transitions/all-with-discrete.tentative.html +++ b/tests/wpt/tests/css/css-transitions/all-with-discrete.tentative.html @@ -5,17 +5,20 @@ <script src="/resources/testharnessreport.js"></script> <script src="/css/css-animations/support/testcommon.js"></script> -<div id=target>hello</div> +<div class=testcase id=discrete>Allow discrete</div> +<div class=testcase id=normal>No discrete</div> <style> -#target { +.testcase { float: left; width: 100px; height: 100px; transition: all 1s; +} +#discrete { transition-behavior: allow-discrete; } -#target.animated { +.animated { float: right; } </style> @@ -23,8 +26,14 @@ <script> promise_test(async () => { await waitForAnimationFrames(2); - target.classList.add('animated'); - const anims = document.getAnimations(); + // Regression test for https://crbug.com/1518561 + normal.classList.add('animated'); + const normalAnims = normal.getAnimations(); + assert_equals(normalAnims.length, 0, + "Started a discrete property transition on a normal element"); + + discrete.classList.add('animated'); + const anims = discrete.getAnimations(); assert_equals(anims.length, 1, "Did not start a discrete-property transition"); assert_equals(anims[0].transitionProperty, 'float'); diff --git a/tests/wpt/tests/css/css-transitions/animations/animate-with-color-mix.html b/tests/wpt/tests/css/css-transitions/animations/animate-with-color-mix.html new file mode 100644 index 00000000000..3e630a7a2b1 --- /dev/null +++ b/tests/wpt/tests/css/css-transitions/animations/animate-with-color-mix.html @@ -0,0 +1,146 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>CSS transitions with color-mix</title> +</head> +<style> + #target-1, #target-2, #target-3, #target-4, #target-5, #target-6 { + color: black; + height: 100px; + width: 100px; + display: inline-block; + transition: background-color 1s linear; + } + #target-1, + #target-2.update-2, + #target-3, + #target-4.update-4 { + background-color: color-mix(in srgb, white 50%, + currentcolor); + } + #target-1.update-1, + #target-2 { + background-color: rgb(0, 255, 0); + } + + #target-3.update-3, + #target-4 { + background-color: color(srgb 0.0 1.0 0.0); + } + + #target-5, #target-6.update-6 { + background-color: color-mix(in srgb, transparent 50%, + currentcolor); + } + + #target-6, #target-5.update-5 { + background-color: rgba(255, 255, 255, 0.75); + } + +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/css/support/color-testcommon.js"></script> +<body> + <div id="target-1"></div> + <div id="target-2"></div> + <div id="target-3"></div> + <div id="target-4"></div> + <div id="target-5"></div> + <div id="target-6"></div> +</body> +<script> + 'use strict'; + + async function runAnimationTest(t, elementId, update, + expected_colors) { + const elem = document.getElementById(elementId); + t.add_cleanup(() => { + elem.classList.remove(update); + }); + await waitForNextFrame(); + await waitForNextFrame(); + elem.classList.add(update); + const anim = elem.getAnimations()[0]; + await anim.ready; + // Keep the animation in effect when it reaches the end. + anim.effect.updateTiming({ fill: 'forwards' }); + expected_colors.forEach(data => { + anim.currentTime = 1000 * data.at; + const actual = getComputedStyle(elem).backgroundColor; + const expected = data.value; + assert_oklab_color( + actual, expected, + `Background color at ${100*data.at}% animation progress`); + }); + } + + const gray_to_green = [ + { at: 0, value: 'oklab(0.5981 0.0000 0.0000)' }, + { at: 0.25, value: 'oklab(0.6652 -0.0584 0.0449)' }, + { at: 0.5, value: 'oklab(0.7323 -0.1169 0.0898)' }, + { at: 0.75, value: 'oklab(0.7994 -0.1754 0.1346)' }, + { at: 1, value: 'oklab(0.8664 -0.2338 0.1795)' } + ]; + + const green_to_gray = [ + { at: 0, value: 'oklab(0.8664 -0.2338 0.1795)' }, + { at: 0.25, value: 'oklab(0.7994 -0.1754 0.1346)' }, + { at: 0.5, value: 'oklab(0.7323 -0.1169 0.0898)' }, + { at: 0.75, value: 'oklab(0.6652 -0.0584 0.0449)' }, + { at: 1, value: 'oklab(0.5981 0.0000 0.0000)' } + ]; + + const translucent_black_to_white = [ + { at: 0, value: 'oklab(0 0 0 / 0.5)' }, + { at: 0.25, value: 'oklab(0.3330 0 0 / 0.5623)' }, + { at: 0.5, value: 'oklab(0.5997 0 0 / 0.6245)' }, + { at: 0.75, value: 'oklab(0.8180 0 0 / 0.6868)' }, + { at: 1, value: 'oklab(1 0 0 / 0.75)' } + ]; + + const translucent_white_to_black = [ + { at: 0, value: 'oklab(1 0 0 / 0.75)' }, + { at: 0.25, value: 'oklab(0.8180 0 0. / 0.6868)' }, + { at: 0.5, value: 'oklab(0.5997 0 0 / 0.6245)' }, + { at: 0.75, value: 'oklab(0.3330 0 0 / 0.5623)' }, + { at: 1, value: 'oklab(0 0 0 / 0.5)' } + ]; + + window.onload = async () => { + promise_test(t => { + return runAnimationTest(t, 'target-1', 'update-1', + gray_to_green); + }, 'Transition from color-mix to legacy rgb'); + + promise_test(t => { + return runAnimationTest(t, 'target-2', 'update-2', + green_to_gray); + }, 'Transition from legacy rgb to color-mix'); + + promise_test(t => { + return runAnimationTest(t, 'target-3', 'update-3', + gray_to_green); + }, 'Transition from color-mix to srgb'); + + promise_test(t => { + return runAnimationTest(t, 'target-4', 'update-4', + green_to_gray); + }, 'Transition from srgb to color-mix'); + + promise_test(t => { + return runAnimationTest(t, 'target-5', 'update-5', + translucent_black_to_white); + }, 'Transition from color-mix with transparency to legacy rgba'); + + promise_test(t => { + return runAnimationTest(t, 'target-6', 'update-6', + translucent_white_to_black); + }, 'Transition from legacy rgba to color-mix with transparency'); + }; +</script> +</html> diff --git a/tests/wpt/tests/css/css-typed-om/stylevalue-serialization/cssUnparsedValue.html b/tests/wpt/tests/css/css-typed-om/stylevalue-serialization/cssUnparsedValue.html index 6fc2e0284c1..c87553dd917 100644 --- a/tests/wpt/tests/css/css-typed-om/stylevalue-serialization/cssUnparsedValue.html +++ b/tests/wpt/tests/css/css-typed-om/stylevalue-serialization/cssUnparsedValue.html @@ -2,17 +2,18 @@ <meta charset="utf-8"> <title>IDL-constructed CSSUnparsedValue serialization tests</title> <link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#unparsedvalue-serialization"> -<meta name="assert" content="Test CSSUnparsedValue are serialized by concatenating its contents" /> +<meta name="assert" content="Test CSSUnparsedValue are serialized similar to getComputedStyle()" /> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <body> -<div id="tag"> +<div id="tag"></div> +<div id="elem" style="color-scheme: bar/*comment*/var(--foo)"></div> <script> 'use strict'; test(() => { - assert_equals(new CSSUnparsedValue(['lem', 'on', 'ade']).toString(), 'lemonade'); -}, 'CSSUnparsedValue containing strings serializes to its concatenated contents'); + assert_equals(new CSSUnparsedValue(['lem', 'on', 'ade']).toString(), 'lem/**/on/**/ade'); +}, 'CSSUnparsedValue containing strings serializes to its tokenized contents'); test(() => { assert_equals(new CSSUnparsedValue([ @@ -21,7 +22,7 @@ test(() => { new CSSVariableReferenceValue('--C')]).toString(), 'var(--A,var(--B))var(--C)'); }, 'CSSUnparsedValue containing variable references serializes its ' + - 'concatenated contents'); + 'tokenized contents'); test(() => { assert_equals(new CSSUnparsedValue(['foo', 'bar ', @@ -30,8 +31,14 @@ test(() => { new CSSVariableReferenceValue('--B'), 'lemon'])), new CSSVariableReferenceValue('--C', new CSSUnparsedValue(['ade']))]).toString(), - 'foobar var(--A,baz var(--B)lemon)var(--C,ade)'); + 'foo/**/bar var(--A,baz var(--B)lemon)var(--C,ade)'); }, 'CSSUnparsedValue containing mix of strings and variable references ' + - 'serializes to its concatenated contents'); + 'serializes to its tokenized contents'); + +test(() => { + assert_equals( + elem.attributeStyleMap.get("color-scheme").toString(), + 'bar/**/var(--foo)'); +}, 'attributeStyleMap round-trips correctly, though the comment is gone'); </script> diff --git a/tests/wpt/tests/css/css-ui/parsing/resize-invalid.html b/tests/wpt/tests/css/css-ui/parsing/resize-invalid.html index 7f9698f7aad..c6c19ebceac 100644 --- a/tests/wpt/tests/css/css-ui/parsing/resize-invalid.html +++ b/tests/wpt/tests/css/css-ui/parsing/resize-invalid.html @@ -15,6 +15,7 @@ test_invalid_value("resize", "auto"); test_invalid_value("resize", "horizontal vertical"); test_invalid_value("resize", "both 0"); +test_invalid_value("resize", "-internal-textarea-auto"); </script> </body> </html> diff --git a/tests/wpt/tests/css/css-values/progress-computed.tentative.html b/tests/wpt/tests/css/css-values/progress-computed.tentative.html index 2ef09996d55..7f8a1ddd789 100644 --- a/tests/wpt/tests/css/css-values/progress-computed.tentative.html +++ b/tests/wpt/tests/css/css-values/progress-computed.tentative.html @@ -17,9 +17,9 @@ test_math_used('progress(sign(-10px) * 10px from (10px - 10px) to 10px * progres // General calculations test_math_used('calc(progress(100px from 0px to 50px) * 10px + 100px)', '120px'); test_math_used('calc(progress(100 from 0 to sign(50px)))', '100', {type:'number'}); -test_math_used('calc(progress(abs(5%) from hypot(3%, 4%) to 10%))', '1', {type:'number', approx:0.001}); -test_math_used('progress(1000em from 10em to 110em)', '10', {type:'number'}); -test_math_used('scale(progress(1000em from 10rem to 110em))', 'scale(10)', {prop:'transform', type:'number'}); +test_math_used('calc(progress(abs(5%) from hypot(3%, 4%) to 10%))', '0', {type:'number', approx:0.001}); +test_math_used('progress(1000em from 10em to 110em)', '9.9', {type:'number', approx:0.1}); +test_math_used('scale(progress(1000em from 10rem to 110em))', 'scale(9.9)', {prop:'transform', type:'number', approx:0.1}); test_math_used('scale(progress(0em from 0rem to 0em))', 'scale(0)', {prop:'transform', type:'number'}); test_math_used('scale(progress(sign(1em - 1rem) * 1ex from 0rem to 0em))', 'scale(0)', {prop:'transform', type:'number'}); diff --git a/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-name-invalid.html b/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-name-invalid.html index 0151991436c..00cd411d6ad 100644 --- a/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-name-invalid.html +++ b/tests/wpt/tests/css/css-view-transitions/parsing/view-transition-name-invalid.html @@ -12,6 +12,7 @@ </head> <body> <script> +test_invalid_value("view-transition-name", "auto"); // `auto` is excluded. test_invalid_value("view-transition-name", "default"); // `default` isn't allowed by the `<custom-ident>` syntax. test_invalid_value("view-transition-name", "none none"); test_invalid_value("view-transition-name", `"none"`); diff --git a/tests/wpt/tests/css/cssom-view/client-props-zoom.html b/tests/wpt/tests/css/cssom-view/client-props-zoom.html index fb4c95cada4..fc5b07abb51 100644 --- a/tests/wpt/tests/css/cssom-view/client-props-zoom.html +++ b/tests/wpt/tests/css/cssom-view/client-props-zoom.html @@ -2,23 +2,21 @@ <title>Client properties for elements with css zoom</title> <link rel="author" title="Yotam Hacohen" href="mailto:yotha@chromium.org"> <link rel="author" title="Google" href="http://www.google.com/"> -<link rel="help" href="https://drafts.csswg.org/css-viewport/">" +<link rel="help" href="https://drafts.csswg.org/css-viewport/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <head> - <style> - div { +<style> + .test_content div { width: 64px; height: 64px; - background-color: blue + background-color: cyan; } - div.x4_zoom { + .test_content div.x4_zoom { zoom: 4.0; } - </style> - </head> - <body> - +</style> +<body> + <div class="test_content"> <div id="no_zoom"></div> <div class="x4_zoom" id="element_with_zoom"></div> @@ -27,11 +25,11 @@ <div> <div id="indirect_child_of_element_with_zoom"></div> </div> - <div class="x4_zoom", id="both_child_and_parent_has_zoom"></div> + <div class="x4_zoom" id="both_child_and_parent_has_zoom"></div> </div> + </div> - - <script> + <script> setup(() => { window.noZoom = document.getElementById("no_zoom"); }); @@ -50,5 +48,5 @@ compareObjectToDivWithNoZoom(document.getElementById("indirect_child_of_element_with_zoom")); compareObjectToDivWithNoZoom(document.getElementById("both_child_and_parent_has_zoom")); }); - </script> - </body>
\ No newline at end of file + </script> +</body> diff --git a/tests/wpt/tests/css/cssom-view/getClientRects-zoom.html b/tests/wpt/tests/css/cssom-view/getClientRects-zoom.html index d4c249eadb0..93d42aee87b 100644 --- a/tests/wpt/tests/css/cssom-view/getClientRects-zoom.html +++ b/tests/wpt/tests/css/cssom-view/getClientRects-zoom.html @@ -5,31 +5,30 @@ <link rel="help" href="https://drafts.csswg.org/css-viewport/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <head> - <style> - div { +<style> + .test_content div { width: 64px; height: 64px; background-color: blue } - div.x4_zoom { + .test_content div.x4_zoom { zoom: 4.0; background-color: blueviolet; } - div.x2_zoom { + .test_content div.x2_zoom { background-color: chartreuse; zoom: 2.0; } - div.transform { + .test_content div.transform { transform: scale(2); transform-origin: top left; } - </style> - </head> - <body> +</style> +<body> + <div class="test_content"> <div id="no_zoom"></div> <div class="x4_zoom" id="with_zoom"> </div> @@ -37,7 +36,8 @@ <div class="x4_zoom" id="nested_zoom"></div> </div> <div id="transform_and_zoom" class="x4_zoom transform"></div> - <script> + </div> + <script> setup(() => { window.noZoom = document.getElementById("no_zoom"); window.withZoom = document.getElementById("with_zoom"); @@ -76,6 +76,5 @@ assert_equals(transformAndZoomRect.width, 512, 'transform and zoom width'); assert_equals(transformAndZoomRect.height, 512, 'transform and zoom height'); }); - </script> - </body> -`
\ No newline at end of file + </script> +</body> diff --git a/tests/wpt/tests/css/selectors/has-display-none-checked-ref.html b/tests/wpt/tests/css/selectors/has-display-none-checked-ref.html new file mode 100644 index 00000000000..6e855f52caf --- /dev/null +++ b/tests/wpt/tests/css/selectors/has-display-none-checked-ref.html @@ -0,0 +1,3 @@ +<!doctype html> +<title>CSS Test Reference</title> +<div>PASS</div> diff --git a/tests/wpt/tests/css/selectors/has-display-none-checked.html b/tests/wpt/tests/css/selectors/has-display-none-checked.html new file mode 100644 index 00000000000..96b1f8bd048 --- /dev/null +++ b/tests/wpt/tests/css/selectors/has-display-none-checked.html @@ -0,0 +1,28 @@ +<!doctype html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>:has() invalidation inside display: none subtree</title> +<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> +<link rel="author" href="https://mozilla.org" title="Mozilla"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1875137"> +<link rel="help" href="https://drafts.csswg.org/selectors/#relational"> +<link rel="match" href="has-display-none-checked-ref.html"> +<style> +body:has(input:checked) #fail { + display: none; +} +body:not(:has(input:checked)) #pass { + display: none; +} +</style> +<div style="display: none"> + <input type="checkbox" id="on"> +</div> +<div id="fail">FAIL</div> +<div id="pass">PASS</div> +<script> + document.addEventListener("TestRendered", function() { + document.querySelector("input").checked = true; + document.documentElement.className = ""; + }); +</script> diff --git a/tests/wpt/tests/css/selectors/invalidation/has-append-first-node.html b/tests/wpt/tests/css/selectors/invalidation/has-append-first-node.html new file mode 100644 index 00000000000..82060cc99fa --- /dev/null +++ b/tests/wpt/tests/css/selectors/invalidation/has-append-first-node.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1874705"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<style> +#dut { + width: 100px; + height: 100px; + background: red; +} +#dut:has(span) { + background: green; +} +</style> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div id="dut"></div> +<script> +function raf() { + return new Promise(resolve => { + requestAnimationFrame(resolve); + }); +} + +async function go() { + await raf(); + await raf(); + const df = document.createDocumentFragment(); + const t = document.createTextNode('\n'); + df.appendChild(t); + const s = document.createElement("span"); + df.appendChild(s); + dut.appendChild(df); + document.documentElement.className = ''; +} + +go(); +</script> +</html> diff --git a/tests/wpt/tests/css/selectors/invalidation/has-sibling-insertion-removal.html b/tests/wpt/tests/css/selectors/invalidation/has-sibling-insertion-removal.html index 3c05a0f495a..0655b230524 100644 --- a/tests/wpt/tests/css/selectors/invalidation/has-sibling-insertion-removal.html +++ b/tests/wpt/tests/css/selectors/invalidation/has-sibling-insertion-removal.html @@ -20,6 +20,7 @@ div, main { color: grey } #subject11:has(+ #sibling11_1 + #sibling11_2 ~ #sibling11_3 > #siblingchild11_3_1) { color: blue } #subject12:has(+ #sibling12_2 ~ #sibling12_3 > #siblingchild12_3_1) { color: yellow } .sibling13:has(~ .sibling13) { color: green } +#subject14:has(~ #sibling14_1 ~ #sibling14_2 ~ #sibling14_3) { color: green } </style> <main id="main"> @@ -108,6 +109,12 @@ div, main { color: grey } <div class="sibling13"></div> <div id="subject13" class="sibling13"></div> </div> + <div id="parent14"> + <div id="subject14"></div> + <div id="sibling14_1"></div> + <div id="sibling14_2"></div> + <div id="sibling14_3"></div> + </div> </main> <script> @@ -195,4 +202,8 @@ d.classList.add("sibling13"); parent13.appendChild(d); testColor(`subject13: color after #sibling12_1 removed should be ${green}`, subject13, green); + +testColor(`subject14: initial color should be ${green}`, subject14, green); +sibling14_2.remove(); +testColor(`subject14: color after #sibling14_2 removed should be ${grey}`, subject14, grey); </script> diff --git a/tests/wpt/tests/css/selectors/invalidation/has-with-nesting-parent-containing-hover.html b/tests/wpt/tests/css/selectors/invalidation/has-with-nesting-parent-containing-hover.html new file mode 100644 index 00000000000..8082980e626 --- /dev/null +++ b/tests/wpt/tests/css/selectors/invalidation/has-with-nesting-parent-containing-hover.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Selector Invalidation: :has() with nesting parent containing :hover</title> +<link rel="help" href="https://drafts.csswg.org/selectors/#relational"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<style> + dd, dt { background: white; } + dd:hover { + dt:has(~ &) { background: lime; } + } +</style> +<dt id=dt1>#dt1</dt> +<dd id=dd1>#dd1, Hover me, the DT above should go lime</dd> +<dt id=dt2>#dt2</dt> +<dd id=dd2>#dd2, Hover me, both DTs above should go lime</dd> +<script> + const white = 'rgb(255, 255, 255)'; + const lime = 'rgb(0, 255, 0)'; + + function bg_color(element, color, message) { + assert_equals(getComputedStyle(element)['background-color'], color, message); + } + + promise_test(async () => { + bg_color(dt1, white, "#dt1 initially white"); + bg_color(dd1, white, "#dd1 initially white"); + bg_color(dt2, white, "#dt2 initially white"); + bg_color(dd2, white, "#dd2 initially white"); + + await new test_driver.Actions().pointerMove(0, 0, {origin: dd1}).send(); + + bg_color(dt1, lime, "#dt1 should go lime when hover #dd1"); + bg_color(dd1, white, "#dd1 doesn't change when hover #dd1"); + bg_color(dt2, white, "#dt2 doesn't change when hover #dd1"); + bg_color(dd2, white, "#dd2 doesn't change when hover #dd1"); + + await new test_driver.Actions().pointerMove(0, 0, {origin: dt1}).send(); + + bg_color(dt1, white, "#dt1 should go white when hover #dt2"); + bg_color(dd1, white, "#dd1 doesn't change when hover #dt2"); + bg_color(dt2, white, "#dt2 doesn't change when hover #dt2"); + bg_color(dd2, white, "#dd2 doesn't change when hover #dt2"); + + await new test_driver.Actions().pointerMove(0, 0, {origin: dd2}).send(); + + bg_color(dt1, lime, "#dt1 should go lime when hover #dd2"); + bg_color(dd1, white, "#dd1 doesn't change when hover #dd2"); + bg_color(dt2, lime, "#dt2 should go lime when hover #dd2"); + bg_color(dd2, white, "#dd2 doesn't change when hover #dd2"); + }); +</script>
\ No newline at end of file diff --git a/tests/wpt/tests/css/selectors/parsing/invalid-pseudos.html b/tests/wpt/tests/css/selectors/parsing/invalid-pseudos.html index a09572b6517..4076e5302bd 100644 --- a/tests/wpt/tests/css/selectors/parsing/invalid-pseudos.html +++ b/tests/wpt/tests/css/selectors/parsing/invalid-pseudos.html @@ -8,7 +8,10 @@ <script src="../../support/parsing-testcommon.js"></script> <script> // Pseudo-classes +test_invalid_selector(":-internal-animating-full-screen-transition"); test_invalid_selector(":-internal-html-document"); +test_invalid_selector(":-khtml-drag"); +test_invalid_selector(":-webkit-animating-full-screen-transition"); // Pseudo-elements test_invalid_selector("::-apple-attachment-controls-container"); diff --git a/tests/wpt/tests/css/selectors/parsing/parse-part.html b/tests/wpt/tests/css/selectors/parsing/parse-part.html index f0bec6fbc9b..2fbec3670ce 100644 --- a/tests/wpt/tests/css/selectors/parsing/parse-part.html +++ b/tests/wpt/tests/css/selectors/parsing/parse-part.html @@ -31,4 +31,9 @@ test_invalid_selector(":part('foo')"); test_invalid_selector(":part([foo])"); test_invalid_selector('::part(foo) + ::part(bar)'); + test_invalid_selector("::part(foo):is(ul)"); + test_invalid_selector("::part(foo):is(nav ul)"); + test_invalid_selector("::part(foo):where(ul)"); + test_invalid_selector("::part(foo):where(nav ul)"); + test_invalid_selector("::part(foo):has(li)"); </script> diff --git a/tests/wpt/tests/css/support/color-testcommon.js b/tests/wpt/tests/css/support/color-testcommon.js index 44ca0bbb33c..18ab4420f67 100644 --- a/tests/wpt/tests/css/support/color-testcommon.js +++ b/tests/wpt/tests/css/support/color-testcommon.js @@ -79,3 +79,50 @@ function fuzzy_test_valid_color(specified, parsed, epsilon) { test_valid_value("color", specified, parsed, {comparisonFunction: set_up_fuzzy_color_test(epsilon)}); } + +/** + * Fuzzy color matcher for oklab color with optional transparency. + * @param {string} actual Observed color + * @param {string} expected What the color should be + * @param {string} message Error message to facilitate diagnostics + */ +function assert_oklab_color(actual, expected, message) { + const paramMatch = '(\\-?\\d*\\.?\\d*)'; + const optAlphaMatch = '( \\/ (\\d*\\.?\\d*))?'; + const pattern = + `oklab\\(${paramMatch} ${paramMatch} ${paramMatch}${optAlphaMatch}\\)`; + const oklabRegex = new RegExp(pattern); + let matches = + expected.match(oklabRegex); + assert_true(!!matches, + `Expected value ${expected} not recognized as an oklab color`); + + const p0 = parseFloat(matches[1]); + const p1 = parseFloat(matches[2]); + const p2 = parseFloat(matches[3]); + const alpha = + (matches[5] !== undefined) ? parseFloat(matches[5]) : undefined; + + matches = + actual.match(oklabRegex); + assert_true(!!matches, + `Actual value ${actual} not recognized as an oklab color`); + + const tolerance = 0.01; + let colorMatch = + Math.abs(parseFloat(matches[1]) - p0) <= tolerance && + Math.abs(parseFloat(matches[2]) - p1) <= tolerance && + Math.abs(parseFloat(matches[3]) - p2) <= tolerance; + if (colorMatch) { + if (alpha !== undefined) { + colorMatch = + matches[5] != undefined && + Math.abs(parseFloat(matches[5]) - alpha) <= tolerance; + } else { + colorMatch = matches[5] == undefined; + } + } + assert_true( + colorMatch, + `expected: ${expected} actual ${actual} -- ${message}`); +} diff --git a/tests/wpt/tests/docs/requirements.txt b/tests/wpt/tests/docs/requirements.txt index d8fb98888fd..7affe5ec629 100644 --- a/tests/wpt/tests/docs/requirements.txt +++ b/tests/wpt/tests/docs/requirements.txt @@ -2,5 +2,5 @@ recommonmark==0.7.1 sphinx-argparse==0.4.0 sphinx-autobuild==2021.3.14 sphinx-js==3.2.2 -sphinx==4.4.0 +sphinx==7.2.6 markupsafe==2.0.1 diff --git a/tests/wpt/tests/docs/writing-tests/testharness-api.md b/tests/wpt/tests/docs/writing-tests/testharness-api.md index 56dc4a4417a..19b96b550b2 100644 --- a/tests/wpt/tests/docs/writing-tests/testharness-api.md +++ b/tests/wpt/tests/docs/writing-tests/testharness-api.md @@ -823,6 +823,29 @@ eventWatcher.wait_for('animationstart').then(t.step_func(function() { })); ``` +### Loading test data from JSON files ### + +```eval_rst +.. js:autofunction:: fetch_json +``` + +Loading test data from a JSON file would normally be accomplished by +something like this: + +```js +promise_test(() => fetch('resources/my_data.json').then((res) => res.json()).then(runTests)); +function runTests(myData) { + /// ... +} +``` + +However, `fetch()` is not exposed inside ShadowRealm scopes, so if the +test is to be run inside a ShadowRealm, use `fetch_json()` instead: + +```js +promise_test(() => fetch_json('resources/my_data.json').then(runTests)); +``` + ### Utility Functions ### ```eval_rst diff --git a/tests/wpt/tests/docs/writing-tests/testharness.md b/tests/wpt/tests/docs/writing-tests/testharness.md index e88d5741ca6..e426e37f22b 100644 --- a/tests/wpt/tests/docs/writing-tests/testharness.md +++ b/tests/wpt/tests/docs/writing-tests/testharness.md @@ -171,11 +171,12 @@ are: [ShadowRealm](https://github.com/tc39/proposal-shadowrealm) context hosted in an ordinary Window context; to be run at <code><var>x</var>.any.shadowrealm.html</code> -To check if your test is run from a window or worker you can use the following two methods that will +To check what scope your test is run from, you can use the following methods that will be made available by the framework: self.GLOBAL.isWindow() self.GLOBAL.isWorker() + self.GLOBAL.isShadowRealm() Although [the global `done()` function must be explicitly invoked for most dedicated worker tests and shared worker @@ -203,6 +204,9 @@ In window environments, the script will be included using a classic `<script>` t worker environments, the script will be imported using `importScripts()`. In module worker environments, the script will be imported using a static `import`. +wptserve generates markup with `/resources/testharness.js` and `/resources/testharnessreport.js` +included automatically, so there's no need to include those scripts from the `.js` test file. + ### Specifying a timeout of long Use `// META: timeout=long` at the beginning of the resource. diff --git a/tests/wpt/tests/dom/events/scrolling/scrollend-fires-to-text-input.html b/tests/wpt/tests/dom/events/scrolling/scrollend-fires-to-text-input.html new file mode 100644 index 00000000000..edc75d91217 --- /dev/null +++ b/tests/wpt/tests/dom/events/scrolling/scrollend-fires-to-text-input.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + <body> + <style> + #inputscroller { + width: 100px; + height: 50px; + } + </style> + <input type="text" id="inputscroller" + value="qwertyuiopasddfghjklzxcvbnmqwertyuiopasddfghjklzxcvbnmqwer"> + <script> + promise_test(async() => { + const inputscroller = document.getElementById("inputscroller"); + assert_equals(inputscroller.scrollLeft, 0, + "text input field is not initially scrolled."); + + const scrollend_promise = new Promise((resolve) => { + inputscroller.addEventListener("scrollend", resolve); + }); + inputscroller.scrollLeft = 10; + await scrollend_promise; + assert_equals(inputscroller.scrollLeft, 10, + "text input field is scrolled by the correct amount"); + }, "scrolled input field should receive scrollend."); + </script> + </body> +</html> diff --git a/tests/wpt/tests/dom/observable/tentative/observable-toArray.any.js b/tests/wpt/tests/dom/observable/tentative/observable-toArray.any.js new file mode 100644 index 00000000000..9e6e3abee56 --- /dev/null +++ b/tests/wpt/tests/dom/observable/tentative/observable-toArray.any.js @@ -0,0 +1,174 @@ +// Because we test that the global error handler is called at various times. +setup({allow_uncaught_exception: true}); + +promise_test(async () => { + const observable = new Observable(subscriber => { + subscriber.next(1); + subscriber.next(2); + subscriber.next(3); + subscriber.complete(); + }); + + const array = await observable.toArray(); + assert_array_equals(array, [1, 2, 3]); +}, "toArray(): basic next/complete"); + +promise_test(async t => { + let errorReported = null; + let innerSubscriber = null; + self.addEventListener('error', e => errorReported = e, {once: true}); + + const error = new Error("custom error"); + const observable = new Observable(subscriber => { + innerSubscriber = subscriber; + subscriber.error(error); + }); + + try { + const array = await observable.toArray(); + assert_unreached("toArray() promise must not resolve"); + } catch (e) { + assert_equals(e, error); + assert_equals(errorReported, null); + + // Calls to `error()` after the subscription is closed still report the + // exception. + innerSubscriber.error(error); + assert_not_equals(errorReported, null, "Exception was reported to global"); + assert_true(errorReported.message.includes("custom error"), "Error message matches"); + assert_greater_than(errorReported.lineno, 0, "Error lineno is greater than 0"); + assert_greater_than(errorReported.colno, 0, "Error lineno is greater than 0"); + assert_equals(errorReported.error, error, "Error object is equivalent"); + } +}, "toArray(): first error() rejects promise; subsequent error()s report the exceptions"); + +promise_test(async t => { + let errorReported = null; + let innerSubscriber = null; + self.addEventListener('error', e => errorReported = e, {once: true}); + + const error = new Error("custom error"); + const observable = new Observable(subscriber => { + innerSubscriber = subscriber; + subscriber.complete(); + }); + + const array = await observable.toArray(); + assert_array_equals(array, []); + assert_equals(errorReported, null); + + // Calls to `error()` after the subscription is closed still report the + // exception. + innerSubscriber.error(error); + assert_not_equals(errorReported, null, "Exception was reported to global"); + assert_true(errorReported.message.includes("custom error"), "Error message matches"); + assert_greater_than(errorReported.lineno, 0, "Error lineno is greater than 0"); + assert_greater_than(errorReported.colno, 0, "Error lineno is greater than 0"); + assert_equals(errorReported.error, error, "Error object is equivalent"); +}, "toArray(): complete() resolves promise; subsequent error()s report the exceptions"); + +promise_test(async () => { + // This tracks whether `postSubscriptionPromise` has had its then handler run. + // This helps us keep track of the timing/ordering of everything. Calling a + // Promise-returning operator with an aborted signal must *immediately* reject + // the returned Promise, which means code "awaiting" it should run before any + // subsequent Promise resolution/rejection handlers are run. + let postSubscriptionPromiseResolved = false; + let subscriptionImmediatelyInactive = false; + + const observable = new Observable(subscriber => { + const inactive = !subscriber.active; + subscriptionImmediatelyInactive = inactive; + }); + + const rejectedPromise = observable.toArray({signal: AbortSignal.abort()}) + .then(() => { + assert_unreached("Operator promise must not resolve its abort signal is " + + "rejected"); + }, () => { + // See the documentation above. The rejection handler (i.e., this code) for + // immediately-aborted operator Promises runs before any later-scheduled + // Promise resolution/rejections. + assert_false(postSubscriptionPromiseResolved, + "Operator promise rejects before later promise"); + }); + const postSubscriptionPromise = + Promise.resolve().then(() => postSubscriptionPromiseResolved = true); + + await rejectedPromise; +}, "toArray(): Subscribing with an aborted signal returns an immediately " + + "rejected promise"); + +promise_test(async () => { + let postSubscriptionPromiseResolved = false; + + const observable = new Observable(subscriber => {}); + const controller = new AbortController(); + const arrayPromise = observable.toArray({signal: controller.signal}) + .then(() => { + assert_unreached("Operator promise must not resolve if its abort signal " + + "is rejected"); + }, () => { + assert_false(postSubscriptionPromiseResolved, + "controller.abort() synchronously rejects the operator " + + "Promise"); + }); + + // This must synchronously reject `arrayPromise`, scheduling in the next + // microtask. + controller.abort(); + Promise.resolve().then(value => postSubscriptionPromiseResolved = true); + + await arrayPromise; +}, "toArray(): Aborting the passed-in signal rejects the returned promise"); + +// See https://github.com/WICG/observable/issues/96 for discussion about this. +promise_test(async () => { + const results = []; + + const observable = new Observable(subscriber => { + results.push(`Subscribed. active: ${subscriber.active}`); + + subscriber.signal.addEventListener('abort', e => { + results.push("Inner signal abort event"); + Promise.resolve("Inner signal Promise").then(value => results.push(value)); + }); + + subscriber.addTeardown(() => { + results.push("Teardown"); + Promise.resolve("Teardown Promise").then(value => results.push(value)); + }); + }); + + const controller = new AbortController(); + controller.signal.addEventListener('abort', e => { + results.push("Outer signal abort event"); + Promise.resolve("Outer signal Promise").then(value => results.push(value)); + }); + + // Subscribe. + observable.toArray({signal: controller.signal}); + controller.abort(); + + assert_array_equals(results, [ + "Subscribed. active: true", + "Outer signal abort event", + "Teardown", + "Inner signal abort event", + ], "Events and teardowns are fired in the right ordered"); + + // Everything microtask above should be queued up by now, so queue one more + // final microtask that will run after all of the others, wait for it, and the + // check `results` is right. + await Promise.resolve(); + assert_array_equals(results, [ + "Subscribed. active: true", + "Outer signal abort event", + "Teardown", + "Inner signal abort event", + "Outer signal Promise", + "Teardown Promise", + "Inner signal Promise", + ], "Promises resolve in the right order"); +}, "Operator Promise abort ordering"); + diff --git a/tests/wpt/tests/editing/crashtests/delete-in-block-in-progress.html b/tests/wpt/tests/editing/crashtests/delete-in-block-in-progress.html new file mode 100644 index 00000000000..233b834ab03 --- /dev/null +++ b/tests/wpt/tests/editing/crashtests/delete-in-block-in-progress.html @@ -0,0 +1,25 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<script> +document.addEventListener("DOMContentLoaded", () => { + document.querySelector("mo").appendChild(document.querySelector("dialog")); + getSelection().collapse(document.querySelector("template"), 0); + document.execCommand("delete"); +}, {once:true}); +</script> +<body> +<dialog> +<template> +</template> +</dialog> +<dl contenteditable> +<li> +<b><progress> +<mo>a</mo> +</progress></b> +</li> +</dl> +</body> +</html> diff --git a/tests/wpt/tests/editing/crashtests/designMode-on-of-lazy-loading-iframe.html b/tests/wpt/tests/editing/crashtests/designMode-on-of-lazy-loading-iframe.html new file mode 100644 index 00000000000..90a6c85c45c --- /dev/null +++ b/tests/wpt/tests/editing/crashtests/designMode-on-of-lazy-loading-iframe.html @@ -0,0 +1,20 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<style> +*::first-letter {} +</style> +<script> +addEventListener("load", () => { + const iframe = document.querySelector("iframe"); + iframe.contentWindow.focus(); + document.styleSheets[0].deleteRule(0); + iframe.contentWindow.document.designMode = "on"; +}); +</script> +</head> +<body> +<iframe loading="lazy"> +</body> +</html> diff --git a/tests/wpt/tests/fenced-frame/resize-lock-input.https.html b/tests/wpt/tests/fenced-frame/resize-lock-input.https.html index 9cee650f1a8..c72075ac250 100644 --- a/tests/wpt/tests/fenced-frame/resize-lock-input.https.html +++ b/tests/wpt/tests/fenced-frame/resize-lock-input.https.html @@ -6,50 +6,54 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="resources/utils.js"></script> + <script src="/common/dispatcher/dispatcher.js"></script> <script src="/common/utils.js"></script> <body> <script> promise_test(async t => { - const resize_lock_inner_page_is_ready_key = token(); - const resize_lock_resize_is_done_key = token(); - const resize_lock_frame_requested_after_resize_key = token(); - const resize_lock_report_click_location_key = token(); - const resize_lock_report_click_location_key_after_resize = token(); - const resize_lock_report_click_location_key_after_resize_2 = token(); + const fencedframe = attachFencedFrameContext(); - const frame = attachFencedFrame(generateURL( - "resources/resize-lock-inner-input.html", - [resize_lock_inner_page_is_ready_key, - resize_lock_resize_is_done_key, - resize_lock_frame_requested_after_resize_key, - resize_lock_report_click_location_key, - resize_lock_report_click_location_key_after_resize, - resize_lock_report_click_location_key_after_resize_2])); + // Set up the inner frame to receive mouse events. + await fencedframe.execute(() => { + window.testing_touchpoint = 'pending' + window.addEventListener('mousedown', async (event) => { + window.testing_touchpoint = event.clientX + "," + event.clientY; + }); + }); - await nextValueFromServer(resize_lock_inner_page_is_ready_key); + let getCoordinates = async () => { + return fencedframe.execute(() => { + let point = window.testing_touchpoint; + window.testing_touchpoint = 'pending'; + return point; + }); + } // Send an event to the origin of the frame. - await new test_driver.Actions() - .setContext(window) - .addPointer("finger1", "touch") - .pointerMove(10, 10, {origin: "viewport", sourceName: "finger1"}) - .pointerDown({sourceName: "finger1"}) - .pointerUp({sourceName: "finger1"}) - .send(); + for (let i = 0; i < 3; i++) { + await new test_driver.Actions() + .setContext(window) + .addPointer("finger1", "touch") + .pointerMove(10, 10, {origin: "viewport", sourceName: "finger1"}) + .pointerDown({sourceName: "finger1"}) + .pointerUp({sourceName: "finger1"}) + .send(); + } - let result = - await nextValueFromServer(resize_lock_report_click_location_key); + let result = await getCoordinates(); assert_equals(result, "0,0", "fenced frame event before resize 1"); // The frame should be frozen at 300x150. Resize to create a 2x scale // and a horizontal offset of 50px. frame.width = "700"; frame.height = "300"; - writeValueToServer(resize_lock_resize_is_done_key, - "outer_page_attempted_resize"); - await nextValueFromServer(resize_lock_frame_requested_after_resize_key); + + // Let the inner frame animate in order for the resize to take effect. + await fencedframe.execute(async () => { + await new Promise(resolve => requestAnimationFrame(resolve)); + }); // The hit-test data is replicated in the browser and updated // asynchronously. Wait to ensure the update has finished. @@ -62,38 +66,44 @@ assert_equals(result, "10,10", "main frame event after resize"); }); }); - await new test_driver.Actions() - .setContext(window) - .addPointer("finger1", "touch") - .pointerMove(10, 10, {origin: "viewport", sourceName: "finger1"}) - .pointerDown({sourceName: "finger1"}) - .pointerUp({sourceName: "finger1"}) - .send(); + for (let i = 0; i < 3; i++) { + await new test_driver.Actions() + .setContext(window) + .addPointer("finger1", "touch") + .pointerMove(10, 10, {origin: "viewport", sourceName: "finger1"}) + .pointerDown({sourceName: "finger1"}) + .pointerUp({sourceName: "finger1"}) + .send(); + } await promise; // Send an event to where the origin of the scaled frame should // render. - await new test_driver.Actions() - .setContext(window) - .addPointer("finger1", "touch") - .pointerMove(60, 10, {origin: "viewport", sourceName: "finger1"}) - .pointerDown({sourceName: "finger1"}) - .pointerUp({sourceName: "finger1"}) - .send(); - result = await nextValueFromServer(resize_lock_report_click_location_key_after_resize); - assert_equals(result, "0,0", "fenced frame event before resize 2"); + for (let i = 0; i < 3; i++) { + await new test_driver.Actions() + .setContext(window) + .addPointer("finger1", "touch") + .pointerMove(60, 10, {origin: "viewport", sourceName: "finger1"}) + .pointerDown({sourceName: "finger1"}) + .pointerUp({sourceName: "finger1"}) + .send(); + } + result = await getCoordinates(); + assert_equals(result, "0,0", "fenced frame event after resize 1"); // Send an event where the bottom left of the scaled frame should // render. - await new test_driver.Actions() - .setContext(window) - .addPointer("finger1", "touch") - .pointerMove(660, 310, {origin: "viewport", sourceName: "finger1"}) - .pointerDown({sourceName: "finger1"}) - .pointerUp({sourceName: "finger1"}) - .send(); - result = await nextValueFromServer(resize_lock_report_click_location_key_after_resize_2); - assert_equals(result, "300,150", "fenced frame event before resize 3"); + for (let i = 0; i < 3; i++) { + await new test_driver.Actions() + .setContext(window) + .addPointer("finger1", "touch") + .pointerMove(660, 310, {origin: "viewport", sourceName: "finger1"}) + .pointerDown({sourceName: "finger1"}) + .pointerUp({sourceName: "finger1"}) + .send(); + } + result = await getCoordinates(); + assert_equals(result, "300,150", "fenced frame event after resize 2"); }, 1000); }, "Test Resize Lock"); </script> diff --git a/tests/wpt/tests/fenced-frame/resources/resize-lock-inner-input.html b/tests/wpt/tests/fenced-frame/resources/resize-lock-inner-input.html deleted file mode 100644 index 5513f89d393..00000000000 --- a/tests/wpt/tests/fenced-frame/resources/resize-lock-inner-input.html +++ /dev/null @@ -1,46 +0,0 @@ -<!DOCTYPE html> - <script src="utils.js"></script> - <title>Fenced frame content to report any changes in inner dimensions</title> - - <style> - body { - width: 500px; - height: 500px; - background: grey; - } - </style> - <body> - <script> - let eventCount = 0; - async function init() { - const [resize_lock_inner_page_is_ready_key, - resize_lock_resize_is_done_key, - resize_lock_frame_requested_after_resize_key, - resize_lock_report_click_location_key, - resize_lock_report_click_location_key_after_resize, - resize_lock_report_click_location_key_after_resize_2] = parseKeylist(); - - window.addEventListener('mousedown', async (event) => { - eventCount++; - let point = event.clientX + "," + event.clientY; - if (eventCount == 1) { - writeValueToServer(resize_lock_report_click_location_key, point); - await nextValueFromServer(resize_lock_resize_is_done_key) - await new Promise(resolve => requestAnimationFrame(resolve)); - writeValueToServer(resize_lock_frame_requested_after_resize_key, "ready"); - } else if (eventCount == 2) { - writeValueToServer( - resize_lock_report_click_location_key_after_resize, point); - } else { - writeValueToServer( - resize_lock_report_click_location_key_after_resize_2, point); - } - }); - - writeValueToServer(resize_lock_inner_page_is_ready_key, "ready"); - } - - init(); - </script> - </body> -</html> diff --git a/tests/wpt/tests/fenced-frame/resources/resize-lock-inner-input.html.headers b/tests/wpt/tests/fenced-frame/resources/resize-lock-inner-input.html.headers deleted file mode 100644 index 1b63235b7cd..00000000000 --- a/tests/wpt/tests/fenced-frame/resources/resize-lock-inner-input.html.headers +++ /dev/null @@ -1 +0,0 @@ -Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/tests/fetch/api/basic/keepalive.any.js b/tests/wpt/tests/fetch/api/basic/keepalive.any.js index 899d41d676a..d6ec1f67920 100644 --- a/tests/wpt/tests/fetch/api/basic/keepalive.any.js +++ b/tests/wpt/tests/fetch/api/basic/keepalive.any.js @@ -1,7 +1,6 @@ // META: global=window +// META: timeout=long // META: title=Fetch API: keepalive handling -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/common/get-host-info.sub.js // META: script=../resources/keepalive-helper.js diff --git a/tests/wpt/tests/fetch/api/cors/cors-keepalive.any.js b/tests/wpt/tests/fetch/api/cors/cors-keepalive.any.js index 08229f9cfc7..f54bf4f9b60 100644 --- a/tests/wpt/tests/fetch/api/cors/cors-keepalive.any.js +++ b/tests/wpt/tests/fetch/api/cors/cors-keepalive.any.js @@ -1,8 +1,6 @@ // META: global=window // META: timeout=long // META: title=Fetch API: keepalive handling -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/common/get-host-info.sub.js // META: script=../resources/keepalive-helper.js diff --git a/tests/wpt/tests/fetch/api/redirect/redirect-keepalive.any.js b/tests/wpt/tests/fetch/api/redirect/redirect-keepalive.any.js index beda8bb8e78..c9ac13f3dbb 100644 --- a/tests/wpt/tests/fetch/api/redirect/redirect-keepalive.any.js +++ b/tests/wpt/tests/fetch/api/redirect/redirect-keepalive.any.js @@ -1,7 +1,6 @@ // META: global=window +// META: timeout=long // META: title=Fetch API: keepalive handling -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/common/get-host-info.sub.js // META: script=../resources/keepalive-helper.js diff --git a/tests/wpt/tests/fetch/api/redirect/redirect-keepalive.https.any.js b/tests/wpt/tests/fetch/api/redirect/redirect-keepalive.https.any.js index 6765ecac6d7..54e4bc31fa1 100644 --- a/tests/wpt/tests/fetch/api/redirect/redirect-keepalive.https.any.js +++ b/tests/wpt/tests/fetch/api/redirect/redirect-keepalive.https.any.js @@ -1,7 +1,5 @@ // META: global=window // META: title=Fetch API: keepalive handling -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/common/get-host-info.sub.js // META: script=../resources/keepalive-helper.js diff --git a/tests/wpt/tests/fetch/fetch-later/activate-after.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/activate-after.tentative.https.window.js index 08750dd3fe4..18b368066b2 100644 --- a/tests/wpt/tests/fetch/fetch-later/activate-after.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/activate-after.tentative.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/dispatcher/dispatcher.js // META: script=/common/get-host-info.sub.js // META: script=/common/utils.js diff --git a/tests/wpt/tests/fetch/fetch-later/basic.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/basic.tentative.https.window.js index bf92716681e..37f72ab89e5 100644 --- a/tests/wpt/tests/fetch/fetch-later/basic.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/basic.tentative.https.window.js @@ -1,6 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js - 'use strict'; test(() => { diff --git a/tests/wpt/tests/fetch/fetch-later/iframe.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/iframe.tentative.https.window.js index 62505bc81d9..1e9fed11175 100644 --- a/tests/wpt/tests/fetch/fetch-later/iframe.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/iframe.tentative.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/common/get-host-info.sub.js // META: script=/pending-beacon/resources/pending_beacon-helper.js diff --git a/tests/wpt/tests/fetch/fetch-later/new-window.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/new-window.tentative.https.window.js index 37b38d7f1dc..93705418f21 100644 --- a/tests/wpt/tests/fetch/fetch-later/new-window.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/new-window.tentative.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/common/get-host-info.sub.js // META: script=/pending-beacon/resources/pending_beacon-helper.js diff --git a/tests/wpt/tests/fetch/fetch-later/non-secure.window.js b/tests/wpt/tests/fetch/fetch-later/non-secure.window.js index 2f2c3ea8d34..c13932e353c 100644 --- a/tests/wpt/tests/fetch/fetch-later/non-secure.window.js +++ b/tests/wpt/tests/fetch/fetch-later/non-secure.window.js @@ -1,6 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js - 'use strict'; test(() => { diff --git a/tests/wpt/tests/fetch/fetch-later/policies/csp-allowed.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/policies/csp-allowed.tentative.https.window.js index 5aa759c2346..60730e0242b 100644 --- a/tests/wpt/tests/fetch/fetch-later/policies/csp-allowed.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/policies/csp-allowed.tentative.https.window.js @@ -1,6 +1,4 @@ // META: title=FetchLater: allowed by CSP -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/common/get-host-info.sub.js // META: script=/pending-beacon/resources/pending_beacon-helper.js diff --git a/tests/wpt/tests/fetch/fetch-later/policies/csp-blocked.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/policies/csp-blocked.tentative.https.window.js index 88490950d3a..b32ddaecfcb 100644 --- a/tests/wpt/tests/fetch/fetch-later/policies/csp-blocked.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/policies/csp-blocked.tentative.https.window.js @@ -1,6 +1,4 @@ // META: title=FetchLater: blocked by CSP -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/common/get-host-info.sub.js // META: script=/pending-beacon/resources/pending_beacon-helper.js diff --git a/tests/wpt/tests/fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.js index db6b4234b97..3c18727156f 100644 --- a/tests/wpt/tests/fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/policies/csp-redirect-to-blocked.tentative.https.window.js @@ -1,6 +1,4 @@ // META: title=FetchLater: redirect blocked by CSP -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/common/get-host-info.sub.js // META: script=/pending-beacon/resources/pending_beacon-helper.js diff --git a/tests/wpt/tests/fetch/fetch-later/quota.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/quota.tentative.https.window.js index 4fc5979374c..1b5b85563d5 100644 --- a/tests/wpt/tests/fetch/fetch-later/quota.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/quota.tentative.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/get-host-info.sub.js // META: script=/common/utils.js // META: script=/pending-beacon/resources/pending_beacon-helper.js diff --git a/tests/wpt/tests/fetch/fetch-later/send-on-deactivate.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/send-on-deactivate.tentative.https.window.js index 94877e8321a..d91c73580a3 100644 --- a/tests/wpt/tests/fetch/fetch-later/send-on-deactivate.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/send-on-deactivate.tentative.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/dispatcher/dispatcher.js // META: script=/common/get-host-info.sub.js // META: script=/common/utils.js diff --git a/tests/wpt/tests/fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.js index c49e0bde87b..ff8d9520e0e 100644 --- a/tests/wpt/tests/fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/send-on-discard/not-send-after-abort.tentative.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/pending-beacon/resources/pending_beacon-helper.js diff --git a/tests/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.js index 03078b2b516..11e85b31a79 100644 --- a/tests/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple-with-activate-after.tentative.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/pending-beacon/resources/pending_beacon-helper.js // META: timeout=long diff --git a/tests/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.js b/tests/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.js index 25ce98d446e..df34ec9ac06 100644 --- a/tests/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.js +++ b/tests/wpt/tests/fetch/fetch-later/send-on-discard/send-multiple.tentative.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=/pending-beacon/resources/pending_beacon-helper.js // META: timeout=long diff --git a/tests/wpt/tests/fetch/private-network-access/location.tentative.https.window.js b/tests/wpt/tests/fetch/private-network-access/location.tentative.https.window.js deleted file mode 100644 index 2d839e060d4..00000000000 --- a/tests/wpt/tests/fetch/private-network-access/location.tentative.https.window.js +++ /dev/null @@ -1,191 +0,0 @@ -// META: script=/common/subset-tests-by-key.js -// META: script=/common/dispatcher/dispatcher.js -// META: script=/common/utils.js -// META: script=resources/support.sub.js -// META: timeout=long -// META: variant=?include=from-local -// META: variant=?include=from-private -// META: variant=?include=from-public -// META: variant=?include=from-treat-as-public -// -// These tests verify that secure contexts can navigate to less-public address -// spaces via updating window.location iff the target server responds -// affirmatively to preflight requests. - -setup(() => { - assert_true(window.isSecureContext); -}); - -// Source: secure local context. -// -// All fetches unaffected by Private Network Access. - -subsetTestByKey("from-local", promise_test_parallel, t => locationTest(t, { - source: { server: Server.HTTPS_LOCAL }, - target: { server: Server.HTTPS_LOCAL }, - expected: NavigationTestResult.SUCCESS, -}), "local to local: no preflight required."); - -subsetTestByKey("from-local", promise_test_parallel, t => locationTest(t, { - source: { server: Server.HTTPS_LOCAL }, - target: { server: Server.HTTPS_PRIVATE }, - expected: NavigationTestResult.SUCCESS, -}), "local to private: no preflight required."); - -subsetTestByKey("from-local", promise_test_parallel, t => locationTest(t, { - source: { server: Server.HTTPS_LOCAL }, - target: { server: Server.HTTPS_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "local to public: no preflight required."); - -// Generates tests of preflight behavior for a single (source, target) pair. -// -// Scenarios: -// -// - preflight response has non-2xx HTTP code -// - preflight response is missing CORS headers -// - preflight response is missing the PNA-specific `Access-Control` header -// - success -// -function makePreflightTests({ - key, - sourceName, - sourceServer, - sourceTreatAsPublic, - targetName, - targetServer, -}) { - const prefix = - `${sourceName} to ${targetName}: `; - - const source = { - server: sourceServer, - treatAsPublic: sourceTreatAsPublic, - }; - - promise_test_parallel(t => locationTest(t, { - source, - target: { - server: targetServer, - behavior: { preflight: PreflightBehavior.failure() }, - }, - expected: NavigationTestResult.FAILURE, - }), prefix + "failed preflight."); - - promise_test_parallel(t => locationTest(t, { - source, - target: { - server: targetServer, - behavior: { preflight: PreflightBehavior.noCorsHeader(token()) }, - }, - expected: NavigationTestResult.FAILURE, - }), prefix + "missing CORS headers."); - - promise_test_parallel(t => locationTest(t, { - source, - target: { - server: targetServer, - behavior: { preflight: PreflightBehavior.noPnaHeader(token()) }, - }, - expected: NavigationTestResult.FAILURE, - }), prefix + "missing PNA header."); - - promise_test_parallel(t => locationTest(t, { - source, - target: { - server: targetServer, - behavior: { preflight: PreflightBehavior.navigation(token()) }, - }, - expected: NavigationTestResult.SUCCESS, - }), prefix + "success."); -} - -// Source: private secure context. -// -// Navigating to the local address space require a successful preflight response -// carrying a PNA-specific header. - -subsetTestByKey('from-private', makePreflightTests, { - sourceServer: Server.HTTPS_PRIVATE, - sourceName: 'private', - targetServer: Server.HTTPS_LOCAL, - targetName: 'local', -}); - -subsetTestByKey("from-private", promise_test_parallel, t => locationTest(t, { - source: { server: Server.HTTPS_PRIVATE }, - target: { server: Server.HTTPS_PRIVATE }, - expected: NavigationTestResult.SUCCESS, -}), "private to private: no preflight required."); - -subsetTestByKey("from-private", promise_test_parallel, t => locationTest(t, { - source: { server: Server.HTTPS_PRIVATE }, - target: { server: Server.HTTPS_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "private to public: no preflight required."); - -// Source: public secure context. -// -// Navigating to the local and private address spaces require a successful -// preflight response carrying a PNA-specific header. - -subsetTestByKey('from-public', makePreflightTests, { - sourceServer: Server.HTTPS_PUBLIC, - sourceName: "public", - targetServer: Server.HTTPS_LOCAL, - targetName: "local", -}); - -subsetTestByKey('from-public', makePreflightTests, { - sourceServer: Server.HTTPS_PUBLIC, - sourceName: "public", - targetServer: Server.HTTPS_PRIVATE, - targetName: "private", -}); - -subsetTestByKey("from-public", promise_test_parallel, t => locationTest(t, { - source: { server: Server.HTTPS_PUBLIC }, - target: { server: Server.HTTPS_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "public to public: no preflight required."); - -// The following tests verify that `CSP: treat-as-public-address` makes -// documents behave as if they had been served from a public IP address. - -subsetTestByKey('from-treat-as-public', makePreflightTests, { - sourceServer: Server.HTTPS_LOCAL, - sourceTreatAsPublic: true, - sourceName: "treat-as-public-address", - targetServer: Server.OTHER_HTTPS_LOCAL, - targetName: "local", -}); - -subsetTestByKey("from-treat-as-public", promise_test_parallel, - t => locationTest(t, { - source: { - server: Server.HTTPS_LOCAL, - treatAsPublic: true, - }, - target: {server: Server.HTTPS_LOCAL}, - expected: NavigationTestResult.SUCCESS, - }), - 'treat-as-public-address to local (same-origin): no preflight required.'); - -subsetTestByKey('from-treat-as-public', makePreflightTests, { - sourceServer: Server.HTTPS_LOCAL, - sourceTreatAsPublic: true, - sourceName: 'treat-as-public-address', - targetServer: Server.HTTPS_PRIVATE, - targetName: 'private', -}); - -subsetTestByKey("from-treat-as-public", promise_test_parallel, - t => locationTest(t, { - source: { - server: Server.HTTPS_LOCAL, - treatAsPublic: true, - }, - target: {server: Server.HTTPS_PUBLIC}, - expected: NavigationTestResult.SUCCESS, - }), - 'treat-as-public-address to public: no preflight required.'); diff --git a/tests/wpt/tests/fetch/private-network-access/location.tentative.window.js b/tests/wpt/tests/fetch/private-network-access/location.tentative.window.js deleted file mode 100644 index 180c2a4658e..00000000000 --- a/tests/wpt/tests/fetch/private-network-access/location.tentative.window.js +++ /dev/null @@ -1,95 +0,0 @@ -// META: script=/common/dispatcher/dispatcher.js -// META: script=/common/utils.js -// META: script=resources/support.sub.js -// META: timeout=long -// -// Spec: https://wicg.github.io/private-network-access/ -// -// These tests verify that non-secure contexts cannot navigate to less-public -// address spaces via window.location. - -setup(() => { - // Making sure we are in a non secure context, as expected. - assert_false(window.isSecureContext); -}); - -promise_test_parallel(t => locationTest(t, { - source: { server: Server.HTTP_LOCAL }, - target: { server: Server.HTTP_LOCAL }, - expected: NavigationTestResult.SUCCESS, -}), "local to local: no preflight required."); - -promise_test_parallel(t => locationTest(t, { - source: { server: Server.HTTP_LOCAL }, - target: { server: Server.HTTP_PRIVATE }, - expected: NavigationTestResult.SUCCESS, -}), "local to private: no preflight required."); - -promise_test_parallel(t => locationTest(t, { - source: { server: Server.HTTP_LOCAL }, - target: { server: Server.HTTP_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "local to public: no preflight required."); - -promise_test_parallel(t => locationTest(t, { - source: { server: Server.HTTP_PRIVATE }, - target: { server: Server.HTTP_LOCAL }, - expected: NavigationTestResult.FAILURE, -}), "private to local: failure."); - -promise_test_parallel(t => locationTest(t, { - source: { server: Server.HTTP_PRIVATE }, - target: { server: Server.HTTP_PRIVATE }, - expected: NavigationTestResult.SUCCESS, -}), "private to private: no preflight required."); - -promise_test_parallel(t => locationTest(t, { - source: { server: Server.HTTP_PRIVATE }, - target: { server: Server.HTTP_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "private to public: no preflight required."); - -promise_test_parallel(t => locationTest(t, { - source: { server: Server.HTTP_PUBLIC }, - target: { server: Server.HTTP_LOCAL }, - expected: NavigationTestResult.FAILURE, -}), "public to local: failure."); - -promise_test_parallel(t => locationTest(t, { - source: { server: Server.HTTP_PUBLIC }, - target: { server: Server.HTTP_PRIVATE }, - expected: NavigationTestResult.FAILURE, -}), "public to private: failure."); - -promise_test_parallel(t => locationTest(t, { - source: { server: Server.HTTP_PUBLIC }, - target: { server: Server.HTTP_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "public to public: no preflight required."); - -promise_test_parallel(t => locationTest(t, { - source: { - server: Server.HTTP_LOCAL, - treatAsPublic: true, - }, - target: { server: Server.HTTP_LOCAL }, - expected: NavigationTestResult.FAILURE, -}), "treat-as-public-address to local: failure."); - -promise_test_parallel(t => locationTest(t, { - source: { - server: Server.HTTP_LOCAL, - treatAsPublic: true, - }, - target: { server: Server.HTTP_PRIVATE }, - expected: NavigationTestResult.FAILURE, -}), "treat-as-public-address to private: failure."); - -promise_test_parallel(t => locationTest(t, { - source: { - server: Server.HTTP_LOCAL, - treatAsPublic: true, - }, - target: { server: Server.HTTP_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "treat-as-public-address to public: no preflight required."); diff --git a/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js b/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js index 308e86b08ac..46a9d9e0764 100644 --- a/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js +++ b/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js @@ -663,51 +663,6 @@ const iframeGrandparentTest = ({ assert_equals(result, expected); }, name); -async function locationTest(t, { source, target, expected }) { - const targetUuid = token(); - const targetUrl = preflightUrl(target); - targetUrl.searchParams.set("file", "executor.html"); - targetUrl.searchParams.set("executor-uuid", targetUuid); - - const sourceUrl = resolveUrl( - 'resources/update-location.html', sourceResolveOptions(source)); - sourceUrl.searchParams.set("url", targetUrl.href); - window.open(sourceUrl); - - const targetContext = new RemoteContext(targetUuid); - const result = await Promise.race([ - targetContext.execute_script(() => 'success', []), - new Promise((resolve) => { - t.step_timeout(() => resolve('timeout'), 10000 /* ms */); - }), - ]); - assert_equals(result, expected); -} - -async function topLocationTest(t, { source, target, expected }) { - const targetUuid = token(); - const targetUrl = preflightUrl(target); - targetUrl.searchParams.set("file", "executor.html"); - targetUrl.searchParams.set("executor-uuid", targetUuid); - - const sourceUrl = resolveUrl( - 'resources/update-location.html', sourceResolveOptions(source)); - sourceUrl.searchParams.set("url", targetUrl.href); - - const topUrl = resolveUrl('resources/iframer.html'); - topUrl.searchParams.set("url", sourceUrl); - window.open(topUrl); - - const targetContext = new RemoteContext(targetUuid); - const result = await Promise.race([ - targetContext.execute_script(() => 'success', []), - new Promise((resolve) => { - t.step_timeout(() => resolve('timeout'), 10000 /* ms */); - }), - ]); - assert_equals(result, expected); -} - const WebsocketTestResult = { SUCCESS: "open", diff --git a/tests/wpt/tests/fetch/private-network-access/resources/update-location.html b/tests/wpt/tests/fetch/private-network-access/resources/update-location.html deleted file mode 100644 index a0f2b43856a..00000000000 --- a/tests/wpt/tests/fetch/private-network-access/resources/update-location.html +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Update Location</title> -<body></body> -<script> - const url = new URL(window.location).searchParams.get("url"); - top.location.href = url; -</script> diff --git a/tests/wpt/tests/fetch/private-network-access/top-location.tentative.https.window.js b/tests/wpt/tests/fetch/private-network-access/top-location.tentative.https.window.js deleted file mode 100644 index c22b76385ff..00000000000 --- a/tests/wpt/tests/fetch/private-network-access/top-location.tentative.https.window.js +++ /dev/null @@ -1,191 +0,0 @@ -// META: script=/common/subset-tests-by-key.js -// META: script=/common/dispatcher/dispatcher.js -// META: script=/common/utils.js -// META: script=resources/support.sub.js -// META: timeout=long -// META: variant=?include=from-local -// META: variant=?include=from-private -// META: variant=?include=from-public -// META: variant=?include=from-treat-as-public -// -// These tests verify that iframes in secure contexts can navigate its top -// window to less-public address spaces via updating window.location iff the -// target server responds affirmatively to preflight requests. - -setup(() => { - assert_true(window.isSecureContext); -}); - -// Source: secure local context. -// -// All fetches unaffected by Private Network Access. - -subsetTestByKey("from-local", promise_test_parallel, t => topLocationTest(t, { - source: { server: Server.HTTPS_LOCAL }, - target: { server: Server.HTTPS_LOCAL }, - expected: NavigationTestResult.SUCCESS, -}), "local to local: no preflight required."); - -subsetTestByKey("from-local", promise_test_parallel, t => topLocationTest(t, { - source: { server: Server.HTTPS_LOCAL }, - target: { server: Server.HTTPS_PRIVATE }, - expected: NavigationTestResult.SUCCESS, -}), "local to private: no preflight required."); - -subsetTestByKey("from-local", promise_test_parallel, t => topLocationTest(t, { - source: { server: Server.HTTPS_LOCAL }, - target: { server: Server.HTTPS_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "local to public: no preflight required."); - -// Generates tests of preflight behavior for a single (source, target) pair. -// -// Scenarios: -// -// - preflight response has non-2xx HTTP code -// - preflight response is missing CORS headers -// - preflight response is missing the PNA-specific `Access-Control` header -// - success -// -function makePreflightTests({ - key, - sourceName, - sourceServer, - sourceTreatAsPublic, - targetName, - targetServer, -}) { - const prefix = - `${sourceName} to ${targetName}: `; - - const source = { - server: sourceServer, - treatAsPublic: sourceTreatAsPublic, - }; - - promise_test_parallel(t => topLocationTest(t, { - source, - target: { - server: targetServer, - behavior: { preflight: PreflightBehavior.failure() }, - }, - expected: NavigationTestResult.FAILURE, - }), prefix + "failed preflight."); - - promise_test_parallel(t => topLocationTest(t, { - source, - target: { - server: targetServer, - behavior: { preflight: PreflightBehavior.noCorsHeader(token()) }, - }, - expected: NavigationTestResult.FAILURE, - }), prefix + "missing CORS headers."); - - promise_test_parallel(t => topLocationTest(t, { - source, - target: { - server: targetServer, - behavior: { preflight: PreflightBehavior.noPnaHeader(token()) }, - }, - expected: NavigationTestResult.FAILURE, - }), prefix + "missing PNA header."); - - promise_test_parallel(t => topLocationTest(t, { - source, - target: { - server: targetServer, - behavior: { preflight: PreflightBehavior.navigation(token()) }, - }, - expected: NavigationTestResult.SUCCESS, - }), prefix + "success."); -} - -// Source: private secure context. -// -// Navigating to the local address space require a successful preflight response -// carrying a PNA-specific header. - -subsetTestByKey('from-private', makePreflightTests, { - sourceServer: Server.HTTPS_PRIVATE, - sourceName: 'private', - targetServer: Server.HTTPS_LOCAL, - targetName: 'local', -}); - -subsetTestByKey("from-private", promise_test_parallel, t => topLocationTest(t, { - source: { server: Server.HTTPS_PRIVATE }, - target: { server: Server.HTTPS_PRIVATE }, - expected: NavigationTestResult.SUCCESS, -}), "private to private: no preflight required."); - -subsetTestByKey("from-private", promise_test_parallel, t => topLocationTest(t, { - source: { server: Server.HTTPS_PRIVATE }, - target: { server: Server.HTTPS_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "private to public: no preflight required."); - -// Source: public secure context. -// -// Navigating to the local and private address spaces require a successful -// preflight response carrying a PNA-specific header. - -subsetTestByKey('from-public', makePreflightTests, { - sourceServer: Server.HTTPS_PUBLIC, - sourceName: "public", - targetServer: Server.HTTPS_LOCAL, - targetName: "local", -}); - -subsetTestByKey('from-public', makePreflightTests, { - sourceServer: Server.HTTPS_PUBLIC, - sourceName: "public", - targetServer: Server.HTTPS_PRIVATE, - targetName: "private", -}); - -subsetTestByKey("from-public", promise_test_parallel, t => topLocationTest(t, { - source: { server: Server.HTTPS_PUBLIC }, - target: { server: Server.HTTPS_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "public to public: no preflight required."); - -// The following tests verify that `CSP: treat-as-public-address` makes -// documents behave as if they had been served from a public IP address. - -subsetTestByKey('from-treat-as-public', makePreflightTests, { - sourceServer: Server.HTTPS_LOCAL, - sourceTreatAsPublic: true, - sourceName: "treat-as-public-address", - targetServer: Server.OTHER_HTTPS_LOCAL, - targetName: "local", -}); - -subsetTestByKey("from-treat-as-public", promise_test_parallel, - t => topLocationTest(t, { - source: { - server: Server.HTTPS_LOCAL, - treatAsPublic: true, - }, - target: {server: Server.HTTPS_LOCAL}, - expected: NavigationTestResult.SUCCESS, - }), - 'treat-as-public-address to local (same-origin): no preflight required.'); - -subsetTestByKey('from-treat-as-public', makePreflightTests, { - sourceServer: Server.HTTPS_LOCAL, - sourceTreatAsPublic: true, - sourceName: 'treat-as-public-address', - targetServer: Server.HTTPS_PRIVATE, - targetName: 'private', -}); - -subsetTestByKey("from-treat-as-public", promise_test_parallel, - t => topLocationTest(t, { - source: { - server: Server.HTTPS_LOCAL, - treatAsPublic: true, - }, - target: {server: Server.HTTPS_PUBLIC}, - expected: NavigationTestResult.SUCCESS, - }), - 'treat-as-public-address to public: no preflight required.'); diff --git a/tests/wpt/tests/fetch/private-network-access/top-location.tentative.window.js b/tests/wpt/tests/fetch/private-network-access/top-location.tentative.window.js deleted file mode 100644 index a759852393b..00000000000 --- a/tests/wpt/tests/fetch/private-network-access/top-location.tentative.window.js +++ /dev/null @@ -1,95 +0,0 @@ -// META: script=/common/dispatcher/dispatcher.js -// META: script=/common/utils.js -// META: script=resources/support.sub.js -// META: timeout=long -// -// Spec: https://wicg.github.io/private-network-access/ -// -// These tests verify that iframes in non-secure contexts cannot navigate its -// top window to less-public address spaces via window.location. - -setup(() => { - // Making sure we are in a non secure context, as expected. - assert_false(window.isSecureContext); -}); - -promise_test_parallel(t => topLocationTest(t, { - source: { server: Server.HTTP_LOCAL }, - target: { server: Server.HTTP_LOCAL }, - expected: NavigationTestResult.SUCCESS, -}), "local to local: no preflight required."); - -promise_test_parallel(t => topLocationTest(t, { - source: { server: Server.HTTP_LOCAL }, - target: { server: Server.HTTP_PRIVATE }, - expected: NavigationTestResult.SUCCESS, -}), "local to private: no preflight required."); - -promise_test_parallel(t => topLocationTest(t, { - source: { server: Server.HTTP_LOCAL }, - target: { server: Server.HTTP_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "local to public: no preflight required."); - -promise_test_parallel(t => topLocationTest(t, { - source: { server: Server.HTTP_PRIVATE }, - target: { server: Server.HTTP_LOCAL }, - expected: NavigationTestResult.FAILURE, -}), "private to local: failure."); - -promise_test_parallel(t => topLocationTest(t, { - source: { server: Server.HTTP_PRIVATE }, - target: { server: Server.HTTP_PRIVATE }, - expected: NavigationTestResult.SUCCESS, -}), "private to private: no preflight required."); - -promise_test_parallel(t => topLocationTest(t, { - source: { server: Server.HTTP_PRIVATE }, - target: { server: Server.HTTP_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "private to public: no preflight required."); - -promise_test_parallel(t => topLocationTest(t, { - source: { server: Server.HTTP_PUBLIC }, - target: { server: Server.HTTP_LOCAL }, - expected: NavigationTestResult.FAILURE, -}), "public to local: failure."); - -promise_test_parallel(t => topLocationTest(t, { - source: { server: Server.HTTP_PUBLIC }, - target: { server: Server.HTTP_PRIVATE }, - expected: NavigationTestResult.FAILURE, -}), "public to private: failure."); - -promise_test_parallel(t => topLocationTest(t, { - source: { server: Server.HTTP_PUBLIC }, - target: { server: Server.HTTP_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "public to public: no preflight required."); - -promise_test_parallel(t => topLocationTest(t, { - source: { - server: Server.HTTP_LOCAL, - treatAsPublic: true, - }, - target: { server: Server.HTTP_LOCAL }, - expected: NavigationTestResult.FAILURE, -}), "treat-as-public-address to local: failure."); - -promise_test_parallel(t => topLocationTest(t, { - source: { - server: Server.HTTP_LOCAL, - treatAsPublic: true, - }, - target: { server: Server.HTTP_PRIVATE }, - expected: NavigationTestResult.FAILURE, -}), "treat-as-public-address to private: failure."); - -promise_test_parallel(t => topLocationTest(t, { - source: { - server: Server.HTTP_LOCAL, - treatAsPublic: true, - }, - target: { server: Server.HTTP_PUBLIC }, - expected: NavigationTestResult.SUCCESS, -}), "treat-as-public-address to public: no preflight required."); diff --git a/tests/wpt/tests/fledge/tentative/TODO b/tests/wpt/tests/fledge/tentative/TODO index 8a416f17e57..0f68a7c9146 100644 --- a/tests/wpt/tests/fledge/tentative/TODO +++ b/tests/wpt/tests/fledge/tentative/TODO @@ -1,5 +1,11 @@ Need tests for (likely not a complete list): +* Test how InterestGroup values affected by k-anon checks are passed to generateBid. + * adSizes, sizeGroups, ads, and adComponents all need such tests. + * adSizes and sizeGroups currently have no tests, since they are incorectly + currently not passed to generateBid at all. +* Test empty ads array: + Maybe simplest to test its numBids is empty? Hard to test a script isn't run. * directFromSellerSignals. * The expected order when both responses use the same ad slot is currently undefined. However, we are in the process of resolving this matter by diff --git a/tests/wpt/tests/fledge/tentative/interest-group-passed-to-generate-bid.https.window.js b/tests/wpt/tests/fledge/tentative/interest-group-passed-to-generate-bid.https.window.js index 11a63c1aa59..2fb346bbe3b 100644 --- a/tests/wpt/tests/fledge/tentative/interest-group-passed-to-generate-bid.https.window.js +++ b/tests/wpt/tests/fledge/tentative/interest-group-passed-to-generate-bid.https.window.js @@ -9,7 +9,17 @@ // META: variant=?16-20 // META: variant=?21-25 // META: variant=?26-30 -// META: variant=?31-last +// META: variant=?31-35 +// META: variant=?36-40 +// META: variant=?41-45 +// META: variant=?46-50 +// META: variant=?51-55 +// META: variant=?56-60 +// META: variant=?61-65 +// META: variant=?66-70 +// META: variant=?71-75 +// META: variant=?76-80 +// META: variant=?81-85 "use strict;" @@ -17,6 +27,19 @@ // and are normalized if necessary. This test does not check the behaviors of the // fields. +// Modifies "ads". Replaces "REPLACE_WITH_UUID" in all "renderURL" fields of +// objects in "ads" array with "uuid". Generated ad URLs have embedded +// UUIDs to prevent InterestGroups unexpectedly left over from one test from +// messing up another test, but these tests need ad URLs before the UUID is +// generated. To get around that, "REPLACE_WITH_UUID" is used in place of UUIDs +// and then this is used to replace them with the real UUID. +function updateAdRenderURLs(ads, uuid) { + for (let i = 0; i < ads.length; ++i) { + let ad = ads[i]; + ad.renderURL = ad.renderURL.replace('REPLACE_WITH_UUID', uuid); + } +} + const makeTest = ({ // Test name. name, @@ -35,6 +58,19 @@ const makeTest = ({ subsetTest(promise_test, async test => { const uuid = generateUuid(test); + // It's not strictly necessary to replace UUIDs in "adComponents", but do it for consistency. + if (fieldName === 'ads' || fieldName === 'adComponents' && fieldValue) { + updateAdRenderURLs(fieldValue, uuid); + } + + if (interestGroupOverrides.ads) { + updateAdRenderURLs(interestGroupOverrides.ads, uuid); + } + + if (interestGroupOverrides.adComponents) { + updateAdRenderURLs(interestGroupOverrides.adComponents, uuid); + } + if (!(fieldName in interestGroupOverrides) && fieldValue !== undefined) interestGroupOverrides[fieldName] = fieldValue; @@ -50,12 +86,22 @@ const makeTest = ({ origin = new URL(interestGroupOverrides.owner).origin; interestGroupOverrides.biddingLogicURL = - createBiddingScriptURL( - { origin: origin, - generateBid: - `if (!${comparison}) - throw "Unexpected value: " + JSON.stringify(interestGroup["${fieldName}"]);` - }); + createBiddingScriptURL( + { origin: origin, + generateBid: + `// Delete deprecated "renderUrl" fields from ads and adComponents, if + // present. + for (let field in interestGroup) { + if (field === "ads" || field === "adComponents") { + for (let i = 0; i < interestGroup[field].length; ++i) { + let ad = interestGroup[field][i]; + delete ad.renderUrl; + } + } + } + if (!${comparison}) + throw "Unexpected value: " + JSON.stringify(interestGroup["${fieldName}"]);` + }); if (origin !== location.origin) { await joinCrossOriginInterestGroup(test, uuid, origin, interestGroupOverrides); } else { @@ -76,14 +122,14 @@ makeTest({ name: 'InterestGroup.owner with non-normalized origin.', fieldName: 'owner', fieldValue: OTHER_ORIGIN1, - interestGroupOverrides: {seller: ` ${OTHER_ORIGIN1.toUpperCase()} `} + interestGroupOverrides: {owner: ` ${OTHER_ORIGIN1.toUpperCase()} `} }); makeTest({ name: 'InterestGroup.owner is URL.', fieldName: 'owner', fieldValue: OTHER_ORIGIN1, - interestGroupOverrides: {seller: OTHER_ORIGIN1 + "/Foopy"} + interestGroupOverrides: {owner: OTHER_ORIGIN1 + '/Foopy'} }); makeTest({ @@ -99,6 +145,61 @@ makeTest({ }); makeTest({ + name: 'InterestGroup.name with empty name.', + fieldName: 'name', + fieldValue: '' +}); + +makeTest({ + name: 'InterestGroup.name with unpaired surrogate characters, which should be replaced with "\\uFFFD".', + fieldName: 'name', + fieldValue: '\uFFFD,\uFFFD', + interestGroupOverrides: {name: '\uD800,\uDBF0'} +}); + +// Since "biddingLogicURL" contains the script itself inline, can't include the entire URL +// in the script for an equality check. Instead, replace the "generateBid" query parameter +// in the URL with an empty value before comparing it. This doesn't just delete the entire +// query parameter to make sure that's correctly passed in. +subsetTest(promise_test,async test => { + const uuid = generateUuid(test); + + let biddingScriptBaseURL = createBiddingScriptURL({origin: OTHER_ORIGIN1, generateBid: ''}); + let biddingLogicURL = createBiddingScriptURL( + { origin: OTHER_ORIGIN1, + generateBid: + `let biddingScriptBaseURL = + interestGroup.biddingLogicURL.replace(/generateBid=[^&]*/, "generateBid="); + if (biddingScriptBaseURL !== "${biddingScriptBaseURL}") + throw "Wrong bidding script URL: " + interestGroup.biddingLogicURL` + }); + + await joinCrossOriginInterestGroup(test, uuid, OTHER_ORIGIN1, + { biddingLogicURL: biddingLogicURL }); + + await runBasicFledgeTestExpectingWinner(test, uuid, {interestGroupBuyers: [OTHER_ORIGIN1]}); +}, 'InterestGroup.biddingLogicURL.'); + +// Much like above test, but use a relative URL that points to bidding script. +subsetTest(promise_test,async test => { + const uuid = generateUuid(test); + + let biddingScriptBaseURL = createBiddingScriptURL({generateBid: ''}); + let biddingLogicURL = createBiddingScriptURL( + { generateBid: + `let biddingScriptBaseURL = + interestGroup.biddingLogicURL.replace(/generateBid=[^&]*/, "generateBid="); + if (biddingScriptBaseURL !== "${biddingScriptBaseURL}") + throw "Wrong bidding script URL: " + interestGroup.biddingLogicURL` + }); + biddingLogicURL = biddingLogicURL.replace(BASE_URL, 'foo/../'); + + await joinInterestGroup(test, uuid, { biddingLogicURL: biddingLogicURL }); + + await runBasicFledgeTestExpectingWinner(test, uuid); +}, 'InterestGroup.biddingLogicURL with relative URL.'); + +makeTest({ name: 'InterestGroup.lifetimeMs should not be passed in.', fieldName: 'lifetimeMs', fieldValue: undefined, @@ -130,6 +231,15 @@ makeTest({ fieldValue: { 'a': -1, 'b': 2 } }); +// TODO: This is currently using USVString internally, so doesn't allow unpaired +// surrogates, but the spec says it should. +makeTest({ + name: 'InterestGroup.priorityVector with unpaired surrogate character.', + fieldName: 'priorityVector', + fieldValue: { '\uFFFD': -1 }, + interestGroupOverrides: { prioritySignalsOverrides: { '\uD800': -1 } } +}); + makeTest({ name: 'InterestGroup.prioritySignalsOverrides should not be passed in, since it can be changed by auctions.', fieldName: 'prioritySignalsOverrides', @@ -137,7 +247,6 @@ makeTest({ interestGroupOverrides: { prioritySignalsOverrides: { 'a': 1, 'b': 2 } } }); -// TODO(mmenke): These next 4 violate spec. Fix the code, and update the tests. makeTest({ name: 'InterestGroup.enableBiddingSignalsPrioritization not set.', fieldName: 'enableBiddingSignalsPrioritization', @@ -167,6 +276,92 @@ makeTest({ }); makeTest({ + name: 'InterestGroup.biddingWasmHelperURL not set.', + fieldName: 'biddingWasmHelperURL', + fieldValue: undefined +}); + +makeTest({ + name: 'InterestGroup.biddingWasmHelperURL.', + fieldName: 'biddingWasmHelperURL', + fieldValue: `${OTHER_ORIGIN1}${RESOURCE_PATH}wasm-helper.py`, + interestGroupOverrides: {owner: OTHER_ORIGIN1} +}); + +makeTest({ + name: 'InterestGroup.biddingWasmHelperURL with non-normalized value.', + fieldName: 'biddingWasmHelperURL', + fieldValue: `${OTHER_ORIGIN1}${RESOURCE_PATH}wasm-helper.py`, + interestGroupOverrides: { + owner: OTHER_ORIGIN1, + biddingWasmHelperURL: + `${OTHER_ORIGIN1.toUpperCase()}${RESOURCE_PATH}wasm-helper.py` + } +}); + +makeTest({ + name: 'InterestGroup.biddingWasmHelperURL with relative URL.', + fieldName: 'biddingWasmHelperURL', + fieldValue: `${OTHER_ORIGIN1}${RESOURCE_PATH}wasm-helper.py`, + interestGroupOverrides: { + owner: OTHER_ORIGIN1, + biddingWasmHelperURL: 'foo/../resources/wasm-helper.py' + } +}); + +makeTest({ + name: 'InterestGroup.biddingWasmHelperURL with unpaired surrogate characters, which should be replaced with "\\uFFFD".', + fieldName: 'biddingWasmHelperURL', + fieldValue: (new URL(`${OTHER_ORIGIN1}${RESOURCE_PATH}wasm-helper.py?\uFFFD.\uFFFD`)).href, + interestGroupOverrides: { + owner: OTHER_ORIGIN1, + biddingWasmHelperURL: `${OTHER_ORIGIN1}${RESOURCE_PATH}wasm-helper.py?\uD800.\uDBF0` + } +}); + +makeTest({ + name: 'InterestGroup.updateURL not set.', + fieldName: 'updateURL', + fieldValue: undefined +}); + +makeTest({ + name: 'InterestGroup.updateURL.', + fieldName: 'updateURL', + fieldValue: `${OTHER_ORIGIN1}${BASE_PATH}This-File-Does-Not-Exist.json`, + interestGroupOverrides: {owner: OTHER_ORIGIN1} +}); + +makeTest({ + name: 'InterestGroup.updateURL with non-normalized value.', + fieldName: 'updateURL', + fieldValue: `${OTHER_ORIGIN1}${BASE_PATH}This-File-Does-Not-Exist.json`, + interestGroupOverrides: { + owner: OTHER_ORIGIN1, + updateURL: `${OTHER_ORIGIN1.toUpperCase()}${BASE_PATH}This-File-Does-Not-Exist.json` + } +}); + +makeTest({ + name: 'InterestGroup.updateURL with relative URL.', + fieldName: 'updateURL', + fieldValue: (new URL(`${OTHER_ORIGIN1}${BASE_PATH}../This-File-Does-Not-Exist.json`)).href, + interestGroupOverrides: { + owner: OTHER_ORIGIN1, + updateURL: '../This-File-Does-Not-Exist.json' + } +}); + +makeTest({ + name: 'InterestGroup.updateURL with unpaired surrogate characters, which should be replaced with "\\uFFFD".', + fieldName: 'updateURL', + fieldValue: (new URL(`${BASE_URL}\uFFFD.\uFFFD`)).href, + interestGroupOverrides: { + updateURL: `${BASE_URL}\uD800.\uDBF0` + } +}); + +makeTest({ name: 'InterestGroup.executionMode not present.', fieldName: 'executionMode', fieldValue: 'compatibility', @@ -207,18 +402,37 @@ makeTest({ makeTest({ name: 'InterestGroup.trustedBiddingSignalsURL.', fieldName: 'trustedBiddingSignalsURL', - fieldValue: `${OTHER_ORIGIN1}${BASE_PATH}this-file-does-not-exist.json`, + fieldValue: `${OTHER_ORIGIN1}${BASE_PATH}This-File-Does-Not-Exist.json`, interestGroupOverrides: {owner: OTHER_ORIGIN1} }); makeTest({ name: 'InterestGroup.trustedBiddingSignalsURL with non-normalized value.', fieldName: 'trustedBiddingSignalsURL', - fieldValue: `${OTHER_ORIGIN1}${BASE_PATH}this-file-does-not-exist.json`, + fieldValue: `${OTHER_ORIGIN1}${BASE_PATH}This-File-Does-Not-Exist.json`, + interestGroupOverrides: { + owner: OTHER_ORIGIN1, + trustedBiddingSignalsURL: + `${OTHER_ORIGIN1.toUpperCase()}${BASE_PATH}This-File-Does-Not-Exist.json` + } +}); + +makeTest({ + name: 'InterestGroup.trustedBiddingSignalsURL with relative URL.', + fieldName: 'trustedBiddingSignalsURL', + fieldValue: (new URL(`${OTHER_ORIGIN1}${BASE_PATH}../This-File-Does-Not-Exist.json`)).href, interestGroupOverrides: { owner: OTHER_ORIGIN1, - trustedScoringSignalsURL: - `${OTHER_ORIGIN1.toUpperCase()}${BASE_PATH}this-file-does-not-exist.json` + trustedBiddingSignalsURL: '../This-File-Does-Not-Exist.json' + } +}); + +makeTest({ + name: 'InterestGroup.trustedBiddingSignalsURL with unpaired surrogate characters, which should be replaced with "\\uFFFD".', + fieldName: 'trustedBiddingSignalsURL', + fieldValue: (new URL(`${BASE_URL}\uFFFD.\uFFFD`)).href, + interestGroupOverrides: { + trustedBiddingSignalsURL: `${BASE_URL}\uD800.\uDBF0` } }); @@ -242,6 +456,13 @@ makeTest({ }); makeTest({ + name: 'InterestGroup.trustedBiddingSignalsKeys unpaired surrogate characters, which should be replaced with "\\uFFFD".', + fieldName: 'trustedBiddingSignalsKeys', + fieldValue: ['\uFFFD', '\uFFFD', '\uFFFD.\uFFFD'], + interestGroupOverrides: { trustedBiddingSignalsKeys: ['\uD800', '\uDBF0', '\uD800.\uDBF0'] } +}); + +makeTest({ name: 'InterestGroup.trustedBiddingSignalsSlotSizeMode empty.', fieldName: 'trustedBiddingSignalsSlotSizeMode', fieldValue: 'none', @@ -298,8 +519,219 @@ makeTest({ }); makeTest({ + name: 'InterestGroup.userBiddingSignals unpaired surrogate characters, which should be kept as-is.', + fieldName: 'userBiddingSignals', + fieldValue: '\uD800.\uDBF0' +}); + +makeTest({ + name: 'InterestGroup.userBiddingSignals unpaired surrogate characters in an object, which should be kept as-is.', + fieldName: 'userBiddingSignals', + fieldValue: {'\uD800': '\uDBF0', '\uDBF0':['\uD800']} +}); + +makeTest({ name: 'InterestGroup.nonStandardField.', fieldName: 'nonStandardField', fieldValue: undefined, interestGroupOverrides: {nonStandardField: 'This value should not be passed to worklets'} }); + +// Note that all ad tests have a deprecated "renderUrl" field passed to generateBid. + +// Ad URLs need the right UUID for seller scripts to accept their bids. Since UUID changes +// for each test, and is not available outside makeTest(), have to use string that will +// be replaced with the real UUID. +const AD1_URL = createRenderURL('REPLACE_WITH_UUID', /*script=*/';'); +const AD2_URL = createRenderURL('REPLACE_WITH_UUID', /*script=*/';;'); + +makeTest({ + name: 'InterestGroup.ads with one ad.', + fieldName: 'ads', + fieldValue: [{renderURL: AD1_URL}] +}); + +makeTest({ + name: 'InterestGroup.ads one ad with metadata object.', + fieldName: 'ads', + fieldValue: [{renderURL: AD1_URL, metadata: {foo: 1, bar: [2, 3], baz: '4'}}] +}); + +makeTest({ + name: 'InterestGroup.ads one ad with metadata string.', + fieldName: 'ads', + fieldValue: [{renderURL: AD1_URL, metadata: 'foo'}] +}); + +makeTest({ + name: 'InterestGroup.ads one ad with null metadata.', + fieldName: 'ads', + fieldValue: [{renderURL: AD1_URL, metadata: null}] +}); + +makeTest({ + name: 'InterestGroup.ads one ad with adRenderId. This field should not be passed to generateBid.', + fieldName: 'ads', + fieldValue: [{renderURL: AD1_URL}], + interestGroupOverrides: {ads: [{renderURL: AD1_URL, adRenderId: 'twelve chars'}]} +}); + +makeTest({ + name: 'InterestGroup.ads one ad with buyerAndSellerReportingId. This field should not be passed to generateBid.', + fieldName: 'ads', + fieldValue: [{renderURL: AD1_URL}], + interestGroupOverrides: {ads: [{renderURL: AD1_URL, + buyerAndSellerReportingId: 'Arbitrary text'}]} +}); + +makeTest({ + name: 'InterestGroup.ads one ad with buyerReportingId. This field should not be passed to generateBid.', + fieldName: 'ads', + fieldValue: [{renderURL: AD1_URL}], + interestGroupOverrides: {ads: [{renderURL: AD1_URL, + buyerReportingId: 'Arbitrary text'}]} +}); + +makeTest({ + name: 'InterestGroup.ads one ad with novel field. This field should not be passed to generateBid.', + fieldName: 'ads', + fieldValue: [{renderURL: AD1_URL}], + interestGroupOverrides: {ads: [{renderURL: AD1_URL, novelField: 'Foo'}]} +}); + +makeTest({ + name: 'InterestGroup.ads with multiple ads.', + fieldName: 'ads', + fieldValue: [{renderURL: AD1_URL, metadata: 1}, + {renderURL: AD2_URL, metadata: [2]}], + interestGroupOverrides: {ads: [{renderURL: AD1_URL, metadata: 1}, + {renderURL: AD2_URL, metadata: [2]}]} +}); + +// This should probably be an error. This WPT test serves to encourage there to be a +// new join-leave WPT test when that is fixed. +makeTest({ + name: 'InterestGroup.ads duplicate ad.', + fieldName: 'ads', + fieldValue: [{renderURL: AD1_URL}, {renderURL: AD1_URL}], + interestGroupOverrides: {ads: [{renderURL: AD1_URL}, {renderURL: AD1_URL}]} +}); + +makeTest({ + name: 'InterestGroup.adComponents is undefined.', + fieldName: 'adComponents', + fieldValue: undefined +}); + +// This one is likely a bug. +makeTest({ + name: 'InterestGroup.adComponents is empty array.', + fieldName: 'adComponents', + fieldValue: undefined, + interestGroupOverrides: {adComponents: []} +}); + +makeTest({ + name: 'InterestGroup.adComponents with one ad.', + fieldName: 'adComponents', + fieldValue: [{renderURL: AD1_URL}] +}); + +makeTest({ + name: 'InterestGroup.adComponents one ad with metadata object.', + fieldName: 'adComponents', + fieldValue: [{renderURL: AD1_URL, metadata: {foo: 1, bar: [2, 3], baz: '4'}}] +}); + +makeTest({ + name: 'InterestGroup.adComponents one ad with metadata string.', + fieldName: 'adComponents', + fieldValue: [{renderURL: AD1_URL, metadata: 'foo'}] +}); + +makeTest({ + name: 'InterestGroup.adComponents one ad with null metadata.', + fieldName: 'adComponents', + fieldValue: [{renderURL: AD1_URL, metadata: null}] +}); + +makeTest({ + name: 'InterestGroup.adComponents one ad with adRenderId. This field should not be passed to generateBid.', + fieldName: 'adComponents', + fieldValue: [{renderURL: AD1_URL}], + interestGroupOverrides: {adComponents: [{renderURL: AD1_URL, + adRenderId: 'twelve chars'}]} +}); + +makeTest({ + name: 'InterestGroup.adComponents one ad with buyerAndSellerReportingId. This field should not be passed to generateBid.', + fieldName: 'adComponents', + fieldValue: [{renderURL: AD1_URL}], + interestGroupOverrides: {adComponents: [{renderURL: AD1_URL, + buyerAndSellerReportingId: 'Arbitrary text'}]} +}); + +makeTest({ + name: 'InterestGroup.adComponents one ad with buyerReportingId. This field should not be passed to generateBid.', + fieldName: 'adComponents', + fieldValue: [{renderURL: AD1_URL}], + interestGroupOverrides: {adComponents: [{renderURL: AD1_URL, + buyerReportingId: 'Arbitrary text'}]} +}); + +makeTest({ + name: 'InterestGroup.adComponents one ad with novel field. This field should not be passed to generateBid.', + fieldName: 'adComponents', + fieldValue: [{renderURL: AD1_URL}], + interestGroupOverrides: {adComponents: [{renderURL: AD1_URL, + novelField: 'Foo'}]} +}); + +makeTest({ + name: 'InterestGroup.adComponents with multiple ads.', + fieldName: 'adComponents', + fieldValue: [{renderURL: AD1_URL, metadata: 1}, {renderURL: AD2_URL, metadata: [2]}] +}); + +makeTest({ + name: 'InterestGroup.auctionServerRequestFlags is undefined', + fieldName: 'auctionServerRequestFlags', + fieldValue: undefined +}); + +makeTest({ + name: 'InterestGroup.auctionServerRequestFlags is "omit-ads".', + fieldName: 'auctionServerRequestFlags', + fieldValue: undefined, + interestGroupOverrides: {auctionServerRequestFlags: ['omit-ads']} +}); + +makeTest({ + name: 'InterestGroup.auctionServerRequestFlags is "include-full-ads".', + fieldName: 'auctionServerRequestFlags', + fieldValue: undefined, + interestGroupOverrides: {auctionServerRequestFlags: ['include-full-ads']} +}); + +makeTest({ + name: 'InterestGroup.auctionServerRequestFlags has multiple values.', + fieldName: 'auctionServerRequestFlags', + fieldValue: undefined, + interestGroupOverrides: {auctionServerRequestFlags: ['omit-ads', 'include-full-ads']} +}); + +makeTest({ + name: 'InterestGroup.auctionServerRequestFlags.', + fieldName: 'auctionServerRequestFlags', + fieldValue: undefined, + interestGroupOverrides: {auctionServerRequestFlags: ['noval value']} +}); + +// This should probably be an error. This WPT test serves to encourage there to be a +// new join-leave WPT test when that is fixed. +makeTest({ + name: 'InterestGroup.adComponents duplicate ad.', + fieldName: 'adComponents', + fieldValue: [{renderURL: AD1_URL}, {renderURL: AD1_URL}], + interestGroupOverrides: {adComponents: [{renderURL: AD1_URL}, {renderURL: AD1_URL}]} +}); diff --git a/tests/wpt/tests/fledge/tentative/join-leave-ad-interest-group.https.window.js b/tests/wpt/tests/fledge/tentative/join-leave-ad-interest-group.https.window.js index c3c97d60c61..b5dfe025bf2 100644 --- a/tests/wpt/tests/fledge/tentative/join-leave-ad-interest-group.https.window.js +++ b/tests/wpt/tests/fledge/tentative/join-leave-ad-interest-group.https.window.js @@ -382,29 +382,17 @@ const SIMPLE_JOIN_LEAVE_TEST_CASES = [ interestGroup: { ...BASE_INTEREST_GROUP, ads: [{metadata: [{a:'b'}, 'c'], 1:[2,3]}] } }, - { expectJoinSucces: true, - expectLeaveSucces: true, - interestGroup: { ...BASE_INTEREST_GROUP, - ads: [{renderURL: 'https://somewhere.test/'}] } - }, - { expectJoinSucces: true, - expectLeaveSucces: true, - interestGroup: { ...BASE_INTEREST_GROUP, - ads: [{renderURL: 'https://somewhere.test/'}, - {renderURL: 'https://somewhere-else.test/'}] } - }, - { expectJoinSucces: true, + { expectJoinSucces: false, expectLeaveSucces: true, interestGroup: { ...BASE_INTEREST_GROUP, ads: [{renderURL: 'https://somewhere.test/', - metadata: null}] } + adRenderId: 'thirteenChars' }] } }, + { expectJoinSucces: true, expectLeaveSucces: true, interestGroup: { ...BASE_INTEREST_GROUP, - ads: [{renderURL: 'https://somewhere.test/', - metadata: null, - someOtherField: 'foo'}] } + ads: [{renderURL: 'https://somewhere.test/'}] } }, // "adComponents" tests @@ -421,16 +409,6 @@ const SIMPLE_JOIN_LEAVE_TEST_CASES = [ { expectJoinSucces: false, expectLeaveSucces: true, interestGroup: { ...BASE_INTEREST_GROUP, - adComponents: {} } - }, - { expectJoinSucces: true, - expectLeaveSucces: true, - interestGroup: { ...BASE_INTEREST_GROUP, - adComponents: [] } - }, - { expectJoinSucces: false, - expectLeaveSucces: true, - interestGroup: { ...BASE_INTEREST_GROUP, adComponents: [{}] } }, { expectJoinSucces: false, @@ -438,29 +416,16 @@ const SIMPLE_JOIN_LEAVE_TEST_CASES = [ interestGroup: { ...BASE_INTEREST_GROUP, adComponents: [{metadata: [{a:'b'}, 'c'], 1:[2,3]}] } }, - { expectJoinSucces: true, - expectLeaveSucces: true, - interestGroup: { ...BASE_INTEREST_GROUP, - adComponents: [{renderURL: 'https://somewhere.test/'}] } - }, - { expectJoinSucces: true, - expectLeaveSucces: true, - interestGroup: { ...BASE_INTEREST_GROUP, - adComponents: [{renderURL: 'https://somewhere.test/'}, - {renderURL: 'https://elsewhere.test/'}] } - }, - { expectJoinSucces: true, + { expectJoinSucces: false, expectLeaveSucces: true, interestGroup: { ...BASE_INTEREST_GROUP, adComponents: [{renderURL: 'https://somewhere.test/', - metadata: null}] } + adRenderId: 'More than twelve characters'}] } }, { expectJoinSucces: true, expectLeaveSucces: true, interestGroup: { ...BASE_INTEREST_GROUP, - adComponents: [{renderURL: 'https://somewhere.test/', - metadata: null, - someOtherField: 'foo'}] } + adComponents: [{renderURL: 'https://somewhere.test/'}] } }, // Miscellaneous tests. @@ -481,14 +446,14 @@ const SIMPLE_JOIN_LEAVE_TEST_CASES = [ { expectJoinSucces: true, expectLeaveSucces: true, interestGroup: { ...BASE_INTEREST_GROUP, - name: 'a'.repeat(1048520) + name: 'a'.repeat(1048516) }, testCaseName: "Largest possible interest group dictionary", }, { expectJoinSucces: false, expectLeaveSucces: true, interestGroup: { ...BASE_INTEREST_GROUP, - name: 'a'.repeat(1048521) + name: 'a'.repeat(1048517) }, testCaseName: "Oversized interest group dictionary", }, diff --git a/tests/wpt/tests/fledge/tentative/no-winner.https.window.js b/tests/wpt/tests/fledge/tentative/no-winner.https.window.js index f252aece5bf..6e02139c810 100644 --- a/tests/wpt/tests/fledge/tentative/no-winner.https.window.js +++ b/tests/wpt/tests/fledge/tentative/no-winner.https.window.js @@ -10,7 +10,9 @@ // META: variant=?21-25 // META: variant=?26-30 // META: variant=?31-35 -// META: variant=?36-last +// META: variant=?36-40 +// META: variant=?41-45 +// META: variant=?46-last "use strict;" @@ -18,10 +20,10 @@ // origin, one frame) which have no winning bid, either due to errors or due to // there being no bids, except where tests fit better with another set of tests. -// Errors common to bidding and decision logic scripts. These atrings will be -// appended to script URLs to make the python scripts that generate bidding -// logic and decision logic scripts with errors. -const COMMON_SCRIPT_ERRORS = [ +// Errors common to Protected Audiences network requests. These strings will be +// appended to URLs to make the Python scripts that generate responses respond +// with errors. +const COMMON_NETWORK_ERRORS = [ 'error=close-connection', 'error=http-error', 'error=no-content-type', @@ -33,7 +35,7 @@ const COMMON_SCRIPT_ERRORS = [ ]; const BIDDING_LOGIC_SCRIPT_ERRORS = [ - ...COMMON_SCRIPT_ERRORS, + ...COMMON_NETWORK_ERRORS, 'error=no-generateBid', 'generateBid=throw 1;', 'generateBid=This does not compile', @@ -48,11 +50,11 @@ const BIDDING_LOGIC_SCRIPT_ERRORS = [ 'generateBid=return {render: interestGroup.ads[0].renderURL};', // These are not bidding rather than errors. 'generateBid=return {bid:0, render: interestGroup.ads[0].renderURL};', - 'generateBid=return {bid:-1, render: interestGroup.ads[0].renderURL};', + 'generateBid=return {bid:-1, render: interestGroup.ads[0].renderURL};' ]; const DECISION_LOGIC_SCRIPT_ERRORS = [ - ...COMMON_SCRIPT_ERRORS, + ...COMMON_NETWORK_ERRORS, 'error=no-scoreAd', 'scoreAd=throw 1;', 'scoreAd=This does not compile', @@ -65,7 +67,12 @@ const DECISION_LOGIC_SCRIPT_ERRORS = [ 'scoreAd=return 0;', 'scoreAd=return -1;', 'scoreAd=return {desirability: 0};', - 'scoreAd=return {desirability: -1};', + 'scoreAd=return {desirability: -1};' +]; + +const BIDDING_WASM_HELPER_ERRORS = [ + ...COMMON_NETWORK_ERRORS, + 'error=not-wasm' ]; for (error of BIDDING_LOGIC_SCRIPT_ERRORS) { @@ -87,3 +94,13 @@ for (error of DECISION_LOGIC_SCRIPT_ERRORS) { ); }).bind(undefined, error), `Decision logic script: ${error}`); } + +for (error of BIDDING_WASM_HELPER_ERRORS) { + subsetTest(promise_test, (async (error, test) => { + let biddingWasmHelperURL = + `${BASE_URL}resources/wasm-helper.py?${error}`; + await joinGroupAndRunBasicFledgeTestExpectingNoWinner( + test, { interestGroupOverrides: { biddingWasmHelperURL: biddingWasmHelperURL } } + ); + }).bind(undefined, error), `Bidding WASM helper: ${error}`); +} diff --git a/tests/wpt/tests/fledge/tentative/resources/fledge-util.sub.js b/tests/wpt/tests/fledge/tentative/resources/fledge-util.sub.js index e9513ecb855..69573d49983 100644 --- a/tests/wpt/tests/fledge/tentative/resources/fledge-util.sub.js +++ b/tests/wpt/tests/fledge/tentative/resources/fledge-util.sub.js @@ -157,17 +157,19 @@ async function waitForObservedRequests(uuid, expectedRequests) { function createBiddingScriptURL(params = {}) { let origin = params.origin ? params.origin : new URL(BASE_URL).origin; let url = new URL(`${origin}${RESOURCE_PATH}bidding-logic.sub.py`); - if (params.generateBid) + // These checks use "==" to ignore null and not provided arguments, while + // treating '' as a valid argument. + if (params.generateBid != null) url.searchParams.append('generateBid', params.generateBid); - if (params.reportWin) + if (params.reportWin != null) url.searchParams.append('reportWin', params.reportWin); - if (params.error) + if (params.error != null) url.searchParams.append('error', params.error); - if (params.bid) + if (params.bid != null) url.searchParams.append('bid', params.bid); - if (params.bidCurrency) + if (params.bidCurrency != null) url.searchParams.append('bidCurrency', params.bidCurrency); - if (params.allowComponentAuction !== undefined) + if (params.allowComponentAuction != null) url.searchParams.append('allowComponentAuction', JSON.stringify(params.allowComponentAuction)) return url.toString(); } @@ -189,11 +191,13 @@ function createDecisionScriptURL(uuid, params = {}) { let origin = params.origin ? params.origin : new URL(BASE_URL).origin; let url = new URL(`${origin}${RESOURCE_PATH}decision-logic.sub.py`); url.searchParams.append('uuid', uuid); - if (params.scoreAd) + // These checks use "==" to ignore null and not provided arguments, while + // treating '' as a valid argument. + if (params.scoreAd != null) url.searchParams.append('scoreAd', params.scoreAd); - if (params.reportResult) + if (params.reportResult != null) url.searchParams.append('reportResult', params.reportResult); - if (params.error) + if (params.error != null) url.searchParams.append('error', params.error); return url.toString(); } @@ -204,12 +208,14 @@ function createDecisionScriptURL(uuid, params = {}) { // be last. "signalsParams" also has no effect, but is used by // trusted-scoring-signals.py to affect the response. function createRenderURL(uuid, script, signalsParams, origin) { + // These checks use "==" to ignore null and not provided arguments, while + // treating '' as a valid argument. if (origin == null) origin = new URL(BASE_URL).origin; let url = new URL(`${origin}${RESOURCE_PATH}fenced-frame.sub.py`); - if (script) + if (script != null) url.searchParams.append('script', script); - if (signalsParams) + if (signalsParams != null) url.searchParams.append('signalsParams', signalsParams); url.searchParams.append('uuid', uuid); return url.toString(); diff --git a/tests/wpt/tests/fledge/tentative/resources/incrementer.wasm b/tests/wpt/tests/fledge/tentative/resources/incrementer.wasm Binary files differnew file mode 100644 index 00000000000..47afcdef2a2 --- /dev/null +++ b/tests/wpt/tests/fledge/tentative/resources/incrementer.wasm diff --git a/tests/wpt/tests/fledge/tentative/resources/subordinate-frame.sub.html b/tests/wpt/tests/fledge/tentative/resources/subordinate-frame.sub.html index e696ac0983d..f5b1ef99595 100644 --- a/tests/wpt/tests/fledge/tentative/resources/subordinate-frame.sub.html +++ b/tests/wpt/tests/fledge/tentative/resources/subordinate-frame.sub.html @@ -1,4 +1,5 @@ -<!DOCTYPE html> +<!doctype html> +<meta charset="utf-8"> <html> <head> <!--- Allow injected scripts to use functions in fledge-util.sub.js ---> diff --git a/tests/wpt/tests/fledge/tentative/resources/subordinate-frame.sub.html.headers b/tests/wpt/tests/fledge/tentative/resources/subordinate-frame.sub.html.headers new file mode 100644 index 00000000000..3e3bda1ec06 --- /dev/null +++ b/tests/wpt/tests/fledge/tentative/resources/subordinate-frame.sub.html.headers @@ -0,0 +1 @@ +Content-Type: text/html; charset=UTF-8
\ No newline at end of file diff --git a/tests/wpt/tests/fledge/tentative/resources/wasm-helper.py b/tests/wpt/tests/fledge/tentative/resources/wasm-helper.py new file mode 100644 index 00000000000..a945b4cd5fe --- /dev/null +++ b/tests/wpt/tests/fledge/tentative/resources/wasm-helper.py @@ -0,0 +1,38 @@ +from pathlib import Path + +# Returns incrementer.wasm, with appropriate headers. Depending on query +# parameter, it can simulate a variety of network errors. +def main(request, response): + error = request.GET.first(b"error", None) + + if error == b"close-connection": + # Close connection without writing anything, to simulate a network + # error. The write call is needed to avoid writing the default headers. + response.writer.write("") + response.close_connection = True + return + + if error == b"http-error": + response.status = (404, b"OK") + else: + response.status = (200, b"OK") + + if error == b"wrong-content-type": + response.headers.set(b"Content-Type", b"application/javascript") + elif error != b"no-content-type": + response.headers.set(b"Content-Type", b"application/wasm") + + if error == b"bad-allow-fledge": + response.headers.set(b"Ad-Auction-Allowed", b"sometimes") + elif error == b"fledge-not-allowed": + response.headers.set(b"Ad-Auction-Allowed", b"false") + elif error != b"no-allow-fledge": + response.headers.set(b"Ad-Auction-Allowed", b"true") + + if error == b"no-body": + return b"" + + if error == b"not-wasm": + return b"This is not wasm" + + return (Path(__file__).parent.resolve() / "incrementer.wasm").read_bytes() diff --git a/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc-expected.html b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc-expected.html new file mode 100644 index 00000000000..7c0faba5859 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc-expected.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>Canvas test: 2d.path.stroke.prune.closePath.arc</title> +<h1>2d.path.stroke.prune.closePath.arc</h1> +<p class="desc">Test if zero-lengthed closePath before and after arc are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.arc(20, 20, 15, 0, Math.PI); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc.html b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc.html new file mode 100644 index 00000000000..4b1d0692758 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.arc.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<link rel="match" href="2d.path.stroke.prune.closePath.arc-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.arc</title> +<h1>2d.path.stroke.prune.closePath.arc</h1> +<p class="desc">Test if zero-lengthed closePath before and after arc are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.arc(20, 20, 15, 0, Math.PI); + ctx.closePath(); + + ctx.moveTo(40, 40); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html new file mode 100644 index 00000000000..4b867f821fa --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>Canvas test: 2d.path.stroke.prune.closePath.bezierCurve</title> +<h1>2d.path.stroke.prune.closePath.bezierCurve</h1> +<p class="desc">Test if zero-lengthed closePath before and after bezier curve are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.bezierCurveTo(10, 30, 40, 50, 100, 50); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html new file mode 100644 index 00000000000..2c974bd2740 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<link rel="match" href="2d.path.stroke.prune.closePath.bezierCurve-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.bezierCurve</title> +<h1>2d.path.stroke.prune.closePath.bezierCurve</h1> +<p class="desc">Test if zero-lengthed closePath before and after bezier curve are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(5, 5); + ctx.lineTo(5, 5); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.bezierCurveTo(10, 30, 40, 50, 100, 50); + ctx.closePath(); + + ctx.moveTo(20, 40); + ctx.lineTo(20, 40); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line-expected.html b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line-expected.html new file mode 100644 index 00000000000..87a99c79380 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line-expected.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>Canvas test: 2d.path.stroke.prune.closePath.line</title> +<h1>2d.path.stroke.prune.closePath.line</h1> +<p class="desc">Test if zero-lengthed closePath before and after line are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line.html b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line.html new file mode 100644 index 00000000000..655b2e12fda --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.line.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<link rel="match" href="2d.path.stroke.prune.closePath.line-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.line</title> +<h1>2d.path.stroke.prune.closePath.line</h1> +<p class="desc">Test if zero-lengthed closePath before and after line are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.lineTo(40, 40); + ctx.closePath(); + + ctx.moveTo(45, 45); + ctx.lineTo(45, 45); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html new file mode 100644 index 00000000000..03635b01483 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>Canvas test: 2d.path.stroke.prune.closePath.quadraticCurve</title> +<h1>2d.path.stroke.prune.closePath.quadraticCurve</h1> +<p class="desc">Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(80, 10, 100, 50); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html new file mode 100644 index 00000000000..9066770e221 --- /dev/null +++ b/tests/wpt/tests/html/canvas/element/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<link rel="match" href="2d.path.stroke.prune.closePath.quadraticCurve-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.quadraticCurve</title> +<h1>2d.path.stroke.prune.closePath.quadraticCurve</h1> +<p class="desc">Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(5, 5); + ctx.lineTo(5, 5); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(80, 10, 100, 50); + ctx.closePath(); + + ctx.moveTo(40, 40); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc-expected.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc-expected.html new file mode 100644 index 00000000000..7c0faba5859 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc-expected.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>Canvas test: 2d.path.stroke.prune.closePath.arc</title> +<h1>2d.path.stroke.prune.closePath.arc</h1> +<p class="desc">Test if zero-lengthed closePath before and after arc are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.arc(20, 20, 15, 0, Math.PI); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.html new file mode 100644 index 00000000000..aeff5bfd400 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<link rel="match" href="2d.path.stroke.prune.closePath.arc-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.arc</title> +<h1>2d.path.stroke.prune.closePath.arc</h1> +<p class="desc">Test if zero-lengthed closePath before and after arc are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = new OffscreenCanvas(100, 50); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.arc(20, 20, 15, 0, Math.PI); + ctx.closePath(); + + ctx.moveTo(40, 40); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); + + const outputCanvas = document.getElementById("canvas"); + outputCanvas.getContext('2d').drawImage(canvas, 0, 0); +</script> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html new file mode 100644 index 00000000000..f10836239f4 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.arc.w.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<html class="reftest-wait"> +<link rel="match" href="2d.path.stroke.prune.closePath.arc-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.arc</title> +<h1>2d.path.stroke.prune.closePath.arc</h1> +<p class="desc">Test if zero-lengthed closePath before and after arc are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script id='myWorker' type='text/worker'> + self.onmessage = function(e) { + const canvas = new OffscreenCanvas(100, 50); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.arc(20, 20, 15, 0, Math.PI); + ctx.closePath(); + + ctx.moveTo(40, 40); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); + + const bitmap = canvas.transferToImageBitmap(); + self.postMessage(bitmap, bitmap); + }; +</script> +<script> + const blob = new Blob([document.getElementById('myWorker').textContent]); + const worker = new Worker(URL.createObjectURL(blob)); + worker.addEventListener('message', msg => { + const outputCtx = document.getElementById("canvas").getContext('2d'); + outputCtx.drawImage(msg.data, 0, 0); + document.documentElement.classList.remove("reftest-wait"); + }); + worker.postMessage(null); +</script> +</html> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html new file mode 100644 index 00000000000..4b867f821fa --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve-expected.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>Canvas test: 2d.path.stroke.prune.closePath.bezierCurve</title> +<h1>2d.path.stroke.prune.closePath.bezierCurve</h1> +<p class="desc">Test if zero-lengthed closePath before and after bezier curve are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.bezierCurveTo(10, 30, 40, 50, 100, 50); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html new file mode 100644 index 00000000000..09d3152a5e7 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<link rel="match" href="2d.path.stroke.prune.closePath.bezierCurve-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.bezierCurve</title> +<h1>2d.path.stroke.prune.closePath.bezierCurve</h1> +<p class="desc">Test if zero-lengthed closePath before and after bezier curve are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = new OffscreenCanvas(100, 50); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(5, 5); + ctx.lineTo(5, 5); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.bezierCurveTo(10, 30, 40, 50, 100, 50); + ctx.closePath(); + + ctx.moveTo(20, 40); + ctx.lineTo(20, 40); + ctx.closePath(); + ctx.stroke(); + + const outputCanvas = document.getElementById("canvas"); + outputCanvas.getContext('2d').drawImage(canvas, 0, 0); +</script> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html new file mode 100644 index 00000000000..66f15eb3f16 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.bezierCurve.w.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<html class="reftest-wait"> +<link rel="match" href="2d.path.stroke.prune.closePath.bezierCurve-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.bezierCurve</title> +<h1>2d.path.stroke.prune.closePath.bezierCurve</h1> +<p class="desc">Test if zero-lengthed closePath before and after bezier curve are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script id='myWorker' type='text/worker'> + self.onmessage = function(e) { + const canvas = new OffscreenCanvas(100, 50); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(5, 5); + ctx.lineTo(5, 5); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.bezierCurveTo(10, 30, 40, 50, 100, 50); + ctx.closePath(); + + ctx.moveTo(20, 40); + ctx.lineTo(20, 40); + ctx.closePath(); + ctx.stroke(); + + const bitmap = canvas.transferToImageBitmap(); + self.postMessage(bitmap, bitmap); + }; +</script> +<script> + const blob = new Blob([document.getElementById('myWorker').textContent]); + const worker = new Worker(URL.createObjectURL(blob)); + worker.addEventListener('message', msg => { + const outputCtx = document.getElementById("canvas").getContext('2d'); + outputCtx.drawImage(msg.data, 0, 0); + document.documentElement.classList.remove("reftest-wait"); + }); + worker.postMessage(null); +</script> +</html> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line-expected.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line-expected.html new file mode 100644 index 00000000000..87a99c79380 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line-expected.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>Canvas test: 2d.path.stroke.prune.closePath.line</title> +<h1>2d.path.stroke.prune.closePath.line</h1> +<p class="desc">Test if zero-lengthed closePath before and after line are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.html new file mode 100644 index 00000000000..5a020cce171 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<link rel="match" href="2d.path.stroke.prune.closePath.line-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.line</title> +<h1>2d.path.stroke.prune.closePath.line</h1> +<p class="desc">Test if zero-lengthed closePath before and after line are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = new OffscreenCanvas(100, 50); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.lineTo(40, 40); + ctx.closePath(); + + ctx.moveTo(45, 45); + ctx.lineTo(45, 45); + ctx.closePath(); + ctx.stroke(); + + const outputCanvas = document.getElementById("canvas"); + outputCanvas.getContext('2d').drawImage(canvas, 0, 0); +</script> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html new file mode 100644 index 00000000000..860ad7036c9 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.line.w.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<html class="reftest-wait"> +<link rel="match" href="2d.path.stroke.prune.closePath.line-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.line</title> +<h1>2d.path.stroke.prune.closePath.line</h1> +<p class="desc">Test if zero-lengthed closePath before and after line are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script id='myWorker' type='text/worker'> + self.onmessage = function(e) { + const canvas = new OffscreenCanvas(100, 50); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.lineTo(40, 40); + ctx.closePath(); + + ctx.moveTo(45, 45); + ctx.lineTo(45, 45); + ctx.closePath(); + ctx.stroke(); + + const bitmap = canvas.transferToImageBitmap(); + self.postMessage(bitmap, bitmap); + }; +</script> +<script> + const blob = new Blob([document.getElementById('myWorker').textContent]); + const worker = new Worker(URL.createObjectURL(blob)); + worker.addEventListener('message', msg => { + const outputCtx = document.getElementById("canvas").getContext('2d'); + outputCtx.drawImage(msg.data, 0, 0); + document.documentElement.classList.remove("reftest-wait"); + }); + worker.postMessage(null); +</script> +</html> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html new file mode 100644 index 00000000000..03635b01483 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve-expected.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>Canvas test: 2d.path.stroke.prune.closePath.quadraticCurve</title> +<h1>2d.path.stroke.prune.closePath.quadraticCurve</h1> +<p class="desc">Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(80, 10, 100, 50); + ctx.closePath(); + ctx.stroke(); +</script> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html new file mode 100644 index 00000000000..1d516710f20 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<link rel="match" href="2d.path.stroke.prune.closePath.quadraticCurve-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.quadraticCurve</title> +<h1>2d.path.stroke.prune.closePath.quadraticCurve</h1> +<p class="desc">Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script> + const canvas = new OffscreenCanvas(100, 50); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(5, 5); + ctx.lineTo(5, 5); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(80, 10, 100, 50); + ctx.closePath(); + + ctx.moveTo(40, 40); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); + + const outputCanvas = document.getElementById("canvas"); + outputCanvas.getContext('2d').drawImage(canvas, 0, 0); +</script> diff --git a/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html new file mode 100644 index 00000000000..5bbd2732637 --- /dev/null +++ b/tests/wpt/tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closePath.quadraticCurve.w.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<html class="reftest-wait"> +<link rel="match" href="2d.path.stroke.prune.closePath.quadraticCurve-expected.html"> +<title>Canvas test: 2d.path.stroke.prune.closePath.quadraticCurve</title> +<h1>2d.path.stroke.prune.closePath.quadraticCurve</h1> +<p class="desc">Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.</p> +<canvas id="canvas" width="100" height="50"> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script id='myWorker' type='text/worker'> + self.onmessage = function(e) { + const canvas = new OffscreenCanvas(100, 50); + const ctx = canvas.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(5, 5); + ctx.lineTo(5, 5); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(80, 10, 100, 50); + ctx.closePath(); + + ctx.moveTo(40, 40); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); + + const bitmap = canvas.transferToImageBitmap(); + self.postMessage(bitmap, bitmap); + }; +</script> +<script> + const blob = new Blob([document.getElementById('myWorker').textContent]); + const worker = new Worker(URL.createObjectURL(blob)); + worker.addEventListener('message', msg => { + const outputCtx = document.getElementById("canvas").getContext('2d'); + outputCtx.drawImage(msg.data, 0, 0); + document.documentElement.classList.remove("reftest-wait"); + }); + worker.postMessage(null); +</script> +</html> diff --git a/tests/wpt/tests/html/canvas/tools/yaml-new/path-objects.yaml b/tests/wpt/tests/html/canvas/tools/yaml-new/path-objects.yaml index 673c9085744..755d6fb8d54 100644 --- a/tests/wpt/tests/html/canvas/tools/yaml-new/path-objects.yaml +++ b/tests/wpt/tests/html/canvas/tools/yaml-new/path-objects.yaml @@ -2879,6 +2879,157 @@ @assert pixel 50,25 == 0,255,0,255; expected: green +- name: 2d.path.stroke.prune.closePath.line + desc: Test if zero-lengthed closePath before and after line are ignored corrected. + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.lineTo(40, 40); + ctx.closePath(); + + ctx.moveTo(45, 45); + ctx.lineTo(45, 45); + ctx.closePath(); + ctx.stroke(); + reference: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); + +- name: 2d.path.stroke.prune.closePath.bezierCurve + desc: Test if zero-lengthed closePath before and after bezier curve are ignored corrected. + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(5, 5); + ctx.lineTo(5, 5); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.bezierCurveTo(10, 30, 40, 50, 100, 50); + ctx.closePath(); + + ctx.moveTo(20, 40); + ctx.lineTo(20, 40); + ctx.closePath(); + ctx.stroke(); + reference: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.bezierCurveTo(10, 30, 40, 50, 100, 50); + ctx.closePath(); + ctx.stroke(); + +- name: 2d.path.stroke.prune.closePath.quadraticCurve + desc: Test if zero-lengthed closePath before and after quadratic curve are ignored corrected. + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(5, 5); + ctx.lineTo(5, 5); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(80, 10, 100, 50); + ctx.closePath(); + + ctx.moveTo(40, 40); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); + reference: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.quadraticCurveTo(80, 10, 100, 50); + ctx.closePath(); + ctx.stroke(); + +- name: 2d.path.stroke.prune.closePath.arc + desc: Test if zero-lengthed closePath before and after arc are ignored corrected. + code: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.beginPath(); + ctx.moveTo(50, 25); + ctx.lineTo(50, 25); + ctx.closePath(); + + ctx.moveTo(10, 10); + ctx.arc(20, 20, 15, 0, Math.PI); + ctx.closePath(); + + ctx.moveTo(40, 40); + ctx.lineTo(40, 40); + ctx.closePath(); + ctx.stroke(); + reference: | + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.strokeStyle = '#f00'; + ctx.lineWidth = 10; + ctx.lineCap = 'round'; + ctx.lineJoin = 'round'; + + ctx.moveTo(10, 10); + ctx.arc(20, 20, 15, 0, Math.PI); + ctx.closePath(); + ctx.stroke(); - name: 2d.path.transformation.basic code: | diff --git a/tests/wpt/tests/html/cross-origin-embedder-policy/credentialless/websocket.https.window.js b/tests/wpt/tests/html/cross-origin-embedder-policy/credentialless/websocket.https.window.js index 7d0dd95d84b..2fe8d02879b 100644 --- a/tests/wpt/tests/html/cross-origin-embedder-policy/credentialless/websocket.https.window.js +++ b/tests/wpt/tests/html/cross-origin-embedder-policy/credentialless/websocket.https.window.js @@ -1,4 +1,4 @@ -// META: TIMEOUT=long +// META: timeout=long // META: script=/common/get-host-info.sub.js // META: script=/common/utils.js // META: script=/common/dispatcher/dispatcher.js diff --git a/tests/wpt/tests/html/dom/aria-element-reflection.html b/tests/wpt/tests/html/dom/aria-element-reflection.html index 8d4d4b8f6a6..54b9d34eb17 100644 --- a/tests/wpt/tests/html/dom/aria-element-reflection.html +++ b/tests/wpt/tests/html/dom/aria-element-reflection.html @@ -791,6 +791,22 @@ }, "Caching invariant different elements."); </script> + <div id="badInputValues"></div> + <div id="badInputValues2"></div> + + <script> + test(function(t) { + assert_throws_js(TypeError, () => { badInputValues.ariaActiveDescendantElement = "a string"; }); + assert_throws_js(TypeError, () => { badInputValues.ariaActiveDescendantElement = 1; }); + assert_throws_js(TypeError, () => { badInputValues.ariaActiveDescendantElement = [ badInputValues2 ]; }); + + assert_throws_js(TypeError, () => { badInputValues.ariaControlsElements = "a string" }); + assert_throws_js(TypeError, () => { badInputValues.ariaControlsElements = 1 }); + assert_throws_js(TypeError, () => { badInputValues.ariaControlsElements = [1, 2, 3] }); + assert_throws_js(TypeError, () => { badInputValues.ariaControlsElements = badInputValues2 }); + }, "Passing values of the wrong type should throw a TypeError"); + </script> + <!-- TODO(chrishall): add additional GC test covering: if an element is in an invalid scope but attached to the document, it's not GC'd; diff --git a/tests/wpt/tests/html/rendering/non-replaced-elements/form-controls/resets.html b/tests/wpt/tests/html/rendering/non-replaced-elements/form-controls/resets.html index 20d6a565b46..db21188ee37 100644 --- a/tests/wpt/tests/html/rendering/non-replaced-elements/form-controls/resets.html +++ b/tests/wpt/tests/html/rendering/non-replaced-elements/form-controls/resets.html @@ -41,6 +41,10 @@ input[type=submit i], input[type=color i], input[type=search i], select, button input, button { display: inline-block; } +input:not([type=image i], [type=range i], [type=checkbox i], [type=radio i]) { + overflow: clip; + overflow-clip-margin: 0; +} /* in spec prose: */ select, textarea, meter, progress { display: inline-block; } @@ -106,6 +110,8 @@ table { 'text-shadow', 'text-align', 'display', + 'overflow', + 'overflow-clip-margin', 'box-sizing']; runUAStyleTests(props); diff --git a/tests/wpt/tests/html/rendering/support/test-ua-stylesheet.js b/tests/wpt/tests/html/rendering/support/test-ua-stylesheet.js index 49757a36828..e23c9a67202 100644 --- a/tests/wpt/tests/html/rendering/support/test-ua-stylesheet.js +++ b/tests/wpt/tests/html/rendering/support/test-ua-stylesheet.js @@ -26,6 +26,10 @@ function runUAStyleTests(props) { ) { continue; } + if (prop === 'overflow' && testEl.localName === 'select') { + // TODO: https://github.com/whatwg/html/issues/10031 + continue; + } test(() => { assert_equals(testStyle.getPropertyValue(prop), refStyle.getPropertyValue(prop)); }, `${testNameContext(testEl)} - ${prop}`); diff --git a/tests/wpt/tests/html/rendering/widgets/input-text-size.html b/tests/wpt/tests/html/rendering/widgets/input-text-size.html new file mode 100644 index 00000000000..7f2948280c0 --- /dev/null +++ b/tests/wpt/tests/html/rendering/widgets/input-text-size.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<link rel="help" href="https://html.spec.whatwg.org/C/#the-input-element-as-a-text-entry-widget"> +<title>Test `size` attribute behaivor</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> + +<input id="missing"> +<input id="invalid" size="-1"> +<input id="size0" size="0"> +<input id="size1" size="1"> +<input id="size10" size="10"> +<input id="size20" size="20"> +<input id="size21" size="21"> +<input id="computed" style="border:none; padding:0;" size="19"> + +<script> +test(() => { + assert_equals(missing.offsetWidth, size20.offsetWidth); +}, 'A misssing attribute is equivalent to size=20'); + +test(() => { + assert_equals(invalid.offsetWidth, size20.offsetWidth, 'size="-1"'); + assert_equals(size0.offsetWidth, size20.offsetWidth, 'size="0"'); +}, 'An invalid attribute value is equivalent to size=20'); + +test(() => { + assert_less_than(size1.offsetWidth, size10.offsetWidth, '1 < 10'); + assert_less_than(size10.offsetWidth, size20.offsetWidth, '10 < 20'); + assert_less_than(size20.offsetWidth, size21.offsetWidth, '20 < 21'); +}, 'The width depends on a size attribute'); + +test(() => { + const computedString = getComputedStyle(computed).width; + assert_equals(computed.offsetWidth, + parseInt(computedString.substring(0, computedString.length - 2))); +}, 'Size attribute value affects computed style'); +</script> + diff --git a/tests/wpt/tests/html/rendering/widgets/textarea-cols-rows.html b/tests/wpt/tests/html/rendering/widgets/textarea-cols-rows.html new file mode 100644 index 00000000000..012c5aa153d --- /dev/null +++ b/tests/wpt/tests/html/rendering/widgets/textarea-cols-rows.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<link rel="help" href="https://html.spec.whatwg.org/C/#the-textarea-element-2"> +<title>Test `cols` `rows` attributes behaivor</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> + +<textarea id="missing"></textarea> +<textarea id="invalid" cols="-1" rows="-1"></textarea> +<textarea id="computed" style="border:none; padding:0;" cols="19" rows="5"></textarea> + +<textarea id="cols0" cols="0"></textarea> +<textarea id="cols1" cols="1"></textarea> +<textarea id="cols10" cols="10"></textarea> +<textarea id="cols20" cols="20"></textarea> +<textarea id="cols21" cols="21"></textarea> + +<textarea id="rows0" rows="0"></textarea> +<textarea id="rows1" rows="1"></textarea> +<textarea id="rows2" rows="2"></textarea> +<textarea id="rows3" rows="3"></textarea> + +<script> +test(() => { + assert_equals(missing.offsetWidth, cols20.offsetWidth); + assert_equals(missing.offsetHeight, rows2.offsetHeight); +}, 'A misssing attribute is equivalent to cols=20 rows=2'); + +test(() => { + assert_equals(invalid.offsetWidth, cols20.offsetWidth); + assert_equals(invalid.offsetHeight, rows2.offsetHeight); + assert_equals(cols0.offsetWidth, cols20.offsetWidth); + assert_equals(rows0.offsetHeight, rows2.offsetHeight); +}, 'An invalid attribute value is equivalent to cols=20 rows=2'); + +test(() => { + assert_less_than(cols1.offsetWidth, cols10.offsetWidth, '1 < 10'); + assert_less_than(cols10.offsetWidth, cols20.offsetWidth, '10 < 20'); + assert_less_than(cols20.offsetWidth, cols21.offsetWidth, '20 < 21'); +}, 'The width depends on a cols attribute'); + +test(() => { + assert_less_than(rows1.offsetHeight, rows2.offsetHeight, '1 < 2'); + assert_less_than(rows2.offsetHeight, rows3.offsetHeight, '2 < 3'); +}, 'The height depends on a rows attribute'); + +test(() => { + const computedWidth = getComputedStyle(computed).width; + assert_equals(computed.offsetWidth, + parseInt(computedWidth.substring(0, computedWidth.length - 2))); + + const computedHeight = getComputedStyle(computed).height; + assert_equals(computed.offsetHeight, + parseInt(computedHeight.substring(0, computedHeight.length - 2))); +}, 'Cols/rows attribute values affect computed style'); +</script> + diff --git a/tests/wpt/tests/html/semantics/embedded-content/media-elements/preserves-pitch.html b/tests/wpt/tests/html/semantics/embedded-content/media-elements/preserves-pitch.html index d0f4d77a32b..ba76f51d471 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/media-elements/preserves-pitch.html +++ b/tests/wpt/tests/html/semantics/embedded-content/media-elements/preserves-pitch.html @@ -71,7 +71,7 @@ function testPreservesPitch(preservesPitch, playbackRate, expectedPitch, descrip // Wait until we have played some audio. Otherwise, the detector // might return a pitch of 0Hz. audio.play(); - await waitUntil(0.25); + await waitUntil(0.5); var pitch = detector.detect(); @@ -82,7 +82,10 @@ function testPreservesPitch(preservesPitch, playbackRate, expectedPitch, descrip assert_less_than(pitch.margin, 25, "Test error: the margin should be reasonably small.") - assert_approx_equals(pitch.value, expectedPitch, pitch.margin, + // Allow for a 15% margin of error in the pitch detector, to reduce test + // flakiness. Since our tests speed up and slow down by a factor of 2, + // this should be plenty of leeway, without causing false negatives. + assert_approx_equals(pitch.value, expectedPitch, expectedPitch*0.15, "The actual pitch should be close to the expected pitch."); }, description); diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/resources/sandbox-top-navigation-helper.js b/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/resources/sandbox-top-navigation-helper.js index 7792c261309..413f392dfc6 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/resources/sandbox-top-navigation-helper.js +++ b/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/resources/sandbox-top-navigation-helper.js @@ -4,8 +4,6 @@ // // META: script=/common/utils.js // // META: script=/resources/testdriver.js // // META: script=/resources/testdriver-vendor.js -// // META: script=/resources/testharness.js -// // META: script=/resources/testharnessreport.js // // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js // // META: script=./resources/sandbox-top-navigation-helper.js diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js b/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js index a9ea9e47232..8681411dd71 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js +++ b/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js @@ -4,8 +4,6 @@ // META: script=/common/utils.js // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js // META: script=./resources/sandbox-top-navigation-helper.js diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child.tentative.sub.window.js b/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child.tentative.sub.window.js index 58133456970..53faa99a408 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child.tentative.sub.window.js +++ b/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child.tentative.sub.window.js @@ -4,8 +4,6 @@ // META: script=/common/utils.js // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js // META: script=./resources/sandbox-top-navigation-helper.js diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js b/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js index 999f056f334..a5cda9b0b98 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js +++ b/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js @@ -4,8 +4,6 @@ // META: script=/common/utils.js // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js // META: script=./resources/sandbox-top-navigation-helper.js diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-grandchild.tentative.sub.window.js b/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-grandchild.tentative.sub.window.js index 519efc94e51..a07148f8029 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-grandchild.tentative.sub.window.js +++ b/tests/wpt/tests/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-grandchild.tentative.sub.window.js @@ -4,8 +4,6 @@ // META: script=/common/utils.js // META: script=/resources/testdriver.js // META: script=/resources/testdriver-vendor.js -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js // META: script=./resources/sandbox-top-navigation-helper.js diff --git a/tests/wpt/tests/html/semantics/forms/the-select-element/select-parsing.tentative.html b/tests/wpt/tests/html/semantics/forms/the-select-element/select-parsing.tentative.html new file mode 100644 index 00000000000..d3576a26b7f --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-select-element/select-parsing.tentative.html @@ -0,0 +1,115 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/whatwg/html/issues/9799"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> + +<select id=s1> + <div>div 1</div> + <button>button</button> + <div>div 2</div> + <datalist> + <option>option</option> + </datalist> + <div>div 3</div> +</select> + +<select id=s2> + <div>div 1</div> + <button> + <span>level 1</span> + <button> + <span>level 2</span> + </button> + </button> + <div>div 2</div> +</select> + +<select id=s3> + <button>button +</select> + +<select id=s4> + <datalist>datalist +</select> + +<select id=s5> + <button> + <select></select> + </button> +</select> + +<select id=s6> + <button> + <div> + <select> +</select> + +<div id=afterlast> + keep this div after the last test case +</div> + +<script> +test(() => { + // The document.body check here and in the other tests is to make sure that a + // previous test case didn't leave the HTML parser open on another element. + assert_equals(document.getElementById('s1').parentNode, document.body); + assert_equals(document.getElementById('s1').innerHTML, ` + div 1 + <button>button</button> + div 2 + <datalist> + <option>option</option> + </datalist> + div 3 +`); +}, '<button>s and <datalist>s should be allowed in <select>.'); + +test(() => { + assert_equals(document.getElementById('s2').parentNode, document.body); + assert_equals(document.getElementById('s2').innerHTML, ` + div 1 + <button> + <span>level 1</span> + </button><button> + <span>level 2</span> + </button> + \n div 2 +`); +}, 'Nested <button>s in <select> should be flattened out.'); + +test(() => { + assert_equals(document.getElementById('s3').parentNode, document.body); + assert_equals(document.getElementById('s3').innerHTML, ` + <button>button +</button>`); +}, '</select> should close <button>.'); + +test(() => { + assert_equals(document.getElementById('s4').parentNode, document.body); + assert_equals(document.getElementById('s4').innerHTML, ` + <datalist>datalist +</datalist>`); +}, '</select> should close <datalist>.'); + +test(() => { + assert_equals(document.getElementById('s5').parentNode, document.body); + assert_equals(document.getElementById('s5').innerHTML, ` + <button> + </button>`); +}, '<select> in <button> in <select> should remove inner <select>.'); + +test(() => { + assert_equals(document.getElementById('s6').parentNode, document.body); + assert_equals(document.getElementById('s6').innerHTML, ` + <button> + <div> + </div></button>`); +}, '<select> in <select><button><div> should remove inner <select>.'); + +test(() => { + assert_equals(document.getElementById('afterlast').parentNode, document.body); +}, 'The last test should not leave any tags open after parsing.'); +</script> diff --git a/tests/wpt/tests/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html b/tests/wpt/tests/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html index 68d3ef0a9ad..9d0e3284fec 100644 --- a/tests/wpt/tests/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html +++ b/tests/wpt/tests/html/semantics/scripting-1/the-script-element/json-module-assertions/parse-error.html @@ -17,5 +17,5 @@ async_test(t => { }); </script> <script type="module"> -import v from "./parse-error.json"; +import v from "./parse-error.json" assert { type: "json" }; </script> diff --git a/tests/wpt/tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html b/tests/wpt/tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html index 68d3ef0a9ad..88fb23a00d9 100644 --- a/tests/wpt/tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html +++ b/tests/wpt/tests/html/semantics/scripting-1/the-script-element/json-module/parse-error.html @@ -17,5 +17,5 @@ async_test(t => { }); </script> <script type="module"> -import v from "./parse-error.json"; +import v from "./parse-error.json" with { type: "json" }; </script> diff --git a/tests/wpt/tests/interfaces/fenced-frame.idl b/tests/wpt/tests/interfaces/fenced-frame.idl index 0eed6a6b4ba..2107655aa92 100644 --- a/tests/wpt/tests/interfaces/fenced-frame.idl +++ b/tests/wpt/tests/interfaces/fenced-frame.idl @@ -52,7 +52,11 @@ dictionary FenceEvent { DOMString eventType; DOMString eventData; sequence<FenceReportingDestination> destination; + + // When setting event data to be used later in an automatic beacon, the + // following properties are used: boolean once = false; + boolean crossOriginExposed = false; // When reporting to a custom destination URL (with substitution of macros defined by // the Protected Audience buyer), the following property is used: diff --git a/tests/wpt/tests/interfaces/html.idl b/tests/wpt/tests/interfaces/html.idl index 434d0cc0ab1..9193a7487ee 100644 --- a/tests/wpt/tests/interfaces/html.idl +++ b/tests/wpt/tests/interfaces/html.idl @@ -2472,6 +2472,7 @@ interface MessagePort : EventTarget { // event handlers attribute EventHandler onmessage; attribute EventHandler onmessageerror; + attribute EventHandler onclose; }; dictionary StructuredSerializeOptions { diff --git a/tests/wpt/tests/interfaces/longtasks.idl b/tests/wpt/tests/interfaces/longtasks.idl index 71ab2ddc67c..13d4940c1c0 100644 --- a/tests/wpt/tests/interfaces/longtasks.idl +++ b/tests/wpt/tests/interfaces/longtasks.idl @@ -46,7 +46,7 @@ interface PerformanceLongAnimationFrameTiming : PerformanceEntry { [Default] object toJSON(); }; -enum ScriptTimingType { +enum ScriptInvokerType { "classic-script", "module-script", "event-listener", @@ -55,6 +55,10 @@ enum ScriptTimingType { "reject-promise" }; +enum ScriptWindowAttribution { + "self", "descendant", "ancestor", "same-page", "other" +}; + [Exposed=Window] interface PerformanceScriptTiming : PerformanceEntry { /* Overloading PerformanceEntry */ @@ -63,8 +67,13 @@ interface PerformanceScriptTiming : PerformanceEntry { readonly attribute DOMString name; readonly attribute DOMString entryType; - readonly attribute ScriptTimingType type; + readonly attribute ScriptInvokerType invokerType; + readonly attribute DOMString invoker; readonly attribute DOMHighResTimeStamp executionStart; readonly attribute DOMString sourceLocation; + readonly attribute DOMHighResTimeStamp pauseDuration; + readonly attribute DOMHighResTimeStamp forcedStyleAndLayoutDuration; + readonly attribute Window? window; + readonly attribute ScriptWindowAttribution windowAttribution; [Default] object toJSON(); }; diff --git a/tests/wpt/tests/interfaces/paint-timing.idl b/tests/wpt/tests/interfaces/paint-timing.idl index 052b74ef6c2..396f461e94c 100644 --- a/tests/wpt/tests/interfaces/paint-timing.idl +++ b/tests/wpt/tests/interfaces/paint-timing.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Paint Timing 1 (https://w3c.github.io/paint-timing/) +// Source: Paint Timing (https://w3c.github.io/paint-timing/) [Exposed=Window] interface PerformancePaintTiming : PerformanceEntry {}; diff --git a/tests/wpt/tests/interfaces/trust-token-api.idl b/tests/wpt/tests/interfaces/trust-token-api.idl index fb7f15b4b74..9b74290da72 100644 --- a/tests/wpt/tests/interfaces/trust-token-api.idl +++ b/tests/wpt/tests/interfaces/trust-token-api.idl @@ -29,6 +29,6 @@ partial interface XMLHttpRequest { }; partial interface Document { - Promise<boolean> hasPrivateTokens(USVString issuer); + Promise<boolean> hasPrivateToken(USVString issuer); Promise<boolean> hasRedemptionRecord(USVString issuer); }; diff --git a/tests/wpt/tests/interfaces/trusted-types.idl b/tests/wpt/tests/interfaces/trusted-types.idl index 23562381294..6723994aae6 100644 --- a/tests/wpt/tests/interfaces/trusted-types.idl +++ b/tests/wpt/tests/interfaces/trusted-types.idl @@ -53,13 +53,13 @@ interface TrustedTypePolicy { }; dictionary TrustedTypePolicyOptions { - CreateHTMLCallback? createHTML; - CreateScriptCallback? createScript; - CreateScriptURLCallback? createScriptURL; + CreateHTMLCallback createHTML; + CreateScriptCallback createScript; + CreateScriptURLCallback createScriptURL; }; -callback CreateHTMLCallback = DOMString (DOMString input, any... arguments); -callback CreateScriptCallback = DOMString (DOMString input, any... arguments); -callback CreateScriptURLCallback = USVString (DOMString input, any... arguments); +callback CreateHTMLCallback = DOMString? (DOMString input, any... arguments); +callback CreateScriptCallback = DOMString? (DOMString input, any... arguments); +callback CreateScriptURLCallback = USVString? (DOMString input, any... arguments); typedef [StringContext=TrustedHTML] DOMString HTMLString; typedef [StringContext=TrustedScript] DOMString ScriptString; diff --git a/tests/wpt/tests/interfaces/webauthn.idl b/tests/wpt/tests/interfaces/webauthn.idl index e56d61314af..cf1a2fbdc48 100644 --- a/tests/wpt/tests/interfaces/webauthn.idl +++ b/tests/wpt/tests/interfaces/webauthn.idl @@ -58,7 +58,6 @@ dictionary AuthenticatorAssertionResponseJSON { required Base64URLString authenticatorData; required Base64URLString signature; Base64URLString userHandle; - Base64URLString attestationObject; }; dictionary AuthenticationExtensionsClientOutputsJSON { @@ -77,9 +76,11 @@ partial interface PublicKeyCredential { }; partial interface PublicKeyCredential { - static Promise<boolean> isPasskeyPlatformAuthenticatorAvailable(); + static Promise<PublicKeyCredentialClientCapabilities> getClientCapabilities(); }; +typedef record<DOMString, boolean> PublicKeyCredentialClientCapabilities; + partial interface PublicKeyCredential { static PublicKeyCredentialCreationOptions parseCreationOptionsFromJSON(PublicKeyCredentialCreationOptionsJSON options); }; @@ -124,8 +125,6 @@ dictionary PublicKeyCredentialRequestOptionsJSON { sequence<PublicKeyCredentialDescriptorJSON> allowCredentials = []; DOMString userVerification = "preferred"; sequence<DOMString> hints = []; - DOMString attestation = "none"; - sequence<DOMString> attestationFormats = []; AuthenticationExtensionsClientInputsJSON extensions; }; @@ -148,7 +147,6 @@ interface AuthenticatorAssertionResponse : AuthenticatorResponse { [SameObject] readonly attribute ArrayBuffer authenticatorData; [SameObject] readonly attribute ArrayBuffer signature; [SameObject] readonly attribute ArrayBuffer? userHandle; - [SameObject] readonly attribute ArrayBuffer? attestationObject; }; dictionary PublicKeyCredentialParameters { @@ -217,8 +215,6 @@ dictionary PublicKeyCredentialRequestOptions { sequence<PublicKeyCredentialDescriptor> allowCredentials = []; DOMString userVerification = "preferred"; sequence<DOMString> hints = []; - DOMString attestation = "none"; - sequence<DOMString> attestationFormats = []; AuthenticationExtensionsClientInputs extensions; }; @@ -270,6 +266,14 @@ enum UserVerificationRequirement { "discouraged" }; +enum ClientCapability { + "conditionalCreate", + "conditionalMediation", + "hybridTransport", + "passkeyPlatformAuthenticator", + "userVerifyingPlatformAuthenticator", +}; + enum PublicKeyCredentialHints { "security-key", "client-device", @@ -375,7 +379,7 @@ partial dictionary AuthenticationExtensionsClientInputs { }; dictionary AuthenticationExtensionsSupplementalPubKeysOutputs { - sequence<ArrayBuffer> signatures; + required sequence<ArrayBuffer> signatures; }; partial dictionary AuthenticationExtensionsClientOutputs { diff --git a/tests/wpt/tests/lint.ignore b/tests/wpt/tests/lint.ignore index c82f8027f69..e9f91d80f0d 100644 --- a/tests/wpt/tests/lint.ignore +++ b/tests/wpt/tests/lint.ignore @@ -395,6 +395,7 @@ SET TIMEOUT: scheduler/tentative/current-task-signal-async-abort.any.js SET TIMEOUT: scheduler/tentative/current-task-signal-async-priority.any.js SET TIMEOUT: speculation-rules/prerender/resources/activation-start.html SET TIMEOUT: speculation-rules/prerender/resources/prerender-response-code.html +SET TIMEOUT: speculation-rules/prerender/resources/prerender-while-prerender-outer.html SET TIMEOUT: speculation-rules/prerender/resources/deferred-promise-utils.js SET TIMEOUT: speculation-rules/prerender/resources/session-history-harness.js SET TIMEOUT: speculation-rules/prerender/resources/utils.js @@ -520,7 +521,6 @@ SET TIMEOUT: css/CSS2/tables/tables-102.xht SET TIMEOUT: css/mediaqueries/min-width-tables-001.html SET TIMEOUT: css/css-text/crashtests/rendering-rtl-bidi-override-crash.html SET TIMEOUT: css/css-backgrounds/color-mix-currentcolor-border-repaint-parent.html -SET TIMEOUT: svg/painting/color-mix-currentcolor-fill-stroke-repaint.html SET TIMEOUT: svg/painting/currentcolor-fill-stroke-repaint.html SET TIMEOUT: resource-timing/resources/run-async-tasks-promise.js diff --git a/tests/wpt/tests/mathml/relations/css-styling/mathvariant-auto-selection.html b/tests/wpt/tests/mathml/relations/css-styling/mathvariant-auto-selection.html new file mode 100644 index 00000000000..f915c44e497 --- /dev/null +++ b/tests/wpt/tests/mathml/relations/css-styling/mathvariant-auto-selection.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <title>text-transform math-auto</title> + <link rel="help" href="https://w3c.github.io/mathml-core/#new-text-transform-values"> + <link rel="help" href="https://w3c.github.io/mathml-core/#italic-mappings"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/css/css-text/text-transform/math/italic-mapping.js"></script> + <meta name="assert" content="Verify Selection.toString() on a single character <mi> within returns the transformed unicode character."> + </head> + <body> + <math><mi id="container"></mi></math> + <script> + add_completion_callback(() => { + container.remove(); + }); + for (let code_point in italic_mapping) { + test(() => { + container.textContent = String.fromCodePoint(code_point); + window + .getSelection() + .setBaseAndExtent(container.firstChild, 0, container.firstChild, 1); + assert_equals( + window.getSelection().toString(), + String.fromCodePoint(italic_mapping[code_point]) + ); + }, `Selection.toString() for <mi>${String.fromCodePoint(code_point)}</mi> returns the transformed character.`); + } + </script> + </body> +</html> diff --git a/tests/wpt/tests/mathml/tools/mathvariant-transforms.py b/tests/wpt/tests/mathml/tools/mathvariant-transforms.py index e4857d2a3e3..dca85b55618 100755 --- a/tests/wpt/tests/mathml/tools/mathvariant-transforms.py +++ b/tests/wpt/tests/mathml/tools/mathvariant-transforms.py @@ -195,6 +195,18 @@ def generateTestFor(mathvariant, mathml): generateTestFor(mathvariant="auto", mathml=False) generateTestFor(mathvariant="auto", mathml=True) +# Generate italic_mapping.js file used by selection tests. +print("Generating italic_mapping.js...", end="") +italic_mapping = open("../../css/css-text/text-transform/math/italic-mapping.js", "w") +italic_mapping.write("// Generated by mathml/tools/mathvariant.py; DO NOT EDIT.\n"); +italic_mapping.write("let italic_mapping = {\n"); +for baseChar in mathvariantTransforms["italic"]: + transformedChar = mathvariantTransforms[mathvariant][baseChar] + italic_mapping.write(" 0x%0X: 0x%0X,\n" % (baseChar, transformedChar)); +italic_mapping.write("}\n"); +italic_mapping.close() +print(" done.") + # Other mathvariant tests can be generated by the following command. They are # still use internally by browsers implementing full mathvariant support. # See https://github.com/w3c/mathml-core/issues/182 diff --git a/tests/wpt/tests/mediacapture-insertable-streams/META.yml b/tests/wpt/tests/mediacapture-insertable-streams/META.yml new file mode 100644 index 00000000000..0b7ae4d8159 --- /dev/null +++ b/tests/wpt/tests/mediacapture-insertable-streams/META.yml @@ -0,0 +1,6 @@ +spec: https://w3c.github.io/mediacapture-transform/ +suggested_reviewers: + - alvestrand + - guidou + - youennf + - jan-ivar diff --git a/tests/wpt/tests/mediacapture-insertable-streams/idlharness.any.js b/tests/wpt/tests/mediacapture-insertable-streams/idlharness.any.js index d7975ab90fa..594753cc1ab 100644 --- a/tests/wpt/tests/mediacapture-insertable-streams/idlharness.any.js +++ b/tests/wpt/tests/mediacapture-insertable-streams/idlharness.any.js @@ -7,6 +7,7 @@ idl_test( ['dom', 'html'], idl_array => { idl_array.add_objects({ + MediaStreamTrackProcessor: ['new MediaStreamTrackProcessor({ track: new VideoTrackGenerator() })'], VideoTrackGenerator: ['new VideoTrackGenerator()'], }); } diff --git a/tests/wpt/tests/pending-beacon/pending_beacon-basic.window.js b/tests/wpt/tests/pending-beacon/pending_beacon-basic.window.js index 01b37547f79..d6afd9fb5e5 100644 --- a/tests/wpt/tests/pending-beacon/pending_beacon-basic.window.js +++ b/tests/wpt/tests/pending-beacon/pending_beacon-basic.window.js @@ -1,6 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js - 'use strict'; test(() => { diff --git a/tests/wpt/tests/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js b/tests/wpt/tests/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js index 55704388b7c..b4283cecef7 100644 --- a/tests/wpt/tests/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js +++ b/tests/wpt/tests/pending-beacon/pending_beacon-sendondiscard.tentative.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/utils.js // META: script=./resources/pending_beacon-helper.js diff --git a/tests/wpt/tests/pending-beacon/pending_beacon-sendonhidden.tentative.https.window.js b/tests/wpt/tests/pending-beacon/pending_beacon-sendonhidden.tentative.https.window.js index 8d7ff24e3f8..a0ede5dadd9 100644 --- a/tests/wpt/tests/pending-beacon/pending_beacon-sendonhidden.tentative.https.window.js +++ b/tests/wpt/tests/pending-beacon/pending_beacon-sendonhidden.tentative.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/common/dispatcher/dispatcher.js // META: script=/common/get-host-info.sub.js // META: script=/common/utils.js diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js new file mode 100644 index 00000000000..8488dd60ccf --- /dev/null +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js @@ -0,0 +1,21 @@ +// META: title=Aborting a parser should block bfcache +// META: timeout=long + + +async_test(t => { + if (!sessionStorage.getItem("pageVisited")) { + // This is the first time loading the page. + sessionStorage.setItem("pageVisited", 1); + t.step_timeout(() => { + // Go to another page and instantly come back to this page. + location.href = new URL("../resources/going-back.html", window.location); + }, 0); + // Abort parsing in the middle of loading the page. + window.stop(); + } else { + const nrr = performance.getEntriesByType('navigation')[0].notRestoredReasons; + assert_equals(nrr.reasons.length, 1); + assert_equals(nrr.reasons[0], "parser-aborted"); + t.done(); + } +}, "aborting a parser should block bfcache."); diff --git a/tests/wpt/tests/performance-timeline/resources/going-back.html b/tests/wpt/tests/performance-timeline/resources/going-back.html new file mode 100644 index 00000000000..f4a26669baa --- /dev/null +++ b/tests/wpt/tests/performance-timeline/resources/going-back.html @@ -0,0 +1,9 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +onload = (event) => { + history.back(); +}; +</script>
\ No newline at end of file diff --git a/tests/wpt/tests/push-api/noop-sw.js b/tests/wpt/tests/push-api/noop-sw.js new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/tests/push-api/noop-sw.js diff --git a/tests/wpt/tests/push-api/resources/helpers.js b/tests/wpt/tests/push-api/resources/helpers.js new file mode 100644 index 00000000000..8395c638f3e --- /dev/null +++ b/tests/wpt/tests/push-api/resources/helpers.js @@ -0,0 +1,12 @@ +function resetSw() { + return navigator.serviceWorker.getRegistrations().then(registrations => { + return Promise.all(registrations.map(r => r.unregister())); + }); +} + +async function registerSw(path) { + await resetSw(); + add_completion_callback(resetSw); + const reg = await navigator.serviceWorker.register(path); + return reg; +} diff --git a/tests/wpt/tests/push-api/subscribe-with-faulty-applicationServerKey.https.window.js b/tests/wpt/tests/push-api/subscribe-with-faulty-applicationServerKey.https.window.js new file mode 100644 index 00000000000..7d600803e43 --- /dev/null +++ b/tests/wpt/tests/push-api/subscribe-with-faulty-applicationServerKey.https.window.js @@ -0,0 +1,62 @@ +// META: script=/resources/testdriver.js +// META: script=/resources/testdriver-vendor.js +// META: script=resources/helpers.js + +// NOTE: +// We are not testing success cases here as doing so will try creating external network +// connection, which is not allowed by all browser test environments. +// (e.g. Gecko explicitly disables push service for testing environment.) +// Ideally we should have WPT-specific mock server in this case. See also +// https://github.com/w3c/push-api/issues/365. + +promise_setup(async () => { + // The spec does not enforce validation order and implementations + // indeed check other things before checking applicationServerKey. + + // Get the permission because Firefox checks it before key validation. + // (The permission test is done in permission.https.html.) + await test_driver.set_permission({ name: "notifications" }, "granted"); + // Get the active service worker because Chrome checks it before key validation + registration = await registerSw("noop-sw.js"); + await navigator.serviceWorker.ready; +}); + +promise_test(async (t) => { + await promise_rejects_dom( + t, + "InvalidAccessError", + registration.pushManager.subscribe({ applicationServerKey: "" }), + ); +}, "Reject empty string applicationServerKey"); + +promise_test(async (t) => { + await promise_rejects_dom( + t, + "InvalidAccessError", + registration.pushManager.subscribe({ applicationServerKey: new ArrayBuffer(0) }), + ); +}, "Reject empty ArrayBuffer applicationServerKey"); + +promise_test(async (t) => { + await promise_rejects_dom( + t, + "InvalidAccessError", + registration.pushManager.subscribe({ applicationServerKey: new Uint8Array(0) }), + ); +}, "Reject empty Uint8Array applicationServerKey"); + +promise_test(async (t) => { + await promise_rejects_dom( + t, + "InvalidAccessError", + registration.pushManager.subscribe({ applicationServerKey: new Uint8Array([1, 2, 3]) }), + ); +}, "Reject a key that is not a valid point on P-256 curve"); + +promise_test(async (t) => { + await promise_rejects_dom( + t, + "InvalidCharacterError", + registration.pushManager.subscribe({ applicationServerKey: "!@#$^&*" }), + ); +}, "Reject a string key that can't be decoded by base64url"); diff --git a/tests/wpt/tests/resources/testharness.js b/tests/wpt/tests/resources/testharness.js index bc7fb8961b9..1a6a4bb3412 100644 --- a/tests/wpt/tests/resources/testharness.js +++ b/tests/wpt/tests/resources/testharness.js @@ -1201,6 +1201,23 @@ object.addEventListener(event, callback, false); } + // Internal helper function to provide timeout-like functionality in + // environments where there is no setTimeout(). (No timeout ID or + // clearTimeout().) + function fake_set_timeout(callback, delay) { + var p = Promise.resolve(); + var start = Date.now(); + var end = start + delay; + function check() { + if ((end - Date.now()) > 0) { + p.then(check); + } else { + callback(); + } + } + p.then(check); + } + /** * Global version of :js:func:`Test.step_timeout` for use in single page tests. * @@ -1212,7 +1229,8 @@ function step_timeout(func, timeout) { var outer_this = this; var args = Array.prototype.slice.call(arguments, 2); - return setTimeout(function() { + var local_set_timeout = typeof global_scope.setTimeout === "undefined" ? fake_set_timeout : setTimeout; + return local_set_timeout(function() { func.apply(outer_this, args); }, timeout * tests.timeout_multiplier); } @@ -2720,7 +2738,8 @@ Test.prototype.step_timeout = function(func, timeout) { var test_this = this; var args = Array.prototype.slice.call(arguments, 2); - return setTimeout(this.step_func(function() { + var local_set_timeout = typeof global_scope.setTimeout === "undefined" ? fake_set_timeout : setTimeout; + return local_set_timeout(this.step_func(function() { return func.apply(test_this, args); }), timeout * tests.timeout_multiplier); }; @@ -2751,6 +2770,7 @@ var timeout_full = timeout * tests.timeout_multiplier; var remaining = Math.ceil(timeout_full / interval); var test_this = this; + var local_set_timeout = typeof global_scope.setTimeout === 'undefined' ? fake_set_timeout : setTimeout; const step = test_this.step_func((result) => { if (result) { @@ -2761,7 +2781,7 @@ "Timed out waiting on condition"); } remaining--; - setTimeout(wait_for_inner, interval); + local_set_timeout(wait_for_inner, interval); } }); @@ -4777,6 +4797,15 @@ return "Untitled"; } + /** Fetches a JSON resource and parses it */ + async function fetch_json(resource) { + const response = await fetch(resource); + return await response.json(); + } + if (!global_scope.GLOBAL || !global_scope.GLOBAL.isShadowRealm()) { + expose(fetch_json, 'fetch_json'); + } + /** * Setup globals */ diff --git a/tests/wpt/tests/scroll-animations/view-timelines/fieldset-source.html b/tests/wpt/tests/scroll-animations/view-timelines/fieldset-source.html new file mode 100644 index 00000000000..d75f30e664e --- /dev/null +++ b/tests/wpt/tests/scroll-animations/view-timelines/fieldset-source.html @@ -0,0 +1,111 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>View timeline with fieldset as source</title> +<link rel="help" href="https://www.w3.org/TR/scroll-animations-1/#dom-viewtimeline-viewtimeline"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<style> + @keyframes colorize { + from { background-color: #ccf; } + to { background-color: white; } + } + + .input { + background-color: white; + view-timeline: --timeline; + animation: colorize; + animation-timeline: --timeline; + margin-top: 0px; + margin-bottom: 3px; + margin-left: 8px; + height: 20px; + width: 150px; + } + + .input:last-child { + margin-bottom: 0px; + } + + fieldset { + display: inline-block; + overflow-x: hidden; + overflow-y: scroll; + height: 80px; + } + + div { + display: flex; + justify-content: flex-end; + align-items: center; + } +</style> +<body> + <fieldset id="fieldset"> + <legend id="legend">Reservation Details</legend> + <div> + <label for="name">Name: </label> + <input type="text" class="input" id="input1" value="Jane Doe" /> + </div> + <div> + <label for="date">Date: </label> + <input type="date" class="input" id="input2" value="2024-01-16"/> + </div> + <div> + <label for="time">Time: </label> + <input type="time" class="input" id="input3" value="18:30"/> + </div> + <div> + <label for="name">Number of guests: </label> + <input type="number" class="input" id="input4" value="5" /> + </div> + <div> + <label for="name">Contact info: </label> + <input type="text" class="input" id="input5" value="(555) 555-5555" /> + </div> + </fieldset> +</body> +<script> + async function runTest() { + promise_test(async t => { + const anims = document.getAnimations(); + assert_equals(anims.length, 5); + await Promise.all(anims.map(anim => anim.ready)); + + // The bottom of the legend aligns with the top of the fieldset's + // scrollable area. + const fieldset = document.getElementById('fieldset'); + const legend = document.getElementById('legend'); + const fieldsetContentTop = + legend.getBoundingClientRect().bottom; + + // The bottom of the scroll container aligns with the bottom of the + // fieldset's content box. + const fieldsetContentBottom = + fieldset.getBoundingClientRect().bottom - + parseFloat(getComputedStyle(fieldset).borderBottom); + + // Validate the start and end offsets for each view timeline. + anims.forEach(async (anim) => { + assert_equals(anim.timeline.source.id, 'fieldset'); + assert_equals(anim.timeline.subject.tagName, 'INPUT'); + const bounds = anim.effect.target.getBoundingClientRect(); + + const expectedStartOffset = bounds.top - fieldsetContentBottom; + const expectedEndOffset = bounds.bottom - fieldsetContentTop; + assert_approx_equals( + parseFloat(anim.timeline.startOffset), + expectedStartOffset, 0.1, + `Unexpected start offset for ${anim.effect.target.id}`); + assert_approx_equals( + parseFloat(anim.timeline.endOffset), + expectedEndOffset, 0.1, + `Unexpected end offset for ${anim.effect.target.id}`); + }); + }, 'Fieldset is a valid source for a view timeline'); + } + + window.onload = runTest(); +</script> +</html> diff --git a/tests/wpt/tests/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html b/tests/wpt/tests/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html new file mode 100644 index 00000000000..9f9dfbc9384 --- /dev/null +++ b/tests/wpt/tests/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html @@ -0,0 +1,23 @@ +<!doctype html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<script> +addEventListener("DOMContentLoaded", () => { + let i = 5; + document.addEventListener("selectstart", () => { + window.find("AAA"); + document.querySelector("li").before(document.querySelector("text")); + if (!(--i)) { + document.documentElement.removeAttribute("class"); + } + }); + document.execCommand("selectAll"); +}, {once: true}); +</script> +<body> +<svg> +<text>AAA</text> +<li> +</li></svg></body> +</html> diff --git a/tests/wpt/tests/selection/crashtests/selection-modify-line-next-to-textarea.html b/tests/wpt/tests/selection/crashtests/selection-modify-line-next-to-textarea.html new file mode 100644 index 00000000000..b685add01c0 --- /dev/null +++ b/tests/wpt/tests/selection/crashtests/selection-modify-line-next-to-textarea.html @@ -0,0 +1,25 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<script> +addEventListener("load", () => { + getSelection().collapse(document.querySelector("header"), 1); + getSelection().modify("move", "backward", "line"); + const ruby = document.querySelector("ruby"); + ruby.parentElement.replaceChild(document.createElement("h3"), ruby); + getSelection().modify("extend", "backward", "character"); +}); +</script> +</head> +<body> +<textarea> +</textarea> +<abbr> +<header> +<select autofocus='false'> +<input/> +<sup> +<ruby id='a'> +</body> +</html> diff --git a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/direct.html b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/direct.html new file mode 100644 index 00000000000..e98d70207af --- /dev/null +++ b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/direct.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<title>Direct</title> +<body> + Here's a direct html from network. +</body> diff --git a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/router-rules.js b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/router-rules.js index f8fe4032986..3ecd2025b39 100644 --- a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/router-rules.js +++ b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/router-rules.js @@ -12,11 +12,13 @@ const routerRules = { 'condition-urlpattern-string-source-network': [ {condition: {urlPattern: '/**/direct.txt'}, source: 'network'}, ], + 'condition-urlpattern-string-source-cache': [ + {condition: {urlPattern: '/**/cache.txt'}, source: 'cache'}, + ], 'condition-urlpattern-constructed-ignore-case-source-network': [{ condition: { - urlPattern: new URLPattern( - {pathname: '/**/DiReCT.TxT'}, - {ignoreCase: true}) + urlPattern: + new URLPattern({pathname: '/**/DiReCT.TxT'}, {ignoreCase: true}) }, source: 'network' }], @@ -37,6 +39,15 @@ const routerRules = { }, source: 'network' }], + 'multiple-router-rules': [ + { + condition: { + urlPattern: '/**/direct.txt', + }, + source: 'network' + }, + {condition: {urlPattern: '/**/direct.html'}, source: 'network'} + ] }; export {routerRules}; diff --git a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/static-router-sw.js b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/static-router-sw.js index 1e02dbb56de..055c07113c5 100644 --- a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/static-router-sw.js +++ b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/resources/static-router-sw.js @@ -5,6 +5,9 @@ import {routerRules} from './router-rules.js'; var requests = []; self.addEventListener('install', async e => { + e.waitUntil(caches.open('v1').then( + cache => {cache.put('cache.txt', new Response('From cache'))})); + const params = new URLSearchParams(location.search); const key = params.get('key'); await e.addRoutes(routerRules[key]); diff --git a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/static-router-main-resource.https.html b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/static-router-main-resource.https.html index 1673b97ca7b..30bbf60e83f 100644 --- a/tests/wpt/tests/service-workers/service-worker/tentative/static-router/static-router-main-resource.https.html +++ b/tests/wpt/tests/service-workers/service-worker/tentative/static-router/static-router-main-resource.https.html @@ -15,59 +15,74 @@ const ROUTER_RULE_KEY_IGNORE_CASE = 'condition-urlpattern-constructed-ignore-case-source-network'; const ROUTER_RULE_KEY_RESPECT_CASE = 'condition-urlpattern-constructed-respect-case-source-network'; +const ROUTER_RULE_KEY_MULTIPLE_RULES = 'multiple-router-rules'; +const ROUTER_RULE_KEY_URLPATTERN_CACHE = + 'condition-urlpattern-string-source-cache'; const SCOPE = 'resources/'; const REGISTERED_ROUTE = 'resources/direct.txt'; +const ADDITIONAL_REGISTERED_ROUTE = 'resources/direct.html'; +const CACHED_ROUTE = 'resources/cache.txt'; const NON_REGISTERED_ROUTE = 'resources/simple.html'; const host_info = get_host_info(); const path = new URL(".", window.location).pathname; +const registerAndActivate = async (t, ruleKey) => { + const swURL = `${SCRIPT}?key=${ruleKey}`; + const reg = await service_worker_unregister_and_register( + t, swURL, SCOPE, { type: 'module' }); + add_completion_callback(() => reg.unregister()); + const worker = reg.installing; + await wait_for_state(t, worker, 'activated'); + + return worker; +}; + +const createIframe = async (t, url) => { + const iframe = await with_iframe(url); + t.add_cleanup(() => iframe.remove()); + + return iframe; +}; + // Register a service worker, then create an iframe at url. function iframeTest(url, ruleKey, callback, name) { return promise_test(async t => { - const swURL = `${SCRIPT}?key=${ruleKey}`; - const reg = await service_worker_unregister_and_register( - t, swURL, SCOPE, {type: 'module'}); - add_completion_callback(() => reg.unregister()); - const worker = reg.installing; - await wait_for_state(t, worker, 'activated'); - const iframe = await with_iframe(url); - const iwin = iframe.contentWindow; - t.add_cleanup(() => iframe.remove()); - await callback(t, iwin, worker); + const worker = await registerAndActivate(t, ruleKey); + const iframe = await createIframe(t, url); + await callback(t, iframe.contentWindow, worker); }, name); } -function get_fetched_urls(worker) { - return new Promise(function(resolve) { +const get_fetched_urls = async worker => { + const promise = new Promise(function(resolve) { var channel = new MessageChannel(); channel.port1.onmessage = function(msg) { resolve(msg); }; worker.postMessage({port: channel.port2}, [channel.port2]); }); + const message = await promise; + + return message.data; } iframeTest(REGISTERED_ROUTE, ROUTER_RULE_KEY, async (t, iwin, worker) => { - const fetched_urls = await get_fetched_urls(worker); - const {requests} = fetched_urls.data; + const {requests} = await get_fetched_urls(worker); assert_equals(requests.length, 0); assert_equals(iwin.document.body.innerText, "Network\n"); }, 'Main resource load matched with the condition'); iframeTest(REGISTERED_ROUTE, ROUTER_RULE_KEY_IGNORE_CASE, async (t, iwin, worker) => { - const fetched_urls = await get_fetched_urls(worker); - const {requests} = fetched_urls.data; + const {requests} = await get_fetched_urls(worker); assert_equals(requests.length, 0); assert_equals(iwin.document.body.innerText, "Network\n"); }, 'Main resource load matched with the ignore case condition'); iframeTest(REGISTERED_ROUTE, ROUTER_RULE_KEY_RESPECT_CASE, async (t, iwin, worker) => { - const fetched_urls = await get_fetched_urls(worker); - const {requests} = fetched_urls.data; + const {requests} = await get_fetched_urls(worker); assert_equals(requests.length, 1); }, 'Main resource load matched without the ignore case condition'); iframeTest(NON_REGISTERED_ROUTE, ROUTER_RULE_KEY, async (t, iwin, worker) => { - const fetched_urls = await get_fetched_urls(worker); - const {requests} = fetched_urls.data; + const {requests} = await get_fetched_urls(worker); assert_equals(requests.length, 1); assert_equals( requests[0].url, @@ -75,5 +90,26 @@ iframeTest(NON_REGISTERED_ROUTE, ROUTER_RULE_KEY, async (t, iwin, worker) => { assert_equals(requests[0].mode, 'navigate'); }, 'Main resource load not matched with the condition'); +promise_test(async t => { + const worker = await registerAndActivate(t, ROUTER_RULE_KEY_MULTIPLE_RULES); + + // Matched with the first rule. + const iframe = await createIframe(t, REGISTERED_ROUTE); + assert_equals(iframe.contentWindow.document.body.innerText, "Network\n"); + + // Matched with the second rule. + const second_iframe = await createIframe(t, ADDITIONAL_REGISTERED_ROUTE); + assert_equals(second_iframe.contentWindow.document.body.innerText, "Here's a direct html from network."); + + const {requests} = await get_fetched_urls(worker); + assert_equals(requests.length, 0); +}, 'Main reosurce load matched with the service worker having multiple rules'); + +iframeTest(CACHED_ROUTE, ROUTER_RULE_KEY_URLPATTERN_CACHE, async (t, iwin, worker) => { + const {requests} = await get_fetched_urls(worker); + assert_equals(requests.length, 0); + assert_equals(iwin.document.body.innerText, "From cache"); +}, 'Main resource load matched with the cache source'); + </script> </body> diff --git a/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html b/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html index dcee6cf8a10..aec9a276f93 100644 --- a/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html +++ b/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-attachment.html @@ -42,9 +42,13 @@ function testElementType(allowed, nochildren, elementType, mode, delegatesFocus) originalShadowRoot = element.shadowRoot; } - // Now, call attachShadow() and make sure we get back the same (original) shadowRoot, but empty. const oppositeMode = (mode === 'open') ? 'closed' : 'open'; - const newShadow = element.attachShadow({mode: oppositeMode}); // Should be no exception here + assert_throws_dom('NotSupportedError', () => { + element.attachShadow({mode: oppositeMode}); + }, 'Calling attachShadow with a declarative shadow fails if the mode doesn\'t match'); + + // Now, call attachShadow() and make sure we get back the same (original) shadowRoot, but empty. + const newShadow = element.attachShadow({mode: mode, delegatesFocus: delegatesFocus}); if (mode === 'open') { assert_equals(element.shadowRoot, originalShadowRoot, 'The same shadow root should be returned'); assert_equals(element.shadowRoot.innerHTML, '', 'Empty shadow content'); @@ -60,7 +64,7 @@ function testElementType(allowed, nochildren, elementType, mode, delegatesFocus) }, 'Calling attachShadow a second time on an element with a declarative shadow fails (opposite mode)'); } else { if (!nochildren) { - // Invalid elements should retain a <template> element child with a shadowroot attribute. + // Invalid elements should retain a <template> element child with a shadowrootmode attribute. const template = nodes.wrapper.querySelector('template[shadowrootmode]'); assert_true(!!template); assert_equals(template.getAttribute('shadowrootmode'), mode, `Template with shadowrootmode=${mode} should be left over`); diff --git a/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html b/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html index 20ca34f6f3e..8799978804a 100644 --- a/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html +++ b/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-basic.html @@ -154,10 +154,14 @@ test(() => { <script> test(() => { const host = document.querySelector('#multi-host'); - assert_equals(host.querySelector('template'), null, "No leftover template nodes from either root"); + const leftover = host.querySelector('template'); + assert_true(!!leftover, "The second (duplicate) template should be left in the DOM"); + assert_true(leftover instanceof HTMLTemplateElement); + assert_equals(leftover.getAttribute('shadowrootmode'),"closed"); + assert_equals(leftover.shadowRootMode,"closed"); assert_true(!!host.shadowRoot,"No open shadow root found - first root should remain"); const innerSpan = host.shadowRoot.querySelector('span'); - assert_equals(innerSpan.textContent, 'root 2', "Content should come from last declarative shadow root"); + assert_equals(innerSpan.textContent, 'root 1', "Content should come from first declarative shadow root"); }, 'Declarative Shadow DOM: Multiple roots'); </script> diff --git a/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-repeats.html b/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-repeats.html new file mode 100644 index 00000000000..3da9cff360c --- /dev/null +++ b/tests/wpt/tests/shadow-dom/declarative/declarative-shadow-dom-repeats.html @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<title>Declarative Shadow DOM Element Attachment</title> +<link rel='author' href='mailto:masonf@chromium.org'> +<link rel='help' href='https://github.com/whatwg/dom/issues/1235'> +<link rel='help' href='https://github.com/whatwg/html/pull/10069'> +<link rel='help' href='https://github.com/whatwg/dom/pull/1246'> + +<script src='/resources/testharness.js'></script> +<script src='/resources/testharnessreport.js'></script> +<script src='../../html/resources/common.js'></script> +<script src="support/helpers.js"></script> + +<div id=multiple1> + <template shadowrootmode=open>Open</template> + <template shadowrootmode=closed>Closed</template> +</div> + +<div id=multiple2> + <template shadowrootmode=closed>Closed</template> + <template shadowrootmode=open>Open</template> +</div> + +<script> +test((t) => { + let shadow = multiple1.shadowRoot; + assert_true(!!shadow,'Remaining shadow root should be open'); + assert_equals(shadow.textContent,"Open"); + shadow = multiple2.shadowRoot; + assert_false(!!shadow,'Remaining shadow root should be closed'); + multiple1.remove(); // Cleanup + multiple2.remove(); +},'Repeated declarative shadow roots keep only the first'); +</script> + +<div id=open1> + <template shadowrootmode=open>Open</template> +</div> + +<script> +test((t) => { + assert_throws_dom("NotSupportedError",() => { + open1.attachShadow({mode: "closed"}); + },'Mismatched shadow root type should throw'); + const initialShadow = open1.shadowRoot; + const shadow = open1.attachShadow({mode: "open"}); // Shouldn't throw + assert_equals(shadow,initialShadow,'Same shadow should be returned'); + assert_equals(shadow.textContent,'','Shadow should be empty'); +},'Calling attachShadow() on declarative shadow root must match type'); +</script> + +<div id=open2> + <template shadowrootmode=open shadowrootdelegatesfocus> + Open, delegates focus (not the default), named slot assignment (the default) + </template> +</div> + +<script> +test((t) => { + assert_throws_dom("NotSupportedError",() => { + open2.attachShadow({mode: "closed", delegatesFocus: true, slotAssignment: "named"}); + },'Mismatched shadow root type should throw'); + assert_throws_dom("NotSupportedError",() => { + open2.attachShadow({mode: "open", delegatesFocus: false, slotAssignment: "named"}); + },'Mismatched shadow root delegatesFocus should throw'); + assert_throws_dom("NotSupportedError",() => { + open2.attachShadow({mode: "open", delegatesFocus: true, slotAssignment: "manual"}); + },'Mismatched shadow root slotAssignment should throw'); + const initialShadow = open2.shadowRoot; + const shadow = open2.attachShadow({mode: "open", delegatesFocus: true, slotAssignment: "named"}); // Shouldn't throw + assert_equals(shadow,initialShadow,'Same shadow should be returned'); + assert_equals(shadow.textContent,'','Shadow should be empty'); +},'Calling attachShadow() on declarative shadow root must match all parameters'); +</script> diff --git a/tests/wpt/tests/shadow-dom/declarative/innerhtml-before-closing-tag.html b/tests/wpt/tests/shadow-dom/declarative/innerhtml-before-closing-tag.html index e87c4258600..f038d3ecb2e 100644 --- a/tests/wpt/tests/shadow-dom/declarative/innerhtml-before-closing-tag.html +++ b/tests/wpt/tests/shadow-dom/declarative/innerhtml-before-closing-tag.html @@ -46,6 +46,6 @@ test(t => { assert_true(!!shadowroot, 'Shadow root should be present'); assert_true(!!shadowroot.querySelector('#newcontent'),'The innerHTML replacement content should be present'); assert_true(!shadowroot.querySelector('#oldcontent'),'The old replaced content should not be present'); -}, 'Declarative Shadow DOM: innerHTML should work while parsing STREAMING declarative shadow root <template>'); +}, 'Declarative Shadow DOM: innerHTML should work while parsing streaming declarative shadow root <template>'); </script> </body> diff --git a/tests/wpt/tests/shape-detection/detection-ImageDataUint16StorageFormat.https.window.js b/tests/wpt/tests/shape-detection/detection-ImageDataUint16StorageFormat.https.window.js index 24dd3e597c9..1afe087abf0 100644 --- a/tests/wpt/tests/shape-detection/detection-ImageDataUint16StorageFormat.https.window.js +++ b/tests/wpt/tests/shape-detection/detection-ImageDataUint16StorageFormat.https.window.js @@ -1,5 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js // META: script=/shape-detection/resources/shapedetection-helpers.js const imgUint16 = new ImageData(1024, 1024, {storageFormat: 'uint16'}); diff --git a/tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html new file mode 100644 index 00000000000..ee9d1e12335 --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html @@ -0,0 +1,28 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/soft-navigation-helper.js"></script> +</head> +<body> + <main id=main> + <a id=link>Click me!</a> + </main> + <script> + const link = document.getElementById("link"); + // Adding a noop event that the "click" would bubble to. + document.getElementById("main").addEventListener("click", () => {}); + + testSoftNavigation({ + addContent: () => { + addTextParagraphToMain("Lorem Ipsum"); + }, + link: link, + test: "Ensure event bubbling works well with soft navigations."}); + </script> +</body> +</html> diff --git a/tests/wpt/tests/soft-navigation-heuristics/image-lcp-before-detection-second-softnav.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/image-lcp-before-detection-second-softnav.tentative.html new file mode 100644 index 00000000000..4d26bb92695 --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/image-lcp-before-detection-second-softnav.tentative.html @@ -0,0 +1,60 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/soft-navigation-helper.js"></script> +</head> +<body> + <main id=main> + <div> + <a id=link><img src="/images/lcp-256x256.png" id="img"></a> + </div> + </main> + <script> + const link = document.getElementById("link"); + let first_lcp_painted; + let second_lcp_painted; + (async () => { + await new Promise(r => { first_lcp_painted = r; }); + addImageToMain("lcp-133x106.png", "no_lcp"); + (new PerformanceObserver(second_lcp_painted)).observe({type: "element"}); + })(); + testSoftNavigation({ + pushState: null, + clicks: 2, + addContent: async () => { + // Add an LCP element. + await new Promise(resolve => { + addImageToMain("lcp-100x50.png", "first_lcp" + counter); + (new PerformanceObserver(resolve)).observe({type: "element"}); + }); + if(counter) { + first_lcp_painted(); + // Wait for the unrelated LCP to be painted. + await new Promise(r => { second_lcp_painted = r; }); + } + const url = URL + "?" + counter; + history.pushState({}, '', url); + }, + link: link, + validate: async () => { + const lcps = await getLcpEntries(); + const ref_counter = counter-1; + assert_equals(lcps.length, 2 + ref_counter, "Got 2 LCP entries"); + assert_equals(lcps[lcps.length - 1].id, "first_lcp" + ref_counter, + "Got the first LCP"); + }, + test: "Second soft navigation image LCP discovered between user " + + "interaction and soft navigation detection are properly " + + "reported, while unrelated LCPs are ignored during that time. " + + "As a side effect, we also test element timing."}); + </script> +</body> +</html> + + + diff --git a/tests/wpt/tests/soft-navigation-heuristics/image-lcp-before-detection.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/image-lcp-before-detection.tentative.html new file mode 100644 index 00000000000..0de675d372b --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/image-lcp-before-detection.tentative.html @@ -0,0 +1,54 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/soft-navigation-helper.js"></script> +</head> +<body> + <main id=main> + <div> + <a id=link><img src="/images/lcp-256x256.png" id="img"></a> + </div> + </main> + <script> + const link = document.getElementById("link"); + let first_lcp_painted; + let second_lcp_painted; + (async () => { + await new Promise(r => { first_lcp_painted = r; }); + addImageToMain("lcp-133x106.png", "no_lcp"); + (new PerformanceObserver(second_lcp_painted)).observe({type: "element"}); + })(); + testSoftNavigation({ + pushState: null, + addContent: async () => { + // Add an LCP element. + await new Promise(resolve => { + addImageToMain("lcp-100x50.png", "first_lcp"); + (new PerformanceObserver(resolve)).observe({type: "element"}); + }); + first_lcp_painted(); + // Wait for the unrelated LCP to be painted. + await new Promise(r => { second_lcp_painted = r; }); + const url = URL + "?" + counter; + history.pushState({}, '', url); + }, + link: link, + validate: async () => { + const lcps = await getLcpEntries(); + assert_equals(lcps.length, 2, "Got 2 LCP entries"); + assert_equals(lcps[lcps.length - 1].id, "first_lcp", "Got the first LCP"); + }, + test: "Image LCP discovered between user interaction and soft " + + "navigation detection are properly reported, while unrelated " + + "LCPs are ignored during that time. As a side effect, we also " + + "test element timing."}); + </script> +</body> +</html> + + diff --git a/tests/wpt/tests/soft-navigation-heuristics/interaction-with-paint-before-back.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/interaction-with-paint-before-back.tentative.html new file mode 100644 index 00000000000..b5874119913 --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/interaction-with-paint-before-back.tentative.html @@ -0,0 +1,76 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/soft-navigation-helper.js"></script> +</head> +<body> + <main id=main> + <div> + <a id=link><img src="/images/lcp-256x256.png" id="img"></a> + <a id=not_nav><img src="/images/lcp-16x16.png"></a> + </div> + </main> + <script> + // Push state a couple of times + history.pushState({}, "", "foobar.html"); + history.pushState({}, "", "anotherOne.html"); + + (async () => { + const link = document.getElementById("link"); + // Trigger a user interaction that doesn't result in a soft navigation, but + // does paint. + await (async () => { + const not_nav = document.getElementById("not_nav"); + let non_soft_nav_click; + const non_soft_nav_click_promise = + new Promise(r => { non_soft_nav_click = r; }); + not_nav.addEventListener("click", () => { + addImageToMain("lcp-133x106.png", "not_soft_nav_image"); + (new PerformanceObserver(non_soft_nav_click)).observe({type: "element"}); + }); + if (test_driver) { + test_driver.click(not_nav); + } + await non_soft_nav_click_promise; + })(); + const url = URL + "?" + counter; + link.addEventListener("click", () => { + // Add an LCP element. + const img = new Image(); + img.src = '/images/lcp-100x500.png' + "?" + Math.random(); + document.getElementById("main").appendChild(img); + history.back(); + }); + promise_test(async t => { + if (test_driver) { + test_driver.click(link); + } + await waitOnSoftNav(); + assert_equals( + document.softNavigations, 1, + 'Single Soft Navigation detected'); + const [entries, options] = await new Promise(resolve => { + (new PerformanceObserver((list, obs, options) => resolve( + [list.getEntries(), options]))).observe( + {type: 'soft-navigation', buffered: true}); + }); + + assert_equals(entries.length, 1, + "Performance observer got an entry"); + }, "Ensure that soft navigation entry emitted through a synchronous " + + "event that modified DOM and committed a same document navigation, " + + "and that was preceded by a user intreaction that resulted in a " + + "contentful paint is properly detected."); + })(); + </script> +</body> +</html> + + + + diff --git a/tests/wpt/tests/soft-navigation-heuristics/multiple_nested_events.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/multiple-nested-events.tentative.html index 196cfa06868..e51841865d6 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/multiple_nested_events.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/multiple-nested-events.tentative.html @@ -24,7 +24,6 @@ }); testSoftNavigation({ eventPrepWork: url => { - timestamps[counter]["eventStart"] = performance.now(); addTextToDivOnMain(); history.pushState({}, '', 'foobar1.html'); // Here we're bypassing the regular test's event logic, as this test is diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-after-transition-commit.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-after-transition-commit.tentative.html index 5c7d8f4f7a4..ae17db7d59f 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-after-transition-commit.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-after-transition-commit.tentative.html @@ -16,11 +16,11 @@ <script> const link = document.getElementById("link"); testNavigationApi("Test soft navigation when navigate event intecepts with { commit: 'after-transition' }", e => { - timestamps[counter]["eventStart"] = performance.now(); e.intercept({commit: "after-transition", handler: async () => { await addImageToMain(); e.commit(); }}); + timestamps[counter]["eventEnd"] = performance.now(); }, link); </script> </body> diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html index a63b177a63f..e20578ea79e 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html @@ -16,11 +16,11 @@ <script> const link = document.getElementById("link"); testNavigationApi("Test soft navigation with the Navigation API", e => { - timestamps[counter]["eventStart"] = performance.now(); e.intercept({handler: async () => { await addImageToMain(); main.appendChild(img); }}); + timestamps[counter]["eventEnd"] = performance.now(); }, link); </script> </body> diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html index d6c61efb3cb..b7b2a24c942 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-preventDefault.tentative.html @@ -19,12 +19,12 @@ testSoftNavigationNotDetected({ testName: "Aborted navigate event is not a soft navigation", eventHandler: e => { - timestamps[counter]["eventStart"] = performance.now(); e.intercept({handler: async () => { await addImageToMain(); main.appendChild(img); }}); e.preventDefault(); + timestamps[counter]["eventEnd"] = performance.now(); }, eventTarget: navigation, eventName: "navigate", diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-rejected.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-rejected.tentative.html index bcc0451d5bd..693f876b6e1 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-rejected.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-rejected.tentative.html @@ -16,11 +16,11 @@ <script> const link = document.getElementById("link"); testNavigationApi("Test intercepted and rejected navigate event", e => { - timestamps[counter]["eventStart"] = performance.now(); e.intercept({handler: async () => { await addImageToMain(); throw new Error("This navigation handler rejected"); }}); + timestamps[counter]["eventEnd"] = performance.now(); }, link); </script> </body> diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html index 2755f9f9ac7..4d88f3d0b7d 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html @@ -23,7 +23,6 @@ await new Promise(r => step_timeout(r, 0)); const navigate_callback = e => { - timestamps[counter]["eventStart"] = performance.now(); e.intercept({ async handler() { const lcp_promise = new Promise(resolve => { @@ -41,6 +40,7 @@ await lcp_promise; } }); + timestamps[counter]["eventEnd"] = performance.now(); }; const link = document.getElementById("link"); diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api.tentative.html index ca11f684f49..2d61736a486 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api.tentative.html @@ -16,10 +16,10 @@ <script> const link = document.getElementById("link"); testNavigationApi("Test soft navigation with the Navigation API", e => { - timestamps[counter]["eventStart"] = performance.now(); e.intercept({handler: async () => { await addImageToMain(); }}); + timestamps[counter]["eventEnd"] = performance.now(); }, link); </script> </body> diff --git a/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html index 2a12a352bff..fd87f5f03e7 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html @@ -39,7 +39,10 @@ return t.popped == 2; } const link = document.getElementById("link"); - link.addEventListener("click", () => history.back()); + link.addEventListener("click", () => { + history.back(); + timestamps[counter]["eventEnd"] = performance.now(); + }); testSoftNavigation({ addContent: () => { // Add the content to the main element diff --git a/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html index 60a5ff72292..f89991d76b0 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html @@ -22,7 +22,10 @@ history.pushState({}, "", "another_one.html"); const link = document.getElementById("link"); - link.addEventListener("click", () => history.back()); + link.addEventListener("click", () => { + history.back(); + timestamps[counter]["eventEnd"] = performance.now(); + }); testSoftNavigation({ addContent: () => { // Add the content to the main element diff --git a/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js b/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js index 58ca9c22657..d405adb4e7e 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js +++ b/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js @@ -6,7 +6,7 @@ const MAX_CLICKS = 50; const MAX_PAINT_ENTRIES = 51; const URL = "foobar.html"; const readValue = (value, defaultValue) => { - return value != undefined ? value : defaultValue; + return value !== undefined ? value : defaultValue; } const testSoftNavigation = options => { @@ -144,10 +144,17 @@ const setEvent = (t, button, pushState, addContent, pushUrl, eventType, prepWork const eventObject = (eventType == 'click' || eventType.startsWith("key")) ? button : window; eventObject.addEventListener(eventType, async e => { + let prepWorkFailed = false; if (prepWork &&!prepWork(t)) { + prepWorkFailed = true; + } + // This is the end of the event's sync processing. + if (!timestamps[counter]["eventEnd"]) { + timestamps[counter]["eventEnd"] = performance.now(); + } + if (prepWorkFailed) { return; } - timestamps[counter]["eventStart"] = performance.now(); // Jump through a task, to ensure task tracking is working properly. await new Promise(r => t.step_timeout(r, 0)); @@ -165,9 +172,9 @@ const setEvent = (t, button, pushState, addContent, pushUrl, eventType, prepWork await new Promise(r => t.step_timeout(r, 10)); await addContent(url); - ++counter; interacted = true; + ++counter; }); }; @@ -190,7 +197,7 @@ const validateSoftNavigationEntry = async (clicks, extraValidations, assert_less_than_equal(timestamps[i]["syncPostInteraction"], entryTimestamp, "Entry timestamp is lower than the post interaction one"); assert_greater_than_equal( - timestamps[i]['eventStart'], entryTimestamp, + entryTimestamp, timestamps[i]['eventEnd'], 'Event start timestamp matches'); assert_not_equals(entry.navigationId, performance.getEntriesByType("navigation")[0].navigationId, @@ -284,15 +291,16 @@ const getLcpEntriesWithoutSoftNavs = async () => { return entries; }; -const addImage = async (element, url="blue.png") => { +const addImage = async (element, url="blue.png", id = "imagelcp") => { const img = new Image(); img.src = '/images/'+ url + "?" + Math.random(); - img.id="imagelcp"; + img.id=id + img.setAttribute("elementtiming", id); await img.decode(); element.appendChild(img); }; -const addImageToMain = async (url="blue.png") => { - await addImage(document.getElementById('main'), url); +const addImageToMain = async (url="blue.png", id = "imagelcp") => { + await addImage(document.getElementById('main'), url, id); }; const addTextParagraphToMain = (text, element_timing = "") => { diff --git a/tests/wpt/tests/soft-navigation-heuristics/text-lcp-before-detection-second-softnav.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/text-lcp-before-detection-second-softnav.tentative.html new file mode 100644 index 00000000000..bed27c35069 --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/text-lcp-before-detection-second-softnav.tentative.html @@ -0,0 +1,62 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/soft-navigation-helper.js"></script> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +</head> +<body> + <main id=main> + <div> + <a id=link><img src="/images/lcp-256x256.png" id="img"></a> + </div> + </main> + <script> + const link = document.getElementById("link"); + let first_lcp_painted; + let second_lcp_painted; + (async () => { + await new Promise(r => { first_lcp_painted = r; }); + addTextParagraphToMain("LOREM IPSUMR", "no lcp"); + (new PerformanceObserver(second_lcp_painted)).observe({type: "element"}); + })(); + testSoftNavigation({ + pushState: null, + clicks: 2, + addContent: async () => { + // Add an LCP element. + await new Promise(resolve => { + const p = addTextParagraphToMain("Lorem Ipsum", /*element_timing=*/"first_lcp" + counter); + p.id = "first_lcp" + counter; + (new PerformanceObserver(resolve)).observe({type: "element"}); + }); + if(counter) { + first_lcp_painted(); + // Wait for the unrelated LCP to be painted. + await new Promise(r => { second_lcp_painted = r; }); + } + const url = URL + "?" + counter; + history.pushState({}, '', url); + }, + link: link, + validate: async () => { + const lcps = await getLcpEntries(); + const ref_counter = counter-1; + assert_equals(lcps.length, 2 + ref_counter, "Got 2 LCP entries"); + assert_equals(lcps[lcps.length - 1].id, "first_lcp" + ref_counter, "Got the first LCP"); + }, + test: "Second soft navigation text LCP discovered between user " + + "interaction and soft navigation detection are properly " + + "reported, while unrelated LCPs are ignored during that time. " + + "As a side effect, we also test element timing."}); + </script> +</body> +</html> + + + + diff --git a/tests/wpt/tests/soft-navigation-heuristics/text-lcp-before-detection.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/text-lcp-before-detection.tentative.html new file mode 100644 index 00000000000..11e82e539ff --- /dev/null +++ b/tests/wpt/tests/soft-navigation-heuristics/text-lcp-before-detection.tentative.html @@ -0,0 +1,55 @@ +<!DOCTYPE HTML> +<html> +<head> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/soft-navigation-helper.js"></script> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +</head> +<body> + <main id=main> + <div> + <a id=link><img src="/images/lcp-256x256.png" id="img"></a> + </div> + </main> + <script> + const link = document.getElementById("link"); + let first_lcp_painted; + let second_lcp_painted; + (async () => { + await new Promise(r => { first_lcp_painted = r; }); + addTextParagraphToMain("LOREM IPSUMR", "no lcp"); + (new PerformanceObserver(second_lcp_painted)).observe({type: "element"}); + })(); + testSoftNavigation({ + pushState: null, + addContent: async () => { + // Add an LCP element. + await new Promise(resolve => { + const p = addTextParagraphToMain("Lorem Ipsum", /*element_timing=*/"first_lcp"); + p.id = "first_lcp"; + (new PerformanceObserver(resolve)).observe({type: "element"}); + }); + first_lcp_painted(); + // Wait for the unrelated LCP to be painted. + await new Promise(r => { second_lcp_painted = r; }); + const url = URL + "?" + counter; + history.pushState({}, '', url); + }, + link: link, + validate: async () => { + const lcps = await getLcpEntries(); + assert_equals(lcps.length, 2, "Got 2 LCP entries"); + assert_equals(lcps[lcps.length - 1].id, "first_lcp", "Got the first LCP"); + }, + test: "Text LCP discovered between user interaction and soft " + + "navigation detection are properly reported, while unrelated " + + "LCPs are ignored during that time. As a side effect, we also " + + "test element timing."}); + </script> +</body> +</html> + diff --git a/tests/wpt/tests/speculation-rules/prerender/local-storage.html b/tests/wpt/tests/speculation-rules/prerender/local-storage.html index 59ba3a6d79c..73f760cfb08 100644 --- a/tests/wpt/tests/speculation-rules/prerender/local-storage.html +++ b/tests/wpt/tests/speculation-rules/prerender/local-storage.html @@ -1,5 +1,7 @@ <!DOCTYPE html> <title>Same-origin prerendering can access localStorage</title> +<meta name="variant" content="?target_hint=_self"> +<meta name="variant" content="?target_hint=_blank"> <meta name="timeout" content="long"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> @@ -28,8 +30,12 @@ promise_test(async t => { }, { once: true }); }); + const opt = {}; + const init_opt = {}; + const rule_extras = {'target_hint': getTargetHint()}; + window.localStorage.setItem('initial', uid1); - const {exec} = await create_prerendered_page(t); + const {exec} = await create_prerendered_page(t, opt, init_opt, rule_extras); const result = await exec(uid2 => { window.localStorage.setItem('prerender', uid2); return window.localStorage.getItem('initial'); diff --git a/tests/wpt/tests/speculation-rules/prerender/prerender-while-prerender.html b/tests/wpt/tests/speculation-rules/prerender/prerender-while-prerender.html index e04fafbfa8d..8aa80baf525 100644 --- a/tests/wpt/tests/speculation-rules/prerender/prerender-while-prerender.html +++ b/tests/wpt/tests/speculation-rules/prerender/prerender-while-prerender.html @@ -12,47 +12,35 @@ <script> setup(() => assertSpeculationRulesIsSupported()); -promise_test(async t => { - const rcHelper = new RemoteContextHelper(); - const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' }); - const outerPrerenderedRC = await addPrerenderRC(referrerRC); - - // Double-check we're set up correctly. - assert_equals(await outerPrerenderedRC.executeScript(() => document.prerendering), true); - - const innerPrerenderRC = await addPrerenderRC(outerPrerenderedRC); - - // Do not `await`. Since (per spec) prerendering is not allowed inside - // a prerender, there is not actually a real `RemoteContextHelper` - // representing the inner prerender at this time, since there is no - // prerender running. Instead, the `RemoteContextHelper` it is waiting - // for something to appear at its URL, which will happen later. At - // that time, the script will run. But `await`ing the script now would - // just block, since it will not run until that later point. - const scriptResultInInner = innerPrerenderRC.executeScript(() => document.prerendering); +// We attempted to write this test using `RemoteContextHelper`. See +// https://github.com/web-platform-tests/wpt/blob/23ed0c7015082f21dd29dd09a545e2979dc3e08c/speculation-rules/prerender/prerender-while-prerender.html. +// +// However, that ended up being flaky in Chromium. See +// https://bugs.chromium.org/p/chromium/issues/detail?id=1517319. +// +// We're unsure yet if that flakiness was due to a test bug or an implementation +// bug. In case it is due to a test bug, we are currently trying the following +// uglier `PrerenderChannel` version. If it is still flaky, then probably it is +// an implementation bug, and we can revert to the prettier +// `RemoteContextHelper` version. - // When the outer prerender is activated, inside the `prerenderingchange` - // event, attempt to activate the inner prerender. In reality, this will just - // perform a normal navigation to `innerPrerenderRC.url`. - await outerPrerenderedRC.executeScript(innerPrerenderRCURL => { - document.addEventListener("prerenderingchange", () => { - // executeScriptToNavigate is normally an implementation detail of the - // RemoteContextHelper framework, used by, e.g., `rch.navigateTo()`. - // However, because we're setting up an event listener to navigate later, - // we can't call `rch.navigateTo()`, and so need to call it directly. - executeScriptToNavigate(innerPrerenderRCURL => { - location.href = innerPrerenderRCURL; - }, [innerPrerenderRCURL]); - }); - }, [innerPrerenderRC.url]); - - // Now that everything is set up, activate the outer prerender. - await activatePrerenderRC(referrerRC, outerPrerenderedRC); - - // Testing that this is false means two things: - // - The inner prerender attempt did not happen; we did a normal navigation - // instead. - // - Nothing crashed or got confused. - assert_equals(await scriptResultInInner, false); +promise_test(async t => { + const uid = token(); + const channel = new PrerenderChannel("result", uid); + const result = new Promise(r => channel.addEventListener("message", e => r(e.data))); + + window.open( + `resources/prerender-while-prerender-initiator.html?uid=${uid}`, + "_blank", + "noopener" + ); + + assert_equals( + await result, + false, + "document.prerendering in the inner page must be false" + ); + + channel.close(); }, "Prerendering inside a prerender doesn't work, and navigating inside prerenderingchange is fine"); </script> diff --git a/tests/wpt/tests/speculation-rules/prerender/resources/prerender-while-prerender-initiator.html b/tests/wpt/tests/speculation-rules/prerender/resources/prerender-while-prerender-initiator.html new file mode 100644 index 00000000000..17642715818 --- /dev/null +++ b/tests/wpt/tests/speculation-rules/prerender/resources/prerender-while-prerender-initiator.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Prerender while prerendering test: referrer page, opened in a window</title> +<script src="utils.js"></script> + +<script type="module"> +const params = new URLSearchParams(location.search); +const uid = params.get("uid"); +const outerURL = `prerender-while-prerender-outer.html?uid=${uid}`; + +startPrerendering(outerURL); + +const channel = new PrerenderChannel("start-test", uid); +await new Promise(r => channel.addEventListener("message", r)); +channel.close(); + +location.href = outerURL; +</script> diff --git a/tests/wpt/tests/speculation-rules/prerender/resources/prerender-while-prerender-inner.html b/tests/wpt/tests/speculation-rules/prerender/resources/prerender-while-prerender-inner.html new file mode 100644 index 00000000000..60b6c64dedc --- /dev/null +++ b/tests/wpt/tests/speculation-rules/prerender/resources/prerender-while-prerender-inner.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Prerender while prerendering test: inner maybe-prerendered page</title> + +<script> +"use strict"; +window.onFirstScriptExecutedPrerendering = document.prerendering; +</script> + +<script src="utils.js"></script> + +<script type="module"> +const params = new URLSearchParams(location.search); +const uid = params.get("uid"); + +const channel = new PrerenderChannel("result", uid); +channel.postMessage(window.onFirstScriptExecutedPrerendering); +channel.close(); +</script> diff --git a/tests/wpt/tests/speculation-rules/prerender/resources/prerender-while-prerender-outer.html b/tests/wpt/tests/speculation-rules/prerender/resources/prerender-while-prerender-outer.html new file mode 100644 index 00000000000..313c34667f4 --- /dev/null +++ b/tests/wpt/tests/speculation-rules/prerender/resources/prerender-while-prerender-outer.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Prerender while prerendering test: outer prerendered page</title> +<script src="utils.js"></script> + +<script type="module"> +const params = new URLSearchParams(location.search); +const uid = params.get("uid"); +const innerURL = `prerender-while-prerender-inner.html?uid=${uid}`; + +startPrerendering(innerURL); +// Wait 5 seconds for any potential prerender to start and get to the point +// where it would send a message that would cause a failure. +await new Promise(r => setTimeout(r, 5_000)); + +document.addEventListener("prerenderingchange", () => { + location.href = innerURL; +}); + +const channel = new PrerenderChannel("start-test", uid); +channel.postMessage("ready to start"); +channel.close(); +</script> diff --git a/tests/wpt/tests/storage-access-api/helpers.js b/tests/wpt/tests/storage-access-api/helpers.js index 1ca0e121c6a..0fd5d814dbb 100644 --- a/tests/wpt/tests/storage-access-api/helpers.js +++ b/tests/wpt/tests/storage-access-api/helpers.js @@ -264,6 +264,14 @@ function FetchFromFrame(frame, url) { { command: "cors fetch", url }, frame.contentWindow); } +// Makes a subresource request to the provided host in the given frame with +// the mode set to 'no-cors' +function NoCorsSubresourceCookiesFromFrame(frame, host) { + const url = `${host}/storage-access-api/resources/echo-cookie-header.py`; + return PostMessageAndAwaitReply( + { command: "no-cors fetch", url }, frame.contentWindow); +} + // Tries to set storage access policy, ignoring any errors. // // Note: to discourage the writing of tests that assume unpartitioned cookie @@ -295,4 +303,4 @@ function MessageWorker(frame, message = {}) { function ReadCookiesFromWebSocketConnection(frame, origin) { return PostMessageAndAwaitReply( { command: "get_cookie_via_websocket", origin}, frame.contentWindow); -}
\ No newline at end of file +} diff --git a/tests/wpt/tests/storage-access-api/requestStorageAccess-cross-site-sibling-iframes.sub.https.window.js b/tests/wpt/tests/storage-access-api/requestStorageAccess-cross-site-sibling-iframes.sub.https.window.js index 06ee80e5a08..528b1616368 100644 --- a/tests/wpt/tests/storage-access-api/requestStorageAccess-cross-site-sibling-iframes.sub.https.window.js +++ b/tests/wpt/tests/storage-access-api/requestStorageAccess-cross-site-sibling-iframes.sub.https.window.js @@ -75,6 +75,8 @@ assert_true(cookieStringHasCookie("foo", "bar", await FetchSubresourceCookiesFromFrame(crossSiteFrame, wwwAlt)),"crossSiteFrame making same-origin subresource request can access cookies."); assert_false(cookieStringHasCookie("foo", "bar", await FetchSubresourceCookiesFromFrame(crossOriginFrame, wwwAlt)), "crossOriginFrame making cross-site subresource request to sibling iframe's host should not include cookies."); + + assert_false(cookieStringHasCookie("foo", "bar", await NoCorsSubresourceCookiesFromFrame(crossOriginFrame, www)), "crossSiteFrame making no-cors cross-site subresource request to sibling iframe's host should not include cookies."); assert_false(cookieStringHasCookie("cookie", "monster", await FetchSubresourceCookiesFromFrame(crossSiteFrame, www)),"crossSiteFrame making cross-site subresource request to sibling iframe's host should not include cookies."); }, "Cross-site sibling iframes should not be able to take advantage of the existing permission grant requested by others."); diff --git a/tests/wpt/tests/storage-access-api/resources/embedded_responder.js b/tests/wpt/tests/storage-access-api/resources/embedded_responder.js index 4a956c5f394..bc13c7e7e82 100644 --- a/tests/wpt/tests/storage-access-api/resources/embedded_responder.js +++ b/tests/wpt/tests/storage-access-api/resources/embedded_responder.js @@ -75,6 +75,9 @@ window.addEventListener("message", async (event) => { case "cors fetch": reply(await fetch(event.data.url, {mode: 'cors', credentials: 'include'}).then((resp) => resp.text())); break; + case "no-cors fetch": + reply(await fetch(event.data.url, {mode: 'no-cors', credentials: 'include'}).then((resp) => resp.text())); + break; case "start_dedicated_worker": worker = new Worker("embedded_worker.js"); reply(undefined); diff --git a/tests/wpt/tests/tools/ci/manifest_build.py b/tests/wpt/tests/tools/ci/manifest_build.py index 6d93a352583..15b8679f009 100644 --- a/tests/wpt/tests/tools/ci/manifest_build.py +++ b/tests/wpt/tests/tools/ci/manifest_build.py @@ -9,6 +9,9 @@ import tempfile import requests +from pathlib import Path + + here = os.path.abspath(os.path.dirname(__file__)) wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir)) @@ -39,6 +42,10 @@ def create_manifest(path): run(["./wpt", "manifest", "-p", path]) +def create_web_feature_manifest(path): + run(["./wpt", "web-features-manifest", "-p", path]) + + def compress_manifest(path): for args in [["gzip", "-k", "-f", "--best"], ["bzip2", "-k", "-f", "--best"], @@ -108,7 +115,20 @@ def get_pr(owner, repo, sha): return pr["number"] -def create_release(manifest_path, owner, repo, sha, tag, body): +def get_file_upload_details(manifest_path, sha): + """ + For a given file, generate details used to upload to GitHub. + """ + path = Path(manifest_path) + stem = path.stem + extension = path.suffix + upload_filename_prefix = f"{stem}-{sha}{extension}" + upload_label_prefix = path.name + upload_desc = f"{stem.title()} upload" + return upload_filename_prefix, upload_label_prefix, upload_desc + + +def create_release(manifest_file_paths, owner, repo, sha, tag, body): logger.info(f"Creating a release for tag='{tag}', target_commitish='{sha}'") create_url = f"https://api.github.com/repos/{owner}/{repo}/releases" create_data = {"tag_name": tag, @@ -124,20 +144,22 @@ def create_release(manifest_path, owner, repo, sha, tag, body): upload_url = create_resp["upload_url"].split("{", 1)[0] upload_exts = [".gz", ".bz2", ".zst"] - for upload_ext in upload_exts: - upload_filename = f"MANIFEST-{sha}.json{upload_ext}" - params = {"name": upload_filename, - "label": "MANIFEST.json%s" % upload_ext} + for manifest_path in manifest_file_paths: + upload_filename_prefix, upload_label_prefix, upload_desc = get_file_upload_details(manifest_path, sha) + for upload_ext in upload_exts: + upload_filename = f"{upload_filename_prefix}{upload_ext}" + params = {"name": upload_filename, + "label": f"{upload_label_prefix}{upload_ext}"} - with open(f"{manifest_path}{upload_ext}", "rb") as f: - upload_data = f.read() + with open(f"{manifest_path}{upload_ext}", "rb") as f: + upload_data = f.read() - logger.info("Uploading %s bytes" % len(upload_data)) + logger.info("Uploading %s bytes" % len(upload_data)) - upload_resp = request(upload_url, "Manifest upload", data=upload_data, params=params, - headers={'Content-Type': 'application/octet-stream'}) - if not upload_resp: - return False + upload_resp = request(upload_url, upload_desc, data=upload_data, params=params, + headers={'Content-Type': 'application/octet-stream'}) + if not upload_resp: + return False release_id = create_resp["id"] edit_url = f"https://api.github.com/repos/{owner}/{repo}/releases/{release_id}" @@ -169,10 +191,13 @@ def main(): dry_run = should_dry_run() manifest_path = os.path.join(tempfile.mkdtemp(), "MANIFEST.json") + web_features_manifest_path = os.path.join(tempfile.mkdtemp(), "WEB_FEATURES_MANIFEST.json") create_manifest(manifest_path) + create_web_feature_manifest(web_features_manifest_path) compress_manifest(manifest_path) + compress_manifest(web_features_manifest_path) owner, repo = os.environ["GITHUB_REPOSITORY"].split("/", 1) @@ -188,7 +213,8 @@ def main(): return Status.FAIL tag_name = "merge_pr_%s" % pr - if not create_release(manifest_path, owner, repo, head_rev, tag_name, body): + manifest_paths = [manifest_path, web_features_manifest_path] + if not create_release(manifest_paths, owner, repo, head_rev, tag_name, body): return Status.FAIL return Status.SUCCESS diff --git a/tests/wpt/tests/tools/ci/requirements_build.txt b/tests/wpt/tests/tools/ci/requirements_build.txt index 34baec00a5e..54f21efbd98 100644 --- a/tests/wpt/tests/tools/ci/requirements_build.txt +++ b/tests/wpt/tests/tools/ci/requirements_build.txt @@ -1,5 +1,5 @@ cairocffi==1.6.1 fonttools==4.47.2 genshi==0.7.7 -jinja2==3.1.2 +jinja2==3.1.3 pyyaml==6.0.1 diff --git a/tests/wpt/tests/tools/lint/lint.py b/tests/wpt/tests/tools/lint/lint.py index cf164b6820f..e3a555413b8 100644 --- a/tests/wpt/tests/tools/lint/lint.py +++ b/tests/wpt/tests/tools/lint/lint.py @@ -603,7 +603,7 @@ def check_global_metadata(value: bytes) -> Iterable[Tuple[Type[rules.Rule], Tupl def check_script_metadata(repo_root: Text, path: Text, f: IO[bytes]) -> List[rules.Error]: - if path.endswith((".worker.js", ".any.js")): + if path.endswith((".window.js", ".worker.js", ".any.js")): meta_re = js_meta_re broken_metadata = broken_js_metadata elif path.endswith(".py"): @@ -614,7 +614,7 @@ def check_script_metadata(repo_root: Text, path: Text, f: IO[bytes]) -> List[rul done = False errors = [] - for idx, line in enumerate(f): + for line_no, line in enumerate(f, 1): assert isinstance(line, bytes), line m = meta_re.match(line) @@ -622,29 +622,32 @@ def check_script_metadata(repo_root: Text, path: Text, f: IO[bytes]) -> List[rul key, value = m.groups() if key == b"global": for rule_class, context in check_global_metadata(value): - errors.append(rule_class.error(path, context, idx + 1)) + errors.append(rule_class.error(path, context, line_no)) elif key == b"timeout": if value != b"long": errors.append(rules.UnknownTimeoutMetadata.error(path, - line_no=idx + 1)) + line_no=line_no)) elif key == b"variant": if is_variant_malformed(value.decode()): value = f"{path} `META: variant=...` value" - errors.append(rules.MalformedVariant.error(path, (value,), idx + 1)) - elif key not in (b"title", b"script", b"quic"): - errors.append(rules.UnknownMetadata.error(path, - line_no=idx + 1)) + errors.append(rules.MalformedVariant.error(path, (value,), line_no)) + elif key == b"script": + if value == b"/resources/testharness.js": + errors.append(rules.MultipleTestharness.error(path, line_no=line_no)) + elif value == b"/resources/testharnessreport.js": + errors.append(rules.MultipleTestharnessReport.error(path, line_no=line_no)) + elif key not in (b"title", b"quic"): + errors.append(rules.UnknownMetadata.error(path, line_no=line_no)) else: done = True if done: if meta_re.match(line): - errors.append(rules.StrayMetadata.error(path, line_no=idx + 1)) + errors.append(rules.StrayMetadata.error(path, line_no=line_no)) elif meta_re.search(line): - errors.append(rules.IndentedMetadata.error(path, - line_no=idx + 1)) + errors.append(rules.IndentedMetadata.error(path, line_no=line_no)) elif broken_metadata.search(line): - errors.append(rules.BrokenMetadata.error(path, line_no=idx + 1)) + errors.append(rules.BrokenMetadata.error(path, line_no=line_no)) return errors diff --git a/tests/wpt/tests/tools/lint/rules.py b/tests/wpt/tests/tools/lint/rules.py index 471ca06a49a..c7b3a59b19e 100644 --- a/tests/wpt/tests/tools/lint/rules.py +++ b/tests/wpt/tests/tools/lint/rules.py @@ -156,8 +156,10 @@ class MultipleTestharness(Rule): name = "MULTIPLE-TESTHARNESS" description = "More than one `<script src='/resources/testharness.js'>`" to_fix = """ - ensure each test has only one `<script - src='/resources/testharnessreport.js'>` instance + Ensure each test has only one `<script + src='/resources/testharness.js'>` instance. + For `.js` tests, remove `// META: script=/resources/testharness.js`, + which wptserve already adds to the boilerplate markup. """ @@ -181,6 +183,12 @@ class MissingTestharnessReport(Rule): class MultipleTestharnessReport(Rule): name = "MULTIPLE-TESTHARNESSREPORT" description = "More than one `<script src='/resources/testharnessreport.js'>`" + to_fix = """ + Ensure each test has only one `<script + src='/resources/testharnessreport.js'>` instance. + For `.js` tests, remove `// META: script=/resources/testharnessreport.js`, + which wptserve already adds to the boilerplate markup. + """ class VariantMissing(Rule): diff --git a/tests/wpt/tests/tools/lint/tests/test_file_lints.py b/tests/wpt/tests/tools/lint/tests/test_file_lints.py index b48549c1313..f2ebcd9080a 100644 --- a/tests/wpt/tests/tools/lint/tests/test_file_lints.py +++ b/tests/wpt/tests/tools/lint/tests/test_file_lints.py @@ -975,6 +975,8 @@ def test_css_missing_file_tentative(): (b"""// META: foobar\n""", (1, "BROKEN-METADATA")), (b"""// META: foo=bar\n""", (1, "UNKNOWN-METADATA")), (b"""// META: timeout=bar\n""", (1, "UNKNOWN-TIMEOUT-METADATA")), + (b"""// META: script=/resources/testharness.js""", (1, "MULTIPLE-TESTHARNESS")), + (b"""// META: script=/resources/testharnessreport.js""", (1, "MULTIPLE-TESTHARNESSREPORT")), ]) def test_script_metadata(filename, input, error): errors = check_file_contents("", filename, io.BytesIO(input)) @@ -991,6 +993,10 @@ def test_script_metadata(filename, input, error): "MALFORMED-VARIANT": ( f"{filename} `META: variant=...` value must be a non empty " "string and start with '?' or '#'"), + "MULTIPLE-TESTHARNESS": ( + "More than one `<script src='/resources/testharness.js'>`"), + "MULTIPLE-TESTHARNESSREPORT": ( + "More than one `<script src='/resources/testharnessreport.js'>`"), } assert errors == [ (kind, diff --git a/tests/wpt/tests/tools/manifest/sourcefile.py b/tests/wpt/tests/tools/manifest/sourcefile.py index 832968e6323..23aa7f491fc 100644 --- a/tests/wpt/tests/tools/manifest/sourcefile.py +++ b/tests/wpt/tests/tools/manifest/sourcefile.py @@ -29,6 +29,10 @@ from .item import (ConformanceCheckerTest, WebDriverSpecTest) from .utils import cached_property +# Cannot do `from ..metadata.webfeatures.schema import WEB_FEATURES_YML_FILENAME` +# because relative import beyond toplevel throws *ImportError*! +from metadata.webfeatures.schema import WEB_FEATURES_YML_FILENAME # type: ignore + wd_pattern = "*.py" js_meta_re = re.compile(br"//\s*META:\s*(\w*)=(.*)$") python_meta_re = re.compile(br"#\s*META:\s*(\w*)=(.*)$") @@ -302,6 +306,7 @@ class SourceFile: return (self.is_dir() or self.name_prefix("MANIFEST") or self.filename == "META.yml" or + self.filename == WEB_FEATURES_YML_FILENAME or self.filename.startswith(".") or self.filename.endswith(".headers") or self.filename.endswith(".ini") or diff --git a/tests/wpt/tests/tools/manifest/tests/test_sourcefile.py b/tests/wpt/tests/tools/manifest/tests/test_sourcefile.py index 298e480c142..8a9d8c36ee1 100644 --- a/tests/wpt/tests/tools/manifest/tests/test_sourcefile.py +++ b/tests/wpt/tests/tools/manifest/tests/test_sourcefile.py @@ -42,6 +42,8 @@ def items(s): "crashtests/foo.html.ini", "css/common/test.html", "css/CSS2/archive/test.html", + "css/WEB_FEATURES.yml", + "css/META.yml", ]) def test_name_is_non_test(rel_path): s = create(rel_path) diff --git a/tests/wpt/tests/tools/serve/serve.py b/tests/wpt/tests/tools/serve/serve.py index 5ba20e04580..116a98c0fcd 100644 --- a/tests/wpt/tests/tools/serve/serve.py +++ b/tests/wpt/tests/tools/serve/serve.py @@ -424,6 +424,17 @@ class ShadowRealmHandler(HtmlWrapperHandler): (async function() { const r = new ShadowRealm(); r.evaluate("globalThis.self = globalThis; undefined;"); + r.evaluate(`func => { + globalThis.fetch_json = (resource) => { + const thenMethod = func(resource); + return new Promise((resolve, reject) => thenMethod((s) => resolve(JSON.parse(s)), reject)); + }; + }`)((resource) => function (resolve, reject) { + fetch(resource).then(res => res.text(), String).then(resolve, reject); + }); + r.evaluate(`s => { + globalThis.location = { search: s }; + }`)(location.search); await new Promise(r.evaluate(` (resolve, reject) => { (async () => { diff --git a/tests/wpt/tests/tools/web_features/MANIFEST_SCHEMA.json b/tests/wpt/tests/tools/web_features/MANIFEST_SCHEMA.json new file mode 100644 index 00000000000..9fe4b68eb45 --- /dev/null +++ b/tests/wpt/tests/tools/web_features/MANIFEST_SCHEMA.json @@ -0,0 +1,35 @@ +{ + "$schema":"http://json-schema.org/draft-06/schema#", + "$ref":"#/definitions/File", + "definitions":{ + "File":{ + "type":"object", + "additionalProperties":false, + "properties":{ + "version":{ + "type":"integer", + "description":"Schema version of the file.", + "enum":[ + 1 + ] + }, + "data":{ + "type":"object", + "description":"High level container for the data. Object key is the web-features identifier.", + "additionalProperties":{ + "type":"array", + "items":{ + "type":"string", + "description":"The url field in tools.manifest.item.URLManifestItem" + } + } + } + }, + "required":[ + "data", + "version" + ], + "title":"File" + } + } +}
\ No newline at end of file diff --git a/tests/wpt/tests/tools/web_features/__init__.py b/tests/wpt/tests/tools/web_features/__init__.py new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/tests/tools/web_features/__init__.py diff --git a/tests/wpt/tests/tools/web_features/commands.json b/tests/wpt/tests/tools/web_features/commands.json new file mode 100644 index 00000000000..9a54b1b00da --- /dev/null +++ b/tests/wpt/tests/tools/web_features/commands.json @@ -0,0 +1,12 @@ +{ + "web-features-manifest": { + "path": "manifest.py", + "script": "main", + "parser": "create_parser", + "help": "Create the WEB_FEATURES_MANIFEST.json", + "virtualenv": true, + "requirements": [ + "../metadata/yaml/requirements.txt" + ] + } +} diff --git a/tests/wpt/tests/tools/web_features/manifest.py b/tests/wpt/tests/tools/web_features/manifest.py new file mode 100644 index 00000000000..3a4ec1a6f27 --- /dev/null +++ b/tests/wpt/tests/tools/web_features/manifest.py @@ -0,0 +1,208 @@ +#!/usr/bin/env python3 + +import argparse +import json +import logging +import os + +from dataclasses import dataclass +from pathlib import Path +from typing import Any, List, Optional + +from ..manifest.item import SupportFile +from ..manifest.sourcefile import SourceFile +from ..metadata.yaml.load import load_data_to_dict +from ..web_features.web_feature_map import WebFeatureToTestsDirMapper, WebFeaturesMap +from .. import localpaths +from ..metadata.webfeatures.schema import WEB_FEATURES_YML_FILENAME, WebFeaturesFile + +""" +This command generates a manifest file containing a mapping of web-feature +identifiers to test paths. + +The web-feature identifiers are sourced from https://github.com/web-platform-dx/web-features. +They are used in WEB_FEATURES.yml files located throughout the WPT source code. +Each file defines which test files correspond to a specific identifier. +Refer to RFC 163 (https://github.com/web-platform-tests/rfcs/pull/163) for more +file details. + +This command processes all WEB_FEATURES.yml files, extracts the list of test +paths from the test files, and writes them to a manifest file. The manifest +file maps web-feature identifiers to their corresponding test paths. + +The file written is a JSON file. An example file looks like: + +{ + "version": 1, + "data": { + "async-clipboard": [ + "/clipboard-apis/async-custom-formats-write-fail.tentative.https.html", + "/clipboard-apis/async-custom-formats-write-read-web-prefix.tentative.https.html" + ], + "idle-detection": [ + "/idle-detection/basics.tentative.https.window.html", + "/idle-detection/idle-detection-allowed-by-permissions-policy-attribute-redirect-on-load.https.sub.html" + ] + } +} + + +The JSON Schema for the file format can be found at MANIFEST_SCHEMA.json + +This file does not follow the same format as the original manifest file, +MANIFEST.json. +""" + +logger = logging.getLogger(__name__) + +MANIFEST_FILE_NAME = "WEB_FEATURES_MANIFEST.json" + + +def abs_path(path: str) -> str: + return os.path.abspath(os.path.expanduser(path)) + +def create_parser() -> argparse.ArgumentParser: + """ + Creates an argument parser for the script. + + Returns: + argparse.ArgumentParser: The configured argument parser. + """ + parser = argparse.ArgumentParser( + description="Maps tests to web-features within a repo root." + ) + parser.add_argument( + "-p", "--path", type=abs_path, help="Path to manifest file.") + return parser + + +def find_all_test_files_in_dir(root_dir: str, rel_dir_path: str, url_base: str) -> List[SourceFile]: + """ + Finds all test files within a given directory. + + Ignores any SourceFiles that are marked as non_test or the type + is SupportFile.item_type + + Args: + root_dir (str): The root directory of the repository. + rel_dir_path (str): The relative path of the directory to search. + url_base (str): Base url to use as the mount point for tests in this manifest. + + Returns: + List[SourceFile]: A list of SourceFile objects representing the found test files. + """ + rv: List[SourceFile] = [] + full_dir_path = os.path.join(root_dir, rel_dir_path) + for file in os.listdir(full_dir_path): + full_path = os.path.join(full_dir_path, file) + rel_file_path = os.path.relpath(full_path, root_dir) + source_file = SourceFile(root_dir, rel_file_path, url_base) + if not source_file.name_is_non_test and source_file.type != SupportFile.item_type: + rv.append(source_file) + return rv + +@dataclass +class CmdConfig(): + """ + Configuration for the command-line options. + """ + + repo_root: str # The root directory of the WPT repository + url_base: str # Base URL used when converting file paths to urls + + +def map_tests_to_web_features( + cmd_cfg: CmdConfig, + rel_dir_path: str, + result: WebFeaturesMap, + prev_inherited_features: List[str] = []) -> None: + """ + Recursively maps tests to web-features within a directory structure. + + Args: + cmd_cfg (CmdConfig): The configuration for the command-line options. + rel_dir_path (str): The relative path of the directory to process. + result (WebFeaturesMap): The object to store the mapping results. + prev_inherited_features (List[str], optional): A list of inherited web-features from parent directories. Defaults to []. + """ + # Sometimes it will add a . at the beginning. Let's resolve the absolute path to disambiguate. + # current_path = Path(os.path.join(cmd_cfg.repo_root, rel_dir_path)).resolve() + current_dir = str(Path(os.path.join(cmd_cfg.repo_root, rel_dir_path)).resolve()) + + # Create a copy that may be built upon or cleared during this iteration. + inherited_features = prev_inherited_features.copy() + + rel_dir_path = os.path.relpath(current_dir, cmd_cfg.repo_root) + + web_feature_yml_full_path = os.path.join(current_dir, WEB_FEATURES_YML_FILENAME) + web_feature_file: Optional[WebFeaturesFile] = None + if os.path.isfile(web_feature_yml_full_path): + try: + web_feature_file = WebFeaturesFile(load_data_to_dict( + open(web_feature_yml_full_path, "rb"))) + except Exception as e: + raise e + + WebFeatureToTestsDirMapper( + find_all_test_files_in_dir(cmd_cfg.repo_root, rel_dir_path, cmd_cfg.url_base), + web_feature_file + ).run(result, inherited_features) + + sub_dirs = [f for f in os.listdir(current_dir) if os.path.isdir(os.path.join(current_dir, f))] + for sub_dir in sub_dirs: + map_tests_to_web_features( + cmd_cfg, + os.path.join(rel_dir_path, sub_dir), + result, + inherited_features + ) + +class WebFeatureManifestEncoder(json.JSONEncoder): + """ + Custom JSON encoder. + + WebFeaturesMap contains a dictionary where the value is of type set. + Sets cannot serialize to JSON by default. This encoder handles that by + calling WebFeaturesMap's to_dict() method. + """ + def default(self, obj: Any) -> Any: + if isinstance(obj, WebFeaturesMap): + return obj.to_dict() + return super().default(obj) + + +def write_manifest_file(path: str, web_features_map: WebFeaturesMap) -> None: + """ + Serializes the WebFeaturesMap to a JSON manifest file at the specified path. + + The generated JSON file adheres to the schema defined in the "MANIFEST_SCHEMA.json" file. The + serialization process uses the custom `WebFeatureManifestEncoder` to ensure correct formatting. + + Args: + path (str): The file path where the manifest file will be created or overwritten. + web_features_map (WebFeaturesMap): The object containing the mapping between + web-features and their corresponding test paths. + """ + with open(path, "w") as outfile: + outfile.write( + json.dumps( + { + "version": 1, + "data": web_features_map + }, cls=WebFeatureManifestEncoder)) + + +def main(venv: Any = None, **kwargs: Any) -> int: + + assert logger is not None + + repo_root = localpaths.repo_root + url_base = "/" + path = kwargs.get("path") or os.path.join(repo_root, MANIFEST_FILE_NAME) + + cmd_cfg = CmdConfig(repo_root, url_base) + feature_map = WebFeaturesMap() + map_tests_to_web_features(cmd_cfg, "", feature_map) + write_manifest_file(path, feature_map) + + return 0 diff --git a/tests/wpt/tests/tools/web_features/tests/__init__.py b/tests/wpt/tests/tools/web_features/tests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/tests/tools/web_features/tests/__init__.py diff --git a/tests/wpt/tests/tools/web_features/tests/test_manifest.py b/tests/wpt/tests/tools/web_features/tests/test_manifest.py new file mode 100644 index 00000000000..8b656876ff3 --- /dev/null +++ b/tests/wpt/tests/tools/web_features/tests/test_manifest.py @@ -0,0 +1,260 @@ +# mypy: ignore-errors + +import json +import os +from jsonschema import validate +from unittest.mock import ANY, Mock, call, mock_open, patch + +import pytest + +from ..manifest import create_parser, find_all_test_files_in_dir, main, map_tests_to_web_features, write_manifest_file, CmdConfig +from ..web_feature_map import WebFeatureToTestsDirMapper, WebFeaturesMap +from ...metadata.webfeatures.schema import WEB_FEATURES_YML_FILENAME +from ...manifest.sourcefile import SourceFile +from ...manifest.item import SupportFile, URLManifestItem +from ... import localpaths + + +@patch("os.listdir") +@patch("tools.web_features.manifest.SourceFile") +def test_find_all_test_files_in_dir(mock_source_file_class, mock_listdir): + mock_listdir.return_value = ["test1.html", "support.py", "test2.html", "test3.html"] + + def create_source_file_mock(root_dir, rel_file_path, separator): + source_file = Mock(spec=SourceFile) + if rel_file_path.endswith("support.py"): + source_file.name_is_non_test = True + source_file.type = SupportFile.item_type + else: + source_file.name_is_non_test = False + return source_file + + mock_source_file_class.side_effect = create_source_file_mock + + test_files = find_all_test_files_in_dir("root_dir", "rel_dir_path", "/") + + # Assert calls to the mocked constructor with expected arguments + mock_source_file_class.assert_has_calls([ + call("root_dir", os.path.join("rel_dir_path", "test1.html"), "/"), + call("root_dir", os.path.join("rel_dir_path", "support.py"), "/"), + call("root_dir", os.path.join("rel_dir_path", "test2.html"), "/"), + call("root_dir", os.path.join("rel_dir_path", "test3.html"), "/"), + ]) + assert mock_source_file_class.call_count == 4 + + + # Assert attributes of the resulting test files + assert all( + not file.name_is_non_test and file.type != SupportFile.item_type + for file in test_files + ) + + # Should only have 3 items instead of the original 4 + assert len(test_files) == 3 + +@patch("builtins.open", new_callable=mock_open, read_data="data") +@patch("os.listdir") +@patch("os.path.isdir") +@patch("os.path.isfile") +@patch("tools.web_features.manifest.load_data_to_dict", return_value={}) +@patch("tools.web_features.manifest.find_all_test_files_in_dir") +@patch("tools.web_features.manifest.WebFeaturesFile") +@patch("tools.web_features.manifest.WebFeatureToTestsDirMapper", spec=WebFeatureToTestsDirMapper) +def test_map_tests_to_web_features_recursive( + mock_mapper, + mock_web_features_file, + mock_find_all_test_files_in_dir, + mock_load_data_to_dict, + mock_isfile, + mock_isdir, + mock_listdir, + mock_file +): + def fake_listdir(path): + if path.endswith("repo_root"): + return ["subdir1", "subdir2"] + elif path.endswith(os.path.join("repo_root", "subdir1")): + return ["subdir1_1", "subdir1_2", WEB_FEATURES_YML_FILENAME] + elif path.endswith(os.path.join("repo_root", "subdir1", "subdir1_1")): + return [WEB_FEATURES_YML_FILENAME] + elif path.endswith(os.path.join("repo_root", "subdir1", "subdir1_2")): + return [] + elif path.endswith(os.path.join("repo_root", "subdir2")): + return [WEB_FEATURES_YML_FILENAME] + else: + [] + mock_listdir.side_effect = fake_listdir + + def fake_isdir(path): + if (path.endswith(os.path.join("repo_root", "subdir1")) or + path.endswith(os.path.join("repo_root", "subdir1", "subdir1_1")) or + path.endswith(os.path.join("repo_root", "subdir1", "subdir1_2")) or + path.endswith(os.path.join("repo_root", "subdir2"))): + return True + return False + mock_isdir.side_effect = fake_isdir + + def fake_isfile(path): + if (path.endswith(os.path.join("repo_root", "subdir1", "WEB_FEATURES.yml")) or + path.endswith(os.path.join("repo_root", "subdir1", "subdir1_1", "WEB_FEATURES.yml")) or + path.endswith(os.path.join("repo_root", "subdir2", "WEB_FEATURES.yml"))): + return True + return False + mock_isfile.side_effect = fake_isfile + + + expected_root_files = [ + Mock(name="root_test_1"), + ] + + expected_subdir1_files = [ + Mock(name="subdir1_test_1"), + Mock(name="subdir1_test_2"), + ] + + expected_subdir2_files = [ + Mock(name="subdir2_test_1"), + ] + + expected_subdir1_1_files = [ + Mock(name="subdir1_1_test_1"), + Mock(name="subdir1_1_test_2"), + ] + + expected_subdir1_2_files = [ + Mock(name="subdir1_2_test_1"), + Mock(name="subdir1_2_test_2"), + ] + + expected_subdir1_web_feature_file = Mock() + expected_subdir1_1_web_feature_file = Mock() + expected_subdir2_web_feature_file = Mock() + mock_web_features_file.side_effect = [ + expected_subdir1_web_feature_file, + expected_subdir1_1_web_feature_file, + expected_subdir2_web_feature_file, + ] + + def fake_find_all_test_files_in_dir(root, rel_path, url_root): + # All cases should use url_root == "/" + if url_root != "/": + return None + elif (root == "repo_root" and rel_path == "."): + return expected_root_files + elif (root == "repo_root" and rel_path == "subdir1"): + return expected_subdir1_files + elif (root == "repo_root" and rel_path == os.path.join("subdir1", "subdir1_1")): + return expected_subdir1_1_files + elif (root == "repo_root" and rel_path == os.path.join("subdir1", "subdir1_2")): + return expected_subdir1_2_files + elif (root == "repo_root" and rel_path == "subdir2"): + return expected_subdir2_files + mock_find_all_test_files_in_dir.side_effect = fake_find_all_test_files_in_dir + cmd_cfg = CmdConfig("repo_root", "/") + result = WebFeaturesMap() + + map_tests_to_web_features(cmd_cfg, "", result) + + assert mock_isfile.call_count == 5 + assert mock_mapper.call_count == 5 + + # Check for the constructor calls. + # In between also assert that the run() call is executed. + mock_mapper.assert_has_calls([ + call(expected_root_files, None), + call().run(ANY, []), + call(expected_subdir1_files, expected_subdir1_web_feature_file), + call().run(ANY, []), + call(expected_subdir1_1_files, expected_subdir1_1_web_feature_file), + call().run(ANY, []), + call(expected_subdir1_2_files, None), + call().run(ANY, []), + call(expected_subdir2_files, expected_subdir2_web_feature_file), + call().run(ANY, []), + ]) + + + # Only five times to the constructor + assert mock_mapper.call_count == 5 + + +def test_parser_with_path_provided_abs_path(): + parser = create_parser() + args = parser.parse_args(["--path", f"{os.path.abspath(os.sep)}manifest-path"]) + assert args.path == f"{os.path.abspath(os.sep)}manifest-path" + +def populate_test_web_features_map(web_features_map): + web_features_map.add("grid", [ + Mock(spec=URLManifestItem, url="/grid_test1.js"), + Mock(spec=URLManifestItem, url="/grid_test2.js"), + ]) + web_features_map.add("avif", [Mock(spec=URLManifestItem, url="/avif_test1.js")]) + + +def test_valid_schema(): + with open(os.path.join(os.path.dirname(__file__), '..', 'MANIFEST_SCHEMA.json'), 'r') as schema_file: + schema_dict = json.load(schema_file) + + web_features_map = WebFeaturesMap() + populate_test_web_features_map(web_features_map) + + with patch('builtins.open', new_callable=mock_open) as mock_file: + write_manifest_file("test_file.json", web_features_map) + mock_file.assert_called_once_with("test_file.json", "w") + mock_file.return_value.write.assert_called_once_with( + ('{"version": 1,' + ' "data": {"grid": ["/grid_test1.js", "/grid_test2.js"], "avif": ["/avif_test1.js"]}}')) + args = mock_file.return_value.write.call_args + file_dict = json.loads(args[0][0]) + # Should not throw an exception + try: + validate(file_dict, schema_dict) + except Exception as e: + assert False, f"'validate' raised an exception {e}" + + +@pytest.mark.parametrize('main_kwargs,expected_repo_root,expected_path', [ + # No flags. All default + ( + {}, + localpaths.repo_root, + os.path.join(localpaths.repo_root, "WEB_FEATURES_MANIFEST.json") + ), + # Provide the path flag + ( + { + "path": os.path.join(os.sep, "test_path", "WEB_FEATURES_MANIFEST.json"), + }, + localpaths.repo_root, + os.path.join(os.sep, "test_path", "WEB_FEATURES_MANIFEST.json") + ), +]) +@patch("tools.web_features.manifest.map_tests_to_web_features") +@patch("tools.web_features.manifest.write_manifest_file") +def test_main( + mock_write_manifest_file, + mock_map_tests_to_web_features, + main_kwargs, + expected_repo_root, + expected_path): + + def fake_map_tests_to_web_features( + cmd_cfg, + rel_dir_path, + result, + prev_inherited_features = []): + populate_test_web_features_map(result) + + default_kwargs = {"url_base": "/"} + main_kwargs.update(default_kwargs) + mock_map_tests_to_web_features.side_effect = fake_map_tests_to_web_features + main(**main_kwargs) + mock_map_tests_to_web_features.assert_called_once_with(CmdConfig(repo_root=expected_repo_root, url_base="/"), "", ANY) + mock_write_manifest_file.assert_called_once() + args = mock_write_manifest_file.call_args + path = args[0][0] + file = args[0][1] + assert path == expected_path + assert file.to_dict() == { + 'avif': ['/avif_test1.js'], + 'grid': ['/grid_test1.js', '/grid_test2.js']} diff --git a/tests/wpt/tests/tools/web_features/tests/test_web_feature_map.py b/tests/wpt/tests/tools/web_features/tests/test_web_feature_map.py new file mode 100644 index 00000000000..06afa181fe5 --- /dev/null +++ b/tests/wpt/tests/tools/web_features/tests/test_web_feature_map.py @@ -0,0 +1,157 @@ +# mypy: allow-untyped-defs + +from unittest.mock import Mock, patch + +from ...manifest.item import URLManifestItem +from ...metadata.webfeatures.schema import FeatureFile +from ..web_feature_map import WebFeaturesMap, WebFeatureToTestsDirMapper + + +TEST_FILES = [ + Mock( + path="root/blob-range.any.js", + manifest_items=Mock( + return_value=( + None, + [ + Mock(spec=URLManifestItem, url="/root/blob-range.any.html"), + Mock(spec=URLManifestItem, url="/root/blob-range.any.worker.html"), + ]) + ) + ), + Mock( + path="root/foo-range.any.js", + manifest_items=Mock( + return_value=( + None, + [ + Mock(spec=URLManifestItem, url="/root/foo-range.any.html"), + Mock(spec=URLManifestItem, url="/root/foo-range.any.worker.html"), + ]) + ) + ), +] + +def test_process_recursive_feature(): + mapper = WebFeatureToTestsDirMapper(TEST_FILES, None) + result = WebFeaturesMap() + inherited_features = [] + + feature_entry = Mock() + feature_entry.name = "grid" + mapper._process_recursive_feature(inherited_features, feature_entry, result) + + assert result.to_dict() == { + "grid": [ + "/root/blob-range.any.html", + "/root/blob-range.any.worker.html", + "/root/foo-range.any.html", + "/root/foo-range.any.worker.html", + ], + } + assert inherited_features == ["grid"] + + +def test_process_non_recursive_feature(): + feature_name = "feature1" + feature_files = [ + FeatureFile("blob-range.any.js"), # Matches blob-range.any.js + FeatureFile("blob-range.html"), # Doesn't match any test file + ] + + mapper = WebFeatureToTestsDirMapper(TEST_FILES, None) + result = WebFeaturesMap() + + mapper._process_non_recursive_feature(feature_name, feature_files, result) + + assert result.to_dict() == { + "feature1": [ + "/root/blob-range.any.html", + "/root/blob-range.any.worker.html", + ] + } + + +def test_process_inherited_features(): + mapper = WebFeatureToTestsDirMapper(TEST_FILES, None) + result = WebFeaturesMap() + result.add("avif", [ + Mock(spec=URLManifestItem, path="root/bar-range.any.html", url="/root/bar-range.any.html"), + Mock(spec=URLManifestItem, path="root/bar-range.any.worker.html", url="/root/bar-range.any.worker.html"), + ]) + inherited_features = ["avif", "grid"] + + mapper._process_inherited_features(inherited_features, result) + + assert result.to_dict() == { + "avif": [ + "/root/bar-range.any.html", + "/root/bar-range.any.worker.html", + "/root/blob-range.any.html", + "/root/blob-range.any.worker.html", + "/root/foo-range.any.html", + "/root/foo-range.any.worker.html", + ], + "grid": [ + "/root/blob-range.any.html", + "/root/blob-range.any.worker.html", + "/root/foo-range.any.html", + "/root/foo-range.any.worker.html", + ], + } + assert inherited_features == ["avif", "grid"] + +def create_feature_entry(name, recursive=False, files=None): + rv = Mock(does_feature_apply_recursively=Mock(return_value=recursive)) + rv.name = name + rv.files = files + return rv + + +@patch("tools.web_features.web_feature_map.WebFeatureToTestsDirMapper._process_recursive_feature") +@patch("tools.web_features.web_feature_map.WebFeatureToTestsDirMapper._process_non_recursive_feature") +@patch("tools.web_features.web_feature_map.WebFeatureToTestsDirMapper._process_inherited_features") +def test_run_with_web_feature_file( + _process_inherited_features, + _process_non_recursive_feature, + _process_recursive_feature): + feature_entry1 = create_feature_entry("feature1", True) + feature_entry2 = create_feature_entry("feature2", files=[FeatureFile("test_file1.py")]) + mock_web_feature_file = Mock( + features=[ + feature_entry1, + feature_entry2, + ]) + mapper = WebFeatureToTestsDirMapper(TEST_FILES, mock_web_feature_file) + + + result = WebFeaturesMap() + mapper.run(result, ["foo", "bar"]) + + _process_recursive_feature.assert_called_once_with( + [], feature_entry1, result + ) + _process_non_recursive_feature.assert_called_once_with( + "feature2", [FeatureFile("test_file1.py")], result + ) + + assert not _process_inherited_features.called + +@patch("tools.web_features.web_feature_map.WebFeatureToTestsDirMapper._process_recursive_feature") +@patch("tools.web_features.web_feature_map.WebFeatureToTestsDirMapper._process_non_recursive_feature") +@patch("tools.web_features.web_feature_map.WebFeatureToTestsDirMapper._process_inherited_features") +def test_run_without_web_feature_file( + _process_inherited_features, + _process_non_recursive_feature, + _process_recursive_feature): + mapper = WebFeatureToTestsDirMapper(TEST_FILES, None) + + result = WebFeaturesMap() + mapper.run(result, ["foo", "bar"]) + + assert not _process_recursive_feature.called + assert not _process_non_recursive_feature.called + + _process_inherited_features.assert_called_once_with( + ["foo", "bar"], result + ) diff --git a/tests/wpt/tests/tools/web_features/web_feature_map.py b/tests/wpt/tests/tools/web_features/web_feature_map.py new file mode 100644 index 00000000000..d66b07e1146 --- /dev/null +++ b/tests/wpt/tests/tools/web_features/web_feature_map.py @@ -0,0 +1,119 @@ +import itertools + +from collections import OrderedDict +from os.path import basename +from typing import Dict, List, Optional, Sequence, Set + +from ..manifest.item import ManifestItem, URLManifestItem +from ..manifest.sourcefile import SourceFile +from ..metadata.webfeatures.schema import FeatureEntry, FeatureFile, WebFeaturesFile + + +class WebFeaturesMap: + """ + Stores a mapping of web-features to their associated test paths. + """ + + def __init__(self) -> None: + """ + Initializes the WebFeaturesMap with an OrderedDict to maintain feature order. + """ + self._feature_tests_map_: OrderedDict[str, Set[str]] = OrderedDict() + + + def add(self, feature: str, manifest_items: List[ManifestItem]) -> None: + """ + Adds a web feature and its associated test paths to the map. + + Args: + feature: The web-features identifier. + manifest_items: The ManifestItem objects representing the test paths. + """ + tests = self._feature_tests_map_.get(feature, set()) + self._feature_tests_map_[feature] = tests.union([ + manifest_item.url for manifest_item in manifest_items if isinstance(manifest_item, URLManifestItem)]) + + + def to_dict(self) -> Dict[str, List[str]]: + """ + Returns: + The plain dictionary representation of the map. + """ + rv: Dict[str, List[str]] = {} + for feature, manifest_items in self._feature_tests_map_.items(): + # Sort the list to keep output stable + rv[feature] = sorted(manifest_items) + return rv + + +class WebFeatureToTestsDirMapper: + """ + Maps web-features to tests within a specified directory. + """ + + def __init__( + self, + all_test_files_in_dir: List[SourceFile], + web_feature_file: Optional[WebFeaturesFile]): + """ + Initializes the mapper with test paths and web feature information. + """ + + self.all_test_files_in_dir = all_test_files_in_dir + self.test_path_to_manifest_items_map = dict([(basename(f.path), f.manifest_items()[1]) for f in self.all_test_files_in_dir]) + # Used to check if the current directory has a WEB_FEATURE_FILENAME + self.web_feature_file = web_feature_file + # Gets the manifest items for each test path and returns them into a single list. + self. get_all_manifest_items_for_dir = list(itertools.chain.from_iterable([ + items for _, items in self.test_path_to_manifest_items_map.items()])) + + + def _process_inherited_features( + self, + inherited_features: List[str], + result: WebFeaturesMap) -> None: + # No WEB_FEATURE.yml in this directory. Simply add the current features to the inherited features + for inherited_feature in inherited_features: + result.add(inherited_feature, self.get_all_manifest_items_for_dir) + + def _process_recursive_feature( + self, + inherited_features: List[str], + feature: FeatureEntry, + result: WebFeaturesMap) -> None: + inherited_features.append(feature.name) + result.add(feature.name, self.get_all_manifest_items_for_dir) + + def _process_non_recursive_feature( + self, + feature_name: str, + files: Sequence[FeatureFile], + result: WebFeaturesMap) -> None: + # If the feature does not apply recursively, look at the individual + # files and match them against all_test_files_in_dir. + test_file_paths: List[ManifestItem] = [] + base_test_file_names = [basename(f.path) for f in self.all_test_files_in_dir] + for test_file in files: + matched_base_file_names = test_file.match_files(base_test_file_names) + test_file_paths.extend(itertools.chain.from_iterable([ + self.test_path_to_manifest_items_map[f] for f in matched_base_file_names])) + + result.add(feature_name, test_file_paths) + + def run(self, result: WebFeaturesMap, inherited_features: List[str]) -> None: + if self.web_feature_file: + # Do not copy the inherited features because the presence of a + # WEB_FEATURES.yml file indicates new instructions. + inherited_features.clear() + + # Iterate over all the features in this new file + for feature in self.web_feature_file.features: + # Handle the "**" case + if feature.does_feature_apply_recursively(): + self._process_recursive_feature(inherited_features, feature, result) + + # Handle the non recursive case. + elif isinstance(feature.files, List) and feature.files: + self._process_non_recursive_feature(feature.name, feature.files, result) + else: + self._process_inherited_features(inherited_features, result) diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py index 8f891ffafd6..73bba55791b 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py @@ -94,6 +94,7 @@ class BidiSession: self.browsing_context = modules.BrowsingContext(self) self.input = modules.Input(self) self.network = modules.Network(self) + self.permissions = modules.Permissions(self) self.script = modules.Script(self) self.session = modules.Session(self) self.storage = modules.Storage(self) diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/error.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/error.py index 7e411d3b83b..b0cecce09f7 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/error.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/error.py @@ -87,6 +87,10 @@ class UnableToCaptureScreenException(BidiException): error_code = "unable to capture screen" +class UnableToSetCookieException(BidiException): + error_code = "unable to set cookie" + + class UnknownCommandException(BidiException): error_code = "unknown command" diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/__init__.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/__init__.py index 6f63e85bcd0..0a2ef500c42 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/__init__.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/__init__.py @@ -4,6 +4,7 @@ from .browser import Browser from .browsing_context import BrowsingContext from .input import Input from .network import Network +from .permissions import Permissions from .script import Script from .session import Session from .storage import Storage diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/permissions.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/permissions.py new file mode 100644 index 00000000000..3062260b348 --- /dev/null +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/permissions.py @@ -0,0 +1,18 @@ +from typing import Any, Optional, Mapping, MutableMapping, Union +from webdriver.bidi.undefined import UNDEFINED, Undefined + +from ._module import BidiModule, command + + +class Permissions(BidiModule): + @command + def set_permission(self, + descriptor: Union[Optional[Mapping[str, Any]], Undefined] = UNDEFINED, + state: Union[Optional[str], Undefined] = UNDEFINED, + origin: Union[Optional[str], Undefined] = UNDEFINED) -> Mapping[str, Any]: + params: MutableMapping[str, Any] = { + "descriptor": descriptor, + "state": state, + "origin": origin + } + return params diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py index c13b196d26a..c6c51cd9bce 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py @@ -1,7 +1,5 @@ from typing import Any, Dict, Mapping, MutableMapping, Optional, Union - from ._module import BidiModule, command - from webdriver.bidi.modules.network import NetworkBytesValue @@ -11,7 +9,8 @@ class BrowsingContextPartitionDescriptor(Dict[str, Any]): class StorageKeyPartitionDescriptor(Dict[str, Any]): - def __init__(self, user_context: Optional[str] = None, source_origin: Optional[str] = None): + def __init__(self, user_context: Optional[str] = None, + source_origin: Optional[str] = None): dict.__init__(self, type="storageKey") if user_context is not None: self["userContext"] = user_context @@ -52,16 +51,19 @@ class Storage(BidiModule): # TODO: extend with `filter`. @command def get_cookies(self, partition: Optional[PartitionDescriptor] = None) -> Mapping[str, Any]: - params = {} + params: MutableMapping[str, Any] = {} if partition is not None: params["partition"] = partition return params @command - def set_cookie(self, cookie: PartialCookie, partition: Optional[PartitionDescriptor] = None) -> \ - Mapping[str, Any]: + def set_cookie( + self, + cookie: PartialCookie, + partition: Optional[PartitionDescriptor] = None + ) -> Mapping[str, Any]: params: MutableMapping[str, Any] = { - 'cookie': cookie, + "cookie": cookie } if partition is not None: params["partition"] = partition diff --git a/tests/wpt/tests/tools/wpt/android.py b/tests/wpt/tests/tools/wpt/android.py index 3def5cede44..89dc9fad25c 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;33.0.1", - "platforms;android-33", + "build-tools;34.0.0", + "platforms;android-34", "emulator"] install_android_packages(logger, paths, packages, prompt=prompt) diff --git a/tests/wpt/tests/tools/wpt/paths b/tests/wpt/tests/tools/wpt/paths index 7e9ae837ecf..5a1303362b3 100644 --- a/tests/wpt/tests/tools/wpt/paths +++ b/tests/wpt/tests/tools/wpt/paths @@ -5,3 +5,4 @@ tools/lint/ tools/manifest/ tools/serve/ tools/wpt/ +tools/web_features/ diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py index 0cb5ff5d104..87b75d8c06b 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox.py @@ -726,6 +726,9 @@ class ProfileCreator: if self.test_type == "print-reftest": profile.set_preferences({"print.always_print_silent": True}) + if self.test_type == "wdspec": + profile.set_preferences({"remote.prefs.recommended": True}) + # Bug 1262954: winxp + e10s, disable hwaccel if (self.e10s and platform.system() in ("Windows", "Microsoft") and "5.1" in platform.version()): diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py index 6ebe4a69054..16ec605b726 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py @@ -176,6 +176,9 @@ class ProfileCreator(FirefoxProfileCreator): "layout.testing.overlay-scrollbars.always-visible": True, }) + if self.test_type == "wdspec": + profile.set_preferences({"remote.prefs.recommended": True}) + profile.set_preferences({"fission.autostart": True}) if self.disable_fission: profile.set_preferences({"fission.autostart": False}) diff --git a/tests/wpt/tests/web-animations/animation-model/animation-types/property-list.js b/tests/wpt/tests/web-animations/animation-model/animation-types/property-list.js index 39a92c7498d..692ff013287 100644 --- a/tests/wpt/tests/web-animations/animation-model/animation-types/property-list.js +++ b/tests/wpt/tests/web-animations/animation-model/animation-types/property-list.js @@ -1286,7 +1286,7 @@ const gCSSProperties2 = { ] }, 'text-autospace': { - // https://drafts.csswg.org/css-text-4/#text-spacing-property + // https://drafts.csswg.org/css-text-4/#text-autospace-property types: [ { type: 'discrete', options: [ [ 'normal', 'no-autospace' ] ] } ] @@ -1356,9 +1356,9 @@ const gCSSProperties2 = { } }, 'text-spacing-trim': { - // https://svgwg.org/svg2-draft/painting.html#TextRenderingProperty + // https://drafts.csswg.org/css-text-4/#text-spacing-trim-property types: [ - { type: 'discrete', options: [ [ 'auto', 'space-all' ] ] } + { type: 'discrete', options: [ [ 'normal', 'space-all' ] ] } ] }, 'text-transform': { diff --git a/tests/wpt/tests/web-animations/animation-model/resources/side-effects-common.js b/tests/wpt/tests/web-animations/animation-model/resources/side-effects-common.js new file mode 100644 index 00000000000..2f6531d4fc4 --- /dev/null +++ b/tests/wpt/tests/web-animations/animation-model/resources/side-effects-common.js @@ -0,0 +1,81 @@ +'use strict'; + +const PROPERTY_OPACITY = 0; +const PROPERTY_TRANSFORM = 1; +const PROPERTY_BGCOLOR = 2; + +const PHASE_BEFORE = 10; +const PHASE_ACTIVE = 11; +const PHASE_AFTER = 12; + +const STATE_CURRENT = 100; +const STATE_IN_EFFECT = 101; +const STATE_NONE = 102; + +// Creates an animation in the given state/page used to test side-effects. See: +// https://drafts.csswg.org/web-animations-1/#animation-effect-phases-and-states +// +// testcase - A query string for the test case root. Must have a descendant +// with the 'target' class that will be animated. +// state - One of the STATE_ constants above. Configures the animation to be +// either "current", "in effect" or neither. +// property - One of the PROPERTY_ constants above, the property the animation +// will target. +// phase - One of the PHASE_ constants above. Configures the animation to be in +// the before/active/after phase. +function setupAnimation(testcase, state, property, phase) { + const root = document.querySelector(testcase); + const effect_target = root.querySelector('.target'); + + let keyframe; + if (property == PROPERTY_OPACITY) + keyframe = { opacity: 1}; + else if (property == PROPERTY_TRANSFORM) + keyframe = { transform: 'translateX(0px)' }; + else if (property == PROPERTY_BGCOLOR) + keyframe = { backgroundColor: 'red' }; + else + throw new Error('Unexpected property'); + + const kPhaseDuration = 1000000; + const kBeforePhaseTime = kPhaseDuration / 2; + const kActivePhaseTime = kPhaseDuration + kPhaseDuration / 2; + const kAfterPhaseTime = 2 * kPhaseDuration + kPhaseDuration / 2; + + const options = { + duration: kPhaseDuration, + delay: kPhaseDuration, + endDelay: kPhaseDuration, + + easing: 'steps(1, jump-both)', + + fill: (state == STATE_IN_EFFECT ? 'both' : 'none'), + }; + + const animation = effect_target.animate( + [ keyframe, keyframe ], options); + + switch(phase) { + case PHASE_BEFORE: + animation.currentTime = kBeforePhaseTime; + if (state == STATE_IN_EFFECT || state == STATE_NONE) + animation.playbackRate = -1; + break; + + case PHASE_ACTIVE: + if (state == STATE_NONE) + throw new Error("Cannot have state[NONE] in the active phase"); + + animation.currentTime = kActivePhaseTime; + break; + + case PHASE_AFTER: + animation.currentTime = kAfterPhaseTime; + if (state == STATE_CURRENT) + animation.playbackRate = -1; + break; + + default: + throw new Error('Unexpected phase'); + } +} diff --git a/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-current.html b/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-current.html index b0de72bdbf9..18b13be9fa6 100644 --- a/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-current.html +++ b/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-current.html @@ -8,6 +8,8 @@ <link rel="author" href="mailto:bokan@chromium.org"> <link rel="match" href="side-effects-of-animations-current-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="../testcommon.js"></script> +<script src="resources/side-effects-common.js"></script> <style> .testcase { position: relative; @@ -48,49 +50,7 @@ </style> <script> -const PROPERTY_OPACITY = 0; -const PROPERTY_TRANSFORM = 1; -const PROPERTY_BGCOLOR = 2; - -const PHASE_BEFORE = 10; -const PHASE_ACTIVE = 11; -const PHASE_AFTER = 12; - -// Setup an animation and put it in a state where it is current but, if outside -// the active phase, not in effect. -function setupAnimation(testcase, property, phase) { - const root = document.querySelector(testcase); - const effect_target = root.querySelector('.target'); - let keyframe; - if (property == PROPERTY_OPACITY) - keyframe = { opacity: 1}; - else if (property == PROPERTY_TRANSFORM) - keyframe = { transform: 'translateX(0px)' }; - else if (property == PROPERTY_BGCOLOR) - keyframe = { backgroundColor: 'red' }; - else - throw new Error('Unexpected property'); - - const options = { duration: 1000, delay: 1000, endDelay: 1000 }; - - const animation = effect_target.animate( - [ keyframe, keyframe ], options); - - if (phase == PHASE_BEFORE) { - animation.currentTime = 500; - } else if (phase == PHASE_ACTIVE) { - animation.currentTime = 1500; - } else if (phase == PHASE_AFTER) { - animation.currentTime = 2500; - animation.playbackRate = -1; - } else { - throw new Error('Unexpected phase'); - } - - animation.pause(); -} - -onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); +onload = takeScreenshotOnAnimationsReady; </script> <!-- OPACITY --> @@ -104,7 +64,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#opacity-before', PROPERTY_OPACITY, PHASE_BEFORE); + setupAnimation('#opacity-before', STATE_CURRENT, PROPERTY_OPACITY, PHASE_BEFORE); </script> <!-- Is current - in play--> @@ -116,7 +76,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#opacity-active', PROPERTY_OPACITY, PHASE_ACTIVE); + setupAnimation('#opacity-active', STATE_CURRENT, PROPERTY_OPACITY, PHASE_ACTIVE); </script> <!-- Is current - after phase playing backwards--> @@ -128,7 +88,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#opacity-after', PROPERTY_OPACITY, PHASE_AFTER); + setupAnimation('#opacity-after', STATE_CURRENT, PROPERTY_OPACITY, PHASE_AFTER); </script> <!-- TRANSFORM --> @@ -142,7 +102,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#transform-before', PROPERTY_TRANSFORM, PHASE_BEFORE); + setupAnimation('#transform-before', STATE_CURRENT, PROPERTY_TRANSFORM, PHASE_BEFORE); </script> <!-- Is current - in play--> @@ -154,7 +114,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#transform-active', PROPERTY_TRANSFORM, PHASE_ACTIVE); + setupAnimation('#transform-active', STATE_CURRENT, PROPERTY_TRANSFORM, PHASE_ACTIVE); </script> <!-- Is current - after phase playing backwards--> @@ -166,7 +126,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#transform-after', PROPERTY_TRANSFORM, PHASE_AFTER); + setupAnimation('#transform-after', STATE_CURRENT, PROPERTY_TRANSFORM, PHASE_AFTER); </script> <!-- BACKGROUND COLOR --> @@ -184,7 +144,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#bgcolor-before', PROPERTY_BGCOLOR, PHASE_BEFORE); + setupAnimation('#bgcolor-before', STATE_CURRENT, PROPERTY_BGCOLOR, PHASE_BEFORE); </script> <!-- Is current - in play--> @@ -196,7 +156,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#bgcolor-active', PROPERTY_BGCOLOR, PHASE_ACTIVE); + setupAnimation('#bgcolor-active', STATE_CURRENT, PROPERTY_BGCOLOR, PHASE_ACTIVE); </script> <!-- Is current - after phase playing backwards--> @@ -208,7 +168,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#bgcolor-after', PROPERTY_BGCOLOR, PHASE_AFTER); + setupAnimation('#bgcolor-after', STATE_CURRENT, PROPERTY_BGCOLOR, PHASE_AFTER); </script> </html> diff --git a/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-in-effect.html b/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-in-effect.html index ff53c98d793..90ee0550827 100644 --- a/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-in-effect.html +++ b/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-in-effect.html @@ -8,6 +8,8 @@ <link rel="author" href="mailto:bokan@chromium.org"> <link rel="match" href="side-effects-of-animations-in-effect-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="../testcommon.js"></script> +<script src="resources/side-effects-common.js"></script> <style> .testcase { position: relative; @@ -48,49 +50,7 @@ </style> <script> -const PROPERTY_OPACITY = 0; -const PROPERTY_TRANSFORM = 1; -const PROPERTY_BGCOLOR = 2; - -const PHASE_BEFORE = 10; -const PHASE_ACTIVE = 11; -const PHASE_AFTER = 12; - -// Setup an animation and put it in a state where it is in effect but, if -// outside the active phase, not current. -function setupAnimation(testcase, property, phase) { - const root = document.querySelector(testcase); - const effect_target = root.querySelector('.target'); - let keyframe; - if (property == PROPERTY_OPACITY) - keyframe = { opacity: 1}; - else if (property == PROPERTY_TRANSFORM) - keyframe = { transform: 'translateX(0px)' }; - else if (property == PROPERTY_BGCOLOR) - keyframe = { backgroundColor: 'red' }; - else - throw new Error('Unexpected property'); - - const options = { duration: 1000, delay: 1000, endDelay: 1000, fill: 'both' }; - - const animation = effect_target.animate( - [ keyframe, keyframe ], options); - - if (phase == PHASE_BEFORE) { - animation.currentTime = 500; - animation.playbackRate = -1; - } else if (phase == PHASE_ACTIVE) { - animation.currentTime = 1500; - } else if (phase == PHASE_AFTER) { - animation.currentTime = 2500; - } else { - throw new Error('Unexpected phase'); - } - - animation.pause(); -} - -onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); +onload = takeScreenshotOnAnimationsReady; </script> <!-- OPACITY --> @@ -104,7 +64,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#opacity-before', PROPERTY_OPACITY, PHASE_BEFORE); + setupAnimation('#opacity-before', STATE_IN_EFFECT, PROPERTY_OPACITY, PHASE_BEFORE); </script> <!-- Is current - in play--> @@ -116,7 +76,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#opacity-active', PROPERTY_OPACITY, PHASE_ACTIVE); + setupAnimation('#opacity-active', STATE_IN_EFFECT, PROPERTY_OPACITY, PHASE_ACTIVE); </script> <!-- Is current - after phase playing backwards--> @@ -128,7 +88,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#opacity-after', PROPERTY_OPACITY, PHASE_AFTER); + setupAnimation('#opacity-after', STATE_IN_EFFECT, PROPERTY_OPACITY, PHASE_AFTER); </script> <!-- TRANSFORM --> @@ -142,7 +102,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#transform-before', PROPERTY_TRANSFORM, PHASE_BEFORE); + setupAnimation('#transform-before', STATE_IN_EFFECT, PROPERTY_TRANSFORM, PHASE_BEFORE); </script> <!-- Is current - in play--> @@ -154,7 +114,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#transform-active', PROPERTY_TRANSFORM, PHASE_ACTIVE); + setupAnimation('#transform-active', STATE_IN_EFFECT, PROPERTY_TRANSFORM, PHASE_ACTIVE); </script> <!-- Is current - after phase playing backwards--> @@ -166,7 +126,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#transform-after', PROPERTY_TRANSFORM, PHASE_AFTER); + setupAnimation('#transform-after', STATE_IN_EFFECT, PROPERTY_TRANSFORM, PHASE_AFTER); </script> <!-- BACKGROUND COLOR --> @@ -184,7 +144,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#bgcolor-before', PROPERTY_BGCOLOR, PHASE_BEFORE); + setupAnimation('#bgcolor-before', STATE_IN_EFFECT, PROPERTY_BGCOLOR, PHASE_BEFORE); </script> <!-- Is current - in play--> @@ -196,7 +156,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#bgcolor-active', PROPERTY_BGCOLOR, PHASE_ACTIVE); + setupAnimation('#bgcolor-active', STATE_IN_EFFECT, PROPERTY_BGCOLOR, PHASE_ACTIVE); </script> <!-- Is current - after phase playing backwards--> @@ -208,7 +168,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#bgcolor-after', PROPERTY_BGCOLOR, PHASE_AFTER); + setupAnimation('#bgcolor-after', STATE_IN_EFFECT, PROPERTY_BGCOLOR, PHASE_AFTER); </script> </html> diff --git a/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-none.html b/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-none.html index b460ecc27fd..d200409e647 100644 --- a/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-none.html +++ b/tests/wpt/tests/web-animations/animation-model/side-effects-of-animations-none.html @@ -7,6 +7,8 @@ <link rel="author" href="mailto:bokan@chromium.org"> <link rel="match" href="side-effects-of-animations-none-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="../testcommon.js"></script> +<script src="resources/side-effects-common.js"></script> <style> .testcase { position: relative; @@ -47,33 +49,7 @@ </style> <script> -const PHASE_BEFORE = 10; -const PHASE_AFTER = 12; - -// Start an animation and put it into a state that's neither current nor in -// effect. -function setupAnimation(testcase, phase) { - const root = document.querySelector(testcase); - const effect_target = root.querySelector('.target'); - const keyframe = { opacity: 1}; - const options = { duration: 1000, delay: 1000, endDelay: 1000 }; - - const animation = effect_target.animate( - [ keyframe, keyframe ], options); - - if (phase == PHASE_BEFORE) { - animation.currentTime = 500; - animation.playbackRate = -1; - } else if (phase == PHASE_AFTER) { - animation.currentTime = 2500; - } else { - throw new Error('Unexpected phase'); - } - - animation.pause(); -} - -onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); +onload = takeScreenshotOnAnimationsReady; </script> <!-- before phase playing backwards --> @@ -85,7 +61,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#before', PHASE_BEFORE); + setupAnimation('#before', STATE_NONE, PROPERTY_OPACITY, PHASE_BEFORE); </script> <!-- after phase playing forwards--> @@ -97,7 +73,7 @@ onload = requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); </div> </div> <script> - setupAnimation('#after', PHASE_AFTER); + setupAnimation('#after', STATE_NONE, PROPERTY_OPACITY, PHASE_AFTER); </script> </html> diff --git a/tests/wpt/tests/web-animations/crashtests/color-mix-crashtest.html b/tests/wpt/tests/web-animations/crashtests/color-mix-crashtest.html new file mode 100644 index 00000000000..91d29464f50 --- /dev/null +++ b/tests/wpt/tests/web-animations/crashtests/color-mix-crashtest.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html class="test-wait"> +<title>Interpolation of a color-mix function with currentcolor should not crash</title> +<!-- crbug.com/1493430 --> +<style type="text/css"> + @keyframes colorize { + from { color: forestgreen; } + to { color: plum; } + } + #target { + animation: colorize 1s Infinite alternate; + border: 1px solid transparent; + transition: border-color 1s ease-in-out; + } + #target.update { + border-color: + color-mix(in hsl longer hue, hsl(120 100% 50%) 20%, + currentcolor); + } +</style> +<body> + <div id="target">Hello world</div> +</body> +<script src="../testcommon.js"></script> +<script> + window.onload = async () => { + await waitForNextFrame(); + target.classList.add('update'); + await Promise.all(document.getAnimations().map(a => a.resolve)); + await waitForNextFrame(); + await waitForNextFrame(); + document.documentElement.classList.remove('test-wait'); + }; +</script> +</html> diff --git a/tests/wpt/tests/web-animations/testcommon.js b/tests/wpt/tests/web-animations/testcommon.js index a106cd9ac67..5b22c658d5c 100644 --- a/tests/wpt/tests/web-animations/testcommon.js +++ b/tests/wpt/tests/web-animations/testcommon.js @@ -329,9 +329,14 @@ function assert_phase(animation, phase) { // Use with reftest-wait to wait until compositor commits are no longer deferred // before taking the screenshot. // crbug.com/1378671 -async function waitForCompositorReady(target) { +async function waitForCompositorReady() { const animation = document.body.animate({ opacity: [ 1, 1 ] }, {duration: 1 }); return animation.finished; } +async function takeScreenshotOnAnimationsReady() { + await Promise.all(document.getAnimations().map(a => a.ready)); + requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)); +} + diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-state-change-after-close.http.window.js b/tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-state-change-after-close.http.window.js index c2e84536507..eccb0d172d0 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-state-change-after-close.http.window.js +++ b/tests/wpt/tests/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-state-change-after-close.http.window.js @@ -1,6 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js - 'use strict'; promise_test(async t => { diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-default-value.window.js b/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-default-value.window.js index 359df111846..ae55f217f4c 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-default-value.window.js +++ b/tests/wpt/tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-default-value.window.js @@ -1,6 +1,3 @@ -// META: script=/resources/testharness.js -// META: script=/resources/testharnessreport.js - 'use strict'; test(() => { diff --git a/tests/wpt/tests/webauthn/createcredential-cross-origin-iframe.https.sub.html b/tests/wpt/tests/webauthn/createcredential-cross-origin-iframe.https.sub.html new file mode 100644 index 00000000000..ecf99f68a2b --- /dev/null +++ b/tests/wpt/tests/webauthn/createcredential-cross-origin-iframe.https.sub.html @@ -0,0 +1,106 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>WebAuthn credential.create() in a cross-origin iframe tests</title> +<meta name="timeout" content="long"> +<link rel="help" href="https://w3c.github.io/webauthn/#publickey-credentials-create-feature"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src=helpers.js></script> +<body></body> +<script> +standardSetup(function() { + "use strict"; + + const targetOrigin = "https://{{hosts[alt][www]}}:{{ports[https][0]}}"; + + // Returns a |Promise| that gets resolved with |event.data| when |window| + // receives a "message" event whose |event.data.type| matches the string + // |message_data_type|. + function getMessageData(message_data_type) { + return new Promise(resolve => { + function waitAndRemove(e) { + if (!e.data || e.data.type != message_data_type) + return; + window.removeEventListener("message", waitAndRemove); + resolve(e.data); + } + window.addEventListener("message", waitAndRemove); + }); + } + + // Creates an iframe with the given `src` and (optional) allow attribute. + // Waits for the iframe to load, based on receiving a "subframe-loaded" + // message from the iframe. + async function createIframe(test, src, allow) { + const iframeElement = document.createElement("iframe"); + document.body.appendChild(iframeElement); + test.add_cleanup(() => { + iframeElement.remove(); + }); + + if (allow !== undefined) { + iframeElement.allow = allow; + } + + const loadedPromise = getMessageData("subframe-loaded"); + iframeElement.src = src; + await loadedPromise; + + return iframeElement; + } + + promise_test(async (test) => { + const src = `${targetOrigin}/webauthn/resources/webauthn-subframe.sub.html`; + const iframe = await createIframe(test, src); + + const resultPromise = getMessageData("result"); + iframe.contentWindow.postMessage({type: "create-credential"}, {targetOrigin: targetOrigin}); + const data = await resultPromise; + + assert_equals(data.result, "failure"); + assert_equals(data.error.name, "NotAllowedError"); + }, "create() in cross-origin iframe fails without permissions policy"); + + promise_test(async (test) => { + const src = `${targetOrigin}/webauthn/resources/webauthn-subframe.sub.html`; + const iframe = await createIframe(test, src, "publickey-credentials-create"); + + const resultPromise = getMessageData("result"); + iframe.contentWindow.postMessage({type: "create-credential", addUserActivation: false}, {targetOrigin: targetOrigin}); + const data = await resultPromise; + + assert_equals(data.result, "failure"); + assert_equals(data.error.name, "NotAllowedError"); + }, "create() in cross-origin iframe fails with permissions policy but no user activation"); + + promise_test(async (test) => { + const src = `${targetOrigin}/webauthn/resources/webauthn-subframe.sub.html`; + const iframe = await createIframe(test, src, "publickey-credentials-create"); + + const resultPromise = getMessageData("result"); + iframe.contentWindow.postMessage({type: "create-credential", addUserActivation: true}, {targetOrigin: targetOrigin}); + const data = await resultPromise; + + assert_equals(data.result, "success", `Expected success but got error: "${data.errorMessage}"`); + }, "create() in cross-origin iframe succeeds with permissions policy and user activation"); + + promise_test(async (test) => { + const src = `${targetOrigin}/webauthn/resources/webauthn-subframe.sub.html`; + const iframe = await createIframe(test, src, "publickey-credentials-create"); + + // For this call, we have a user activation in this main frame, but not + // in the iframe. That shouldn't be sufficient - the user activation has + // to be on the iframe itself. + await test_driver.bless("create credential, main frame activation"); + const resultPromise = getMessageData("result"); + iframe.contentWindow.postMessage({type: "create-credential", addUserActivation: false}, {targetOrigin: targetOrigin}); + const data = await resultPromise; + + assert_equals(data.result, "failure"); + assert_equals(data.error.name, "NotAllowedError"); + }, "create() in cross-origin iframe requires user activation on the iframe, not the main frame"); +}); +</script> + diff --git a/tests/wpt/tests/webauthn/resources/webauthn-subframe.sub.html b/tests/wpt/tests/webauthn/resources/webauthn-subframe.sub.html new file mode 100644 index 00000000000..c97255924e1 --- /dev/null +++ b/tests/wpt/tests/webauthn/resources/webauthn-subframe.sub.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>WebAuthn test subframe</title> +<script src=../helpers.js></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> + +<script> + "use strict"; + + function reportResult(outcome, errorObj) { + window.top.postMessage({"type": "result", "result": outcome, "error": errorObj}, "*"); + } + + async function createCredentialAndReportResult(addUserActivation) { + if (addUserActivation) { + await test_driver.bless("create credential"); + } + + try { + await createCredential(); + reportResult("success"); + } catch (e) { + reportResult("failure", e); + } + } + + window.addEventListener("message", e => { + if (e.data.type == "create-credential") { + createCredentialAndReportResult(e.data.addUserActivation); + return; + } + throw new Error(`Unrecognized message, e.data.type: ${e.data.type}`); + }); + + test_driver.set_test_context(window.top); + window.top.postMessage({"type": "subframe-loaded"}, "*"); +</script> diff --git a/tests/wpt/tests/webdriver/tests/bidi/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/__init__.py index cae2e2576d6..98b670f89f1 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/__init__.py +++ b/tests/wpt/tests/webdriver/tests/bidi/__init__.py @@ -1,5 +1,4 @@ -from typing import Any, Callable, Dict, Mapping - +from typing import Any, Callable, Dict, List, Mapping from webdriver.bidi.modules.script import ContextTarget @@ -11,15 +10,14 @@ def recursive_compare(expected: Any, actual: Any) -> None: expected(actual) return - assert type(expected) is type(actual) - if type(expected) is list: + if isinstance(actual, List) and isinstance(expected, List): assert len(expected) == len(actual) for index, _ in enumerate(expected): recursive_compare(expected[index], actual[index]) return - if type(expected) is dict: - # Actual dict can have more keys as part of the forwards-compat design. + if isinstance(actual, Dict) and isinstance(expected, Dict): + # Actual Mapping can have more keys as part of the forwards-compat design. assert ( expected.keys() <= actual.keys() ), f"Key set should be present: {set(expected.keys()) - set(actual.keys())}" diff --git a/tests/wpt/tests/webdriver/tests/bidi/external/permissions/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/external/permissions/__init__.py new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/external/permissions/__init__.py diff --git a/tests/wpt/tests/webdriver/tests/bidi/external/permissions/set_permission/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/external/permissions/set_permission/__init__.py new file mode 100644 index 00000000000..b8f6358d617 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/external/permissions/set_permission/__init__.py @@ -0,0 +1,23 @@ +from typing import Any, Mapping + +from webdriver.bidi.modules.script import ContextTarget + +async def get_permission_state(bidi_session, context: Mapping[str, Any], name: str) -> str: + result = await bidi_session.script.call_function( + function_declaration="""() => { + return navigator.permissions.query({ name: '%s' }) + .then(val => val.state, err => err.message) + }""" % name, + target=ContextTarget(context["context"]), + await_promise=True) + return result["value"] + + +async def get_context_origin(bidi_session, context: Mapping[str, Any]) -> str: + result = await bidi_session.script.call_function( + function_declaration="""() => { + return window.location.origin; + }""", + target=ContextTarget(context["context"]), + await_promise=False) + return result["value"] diff --git a/tests/wpt/tests/webdriver/tests/bidi/external/permissions/set_permission/invalid.py b/tests/wpt/tests/webdriver/tests/bidi/external/permissions/set_permission/invalid.py new file mode 100644 index 00000000000..0ef8c57f415 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/external/permissions/set_permission/invalid.py @@ -0,0 +1,54 @@ +import pytest +import webdriver.bidi.error as error +from webdriver.bidi.undefined import UNDEFINED + +pytestmark = pytest.mark.asyncio + +@pytest.mark.parametrize("descriptor", [False, "SOME_STRING", 42, {}, [], {"name": 23}, None, UNDEFINED]) +async def test_params_descriptor_invalid_type(bidi_session, descriptor): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.permissions.set_permission( + descriptor=descriptor, + state="granted", + origin="https://example.com", + ) + + +@pytest.mark.parametrize("descriptor", [{"name": "unknown"}]) +async def test_params_descriptor_invalid_value(bidi_session, descriptor): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.permissions.set_permission( + descriptor=descriptor, + state="granted", + origin="https://example.com", + ) + + +@pytest.mark.parametrize("state", [False, 42, {}, [], None, UNDEFINED]) +async def test_params_state_invalid_type(bidi_session, state): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.permissions.set_permission( + descriptor={"name": "geolocation"}, + state=state, + origin="https://example.com", + ) + + +@pytest.mark.parametrize("state", ["UNKOWN", "Granted"]) +async def test_params_state_invalid_value(bidi_session, state): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.permissions.set_permission( + descriptor={"name": "geolocation"}, + state=state, + origin="https://example.com", + ) + + +@pytest.mark.parametrize("origin", [False, 42, {}, [], None, UNDEFINED]) +async def test_params_origin_invalid_type(bidi_session, origin): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.permissions.set_permission( + descriptor={"name": "geolocation"}, + state="granted", + origin=origin, + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/external/permissions/set_permission/set_permission.py b/tests/wpt/tests/webdriver/tests/bidi/external/permissions/set_permission/set_permission.py new file mode 100644 index 00000000000..dc6ca14a8d5 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/external/permissions/set_permission/set_permission.py @@ -0,0 +1,105 @@ +import pytest +import webdriver.bidi.error as error + +from . import get_context_origin, get_permission_state + +pytestmark = pytest.mark.asyncio + +@pytest.mark.asyncio +async def test_set_permission(bidi_session, new_tab, url): + test_url = url("/common/blank.html", protocol="https") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], + url=test_url, + wait="complete", + ) + + origin = await get_context_origin(bidi_session, new_tab) + + assert await get_permission_state(bidi_session, new_tab, "geolocation") == "prompt" + + await bidi_session.permissions.set_permission( + descriptor={"name": "geolocation"}, + state="granted", + origin=origin, + ) + + assert await get_permission_state(bidi_session, new_tab, "geolocation") == "granted" + + await bidi_session.permissions.set_permission( + descriptor={"name": "geolocation"}, + state="denied", + origin=origin, + ) + + assert await get_permission_state(bidi_session, new_tab, "geolocation") == "denied" + + await bidi_session.permissions.set_permission( + descriptor={"name": "geolocation"}, + state="prompt", + origin=origin, + ) + + assert await get_permission_state(bidi_session, new_tab, "geolocation") == "prompt" + + +@pytest.mark.asyncio +async def test_set_permission_insecure_context(bidi_session, new_tab, url): + test_url = url("/common/blank.html", protocol="http") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], + url=test_url, + wait="complete", + ) + + origin = await get_context_origin(bidi_session, new_tab) + + with pytest.raises(error.InvalidArgumentException): + await bidi_session.permissions.set_permission( + descriptor={"name": "push"}, + state="granted", + origin=origin, + ) + +@pytest.mark.asyncio +async def test_set_permission_new_context(bidi_session, new_tab, url): + test_url = url("/common/blank.html", protocol="https") + + await bidi_session.browsing_context.navigate( + context=new_tab["context"], + url=test_url, + wait="complete", + ) + + origin = await get_context_origin(bidi_session, new_tab) + + assert await get_permission_state(bidi_session, new_tab, "geolocation") == "prompt" + + await bidi_session.permissions.set_permission( + descriptor={"name": "geolocation"}, + state="granted", + origin=origin, + ) + + assert await get_permission_state(bidi_session, new_tab, "geolocation") == "granted" + + new_context = await bidi_session.browsing_context.create(type_hint="tab") + assert new_tab["context"] != new_context["context"] + await bidi_session.browsing_context.navigate( + context=new_context["context"], + url=test_url, + wait="complete", + ) + + # See https://github.com/w3c/permissions/issues/437. + assert await get_permission_state(bidi_session, new_context, "geolocation") == "granted" + + +@pytest.mark.parametrize("origin", ['UNKNOWN', '']) +async def test_set_permission_origin_unknown(bidi_session, new_tab, origin): + await bidi_session.permissions.set_permission( + descriptor={"name": "geolocation"}, + state="granted", + origin=origin, + ) + assert await get_permission_state(bidi_session, new_tab, "geolocation") == "prompt" diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/fail_request/request.py b/tests/wpt/tests/webdriver/tests/bidi/network/fail_request/request.py new file mode 100644 index 00000000000..368e46ebe50 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/network/fail_request/request.py @@ -0,0 +1,29 @@ +import pytest + +from .. import ( + assert_fetch_error_event, + PAGE_EMPTY_TEXT, + FETCH_ERROR_EVENT, +) + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize("phase", ["beforeRequestSent", "responseStarted"]) +async def test_phases( + setup_blocked_request, subscribe_events, wait_for_event, bidi_session, url, phase +): + request = await setup_blocked_request(phase) + await subscribe_events(events=[FETCH_ERROR_EVENT]) + + on_fetch_error = wait_for_event(FETCH_ERROR_EVENT) + await bidi_session.network.fail_request(request=request) + await on_fetch_error + + fetch_error_event = await on_fetch_error + expected_request = {"method": "GET", "url": url(PAGE_EMPTY_TEXT)} + assert_fetch_error_event( + fetch_error_event, + expected_request=expected_request, + redirect_count=0, + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py index e69de29bb2d..763e0054f1d 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py @@ -0,0 +1,75 @@ +from typing import Optional +from webdriver.bidi.modules.network import NetworkBytesValue, NetworkStringValue +from webdriver.bidi.modules.storage import PartialCookie, PartitionDescriptor +from .. import any_int, recursive_compare + +COOKIE_NAME = 'SOME_COOKIE_NAME' +COOKIE_VALUE = NetworkStringValue('SOME_COOKIE_VALUE') + + +async def assert_cookie_is_not_set(bidi_session, name: str = COOKIE_NAME): + """ + Asserts the cookie is not set. + """ + all_cookies = await bidi_session.storage.get_cookies() + assert 'cookies' in all_cookies + assert not any(c for c in all_cookies['cookies'] if c['name'] == name) + + +async def assert_cookie_is_set( + bidi_session, + domain: str, + name: str = COOKIE_NAME, + value: str = COOKIE_VALUE, + path: str = "/", + http_only: bool = False, + secure: bool = True, + same_site: str = 'none', + expiry: Optional[int] = None, + partition: Optional[PartitionDescriptor] = None, +): + """ + Asserts the cookie is set. + """ + all_cookies = await bidi_session.storage.get_cookies(partition=partition) + assert 'cookies' in all_cookies + actual_cookie = next(c for c in all_cookies['cookies'] if c['name'] == name) + expected_cookie = { + 'domain': domain, + 'httpOnly': http_only, + 'name': name, + 'path': path, + 'sameSite': same_site, + 'secure': secure, + # Varies depending on the cookie name and value. + 'size': any_int, + 'value': value, + } + if expiry is not None: + expected_cookie['expiry'] = expiry + + recursive_compare(expected_cookie, actual_cookie) + + +def create_cookie( + domain: str, + name: str = COOKIE_NAME, + value: NetworkBytesValue = COOKIE_VALUE, + secure: Optional[bool] = True, + path: Optional[str] = None, + http_only: Optional[bool] = None, + same_site: Optional[str] = None, + expiry: Optional[int] = None, +) -> PartialCookie: + """ + Creates a cookie with the given or default options. + """ + return PartialCookie( + domain=domain, + name=name, + value=value, + path=path, + http_only=http_only, + secure=secure, + same_site=same_site, + expiry=expiry) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_domain.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_domain.py new file mode 100644 index 00000000000..ef09fb3f7b2 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_domain.py @@ -0,0 +1,19 @@ +import pytest +from .. import assert_cookie_is_set, create_cookie + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "domain_key, subdomain_key", + [ + ("", ""), + ("", "www"), + ("alt", ""), + ("alt", "www"), + ]) +async def test_cookie_domain(bidi_session, test_page, domain_value, domain_key, subdomain_key): + domain = domain_value(domain_key, subdomain_key) + + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain)) + await assert_cookie_is_set(bidi_session, domain=domain) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_expiry.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_expiry.py new file mode 100644 index 00000000000..79f02d31060 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_expiry.py @@ -0,0 +1,51 @@ +import pytest +from .. import assert_cookie_is_not_set, assert_cookie_is_set, create_cookie +from datetime import datetime, timedelta +import time + +pytestmark = pytest.mark.asyncio + + +async def test_cookie_expiry_unset(bidi_session, test_page, domain_value): + set_cookie_result = await bidi_session.storage.set_cookie( + cookie=create_cookie( + domain=domain_value(), + expiry=None)) + + assert set_cookie_result == { + 'partitionKey': {}, + } + + await assert_cookie_is_set(bidi_session, expiry=None, domain=domain_value()) + + +async def test_cookie_expiry_future(bidi_session, test_page, domain_value): + tomorrow = datetime.now() + timedelta(1) + tomorrow_timestamp = time.mktime(tomorrow.timetuple()) + + set_cookie_result = await bidi_session.storage.set_cookie( + cookie=create_cookie( + domain=domain_value(), + expiry=tomorrow_timestamp)) + + assert set_cookie_result == { + 'partitionKey': {}, + } + + await assert_cookie_is_set(bidi_session, expiry=tomorrow_timestamp, domain=domain_value()) + + +async def test_cookie_expiry_past(bidi_session, test_page, domain_value): + yesterday = datetime.now() - timedelta(1) + yesterday_timestamp = time.mktime(yesterday.timetuple()) + + set_cookie_result = await bidi_session.storage.set_cookie( + cookie=create_cookie( + domain=domain_value(), + expiry=yesterday_timestamp)) + + assert set_cookie_result == { + 'partitionKey': {}, + } + + await assert_cookie_is_not_set(bidi_session) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_http_only.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_http_only.py new file mode 100644 index 00000000000..f5e1bf9a3d1 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_http_only.py @@ -0,0 +1,29 @@ +import pytest +from .. import assert_cookie_is_set, create_cookie + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "http_only", + [ + True, + False, + None + ]) +async def test_cookie_http_only(bidi_session, test_page, domain_value, http_only): + set_cookie_result = await bidi_session.storage.set_cookie( + cookie=create_cookie(domain=domain_value(), http_only=http_only)) + + assert set_cookie_result == { + 'partitionKey': {}, + } + + # `httpOnly` defaults to `false`. + expected_http_only = http_only if http_only is not None else False + + await assert_cookie_is_set( + bidi_session, + domain=domain_value(), + http_only=expected_http_only, + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_name.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_name.py new file mode 100644 index 00000000000..f2d967534a2 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_name.py @@ -0,0 +1,16 @@ +import pytest +from .. import assert_cookie_is_set, create_cookie + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "name", + [ + "", + "cookie name with special symbols !@#$%&*()_+-{}[]|\\:\"'<>,.?/`~", + "123cookie", + ]) +async def test_cookie_name(bidi_session, test_page, domain_value, name): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), name=name)) + await assert_cookie_is_set(bidi_session, name=name, domain=domain_value()) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_path.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_path.py new file mode 100644 index 00000000000..2395b032a69 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_path.py @@ -0,0 +1,25 @@ +import pytest +from .. import assert_cookie_is_set, create_cookie + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "path", + [ + "/", + "/some_path", + "/some/nested/path", + None + ] +) +async def test_cookie_path(bidi_session, test_page, domain_value, path): + set_cookie_result = await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), path=path)) + + assert set_cookie_result == { + 'partitionKey': {}, + } + + # `path` defaults to "/". + expected_path = path if path is not None else "/" + await assert_cookie_is_set(bidi_session, path=expected_path, domain=domain_value()) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_same_site.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_same_site.py new file mode 100644 index 00000000000..05f4790a80e --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_same_site.py @@ -0,0 +1,26 @@ +import pytest +from .. import assert_cookie_is_set, create_cookie + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "same_site", + [ + "strict", + "lax", + "none", + None + ] +) +async def test_cookie_secure(bidi_session, test_page, domain_value, same_site): + set_cookie_result = await bidi_session.storage.set_cookie( + cookie=create_cookie(domain=domain_value(), same_site=same_site)) + + assert set_cookie_result == { + 'partitionKey': {}, + } + + # `same_site` defaults to "none". + expected_same_site = same_site if same_site is not None else 'none' + await assert_cookie_is_set(bidi_session, domain=domain_value(), same_site=expected_same_site) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_secure.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_secure.py new file mode 100644 index 00000000000..6da5991c11d --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_secure.py @@ -0,0 +1,25 @@ +import pytest +from .. import assert_cookie_is_set, create_cookie + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "secure", + [ + True, + False, + None + ] +) +async def test_cookie_secure(bidi_session, test_page, domain_value, secure): + set_cookie_result = await bidi_session.storage.set_cookie( + cookie=create_cookie(domain=domain_value(), secure=secure)) + + assert set_cookie_result == { + 'partitionKey': {}, + } + + # `secure` defaults to `false`. + expected_secure = secure if secure is not None else False + await assert_cookie_is_set(bidi_session, domain=domain_value(), secure=expected_secure) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_value.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_value.py new file mode 100644 index 00000000000..5ecd8354573 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/cookie_value.py @@ -0,0 +1,20 @@ +import pytest +from .. import assert_cookie_is_set, create_cookie +from webdriver.bidi.modules.network import NetworkStringValue + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "str_value", + [ + "simple_value", + "special_symbols =!@#$%^&*()_+-{}[]|\\:\"'<>,.?/`~" + ]) +async def test_cookie_value_string(bidi_session, test_page, domain_value, str_value): + value = NetworkStringValue(str_value) + + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), value=value)) + await assert_cookie_is_set(bidi_session, value=value, domain=domain_value()) + +# TODO: test `test_cookie_value_base64`. diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/invalid.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/invalid.py new file mode 100644 index 00000000000..9c3e5cbe1dd --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/invalid.py @@ -0,0 +1,159 @@ +import pytest +from .. import create_cookie +import webdriver.bidi.error as error +from webdriver.bidi.modules.network import NetworkStringValue +from webdriver.bidi.modules.storage import BrowsingContextPartitionDescriptor, StorageKeyPartitionDescriptor + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize("domain", [None, False, 42, {}, []]) +async def test_cookie_domain_invalid_type(bidi_session, test_page, domain): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain)) + + +@pytest.mark.parametrize("expiry", [False, "SOME_STRING_VALUE", {}, []]) +async def test_cookie_expiry_invalid_type(bidi_session, test_page, domain_value, expiry): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), expiry=expiry)) + + +@pytest.mark.parametrize("http_only", [42, "SOME_STRING_VALUE", {}, []]) +async def test_cookie_http_only_invalid_type(bidi_session, test_page, domain_value, http_only): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), http_only=http_only)) + + +@pytest.mark.parametrize( + "name", + [ + " cookieName", + "cookie=name", + "cookie\tname", + "cookie\nname", + "cookie\x01name", + "cookie\x0Fname", + "cookie;name", + ]) +async def test_cookie_name_invalid_value(bidi_session, test_page, domain_value, name): + with pytest.raises(error.UnableToSetCookieException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), name=name)) + + +@pytest.mark.parametrize("name", [None, False, 42, {}, []]) +async def test_cookie_name_invalid_type(bidi_session, test_page, domain_value, name): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), name=name)) + + +@pytest.mark.parametrize( + "path", + [ + "" + "no_leading_forward_slash" + ] +) +async def test_cookie_path_invalid_value(bidi_session, test_page, domain_value, path): + with pytest.raises(error.UnableToSetCookieException): + await bidi_session.storage.set_cookie( + cookie=create_cookie(domain=domain_value(), path=path)) + + +@pytest.mark.parametrize("path", [False, 42, {}, []]) +async def test_cookie_path_invalid_type(bidi_session, test_page, domain_value, path): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie( + cookie=create_cookie(domain=domain_value(), path=path)) + + +@pytest.mark.parametrize("same_site", ["", "INVALID_SAME_SITE_STATE"]) +async def test_cookie_same_site_invalid_value(bidi_session, test_page, domain_value, same_site): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), same_site=same_site)) + + +@pytest.mark.parametrize("same_site", [42, False, {}, []]) +async def test_cookie_same_site_invalid_type(bidi_session, test_page, domain_value, same_site): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), same_site=same_site)) + + +@pytest.mark.parametrize("secure", [42, "SOME_STRING_VALUE", {}, []]) +async def test_cookie_secure_invalid_type(bidi_session, test_page, domain_value, secure): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), secure=secure)) + + +@pytest.mark.parametrize("value", [None, False, 42, "SOME_STRING_VALUE", {}, {"type": "SOME_INVALID_TYPE"}, []]) +async def test_cookie_value_invalid_type(bidi_session, test_page, domain_value, value): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), value=value)) + + +@pytest.mark.parametrize( + "str_value", + [ + "value\twith\ttab", + "value\nwith\nnewline", + "value;with;semicolon", + ]) +async def test_cookie_value_string_invalid_value(bidi_session, test_page, domain_value, str_value): + value = NetworkStringValue(str_value) + + with pytest.raises(error.UnableToSetCookieException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), value=value)) + + +@pytest.mark.parametrize("str_value", [None, False, 42, {}, []]) +async def test_cookie_value_string_invalid_type(bidi_session, test_page, domain_value, str_value): + value = NetworkStringValue(str_value) + + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value(), value=value)) + + +@pytest.mark.parametrize("partition", [42, False, "SOME_STRING_VALUE", {}, {"type": "SOME_INVALID_TYPE"}, []]) +async def test_partition_invalid_type(bidi_session, test_page, domain_value, partition): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value()), partition=partition) + + +@pytest.mark.parametrize("browsing_context", [None, 42, False, {}, []]) +async def test_partition_context_invalid_type(bidi_session, test_page, origin, domain_value, browsing_context): + partition = BrowsingContextPartitionDescriptor(browsing_context) + + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value()), partition=partition) + + +async def test_partition_context_unknown(bidi_session, test_page, origin, domain_value): + partition = BrowsingContextPartitionDescriptor("UNKNOWN_CONTEXT") + + with pytest.raises(error.NoSuchFrameException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value()), partition=partition) + + +@pytest.mark.parametrize("source_origin", [42, False, {}, []]) +async def test_partition_storage_key_source_origin_invalid_type(bidi_session, test_page, origin, domain_value, + source_origin): + partition = StorageKeyPartitionDescriptor(source_origin=source_origin) + + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value()), partition=partition) + + +@pytest.mark.parametrize("user_context", [42, False, {}, []]) +async def test_partition_storage_key_user_context_invalid_type(bidi_session, test_page, origin, domain_value, + user_context): + partition = StorageKeyPartitionDescriptor(user_context=user_context) + + with pytest.raises(error.InvalidArgumentException): + await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value()), partition=partition) + +# TODO: test `test_cookie_domain_invalid_value`. +# TODO: test `test_partition_storage_key_user_context_unknown`. +# TODO: test `test_partition_storage_key_user_context_invalid_type`. +# TODO: test `test_cookie_value_missing`. +# TODO: test `test_cookie_value_base64_invalid_type`. +# TODO: test `test_cookie_value_base64_invalid_value`. diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/page_protocols.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/page_protocols.py new file mode 100644 index 00000000000..c021c2fc26e --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/page_protocols.py @@ -0,0 +1,22 @@ +import pytest +from .. import assert_cookie_is_set, create_cookie + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "protocol", + [ + "http", + "https", + ] +) +async def test_page_protocols(bidi_session, get_test_page, domain_value, protocol): + set_cookie_result = await bidi_session.storage.set_cookie(cookie=create_cookie(domain=domain_value())) + + assert set_cookie_result == { + 'partitionKey': {}, + } + + # Assert the cookie is actually set. + await assert_cookie_is_set(bidi_session, domain=domain_value()) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py new file mode 100644 index 00000000000..b7a4a052ca0 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/partition.py @@ -0,0 +1,74 @@ +import pytest +from webdriver.bidi.modules.storage import BrowsingContextPartitionDescriptor, StorageKeyPartitionDescriptor +from .. import assert_cookie_is_set, create_cookie + +pytestmark = pytest.mark.asyncio + + +async def test_partition_context(bidi_session, top_context, test_page, origin, domain_value): + await bidi_session.browsing_context.navigate(context=top_context["context"], url=test_page, wait="complete") + + source_origin = origin() + partition = BrowsingContextPartitionDescriptor(top_context["context"]) + + set_cookie_result = await bidi_session.storage.set_cookie( + cookie=create_cookie(domain=domain_value()), + partition=partition) + + assert set_cookie_result == { + 'partitionKey': { + 'sourceOrigin': source_origin + }, + } + + await assert_cookie_is_set(bidi_session, domain=domain_value(), partition=partition) + + +async def test_partition_context_frame(bidi_session, top_context, test_page, origin, domain_value, + inline, test_page_cross_origin_frame): + frame_url = inline("<div>bar</div>", domain="alt") + frame_source_origin = origin(domain="alt") + root_page_url = inline(f"<iframe src='{frame_url}'></iframe>") + + # Navigate to a page with a frame. + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=root_page_url, + wait="complete", + ) + + all_contexts = await bidi_session.browsing_context.get_tree(root=top_context["context"]) + frame_context_id = all_contexts[0]["children"][0]["context"] + + partition = BrowsingContextPartitionDescriptor(frame_context_id) + + set_cookie_result = await bidi_session.storage.set_cookie( + cookie=create_cookie(domain=domain_value()), + partition=partition) + + assert set_cookie_result == { + 'partitionKey': { + 'sourceOrigin': frame_source_origin + }, + } + + await assert_cookie_is_set(bidi_session, domain=domain_value(), partition=partition) + + +async def test_partition_storage_key_source_origin(bidi_session, test_page, origin, domain_value): + source_origin = origin() + partition = StorageKeyPartitionDescriptor(source_origin=source_origin) + + set_cookie_result = await bidi_session.storage.set_cookie( + cookie=create_cookie(domain=domain_value()), + partition=partition) + + assert set_cookie_result == { + 'partitionKey': { + 'sourceOrigin': source_origin + }, + } + + await assert_cookie_is_set(bidi_session, domain=domain_value(), partition=partition) + +# TODO: test `test_partition_storage_key_user_context`. diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/set_cookie.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/set_cookie.py deleted file mode 100644 index 7e4f3dbb9b0..00000000000 --- a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/set_cookie.py +++ /dev/null @@ -1,60 +0,0 @@ -import pytest -from webdriver.bidi.modules.network import NetworkStringValue -from webdriver.bidi.modules.storage import PartialCookie, BrowsingContextPartitionDescriptor - -pytestmark = pytest.mark.asyncio - - -@pytest.mark.parametrize( - "protocol", - [ - "http", - "https", - ], -) -async def test_set_cookie_protocol(bidi_session, top_context, inline, origin, domain_value, protocol): - # Navigate to a page with a required protocol. - await bidi_session.browsing_context.navigate( - context=top_context["context"], url=(inline("<div>foo</div>", protocol=protocol)), wait="complete" - ) - - source_origin = origin(protocol) - partition = BrowsingContextPartitionDescriptor(top_context["context"]) - - set_cookie_result = await bidi_session.storage.set_cookie( - cookie=PartialCookie( - name='foo', - value=NetworkStringValue('bar'), - domain=domain_value(), - secure=True - ), - partition=partition) - - assert set_cookie_result == { - 'partitionKey': { - 'sourceOrigin': source_origin - }, - } - - # Assert the cookie is actually set. - actual_cookies = await bidi_session.storage.get_cookies(partition=partition) - assert actual_cookies == { - 'cookies': [ - { - 'domain': domain_value(), - 'httpOnly': False, - 'name': 'foo', - 'path': '/', - 'sameSite': 'none', - 'secure': True, - 'size': 6, - 'value': { - 'type': 'string', - 'value': 'bar', - }, - }, - ], - 'partitionKey': { - 'sourceOrigin': source_origin, - }, - } diff --git a/tests/wpt/tests/webidl/ecmascript-binding/global-mutable-prototype.any.js b/tests/wpt/tests/webidl/ecmascript-binding/global-mutable-prototype.any.js new file mode 100644 index 00000000000..eba96e9adf4 --- /dev/null +++ b/tests/wpt/tests/webidl/ecmascript-binding/global-mutable-prototype.any.js @@ -0,0 +1,27 @@ +// META: global=shadowrealm +// META: title=Mutability of the global prototype chain + +const objects = []; +setup(() => { + for (let object = self; object; object = Object.getPrototypeOf(object)) { + objects.push(object); + } +}); + +test(() => { + for (const object of objects) { + const proto = Object.getPrototypeOf(object); + const plainObject = {}; + Object.setPrototypeOf(object, plainObject); + assert_equals(Object.getPrototypeOf(object), plainObject); + Object.setPrototypeOf(object, proto); + } +}, "Setting to a different prototype"); + +test(() => { + for (const object of objects) { + const expected = Object.getPrototypeOf(object); + Object.setPrototypeOf(object, expected); + assert_equals(Object.getPrototypeOf(object), expected); + } +}, "Setting to the same prototype"); diff --git a/tests/wpt/tests/webnn/squeeze.https.any.js b/tests/wpt/tests/webnn/gather.https.any.js index 8b9310d65d4..52bcece8043 100644 --- a/tests/wpt/tests/webnn/squeeze.https.any.js +++ b/tests/wpt/tests/webnn/gather.https.any.js @@ -1,10 +1,10 @@ -// META: title=test WebNN API squeeze operation +// META: title=test WebNN API gather operation // META: global=window,dedicatedworker // META: script=./resources/utils.js // META: timeout=long 'use strict'; -// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-squeeze +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-gather -testWebNNOperation('squeeze', buildOperationWithSingleInput);
\ No newline at end of file +testWebNNOperation('gather', buildOperationWithTwoInputs);
\ No newline at end of file diff --git a/tests/wpt/tests/webnn/gpu/squeeze.https.any.js b/tests/wpt/tests/webnn/gpu/gather.https.any.js index 29ce3e4f91b..7c8a685c5cb 100644 --- a/tests/wpt/tests/webnn/gpu/squeeze.https.any.js +++ b/tests/wpt/tests/webnn/gpu/gather.https.any.js @@ -1,10 +1,10 @@ -// META: title=test WebNN API squeeze operation +// META: title=test WebNN API gather operation // META: global=window,dedicatedworker // META: script=../resources/utils.js // META: timeout=long 'use strict'; -// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-squeeze +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-gather -testWebNNOperation('squeeze', buildOperationWithSingleInput, 'gpu');
\ No newline at end of file +testWebNNOperation('gather', buildOperationWithTwoInputs, 'gpu');
\ No newline at end of file diff --git a/tests/wpt/tests/webnn/gpu/layer_normalization.https.any.js b/tests/wpt/tests/webnn/gpu/layer_normalization.https.any.js new file mode 100644 index 00000000000..1deb43bee5d --- /dev/null +++ b/tests/wpt/tests/webnn/gpu/layer_normalization.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API layerNormalization operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-layernorm + +testWebNNOperation('layerNormalization', buildLayerNorm, 'gpu');
\ No newline at end of file diff --git a/tests/wpt/tests/webnn/layer_normalization.https.any.js b/tests/wpt/tests/webnn/layer_normalization.https.any.js new file mode 100644 index 00000000000..380db4ea528 --- /dev/null +++ b/tests/wpt/tests/webnn/layer_normalization.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API layerNormalization operation +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-layernorm + +testWebNNOperation('layerNormalization', buildLayerNorm);
\ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/abs.json b/tests/wpt/tests/webnn/resources/test_data/abs.json index c59054c3e50..d665da6bb45 100644 --- a/tests/wpt/tests/webnn/resources/test_data/abs.json +++ b/tests/wpt/tests/webnn/resources/test_data/abs.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "abs float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 49.8372426667043, + 82.0929095991747, + 3.1989055476550305, + 85.20904780506325, + 88.94609443980977, + -91.0352208007506, + 31.448491185882546, + -29.311109216503752, + -92.44773429213686, + -15.520709757433963, + 80.91279287806162, + -38.209706112466705, + 53.064761629102065, + 99.6537077669756, + -21.28504881273652, + 90.019831849408, + 18.324518254754622, + -33.06915295290382, + 30.097660827399608, + -74.21503493794903, + 95.60974816793694, + 6.61428748549389, + 31.283208179548808, + -53.20605974670913 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 49.837242126464844, + 82.09291076660156, + 3.1989054679870605, + 85.20904541015625, + 88.94609069824219, + 91.03521728515625, + 31.4484920501709, + 29.31110954284668, + 92.4477310180664, + 15.520709991455078, + 80.91279602050781, + 38.2097053527832, + 53.064762115478516, + 99.6537094116211, + 21.285049438476562, + 90.01982879638672, + 18.32451820373535, + 33.06915283203125, + 30.097660064697266, + 74.21503448486328, + 95.60974884033203, + 6.614287376403809, + 31.2832088470459, + 53.206058502197266 + ], + "type": "float32" + } + }, + { "name": "abs float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/add.json b/tests/wpt/tests/webnn/resources/test_data/add.json index 0a12871ceba..dba361228bd 100644 --- a/tests/wpt/tests/webnn/resources/test_data/add.json +++ b/tests/wpt/tests/webnn/resources/test_data/add.json @@ -1,6 +1,104 @@ { "tests": [ { + "name": "add float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -43.33331702607182, + -67.89795492110251, + 26.462739729601154, + 36.74276245870831, + -65.1773897660934, + -87.70664817075895, + 65.2788147914111, + -74.05226258410215, + -13.82780997496917, + 6.9814867885681196, + 99.8375201051771, + 55.80233785150233, + -75.57196245651672, + 11.499508337009786, + 17.110109711325364, + 95.81167418402984, + 57.447496690075326, + -57.17587415294769, + 27.71905326607728, + -18.21920899392113, + 52.65309891626177, + -69.9945556346263, + 39.82165678962866, + -29.986529326327684 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + -59.74972612329861, + -44.814940102501396, + -87.93879800134108, + 1.884336371742009, + 84.89464239219592, + 47.55365421202336, + 85.64292769131902, + 43.02861451385175, + -60.25821191056049, + 15.606167000302435, + 70.60614780317951, + -7.454866177806224, + -30.206895875534997, + -97.69825508598404, + -0.009843301412843175, + -77.6796011606304, + 30.19668513874859, + -59.19006932092632, + 89.35886332586315, + 28.679809244991418, + -29.72130634585804, + -90.63522901925083, + 28.281854673339666, + 27.66254066077893 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -103.08303833007812, + -112.71289825439453, + -61.47605895996094, + 38.627098083496094, + 19.717254638671875, + -40.15299606323242, + 150.9217529296875, + -31.02364730834961, + -74.08602142333984, + 22.58765411376953, + 170.44366455078125, + 48.34747314453125, + -105.77885437011719, + -86.19874572753906, + 17.100265502929688, + 18.13207244873047, + 87.64418029785156, + -116.3659439086914, + 117.07791900634766, + 10.460599899291992, + 22.931793212890625, + -160.62979125976562, + 68.10350799560547, + -2.3239879608154297 + ], + "type": "float32" + } + }, + { "name": "add float32 1D tensors", "inputs": { "a": { diff --git a/tests/wpt/tests/webnn/resources/test_data/arg_max.json b/tests/wpt/tests/webnn/resources/test_data/arg_max.json index 9af47a95894..d2fe9e62caf 100644 --- a/tests/wpt/tests/webnn/resources/test_data/arg_max.json +++ b/tests/wpt/tests/webnn/resources/test_data/arg_max.json @@ -1,6 +1,50 @@ { "tests": [ { + "name": "argMax float32 1D constant tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955, + -51.0936194154457, + -6.5397018645619625, + 73.81338015899149, + 88.46114630531724, + -5.294266751122791, + -79.20668057325759, + -41.70176598864654, + 73.81338015899149, + 88.46114630531724, + -84.939998758247, + -61.488942502520906, + -98.33874402761955 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 3 + ], + "type": "int64" + } + }, + { "name": "argMax float32 1D tensor default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/arg_min.json b/tests/wpt/tests/webnn/resources/test_data/arg_min.json index dc0b5cdfd1a..132a2dc3e8b 100644 --- a/tests/wpt/tests/webnn/resources/test_data/arg_min.json +++ b/tests/wpt/tests/webnn/resources/test_data/arg_min.json @@ -1,6 +1,50 @@ { "tests": [ { + "name": "argMin float32 1D constant tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + 3.830124090690262, + -24.986487937638074, + 5.299982630691289, + -48.5486590218902, + 40.30886781808215, + 60.184293919409726, + -82.78385618759043, + -96.50904103637833, + 71.87028201591897, + 38.866394268784035, + -39.143725517854435, + 31.444366685561903, + -82.78385618759043, + -96.50904103637833, + -25.53388886326502, + -16.142265850469343, + 66.63677406472371, + 82.5119815304117, + -82.78385618759043, + -96.50904103637833, + 39.7687246127592, + 42.15040238450999, + 82.66863662444459, + 85.4526923278379 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 7 + ], + "type": "int64" + } + }, + { "name": "argMin float32 1D tensor default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/average_pool2d.json b/tests/wpt/tests/webnn/resources/test_data/average_pool2d.json index 802e0d76462..5a9f4e28b10 100644 --- a/tests/wpt/tests/webnn/resources/test_data/average_pool2d.json +++ b/tests/wpt/tests/webnn/resources/test_data/average_pool2d.json @@ -1,6 +1,77 @@ { "tests": [ { + "name": "averagePool2d float32 4D constant tensor all positive default options", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 22.975555502750634, + 78.15438048012338, + 9.68611138116071, + 51.29803808129347, + 32.19308601456918, + 87.65037289600019, + 87.25082191311348, + 39.49793996935087, + 80.09963591169489, + 10.220142557736978, + 52.60270021646585, + 1.4128639882603933, + 11.954064466077474, + 85.0007506374375, + 64.7837446465813, + 88.03128735720126, + 11.333851214909307, + 70.61659435728073, + 84.90442561999888, + 79.06688041781518, + 7.328724951604215, + 35.97796581186121, + 10.17730631094398, + 1.4140757517112412, + 78.10038172113374, + 91.59549689157087, + 65.64701225681809, + 55.14215004436653, + 18.432438840756184, + 49.34624267439973, + 15.648024969290454, + 68.02723372727797, + 20.342549040418124, + 26.72794900604616, + 64.87446829774323, + 46.56714896227794, + 79.57832937136276, + 4.338463748959498, + 38.18383968382213, + 45.253981324455175, + 80.9717996657439, + 67.58124910163149, + 6.026499585657263, + 29.77881349289366, + 58.58993337807239, + 2.2384984647495054, + 14.505490166700486, + 68.72449589246624, + 76.45657404642184, + 23.53263275794233 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [1, 2, 1, 1], + "data": [ + 47.26926803588867, + 44.72445297241211 + ], + "type": "float32" + } + }, + { "name": "averagePool2d float32 4D tensor all positive default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/batch_normalization.json b/tests/wpt/tests/webnn/resources/test_data/batch_normalization.json index 19f414bbfea..04ab0d0d6f1 100644 --- a/tests/wpt/tests/webnn/resources/test_data/batch_normalization.json +++ b/tests/wpt/tests/webnn/resources/test_data/batch_normalization.json @@ -90,6 +90,98 @@ } }, { + "name": "batchNormalization float32 2D constant tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + -41.30732967168238, + 64.08864045143429, + -63.376671841233104, + -46.7903680211994, + 83.0222726565018, + -80.08049213079853, + -62.144380499565784, + -0.10012771650340824, + -40.902161220312074, + 56.963061967558474, + 37.37249789808206, + 57.04647733193906, + 82.05679802728304, + -86.11642850667623, + 76.88317547014259, + 97.03362133579051, + -21.35103988063949, + -96.93823797160586, + -9.359310262561493, + 80.2082435478892, + -85.36802529512583, + 62.35185227095363, + -68.4724340974042, + -12.107167478351585 + ], + "type": "float32", + "constant": true + }, + "mean": { + "shape": [6], + "data": [ + -7.814267643537363, + -95.6412954353084, + 38.154405424391285, + -55.9520351570133, + -87.8650062484926, + -41.636455304505525 + ], + "type": "float32", + "constant": true + }, + "variance": { + "shape": [6], + "data": [ + 60.311864286118144, + 26.432604504927436, + 53.275636661772396, + 40.146120500534074, + 59.41098289103077, + 35.99981828466932 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "shape": [4, 6], + "data": [ + -4.312741756439209, + 31.068212509155273, + -13.910240173339844, + 1.4459478855133057, + 22.170541763305664, + -6.407354354858398, + -6.995829105377197, + 18.583200454711914, + -10.831125259399414, + 17.820920944213867, + 16.2480411529541, + 16.447195053100586, + 11.57226848602295, + 1.8526301383972168, + 5.306026458740234, + 24.145092010498047, + 8.629376411437988, + -9.216986656188965, + -0.1989477425813675, + 34.203548431396484, + -16.923160552978516, + 18.671411514282227, + 2.5159497261047363, + 4.921559810638428 + ], + "type": "float32" + } + }, + { "name": "batchNormalization float32 2D tensor default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/ceil.json b/tests/wpt/tests/webnn/resources/test_data/ceil.json index 6fa623977fc..b9bccbc3a07 100644 --- a/tests/wpt/tests/webnn/resources/test_data/ceil.json +++ b/tests/wpt/tests/webnn/resources/test_data/ceil.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "ceil float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 67.38941577648342, + 36.78218646695805, + 99.10649131558534, + -22.587103876323283, + 32.70173557917525, + 17.688807510873474, + 5.631034848468943, + 12.965238190762022, + 83.1319330049133, + -29.29246123472926, + 19.844631250887133, + 65.27903232818329, + 26.311109519759952, + 24.2856723456172, + -48.3976724829041, + -5.617412380605998, + 61.53380759105448, + -87.81197726868459, + 69.71428621372127, + 5.0031021954943355, + 84.3683411023199, + -9.390542062321572, + -27.85661776414834, + -34.89593295662057 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 68, + 37, + 100, + -22, + 33, + 18, + 6, + 13, + 84, + -29, + 20, + 66, + 27, + 25, + -48, + -5, + 62, + -87, + 70, + 6, + 85, + -9, + -27, + -34 + ], + "type": "float32" + } + }, + { "name": "ceil float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/clamp.json b/tests/wpt/tests/webnn/resources/test_data/clamp.json index 93ab5ca0c1c..0e948f99319 100644 --- a/tests/wpt/tests/webnn/resources/test_data/clamp.json +++ b/tests/wpt/tests/webnn/resources/test_data/clamp.json @@ -2,6 +2,73 @@ "tests": [ // default options { + "name": "clamp float32 1D constant tensor default options", + "inputs": { + "x": { // use 'x' for input operand name + "shape": [24], + "data": [ + -9.817828475355284, + -6.024063916325786, + -4.072562498632983, + -6.575078191902692, + -7.7556836912181915, + 9.524681107378463, + 3.7292487446449307, + 6.4816868736447475, + -1.5374205904252634, + -7.343102426698445, + 7.880751290929794, + -2.056408790509967, + 6.34386375786449, + 5.52573787183, + 0.8433118207347725, + -8.19996033345526, + -7.786487326213716, + 9.280223823954241, + -2.31305948485121, + 9.549695091037119, + 5.788925460130297, + 5.549378312916486, + 7.409400528051194, + -2.1236145770503745 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -9.817828178405762, + -6.024064064025879, + -4.0725626945495605, + -6.575078010559082, + -7.755683898925781, + 9.524681091308594, + 3.7292487621307373, + 6.481687068939209, + -1.537420630455017, + -7.34310245513916, + 7.880751132965088, + -2.0564088821411133, + 6.3438639640808105, + 5.525737762451172, + 0.8433118462562561, + -8.199960708618164, + -7.786487102508545, + 9.280223846435547, + -2.3130595684051514, + 9.549695014953613, + 5.788925647735596, + 5.549378395080566, + 7.409400463104248, + -2.123614549636841 + ], + "type": "float32" + } + }, + { "name": "clamp float32 1D tensor default options", "inputs": { "x": { // use 'x' for input operand name diff --git a/tests/wpt/tests/webnn/resources/test_data/concat.json b/tests/wpt/tests/webnn/resources/test_data/concat.json index 4230744e86f..5e2285b75a0 100644 --- a/tests/wpt/tests/webnn/resources/test_data/concat.json +++ b/tests/wpt/tests/webnn/resources/test_data/concat.json @@ -2,6 +2,83 @@ "tests": [ // concat 1D tensors { + "name": "concat two float32 1D constant tensors of same shape along axis 0", + "inputs": [ + { + "name": "input1", + "shape": [12], + "data": [ + -0.39444134019222243, + 0.8619825316530809, + 0.3379962524218807, + -0.9906398615400507, + 0.576785657225761, + 0.3227640108329237, + -0.44735022799701873, + 0.11028251232581932, + -0.5945112749179908, + -0.40284849555754754, + -0.9531654171044694, + -0.6731740531810844 + ], + "type": "float32", + "constant": true + }, + { + "name": "input2", + "shape": [12], + "data": [ + 0.4918989118791477, + -0.15864110312378976, + -0.34188115459083157, + -0.9158143500894873, + -0.7206121708970712, + -0.7993468785008635, + 0.6653799854931952, + 0.03886038855553897, + 0.5182055416768865, + -0.8742016938344297, + -0.479021891130635, + 0.1211843166661235 + ], + "type": "float32", + "constant": true + } + ], + "axis": 0, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.3944413363933563, + 0.861982524394989, + 0.337996244430542, + -0.990639865398407, + 0.576785683631897, + 0.32276400923728943, + -0.44735023379325867, + 0.11028251051902771, + -0.5945112705230713, + -0.402848482131958, + -0.9531654119491577, + -0.6731740236282349, + 0.49189892411231995, + -0.15864109992980957, + -0.3418811559677124, + -0.9158143401145935, + -0.7206121683120728, + -0.7993468642234802, + 0.6653800010681152, + 0.03886038810014725, + 0.5182055234909058, + -0.8742017149925232, + -0.4790218770503998, + 0.1211843192577362 + ], + "type": "float32" + } + }, + { "name": "concat two float32 1D tensors of same shape along axis 0", "inputs": [ { diff --git a/tests/wpt/tests/webnn/resources/test_data/conv2d.json b/tests/wpt/tests/webnn/resources/test_data/conv2d.json index 850897df4e1..5f8cd814a90 100644 --- a/tests/wpt/tests/webnn/resources/test_data/conv2d.json +++ b/tests/wpt/tests/webnn/resources/test_data/conv2d.json @@ -68,6 +68,75 @@ } }, { + "name": "conv2d float32 4D both input and filter constant tensors default options", + "inputs": { + "input": { + "shape": [1, 1, 5, 5], + "data": [ + 0.6124474607869732, + 0.8857858599952035, + 0.13667134799354397, + 0.564529098909835, + 0.8965171985225997, + 0.36792828664768873, + 0.6811466319147079, + 0.04795110047019757, + 0.33355462154327986, + 0.19882695924603588, + 0.4116714070095846, + 0.07934240242135737, + 0.42724633975875426, + 0.5358005687699703, + 0.5910805999797129, + 0.2841543363273238, + 0.414725865128835, + 0.026906268886554896, + 0.3621256577250671, + 0.9945681862504354, + 0.07184549434969778, + 0.1220437231354885, + 0.8422137325421886, + 0.4537501021068471, + 0.2152944303497728 + ], + "type": "float32", + "constant": true + }, + "filter": { + "shape": [1, 1, 3, 3], + "data": [ + 0.3804761331189006, + 0.5280312082437455, + 0.2194703660873738, + 0.3668976886827289, + 0.33974137307686836, + 0.42000596251782674, + 0.38050310131155185, + 0.19443586243810795, + 0.5686976617292392 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [1, 1, 3, 3], + "data": [ + 1.5323282480239868, + 1.3573521375656128, + 1.3641656637191772, + 1.071682333946228, + 1.1259644031524658, + 1.4713115692138672, + 1.078782320022583, + 1.155018925666809, + 1.656954288482666 + ], + "type": "float32" + } + }, + { "name": "conv2d float32 4D input and filter tensors default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json b/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json index 980cc9f6629..42274e6fa37 100644 --- a/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json +++ b/tests/wpt/tests/webnn/resources/test_data/conv_transpose2d.json @@ -41,6 +41,48 @@ } }, { + "name": "convTranspose2d float32 4D both input and filter constant tensors default options", + "inputs": { + "input": { + "shape": [1, 1, 2, 2], + "data": [ + 0.5872158177067033, + 0.6077792328258038, + 0.01728916618181975, + 0.26146076483771563 + ], + "type": "float32", + "constant": true + }, + "filter": { + "shape": [1, 1, 2, 2], + "data": [ + 0.32927132527587477, + 0.5866857173772775, + 0.29701370673751004, + 0.0033378428248385106 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "shape": [1, 1, 3, 3], + "data": [ + 0.1933533400297165, + 0.5446354150772095, + 0.3565753698348999, + 0.18010397255420685, + 0.2787136137485504, + 0.15542395412921906, + 0.0051351189613342285, + 0.07771513611078262, + 0.0008727149106562138 + ], + "type": "float32" + } + }, + { "name": "convTranspose2d float32 4D input and filter tensors default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/cos.json b/tests/wpt/tests/webnn/resources/test_data/cos.json index 4d992325509..db7ade11e38 100644 --- a/tests/wpt/tests/webnn/resources/test_data/cos.json +++ b/tests/wpt/tests/webnn/resources/test_data/cos.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "cos float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 85.56368722678593, + -45.09983640817779, + -94.6775036804249, + 83.49029219662862, + -31.367904335227692, + 70.1804254973957, + -90.36229826898601, + -83.00758001757269, + 61.51649571682452, + -32.51877900985289, + -48.376587517032775, + -58.02735967650854, + 89.79197789644661, + -84.53326629430444, + -58.23252607768894, + -76.14168597373077, + -59.05887786348942, + 77.38546821194151, + -98.67289449592316, + -63.611559926077675, + 26.857246203003186, + 83.70417131490925, + 76.56606838780263, + -47.83436545380422 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.7380040884017944, + 0.43789437413215637, + 0.9090799689292908, + -0.23584702610969543, + 0.9988471865653992, + 0.48416373133659363, + -0.7358400821685791, + 0.24218930304050446, + 0.25266921520233154, + 0.4510514736175537, + -0.31276169419288635, + 0.09197491407394409, + -0.2537800967693329, + -0.9583188891410828, + -0.11282006651163101, + 0.736129879951477, + -0.80721116065979, + -0.4045141637325287, + -0.283336341381073, + 0.7111190557479858, + -0.1531042903661728, + -0.43673399090766907, + 0.39213326573371887, + -0.7580515146255493 + ], + "type": "float32" + } + }, + { "name": "cos float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/div.json b/tests/wpt/tests/webnn/resources/test_data/div.json index d72544e8ec4..a60341181d1 100644 --- a/tests/wpt/tests/webnn/resources/test_data/div.json +++ b/tests/wpt/tests/webnn/resources/test_data/div.json @@ -1,6 +1,104 @@ { "tests": [ { + "name": "div float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + 60.42374184854583, + -86.92247771592565, + -19.496113538677307, + -15.150616021872224, + 13.455190756956796, + 45.4335994568701, + 61.08286131089616, + 70.71882919883615, + -31.27858011424047, + 56.083543107783214, + 38.99276571709217, + -3.275369300234928, + 32.289323532099786, + -3.676541725498467, + 88.4349140505588, + 14.369060854798647, + 13.94319409117783, + 16.861190475721344, + 4.816806540352701, + 44.15916607007162, + -13.083211898368276, + 44.565997906464105, + -34.892785072690245, + -74.09375203216162 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + -95.02903333542001, + 62.804865007594174, + -85.32865597192423, + -68.20919717822437, + 79.45568261298038, + -68.69049322917093, + -94.46466465496823, + -10.000411029009541, + 18.318865013229242, + -3.623280011603569, + -5.957828048196006, + 89.49882849628409, + 94.95791079054848, + -79.00059056550418, + -79.87597038424425, + 74.997874802068, + 25.86537368134097, + 91.54433121797925, + 81.65287344691947, + 48.214831959279195, + 63.37012091471408, + 10.62638472655793, + 46.12662564540156, + 77.2232730204774 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.6358450651168823, + -1.3840086460113525, + 0.22848258912563324, + 0.22211983799934387, + 0.16934208571910858, + -0.6614248752593994, + -0.6466212868690491, + -7.071591854095459, + -1.7074518203735352, + -15.478666305541992, + -6.544795513153076, + -0.036596786230802536, + 0.3400382697582245, + 0.046538159251213074, + -1.1071529388427734, + 0.19159291684627533, + 0.5390679836273193, + 0.18418607115745544, + 0.058991268277168274, + 0.9158834218978882, + -0.20645710825920105, + 4.193900108337402, + -0.7564564943313599, + -0.9594743251800537 + ], + "type": "float32" + } + }, + { "name": "div float32 1D tensors", "inputs": { "a": { @@ -65,7 +163,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [24], "data": [ -0.6358450651168823, @@ -161,7 +259,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [4, 6], "data": [ -0.6358450651168823, @@ -257,7 +355,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 3, 4], "data": [ -0.6358450651168823, @@ -353,7 +451,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -0.6358450651168823, @@ -449,7 +547,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 1, 2, 3], "data": [ -0.6358450651168823, @@ -522,7 +620,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -0.6922348141670227, @@ -600,7 +698,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 0.6208509802818298, @@ -676,7 +774,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 0.8047597408294678, @@ -749,7 +847,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -0.6922348141670227, diff --git a/tests/wpt/tests/webnn/resources/test_data/elu.json b/tests/wpt/tests/webnn/resources/test_data/elu.json index 68c0c80c59b..b1c443282e4 100644 --- a/tests/wpt/tests/webnn/resources/test_data/elu.json +++ b/tests/wpt/tests/webnn/resources/test_data/elu.json @@ -1,6 +1,73 @@ { // elu: The calculation follows the expression max(0, x) + alpha * (exp(min(0, x)) - 1). "tests": [ { + "name": "elu float32 1D constant tensor default options", // default options: {alpha: 1} + "inputs": { + "x": { + "shape": [24], + "data": [ + 4.721739616402454, + 0.37687805459885837, + 1.4189998297338988, + -3.866366516102673, + 1.3590080831697868, + -3.8641844556612392, + 7.839725573639406, + -6.690801377003339, + 0.545640671378024, + 5.776711453839759, + 7.263273186498619, + -7.419948093040434, + 5.665064356187175, + -6.712906923265587, + -3.3348948531721945, + -1.2103675328053143, + 7.255546982014842, + 8.903468527480992, + -4.019860311974934, + 7.114678383091487, + -0.11212847159184136, + -3.688840965850466, + 6.135151096361078, + -9.895182558358613 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 4.721739768981934, + 0.3768780529499054, + 1.4189997911453247, + -0.9790657162666321, + 1.3590080738067627, + -0.9790199995040894, + 7.839725494384766, + -0.9987577199935913, + 0.5456406474113464, + 5.776711463928223, + 7.263273239135742, + -0.999400794506073, + 5.665064334869385, + -0.9987848997116089, + -0.9643816947937012, + -0.7019122838973999, + 7.255547046661377, + 8.903468132019043, + -0.982044517993927, + 7.114678382873535, + -0.10607059299945831, + -0.9749990105628967, + 6.135150909423828, + -0.99994957447052 + ], + "type": "float32" + } + }, + { "name": "elu float32 1D tensor default options", // default options: {alpha: 1} "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/equal.json b/tests/wpt/tests/webnn/resources/test_data/equal.json index 8350a25d594..bbd9143a032 100644 --- a/tests/wpt/tests/webnn/resources/test_data/equal.json +++ b/tests/wpt/tests/webnn/resources/test_data/equal.json @@ -28,6 +28,104 @@ } }, { + "name": "equal float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + 2.8057064434130865, + 5.588105051769192, + 2.8552264057573318, + 4.996258886261531, + 0.9727277518275201, + -4.7425998673234115, + 2.8057064434130865, + 5.588105051769192, + -5.107602083264831, + 6.62414218944782, + -2.320724650141428, + -7.053896009779472, + 2.8057064434130865, + 5.588105051769192, + 4.980423911313675, + -5.440841218751173, + 1.1459590058073985, + 7.774532655736756, + 2.8057064434130865, + 5.588105051769192, + -6.245251018074902, + -2.849073058101119, + -2.6951117252164236, + 5.8175630540970715 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + 2.8057064434130865, + 5.588105051769192, + -4.839719707803649, + 4.996258886261531, + 0.9727277518275201, + -6.173707599765419, + 2.8057064434130865, + 5.588105051769192, + 7.767369675510874, + -4.308908126069415, + -5.895479626582176, + -8.532091541161986, + 2.8057064434130865, + 5.588105051769192, + 0.17833953390240076, + -4.479541639848148, + 0.6819732148052395, + -6.687512654244134, + 2.8057064434130865, + 5.588105051769192, + -9.041799605912026, + -1.972828107164485, + -3.011512276155144, + 3.6268343183100704 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0 + ], + "type": "uint8" + } + }, + { "name": "equal float32 1D tensors", "inputs": { "a": { diff --git a/tests/wpt/tests/webnn/resources/test_data/erf.json b/tests/wpt/tests/webnn/resources/test_data/erf.json index 8a9ae6e68c1..6f0b550cf79 100644 --- a/tests/wpt/tests/webnn/resources/test_data/erf.json +++ b/tests/wpt/tests/webnn/resources/test_data/erf.json @@ -21,6 +21,73 @@ } }, { + "name": "erf float32 1D constant tensor", + "inputs": { + "input": { + "shape": [24], + "data": [ + -0.5883062462825124, + -0.5323766618091814, + 0.127987056070479, + 0.5772181473181615, + 0.9045778906827358, + -0.49856746753516346, + 0.9843886624146143, + 0.21642259286228738, + 0.25235170684373465, + -0.14916697974435467, + 0.9136939573458718, + -0.5736439986742754, + 0.740446832641029, + 0.5202203195176929, + -0.16549504687505712, + 0.8005731834523444, + 0.4001320000966242, + -0.7489422658248586, + -0.8946002438575227, + -0.392025619231934, + 0.6854220843685903, + -0.674490045974586, + -0.4398081957860396, + 0.2709762572248531 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.5945858955383301, + -0.5484867095947266, + 0.14363321661949158, + 0.5856771469116211, + 0.7991966009140015, + -0.5192402005195618, + 0.8361185789108276, + 0.2404468059539795, + 0.27881762385368347, + -0.16707675158977509, + 0.8036975860595703, + -0.5827808976173401, + 0.7049695253372192, + 0.5380884408950806, + -0.1850501298904419, + 0.742441713809967, + 0.4285193383693695, + -0.710474967956543, + -0.7941843867301941, + -0.4207003712654114, + 0.6676210165023804, + -0.6598520874977112, + -0.46604686975479126, + 0.29844197630882263 + ], + "type": "float32" + } + }, + { "name": "erf float32 1D tensor", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/exp.json b/tests/wpt/tests/webnn/resources/test_data/exp.json index 8a86edec3b8..2de52d951e9 100644 --- a/tests/wpt/tests/webnn/resources/test_data/exp.json +++ b/tests/wpt/tests/webnn/resources/test_data/exp.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "exp float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 0.342143655338516, + -3.3109650690636583, + -3.696757542725746, + -5.105378072825206, + 5.471040383543361, + -0.06790750193598072, + 2.7373435551676373, + -3.547075850060808, + 5.3392248393586215, + -1.2636781380561768, + -0.9162953518691133, + -9.088432637604779, + -4.016050813135332, + 4.670352907446356, + 7.326991954708756, + 8.294342869341662, + -7.3454139558670795, + -0.9275799995316945, + -1.7085379363808997, + -9.737379277450184, + -1.9747875652397973, + 8.203150154065185, + -7.267597492286808, + -3.5890684093944714 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 1.4079625606536865, + 0.03648095205426216, + 0.024803820997476578, + 0.006064045242965221, + 237.70733642578125, + 0.9343469142913818, + 15.44589900970459, + 0.02880876138806343, + 208.35113525390625, + 0.2826126217842102, + 0.39999815821647644, + 0.00011296502634650096, + 0.018024004995822906, + 106.73540496826172, + 1520.8004150390625, + 4001.173583984375, + 0.0006455459515564144, + 0.3955096900463104, + 0.18113042414188385, + 0.0000590350573475007, + 0.1387907862663269, + 3652.4365234375, + 0.0006977862794883549, + 0.02762405201792717 + ], + "type": "float32" + } + }, + { "name": "exp float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/expand.json b/tests/wpt/tests/webnn/resources/test_data/expand.json index be56ca14890..00bf4a37b4e 100644 --- a/tests/wpt/tests/webnn/resources/test_data/expand.json +++ b/tests/wpt/tests/webnn/resources/test_data/expand.json @@ -221,6 +221,51 @@ } }, { + "name": "expand float32 1D constant tensor to 1D", + "inputs": { + "input": { + "shape": [1], + "data": [ + -6.461850643157959 + ], + "type": "float32", + "constant": true + } + }, + "newShape": [24], + "expected": { + "name": "output", + "shape": [24], + "data": [ + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959, + -6.461850643157959 + ], + "type": "float32" + } + }, + { "name": "expand float32 1D tensor to 1D", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/floor.json b/tests/wpt/tests/webnn/resources/test_data/floor.json index f2fa797d416..3b5dba15762 100644 --- a/tests/wpt/tests/webnn/resources/test_data/floor.json +++ b/tests/wpt/tests/webnn/resources/test_data/floor.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "floor float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 89.69458425635187, + -79.6715006046712, + -66.80949305244779, + -71.88439187517632, + 86.33935218844132, + 6.823808491438228, + 24.908446694609452, + 0.9734055387608578, + 19.94818517399692, + 0.8437776596471878, + -24.75293941821147, + 77.76482131339927, + -33.64446543048625, + 80.77624589277926, + 44.47844134603099, + -37.65005913863395, + -83.78780150071003, + 65.84009074464839, + -39.83677499773579, + 32.52575852910243, + -21.21354337121204, + -80.30910898865443, + 16.674850201817335, + -72.88893024677465 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 89, + -80, + -67, + -72, + 86, + 6, + 24, + 0, + 19, + 0, + -25, + 77, + -34, + 80, + 44, + -38, + -84, + 65, + -40, + 32, + -22, + -81, + 16, + -73 + ], + "type": "float32" + } + }, + { "name": "floor float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/gather.json b/tests/wpt/tests/webnn/resources/test_data/gather.json new file mode 100644 index 00000000000..a01654637f1 --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/gather.json @@ -0,0 +1,1268 @@ +{ + "tests": [ + { + "name": "gather float32 1D tensor and uint32 0D scalar indices default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [], + "data": [ + 4 + ], + "type": "uint32" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + 89.0337142944336 + ], + "type": "float32" + } + }, + { + "name": "gather float32 1D tensor and int64 0D scalar indices default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [], + "data": [ + 0 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [], + "data": [ + -66.05901336669922 + ], + "type": "float32" + } + }, + { + "name": "gather float32 1D tensor and int64 1D indices default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [8], + "data": [ + 16, + 20, + 6, + 11, + 17, + 19, + 13, + 17 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [8], + "data": [ + 10.829925537109375, + 0.9129875898361206, + 43.84803771972656, + -50.42131042480469, + -19.693084716796875, + 43.11057662963867, + 55.620765686035156, + -19.693084716796875 + ], + "type": "float32" + } + }, + { + "name": "gather float32 1D tensor and int64 2D indices default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [2, 2], + "data": [ + 14, + 9, + 21, + 17 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [2, 2], + "data": [ + 44.92119598388672, + 41.94132614135742, + -7.699817180633545, + -19.693084716796875 + ], + "type": "float32" + } + }, + { + "name": "gather float32 1D tensor and int64 3D indices default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [2, 3, 3], + "data": [ + 17, + 19, + 14, + 16, + 13, + 0, + 5, + 15, + 18, + 18, + 6, + 20, + 7, + 22, + 5, + 1, + 4, + 19 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 3], + "data": [ + -19.693084716796875, + 43.11057662963867, + 44.92119598388672, + 10.829925537109375, + 55.620765686035156, + -66.05901336669922, + -45.89653396606445, + 56.828636169433594, + -37.696800231933594, + -37.696800231933594, + 43.84803771972656, + 0.9129875898361206, + 48.81806945800781, + 25.76774024963379, + -45.89653396606445, + -68.9197006225586, + 89.0337142944336, + 43.11057662963867 + ], + "type": "float32" + } + }, + { + "name": "gather float32 1D tensor and int64 4D indices default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [1, 2, 2, 3], + "data": [ + 18, + 18, + 22, + 11, + 8, + 15, + 12, + 11, + 7, + 13, + 7, + 7 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 3], + "data": [ + -37.696800231933594, + -37.696800231933594, + 25.76774024963379, + -50.42131042480469, + 51.79948425292969, + 56.828636169433594, + 90.2870101928711, + -50.42131042480469, + 48.81806945800781, + 55.620765686035156, + 48.81806945800781, + 48.81806945800781 + ], + "type": "float32" + } + }, + { + "name": "gather float32 2D tensor and 0D scalar indices default options", + "inputs": { + "input": { + "shape": [12, 2], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [], + "data": [ + 11 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [2], + "data": [ + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + } + }, + { + "name": "gather float32 2D tensor and 1D indices default options", + "inputs": { + "input": { + "shape": [12, 2], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [8], + "data": [ + 1, + 10, + 9, + 0, + 3, + 5, + 3, + 8 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [8, 2], + "data": [ + -77.02045440673828, + -26.158037185668945, + 0.9129875898361206, + -7.699817180633545, + -37.696800231933594, + 43.11057662963867, + -66.05901336669922, + -68.9197006225586, + 43.84803771972656, + 48.81806945800781, + -1.1303654909133911, + -50.42131042480469, + 43.84803771972656, + 48.81806945800781, + 10.829925537109375, + -19.693084716796875 + ], + "type": "float32" + } + }, + { + "name": "gather float32 2D tensor and 2D indices default options", + "inputs": { + "input": { + "shape": [12, 2], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [2, 2], + "data": [ + 4, + 8, + 9, + 10 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2], + "data": [ + 51.79948425292969, + 41.94132614135742, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545 + ], + "type": "float32" + } + }, + { + "name": "gather float32 2D tensor and 3D indices default options", + "inputs": { + "input": { + "shape": [12, 2], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [2, 3, 3], + "data": [ + 8, + 2, + 2, + 3, + 4, + 1, + 2, + 2, + 7, + 11, + 4, + 11, + 6, + 6, + 7, + 3, + 11, + 10 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 3, 2], + "data": [ + 10.829925537109375, + -19.693084716796875, + 89.0337142944336, + -45.89653396606445, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 89.0337142944336, + -45.89653396606445, + 44.92119598388672, + 56.828636169433594, + 25.76774024963379, + 73.60064697265625, + 51.79948425292969, + 41.94132614135742, + 25.76774024963379, + 73.60064697265625, + 90.2870101928711, + 55.620765686035156, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 43.84803771972656, + 48.81806945800781, + 25.76774024963379, + 73.60064697265625, + 0.9129875898361206, + -7.699817180633545 + ], + "type": "float32" + } + }, + { + "name": "gather float32 2D tensor and 4D indices default options", + "inputs": { + "input": { + "shape": [12, 2], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [1, 2, 2, 3], + "data": [ + 6, + 9, + 7, + 3, + 4, + 7, + 4, + 3, + 7, + 7, + 6, + 0 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 3, 2], + "data": [ + 90.2870101928711, + 55.620765686035156, + -37.696800231933594, + 43.11057662963867, + 44.92119598388672, + 56.828636169433594, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + 44.92119598388672, + 56.828636169433594, + 51.79948425292969, + 41.94132614135742, + 43.84803771972656, + 48.81806945800781, + 44.92119598388672, + 56.828636169433594, + 44.92119598388672, + 56.828636169433594, + 90.2870101928711, + 55.620765686035156, + -66.05901336669922, + -68.9197006225586 + ], + "type": "float32" + } + }, + { + "name": "gather float32 3D tensor and 2D indices default options", + "inputs": { + "input": { + "shape": [3, 4, 2], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [2, 2], + "data": [ + 2, + 1, + 1, + 1 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 4, 2], + "data": [ + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594 + ], + "type": "float32" + } + }, + { + "name": "gather float32 4D tensor and 2D indices default options", + "inputs": { + "input": { + "shape": [8, 1, 1, 3], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [2, 2], + "data": [ + 0, + 0, + 7, + 4 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 1, 1, 3], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672 + ], + "type": "float32" + } + }, + { + "name": "gather float32 5D tensor and 1D indices default options", + "inputs": { + "input": { + "shape": [4, 2, 1, 1, 3], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [3], + "data": [ + 3, + 2, + 2 + ], + "type": "int64" + } + }, + "expected": { + "name": "output", + "shape": [3, 2, 1, 1, 3], + "data": [ + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875 + ], + "type": "float32" + } + }, + { + "name": "gather float32 3D tensor and 1D indices options.axis=1", + "inputs": { + "input": { + "shape": [3, 4, 2], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [3], + "data": [ + 1, + 1, + 2 + ], + "type": "int64" + } + }, + "options": { + "axis": 1 + }, + "expected": { + "name": "output", + "shape": [3, 3, 2], + "data": [ + -77.02045440673828, + -26.158037185668945, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + -1.1303654909133911, + -50.42131042480469, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + -37.696800231933594, + 43.11057662963867, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545 + ], + "type": "float32" + } + }, + { + "name": "gather float32 3D tensor and 2D indices options.axis=2", + "inputs": { + "input": { + "shape": [3, 4, 2], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [2, 2], + "data": [ + 0, + 0, + 0, + 1 + ], + "type": "int64" + } + }, + "options": { + "axis": 2 + }, + "expected": { + "name": "output", + "shape": [3, 4, 2, 2], + "data": [ + -66.05901336669922, + -66.05901336669922, + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -77.02045440673828, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + 89.0337142944336, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 43.84803771972656, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 51.79948425292969, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -1.1303654909133911, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 90.2870101928711, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 44.92119598388672, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + 10.829925537109375, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + -37.696800231933594, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + 0.9129875898361206, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 25.76774024963379, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + } + }, + { + "name": "gather float32 4D tensor and 2D indices explict options.axis=0", + "inputs": { + "input": { + "shape": [8, 1, 1, 3], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [2, 2], + "data": [ + 0, + 0, + 7, + 4 + ], + "type": "int64" + } + }, + "options": { + "axis": 0 + }, + "expected": { + "name": "output", + "shape": [2, 2, 1, 1, 3], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672 + ], + "type": "float32" + } + }, + { + "name": "gather float32 5D tensor and 0D scalar indices options.axis=4", + "inputs": { + "input": { + "shape": [4, 2, 1, 1, 3], + "data": [ + -66.05901336669922, + -68.9197006225586, + -77.02045440673828, + -26.158037185668945, + 89.0337142944336, + -45.89653396606445, + 43.84803771972656, + 48.81806945800781, + 51.79948425292969, + 41.94132614135742, + -1.1303654909133911, + -50.42131042480469, + 90.2870101928711, + 55.620765686035156, + 44.92119598388672, + 56.828636169433594, + 10.829925537109375, + -19.693084716796875, + -37.696800231933594, + 43.11057662963867, + 0.9129875898361206, + -7.699817180633545, + 25.76774024963379, + 73.60064697265625 + ], + "type": "float32" + }, + "indices": { + "shape": [], + "data": [ + 1 + ], + "type": "int64" + } + }, + "options": { + "axis": 4 + }, + "expected": { + "name": "output", + "shape": [4, 2, 1, 1], + "data": [ + -68.9197006225586, + 89.0337142944336, + 48.81806945800781, + -1.1303654909133911, + 55.620765686035156, + 10.829925537109375, + 43.11057662963867, + 25.76774024963379 + ], + "type": "float32" + } + } + ] +}
\ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/gemm.json b/tests/wpt/tests/webnn/resources/test_data/gemm.json index 3738e19f7c6..23a18b316ca 100644 --- a/tests/wpt/tests/webnn/resources/test_data/gemm.json +++ b/tests/wpt/tests/webnn/resources/test_data/gemm.json @@ -145,6 +145,103 @@ }, // options.c { + "name": "gemm two float32 2D constant tensors options.c", + "inputs": { + "a": { + "shape": [3, 4], + "data": [ + 82.98884511142329, + 90.51641254722982, + 59.6385201162642, + 36.27187180381433, + 18.96485038946509, + 43.89479290862091, + 98.89487912764056, + 91.46013741088626, + 50.51683887619669, + 40.45679629199866, + 50.76741460760452, + 9.336554329198155 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [4, 5], + "data": [ + 25.14739246484985, + 66.69238549579231, + 63.29909902139696, + 10.629964783998469, + 61.32737573972831, + 0.003725653326558387, + 16.499146388625483, + 3.0366680571384252, + 93.14021782678614, + 70.08265680040718, + 75.74880854000601, + 96.6068806977233, + 99.10042039275365, + 23.243775283337477, + 86.1185682132947, + 42.90679144336773, + 34.08055187293266, + 87.37654561544477, + 92.34209530787089, + 60.32208994273669 + ], + "type": "float32", + "constant": true + } + }, + "options": { + "c": { + "shape": [3, 5], + "data": [ + 82.77202028708963, + 91.38520749770859, + 12.651897708721549, + 20.12200327935334, + 68.51224585053419, + 35.2024171023056, + 13.33466578964102, + 50.785469741049205, + 88.61195160882922, + 30.577471042677097, + 69.47062151883239, + 7.166217909076766, + 28.337108113083744, + 90.69412588106762, + 71.23025762837965 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [3, 5], + "data": [ + 8243.9189453125, + 14117.208984375, + 14620.15234375, + 14068.654296875, + 18825.609375, + 11927.712890625, + 14673.310546875, + 19176.533203125, + 15122.8896484375, + 18303.658203125, + 5586.16064453125, + 9266.43359375, + 9195.7294921875, + 6438.0244140625, + 10939.8330078125 + ], + "type": "float32" + } + }, + { "name": "gemm two float32 2D tensors options.c", "inputs": { "a": { diff --git a/tests/wpt/tests/webnn/resources/test_data/greater.json b/tests/wpt/tests/webnn/resources/test_data/greater.json index 12e32d90728..d7dc34d18bb 100644 --- a/tests/wpt/tests/webnn/resources/test_data/greater.json +++ b/tests/wpt/tests/webnn/resources/test_data/greater.json @@ -28,6 +28,104 @@ } }, { + "name": "greater float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -5.394711458674926, + -7.189248660357093, + -3.108176577372168, + 4.977657240654292, + 5.111654167277017, + -1.538657969029952, + 1.4143663572463936, + -0.9362112515011844, + -6.029961511382025, + -3.0134198095493225, + 0.17085531331013115, + 7.395327146335315, + 7.178691694492247, + -4.826237489933036, + -2.0204401018636275, + -3.267887959306748, + 8.944384478538513, + -5.9321008596864555, + 0.7069857360876597, + 2.7764204012258844, + 0.9788337909419198, + -6.254901877789392, + 4.40903450389083, + -6.775286805113776 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + -6.155234276085855, + -4.023341341511664, + 5.9525983178014386, + 2.3066237309537883, + -2.7692292888690817, + -0.9711201246625745, + 1.2222066588909755, + 4.590261643319389, + 9.101232896619365, + -4.997007709812857, + -4.807293508200368, + 8.919360491720344, + 0.900502762346548, + -2.8414556193065543, + -2.8280412040974845, + 8.479845345966147, + -7.840679465875833, + 9.213960197279938, + 4.982364937519449, + -2.5073192467116145, + -4.518013838492472, + 8.351094603114355, + -6.161073167579363, + 0.7364829132932815 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0 + ], + "type": "uint8" + } + }, + { "name": "greater float32 1D tensors", "inputs": { "a": { diff --git a/tests/wpt/tests/webnn/resources/test_data/greater_or_equal.json b/tests/wpt/tests/webnn/resources/test_data/greater_or_equal.json index 93ae0b3a4bc..e47ac4350ab 100644 --- a/tests/wpt/tests/webnn/resources/test_data/greater_or_equal.json +++ b/tests/wpt/tests/webnn/resources/test_data/greater_or_equal.json @@ -27,6 +27,103 @@ } }, { + "name": "greaterOrEqual float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -8.049108184315305, + -5.522611295148119, + -2.097508268712267, + -7.455326346855671, + -5.4503762765457475, + 9.802918209039795, + -3.6045179646016123, + 4.088084930154503, + -5.068354954162224, + 1.5821936652025705, + 5.675583814922739, + -4.34159498166756, + 1.6946222397391875, + 2.926734617639429, + -7.000074175864097, + -2.5270822950013105, + 1.4437268276959525, + 7.862768559473771, + 5.782288879751384, + 1.8712013338616238, + -0.5233999645803635, + 0.43433289218891247, + 8.938365119196128, + 1.65683957584843 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + -7.028095113692983, + 1.9109992244501228, + 3.576529209692282, + 1.7167964605289043, + 2.846137548919838, + -2.311762981138341, + -6.086130252861408, + -3.437926736129744, + -3.4764428213302656, + -2.194656398262036, + 2.9962267558939892, + -5.540947945499273, + 5.098470133217425, + 6.775498827056623, + 2.4505413384295913, + 5.210598812779001, + -9.710094050019439, + -2.413028179599279, + 8.678308853275162, + -9.449530756013411, + 0.7702168987269076, + -1.518607415508292, + -9.15394321549195, + -4.9917360557925194 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "shape": [24], + "data": [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1 + ], + "type": "uint8" + } + }, + { "name": "greaterOrEqual float32 1D tensors", "inputs": { "a": { diff --git a/tests/wpt/tests/webnn/resources/test_data/hard_sigmoid.json b/tests/wpt/tests/webnn/resources/test_data/hard_sigmoid.json index 22fe7c6da0c..5d8c0c5daf1 100644 --- a/tests/wpt/tests/webnn/resources/test_data/hard_sigmoid.json +++ b/tests/wpt/tests/webnn/resources/test_data/hard_sigmoid.json @@ -1,6 +1,73 @@ { // hardSigmoid: Calculate the non-smooth function used in place of a sigmoid function on the input tensor. "tests": [ { + "name": "hardSigmoid float32 positive 1D constant tensor default options", // default options: {alpha: 0.2, beta: 0.5} + "inputs": { + "x": { + "shape": [24], + "data": [ + 0.05907066981577147, + 0.7076089198897, + 0.5228405296259637, + 0.42310158753617455, + 0.6643692569867639, + 0.9502940424761401, + 0.10918906453593258, + 0.012977113903015258, + 0.4755297159390164, + 0.5322551665299613, + 0.684307857800798, + 0.4662107602754757, + 0.3048996433987061, + 0.8025872652109942, + 0.2485963985673023, + 0.6636898942337357, + 0.554761182646025, + 0.5542584257213008, + 0.7311381962152534, + 0.48809603333206986, + 0.7766845231174959, + 0.8455570201933926, + 0.5553020911955322, + 0.5603444395469193 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.5118141174316406, + 0.6415218114852905, + 0.6045681238174438, + 0.5846202969551086, + 0.6328738331794739, + 0.6900588274002075, + 0.5218378305435181, + 0.5025954246520996, + 0.5951059460639954, + 0.6064510345458984, + 0.6368615627288818, + 0.5932421684265137, + 0.5609799027442932, + 0.6605174541473389, + 0.5497192740440369, + 0.6327379941940308, + 0.6109522581100464, + 0.6108517050743103, + 0.6462276577949524, + 0.5976191759109497, + 0.6553369164466858, + 0.669111430644989, + 0.6110604405403137, + 0.6120688915252686 + ], + "type": "float32" + } + }, + { "name": "hardSigmoid float32 positive 1D tensor default options", // default options: {alpha: 0.2, beta: 0.5} "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/hard_swish.json b/tests/wpt/tests/webnn/resources/test_data/hard_swish.json index 8d7812d21e2..e43f62ede0e 100644 --- a/tests/wpt/tests/webnn/resources/test_data/hard_swish.json +++ b/tests/wpt/tests/webnn/resources/test_data/hard_swish.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "hardSwish float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 0.7341583533045579, + 9.118859151005996, + 3.545238531520827, + 2.621943879280181, + -6.445507690595167, + -1.6835596550754381, + 5.523179785756591, + -5.958856051028132, + -9.169189933081544, + 6.420943542920213, + -3.293031330275471, + 1.0410166785810624, + -7.246322671816956, + -0.9472730969847909, + -5.778352255817807, + 3.185229125228698, + -7.261818072290236, + 4.174602615173795, + 3.7802628241590686, + -6.07124038718255, + -9.909919471919547, + -7.744259390113584, + -8.286120816748381, + 8.083491160956697 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.4569105803966522, + 9.11885929107666, + 3.545238494873047, + 2.4567370414733887, + 0, + -0.3693843185901642, + 5.52318000793457, + 0, + 0, + 6.420943737030029, + 0, + 0.7011276483535767, + 0, + -0.3240821659564972, + 0, + 3.1852290630340576, + 0, + 4.174602508544922, + 3.7802627086639404, + 0, + 0, + 0, + 0, + 8.083491325378418 + ], + "type": "float32" + } + }, + { "name": "hardSwish float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/identity.json b/tests/wpt/tests/webnn/resources/test_data/identity.json index 444b39dc06c..6024e8786fb 100644 --- a/tests/wpt/tests/webnn/resources/test_data/identity.json +++ b/tests/wpt/tests/webnn/resources/test_data/identity.json @@ -21,6 +21,74 @@ } }, { + "name": "identity float32 1D constant tensor", + "inputs": { + "input": { + "shape":[24], + "data": [ + 0.3775514170243319, + -0.8890897684684553, + 9.965806154214683, + 7.964576323402355, + -4.207889285235442, + -3.748703004469509, + -2.5114005246358584, + 5.777673182705456, + -4.472823584733945, + -8.405767426137253, + -3.857972358579822, + 6.0361876313443865, + 9.076417609486516, + 7.101912233390028, + 1.4166420410053604, + -5.644308337756456, + -2.598648114422626, + -7.264847061642685, + -9.782458548766716, + 5.4966995825042275, + -9.967339588615012, + -6.901016518448189, + -2.850190435789366, + 3.279616439989832 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.377551406621933, + -0.8890897631645203, + 9.965806007385254, + 7.964576244354248, + -4.207889080047607, + -3.7487030029296875, + -2.5114004611968994, + 5.777673244476318, + -4.472823619842529, + -8.405767440795898, + -3.8579723834991455, + 6.036187648773193, + 9.076417922973633, + 7.101912021636963, + 1.4166420698165894, + -5.644308567047119, + -2.5986480712890625, + -7.264847278594971, + -9.782458305358887, + 5.496699810028076, + -9.967339515686035, + -6.901016712188721, + -2.8501904010772705, + 3.279616355895996 + ], + "type": "float32", + "constant": true + } + }, + { "name": "identity float32 1D tensor", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/layer_normalization.json b/tests/wpt/tests/webnn/resources/test_data/layer_normalization.json new file mode 100644 index 00000000000..6005776de5e --- /dev/null +++ b/tests/wpt/tests/webnn/resources/test_data/layer_normalization.json @@ -0,0 +1,842 @@ +{ + "tests": [ + { + "name": "layerNormalization float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -1.5257738828659058, + 0.997844934463501, + 0.017018765211105347, + -0.9768186211585999, + 1.2984753847122192, + 0.18925349414348602, + 1.0812907218933105, + -0.915019690990448, + 0.4270379841327667, + -1.6873507499694824, + 0.9745554327964783, + 0.11948632448911667, + -1.5086692571640015, + 0.6123882532119751, + 0.5316619873046875, + 1.2018805742263794, + -1.215880036354065, + 0.378618448972702, + -1.795186161994934, + -0.6376377940177917, + 1.1961140632629395, + 0.034106940031051636, + 0.9297415614128113, + 0.2728613615036011 + ], + "type": "float32" + } + }, + { + "name": "layerNormalization float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + -1.4057259559631348, + 0.5396455526351929, + -0.21643976867198944, + -0.9825550317764282, + 0.7713912725448608, + -0.08366990834474564, + 1.46259605884552, + -0.8138729333877563, + 0.7165266871452332, + -1.6945916414260864, + 1.3408818244934082, + 0.3658137917518616, + -1.5234858989715576, + 0.5162702202796936, + 0.43863821029663086, + 1.0831668376922607, + -1.2419193983078003, + 0.29146093130111694, + -1.7796510457992554, + -0.5852779150009155, + 1.3068104982376099, + 0.10783683508634567, + 1.0319640636444092, + 0.35418668389320374 + ], + "type": "float32" + } + }, + { + "name": "layerNormalization float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 3], + "data": [ + -1.4057259559631348, + 0.5396455526351929, + -0.21643976867198944, + -0.9825550317764282, + 0.7713912725448608, + -0.08366990834474564, + 1.46259605884552, + -0.8138729333877563, + 0.7165266871452332, + -1.6945916414260864, + 1.3408818244934082, + 0.3658137917518616, + -1.5234858989715576, + 0.5162702202796936, + 0.43863821029663086, + 1.0831668376922607, + -1.2419193983078003, + 0.29146093130111694, + -1.7796510457992554, + -0.5852779150009155, + 1.3068104982376099, + 0.10783683508634567, + 1.0319640636444092, + 0.35418668389320374 + ], + "type": "float32" + } + }, + { + "name": "layerNormalization float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 2, 2, 3], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 2, 2, 3], + "data": [ + -1.4057259559631348, + 0.5396455526351929, + -0.21643976867198944, + -0.9825550317764282, + 0.7713912725448608, + -0.08366990834474564, + 1.46259605884552, + -0.8138729333877563, + 0.7165266871452332, + -1.6945916414260864, + 1.3408818244934082, + 0.3658137917518616, + -1.5234858989715576, + 0.5162702202796936, + 0.43863821029663086, + 1.0831668376922607, + -1.2419193983078003, + 0.29146093130111694, + -1.7796510457992554, + -0.5852779150009155, + 1.3068104982376099, + 0.10783683508634567, + 1.0319640636444092, + 0.35418668389320374 + ], + "type": "float32" + } + }, + { + "name": "layerNormalization float32 4D tensor options.scale", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "options": { + "scale": { + "shape": [1, 4, 3], + "data": [ + -3.822842326186211, + -5.4524582226774365, + 0.6776165732478745, + -4.027037630534966, + -3.7771617295664717, + -9.327335252346955, + 7.181691199879712, + 1.5054303426700422, + 3.1208942770408132, + 0.5214731591212676, + 2.6719749293214345, + -3.5713709254192016 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 3], + "data": [ + 5.373868465423584, + -2.942394971847534, + -0.14666318893432617, + 3.9567861557006836, + -2.9136698246002197, + 0.780417263507843, + 10.503913879394531, + -1.225229024887085, + 2.236203908920288, + -0.8836840987205505, + 3.5828025341033936, + -1.3064566850662231, + 5.824046611785889, + -2.814941883087158, + 0.29722854495048523, + -4.3619537353515625, + 4.6909308433532715, + -2.7185537815093994, + -12.780903816223145, + -0.8810951709747314, + 4.0784173011779785, + 0.05623401328921318, + 2.7573819160461426, + -1.2649319171905518 + ], + "type": "float32" + } + }, + { + "name": "layerNormalization float32 4D tensor options.bias", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "options": { + "bias": { + "shape": [1, 4, 3], + "data": [ + 7.86298294434458, + -3.660304771854861, + -6.955524501645973, + -6.397322772511171, + 3.2689586393414984, + -2.7498081789293094, + -4.080942283863029, + -7.137991900788561, + 8.465653688103547, + 2.762545157541174, + 0.8230442324150911, + -3.8275613744392922 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 3], + "data": [ + 6.45725679397583, + -3.120659112930298, + -7.171964168548584, + -7.37987756729126, + 4.040349960327148, + -2.8334779739379883, + -2.6183459758758545, + -7.951864719390869, + 9.182180404663086, + 1.0679534673690796, + 2.163926124572754, + -3.461747646331787, + 6.339496612548828, + -3.1440346240997314, + -6.516886234283447, + -5.314155578613281, + 2.027039051055908, + -2.4583470821380615, + -5.860593318939209, + -7.723269939422607, + 9.77246379852295, + 2.8703818321228027, + 1.8550082445144653, + -3.473374605178833 + ], + "type": "float32" + } + }, + { + "name": "layerNormalization float32 4D tensor options.axes=[2]", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 3], + "data": [ + -0.6012066006660461, + 0.10132180899381638, + -1.112992763519287, + -0.26228588819503784, + 0.3943416476249695, + -0.7543209195137024, + 1.6960537433624268, + -1.6100702285766602, + 1.4073745012283325, + -0.8325613141059875, + 1.114406704902649, + 0.45993921160697937, + -0.8445013165473938, + 0.6554933190345764, + -0.3856155574321747, + 1.3668763637542725, + -1.3111618757247925, + -0.7422532439231873, + -1.0618212223052979, + -0.5766634941101074, + 1.7181260585784912, + 0.539446234703064, + 1.2323321104049683, + -0.5902572274208069 + ], + "type": "float32" + } + }, + { + "name": "layerNormalization float32 4D tensor options.epsilon", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "options": { + "epsilon": 1e-4 + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 3], + "data": [ + -1.4057258367538452, + 0.5396455526351929, + -0.21643976867198944, + -0.9825550317764282, + 0.7713912725448608, + -0.08366990089416504, + 1.46259605884552, + -0.8138729333877563, + 0.7165266871452332, + -1.6945916414260864, + 1.3408817052841187, + 0.3658137619495392, + -1.5234858989715576, + 0.5162702202796936, + 0.43863821029663086, + 1.0831668376922607, + -1.2419193983078003, + 0.29146093130111694, + -1.7796509265899658, + -0.5852779150009155, + 1.3068104982376099, + 0.10783682763576508, + 1.0319639444351196, + 0.35418668389320374 + ], + "type": "float32" + } + }, + { + "name": "layerNormalization float32 4D tensor options.scale and options.axes=[0, 2]", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "options": { + "scale": { + "shape": [2, 4], + "data": [ + 8.726573383699723, + -5.388210753831433, + -6.811323199504957, + 4.707905497256553, + -4.705779931167426, + -5.143046959493542, + -1.1115549861715444, + 5.250569701742819 + ], + "type": "float32" + }, + "axes": [0, 2] + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 3], + "data": [ + -3.3744184970855713, + 5.22746467590332, + -7.580371856689453, + 0.3324689269065857, + -4.414334774017334, + 2.973374605178833, + -12.369945526123047, + 4.680946350097656, + -9.247408866882324, + -2.8648624420166016, + 6.40486478805542, + 2.4516794681549072, + 4.884079456329346, + -0.44672244787216187, + 2.521172285079956, + -6.083702564239502, + 9.044846534729004, + 4.759283065795898, + 1.3962621688842773, + 1.185346245765686, + -1.959165334701538, + 1.8479242324829102, + 3.3530402183532715, + -3.986907958984375 + ], + "type": "float32" + } + }, + { + "name": "layerNormalization float32 4D tensor options.bias and options.axes=[3, 1, 2]", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "options": { + "bias": { + "shape": [3, 1, 4], + "data": [ + -0.1396923067429423, + -6.156772261512771, + 4.3632959655495505, + 8.859804790093527, + 9.772650559072677, + -3.4626546514711087, + 9.74495010474131, + -0.39589682596727016, + -8.497353592778571, + 6.1725369732984525, + -2.893046077750334, + 1.7220044503066347 + ], + "type": "float32" + }, + "axes": [3, 1, 2] + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 3], + "data": [ + -1.5454182624816895, + 10.312295913696289, + -8.713793754577637, + -7.139327049255371, + -2.691263198852539, + 6.088866710662842, + 5.825891971588135, + 8.931077003479004, + -2.1765193939208984, + 7.165213584899902, + 0.9449849724769592, + 2.087818145751953, + -1.6631782054901123, + 10.288921356201172, + -8.058714866638184, + -5.073605060577393, + -4.704574108123779, + 6.463997840881348, + 2.5836451053619385, + 9.159672737121582, + -1.5862356424331665, + 8.967641830444336, + 0.6360672116279602, + 2.0761911869049072 + ], + "type": "float32" + } + }, + { + "name": "layerNormalization float32 4D tensor all options", + "inputs": { + "input": { + "shape": [2, 1, 4, 3], + "data": [ + -35.51446620394829, + 54.735407789317094, + 19.65901979009459, + -15.882677905820188, + 65.48657727565143, + 25.818493353057278, + 97.5530279802174, + -8.057161374785466, + 62.941297318740425, + -48.91555566709158, + 91.90643767958213, + 46.67098666459884, + -74.85331462850246, + 30.12636276060539, + 26.130894553011203, + 59.302706651602165, + -60.36199702412532, + 18.556152152037427, + -88.0373081005649, + -26.566773146168643, + 70.81292942844541, + 9.1056120562301, + 56.66746139054709, + 21.78444497295007 + ], + "type": "float32" + } + }, + "options": { + "scale": { + "shape": [2, 3, 1], + "data": [ + 7.715926600551629, + 1.737107960115587, + 9.139651060226974, + 5.7588235611312335, + -2.8198351834129154, + -0.6866958235000595 + ], + "type": "float32" + }, + "bias": { + "shape": [2, 3, 1], + "data": [ + -8.71067229356711, + -7.642980873415213, + 4.937538370466076, + -2.1876746145760695, + -4.0676126709354765, + -6.83625459268332 + ], + "type": "float32" + }, + "axes": [0, 3, 1], + "epsilon": 1e-4 + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 3], + "data": [ + -15.487034797668457, + -5.628695964813232, + 8.29687786102295, + -14.294686317443848, + -5.639192581176758, + 7.11608362197876, + 0.7769554257392883, + -8.346451759338379, + 11.279659271240234, + -22.506288528442383, + -5.173816204071045, + 8.506545066833496, + -12.360523223876953, + -5.77052116394043, + -7.18900203704834, + 3.6336634159088135, + 0.8666883707046509, + -6.884884357452393, + -11.648612976074219, + -2.117840528488159, + -7.396423816680908, + -4.869131088256836, + -5.8111701011657715, + -6.714934349060059 + ], + "type": "float32" + } + } + ] +}
\ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/leaky_relu.json b/tests/wpt/tests/webnn/resources/test_data/leaky_relu.json index a95a9a0cfce..be810a90cea 100644 --- a/tests/wpt/tests/webnn/resources/test_data/leaky_relu.json +++ b/tests/wpt/tests/webnn/resources/test_data/leaky_relu.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "leakyRelu float32 1D constant tensor default options", // default options.alpha=0.01 + "inputs": { + "x": { + "shape": [24], + "data": [ + -19.053641157857015, + 50.77590443347373, + -69.54966768567536, + -80.57432185346957, + -90.40109641580112, + 76.02884674163622, + 66.33873525494391, + -84.10186452043264, + -17.19101282693427, + -87.47624329964907, + -3.4164664941905585, + -22.7723589638245, + -2.509489125727569, + 18.933284857582677, + 98.61402761165104, + 55.33923216295767, + -33.178605382176, + -46.03901297809681, + -61.47925538549912, + 64.26514742116822, + 21.46934200700099, + -31.51468946013378, + -41.27694294131783, + -65.59528852425132 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.19053640961647034, + 50.77590560913086, + -0.695496678352356, + -0.8057432770729065, + -0.9040110111236572, + 76.02884674072266, + 66.33873748779297, + -0.8410186767578125, + -0.1719101369380951, + -0.8747624158859253, + -0.0341646634042263, + -0.2277235984802246, + -0.02509489096701145, + 18.933284759521484, + 98.61402893066406, + 55.3392333984375, + -0.33178603649139404, + -0.4603901207447052, + -0.6147925853729248, + 64.26514434814453, + 21.469341278076172, + -0.31514689326286316, + -0.4127694368362427, + -0.6559529304504395 + ], + "type": "float32" + } + }, + { "name": "leakyRelu float32 1D tensor default options", // default options.alpha=0.01 "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/lesser.json b/tests/wpt/tests/webnn/resources/test_data/lesser.json index 64774d1621c..7527ea5c53a 100644 --- a/tests/wpt/tests/webnn/resources/test_data/lesser.json +++ b/tests/wpt/tests/webnn/resources/test_data/lesser.json @@ -27,6 +27,103 @@ } }, { + "name": "lesser float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -1.1472189199107738, + -8.409373914977403, + -2.2753309465448535, + -0.5770801181952088, + 8.171789524073006, + -0.907120961653046, + 5.290845327676683, + -3.9134646002455975, + 9.825094822582592, + -8.931730412646708, + -3.4574016573266553, + -7.331231867596579, + 1.2320041500405665, + 4.312076818806343, + 1.2715546106634825, + 4.184540686856884, + -6.710920186561022, + 3.0768423616317655, + 1.0030865825397903, + -9.076244529342748, + 8.907161848861044, + 4.232614785327211, + 2.1005889661509425, + -6.201345656840638 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + 2.9453755897484726, + 3.7304716829497266, + 4.025375190729793, + -4.718355239722074, + 6.773274305103257, + -2.042813441289626, + -6.526761957285996, + 6.826299715878466, + -9.267172939567224, + 6.118424090729771, + -2.0017322775193014, + 1.779831042224643, + 9.660093887317394, + -2.7473158972960476, + -3.4345008109025033, + -4.7510974486127955, + -6.092621934151237, + -0.43348063367342426, + -1.4069053013420518, + -0.23742098855005445, + -9.105970612932852, + 6.811780042167808, + -6.768326860738436, + -8.952353121501568 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "shape": [24], + "data": [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { "name": "lesser float32 1D tensors", "inputs": { "a": { diff --git a/tests/wpt/tests/webnn/resources/test_data/lesser_or_equal.json b/tests/wpt/tests/webnn/resources/test_data/lesser_or_equal.json index 8daea5e1368..f47bd3b9d9c 100644 --- a/tests/wpt/tests/webnn/resources/test_data/lesser_or_equal.json +++ b/tests/wpt/tests/webnn/resources/test_data/lesser_or_equal.json @@ -27,6 +27,103 @@ } }, { + "name": "lesserOrEqual float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -8.28400872674051, + -3.2192645259702735, + -6.543179908675301, + -0.5402850743134735, + -5.413843546081334, + 5.5837429023307585, + 1.5017805895450707, + 6.592243911021967, + -9.925486373960158, + -7.134800104191736, + -4.915772925181514, + -9.137166899591985, + 9.403683415346574, + -9.831502572671727, + -2.01231810920369, + -6.5976898409038665, + -8.269321065543842, + 8.281030248217476, + 1.645282309888799, + -1.486272662516086, + -4.998753723234106, + -0.9209934547883556, + -9.434256078100471, + 9.81323851825412 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + 5.498841374763742, + 1.7662660534986596, + -2.815573112568557, + -6.048312187382399, + 9.49753657859197, + -2.1015747067374635, + -4.079037092104509, + 5.314039986892048, + 0.0387145550620982, + -0.30728287605858995, + 4.975426828050438, + 3.4626017503711424, + 8.605685214066689, + 1.5140481393702743, + 2.009095893644295, + -0.3105867764637402, + -4.244836158037981, + -3.5506834915660024, + -2.5953286338985615, + -4.999806170449843, + 3.1189506609780526, + 9.70514084988082, + 9.546739178733759, + -6.189505543544822 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "shape": [24], + "data": [ + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ], + "type": "uint8" + } + }, + { "name": "lesserOrEqual float32 1D tensors", "inputs": { "a": { diff --git a/tests/wpt/tests/webnn/resources/test_data/linear.json b/tests/wpt/tests/webnn/resources/test_data/linear.json index ded1d2d7e35..6cbb84e9cb0 100644 --- a/tests/wpt/tests/webnn/resources/test_data/linear.json +++ b/tests/wpt/tests/webnn/resources/test_data/linear.json @@ -1,6 +1,73 @@ { // linear: Calculate a linear function y = alpha * x + beta on the input tensor. "tests": [ { + "name": "linear float32 1D constant tensor default options", // default options: {alpha: 1, beta: 0} + "inputs": { + "x": { + "shape": [24], + "data": [ + -1.1225161816883542, + -6.605223195131225, + -1.9555539248683687, + -4.598548331438281, + 4.234208072658522, + 3.097542121236385, + 3.7465923873418348, + -4.487029772637743, + 6.407402114982858, + -4.354544013606705, + -5.8190925441357955, + 3.7214346452179328, + -6.330114110872294, + 8.580595073862398, + -6.764922344398516, + 6.433565829855674, + -9.708685944356201, + 2.6431380232113746, + 5.214088864824586, + 9.658617012096975, + -8.72174939837989, + -0.4533396492565025, + 9.992619953447026, + -6.469674921617137 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -1.12251615524292, + -6.605223178863525, + -1.9555538892745972, + -4.598548412322998, + 4.234208106994629, + 3.0975420475006104, + 3.7465922832489014, + -4.487029552459717, + 6.407402038574219, + -4.354544162750244, + -5.819092750549316, + 3.7214345932006836, + -6.330113887786865, + 8.580595016479492, + -6.764922142028809, + 6.433565616607666, + -9.708685874938965, + 2.6431379318237305, + 5.2140889167785645, + 9.65861701965332, + -8.721749305725098, + -0.4533396363258362, + 9.992619514465332, + -6.469675064086914 + ], + "type": "float32" + } + }, + { "name": "linear float32 1D tensor default options", // default options: {alpha: 1, beta: 0} "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/log.json b/tests/wpt/tests/webnn/resources/test_data/log.json index c48406e7075..0481061272d 100644 --- a/tests/wpt/tests/webnn/resources/test_data/log.json +++ b/tests/wpt/tests/webnn/resources/test_data/log.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "log float32 positive 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data":[ + 63.82541897073002, + 25.31772341801677, + 96.44790987312221, + 40.9185632583299, + 36.57906966041302, + 57.81629837118902, + 10.057244454482062, + 17.836828533595984, + 50.79246415149721, + 83.86059370830392, + 12.065509440949572, + 22.702478725761654, + 47.55981402665108, + 17.543881349985526, + 32.65243800095941, + 20.35301082726726, + 52.54472350026202, + 45.60880392588138, + 30.38581309524917, + 13.70955827062823, + 10.39676015729949, + 50.840946828645464, + 5.682034333775321, + 94.02275663421658 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 4.15615177154541, + 3.2315046787261963, + 4.569003105163574, + 3.7115838527679443, + 3.5994763374328613, + 4.057270526885986, + 2.308293104171753, + 2.88126540184021, + 3.927747964859009, + 4.4291558265686035, + 2.4903509616851807, + 3.122474193572998, + 3.861988067626953, + 2.8647050857543945, + 3.48591947555542, + 3.0132288932800293, + 3.9616646766662598, + 3.820100784301758, + 3.413975715637207, + 2.618093252182007, + 2.34149432182312, + 3.9287021160125732, + 1.7373093366622925, + 4.54353666305542 + ], + "type": "float32" + } + }, + { "name": "log float32 positive 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/logical_not.json b/tests/wpt/tests/webnn/resources/test_data/logical_not.json index 5cb3208c786..3a37652a134 100644 --- a/tests/wpt/tests/webnn/resources/test_data/logical_not.json +++ b/tests/wpt/tests/webnn/resources/test_data/logical_not.json @@ -21,6 +21,73 @@ } }, { + "name": "logicalNot uint8 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 204, + 130, + 90, + 0, + 147, + 42, + 10, + 18, + 13, + 235, + 0, + 233, + 53, + 83, + 9, + 254, + 69, + 56, + 219, + 109, + 171, + 0, + 228, + 135 + ], + "type": "uint8", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0 + ], + "type": "uint8" + } + }, + { "name": "logicalNot uint8 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/matmul.json b/tests/wpt/tests/webnn/resources/test_data/matmul.json index 6e0423a68d3..2477b78add4 100644 --- a/tests/wpt/tests/webnn/resources/test_data/matmul.json +++ b/tests/wpt/tests/webnn/resources/test_data/matmul.json @@ -1,6 +1,38 @@ { "tests": [ { + "name": "matmul float32 constant 1D and 1D tensors all positive produces a scalar", + "inputs": { + "a": { + "shape": [4], + "data": [ + 50.10142534731317, + 22.2193058046253, + 34.65448469299386, + 36.35148095671881 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [4], + "data": [ + 27.829805134194842, + 83.14548502311283, + 34.4128942110155, + 83.20379675185079 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 7458.89013671875, + "type": "float32" + } + }, + { "name": "matmul float32 1D and 1D tensors all positive produces a scalar", "inputs": { "a": { diff --git a/tests/wpt/tests/webnn/resources/test_data/max.json b/tests/wpt/tests/webnn/resources/test_data/max.json index 27a258248fc..26285042d04 100644 --- a/tests/wpt/tests/webnn/resources/test_data/max.json +++ b/tests/wpt/tests/webnn/resources/test_data/max.json @@ -1,6 +1,104 @@ { "tests": [ { + "name": "max float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + 17.729091355190548, + 88.14807331138127, + -12.79482748560001, + 11.817361453415515, + 19.513022179766494, + -62.87843656259127, + 50.77191512294212, + -56.91352259821851, + 50.572543533605796, + -96.00484496901664, + 50.21433885008736, + 20.59501102482639, + -60.69954854047626, + -96.84203452345174, + 57.258868129331574, + -56.29146148481858, + 73.7165958518618, + 21.347652653042374, + 79.85667318536576, + -22.91845979108436, + 1.2300019204149066, + 65.67965067534072, + 99.89971317042682, + -62.321684141101045 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + -34.504351374665106, + 85.7347144113418, + 25.81801706847253, + -91.37040900746763, + 87.01370408789617, + 0.17744044937266779, + 74.88266681438157, + -4.169913633773888, + -73.76497938350255, + 55.38879910920386, + -58.69169647961585, + -67.62333258102981, + -89.83530842960631, + -8.275739745367574, + 97.5957755490123, + -48.96886862489005, + 95.34497928951401, + -97.36359789785926, + -59.90717913787087, + 97.15334887926792, + -40.226924090258805, + -61.51427015643396, + 33.36324314194775, + 12.693191672027254 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 17.72909164428711, + 88.1480712890625, + 25.818017959594727, + 11.817361831665039, + 87.01370239257812, + 0.17744044959545135, + 74.8826675415039, + -4.1699137687683105, + 50.57254409790039, + 55.388797760009766, + 50.21434020996094, + 20.59501075744629, + -60.699546813964844, + -8.275739669799805, + 97.59577178955078, + -48.968868255615234, + 95.34497833251953, + 21.347652435302734, + 79.85667419433594, + 97.15335083007812, + 1.2300019264221191, + 65.67964935302734, + 99.89971160888672, + 12.693191528320312 + ], + "type": "float32" + } + }, + { "name": "max float32 1D tensors", "inputs": { "a": { @@ -65,7 +163,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [24], "data": [ 17.72909164428711, @@ -161,7 +259,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [4, 6], "data": [ 17.72909164428711, @@ -257,7 +355,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 3, 4], "data": [ 17.72909164428711, @@ -353,7 +451,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 17.72909164428711, @@ -449,7 +547,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 1, 2, 3], "data": [ 17.72909164428711, @@ -522,7 +620,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 48.26115417480469, @@ -600,7 +698,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 49.523128509521484, @@ -676,7 +774,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 39.32178497314453, @@ -749,7 +847,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 48.26115417480469, diff --git a/tests/wpt/tests/webnn/resources/test_data/max_pool2d.json b/tests/wpt/tests/webnn/resources/test_data/max_pool2d.json index cf426620e56..4532843d2b5 100644 --- a/tests/wpt/tests/webnn/resources/test_data/max_pool2d.json +++ b/tests/wpt/tests/webnn/resources/test_data/max_pool2d.json @@ -1,6 +1,77 @@ { "tests": [ { + "name": "maxPool2d float32 4D constant tensor default options", + "inputs": { + "input": { + "shape": [1, 2, 5, 5], + "data": [ + 89.00830216793153, + -45.720390400208274, + -61.3061304134967, + -4.014514560596496, + -94.54893342858352, + 46.28090328619564, + 99.28312923953135, + -10.057873368956962, + 9.742474583994337, + -39.03501766575275, + 75.08192382950091, + 12.819415189421207, + -33.01505690327188, + 38.691340789603316, + 66.09259104681504, + 97.903480409299, + -8.737769993284147, + -53.4216238072017, + 72.10852084777076, + -40.42309116918719, + -35.68864442661396, + -87.64779401381033, + 38.87424286093716, + 39.38360329656629, + 7.429088108317444, + -76.72171237621149, + 50.21706410294061, + -52.89547724835329, + -44.64233565670091, + -97.86752535352848, + 81.73119248706783, + 5.428491238061412, + -29.227728678237995, + 72.44899280781078, + -59.34124718116585, + 39.19959912145927, + -65.99438957588619, + -4.204323589500888, + -60.5458643662661, + 55.89052583821697, + 80.30483906634527, + 72.88830243502153, + -46.59610987974246, + 20.503878887964206, + -31.126462826158445, + -57.29456052682171, + -26.62357805164706, + 15.93575469730375, + -78.77953474824318, + 72.33577555559427 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [1, 2, 1, 1], + "data": [ + 99.28312683105469, + 81.73119354248047 + ], + "type": "float32" + } + }, + { "name": "maxPool2d float32 4D tensor default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/min.json b/tests/wpt/tests/webnn/resources/test_data/min.json index f5ea4779f40..a08e6514286 100644 --- a/tests/wpt/tests/webnn/resources/test_data/min.json +++ b/tests/wpt/tests/webnn/resources/test_data/min.json @@ -1,6 +1,104 @@ { "tests": [ { + "name": "min float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + -36.069532266228244, + -38.22545078196744, + 62.07444236586957, + -16.61026674714678, + 65.99324808387394, + -17.772129967582686, + -76.01381209267042, + -69.59134776850009, + 53.60376804727625, + -39.096100673437164, + 96.94400927938446, + -40.391302324618295, + 74.14437371697878, + 0.032831973556398, + 38.79835449778915, + -17.720786393721696, + 17.383201301159886, + -82.30993955305293, + -80.47379030810471, + -31.38984799993598, + -73.27236113112741, + -33.7456195461658, + -21.701524895337613, + 4.945605121041879 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + -40.10139268078632, + 86.25190598846055, + 51.28017397936523, + -57.64906164772099, + -97.56107437073234, + -28.88173031289574, + 80.49570909929332, + 46.665406947365625, + 62.8068578280876, + 49.815340723067976, + -76.5204323768335, + 84.59909684299188, + 50.472812621661944, + -18.017285676776623, + 5.198459215825707, + -47.82608331903404, + 46.4500784043023, + -71.25122869019421, + -69.8506659654443, + 40.676491548922655, + -18.700123336900987, + 20.14988118692149, + 41.950685196569594, + 23.482911517986963 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -40.10139083862305, + -38.2254524230957, + 51.280174255371094, + -57.64906311035156, + -97.56107330322266, + -28.881731033325195, + -76.01380920410156, + -69.59134674072266, + 53.60376739501953, + -39.096099853515625, + -76.52043151855469, + -40.39130401611328, + 50.47281265258789, + -18.01728630065918, + 5.198459148406982, + -47.82608413696289, + 17.383201599121094, + -82.3099365234375, + -80.47379302978516, + -31.389848709106445, + -73.2723617553711, + -33.74562072753906, + -21.70152473449707, + 4.945605278015137 + ], + "type": "float32" + } + }, + { "name": "min float32 1D tensors", "inputs": { "a": { @@ -65,7 +163,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [24], "data": [ -40.10139083862305, @@ -161,7 +259,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [4, 6], "data": [ -40.10139083862305, @@ -257,7 +355,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 3, 4], "data": [ -40.10139083862305, @@ -353,7 +451,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -40.10139083862305, @@ -449,7 +547,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 1, 2, 3], "data": [ -40.10139083862305, @@ -522,7 +620,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -36.06953048706055, @@ -600,7 +698,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -36.06953048706055, @@ -676,7 +774,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -36.06953048706055, @@ -749,7 +847,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -36.06953048706055, diff --git a/tests/wpt/tests/webnn/resources/test_data/mul.json b/tests/wpt/tests/webnn/resources/test_data/mul.json index e6487cfc591..3de90184273 100644 --- a/tests/wpt/tests/webnn/resources/test_data/mul.json +++ b/tests/wpt/tests/webnn/resources/test_data/mul.json @@ -1,6 +1,104 @@ { "tests": [ { + "name": "mul float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + 49.11121736270019, + 11.907459336794048, + -21.11579579294029, + 70.74900132517587, + -94.51628388361728, + -93.78905645837338, + 11.178888261493995, + -32.80592265135466, + 83.31897732883382, + 91.12072661737204, + -0.11235756222869497, + 15.397956296694915, + -13.45921729974026, + -50.62647440827837, + -31.176256208308388, + -6.616114020780813, + 21.727578749239072, + 22.03150842852844, + -84.02170952786258, + -94.06756015115154, + 58.807274013013654, + -63.0597856263404, + 3.3092826784791214, + 9.88400353323415 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + 74.96137241031886, + -34.53953260336324, + -33.316162844150114, + 53.92023954353448, + -83.69075015721262, + 19.78522024290173, + 36.2811360289287, + -34.31147605027482, + 49.10429164239241, + -54.538850393716665, + 70.77384875070422, + -55.18768187759977, + -93.96233815307488, + 60.0829826673602, + -92.73415188611666, + 87.60998747867865, + -8.881865647983787, + 71.79511481665139, + -26.158620254037416, + -18.935444705499236, + 34.64671570053736, + -60.95826678087097, + -11.11965362061676, + 77.50324337143496 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 3681.4443359375, + -411.278076171875, + 703.4972534179688, + 3814.802978515625, + 7910.138671875, + -1855.63720703125, + 405.582763671875, + 1125.6197509765625, + 4091.3193359375, + -4969.61962890625, + -7.951977252960205, + -849.7775268554688, + 1264.6595458984375, + -3041.78955078125, + 2891.103759765625, + -579.6376342773438, + -192.98143005371094, + 1581.7545166015625, + 2197.89208984375, + 1781.2109375, + 2037.47900390625, + 3844.01513671875, + -36.79807662963867, + 766.0423583984375 + ], + "type": "float32" + } + }, + { "name": "mul float32 1D tensors", "inputs": { "a": { @@ -65,7 +163,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [24], "data": [ 3681.4443359375, @@ -161,7 +259,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [4, 6], "data": [ 3681.4443359375, @@ -257,7 +355,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 3, 4], "data": [ 3681.4443359375, @@ -353,7 +451,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 3681.4443359375, @@ -449,7 +547,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 1, 2, 3], "data": [ 3681.4443359375, @@ -522,7 +620,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 3315.18994140625, @@ -600,7 +698,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -4778.197265625, @@ -676,7 +774,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 427.1091003417969, @@ -749,7 +847,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 3315.18994140625, diff --git a/tests/wpt/tests/webnn/resources/test_data/neg.json b/tests/wpt/tests/webnn/resources/test_data/neg.json index 8a1eea34f95..34dee53df16 100644 --- a/tests/wpt/tests/webnn/resources/test_data/neg.json +++ b/tests/wpt/tests/webnn/resources/test_data/neg.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "neg float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + -58.334503020192145, + 94.230451435346, + -67.69306915096101, + -36.06663941646238, + 17.11511438752673, + 59.26063208864457, + -43.77507923449166, + -14.875581781743236, + 22.508566808333796, + 98.67680207393127, + 2.3155421451545237, + -89.86896422605746, + -14.288547289891255, + 16.222452140079383, + -4.68841786135998, + -44.46965063391528, + -52.13925804400618, + 24.165389381806392, + -66.45778331338028, + -11.172323888318175, + -25.024961990153656, + 22.26478329228287, + 35.29130058751991, + -86.18817022134313 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 58.334503173828125, + -94.23045349121094, + 67.69306945800781, + 36.0666389465332, + -17.115114212036133, + -59.2606315612793, + 43.77507781982422, + 14.875581741333008, + -22.50856590270996, + -98.67680358886719, + -2.315542221069336, + 89.86896514892578, + 14.28854751586914, + -16.22245216369629, + 4.688417911529541, + 44.46965026855469, + 52.139259338378906, + -24.165390014648438, + 66.4577865600586, + 11.172324180603027, + 25.024961471557617, + -22.26478385925293, + -35.29130172729492, + 86.18817138671875 + ], + "type": "float32" + } + }, + { "name": "neg float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/pad.json b/tests/wpt/tests/webnn/resources/test_data/pad.json index ac4834d7f09..53e8ed8f597 100644 --- a/tests/wpt/tests/webnn/resources/test_data/pad.json +++ b/tests/wpt/tests/webnn/resources/test_data/pad.json @@ -1,6 +1,46 @@ { "tests": [ { + "name": "pad float32 1D constant tensor default options", + "inputs": { + "input": { + "shape": [9], + "data": [ + 22.763617617214834, + -21.16852940391331, + -91.66169283838785, + 16.863798710594182, + 60.51471999839896, + -70.56754852642953, + -60.64327110324324, + -47.88219132680065, + 68.7255776612235 + ], + "type": "float32", + "constant": true + } + }, + "beginningPadding": [1], + "endingPadding": [1], + "expected": { + "shape": [11], + "data": [ + 0, + 22.76361846923828, + -21.168529510498047, + -91.66168975830078, + 16.863798141479492, + 60.51472091674805, + -70.56755065917969, + -60.643272399902344, + -47.8821907043457, + 68.72557830810547, + 0 + ], + "type": "float32" + } + }, + { "name": "pad float32 1D tensor default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/pow.json b/tests/wpt/tests/webnn/resources/test_data/pow.json index a097c21d9ef..1738722b10b 100644 --- a/tests/wpt/tests/webnn/resources/test_data/pow.json +++ b/tests/wpt/tests/webnn/resources/test_data/pow.json @@ -1,6 +1,104 @@ { "tests": [ { + "name": "pow float32 constant 1D base tensor and 1D integer exponent tensor", + "inputs": { + "a": { + "shape": [24], + "data": [ + 17.84601042972939, + -0.06310698009783522, + -9.868203150557209, + 11.177720889025082, + -17.346274412274497, + 11.862249907078805, + -16.832276297112916, + 2.657481705284937, + -2.783346559701183, + -13.756399883988184, + 13.131383020668672, + -0.4376337155223524, + -15.678688537967744, + 10.283306376871472, + 14.89317426754188, + -4.941208383494091, + -14.231812435141862, + 3.2646027287637835, + 17.229148713687444, + -2.885918185998449, + -1.440015043233842, + -5.757015935913907, + 17.41126899618849, + 17.415215284302022 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + 1, + 6, + -7, + 7, + -2, + 1, + 4, + -10, + -2, + -5, + -2, + -10, + -8, + -7, + -1, + -3, + -9, + 6, + -6, + 7, + -5, + -5, + 7, + -6 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 17.846010208129883, + 6.316321332633379e-8, + -1.0973203501407625e-7, + 21800822, + 0.0033234376460313797, + 11.862250328063965, + 80273.3359375, + 0.00005692423656000756, + 0.12908191978931427, + -0.0000020299064544815337, + 0.005799346603453159, + 3880.540283203125, + 2.7385585465999895e-10, + 8.223764069725803e-8, + 0.06714485585689545, + -0.008288968354463577, + -4.1750155416186985e-11, + 1210.5478515625, + 3.8231124932508465e-8, + -1667.201416015625, + -0.16149713099002838, + -0.00015812950732652098, + 485079424, + 3.584487018315485e-8 + ], + "type": "float32" + } + }, + { "name": "pow float32 1D base tensor and 1D integer exponent tensor", "inputs": { "a": { diff --git a/tests/wpt/tests/webnn/resources/test_data/prelu.json b/tests/wpt/tests/webnn/resources/test_data/prelu.json index e45e12cd4b6..cf79bee7a9d 100644 --- a/tests/wpt/tests/webnn/resources/test_data/prelu.json +++ b/tests/wpt/tests/webnn/resources/test_data/prelu.json @@ -1,6 +1,104 @@ { "tests": [ { + "name": "prelu float32 1D constant tensors", + "inputs": { + "x": { + "shape": [24], + "data": [ + -2.5491681672317235, + -4.794857500523286, + 8.413617520687886, + 6.108623511441287, + -8.492292847462334, + 3.3143364551069876, + 1.1687212422078108, + -0.1417628422981423, + -6.714651930677875, + 5.787421746282195, + -3.7556274239369847, + -4.898286418001732, + 7.329515995865023, + -3.9542297833176665, + 7.067297201348715, + 9.439736453375971, + -2.5581801134299775, + -8.658834185932482, + 8.475073893236225, + 4.551425642121982, + -9.267870491380243, + -0.26217744010265776, + 1.325895534951659, + -7.418311114031475 + ], + "type": "float32", + "constant": true + }, + "slope": { + "shape": [24], + "data": [ + 9.343093097130314, + 0.2800687126385206, + -4.617085001507579, + 1.1202747481570352, + -1.4334710772165593, + -3.157594908065091, + -6.289953987035659, + -5.010787777546328, + -6.899077379471157, + 3.572534824190212, + 6.861966530502535, + -1.9615313732548287, + 4.583203900668886, + 2.664350255679274, + 9.19295531798543, + -9.554700087649, + -5.505102187715796, + -2.3927369956553557, + 3.5821293765315954, + -2.32240037283157, + -1.9816573593209075, + 4.155890213640276, + -1.7995220850663962, + 9.29585020267449 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -23.817113876342773, + -1.342889666557312, + 8.413617134094238, + 6.108623504638672, + 12.173455238342285, + 3.3143365383148193, + 1.1687211990356445, + 0.7103435397148132, + 46.32490539550781, + 5.787421703338623, + -25.7709903717041, + 9.608142852783203, + 7.3295159339904785, + -10.535453796386719, + 7.067296981811523, + 9.439736366271973, + 14.083043098449707, + 20.718313217163086, + 8.47507381439209, + 4.551425457000732, + 18.365745544433594, + -1.0895805358886719, + 1.3258955478668213, + -68.95950317382812 + ], + "type": "float32" + } + }, + { "name": "prelu float32 1D tensors", "inputs": { "x": { @@ -66,7 +164,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [24], "data": [ -23.817113876342773, @@ -163,7 +261,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [4, 6], "data": [ -23.817113876342773, @@ -260,7 +358,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 3, 4], "data": [ -23.817113876342773, @@ -357,7 +455,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -23.817113876342773, @@ -454,7 +552,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 1, 2, 3], "data": [ -23.817113876342773, @@ -530,7 +628,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -12.934283256530762, @@ -604,7 +702,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -12.775040626525879, @@ -683,7 +781,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -12.425349235534668, @@ -759,7 +857,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -12.934283256530762, @@ -833,7 +931,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -12.775040626525879, diff --git a/tests/wpt/tests/webnn/resources/test_data/reciprocal.json b/tests/wpt/tests/webnn/resources/test_data/reciprocal.json index dce56e5f57d..c71ac280050 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reciprocal.json +++ b/tests/wpt/tests/webnn/resources/test_data/reciprocal.json @@ -21,6 +21,73 @@ } }, { + "name": "reciprocal float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + -1.011086269320547, + 4.6215385203163315, + 2.4173768502126727, + -8.934871773645101, + -3.348558485147799, + -8.803302423903414, + 8.82632175955639, + 6.572828698368518, + 6.639494748363678, + 2.6842704650429496, + -4.627160556770815, + -6.873653395070409, + -1.185412145486616, + 0.9572811852263605, + 0.021320551999082227, + 0.35645850544829827, + 4.827780063442164, + 1.312808185701284, + 8.246278209083616, + -0.20391698798075097, + -9.039937028172055, + 9.94280947774324, + -9.540112102987099, + -0.08022661906399975 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.9890353083610535, + 0.21637815237045288, + 0.4136715531349182, + -0.111921027302742, + -0.29863595962524414, + -0.11359372735023499, + 0.1132974773645401, + 0.1521414965391159, + 0.15061387419700623, + 0.3725407123565674, + -0.21611526608467102, + -0.14548304677009583, + -0.8435884118080139, + 1.044625163078308, + 46.90310287475586, + 2.805375576019287, + 0.20713452994823456, + 0.761725902557373, + 0.12126683443784714, + -4.903956413269043, + -0.11062023788690567, + 0.10057520121335983, + -0.10482056438922882, + -12.464690208435059 + ], + "type": "float32" + } + }, + { "name": "reciprocal float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reduce_l1.json b/tests/wpt/tests/webnn/resources/test_data/reduce_l1.json index aa169299c7c..7cbc4425118 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reduce_l1.json +++ b/tests/wpt/tests/webnn/resources/test_data/reduce_l1.json @@ -1,6 +1,47 @@ { "tests": [ { + "name": "reduceL1 float32 1D constant tensor all positive default options", // default options: {axes: null, keepDimensions: false} + "inputs": { + "input": { + "shape": [24], + "data": [ + 5.508826448139126, + 50.61575563515446, + 1.6773050539454992, + 84.21352292914005, + 15.664374631289203, + 52.89714899357876, + 9.12515782683123, + 28.93762412170997, + 12.567061064158146, + 11.399989904078245, + 86.91246376729916, + 64.51329469980782, + 71.28342153263038, + 76.34410635436484, + 41.53409150301335, + 97.56533284219819, + 31.803831597266385, + 6.0897547388209405, + 61.70843555684953, + 69.76119433406723, + 38.91940474525253, + 52.28833355637117, + 22.31783714884341, + 99.0719229634137 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 1092.72021484375, + "type": "float32" + } + }, + { "name": "reduceL1 float32 1D tensor all positive default options", // default options: {axes: null, keepDimensions: false} "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reduce_l2.json b/tests/wpt/tests/webnn/resources/test_data/reduce_l2.json index 73397cbb7a8..7e59a45d5e2 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reduce_l2.json +++ b/tests/wpt/tests/webnn/resources/test_data/reduce_l2.json @@ -1,6 +1,47 @@ { "tests": [ { + "name": "reduceL2 float32 1D constant tensor all positive default options", // default options: {axes: null, keepDimensions: false} + "inputs": { + "input": { + "shape": [24], + "data": [ + 4.860227954324237, + 88.23184532015614, + 54.489688892595865, + 64.75027573238448, + 6.855991445231058, + 91.3987084155092, + 41.888577644260664, + 73.65445188651776, + 35.31573479319383, + 48.345430062443896, + 82.3919051922353, + 77.86200561022456, + 93.31141688733462, + 62.486883544675194, + 60.292898644959706, + 13.23059966965019, + 20.535988317971942, + 53.451616950541414, + 11.32008585820996, + 64.75763553379184, + 43.65894603418228, + 0.8374307376408652, + 0.6848266407317727, + 33.504704671527506 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 272.0996398925781, + "type": "float32" + } + }, + { "name": "reduceL2 float32 1D tensor all positive default options", // default options: {axes: null, keepDimensions: false} "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reduce_log_sum.json b/tests/wpt/tests/webnn/resources/test_data/reduce_log_sum.json index 2e1fee804fd..250398d227e 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reduce_log_sum.json +++ b/tests/wpt/tests/webnn/resources/test_data/reduce_log_sum.json @@ -1,6 +1,47 @@ { "tests": [ { + "name": "reduceLogSum float32 1D constant tensor all non-negative default options", // default options: {axes: null, keepDimensions: false} + "inputs": { + "input": { + "shape": [24], + "data": [ + 64.54826901463852, + 97.87423374006126, + 26.529027351852186, + 79.79046651888517, + 50.394988743199434, + 14.578406888832252, + 20.86681803845336, + 32.43873432263156, + 64.91234005889837, + 71.54029915166349, + 11.13706890220647, + 55.07930697185586, + 43.791352286892106, + 13.831947671728972, + 97.39019470916091, + 35.50775651228035, + 52.275862097336166, + 82.838655037009, + 8.568099335705881, + 0.8337112078307563, + 69.23145833259072, + 3.8541642374881446, + 70.55673656397397, + 71.99264788951747 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 7.039101600646973, + "type": "float32" + } + }, + { "name": "reduceLogSum float32 1D tensor all non-negative default options", // default options: {axes: null, keepDimensions: false} "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reduce_log_sum_exp.json b/tests/wpt/tests/webnn/resources/test_data/reduce_log_sum_exp.json index e5ebb2aba39..b7f39abd522 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reduce_log_sum_exp.json +++ b/tests/wpt/tests/webnn/resources/test_data/reduce_log_sum_exp.json @@ -1,6 +1,47 @@ { "tests": [ { + "name": "reduceLogSumExp float32 1D constant tensor all positive default options", // default options: {axes: null, keepDimensions: false} + "inputs": { + "input": { + "shape": [24], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 10.39477825164795, + "type": "float32" + } + }, + { "name": "reduceLogSumExp float32 1D tensor all positive default options", // default options: {axes: null, keepDimensions: false} "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reduce_max.json b/tests/wpt/tests/webnn/resources/test_data/reduce_max.json index 4dd7098d03f..967aea8bf4d 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reduce_max.json +++ b/tests/wpt/tests/webnn/resources/test_data/reduce_max.json @@ -1,6 +1,47 @@ { "tests": [ { + "name": "reduceMax float32 1D constant tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + 32.166585683408215, + 90.42288038051404, + -26.341795469529572, + -7.147959324354275, + 75.90379209491468, + -48.204211355965356, + -53.094252997077795, + 66.66099234322033, + -96.16854360851454, + -88.30545253131574, + 94.99645116994563, + 37.28493087456198, + -42.209860696518845, + 96.55397216250705, + 0.8807230095547567, + 62.504641219832195, + 36.650633791794576, + 99.77313292829271, + -72.86485546227293, + -46.03200926418318, + 20.253753500247612, + -21.55738542170144, + -51.287275192229046, + -42.588327517032454 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 99.77313232421875, + "type": "float32" + } + }, + { "name": "reduceMax float32 1D tensor default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reduce_mean.json b/tests/wpt/tests/webnn/resources/test_data/reduce_mean.json index db20b17a835..5a48952c060 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reduce_mean.json +++ b/tests/wpt/tests/webnn/resources/test_data/reduce_mean.json @@ -1,6 +1,47 @@ { "tests": [ { + "name": "reduceMean float32 1D constant tensor all positive default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { "name": "reduceMean float32 1D tensor all positive default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reduce_min.json b/tests/wpt/tests/webnn/resources/test_data/reduce_min.json index db6c0e22695..92de75e92ab 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reduce_min.json +++ b/tests/wpt/tests/webnn/resources/test_data/reduce_min.json @@ -1,6 +1,47 @@ { "tests": [ { + "name": "reduceMin float32 1D constant tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -58.76195671214997, + -87.962299829198, + -70.13690195964651, + -53.61766646981643, + -39.50931280469092, + 76.48815138549966, + -18.705087479309455, + 44.78261924634546, + 30.70233967738929, + 61.463613873181146, + 77.84043646028437, + -53.747413472322414, + -31.713543832764827, + -9.735438243016588, + 77.93652481771113, + 99.01705821629525, + 73.39929943432298, + 92.08459468237234, + -59.40851905900759, + -84.40769111096932, + 75.88834177123843, + 96.02651672898816, + -55.976554418350545, + -1.791101785391234 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": -87.9623031616211, + "type": "float32" + } + }, + { "name": "reduceMin float32 1D tensor default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reduce_product.json b/tests/wpt/tests/webnn/resources/test_data/reduce_product.json index 60484300bca..691bf4da9b3 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reduce_product.json +++ b/tests/wpt/tests/webnn/resources/test_data/reduce_product.json @@ -1,6 +1,47 @@ { "tests": [ { + "name": "reduceProduct float32 1D constant tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -68.75911760233478, + 99.4496130391401, + 24.860555622046746, + -44.23515424391753, + -22.69974404385384, + 79.97555172142995, + 14.46502415218545, + 49.231095225588376, + 30.058706923717068, + 69.45106401985521, + -20.15709647137976, + -58.02551401530734, + 51.89660954258355, + -2.020799112914105, + 39.392973241316554, + 26.780734701055266, + -97.97651593223856, + 48.66154478867011, + -85.19523905815305, + -18.169861657911653, + 64.83759066937682, + -14.958838503675935, + -74.50931980014732, + -11.319679210869765 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 1.5855958784642327e+37, + "type": "float32" + } + }, + { "name": "reduceProduct float32 1D tensor default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reduce_sum.json b/tests/wpt/tests/webnn/resources/test_data/reduce_sum.json index 6da78ae804a..df47a1a2b26 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reduce_sum.json +++ b/tests/wpt/tests/webnn/resources/test_data/reduce_sum.json @@ -1,6 +1,47 @@ { "tests": [ { + "name": "reduceSum float32 1D constant tensor all positive default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + 69.6038605453285, + 99.1748548274599, + 32.782341359545676, + 8.881362932730319, + 16.094296257493014, + 11.806894918510213, + 32.64223805640243, + 43.998363476438975, + 77.01777099153088, + 79.79425759062173, + 45.007949804090174, + 24.39779644056914, + 57.50268541631618, + 57.60172895173401, + 80.26985885745457, + 43.65110628848945, + 87.50368667545843, + 94.50203768533922, + 35.54289690580114, + 42.856416416096344, + 88.58631651618441, + 98.85772999308332, + 25.62685451963782, + 60.17613590317996 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 1313.87939453125, + "type": "float32" + } + }, + { "name": "reduceSum float32 1D tensor all positive default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reduce_sum_square.json b/tests/wpt/tests/webnn/resources/test_data/reduce_sum_square.json index cf6bbb65d41..8ac373e4b36 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reduce_sum_square.json +++ b/tests/wpt/tests/webnn/resources/test_data/reduce_sum_square.json @@ -1,6 +1,47 @@ { "tests": [ { + "name": "reduceSumSquare float32 1D constant tensor all positive default options", // default options: {axes: null, keepDimensions: false} + "inputs": { + "input": { + "shape": [24], + "data": [ + 52.5615351837915, + 2.6261063680439234, + 82.04877759500097, + 14.401411284784604, + 33.96051675758925, + 83.93837980977771, + 47.44504659398938, + 19.177289239472593, + 13.493006439137023, + 44.15238362662202, + 86.53118079678906, + 70.20919468463771, + 25.67262870756528, + 79.73770192548034, + 66.42284577584445, + 70.40363336301188, + 13.503327808732468, + 41.22539754662389, + 6.654552839238637, + 85.79743668166222, + 89.91348950671976, + 53.55647451130674, + 39.48537158474081, + 3.9460408540454184 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 73275.859375, + "type": "float32" + } + }, + { "name": "reduceSumSquare float32 1D tensor all positive default options", // default options: {axes: null, keepDimensions: false} "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/relu.json b/tests/wpt/tests/webnn/resources/test_data/relu.json index b4597891472..248902c6658 100644 --- a/tests/wpt/tests/webnn/resources/test_data/relu.json +++ b/tests/wpt/tests/webnn/resources/test_data/relu.json @@ -1,5 +1,72 @@ { "tests": [ // relu input tensor of 1D to 5D with same data values + { + "name": "relu float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 79.04725231657116, + 2.2503608756501166, + 80.73939090529203, + 63.90392076789547, + 77.67340745512104, + -71.09157819044825, + -82.74703468427575, + -26.814426600801028, + -99.16788836397058, + -35.71083406288831, + 18.36165830990626, + -37.36091648205435, + -52.8386119809162, + -10.408374773008958, + 60.60291560236189, + -13.644198913810342, + -76.54250291031946, + -8.132338049258351, + 51.51447452437017, + -51.63370281825297, + -64.567999424324, + -5.093302411117136, + 15.354103550744384, + 90.03858807393516 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 79.04724884033203, + 2.2503609657287598, + 80.73938751220703, + 63.9039192199707, + 77.67340850830078, + 0, + 0, + 0, + 0, + 0, + 18.361658096313477, + 0, + 0, + 0, + 60.6029167175293, + 0, + 0, + 0, + 51.51447296142578, + 0, + 0, + 0, + 15.354103088378906, + 90.03858947753906 + ], + "type": "float32" + } + }, { "name": "relu float32 1D tensor", "inputs": { diff --git a/tests/wpt/tests/webnn/resources/test_data/reshape.json b/tests/wpt/tests/webnn/resources/test_data/reshape.json index fbb93a8e03c..ada3daa4e2d 100644 --- a/tests/wpt/tests/webnn/resources/test_data/reshape.json +++ b/tests/wpt/tests/webnn/resources/test_data/reshape.json @@ -6,30 +6,30 @@ "input": { "shape": [2, 3, 4], "data": [ - -30.056147250771076, - 99.5694232746736, - 88.04620115823073, - -91.87507576772606, - -23.797235323955633, - -91.28665022600151, - -63.15204449663816, - 12.066952464893262, - -96.1172904235943, - -44.77365489782947, - -80.08650883940432, - -64.4375694650447, - 27.641954235862485, - -96.86306613475395, - 83.68347403572196, - 50.599484132010815, - -20.187656772788642, - -1.3904608012750117, - -96.9360325497362, - 65.34144119048645, - 34.835993949837274, - 62.01485845563673, - -2.8698414892852355, - 27.903749097190158 + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 ], "type": "float32" } @@ -73,30 +73,30 @@ "input": { "shape": [4, 1, 1, 1, 6], "data": [ - -30.056147250771076, - 99.5694232746736, - 88.04620115823073, - -91.87507576772606, - -23.797235323955633, - -91.28665022600151, - -63.15204449663816, - 12.066952464893262, - -96.1172904235943, - -44.77365489782947, - -80.08650883940432, - -64.4375694650447, - 27.641954235862485, - -96.86306613475395, - 83.68347403572196, - 50.599484132010815, - -20.187656772788642, - -1.3904608012750117, - -96.9360325497362, - 65.34144119048645, - 34.835993949837274, - 62.01485845563673, - -2.8698414892852355, - 27.903749097190158 + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 ], "type": "float32" } @@ -140,30 +140,30 @@ "input": { "shape": [2, 2, 2, 3], "data": [ - -30.056147250771076, - 99.5694232746736, - 88.04620115823073, - -91.87507576772606, - -23.797235323955633, - -91.28665022600151, - -63.15204449663816, - 12.066952464893262, - -96.1172904235943, - -44.77365489782947, - -80.08650883940432, - -64.4375694650447, - 27.641954235862485, - -96.86306613475395, - 83.68347403572196, - 50.599484132010815, - -20.187656772788642, - -1.3904608012750117, - -96.9360325497362, - 65.34144119048645, - 34.835993949837274, - 62.01485845563673, - -2.8698414892852355, - 27.903749097190158 + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 ], "type": "float32" } @@ -207,30 +207,30 @@ "input": { "shape": [3, 2, 2, 2], "data": [ - -30.056147250771076, - 99.5694232746736, - 88.04620115823073, - -91.87507576772606, - -23.797235323955633, - -91.28665022600151, - -63.15204449663816, - 12.066952464893262, - -96.1172904235943, - -44.77365489782947, - -80.08650883940432, - -64.4375694650447, - 27.641954235862485, - -96.86306613475395, - 83.68347403572196, - 50.599484132010815, - -20.187656772788642, - -1.3904608012750117, - -96.9360325497362, - 65.34144119048645, - 34.835993949837274, - 62.01485845563673, - -2.8698414892852355, - 27.903749097190158 + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 ], "type": "float32" } @@ -274,30 +274,30 @@ "input": { "shape": [3, 2, 2, 2], "data": [ - -30.056147250771076, - 99.5694232746736, - 88.04620115823073, - -91.87507576772606, - -23.797235323955633, - -91.28665022600151, - -63.15204449663816, - 12.066952464893262, - -96.1172904235943, - -44.77365489782947, - -80.08650883940432, - -64.4375694650447, - 27.641954235862485, - -96.86306613475395, - 83.68347403572196, - 50.599484132010815, - -20.187656772788642, - -1.3904608012750117, - -96.9360325497362, - 65.34144119048645, - 34.835993949837274, - 62.01485845563673, - -2.8698414892852355, - 27.903749097190158 + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 ], "type": "float32" } @@ -334,6 +334,1723 @@ ], "type": "float32" } + }, + { + "name": "reshape (squeeze) float32 2D tensor by eliminating one dimension", + "inputs": { + "input": { + "shape": [1, 24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [24], + "expected": { + "name": "output", + "shape": [24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (squeeze) float32 3D tensor by eliminating one dimension", + "inputs": { + "input": { + "shape": [4, 1, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [4, 6], + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (squeeze) float32 3D tensor by eliminating two dimensions", + "inputs": { + "input": { + "shape": [1, 24, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [24], + "expected": { + "name": "output", + "shape": [24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (squeeze) float32 4D tensor by eliminating two dimensions", + "inputs": { + "input": { + "shape": [1, 4, 1, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [4, 6], + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (squeeze) float32 4D tensor by eliminating all dimensions", + "inputs": { + "input": { + "shape": [1, 1, 1, 1], + "data": [ + -33.82555389404297 + ], + "type": "float32" + } + }, + "newShape": [], + "expected": { + "name": "output", + "shape": [], + "data": [ + -33.82555389404297 + ], + "type": "float32" + } + }, + { + "name": "reshape (squeeze) float32 5D tensor by eliminating four dimensions", + "inputs": { + "input": { + "shape": [1, 1, 1, 24, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [24], + "expected": { + "name": "output", + "shape": [24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (squeeze) float32 2D tensor by eliminating 1st dimension", + "inputs": { + "input": { + "shape": [1, 24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [24], + "expected": { + "name": "output", + "shape": [24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (squeeze) float32 3D tensor by eliminating 2nd and 3rd dimensions", + "inputs": { + "input": { + "shape": [24, 1, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [24], + "expected": { + "name": "output", + "shape": [24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (squeeze) float32 4D tensor by eliminating 1st and 4th dimensions", + "inputs": { + "input": { + "shape": [1, 4, 6, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [4, 6], + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (squeeze) float32 5D tensor by eliminating 2nd and 3rd dimensions", + "inputs": { + "input": { + "shape": [2, 1, 1, 12, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [2, 12, 1], + "expected": { + "name": "output", + "shape": [2, 12, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (squeeze) float32 5D tensor by eliminating 1st, 2nd and 5th dimensions", + "inputs": { + "input": { + "shape": [1, 1, 1, 24, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [1, 24], + "expected": { + "name": "output", + "shape": [1, 24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 0D tensor to 4D", + "inputs": { + "input": { + "shape": [], + "data": [ + -33.82555389404297 + ], + "type": "float32" + } + }, + "newShape": [1, 1, 1, 1], + "expected": { + "name": "output", + "shape": [1, 1, 1, 1], + "data": [ + -33.82555389404297 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 1D tensor by adding one dimension", + "inputs": { + "input": { + "shape": [24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [1, 24], + "expected": { + "name": "output", + "shape": [1, 24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 1D tensor by adding two dimensions", + "inputs": { + "input": { + "shape": [24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [1, 24, 1], + "expected": { + "name": "output", + "shape": [1, 24, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 1D tensor to 5D", + "inputs": { + "input": { + "shape": [24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [1, 1, 1, 24, 1], + "expected": { + "name": "output", + "shape": [1, 1, 1, 24, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 1D tensor by adding 2nd and 3rd dimensions", + "inputs": { + "input": { + "shape": [24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [24, 1, 1], + "expected": { + "name": "output", + "shape": [24, 1, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 2D tensor by adding one dimension", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [4, 1, 6], + "expected": { + "name": "output", + "shape": [4, 1, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 2D tensor by adding two dimensions", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [1, 4, 1, 6], + "expected": { + "name": "output", + "shape": [1, 4, 1, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 2D tensor by adding 1st dimension", + "inputs": { + "input": { + "shape": [24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [1, 24], + "expected": { + "name": "output", + "shape": [1, 24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 2D tensor by adding 1st and 4th dimensions", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [1, 4, 6, 1], + "expected": { + "name": "output", + "shape": [1, 4, 6, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 3D tensor by adding 2nd and 3rd dimensions", + "inputs": { + "input": { + "shape": [2, 12, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [2, 1, 1, 12, 1], + "expected": { + "name": "output", + "shape": [2, 1, 1, 12, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 4D tensor by adding 2nd dimension", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [2, 1, 2, 2, 3], + "expected": { + "name": "output", + "shape": [2, 1, 2, 2, 3], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (unsqueeze) float32 5D tensor by adding 4th dimension", + "inputs": { + "input": { + "shape": [2, 1, 4, 3, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [2, 1, 4, 1, 3, 1], + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (flatten) float32 3D tensor to 2D", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [2, 12], + "expected": { + "name": "output", + "shape": [2, 12], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (flatten) float32 4D to 2D", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [4, 6], + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (flatten) float32 4D to 2D exclusive 1st dimension", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [1, 24], + "expected": { + "name": "output", + "shape": [1, 24], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + { + "name": "reshape (flatten) float32 4D to 2D exclusive 4th dimension", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } + }, + "newShape": [24, 1], + "expected": { + "name": "output", + "shape": [24, 1], + "data": [ + -30.0561466217041, + 99.56941986083984, + 88.04620361328125, + -91.87507629394531, + -23.7972354888916, + -91.28665161132812, + -63.15204620361328, + 12.0669527053833, + -96.1172866821289, + -44.77365493774414, + -80.08650970458984, + -64.43756866455078, + 27.64195442199707, + -96.86306762695312, + 83.6834716796875, + 50.599483489990234, + -20.18765640258789, + -1.3904608488082886, + -96.93603515625, + 65.34143829345703, + 34.835994720458984, + 62.01485824584961, + -2.8698415756225586, + 27.903749465942383 + ], + "type": "float32" + } } ] }
\ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/sigmoid.json b/tests/wpt/tests/webnn/resources/test_data/sigmoid.json index c2333363217..69756fbb9c2 100644 --- a/tests/wpt/tests/webnn/resources/test_data/sigmoid.json +++ b/tests/wpt/tests/webnn/resources/test_data/sigmoid.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "sigmoid float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + -0.3769951326450487, + -0.6848450678710742, + -5.98887201399973, + 4.431885748123033, + -0.9386848809986663, + 4.591195578857441, + -2.5067027776293456, + 1.5669522849917055, + -2.596473257404651, + -3.647293770068697, + 2.6785236795981433, + -3.105160168372808, + 2.258501824714781, + -0.2865157795154527, + 4.640436413897461, + 1.0606156163391969, + -3.536252613252593, + 0.44104409560934066, + 4.79146007344656, + 2.0745488579530846, + 0.8354471082395971, + -5.433595857448718, + -4.184835816765236, + -2.484982429169702 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.4068518280982971, + 0.33518078923225403, + 0.0025002227630466223, + 0.9882476925849915, + 0.28116607666015625, + 0.9899610877037048, + 0.07538963109254837, + 0.8273487091064453, + 0.0693657398223877, + 0.02539960853755474, + 0.9357474446296692, + 0.04289489984512329, + 0.9053813815116882, + 0.42885708808898926, + 0.9904388189315796, + 0.7428081631660461, + 0.0282981526106596, + 0.6085078120231628, + 0.9917680025100708, + 0.8884047269821167, + 0.6975054740905762, + 0.004348373040556908, + 0.014996387995779514, + 0.07691769301891327 + ], + "type": "float32" + } + }, + { "name": "sigmoid float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/sin.json b/tests/wpt/tests/webnn/resources/test_data/sin.json index 3cc4771a336..1fe76df45fb 100644 --- a/tests/wpt/tests/webnn/resources/test_data/sin.json +++ b/tests/wpt/tests/webnn/resources/test_data/sin.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "sin float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 79.78058345331559, + 55.00573351892254, + -28.052533009972393, + -31.644301395318934, + 56.28375442556609, + -96.18512135074778, + -72.99826309079677, + -3.4241827262925852, + 84.02549499853444, + 5.030371842664394, + -9.512612392430725, + 9.540593026227612, + -25.267252298101056, + -20.831639431837345, + -32.024754770208745, + -55.69102662814118, + 15.92748126354438, + -57.8835344652012, + 31.0160642695962, + -94.88304659350737, + -84.58417183546084, + 44.848744233535655, + -19.000272686086987, + -48.03827737658466 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.946033775806427, + -0.9996118545532227, + -0.21998752653598785, + -0.22639396786689758, + -0.2618238627910614, + -0.9335716366767883, + 0.6754903197288513, + 0.27884384989738464, + 0.7156150341033936, + -0.9498680830001831, + 0.08772148936986923, + -0.11555644869804382, + -0.13410548865795135, + -0.9166066646575928, + -0.5719056725502014, + 0.7563026547431946, + -0.21775959432125092, + -0.9722972512245178, + -0.38929200172424316, + -0.59339439868927, + -0.23656263947486877, + 0.7620325684547424, + -0.15014687180519104, + 0.7921885848045349 + ], + "type": "float32" + } + }, + { "name": "sin float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/slice.json b/tests/wpt/tests/webnn/resources/test_data/slice.json index ed193dd6563..28cfd2c0e26 100644 --- a/tests/wpt/tests/webnn/resources/test_data/slice.json +++ b/tests/wpt/tests/webnn/resources/test_data/slice.json @@ -1,6 +1,63 @@ { "tests": [ { + "name": "slice float32 1D constant tensor", + "inputs": { + "input": { + "shape": [24], + "data": [ + 28.846251144212147, + 97.9541470229301, + -68.15961736262523, + 14.978987588557175, + 90.23090084798065, + 76.59095547712559, + -24.556316258204532, + 79.58749302462488, + 65.21375982234204, + 57.43970862960305, + 74.41775256222849, + -4.513182026141791, + 0.5424534704526991, + 80.44634130202977, + 28.327650022124686, + 74.0261938866893, + -74.54558964005362, + -27.30604081001799, + -70.4277433212161, + 59.82631931755259, + -58.46095416849133, + 79.80571087632629, + -9.857854207596304, + 42.66519880465225 + ], + "type": "float32", + "constant": true + } + }, + "starts": [12], + "sizes": [12], + "expected": { + "name": "output", + "shape": [12], + "data": [ + 0.5424534678459167, + 80.44634246826172, + 28.32765007019043, + 74.02619171142578, + -74.54559326171875, + -27.306041717529297, + -70.42774200439453, + 59.82632064819336, + -58.46095275878906, + 79.80570983886719, + -9.857853889465332, + 42.665199279785156 + ], + "type": "float32" + } + }, + { "name": "slice float32 1D tensor", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/softmax.json b/tests/wpt/tests/webnn/resources/test_data/softmax.json index 52ea57c7632..ebb12114fc6 100644 --- a/tests/wpt/tests/webnn/resources/test_data/softmax.json +++ b/tests/wpt/tests/webnn/resources/test_data/softmax.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "softmax float32 2D constant tensor all positive", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 7.903734730203054, + 6.358251623091922, + 4.833756774572475, + 9.579165187926348, + 0.21071856783621445, + 4.554958961778823, + 7.150174113718282, + 8.330297576341172, + 1.535985791562966, + 6.633619497318013, + 1.45393689965033, + 0.21341864769940821, + 5.257819475802503, + 8.1921378632378, + 8.161730206898543, + 2.8744343334015565, + 8.950733525100087, + 6.111632812590415, + 1.6371468489476149, + 0.2762612074523485, + 5.028227187056009, + 3.898326029997037, + 2.8967114227178836, + 6.8894703393234575 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 0.15068615972995758, + 0.03212761878967285, + 0.006995180621743202, + 0.8048291206359863, + 0.00006871300138300285, + 0.005293202120810747, + 0.2057899534702301, + 0.6698001027107239, + 0.0007502624066546559, + 0.1227685883641243, + 0.0006911618984304368, + 0.00019990770670119673, + 0.012398251332342625, + 0.23319464921951294, + 0.22621041536331177, + 0.0011435872875154018, + 0.4979347288608551, + 0.029118351638317108, + 0.004253828432410955, + 0.001090824487619102, + 0.12633030116558075, + 0.040812913328409195, + 0.014990009367465973, + 0.8125221133232117 + ], + "type": "float32" + } + }, + { "name": "softmax float32 2D tensor all positive", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/softplus.json b/tests/wpt/tests/webnn/resources/test_data/softplus.json index 2b26e1439e3..eb05b7b2811 100644 --- a/tests/wpt/tests/webnn/resources/test_data/softplus.json +++ b/tests/wpt/tests/webnn/resources/test_data/softplus.json @@ -1,6 +1,73 @@ { // softplus: The calculation follows the expression ln(1 + exp(steepness * x)) / steepness. "tests": [ { + "name": "softplus float32 1D constant tensor default options", // default options: {steepness: 1} + "inputs": { + "x": { + "shape": [24], + "data": [ + 5.626614582460632, + 5.167487045486892, + 4.0146356193402655, + 9.48003299650489, + 9.989938045769978, + 7.0654412821434125, + 2.132681001794825, + 8.187151346059956, + 5.169976220175496, + 2.1044997879382077, + 3.523329401138895, + 4.136340646976668, + 1.7418719794295656, + 5.145224066290767, + 5.015515309165462, + 0.045903935074711466, + 2.9570898924917377, + 3.959244712098706, + 5.517926978255181, + 7.192322388417094, + 8.76492480390928, + 1.3734704039113388, + 8.930669016709397, + 8.660283210871246 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 5.630208969116211, + 5.1731696128845215, + 4.032524108886719, + 9.480109214782715, + 9.989983558654785, + 7.0662946701049805, + 2.2446866035461426, + 8.187429428100586, + 5.175644874572754, + 2.219529390335083, + 3.552403688430786, + 4.152195453643799, + 1.903303623199463, + 5.151034355163574, + 5.022127628326416, + 0.7163625359535217, + 3.007754325866699, + 3.978142499923706, + 5.521933078765869, + 7.1930742263793945, + 8.765081405639648, + 1.5991919040679932, + 8.930801391601562, + 8.660456657409668 + ], + "type": "float32" + } + }, + { "name": "softplus float32 1D tensor default options", // default options: {steepness: 1} "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/softsign.json b/tests/wpt/tests/webnn/resources/test_data/softsign.json index e3208b18ad4..290f6711d09 100644 --- a/tests/wpt/tests/webnn/resources/test_data/softsign.json +++ b/tests/wpt/tests/webnn/resources/test_data/softsign.json @@ -1,6 +1,73 @@ { // softsign: The calculation follows the expression x / (1 + |x|). "tests": [ { + "name": "softsign positive float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 1.5834133593790956, + 4.0787189411490115, + 8.883356617490337, + 8.070860233252166, + 8.211773633019915, + 2.4554003891197818, + 0.653374178120758, + 7.866281154604682, + 3.1239552336192666, + 8.013792390668268, + 3.9409862749371283, + 1.8131727337833081, + 2.390676102273188, + 1.3359680092645565, + 9.416410839467265, + 0.44325690899325254, + 5.236662013213598, + 9.424242359034539, + 7.816190418459348, + 5.849185795081855, + 8.780370640491928, + 5.1205157788312246, + 7.1172223514005095, + 4.59910661262345 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.6129152178764343, + 0.8030999898910522, + 0.8988198041915894, + 0.8897568583488464, + 0.8914432525634766, + 0.7105979323387146, + 0.3951762318611145, + 0.8872131109237671, + 0.7575143575668335, + 0.8890588879585266, + 0.7976112365722656, + 0.6445294618606567, + 0.7050735354423523, + 0.5719119310379028, + 0.9039976596832275, + 0.30712267756462097, + 0.8396578431129456, + 0.9040697813034058, + 0.8865723013877869, + 0.8539972305297852, + 0.8977543711662292, + 0.8366150856018066, + 0.8768051266670227, + 0.8214001059532166 + ], + "type": "float32" + } + }, + { "name": "softsign positive float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/split.json b/tests/wpt/tests/webnn/resources/test_data/split.json index e4216003c02..6432044ea20 100644 --- a/tests/wpt/tests/webnn/resources/test_data/split.json +++ b/tests/wpt/tests/webnn/resources/test_data/split.json @@ -1,6 +1,90 @@ { "tests": [ { + "name": "split float32 1D constant tensor number splits default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -64.52057192772567, + -84.60513454654502, + -67.9928282139549, + -23.446074622313745, + -85.64383132426956, + 46.877522730892906, + -68.11224159891194, + 75.99607609082298, + -61.05668616435924, + -90.92643605408041, + 53.916621140775476, + 84.16269171442175, + -95.57494716023527, + -52.40757884637803, + -29.007187148127983, + 71.65495730084652, + 50.663572707062656, + 21.364581604631596, + -27.127241457105228, + 65.1489516233315, + -30.406812651567833, + -6.818390152438795, + 46.67362179020569, + -21.12453802903387 + ], + "type": "float32", + "constant": true + } + }, + "splits": 3, + "expected": [ + { + "name": "output1", + "shape": [8], + "data": [ + -64.52056884765625, + -84.60513305664062, + -67.99282836914062, + -23.446075439453125, + -85.64382934570312, + 46.87752151489258, + -68.11224365234375, + 75.99607849121094 + ], + "type": "float32" + }, + { + "name": "output2", + "shape": [8], + "data": [ + -61.05668640136719, + -90.92643737792969, + 53.916622161865234, + 84.16268920898438, + -95.57494354248047, + -52.40757751464844, + -29.007186889648438, + 71.65496063232422 + ], + "type": "float32" + }, + { + "name": "output3", + "shape": [8], + "data": [ + 50.66357421875, + 21.364582061767578, + -27.127241134643555, + 65.1489486694336, + -30.40681266784668, + -6.818390369415283, + 46.673622131347656, + -21.12453842163086 + ], + "type": "float32" + } + ] + }, + { "name": "split float32 1D tensor number splits default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/sqrt.json b/tests/wpt/tests/webnn/resources/test_data/sqrt.json index be9666590bd..fa59308d45b 100644 --- a/tests/wpt/tests/webnn/resources/test_data/sqrt.json +++ b/tests/wpt/tests/webnn/resources/test_data/sqrt.json @@ -21,6 +21,73 @@ } }, { + "name": "sqrt float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 7.256007082508322, + 7.786442153556337, + 1.3684587069592324, + 8.053416211473843, + 9.131288551146515, + 8.525780428509535, + 4.870553385406751, + 7.625959393700068, + 2.7050268401423483, + 8.709602770137977, + 3.2687935624375797, + 4.712883187439902, + 8.669182019771712, + 8.82960710328718, + 0.5529024533541915, + 7.95877117461449, + 4.096406313025051, + 7.919884221032476, + 4.424484759327438, + 0.09894099762703057, + 4.690024907987658, + 1.5277378145575349, + 5.929779749165696, + 6.06647154134714 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 2.693697690963745, + 2.790419816970825, + 1.1698113679885864, + 2.8378541469573975, + 3.0218021869659424, + 2.919893980026245, + 2.20693302154541, + 2.7615139484405518, + 1.644696593284607, + 2.9512035846710205, + 1.8079805374145508, + 2.170917510986328, + 2.944347381591797, + 2.9714653491973877, + 0.7435740828514099, + 2.821129322052002, + 2.023958206176758, + 2.8142287731170654, + 2.1034460067749023, + 0.31454887986183167, + 2.165646553039551, + 1.2360169887542725, + 2.4351139068603516, + 2.4630208015441895 + ], + "type": "float32" + } + }, + { "name": "sqrt float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/squeeze.json b/tests/wpt/tests/webnn/resources/test_data/squeeze.json deleted file mode 100644 index 88890fe8702..00000000000 --- a/tests/wpt/tests/webnn/resources/test_data/squeeze.json +++ /dev/null @@ -1,696 +0,0 @@ -{ - "tests": [ - { - "name": "squeeze float32 2D tensor by eliminating one dimension default options", - "inputs": { - "input": { - "shape": [1, 24], - "data": [ - 1.1293665986622017, - -93.29325783541842, - -19.999887095191227, - 41.119214363429876, - 92.69352298075461, - -41.51937878962313, - -56.75228730395734, - 11.148093991767155, - 5.57540042674151, - 15.709176425437747, - 62.550443705517665, - -5.299276370816216, - -18.61525168224469, - -66.94721623021692, - 94.97520289870027, - -21.94004801967297, - 30.047636856615554, - 13.805134987122344, - -45.08670702769, - 76.90356276507339, - 46.96974979938284, - -86.58127045567055, - 31.645846897982068, - -67.96637618240129 - ], - "type": "float32" - } - }, - "expected": { - "name": "output", - "shape": [24], - "data": [ - 1.1293666362762451, - -93.29325866699219, - -19.999887466430664, - 41.11921310424805, - 92.69351959228516, - -41.519378662109375, - -56.752288818359375, - 11.148094177246094, - 5.575400352478027, - 15.709176063537598, - 62.550445556640625, - -5.299276351928711, - -18.615251541137695, - -66.94721984863281, - 94.97520446777344, - -21.940048217773438, - 30.047636032104492, - 13.805134773254395, - -45.086708068847656, - 76.903564453125, - 46.969749450683594, - -86.58126831054688, - 31.64584732055664, - -67.96637725830078 - ], - "type": "float32" - } - }, - { - "name": "squeeze float32 3D tensor by eliminating one dimension default options", - "inputs": { - "input": { - "shape": [4, 1, 6], - "data": [ - 1.1293665986622017, - -93.29325783541842, - -19.999887095191227, - 41.119214363429876, - 92.69352298075461, - -41.51937878962313, - -56.75228730395734, - 11.148093991767155, - 5.57540042674151, - 15.709176425437747, - 62.550443705517665, - -5.299276370816216, - -18.61525168224469, - -66.94721623021692, - 94.97520289870027, - -21.94004801967297, - 30.047636856615554, - 13.805134987122344, - -45.08670702769, - 76.90356276507339, - 46.96974979938284, - -86.58127045567055, - 31.645846897982068, - -67.96637618240129 - ], - "type": "float32" - } - }, - "expected": { - "name": "output", - "shape": [4, 6], - "data": [ - 1.1293666362762451, - -93.29325866699219, - -19.999887466430664, - 41.11921310424805, - 92.69351959228516, - -41.519378662109375, - -56.752288818359375, - 11.148094177246094, - 5.575400352478027, - 15.709176063537598, - 62.550445556640625, - -5.299276351928711, - -18.615251541137695, - -66.94721984863281, - 94.97520446777344, - -21.940048217773438, - 30.047636032104492, - 13.805134773254395, - -45.086708068847656, - 76.903564453125, - 46.969749450683594, - -86.58126831054688, - 31.64584732055664, - -67.96637725830078 - ], - "type": "float32" - } - }, - { - "name": "squeeze float32 3D tensor by eliminating two dimensions default options", - "inputs": { - "input": { - "shape": [1, 24, 1], - "data": [ - 1.1293665986622017, - -93.29325783541842, - -19.999887095191227, - 41.119214363429876, - 92.69352298075461, - -41.51937878962313, - -56.75228730395734, - 11.148093991767155, - 5.57540042674151, - 15.709176425437747, - 62.550443705517665, - -5.299276370816216, - -18.61525168224469, - -66.94721623021692, - 94.97520289870027, - -21.94004801967297, - 30.047636856615554, - 13.805134987122344, - -45.08670702769, - 76.90356276507339, - 46.96974979938284, - -86.58127045567055, - 31.645846897982068, - -67.96637618240129 - ], - "type": "float32" - } - }, - "expected": { - "name": "output", - "shape": [24], - "data": [ - 1.1293666362762451, - -93.29325866699219, - -19.999887466430664, - 41.11921310424805, - 92.69351959228516, - -41.519378662109375, - -56.752288818359375, - 11.148094177246094, - 5.575400352478027, - 15.709176063537598, - 62.550445556640625, - -5.299276351928711, - -18.615251541137695, - -66.94721984863281, - 94.97520446777344, - -21.940048217773438, - 30.047636032104492, - 13.805134773254395, - -45.086708068847656, - 76.903564453125, - 46.969749450683594, - -86.58126831054688, - 31.64584732055664, - -67.96637725830078 - ], - "type": "float32" - } - }, - { - "name": "squeeze float32 4D tensor by eliminating two dimensions default options", - "inputs": { - "input": { - "shape": [1, 4, 1, 6], - "data": [ - 1.1293665986622017, - -93.29325783541842, - -19.999887095191227, - 41.119214363429876, - 92.69352298075461, - -41.51937878962313, - -56.75228730395734, - 11.148093991767155, - 5.57540042674151, - 15.709176425437747, - 62.550443705517665, - -5.299276370816216, - -18.61525168224469, - -66.94721623021692, - 94.97520289870027, - -21.94004801967297, - 30.047636856615554, - 13.805134987122344, - -45.08670702769, - 76.90356276507339, - 46.96974979938284, - -86.58127045567055, - 31.645846897982068, - -67.96637618240129 - ], - "type": "float32" - } - }, - "expected": { - "name": "output", - "shape": [4, 6], - "data": [ - 1.1293666362762451, - -93.29325866699219, - -19.999887466430664, - 41.11921310424805, - 92.69351959228516, - -41.519378662109375, - -56.752288818359375, - 11.148094177246094, - 5.575400352478027, - 15.709176063537598, - 62.550445556640625, - -5.299276351928711, - -18.615251541137695, - -66.94721984863281, - 94.97520446777344, - -21.940048217773438, - 30.047636032104492, - 13.805134773254395, - -45.086708068847656, - 76.903564453125, - 46.969749450683594, - -86.58126831054688, - 31.64584732055664, - -67.96637725830078 - ], - "type": "float32" - } - }, - { - "name": "squeeze float32 4D tensor by eliminating all dimensions default options", - "inputs": { - "input": { - "shape": [1, 1, 1, 1], - "data": [ - 19.404981030500302 - ], - "type": "float32" - } - }, - "expected": { - "name": "output", - "data": 19.40498161315918, - "type": "float32" - } - }, - { - "name": "squeeze float32 5D tensor by eliminating four dimensions default options", - "inputs": { - "input": { - "shape": [1, 1, 1, 24, 1], - "data": [ - 1.1293665986622017, - -93.29325783541842, - -19.999887095191227, - 41.119214363429876, - 92.69352298075461, - -41.51937878962313, - -56.75228730395734, - 11.148093991767155, - 5.57540042674151, - 15.709176425437747, - 62.550443705517665, - -5.299276370816216, - -18.61525168224469, - -66.94721623021692, - 94.97520289870027, - -21.94004801967297, - 30.047636856615554, - 13.805134987122344, - -45.08670702769, - 76.90356276507339, - 46.96974979938284, - -86.58127045567055, - 31.645846897982068, - -67.96637618240129 - ], - "type": "float32" - } - }, - "expected": { - "name": "output", - "shape": [24], - "data": [ - 1.1293666362762451, - -93.29325866699219, - -19.999887466430664, - 41.11921310424805, - 92.69351959228516, - -41.519378662109375, - -56.752288818359375, - 11.148094177246094, - 5.575400352478027, - 15.709176063537598, - 62.550445556640625, - -5.299276351928711, - -18.615251541137695, - -66.94721984863281, - 94.97520446777344, - -21.940048217773438, - 30.047636032104492, - 13.805134773254395, - -45.086708068847656, - 76.903564453125, - 46.969749450683594, - -86.58126831054688, - 31.64584732055664, - -67.96637725830078 - ], - "type": "float32" - } - }, - { - "name": "squeeze float32 2D tensor by eliminating one dimension options.axes", - "inputs": { - "input": { - "shape": [1, 24], - "data": [ - 1.1293665986622017, - -93.29325783541842, - -19.999887095191227, - 41.119214363429876, - 92.69352298075461, - -41.51937878962313, - -56.75228730395734, - 11.148093991767155, - 5.57540042674151, - 15.709176425437747, - 62.550443705517665, - -5.299276370816216, - -18.61525168224469, - -66.94721623021692, - 94.97520289870027, - -21.94004801967297, - 30.047636856615554, - 13.805134987122344, - -45.08670702769, - 76.90356276507339, - 46.96974979938284, - -86.58127045567055, - 31.645846897982068, - -67.96637618240129 - ], - "type": "float32" - } - }, - "options": { - "axes": [0] - }, - "expected": { - "name": "output", - "shape": [24], - "data": [ - 1.1293666362762451, - -93.29325866699219, - -19.999887466430664, - 41.11921310424805, - 92.69351959228516, - -41.519378662109375, - -56.752288818359375, - 11.148094177246094, - 5.575400352478027, - 15.709176063537598, - 62.550445556640625, - -5.299276351928711, - -18.615251541137695, - -66.94721984863281, - 94.97520446777344, - -21.940048217773438, - 30.047636032104492, - 13.805134773254395, - -45.086708068847656, - 76.903564453125, - 46.969749450683594, - -86.58126831054688, - 31.64584732055664, - -67.96637725830078 - ], - "type": "float32" - } - }, - { - "name": "squeeze float32 3D tensor by eliminating two dimensions options.axes", - "inputs": { - "input": { - "shape": [24, 1, 1], - "data": [ - 1.1293665986622017, - -93.29325783541842, - -19.999887095191227, - 41.119214363429876, - 92.69352298075461, - -41.51937878962313, - -56.75228730395734, - 11.148093991767155, - 5.57540042674151, - 15.709176425437747, - 62.550443705517665, - -5.299276370816216, - -18.61525168224469, - -66.94721623021692, - 94.97520289870027, - -21.94004801967297, - 30.047636856615554, - 13.805134987122344, - -45.08670702769, - 76.90356276507339, - 46.96974979938284, - -86.58127045567055, - 31.645846897982068, - -67.96637618240129 - ], - "type": "float32" - } - }, - "options": { - "axes": [1, 2] - }, - "expected": { - "name": "output", - "shape": [24], - "data": [ - 1.1293666362762451, - -93.29325866699219, - -19.999887466430664, - 41.11921310424805, - 92.69351959228516, - -41.519378662109375, - -56.752288818359375, - 11.148094177246094, - 5.575400352478027, - 15.709176063537598, - 62.550445556640625, - -5.299276351928711, - -18.615251541137695, - -66.94721984863281, - 94.97520446777344, - -21.940048217773438, - 30.047636032104492, - 13.805134773254395, - -45.086708068847656, - 76.903564453125, - 46.969749450683594, - -86.58126831054688, - 31.64584732055664, - -67.96637725830078 - ], - "type": "float32" - } - }, - { - "name": "squeeze float32 4D tensor by eliminating two dimensions options.axes", - "inputs": { - "input": { - "shape": [1, 4, 6, 1], - "data": [ - 1.1293665986622017, - -93.29325783541842, - -19.999887095191227, - 41.119214363429876, - 92.69352298075461, - -41.51937878962313, - -56.75228730395734, - 11.148093991767155, - 5.57540042674151, - 15.709176425437747, - 62.550443705517665, - -5.299276370816216, - -18.61525168224469, - -66.94721623021692, - 94.97520289870027, - -21.94004801967297, - 30.047636856615554, - 13.805134987122344, - -45.08670702769, - 76.90356276507339, - 46.96974979938284, - -86.58127045567055, - 31.645846897982068, - -67.96637618240129 - ], - "type": "float32" - } - }, - "options": { - "axes": [0, 3] - }, - "expected": { - "name": "output", - "shape": [4, 6], - "data": [ - 1.1293666362762451, - -93.29325866699219, - -19.999887466430664, - 41.11921310424805, - 92.69351959228516, - -41.519378662109375, - -56.752288818359375, - 11.148094177246094, - 5.575400352478027, - 15.709176063537598, - 62.550445556640625, - -5.299276351928711, - -18.615251541137695, - -66.94721984863281, - 94.97520446777344, - -21.940048217773438, - 30.047636032104492, - 13.805134773254395, - -45.086708068847656, - 76.903564453125, - 46.969749450683594, - -86.58126831054688, - 31.64584732055664, - -67.96637725830078 - ], - "type": "float32" - } - }, - { - "name": "squeeze float32 5D tensor by eliminating two dimensions options.axes", - "inputs": { - "input": { - "shape": [2, 1, 1, 12, 1], - "data": [ - 1.1293665986622017, - -93.29325783541842, - -19.999887095191227, - 41.119214363429876, - 92.69352298075461, - -41.51937878962313, - -56.75228730395734, - 11.148093991767155, - 5.57540042674151, - 15.709176425437747, - 62.550443705517665, - -5.299276370816216, - -18.61525168224469, - -66.94721623021692, - 94.97520289870027, - -21.94004801967297, - 30.047636856615554, - 13.805134987122344, - -45.08670702769, - 76.90356276507339, - 46.96974979938284, - -86.58127045567055, - 31.645846897982068, - -67.96637618240129 - ], - "type": "float32" - } - }, - "options": { - "axes": [1, 2] - }, - "expected": { - "name": "output", - "shape": [2, 12, 1], - "data": [ - 1.1293666362762451, - -93.29325866699219, - -19.999887466430664, - 41.11921310424805, - 92.69351959228516, - -41.519378662109375, - -56.752288818359375, - 11.148094177246094, - 5.575400352478027, - 15.709176063537598, - 62.550445556640625, - -5.299276351928711, - -18.615251541137695, - -66.94721984863281, - 94.97520446777344, - -21.940048217773438, - 30.047636032104492, - 13.805134773254395, - -45.086708068847656, - 76.903564453125, - 46.969749450683594, - -86.58126831054688, - 31.64584732055664, - -67.96637725830078 - ], - "type": "float32" - } - }, - { - "name": "squeeze float32 5D tensor by eliminating four dimensions options.axes", - "inputs": { - "input": { - "shape": [1, 1, 1, 24, 1], - "data": [ - 1.1293665986622017, - -93.29325783541842, - -19.999887095191227, - 41.119214363429876, - 92.69352298075461, - -41.51937878962313, - -56.75228730395734, - 11.148093991767155, - 5.57540042674151, - 15.709176425437747, - 62.550443705517665, - -5.299276370816216, - -18.61525168224469, - -66.94721623021692, - 94.97520289870027, - -21.94004801967297, - 30.047636856615554, - 13.805134987122344, - -45.08670702769, - 76.90356276507339, - 46.96974979938284, - -86.58127045567055, - 31.645846897982068, - -67.96637618240129 - ], - "type": "float32" - } - }, - "options": { - "axes": [0, 1, 2, 4] - }, - "expected": { - "name": "output", - "shape": [24], - "data": [ - 1.1293666362762451, - -93.29325866699219, - -19.999887466430664, - 41.11921310424805, - 92.69351959228516, - -41.519378662109375, - -56.752288818359375, - 11.148094177246094, - 5.575400352478027, - 15.709176063537598, - 62.550445556640625, - -5.299276351928711, - -18.615251541137695, - -66.94721984863281, - 94.97520446777344, - -21.940048217773438, - 30.047636032104492, - 13.805134773254395, - -45.086708068847656, - 76.903564453125, - 46.969749450683594, - -86.58126831054688, - 31.64584732055664, - -67.96637725830078 - ], - "type": "float32" - } - } - ] -}
\ No newline at end of file diff --git a/tests/wpt/tests/webnn/resources/test_data/sub.json b/tests/wpt/tests/webnn/resources/test_data/sub.json index 4a3096313e1..207d9106b42 100644 --- a/tests/wpt/tests/webnn/resources/test_data/sub.json +++ b/tests/wpt/tests/webnn/resources/test_data/sub.json @@ -1,6 +1,104 @@ { "tests": [ { + "name": "sub float32 1D constant tensors", + "inputs": { + "a": { + "shape": [24], + "data": [ + 73.59273411765761, + 14.484682970108636, + -69.40201711151408, + -52.04528488626416, + -75.78136877111933, + -2.274051445061204, + -83.29907743841476, + 15.57776886289956, + -62.70080421291606, + 32.95400351079056, + 82.55709225645836, + -74.90638758877455, + 78.22299428029646, + 48.39240254947623, + -19.153541450651716, + -85.93221227232242, + 89.12354776921964, + 22.874629248059804, + 80.56973297595874, + 97.62598337281631, + 52.74850952689357, + 89.16604046945432, + -20.503417738603375, + 99.48707602133317 + ], + "type": "float32", + "constant": true + }, + "b": { + "shape": [24], + "data": [ + -49.12813049327167, + 40.189291278955295, + 7.224666637037913, + 89.26004842468907, + -81.43340528622471, + 59.61165817521396, + 11.234410659855328, + 48.884057695505845, + 85.26825586730342, + 27.6952967767901, + 30.989454126839945, + -38.1290365096719, + -83.14809826804765, + -86.16174952283208, + 16.758884614336495, + 46.128898841129086, + -28.432477462364687, + 28.229338368319986, + 35.23646170623519, + -77.05516625176658, + -57.8714723086966, + -58.15086093387936, + 27.48886675763096, + 31.998020251913943 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 122.72087097167969, + -25.704608917236328, + -76.62667846679688, + -141.30532836914062, + 5.652030944824219, + -61.885711669921875, + -94.53349304199219, + -33.3062858581543, + -147.96905517578125, + 5.258705139160156, + 51.56763458251953, + -36.77735137939453, + 161.37109375, + 134.5541534423828, + -35.91242599487305, + -132.0611114501953, + 117.5560302734375, + -5.354707717895508, + 45.33327102661133, + 174.68115234375, + 110.61997985839844, + 147.31689453125, + -47.992286682128906, + 67.48905944824219 + ], + "type": "float32" + } + }, + { "name": "sub float32 1D tensors", "inputs": { "a": { @@ -65,7 +163,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [24], "data": [ 122.72087097167969, @@ -161,7 +259,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [4, 6], "data": [ 122.72087097167969, @@ -257,7 +355,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 3, 4], "data": [ 122.72087097167969, @@ -353,7 +451,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 122.72087097167969, @@ -449,7 +547,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 1, 2, 3], "data": [ 122.72087097167969, @@ -522,7 +620,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -170.641845703125, @@ -600,7 +698,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 62.82989501953125, @@ -676,7 +774,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ 81.98584747314453, @@ -749,7 +847,7 @@ } }, "expected": { - "name": "ouput", + "name": "output", "shape": [2, 2, 2, 3], "data": [ -170.641845703125, diff --git a/tests/wpt/tests/webnn/resources/test_data/tan.json b/tests/wpt/tests/webnn/resources/test_data/tan.json index 857e2b65059..63c7056d905 100644 --- a/tests/wpt/tests/webnn/resources/test_data/tan.json +++ b/tests/wpt/tests/webnn/resources/test_data/tan.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "tan float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 52.697813799029234, + 70.06912795961244, + 90.49689556206596, + 24.656670346007246, + 11.665126934214868, + -50.95264467861913, + 40.32006298292501, + -9.641122915742358, + -31.567750159821898, + 45.59520766037491, + -55.93085683516472, + -44.602971816473726, + 80.45398224930159, + -2.314880760077372, + -25.474768449753242, + 62.589453387873476, + -70.9440311153533, + 62.8486191264619, + 84.79767085874772, + -95.58503093501218, + 15.552484501850643, + -55.256541162343574, + -26.884890419121504, + 0.15926108746810996 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -0.8582430481910706, + 1.410544753074646, + -0.6978657245635986, + -0.5156278610229492, + -1.2633823156356812, + -0.8205758929252625, + -0.5734118819236755, + -0.21978461742401123, + -0.1530018001794815, + -23.731182098388672, + 0.7106066942214966, + -0.7149254679679871, + -2.7969717979431152, + 1.086239218711853, + -0.3560185432434082, + -0.24726025760173798, + 3.7865755558013916, + 0.016766052693128586, + -0.025338610634207726, + -4.203672409057617, + -0.1567438244819641, + 3.495089292526245, + 5.453553199768066, + 0.16062140464782715 + ], + "type": "float32" + } + }, + { "name": "tan float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/tanh.json b/tests/wpt/tests/webnn/resources/test_data/tanh.json index 9e13b62472a..063c10623d8 100644 --- a/tests/wpt/tests/webnn/resources/test_data/tanh.json +++ b/tests/wpt/tests/webnn/resources/test_data/tanh.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "tanh float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 5.47352732138576, + -1.1535596038683664, + 0.4074455820170506, + 1.8297704953674545, + 2.8690003001236537, + -4.570195171586943, + 4.146744465978713, + -4.0659342722666105, + -3.712847102459686, + 0.9077175268859179, + -0.11083049583219662, + 5.955096345162751, + 1.7831856867406417, + 4.023128342782897, + 5.587857512324163, + -5.280654174784587, + 1.4147950164785632, + -5.707717050109768, + -1.4439182665473629, + -1.9129082844854288, + 2.7495969049667437, + -0.7420240173058836, + 4.856568111647942, + -0.7563357776241926 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.9999647736549377, + -0.8189298510551453, + 0.38630160689353943, + 0.9498035907745361, + 0.9935782551765442, + -0.9997855424880981, + 0.9994998574256897, + -0.9994121193885803, + -0.9988092184066772, + 0.7200349569320679, + -0.1103789210319519, + 0.9999865293502808, + 0.945036768913269, + 0.9993596076965332, + 0.9999719858169556, + -0.9999482035636902, + 0.8885080814361572, + -0.9999779462814331, + -0.894483745098114, + -0.9573289752006531, + 0.9918531775474548, + -0.6303664445877075, + 0.9998790621757507, + -0.6389135718345642 + ], + "type": "float32" + } + }, + { "name": "tanh float32 1D tensor", "inputs": { "x": { diff --git a/tests/wpt/tests/webnn/resources/test_data/transpose.json b/tests/wpt/tests/webnn/resources/test_data/transpose.json index 03092031d9c..f7e6a7d2dd2 100644 --- a/tests/wpt/tests/webnn/resources/test_data/transpose.json +++ b/tests/wpt/tests/webnn/resources/test_data/transpose.json @@ -1,6 +1,73 @@ { "tests": [ { + "name": "transpose float32 1D constant tensor default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -45.67443169971317, + 53.45924798828125, + -60.118491676622114, + 38.08174802652866, + 78.64247328659363, + -69.2532431989057, + 1.843458570865181, + 92.81028097440239, + 56.10007526080264, + 77.05838267016932, + 57.46807874077655, + -84.74308916696364, + 46.38539267170415, + -84.89764374240352, + 56.70438712681607, + -25.69514467758806, + 5.622173913750174, + -25.6628149156966, + 99.46284660658401, + -87.58919988335086, + -65.37790624507953, + -66.00990219021253, + 38.46682821671709, + 2.1999381880991393 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + -45.67443084716797, + 53.45924758911133, + -60.118492126464844, + 38.081748962402344, + 78.64247131347656, + -69.25324249267578, + 1.8434585332870483, + 92.8102798461914, + 56.100074768066406, + 77.05838012695312, + 57.46807861328125, + -84.74308776855469, + 46.38539123535156, + -84.89764404296875, + 56.70438766479492, + -25.695144653320312, + 5.62217378616333, + -25.66281509399414, + 99.46284484863281, + -87.58920288085938, + -65.3779067993164, + -66.00990295410156, + 38.466827392578125, + 2.1999382972717285 + ], + "type": "float32" + } + }, + { "name": "transpose float32 1D tensor default options", "inputs": { "input": { diff --git a/tests/wpt/tests/webnn/resources/test_data/where.json b/tests/wpt/tests/webnn/resources/test_data/where.json index ce3cda4bad3..7c55b3171ae 100644 --- a/tests/wpt/tests/webnn/resources/test_data/where.json +++ b/tests/wpt/tests/webnn/resources/test_data/where.json @@ -35,6 +35,135 @@ } }, { + "name": "where float32 1D constant tensors", + "inputs": { + "condition": { + "shape": [24], + "data": [ + 241, + 0, + 85, + 0, + 227, + 51, + 202, + 0, + 104, + 227, + 129, + 129, + 175, + 134, + 130, + 140, + 103, + 46, + 158, + 17, + 0, + 41, + 94, + 0 + ], + "type": "uint8", + "constant": true + }, + "trueValues": { + "shape": [24], + "data": [ + 70.27151489257812, + 89.99047088623047, + -1.5351932048797607, + -83.77035522460938, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + -83.15333557128906, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + -10.8577880859375, + -23.302522659301758, + 30.851404190063477, + -58.82704544067383 + ], + "type": "float32", + "constant": true + }, + "falseValues": { + "shape": [24], + "data": [ + 90.44255065917969, + 66.7642593383789, + -39.82423782348633, + -21.683168411254883, + -67.3449478149414, + -46.46003341674805, + -55.907073974609375, + 65.5730209350586, + 35.14354705810547, + 11.960981369018555, + 76.65287780761719, + 60.741416931152344, + -93.93305206298828, + -30.397233963012695, + 34.315250396728516, + 7.7088470458984375, + -82.2353286743164, + 91.12223052978516, + 22.937334060668945, + 74.97810363769531, + 18.877336502075195, + 62.31299591064453, + 48.867103576660156, + -75.41789245605469 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 70.27151489257812, + 66.7642593383789, + -1.5351932048797607, + -21.683168411254883, + 29.59670639038086, + -37.10446548461914, + -6.663239002227783, + 65.5730209350586, + -90.47624206542969, + -45.470706939697266, + 50.38861083984375, + 46.510799407958984, + 47.503013610839844, + -21.95842933654785, + 42.89878463745117, + -76.8262710571289, + 67.0030746459961, + 40.09717559814453, + -29.081029891967773, + -12.19106674194336, + 18.877336502075195, + -23.302522659301758, + 30.851404190063477, + -75.41789245605469 + ], + "type": "float32" + } + }, + { "name": "where float32 1D tensors", "inputs": { "condition": { diff --git a/tests/wpt/tests/webnn/resources/utils.js b/tests/wpt/tests/webnn/resources/utils.js index 0e2687ec22b..955e01fb949 100644 --- a/tests/wpt/tests/webnn/resources/utils.js +++ b/tests/wpt/tests/webnn/resources/utils.js @@ -327,9 +327,11 @@ const PrecisionMetrics = { // End Element-wise unary operations elu: {ULP: {float32: 18, float16: 18}}, expand: {ULP: {float32: 0, float16: 0}}, + gather: {ULP: {float32: 0, float16: 0}}, gemm: {ULP: {float32: getGemmPrecisionTolerance, float16: getGemmPrecisionTolerance}}, hardSigmoid: {ULP: {float32: 2, float16: 2}}, hardSwish: {ULP: {float32: 4, float16: 4}}, + layerNormalization: {ATOL: {float32: 1/1024, float16: 1/512}}, leakyRelu: {ULP: {float32: 1, float16: 1}}, linear: {ULP: {float32: 2, float16: 2}}, matmul: {ULP: {float32: getMatmulPrecisionTolerance, float16: getMatmulPrecisionTolerance}}, @@ -359,7 +361,6 @@ const PrecisionMetrics = { softplus: {ULP: {float32: 18, float16: 18}}, softsign: {ULP: {float32: 3, float16: 3}}, split: {ULP: {float32: 0, float16: 0}}, - squeeze: {ULP: {float32: 0, float16: 0}}, tanh: {ATOL: {float32: 1/1024, float16: 1/512}}, transpose: {ULP: {float32: 0, float16: 0}}, where: {ULP: {float32: 0, float16: 0}}, @@ -526,7 +527,13 @@ const createConstantOperand = (builder, resources) => { const createSingleInputOperand = (builder, resources, inputOperandName) => { inputOperandName = inputOperandName ? inputOperandName : Object.keys(resources.inputs)[0]; const inputResources = resources.inputs[inputOperandName]; - return builder.input(inputOperandName, {dataType: inputResources.type, type: inputResources.type, dimensions: inputResources.shape}); + let operand; + if (resources.inputs[inputOperandName].hasOwnProperty('constant') && resources.inputs[inputOperandName]['constant']) { + operand = createConstantOperand(builder, resources.inputs[inputOperandName]); + } else { + operand = builder.input(inputOperandName, {dataType: inputResources.type, type: inputResources.type, dimensions: inputResources.shape}); + } + return operand; }; /** @@ -539,12 +546,7 @@ const createMultiInputOperands = (builder, resources) => { let inputOperands = []; const inputOperandNameArray = Object.keys(resources.inputs); inputOperandNameArray.forEach(inputOperandName => { - let operand; - if (resources.inputs[inputOperandName].hasOwnProperty('constant') && resources.inputs[inputOperandName]['constant']) { - operand = createConstantOperand(builder, resources.inputs[inputOperandName]); - } else { - operand = createSingleInputOperand(builder, resources, inputOperandName); - } + const operand = createSingleInputOperand(builder, resources, inputOperandName); inputOperands.push(operand); }); return inputOperands; @@ -608,8 +610,14 @@ const buildConcat = (operationName, builder, resources) => { // MLOperand concat(sequence<MLOperand> inputs, unsigned long axis); const namedOutputOperand = {}; const inputOperands = []; + let operand; for (let input of resources.inputs) { - inputOperands.push(builder.input(input.name, {dataType: input.type, type: input.type, dimensions: input.shape})); + if (input.hasOwnProperty('constant') && input['constant']) { + operand = createConstantOperand(builder, input); + } else { + operand = builder.input(input.name, {dataType: input.type, type: input.type, dimensions: input.shape}); + } + inputOperands.push(operand); } // invoke builder.concat() namedOutputOperand[resources.expected.name] = builder[operationName](inputOperands, resources.axis); @@ -664,6 +672,22 @@ const buildGemm = (operationName, builder, resources) => { return namedOutputOperand; }; +const buildLayerNorm = (operationName, builder, resources) => { + // MLOperand layerNormalization(MLOperand input, optional MLLayerNormalizationOptions options = {}); + const namedOutputOperand = {}; + const inputOperand = createSingleInputOperand(builder, resources); + const layerNormOptions = {...resources.options}; + if (layerNormOptions.scale) { + layerNormOptions.scale = createConstantOperand(builder, layerNormOptions.scale); + } + if (layerNormOptions.bias) { + layerNormOptions.bias = createConstantOperand(builder, layerNormOptions.bias); + } + // invoke builder.layerNormalization() + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, layerNormOptions); + return namedOutputOperand; +}; + const buildPad = (operationName, builder, resources) => { // MLOperand pad(MLOperand input, sequence<unsigned long> beginningPadding, sequence<unsigned long> endingPadding, optional MLPadOptions options = {}); const namedOutputOperand = {}; diff --git a/tests/wpt/tests/webrtc-encoded-transform/META.yml b/tests/wpt/tests/webrtc-encoded-transform/META.yml index 6365c8d16af..8947732b6fb 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/META.yml +++ b/tests/wpt/tests/webrtc-encoded-transform/META.yml @@ -1 +1,6 @@ spec: https://w3c.github.io/webrtc-encoded-transform/ +suggested_reviewers: + - alvestrand + - guidou + - youennf + - jan-ivar diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedAudioFrame-clone.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-clone.https.html index 83cf642d77f..9f07713d443 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedAudioFrame-clone.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-clone.https.html @@ -5,9 +5,9 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> -<script src="../service-workers/service-worker/resources/test-helpers.sub.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> +<script src="../../service-workers/service-worker/resources/test-helpers.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedAudioFrame-receive-cloned.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-receive-cloned.https.html index 66ce0bbcefb..3077632a3b4 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedAudioFrame-receive-cloned.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-receive-cloned.https.html @@ -5,9 +5,9 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> -<script src="../service-workers/service-worker/resources/test-helpers.sub.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> +<script src="../../service-workers/service-worker/resources/test-helpers.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedAudioFrame-send-incoming.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-send-incoming.https.html index 1e2bbc95bd1..02f3b17e0c2 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedAudioFrame-send-incoming.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-send-incoming.https.html @@ -5,9 +5,9 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> -<script src="../service-workers/service-worker/resources/test-helpers.sub.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> +<script src="../../service-workers/service-worker/resources/test-helpers.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedAudioFrame-serviceworker-failure.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-serviceworker-failure.https.html index d6d8578dbdf..b2f5f5e94c8 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedAudioFrame-serviceworker-failure.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedAudioFrame-serviceworker-failure.https.html @@ -6,9 +6,9 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> -<script src="../service-workers/service-worker/resources/test-helpers.sub.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> +<script src="../../service-workers/service-worker/resources/test-helpers.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedVideoFrame-clone.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedVideoFrame-clone.https.html index 0c51df25bbb..324c44f1934 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedVideoFrame-clone.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedVideoFrame-clone.https.html @@ -5,9 +5,9 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> -<script src="../service-workers/service-worker/resources/test-helpers.sub.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> +<script src="../../service-workers/service-worker/resources/test-helpers.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedVideoFrame-serviceworker-failure.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedVideoFrame-serviceworker-failure.https.html index b95c673f41e..e725e5ce12c 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCEncodedVideoFrame-serviceworker-failure.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCEncodedVideoFrame-serviceworker-failure.https.html @@ -6,9 +6,9 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> -<script src="../service-workers/service-worker/resources/test-helpers.sub.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> +<script src="../../service-workers/service-worker/resources/test-helpers.sub.js"></script> <script> "use strict"; diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-audio.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-audio.https.html index 23af1c2b636..83d284146a0 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-audio.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-audio.https.html @@ -6,8 +6,8 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> <script src="./RTCPeerConnection-insertable-streams.js"></script> </head> <body> diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-errors.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-errors.https.html index d36df8227bf..a0c68c400a2 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-errors.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-errors.https.html @@ -6,8 +6,8 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> <script src="./RTCPeerConnection-insertable-streams.js"></script> </head> <body> diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-simulcast.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-simulcast.https.html index cb33e458d18..834644674e8 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-simulcast.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-simulcast.https.html @@ -5,10 +5,10 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> -<script src="../webrtc/third_party/sdp/sdp.js"></script> -<script src="../webrtc/simulcast/simulcast.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> +<script src="../../webrtc/third_party/sdp/sdp.js"></script> +<script src="../../webrtc/simulcast/simulcast.js"></script> <script> // Test based on wpt/webrtc/simulcast/basic.https.html promise_test(async t => { diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-video-frames.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-video-frames.https.html index d7fb0888468..d3db116ff60 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-video-frames.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-video-frames.https.html @@ -6,8 +6,8 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> <script src="./RTCPeerConnection-insertable-streams.js"></script> </head> <body> diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-video.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-video.https.html index aa0ff474e97..5334b8d1f94 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-video.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-video.https.html @@ -6,8 +6,8 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> <script src="./RTCPeerConnection-insertable-streams.js"></script> </head> <body> diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-worker.https.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-worker.https.html index cb31057cac9..94943f8b696 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams-worker.https.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams-worker.https.html @@ -6,8 +6,8 @@ <script src="/resources/testharnessreport.js"></script> <script src=/resources/testdriver.js></script> <script src=/resources/testdriver-vendor.js></script> -<script src='../mediacapture-streams/permission-helper.js'></script> -<script src="../webrtc/RTCPeerConnection-helper.js"></script> +<script src='../../mediacapture-streams/permission-helper.js'></script> +<script src="../../webrtc/RTCPeerConnection-helper.js"></script> <script src="./RTCPeerConnection-insertable-streams.js"></script> </head> <body> diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams.js b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams.js index 0bf820acde4..0bf820acde4 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-insertable-streams.js +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-insertable-streams.js diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-sender-worker-single-frame.js b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-sender-worker-single-frame.js index c943dafe5b1..c943dafe5b1 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-sender-worker-single-frame.js +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-sender-worker-single-frame.js diff --git a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-worker-transform.js b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-worker-transform.js index 36e3949e4d5..36e3949e4d5 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/RTCPeerConnection-worker-transform.js +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/RTCPeerConnection-worker-transform.js diff --git a/tests/wpt/tests/webrtc-encoded-transform/resources/blank.html b/tests/wpt/tests/webrtc-encoded-transform/tentative/resources/blank.html index a3c3a4689a6..a3c3a4689a6 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/resources/blank.html +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/resources/blank.html diff --git a/tests/wpt/tests/webrtc-encoded-transform/resources/serviceworker-failure.js b/tests/wpt/tests/webrtc-encoded-transform/tentative/resources/serviceworker-failure.js index e7aa8e11be3..e7aa8e11be3 100644 --- a/tests/wpt/tests/webrtc-encoded-transform/resources/serviceworker-failure.js +++ b/tests/wpt/tests/webrtc-encoded-transform/tentative/resources/serviceworker-failure.js diff --git a/tests/wpt/tests/webrtc/RTCRtpSender-setParameters-keyFrame.html b/tests/wpt/tests/webrtc/RTCRtpSender-setParameters-keyFrame.html new file mode 100644 index 00000000000..c78dfa141c1 --- /dev/null +++ b/tests/wpt/tests/webrtc/RTCRtpSender-setParameters-keyFrame.html @@ -0,0 +1,94 @@ +<!doctype html> +<meta charset=utf-8> +<meta name="timeout" content="long"> +<title>RTCRtpSender.prototype.setParameters for generating keyFrames</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="RTCPeerConnection-helper.js"></script> +<script> +'use strict'; + +// https://w3c.github.io/webrtc-extensions/#rtcrtpsender-setparameters-keyframe + +async function waitForKeyFrameCount(t, pc, spatialLayer, minimumKeyFrames) { + // return after 5 seconds. + const startTime = performance.now(); + while (true) { + const report = await pc.getStats(); + const stats = [...report.values()].find(({type, rid}) => type === 'outbound-rtp' && rid === spatialLayer); + if (stats && stats.keyFramesEncoded >= minimumKeyFrames) { + return stats; + } + await new Promise(r => t.step_timeout(r, 100)); + if (performance.now() > startTime + 5000) { + break; + } + } +} + +promise_test(async t => { + const pc1 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + const pc2 = new RTCPeerConnection(); + t.add_cleanup(() => pc2.close()); + // Video must be small enough to reach a key frame of the right size immediately. + const stream = await getNoiseStream({video: {width: 320, height: 160}}); + t.add_cleanup(() => stream.getTracks().forEach(t => t.stop())); + + const sender = pc1.addTrack(stream.getTracks()[0], stream); + exchangeIceCandidates(pc1, pc2); + await exchangeOfferAnswer(pc1, pc2); + + const rid = undefined; + const first_stats = await waitForKeyFrameCount(t, pc1, rid, 1); + assert_true(!!first_stats); + sender.setParameters(sender.getParameters(), { + encodingOptions: [{keyFrame: true}], + }); + const second_stats = await waitForKeyFrameCount(t, pc1, rid, first_stats.keyFramesEncoded + 1); + assert_true(!!second_stats); + assert_greater_than(second_stats.keyFramesEncoded, first_stats.keyFramesEncoded); +}, `setParameters() second argument can be used to trigger keyFrame generation`); + +promise_test(async t => { + const pc1 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + const pc2 = new RTCPeerConnection(); + t.add_cleanup(() => pc2.close()); + // Video must be small enough to reach a key frame of the right size immediately. + const stream = await getNoiseStream({video: {width: 640, height: 360}}); + t.add_cleanup(() => stream.getTracks().forEach(t => t.stop())); + + const {sender} = pc1.addTransceiver(stream.getTracks()[0], { + streams: [stream], + sendEncodings: [{rid: 0}, {rid: 1}], + }); + exchangeIceCandidates(pc1, pc2); + await pc1.setLocalDescription(); + await pc2.setRemoteDescription(pc1.localDescription); + await pc2.setLocalDescription(); + await pc1.setRemoteDescription({type: 'answer', sdp: pc2.localDescription.sdp + + 'a=rid:0 recv\r\n' + + 'a=rid:1 recv\r\n' + + 'a=simulcast:recv 0;1\r\n' + }); + + const first_stats_l0 = await waitForKeyFrameCount(t, pc1, "0", 1); + assert_true(!!first_stats_l0); + const first_stats_l1 = await waitForKeyFrameCount(t, pc1, "1", 1); + assert_true(!!first_stats_l1); + + // Generate a keyframe on the second layer. This may, depending on the encoder, force + // a key frame on the first layer as well. + sender.setParameters(sender.getParameters(), { + encodingOptions: [{keyFrame: false}, {keyFrame: true}], + }); + const second_stats_l1 = await waitForKeyFrameCount(t, pc1, "1", first_stats_l1.keyFramesEncoded + 1); + assert_true(!!second_stats_l1); + assert_greater_than(second_stats_l1.keyFramesEncoded, first_stats_l1.keyFramesEncoded); + + const second_stats_l0 = await waitForKeyFrameCount(t, pc1, "0", first_stats_l0.keyFramesEncoded); + assert_true(!!second_stats_l0); + assert_greater_than_equal(second_stats_l0.keyFramesEncoded, first_stats_l0.keyFramesEncoded); +}, `setParameters() second argument can be used to trigger keyFrame generation (simulcast)`); +</script> diff --git a/tests/wpt/tests/webrtc/legacy/munge-dont.html b/tests/wpt/tests/webrtc/legacy/munge-dont.html new file mode 100644 index 00000000000..b5f0a4cb63b --- /dev/null +++ b/tests/wpt/tests/webrtc/legacy/munge-dont.html @@ -0,0 +1,88 @@ +<!doctype html> +<meta charset=utf-8> +<meta name="timeout" content="long"> +<title>SDP munging is a bad idea</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +'use strict'; + +const sdp = `v=0 +o=- 0 3 IN IP4 127.0.0.1 +s=- +t=0 0 +m=video 9 UDP/TLS/RTP/SAVPF 100 +c=IN IP4 0.0.0.0 +a=rtcp-mux +a=sendonly +a=mid:video +a=rtpmap:100 VP8/90000 +a=fmtp:100 max-fr=30;max-fs=3600 +a=fingerprint:sha-256 A7:24:72:CA:6E:02:55:39:BA:66:DF:6E:CC:4C:D8:B0:1A:BF:1A:56:65:7D:F4:03:AD:7E:77:43:2A:29:EC:93 +a=ice-ufrag:ETEn +a=ice-pwd:OtSK0WpNtpUjkY4+86js7Z/l +`; +const candidateString = 'candidate:1905690388 1 udp 2113937151 192.168.0.1 58041 typ host generation 0 ufrag thC8'; + +// See https://bugs.chromium.org/p/chromium/issues/detail?id=662898 +// and https://bugs.chromium.org/p/chromium/issues/detail?id=823036 +// for why neither of these is feasible to enforce. + +// Note that this does not restrict creating a +// new RTCSessionDescription with a modified copy. +test(() => { + const desc = new RTCSessionDescription({ + type: 'offer', + sdp, + }); + assert_throws_js(TypeError, () => { + desc.type = 'answer'; + }); +}, 'RTCSessionDescription.type is read-only'); + +test(() => { + const desc = new RTCSessionDescription({ + type: 'offer', + sdp, + }); + assert_throws_js(TypeError, () => { + desc.sdp += 'a=dont-modify-me\r\n'; + }); +}, 'RTCSessionDescription.sdp is read-only'); + +test(() => { + const candidate = new RTCIceCandidate({ + sdpMid: '0', + candidate: candidateString, + }); + assert_throws_js(TypeError, () => { + candidate.candidate += ' myattribute value'; + }); +}, 'RTCIceCandidate.candidate is read-only'); + +// https://w3c.github.io/webrtc-pc/#dom-peerconnection-setlocaldescription +// If type is "offer", and sdp is not the empty string and not equal to +// connection.[[LastCreatedOffer]], then return a promise rejected with a +// newly created InvalidModificationError and abort these steps. +promise_test(async t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + pc.addTransceiver('audio'); + const offer = await pc.createOffer(); + return promise_rejects_dom(t, 'InvalidModificationError', + pc.setLocalDescription({type: 'offer', sdp: offer.sdp + 'a=munging-is-not-good\r\n'})); +}, 'Rejects SDP munging between createOffer and setLocalDescription'); + +// If type is "answer" or "pranswer", and sdp is not the empty string and not equal to +// connection.[[LastCreatedAnswer]], then return a promise rejected with a +// newly created InvalidModificationError and abort these steps. +promise_test(async t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + await pc.setRemoteDescription({type: 'offer', sdp}); + + const answer = await pc.createAnswer(); + return promise_rejects_dom(t, 'InvalidModificationError', + pc.setLocalDescription({type: 'answer', sdp: answer.sdp + 'a=munging-is-not-good\r\n'})); +}, 'Rejects SDP munging between createAnswer and setLocalDescription'); +</script> diff --git a/tests/wpt/tests/webrtc/protocol/sdes-dont-dont-dont.html b/tests/wpt/tests/webrtc/protocol/sdes-dont-dont-dont.html index e938c84c8bf..dcf7ad1b546 100644 --- a/tests/wpt/tests/webrtc/protocol/sdes-dont-dont-dont.html +++ b/tests/wpt/tests/webrtc/protocol/sdes-dont-dont-dont.html @@ -37,19 +37,13 @@ promise_test(async t => { pc.addTransceiver('audio'); const offer = await pc.createOffer(); assert_false(offer.sdp.includes('\na=crypto:')); -}, 'does not create offers with SDES'); +}, 'Does not create offers with SDES'); -promise_test(async t => { +promise_test(t => { const pc = new RTCPeerConnection(); t.add_cleanup(() => pc.close()); - try { - await pc.setRemoteDescription({type: 'offer', sdp}); - assert_unreached("Must not accept SDP without fingerprint"); - } catch (e) { - // TODO: which error is correct? See - // https://github.com/w3c/webrtc-pc/issues/2672 - assert_true(['OperationError', 'InvalidAccessError'].includes(e.name)); - } + return promise_rejects_dom(t, 'InvalidAccessError', + pc.setRemoteDescription({type: 'offer', sdp})); }, 'rejects a remote offer that only includes SDES and no DTLS fingerprint'); </script> |