diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2023-04-23 01:33:06 +0000 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2023-04-23 01:36:19 +0000 |
commit | 40def0914ad78ed6bd4222b7897e5dcfcfa2608f (patch) | |
tree | 2ea49300474eb55a42970880d0921ca5b8fe5171 /tests | |
parent | 9acb9cc5cf21d14709355a3c75af7202e9301bd5 (diff) | |
download | servo-40def0914ad78ed6bd4222b7897e5dcfcfa2608f.tar.gz servo-40def0914ad78ed6bd4222b7897e5dcfcfa2608f.zip |
Update web-platform-tests to revision b'a3cb53d786edfd9106825e312866624150382075'
Diffstat (limited to 'tests')
549 files changed, 16005 insertions, 1819 deletions
diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini deleted file mode 100644 index 33fc78f48d9..00000000000 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini +++ /dev/null @@ -1,7 +0,0 @@ -[url-charset.window.html] - expected: TIMEOUT - [Blob charset should override any auto-detected charset.] - expected: TIMEOUT - - [Blob charset should override <meta charset>.] - expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-001.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-001.html.ini deleted file mode 100644 index 0842d0b5727..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-001.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[hit-test-floats-001.html] - [hit-test-floats-001] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/compositing/isolation/animation/isolation-no-interpolation.html.ini b/tests/wpt/metadata-layout-2020/css/compositing/isolation/animation/isolation-no-interpolation.html.ini new file mode 100644 index 00000000000..b5a1c83b7a5 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/compositing/isolation/animation/isolation-no-interpolation.html.ini @@ -0,0 +1,84 @@ +[isolation-no-interpolation.html] + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (-0.3) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (0) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (0.3) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-align/animation/justify-no-interpolation.html.ini b/tests/wpt/metadata-layout-2020/css/css-align/animation/justify-no-interpolation.html.ini new file mode 100644 index 00000000000..a7fe12e3e2d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-align/animation/justify-no-interpolation.html.ini @@ -0,0 +1,168 @@ +[justify-no-interpolation.html] + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (-0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (0) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (-0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (0) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-end-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-end-computed.html.ini index 26533189bd0..339d7aeea2e 100644 --- a/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-end-computed.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-end-computed.html.ini @@ -70,3 +70,12 @@ [Property animation-range-end value 'exit'] expected: FAIL + + [Property animation-range-end value '0'] + expected: FAIL + + [Property animation-range-end value '120%'] + expected: FAIL + + [Property animation-range-end value '120px'] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-end-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-end-valid.html.ini index 722fba4303e..a95b4fe69ba 100644 --- a/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-end-valid.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-end-valid.html.ini @@ -61,3 +61,12 @@ [e.style['animation-range-end'\] = "exit" should set the property value] expected: FAIL + + [e.style['animation-range-end'\] = "0" should set the property value] + expected: FAIL + + [e.style['animation-range-end'\] = "120%" should set the property value] + expected: FAIL + + [e.style['animation-range-end'\] = "120px" should set the property value] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-shorthand.html.ini b/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-shorthand.html.ini index a7b12b842bc..8107697e5d2 100644 --- a/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-shorthand.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-shorthand.html.ini @@ -265,3 +265,51 @@ [e.style['animation-range'\] = "exit calc(10% + 50px)" should not set unrelated longhands] expected: FAIL + + [e.style['animation-range'\] = "50% exit 50%" should set the property value] + expected: FAIL + + [e.style['animation-range'\] = "normal 100px" should set the property value] + expected: FAIL + + [e.style['animation-range'\] = "100px" should set the property value] + expected: FAIL + + [e.style['animation-range'\] = "100px normal" should set the property value] + expected: FAIL + + [e.style['animation-range'\] = "10% normal" should set the property value] + expected: FAIL + + [Property animation-range value '10em exit 20em'] + expected: FAIL + + [Property animation-range value 'normal 100px'] + expected: FAIL + + [Property animation-range value '100px'] + expected: FAIL + + [Property animation-range value '100px normal'] + expected: FAIL + + [Property animation-range value '10% normal'] + expected: FAIL + + [e.style['animation-range'\] = "100px" should set animation-range-end] + expected: FAIL + + [e.style['animation-range'\] = "100px" should set animation-range-start] + expected: FAIL + + [e.style['animation-range'\] = "100px" should not set unrelated longhands] + expected: FAIL + + [e.style['animation-range'\] = "10%" should set animation-range-end] + expected: FAIL + + [e.style['animation-range'\] = "10%" should set animation-range-start] + expected: FAIL + + [e.style['animation-range'\] = "10%" should not set unrelated longhands] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-start-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-start-computed.html.ini index 0fa5a9fd1a9..8d4c6c84e6f 100644 --- a/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-start-computed.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-start-computed.html.ini @@ -70,3 +70,12 @@ [Property animation-range-start value 'exit'] expected: FAIL + + [Property animation-range-start value '0'] + expected: FAIL + + [Property animation-range-start value '120%'] + expected: FAIL + + [Property animation-range-start value '120px'] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-start-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-start-valid.html.ini index 63976a1c2b5..227b1b6153d 100644 --- a/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-start-valid.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-animations/parsing/animation-range-start-valid.html.ini @@ -61,3 +61,12 @@ [e.style['animation-range-start'\] = "exit" should set the property value] expected: FAIL + + [e.style['animation-range-start'\] = "0" should set the property value] + expected: FAIL + + [e.style['animation-range-start'\] = "120%" should set the property value] + expected: FAIL + + [e.style['animation-range-start'\] = "120px" should set the property value] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-images/animation/image-no-interpolation.html.ini b/tests/wpt/metadata-layout-2020/css/css-images/animation/image-no-interpolation.html.ini new file mode 100644 index 00000000000..99eaa1f1ad0 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-images/animation/image-no-interpolation.html.ini @@ -0,0 +1,114 @@ +[image-no-interpolation.html] + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (-0.3) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (0) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (0.3) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-rendering> from [initial\] to [pixelated\] at (-0.3) should be [pixelated\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-rendering> from [initial\] to [pixelated\] at (0) should be [pixelated\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-rendering> from [initial\] to [pixelated\] at (0.3) should be [pixelated\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (0.5) should be [pixelated\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (0.6) should be [pixelated\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (1) should be [pixelated\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (1.5) should be [pixelated\]] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/object-position-interpolation.html.ini b/tests/wpt/metadata-layout-2020/css/css-images/animation/object-position-interpolation.html.ini index bba280ebef4..bba280ebef4 100644 --- a/tests/wpt/metadata/css/css-images/object-position-interpolation.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-images/animation/object-position-interpolation.html.ini diff --git a/tests/wpt/metadata/css/css-images/object-view-box-interpolation.html.ini b/tests/wpt/metadata-layout-2020/css/css-images/animation/object-view-box-interpolation.html.ini index f2b138b2dcd..f2b138b2dcd 100644 --- a/tests/wpt/metadata/css/css-images/object-view-box-interpolation.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-images/animation/object-view-box-interpolation.html.ini diff --git a/tests/wpt/metadata-layout-2020/css/css-text/animations/hyphen-no-interpolation.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/animations/hyphen-no-interpolation.html.ini new file mode 100644 index 00000000000..8002dbb452e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/animations/hyphen-no-interpolation.html.ini @@ -0,0 +1,252 @@ +[hyphen-no-interpolation.html] + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (-0.3) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (0) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (0.3) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (-0.3) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (0) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.3) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (-0.3) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (0) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (0.3) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/animations/line-break-no-interpolation.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/animations/line-break-no-interpolation.html.ini new file mode 100644 index 00000000000..d883f52a121 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/animations/line-break-no-interpolation.html.ini @@ -0,0 +1,84 @@ +[line-break-no-interpolation.html] + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (-0.3) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (0) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (0.3) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-002.html.ini index 17c3b71eca7..56b0fa56d4b 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-002.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-002.html.ini @@ -4,27 +4,3 @@ [vertical-align vertical(keyword) / events] expected: FAIL - - [margin-bottom percentage(%) / values] - expected: FAIL - - [margin-left percentage(%) / values] - expected: FAIL - - [margin-right percentage(%) / values] - expected: FAIL - - [margin-top percentage(%) / values] - expected: FAIL - - [padding-bottom percentage(%) / values] - expected: FAIL - - [padding-left percentage(%) / values] - expected: FAIL - - [padding-right percentage(%) / values] - expected: FAIL - - [padding-top percentage(%) / values] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-001.html.ini index 719b9b6ff15..14389310273 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-001.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-inherit-001.html.ini @@ -86,129 +86,6 @@ [text-shadow shadow(shadow) / events] expected: FAIL - [background-color color(rgba) / events] - expected: FAIL - - [border-top-width length(pt) / events] - expected: FAIL - - [border-top-width length(pc) / events] - expected: FAIL - - [border-top-width length(px) / events] - expected: FAIL - - [border-top-width length(em) / events] - expected: FAIL - - [border-top-width length(ex) / events] - expected: FAIL - - [border-top-width length(mm) / events] - expected: FAIL - - [border-top-width length(cm) / events] - expected: FAIL - - [border-top-width length(in) / events] - expected: FAIL - - [border-right-width length(pt) / events] - expected: FAIL - - [border-right-width length(pc) / events] - expected: FAIL - - [border-right-width length(px) / events] - expected: FAIL - - [border-right-width length(em) / events] - expected: FAIL - - [border-right-width length(ex) / events] - expected: FAIL - - [border-right-width length(mm) / events] - expected: FAIL - - [border-right-width length(cm) / events] - expected: FAIL - - [border-right-width length(in) / events] - expected: FAIL - - [border-bottom-width length(pt) / events] - expected: FAIL - - [border-bottom-width length(pc) / events] - expected: FAIL - - [border-bottom-width length(px) / events] - expected: FAIL - - [border-bottom-width length(em) / events] - expected: FAIL - - [border-bottom-width length(ex) / events] - expected: FAIL - - [border-bottom-width length(mm) / events] - expected: FAIL - - [border-bottom-width length(cm) / events] - expected: FAIL - - [border-bottom-width length(in) / events] - expected: FAIL - - [border-left-width length(pt) / events] - expected: FAIL - - [border-left-width length(pc) / events] - expected: FAIL - - [border-left-width length(px) / events] - expected: FAIL - - [border-left-width length(em) / events] - expected: FAIL - - [border-left-width length(ex) / events] - expected: FAIL - - [border-left-width length(mm) / events] - expected: FAIL - - [border-left-width length(cm) / events] - expected: FAIL - - [border-left-width length(in) / events] - expected: FAIL - - [border-top-color color(rgba) / events] - expected: FAIL - - [border-right-color color(rgba) / events] - expected: FAIL - - [border-bottom-color color(rgba) / events] - expected: FAIL - - [border-left-color color(rgba) / events] - expected: FAIL - - [padding-bottom length(pt) / events] - expected: FAIL - - [padding-bottom length(pc) / events] - expected: FAIL - - [padding-bottom length(px) / events] - expected: FAIL - - [padding-bottom length(em) / events] - expected: FAIL - [text-indent length(pt) / values] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini index 80ed711305d..cf67b5d03dd 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini @@ -1,4 +1,3 @@ [elementFromPoint-dynamic-anon-box.html] - expected: CRASH [Link should be clickable after hiding a scrollbox with an anonymous table inside] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-visibility-hidden-resizer.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-visibility-hidden-resizer.html.ini new file mode 100644 index 00000000000..a6bca7ac372 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-visibility-hidden-resizer.html.ini @@ -0,0 +1,3 @@ +[elementFromPoint-visibility-hidden-resizer.html] + [elementFromPoint on resizer area of an element with visibility:hidden] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini index 1a06450c5c1..1bf6ea475bf 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini @@ -14,8 +14,5 @@ [test some point of the element: bottom right corner] expected: FAIL - [test some point of the element: top left corner] - expected: FAIL - [test the top of layer] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/fetch/api/basic/keepalive.any.js.ini b/tests/wpt/metadata-layout-2020/fetch/api/basic/keepalive.any.js.ini index 4c1c78640bb..e9ab91fc80e 100644 --- a/tests/wpt/metadata-layout-2020/fetch/api/basic/keepalive.any.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/api/basic/keepalive.any.js.ini @@ -1,4 +1,3 @@ [keepalive.any.html] - expected: TIMEOUT [keepalive in onunload in nested frame in another window] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/fetch/api/body/mime-type.any.js.ini b/tests/wpt/metadata-layout-2020/fetch/api/body/mime-type.any.js.ini index 9df4327e18f..f108827d2ea 100644 --- a/tests/wpt/metadata-layout-2020/fetch/api/body/mime-type.any.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/api/body/mime-type.any.js.ini @@ -1,39 +1,82 @@ [mime-type.any.html] - [Request: overriding explicit Content-Type] - expected: FAIL + expected: TIMEOUT + [Response: MIME type for Blob from empty body] + expected: TIMEOUT - [Response: setting missing Content-Type] - expected: FAIL + [Request: MIME type for Blob from empty body with Content-Type] + expected: NOTRUN - [Response: overriding explicit Content-Type] - expected: FAIL + [Response: MIME type for Blob from empty body with Content-Type] + expected: NOTRUN - [Request: setting missing Content-Type] - expected: FAIL + [Request: MIME type for Blob] + expected: NOTRUN - [Response: removing implicit Content-Type] - expected: FAIL + [Response: MIME type for Blob] + expected: NOTRUN - [Request: removing implicit Content-Type] - expected: FAIL + [Request: MIME type for Blob with non-empty type] + expected: NOTRUN + + [Response: MIME type for Blob with non-empty type] + expected: NOTRUN + + [Request: Extract a MIME type with clone] + expected: NOTRUN + + [Response: Extract a MIME type with clone] + expected: NOTRUN + + [Request: Content-Type in headers wins Blob"s type] + expected: NOTRUN + + [Response: Content-Type in headers wins Blob"s type] + expected: NOTRUN + + [Request: setting missing Content-Type in headers and it wins Blob"s type] + expected: NOTRUN + + [Response: setting missing Content-Type in headers and it wins Blob"s type] + expected: NOTRUN [mime-type.any.worker.html] - [Request: overriding explicit Content-Type] - expected: FAIL + expected: TIMEOUT + [Response: MIME type for Blob from empty body] + expected: TIMEOUT + + [Request: MIME type for Blob from empty body with Content-Type] + expected: NOTRUN + + [Response: MIME type for Blob from empty body with Content-Type] + expected: NOTRUN + + [Request: MIME type for Blob] + expected: NOTRUN + + [Response: MIME type for Blob] + expected: NOTRUN + + [Request: MIME type for Blob with non-empty type] + expected: NOTRUN + + [Response: MIME type for Blob with non-empty type] + expected: NOTRUN - [Response: setting missing Content-Type] - expected: FAIL + [Request: Extract a MIME type with clone] + expected: NOTRUN - [Response: overriding explicit Content-Type] - expected: FAIL + [Response: Extract a MIME type with clone] + expected: NOTRUN - [Request: setting missing Content-Type] - expected: FAIL + [Request: Content-Type in headers wins Blob"s type] + expected: NOTRUN - [Response: removing implicit Content-Type] - expected: FAIL + [Response: Content-Type in headers wins Blob"s type] + expected: NOTRUN - [Request: removing implicit Content-Type] - expected: FAIL + [Request: setting missing Content-Type in headers and it wins Blob"s type] + expected: NOTRUN + [Response: setting missing Content-Type in headers and it wins Blob"s type] + expected: NOTRUN diff --git a/tests/wpt/metadata-layout-2020/fetch/api/redirect/redirect-keepalive.any.js.ini b/tests/wpt/metadata-layout-2020/fetch/api/redirect/redirect-keepalive.any.js.ini new file mode 100644 index 00000000000..73c79c76452 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/fetch/api/redirect/redirect-keepalive.any.js.ini @@ -0,0 +1,12 @@ +[redirect-keepalive.any.html] + [[keepalive\][new window\][unload\] same-origin redirect] + expected: FAIL + + [[keepalive\][new window\][unload\] same-origin redirect + preflight] + expected: FAIL + + [[keepalive\][new window\][unload\] cross-origin redirect] + expected: FAIL + + [[keepalive\][new window\][unload\] cross-origin redirect + preflight] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/fetch/metadata/generated/css-images.sub.tentative.html.ini b/tests/wpt/metadata-layout-2020/fetch/metadata/generated/css-images.sub.tentative.html.ini index 4b5c3e26586..7b4cf2c5ae7 100644 --- a/tests/wpt/metadata-layout-2020/fetch/metadata/generated/css-images.sub.tentative.html.ini +++ b/tests/wpt/metadata-layout-2020/fetch/metadata/generated/css-images.sub.tentative.html.ini @@ -185,3 +185,6 @@ [border-image sec-fetch-site - HTTPS downgrade (header not sent)] expected: FAIL + + [background-image sec-fetch-site - HTTPS downgrade (header not sent)] + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/fetch/metadata/generated/element-img-environment-change.https.sub.html.ini b/tests/wpt/metadata-layout-2020/fetch/metadata/generated/element-img-environment-change.https.sub.html.ini index 3d6068202c8..215ff43521e 100644 --- a/tests/wpt/metadata-layout-2020/fetch/metadata/generated/element-img-environment-change.https.sub.html.ini +++ b/tests/wpt/metadata-layout-2020/fetch/metadata/generated/element-img-environment-change.https.sub.html.ini @@ -4,10 +4,10 @@ expected: FAIL [sec-fetch-site - Cross-site, no attributes] - expected: TIMEOUT + expected: FAIL [sec-fetch-site - Same site, no attributes] - expected: NOTRUN + expected: TIMEOUT [sec-fetch-site - Same-Origin -> Cross-Site -> Same-Origin redirect, no attributes] expected: NOTRUN diff --git a/tests/wpt/metadata-layout-2020/fetch/metadata/generated/element-img-environment-change.sub.html.ini b/tests/wpt/metadata-layout-2020/fetch/metadata/generated/element-img-environment-change.sub.html.ini index 3ec67be350a..3b66eaffa45 100644 --- a/tests/wpt/metadata-layout-2020/fetch/metadata/generated/element-img-environment-change.sub.html.ini +++ b/tests/wpt/metadata-layout-2020/fetch/metadata/generated/element-img-environment-change.sub.html.ini @@ -4,10 +4,10 @@ expected: FAIL [sec-fetch-site - Not sent to non-trustworthy same-site destination, no attributes] - expected: TIMEOUT + expected: FAIL [sec-fetch-site - Not sent to non-trustworthy cross-site destination, no attributes] - expected: NOTRUN + expected: TIMEOUT [sec-fetch-mode - Not sent to non-trustworthy same-origin destination, no attributes] expected: NOTRUN diff --git a/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini index 51fd557bd7f..b6aa0bab7b8 100644 --- a/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini +++ b/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini @@ -7,3 +7,6 @@ [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=''] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse-during-unload.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse-during-unload.html.ini new file mode 100644 index 00000000000..f5b7b25324f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse-during-unload.html.ini @@ -0,0 +1,4 @@ +[traverse-during-unload.html] + expected: TIMEOUT + [Traversing the history during unload] + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/html/dom/aria-element-reflection-disconnected.html.ini b/tests/wpt/metadata-layout-2020/html/dom/aria-element-reflection-disconnected.html.ini index 6181519f294..a9902efaec6 100644 --- a/tests/wpt/metadata-layout-2020/html/dom/aria-element-reflection-disconnected.html.ini +++ b/tests/wpt/metadata-layout-2020/html/dom/aria-element-reflection-disconnected.html.ini @@ -1,3 +1,9 @@ [aria-element-reflection-disconnected.html] [Element references should stay valid when content is disconnected] expected: FAIL + + [Element references should stay valid when content is disconnected (single element)] + expected: FAIL + + [Element references should stay valid when content is disconnected (element array)] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/dom/elements/global-attributes/the-anchor-attribute-001.tentative.html.ini b/tests/wpt/metadata-layout-2020/html/dom/elements/global-attributes/the-anchor-attribute-001.tentative.html.ini new file mode 100644 index 00000000000..c6d237ad786 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/dom/elements/global-attributes/the-anchor-attribute-001.tentative.html.ini @@ -0,0 +1,6 @@ +[the-anchor-attribute-001.tentative.html] + [The anchor attribute should position the target element next to its implicit anchor] + expected: FAIL + + [The element.anchorElement IDL should reflect the element pointed to by the anchor attribute] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/dom/elements/global-attributes/the-anchor-attribute-002.tentative.html.ini b/tests/wpt/metadata-layout-2020/html/dom/elements/global-attributes/the-anchor-attribute-002.tentative.html.ini new file mode 100644 index 00000000000..d8b0639bfd1 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/dom/elements/global-attributes/the-anchor-attribute-002.tentative.html.ini @@ -0,0 +1,6 @@ +[the-anchor-attribute-002.tentative.html] + [Layout should be updated when anchor attribute changes to another element] + expected: FAIL + + [Layout should be updated when anchor attribute changes to a non-existent element] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini index bbc1f35d8d9..e8872b3585b 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini @@ -1,3 +1,4 @@ [iframe_sandbox_popups_nonescaping-1.html] + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/non-active-document.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/non-active-document.html.ini index 47b45e65a1c..3cdeb8ebcbc 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/non-active-document.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/non-active-document.html.ini @@ -1,9 +1,3 @@ [non-active-document.html] [DOMParser] expected: FAIL - - [createHTMLDocument] - expected: FAIL - - [<template>] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html.ini deleted file mode 100644 index 6b64e2e1844..00000000000 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html.ini +++ /dev/null @@ -1,24 +0,0 @@ -[parse-a-sizes-attribute-standards-mode.html] - [<img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (standards mode)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (standards mode)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (standards mode)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (standards mode)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown "general-enclosed") 1px"> ref sizes="1px" (standards mode)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (standards mode)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (standards mode)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e45 50w, /images/green-16x16.png?e45 51w" sizes="(min-width:-1px) 1px, 100vw"> ref sizes="1px" (standards mode)] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html.ini deleted file mode 100644 index e68149132a6..00000000000 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-width-1000px.html.ini +++ /dev/null @@ -1,24 +0,0 @@ -[parse-a-sizes-attribute-width-1000px.html] - [<img srcset="/images/green-1x1.png?e38 50w, /images/green-16x16.png?e38 51w" sizes="(min-width:calc(0)) 1px"> ref sizes="1px" (width:1000px)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e58 50w, /images/green-16x16.png?e58 51w" sizes="(min-width:0) or (unknown-mf-name) 1px"> ref sizes="1px" (width:1000px)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (width:1000px)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e60 50w, /images/green-16x16.png?e60 51w" sizes="(min-width:0) or (min-width:-1px) 1px"> ref sizes="1px" (width:1000px)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e61 50w, /images/green-16x16.png?e61 51w" sizes="(min-width:0) or (unknown "general-enclosed") 1px"> ref sizes="1px" (width:1000px)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e62 50w, /images/green-16x16.png?e62 51w" sizes="(min-width:0) or unknown-general-enclosed(foo) 1px"> ref sizes="1px" (width:1000px)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e106 50w, /images/green-16x16.png?e106 51w" sizes="(min-width:0) or (unknown-general-enclosed !) 1px"> ref sizes="1px" (width:1000px)] - expected: FAIL - - [<img srcset="/images/green-1x1.png?e45 50w, /images/green-16x16.png?e45 51w" sizes="(min-width:-1px) 1px, 100vw"> ref sizes="1px" (width:1000px)] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/interactive-elements/the-dialog-element/dialog-overlay-re-add-during-transition.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/interactive-elements/the-dialog-element/dialog-overlay-re-add-during-transition.html.ini new file mode 100644 index 00000000000..2d29b5ffff8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/semantics/interactive-elements/the-dialog-element/dialog-overlay-re-add-during-transition.html.ini @@ -0,0 +1,2 @@ +[dialog-overlay-re-add-during-transition.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html.ini new file mode 100644 index 00000000000..7b198642090 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html.ini @@ -0,0 +1,6 @@ +[dialog-overlay.html] + [dialog computed overlay initially 'none'] + expected: FAIL + + [Opening and closing a modal dialog changes computed overlay to 'auto' and back to 'none'] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/popovers/popover-move-documents.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/popovers/popover-move-documents.html.ini new file mode 100644 index 00000000000..845b8a74add --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/semantics/popovers/popover-move-documents.html.ini @@ -0,0 +1,9 @@ +[popover-move-documents.html] + [Moving popovers between documents while showing should throw an exception.] + expected: FAIL + + [Moving popovers between documents while hiding should not throw an exception.] + expected: FAIL + + [Moving popovers between documents during light dismiss should throw an exception.] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/popovers/popover-overlay.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/popovers/popover-overlay.html.ini new file mode 100644 index 00000000000..f3930b28ce9 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/semantics/popovers/popover-overlay.html.ini @@ -0,0 +1,12 @@ +[popover-overlay.html] + [dialog.show() should not put popover dialog in top layer] + expected: FAIL + + [dialog.showModal() should put popover dialog in top layer] + expected: FAIL + + [dialog.showPopover() should put popover dialog in top layer] + expected: FAIL + + [div.showPopover() should put popover div in top layer] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/popovers/popover-target-element-disabled.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/popovers/popover-target-element-disabled.html.ini index 0273c7dae9a..fd5bb22a83f 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/popovers/popover-target-element-disabled.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/popovers/popover-target-element-disabled.html.ini @@ -22,3 +22,18 @@ [Modifying popovertarget on a button which doesn't break the chain shouldn't close any popovers.] expected: FAIL + + [Disabling popover*target buttons when popovers are open should not cause popovers to be closed.] + expected: FAIL + + [Setting the form attribute on popover*target buttons when popovers are open should not close them.] + expected: FAIL + + [Changing the input type on a popover*target button when popovers are open should not close anything.] + expected: FAIL + + [Disconnecting popover*target buttons when popovers are open should not close anything.] + expected: FAIL + + [Changing the popovertarget attribute to break the chain should not close anything.] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini index 8bcf3a07de4..6ab46a7862c 100644 --- a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini +++ b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini @@ -4,10 +4,10 @@ expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: TIMEOUT + expected: FAIL [Sanity check: this all works as expected with no promises involved] - expected: FAIL + expected: TIMEOUT [Thenable resolution] expected: FAIL @@ -16,4 +16,4 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini index eed03df37f3..b7537329068 100644 --- a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini +++ b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini @@ -1,4 +1,5 @@ [audiocontext-not-fully-active.html] + expected: TIMEOUT [frame in navigated remote-site frame] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html.ini b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html.ini new file mode 100644 index 00000000000..87d20f3bd21 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html.ini @@ -0,0 +1,10 @@ +[audioworkletnode-onerror.https.html] + expected: ERROR + [Test if |onprocessorerror| is called for an exception thrown from the processor constructor.] + expected: NOTRUN + + [Test if |onprocessorerror| is called for a transfered object that cannot be deserialized on the AudioWorkletGlobalScope.] + expected: NOTRUN + + [Test if |onprocessorerror| is called upon failure of process() method.] + expected: NOTRUN diff --git a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html.ini b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html.ini index f1af52f1bb7..03f61b657cb 100644 --- a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html.ini +++ b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html.ini @@ -41,3 +41,11 @@ [# AUDIT TASK RUNNER FINISHED: 6 out of 7 tasks were failed.] expected: FAIL + [X context.createPeriodicWave(new Float32Array(8192), new Float32Array(8192)) incorrectly threw TypeError: "context.createPeriodicWave is not a function".] + expected: FAIL + + [X new PeriodicWave(context, { real : new Float32Array(8192), imag : new Float32Array(8192) }) incorrectly threw ReferenceError: "PeriodicWave is not defined".] + expected: FAIL + + [X new PeriodicWave(context, { real : new Float32Array(8192), imag : new Float32Array(4) }) threw "ReferenceError" instead of IndexSizeError.] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/webmessaging/with-ports/017.html.ini b/tests/wpt/metadata-layout-2020/webmessaging/with-ports/017.html.ini new file mode 100644 index 00000000000..c7946fc91b4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/webmessaging/with-ports/017.html.ini @@ -0,0 +1,4 @@ +[017.html] + expected: TIMEOUT + [origin of the script that invoked the method, about:blank] + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata-layout-2020/webmessaging/without-ports/018.html.ini new file mode 100644 index 00000000000..b7b36c1d3a4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/webmessaging/without-ports/018.html.ini @@ -0,0 +1,4 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT diff --git a/tests/wpt/metadata/FileAPI/url/url-charset.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-charset.window.js.ini deleted file mode 100644 index 08ab7bd35cd..00000000000 --- a/tests/wpt/metadata/FileAPI/url/url-charset.window.js.ini +++ /dev/null @@ -1,4 +0,0 @@ -[url-charset.window.html] - expected: TIMEOUT - [Blob charset should override any auto-detected charset.] - expected: TIMEOUT diff --git a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini index cdeaf7f7080..282ab0b2525 100644 --- a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -7,7 +7,7 @@ expected: FAIL [Opening a blob URL in a new window immediately before revoking it works.] - expected: TIMEOUT + expected: FAIL [Opening a blob URL in a noopener about:blank window immediately before revoking it works.] expected: TIMEOUT diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 267e26130f0..5464660af29 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -1140,6 +1140,13 @@ {} ] ], + "chrome-bug-1429955-crash.html": [ + "bdf4002753c7d49b913dd1fd318b2bac263809da", + [ + null, + {} + ] + ], "chrome-layout-root-crash.html": [ "e3e709a240bd870250b2747c94fe96880bdf52e3", [ @@ -2262,6 +2269,13 @@ {} ] ], + "float-multicol-crash.html": [ + "a8f01db169e9dbcfc211ed2d7d97da3a72fc5425", + [ + null, + {} + ] + ], "forced-break-in-oof-in-column-balancing-nested.html": [ "02b3295444aed8cd00fbedd14b648b86b87c5f77", [ @@ -6575,6 +6589,17 @@ ] ] } + }, + "types": { + "scripted": { + "svglength-value-access-when-in-detached-document-crash.html": [ + "5bca7a804f6a1bdadf5846fc891a33d000a448b1", + [ + null, + {} + ] + ] + } } }, "web-animations": { @@ -142385,6 +142410,19 @@ ], {} ] + ], + "single-line-row-flex-fragmentation-044.html": [ + "6da4fde6ee94b6a54999148fa419b9d718df7453", + [ + null, + [ + [ + "/css/css-break/flexbox/single-line-row-flex-fragmentation-044-ref.html", + "==" + ] + ], + {} + ] ] }, "float-000.html": [ @@ -145860,6 +145898,35 @@ {} ] ], + "rounded-clipped-border.html": [ + "60f4dfd8ba64ddfa5b70b400414a31d5d24b0563", + [ + null, + [ + [ + "/css/css-break/rounded-clipped-border-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 15 + ], + [ + 0, + 900 + ] + ] + ] + ] + } + ] + ], "ruby-000.html": [ "0b4e5ea274e3e1012390e954c78dfb9bd506e25f", [ @@ -157464,7 +157531,7 @@ ] ], "pseudo-elements-002.html": [ - "96e7db40cef534a532a06f8be78575e3d65e4753", + "a44c64c70071109bca11ba0f910cb14213522c9f", [ null, [ @@ -157476,6 +157543,19 @@ {} ] ], + "pseudo-elements-002b.html": [ + "e1874e035b0784abeccfce306eaa3203b41daf37", + [ + null, + [ + [ + "/css/css-contain/container-queries/pseudo-elements-002b-ref.html", + "==" + ] + ], + {} + ] + ], "resize-while-content-visibility-hidden.html": [ "a3658f7f34fdda98b2d1198fecce3b6e1a5fef38", [ @@ -179337,7 +179417,7 @@ ] ], "font-variant-alternates-03.html": [ - "4270e2e0d3c62d87d18a45e3ed0919b07d51e973", + "1027363726771e9619a005be0d4ad125ed34fa95", [ null, [ @@ -179376,7 +179456,7 @@ ] ], "font-variant-alternates-06.html": [ - "bbeca548f6392ded819280fe55b85d976e69fe83", + "c3f315723cbbc8c7e7affe3d973c221d4571a512", [ null, [ @@ -179415,7 +179495,7 @@ ] ], "font-variant-alternates-09.html": [ - "7cc6a1a30aa12f28903ed7dab5138076f3eb19b3", + "2c67b1439e6de429e3749466ab4714898367a58c", [ null, [ @@ -179454,7 +179534,7 @@ ] ], "font-variant-alternates-12.html": [ - "12f1cc759555e81f8f6bf97952cec07d2a70fa3b", + "0f2b9d317b95a41c82f3a2d792f66c86146822fb", [ null, [ @@ -179493,7 +179573,7 @@ ] ], "font-variant-alternates-15.html": [ - "becb4d40b80aa366cb56fa3a188d1eef5992ce9f", + "58a58d3cd153cdd6e3c50fbc2484ad44c9a03ba2", [ null, [ @@ -179532,7 +179612,7 @@ ] ], "font-variant-alternates-18.html": [ - "8dfe0b8650319c2616f06ab7a9e07896c1e6aed1", + "26e1ecd0c222260114afee112e391d46481b9fc9", [ null, [ @@ -199887,7 +199967,7 @@ ] ], "clip-path-animation-filter.html": [ - "cbfa8baaa769a25ca57aaa5d6f271b26810a8bf6", + "0ba7a0021da4e41a72ffad26f32028231edb6bfd", [ null, [ @@ -199907,7 +199987,7 @@ ], [ 0, - 150 + 151 ] ] ] @@ -201383,6 +201463,19 @@ {} ] ], + "clip-path-path-003.html": [ + "af1de750c5bea5564a4f3bdffc13f61170a82853", + [ + null, + [ + [ + "/css/css-masking/clip-path/reference/green-100x100.html", + "==" + ] + ], + {} + ] + ], "clip-path-path-interpolation-001.html": [ "9b12621b9d6bbd2575ce50ddd121faf69d436423", [ @@ -279311,6 +279404,32 @@ } ] ], + "animating-new-content-subset.html": [ + "d5a342c572041f8ef30efef4cfca703636a9266f", + [ + null, + [ + [ + "/css/css-view-transitions/animating-new-content-subset-ref.html", + "==" + ] + ], + {} + ] + ], + "animating-new-content.html": [ + "9bfcb51a913ac2c7a4e6e4d5dd8a045a0987cff1", + [ + null, + [ + [ + "/css/css-view-transitions/animating-new-content-ref.html", + "==" + ] + ], + {} + ] + ], "break-inside-avoid-child.html": [ "7791f7ab4f6012daa6612c4b14f4a26415103f98", [ @@ -305927,7 +306046,7 @@ }, "filters": { "2d.filter.canvasFilterObject.dropShadow.tentative.html": [ - "712716d9f01e8384c8a616d8d832c4fcbc94b7f0", + "09eb09473d15d30bfd7faa9f20ae4044c13e122c", [ null, [ @@ -307199,7 +307318,7 @@ "offscreen": { "filters": { "2d.filter.canvasFilterObject.dropShadow.tentative.html": [ - "043265279054d6d6852626700f6692a8b2413a6c", + "55f2d2c24b5e712180a7dd78f2cc21f2e7b2dddd", [ null, [ @@ -307212,7 +307331,7 @@ ] ], "2d.filter.canvasFilterObject.dropShadow.tentative.w.html": [ - "de72f5fe3d9fa07c4a12906fc0fef2ac909ba6ed", + "633d202012c4ad6d9dcf61a9776cb375905163f0", [ null, [ @@ -311849,6 +311968,19 @@ {} ] ], + "input-date-baseline-min-height.html": [ + "86b552ab809bb77e0edee713daacab8869351941", + [ + null, + [ + [ + "/html/rendering/widgets/input-date-baseline-min-height-ref.html", + "==" + ] + ], + {} + ] + ], "input-date-baseline.html": [ "0d8f46c06421d22d9d680a83785460bfa865dc81", [ @@ -313692,6 +313824,19 @@ {} ] ], + "dialog-overlay-re-add-during-transition.html": [ + "30d104a973a600766c9670d51d32288fc04cc4e9", + [ + null, + [ + [ + "/html/semantics/interactive-elements/the-dialog-element/pass-dialog-ref.html", + "==" + ] + ], + {} + ] + ], "dialogs-with-no-backdrop.html": [ "fec4ba85874e898bd5f4ffc698b5881513346217", [ @@ -318718,6 +318863,45 @@ ], {} ] + ], + "scroll-timeline-update-reversed-animation.html": [ + "93ad6916ea7df38088093d5c82cb952ba8a65f4c", + [ + null, + [ + [ + "/scroll-animations/css/animation-update-ref.html?translate=55px&scroll=825", + "==" + ] + ], + {} + ] + ], + "view-timeline-range-update-reversed-animation.html": [ + "c7199161607162d106ba24a4815eb6f9cbbaf6e5", + [ + null, + [ + [ + "/scroll-animations/css/animation-update-ref.html?translate=60px", + "==" + ] + ], + {} + ] + ], + "view-timeline-range-update.html": [ + "e8e761d86ba14e100b00758e52f5956cf4c8e340", + [ + null, + [ + [ + "/scroll-animations/css/animation-update-ref.html?translate=40px", + "==" + ] + ], + {} + ] ] }, "scroll-timelines": { @@ -326386,6 +326570,12 @@ [] ] }, + "accessibility": { + "ReadMe.md": [ + "ecfb30b1619cdecdeaa14f39a4e2d38a571e52ca", + [] + ] + }, "accname": { "META.yml": [ "356c4b2cff6f1b32d16ff2ad410fdc5470705367", @@ -328677,7 +328867,7 @@ [] ], "reports.py": [ - "4d4c3fd5ec739e23d8a136070050e8d31733c969", + "9682a6dd24d6a2484456f7ae3c9ba14675e0c39e", [] ] } @@ -328873,7 +329063,7 @@ [] ], "bluetooth-test.js": [ - "7ad1b937e1f5d1ca4a1e20da410e969ba229227e", + "7852aadf466cbb2617c3be049c4aa05b5edee0b6", [] ], "health-thermometer-iframe.html": [ @@ -371886,6 +372076,10 @@ "single-line-row-flex-fragmentation-042-print-ref.html": [ "5f65fbaf687e6b5de87da8a223298778e03eece7", [] + ], + "single-line-row-flex-fragmentation-044-ref.html": [ + "af1c8155bd9e7000f3c77b05f7759a7e75a2c0f5", + [] ] }, "float-009-ref.html": [ @@ -372002,6 +372196,10 @@ "8c19f1cf4c6c0173b45face28d624368d365ec70", [] ], + "rounded-clipped-border-ref.html": [ + "be08126fd2c3bab356a3a4fd5ff1cc1579184662", + [] + ], "table": { "repeated-section": { "abspos-uncontained-text-ref.html": [ @@ -373092,7 +373290,11 @@ [] ], "pseudo-elements-002-ref.html": [ - "9dc6c572b303678e8f9b9f76eb3e527318a0ed81", + "da96a826cffe697475ff552aafe97d72d613e9fb", + [] + ], + "pseudo-elements-002b-ref.html": [ + "5783b77fec394dbee9fe97bfd0925ffc1043dacb", [] ], "resize-while-content-visibility-hidden-ref.html": [ @@ -388015,11 +388217,11 @@ [] ], "inline-block-list-marker-ref.html": [ - "6a36181107e81a1651d7939ebc94a525bbcc262b", + "6deadbfc9b65c7f89d8c428e1da6c75f1adc3d82", [] ], "inline-block-list-ref.html": [ - "41b8504e4df193a2e7da24de8836c7484ab697f5", + "fc5b92c9078648d362fc8e21344616b9bd5be860", [] ], "inline-list-marker-ref.html": [ @@ -402414,6 +402616,14 @@ "393943e396a0d0d7da7cdb73216e01d744e0d346", [] ], + "animating-new-content-ref.html": [ + "eae9e2c4711e455040efef37f8315b94c7663a32", + [] + ], + "animating-new-content-subset-ref.html": [ + "eee7f19529b82269d066e08582e322e30e6a308b", + [] + ], "break-inside-avoid-child-ref.html": [ "859abdfb5f259021120d3810fa3fadce8be968c5", [] @@ -405256,20 +405466,12 @@ ], "tools": { "generators": { - "README.md": [ - "9bf89de07a89719dadad60e55167c84595a410ba", - [] - ], - "gulpfile.js": [ - "f364024084dc0c24d00bc417ab252feb9f8b1418", - [] - ], - "orthogonal-parent-shrink-to-fit.ejs": [ - "043cbaf747a7931fd2798b1afd79f6d577f6183b", + "generate.py": [ + "6d54eebc0506dd19f7b664c71c5d9c190491c6e6", [] ], - "package.json": [ - "8046cf4240aa37e0a3f8d8f866efe44f68155c7e", + "template.html": [ + "74fc1852320b3a95a430c35035f3e52a29662657", [] ] } @@ -411310,6 +411512,562 @@ ] } }, + "fenced-frame": { + "default-enabled-features-allow-all.https.html.headers": [ + "d39cf98dd5c71f5777e73544886fccf9f664a01d", + [] + ], + "default-enabled-features-allow-none.https.html.headers": [ + "5d534499d74aa101116b8473b325a00d561466f1", + [] + ], + "default-enabled-features-allow-self.https.html.headers": [ + "8bfa33eb8a3965f96ea5ad38237f59cb058b2319", + [] + ], + "default-enabled-features-attribution-disabled.https.html.headers": [ + "af6d6ecb2e948689c5ceacca10ca096d20a0a7f2", + [] + ], + "default-enabled-features-unset.https.html.headers": [ + "e087474e2aaf5641518559b046745cfa38c29c71", + [] + ], + "embedder-coop-coep-blocked.https.html.headers": [ + "807872014ac4b3b1e96441bb9e47b4e92eb52ef5", + [] + ], + "embedder-require-corp.https.html.headers": [ + "8df98474b589d070992677cb0134bd47bd0509c4", + [] + ], + "resources": { + "background-fetch-inner.https.html": [ + "1bca25a957a3fe4069df838a5b7cbaa42e813f9b", + [] + ], + "background-fetch-inner.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "background-fetch-sw-inner.https.html": [ + "78e58e5bbf5e4f17ced8c264762d6a32815c6950", + [] + ], + "background-fetch-sw-inner.https.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "background-fetch-sw.js": [ + "44b7d087b574615f6af830203fa5e3a1d1e40540", + [] + ], + "background-sync-helper.js": [ + "78b69f15de722276887f97adc8767b6db88ea788", + [] + ], + "background-sync-inner.https.html": [ + "81974c803ad19be04dfaf49217977243364b88d9", + [] + ], + "background-sync-inner.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "background-sync-sw-inner.https.html": [ + "b9521a4e20add8f95b8615a83634126c4c2656fc", + [] + ], + "background-sync-sw-inner.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "background-sync-sw.js": [ + "5b0c791f0d5f2bf062e997b8ab9fee4c3010d574", + [] + ], + "badging-sw.js": [ + "5bc3c9a1907a6d2bbfb8efe80008269132739e4d", + [] + ], + "before-unload-inner.html": [ + "6d23cf88a3ce4090f8131e11928b257fec00d527", + [] + ], + "before-unload-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "check-header-referrer.py": [ + "b06fbc270475bcb307d866bad7998829fe5026fb", + [] + ], + "check-header-sec-fetch-dest.py": [ + "98231079b33c62d75ef27b8604669197a9a6dc35", + [] + ], + "content-index-sw.js": [ + "c2759d9630ea309b7ab2df65691df339a75c2d62", + [] + ], + "cookie-access.https.html": [ + "34e56811394edc292551865bea455f7c8c436712", + [] + ], + "cookie-access.https.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "create-credential-inner.https.html": [ + "5725177f21717570ebf1a78b77f0e3870c6f9965", + [] + ], + "create-credential-inner.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "create-popup.html": [ + "a6cd81ec14fe909aac89a7b8b262059d328bd889", + [] + ], + "create-popup.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "csp-fenced-frame-src-allowed-inner.html": [ + "bdb448c34734584e37b04bc83cba57e68372b24b", + [] + ], + "csp-fenced-frame-src-allowed-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "csp-fenced-frame-src-blocked-inner.html": [ + "990f5ee469eb8d06a76f1f2fe7d8abb0b199ba32", + [] + ], + "csp-fenced-frame-src-blocked-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "csp-frame-src-allowed-inner.html": [ + "bdb448c34734584e37b04bc83cba57e68372b24b", + [] + ], + "csp-frame-src-allowed-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "csp-frame-src-blocked-inner.html": [ + "eb90bb94e9ac61e33e0eb1129bbbfc97947c680a", + [] + ], + "csp-frame-src-blocked-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "csp-inner.html": [ + "99df39fdc51f2a89f2059ac47d425419cbbbc74a", + [] + ], + "csp-inner.html.headers": [ + "e89be70a43136c375292ee7edaf09d4f6f4e08ea", + [] + ], + "csp.png": [ + "53a9748ae026b183d7b8ee630c29ad84284dd83e", + [] + ], + "dangling-markup-helper.js": [ + "9e0fff2301545db9a7ca44404904c2c1e3fd98b3", + [] + ], + "default-enabled-features-helper.js": [ + "d7eb3c63befde6b2f3eb96efb8d8c44ab7a7589a", + [] + ], + "default-enabled-features-redirect.https.html": [ + "000b1eb6dd712f480054a3055b7bb4badc4741ad", + [] + ], + "default-enabled-features-redirect.https.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "dummy.html": [ + "a0cf50713ecd2e116a045a968c33446f03264aba", + [] + ], + "embeddee.html": [ + "3423be9aa4c0d1b80e1ffef21028c8fcd81dc906", + [] + ], + "embeddee.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "embedder-policy.js": [ + "8c96afafce1ea3f6907210aee43d3b5320d6b5a0", + [] + ], + "empty-worker.js": [ + "49ceb2648a93410bdd5ee53ef0e114146210741b", + [] + ], + "fedcm-get-credential-inner.https.html": [ + "f30cd77838e09cb4546b49d7b7e652018e1e443a", + [] + ], + "fedcm-get-credential-inner.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "fence-api-inner.https.html": [ + "814ea785590bd87c79cb5a028175b605929cc784", + [] + ], + "fence-api-inner.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "fenced-frame-loaded.html": [ + "0054762783994da36166c6ab2975395fa7e642f2", + [] + ], + "fenced-frame-loaded.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html": [ + "9b67be775e1485b88c06963317663a4ae8a88a49", + [] + ], + "fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "fledge-bidding-logic-with-size.js": [ + "1a22bcec3d6422e4c5d498fcb93f0a205da32bf0", + [] + ], + "fledge-bidding-logic-with-size.js.headers": [ + "776bf2987b402ebe53f8b6af69992cd641dc5e0f", + [] + ], + "fledge-bidding-logic.js": [ + "c19cc1d0337472981283e3e729c93d8f4328f2b1", + [] + ], + "fledge-bidding-logic.js.headers": [ + "776bf2987b402ebe53f8b6af69992cd641dc5e0f", + [] + ], + "fledge-decision-logic.js": [ + "dc92f5a5e1a4a0d7ba09b223c223d4ebe6c864d5", + [] + ], + "fledge-decision-logic.js.headers": [ + "776bf2987b402ebe53f8b6af69992cd641dc5e0f", + [] + ], + "ignore-child-fenced-frame-onload-event-inner.html": [ + "4fe496f29c84806d0fa41c4d23851cd4878214c6", + [] + ], + "ignore-child-fenced-frame-onload-event-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "key-value-store.py": [ + "c9fd81b2a3d26978500ef9c025cb961eba875b92", + [] + ], + "navigate-ancestor-destination.https.html": [ + "f12849c8ec625f96ae8fd404d00e2a7bbbcefdaa", + [] + ], + "navigate-ancestor-destination.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "navigate-ancestor-from-nested-fenced-frame.https.html": [ + "74800b969f772c9aecb186a29f51f3ceaef2cd16", + [] + ], + "navigate-ancestor-from-nested-fenced-frame.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "navigate-ancestor-from-nested-iframe.https.html": [ + "63a0cca8b4f2d2a0fad9fd38d811b348f0b33d07", + [] + ], + "navigate-ancestor-from-nested-iframe.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "navigate-ancestor-helper.https.html": [ + "2cd8fcf786146fa2efdf31bf8729311ee7c08a3c", + [] + ], + "navigate-ancestor-helper.https.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "navigate-ancestor-helper.js": [ + "6178ea78da49831fcf0c681ecd967839f680948a", + [] + ], + "navigate-ancestor-test-runner.https.html": [ + "d0f2e8d694a651629e3c944e71045eb3c3795884", + [] + ], + "navigate-by-name-inner.html": [ + "c7d7d6f27821cafc42471e35ece5d8fc21152ed2", + [] + ], + "navigate-by-name-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "navigate-by-name-reporting-helper.html": [ + "d3bd955697ab8548df6b49f470371b6eff4c4cce", + [] + ], + "navigate-by-name-reporting-helper.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "navigator-keyboard-layout-map-inner.html": [ + "59170c7512062a8195529210b41b9c0eabdeb2ab", + [] + ], + "navigator-keyboard-layout-map-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "navigator-keyboard-lock-inner.html": [ + "105166c7adcb94b57ccebd54f7b67fdb809fea84", + [] + ], + "navigator-keyboard-lock-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "notification-sw.js": [ + "e9b1e2b9ddff9ea8389dea8ca8f09ffe2bc5bd2e", + [] + ], + "opaque-ad-sizes-utils.js": [ + "edf8640f20a7bc0a10edba8ea5bcde014b4c28f2", + [] + ], + "payment-handler-sw.js": [ + "8b5e83cddf0e2db994ae5527f8d7d4a6e057ddac", + [] + ], + "presentation-receiver-inner.html": [ + "2e170dd91bb32b896f72d20e5e064347c6558491", + [] + ], + "presentation-receiver-inner.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "remote-context-executor.https.html": [ + "6b2f5ccc000058ce47d2f8d699de283a77d3d067", + [] + ], + "report-url.html": [ + "e0b7d0982ae384df24ec20ef53ab270d57b9c9c9", + [] + ], + "report-url.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "response-204.py": [ + "e6cf8d4ac9100aac67831686ff105fbc242aa06b", + [] + ], + "sandbox-mandatory-flags-iframe.sub.html": [ + "7ee8b7d98f76b18996e36aceebcc8b90d029d9cb", + [] + ], + "sandbox-mandatory-flags-inner.sub.html": [ + "5f400b5bde925f9bd9f9d92b00c290155a636f9f", + [] + ], + "sandbox-mandatory-flags-inner.sub.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "sandbox-mandatory-flags-looser-restriction.sub.html": [ + "0ad64c1a5cdb3fc2f237441c5bb5d730fc737086", + [] + ], + "sandboxed-features-inner.sub.html": [ + "f3bcbc8ba18e40d8aadc4c11a4ab55f1490398cc", + [] + ], + "sandboxed-features-inner.sub.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "sandboxed-features-looser-restriction.sub.html": [ + "44584440e15cb91d6b2f020f36b041d41c2e9296", + [] + ], + "sandboxed-features-looser-restriction.sub.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "sandboxed-features.js": [ + "1cbd4a48f3092bb4e9a00c8f4dd3b2e86c921a43", + [] + ], + "serviceWorker-dedicated-worker-inner.html": [ + "02f28bd82ea2e0c6756af46d47fd1993fe27e4e2", + [] + ], + "serviceWorker-dedicated-worker-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "serviceWorker-dedicated-worker-sw.js": [ + "027995a218a2dc53da22ff1d47095b6d0e26dbfb", + [] + ], + "serviceWorker-dedicated-worker-sw.js.headers": [ + "d0b9633bb06807551adf202952e7fa44d3c149b2", + [] + ], + "serviceWorker-dedicated-worker.js": [ + "8a9fa5ef36176bef543394732ea26fe3d786c7bd", + [] + ], + "serviceWorker-frameType-inner.html": [ + "103236e52ae4d03b4c592a6af4620c0aa94ed1ac", + [] + ], + "serviceWorker-frameType-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "serviceWorker-frameType-nested.html": [ + "10bb7ff8bdfc5655c927b6e323d3abdba1777ee4", + [] + ], + "serviceWorker-frameType-nested.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "serviceWorker-frameType.js": [ + "91003fc13159c3219f404cd90f2d6d87055edeb6", + [] + ], + "serviceWorker-navigate-inner-success.html": [ + "4d77d9e9a64afdd4f896b4bcdeed827e702a6fa3", + [] + ], + "serviceWorker-navigate-inner-success.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "serviceWorker-navigate-inner.html": [ + "aaf330f4f6721ff1d560ae5f967bf6e9bd026dac", + [] + ], + "serviceWorker-navigate-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "serviceWorker-navigate.js": [ + "a7a4db52ee61f707ce20cb185ec29265cb08007b", + [] + ], + "serviceWorker-push-sw.js": [ + "e344b45fd8cb6d1431ee3457c3acba76a8e62a40", + [] + ], + "unique-cookie-partition-inner.https.html": [ + "1cf3fc86808832cb53ccbad4122d2e226a908f93", + [] + ], + "unique-cookie-partition-inner.https.html.headers": [ + "e2b453f4638fd0efd8a0b89e6cdae05d351b8b12", + [] + ], + "utils.js": [ + "d35855cbcfc2924c507e91e5e2be1b5f0ca38516", + [] + ], + "web-bluetooth-inner.html": [ + "3236886b978995dc37a16cee1d1725d6555233a3", + [] + ], + "web-bluetooth-inner.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "web-nfc-inner.https.html": [ + "682805d5d2ccc352f3a645469c2f8d7ccdc1cca6", + [] + ], + "web-nfc-inner.https.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "web-share-inner.html": [ + "aada6f04e1a6c86367c0ea9d5dad3fa16899f2d1", + [] + ], + "web-share-inner.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "window-frameElement-inner.html": [ + "897d9a0d592c88564e6d5af60324c11e5e8f2410", + [] + ], + "window-frameElement-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "window-navigation-204-inner.html": [ + "e5e5adef1d6f2ba9199b75473f602494281bf9ec", + [] + ], + "window-navigation-204-inner.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "window-outer-dimensions-inner.html": [ + "81dee800fc6a66d06f5c2d6efbc32f959dff66a0", + [] + ], + "window-outer-dimensions-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "window-parent-inner.html": [ + "9008d7d9235b134bde5bd97df1ad5191b2fa03fe", + [] + ], + "window-parent-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ], + "window-top-inner.html": [ + "ddc30bf71b4f3a7a060cf6334feeb5e7773a2d44", + [] + ], + "window-top-inner.html.headers": [ + "6247f6d63211cd39dffca9fc507aefcdee586eba", + [] + ] + } + }, "fetch": { "META.yml": [ "81432ff5f5ced32bdc14411968300eeaeacf7db3", @@ -411572,7 +412330,7 @@ [] ], "keepalive-helper.js": [ - "42f20ac30af265b5c5fbe9b790c0cb06433ab328", + "c7048d1ff33be6952f666e5e0d6b8b6c9ac4047f", [] ], "keepalive-iframe.html": [ @@ -411584,7 +412342,7 @@ [] ], "keepalive-redirect-window.html": [ - "6ccf484644c9d8c15df87b4c00f73356b991af98", + "c18650796cc9e9f52be3fb99eb7fbe175b7632fe", [] ], "method.py": [ @@ -416889,7 +417647,7 @@ }, "filters": { "2d.filter.canvasFilterObject.dropShadow.tentative-expected.html": [ - "8327b5cad483fd95393b8bf347452899992686d7", + "86c5710132f348bd3e2332983d7211f4b3315cdb", [] ] }, @@ -417687,7 +418445,7 @@ ], "filters": { "2d.filter.canvasFilterObject.dropShadow.tentative-expected.html": [ - "8327b5cad483fd95393b8bf347452899992686d7", + "86c5710132f348bd3e2332983d7211f4b3315cdb", [] ] }, @@ -417965,7 +418723,7 @@ [] ], "filters.yaml": [ - "246b73e7f1a91863d9c2e05938c0d931cd1b1489", + "292dfcc0ec7aa92afcba9eb8d6506517c229e634", [] ], "layers.yaml": [ @@ -417977,7 +418735,7 @@ [] ], "pixel-manipulation.yaml": [ - "0ae664d2307960862f23582949d1b8f45e24a9a9", + "b9bdf3d2bdb5ca065b7bf58e35c30c09e8ac9405", [] ], "reset.yaml": [ @@ -418678,6 +419436,10 @@ "073ce7adfbd81cb7c0b2f91f96c8349b6677f26c", [] ], + "iframe-popup-about-blank.https.window.js.headers": [ + "19d0dbe4e18df8ba52c2a564853f5614a0469b95", + [] + ], "iframe-popup-to-so.https.html.headers": [ "d5c99062d2bb8f9660b68c172754867b598ed43f", [] @@ -423739,6 +424501,10 @@ "8caced027a54676335db3b2199e85cbafba2abee", [] ], + "input-date-baseline-min-height-ref.html": [ + "249076a5b7b064509684ddb4c70c6cea31d4b5ed", + [] + ], "input-date-baseline-ref.html": [ "dcef656bad00792262e05ab643195ef6804d5336", [] @@ -425706,6 +426472,10 @@ "38b628c3092ab223010db32373e786787e4355b0", [] ], + "pass-dialog-ref.html": [ + "6f1a8fde211e87422eaa0bbfcf2f2fd7c1747928", + [] + ], "removed-element-is-removed-from-top-layer-ref.html": [ "0856d6f9f12a6eacdca534b0056ba591857a9f3f", [] @@ -429242,6 +430012,12 @@ } } }, + "html-aam": { + "META.yaml": [ + "572918600acc4487e0fdf6fa63a4fc26dc6818b5", + [] + ] + }, "html-longdesc": { "META.yml": [ "e6fbaa9d91f92df2848a3e3cde738c9a3d5ed8e4", @@ -431807,7 +432583,7 @@ ] }, "lint.ignore": [ - "056bbd0c230244125fa59c8e1594b28756575095", + "862a2ba050bb0a9fbbc06ddcd71bc9af8d4b6a87", [] ], "loading": { @@ -435028,7 +435804,7 @@ [] ], "permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html.sub.headers": [ - "cfb0f3f5aeed4f2dcf76b191c0896b12515bdf28", + "d9facde69e011fed8c5d5fdb5b24c66a121b2570", [] ], "permissions-policy-header-policy-allowed-for-self.https.sub.html.sub.headers": [ @@ -438223,7 +438999,7 @@ [] ], "mock-pressure-service.js": [ - "21811ed52da2cd4f6782b390d848d0085d0849cc", + "02d10f856ae458a055844cded2c83e205a732bb4", [] ], "mock-pressure-service.js.headers": [ @@ -438916,6 +439692,10 @@ [] ], "css": { + "animation-update-ref.html": [ + "7e375a1df7f063ba6cdbbdad92beb73915b84d6e", + [] + ], "printing": { "animation-timeline-none-with-progress-ref.html": [ "09bcba2fd4d94085fab9dd5cd453aee7ffd259d0", @@ -441199,6 +441979,22 @@ "835046d472b2b3bb46aa7e4cba2976d367b29894", [] ], + "partitioned-cookies-3p-frame.html": [ + "d3962d2e600fea05c445f8f0b5aeb2cd08c0fab8", + [] + ], + "partitioned-cookies-3p-sw.js": [ + "2f54a984b19c45563c4eb0ec99f4dfa0ef0f7e32", + [] + ], + "partitioned-cookies-3p-window.html": [ + "d86a5eb20971900a5ae1b22f38c268d1c743b5d7", + [] + ], + "partitioned-cookies-sw.js": [ + "2f54a984b19c45563c4eb0ec99f4dfa0ef0f7e32", + [] + ], "partitioned-service-worker-iframe-claim.html": [ "12b048ee04c75b7e88a28240facb41d691075d77", [] @@ -444201,7 +444997,7 @@ [] ], "jobs.py": [ - "5b2ef277a96566ae6cc35127979f891c7c823ef3", + "44de9fe1ad078673e92385bd6e4bedba129c2485", [] ], "make_hosts_file.py": [ @@ -444217,11 +445013,11 @@ [] ], "requirements_build.txt": [ - "c2137af3156ae426e8bd7a1e117e9c67bbfc203a", + "4216606d3d7c6cdf91cae1a99e0e1954d1250391", [] ], "requirements_tc.txt": [ - "64b51841b0cf17f2ff9e59d8a89950d6a46bed81", + "58a7ef6058e51a3e4dfe642bf5ce336f22e93089", [] ], "run_tc.py": [ @@ -444315,7 +445111,7 @@ ] }, "update_built.py": [ - "44b950b0e88666292e284d7868c0548617f8cf26", + "8e0f18589de5cc7e31f2740085b46203b7a1e231", [] ], "website_build.sh": [ @@ -444665,7 +445461,7 @@ [] ], "requirements.txt": [ - "0236020bc1f52a5cf4944da6e5d28f3c05b2f9d1", + "d7c173723ed5d2bdc5ffdb2e8ec7063c5a1e7f32", [] ], "sourcefile.py": [ @@ -444732,15 +445528,15 @@ [] ], "requirements_mypy.txt": [ - "c95a836e6ab10d67a374401357127634e831d354", + "e56d65b3a6d1687b7ac5450e7eeca5a96a0b12c8", [] ], "requirements_pytest.txt": [ - "78e1ae4d613dc00a01da9cbfba4a3d06d906808c", + "0d4be55a0acad22f5a307130082710646d0b4595", [] ], "requirements_tests.txt": [ - "9ccaaa0d02a751320a34fcc91d360593277b4834", + "b404460243ed3c21981eceab78e60d6fe6da7223", [] ], "runner": { @@ -453019,7 +453815,7 @@ ] }, "requirements.txt": [ - "bfd21934d99bfbba9abe6f404a9125efcabe7f5c", + "b7d3524f611017f1a8116e81bb0757840997e5df", [] ], "requirements_chromium.txt": [ @@ -453031,7 +453827,7 @@ [] ], "requirements_firefox.txt": [ - "0b51ee8f463047bbc5ba446ae67c302af7441642", + "e8513ccf97a6938b84a9f4c18c80e3f9f78cfcca", [] ], "requirements_ie.txt": [ @@ -453043,7 +453839,7 @@ [] ], "requirements_safari.txt": [ - "069e31c69e1157eb37006520aa3ae06626026057", + "bcce11aed804df16200876894a149e18c1714f51", [] ], "requirements_sauce.txt": [ @@ -455945,7 +456741,7 @@ [] ], "audit.js": [ - "ed0078b9c5c0474bdab5476726a669b4c73b7479", + "2bb078b1118064445c3c3737693b66d8a9de1727", [] ], "biquad-filters.js": [ @@ -456131,7 +456927,7 @@ [] ], "error-processor.js": [ - "3b010db4f22177b14935100521d8d08eec9f0ca0", + "66ff5e2e251b03d33dc0a2e948e2a8690e213eed", [] ], "gain-processor.js": [ @@ -456687,7 +457483,7 @@ ] }, "conftest.py": [ - "21a037a0f77b6255773d7f432a98988fce3ddffe", + "5bf7ca012bd7b708e2e17e88942071fc4d751641", [] ], "response_completed": { @@ -456778,6 +457574,12 @@ [] ] }, + "message": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, "remove_preload_script": { "__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", @@ -457122,7 +457924,7 @@ [] ], "conftest.py": [ - "30069a02386566c6c707c83bc5281d49e82ce08f", + "f2060a87eed5925db6733112e91fac4b5035e83b", [] ], "support": { @@ -457130,10 +457932,6 @@ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] ], - "keys.py": [ - "e835a6a596f8d52d691afff812c9dacc5012b9e0", - [] - ], "mouse.py": [ "b3672eb213af68a9e4d9f931ca6499723a1a5019", [] @@ -457232,7 +458030,7 @@ [] ], "fixtures.py": [ - "d0a08698d6c0753fa081793c201b914a612b8215", + "0755d70d525ca97d4b35ba020424a903622e19ee", [] ], "fixtures_bidi.py": [ @@ -457319,6 +458117,10 @@ "494ca74f92653d8d898e5922d0b0f1add0c4ab04", [] ], + "keys.py": [ + "e835a6a596f8d52d691afff812c9dacc5012b9e0", + [] + ], "merge_dictionaries.py": [ "72f1cab352dec4f333aa9f5498d6115276a3f836", [] @@ -457609,6 +458411,10 @@ "d72544e8ec4fcdf6b6da2a83829d59e1d9f8afb8", [] ], + "elu.json": [ + "68c0c80c59b0180b1b9e32cd4e920abd99996b52", + [] + ], "exp.json": [ "886729f2e8a3c7969f25ab7276090aade2039a90", [] @@ -457666,7 +458472,7 @@ [] ], "prelu.json": [ - "e1bf67826195d27c62115d0806493fe5db97c04b", + "e45e12cd4b6c9f6db1eeb2243396edea641813f6", [] ], "reduce_max.json": [ @@ -457706,7 +458512,7 @@ [] ], "slice.json": [ - "9b250268dc0824acb6e0523a5f406928e36dce1d", + "ed193dd6563340ff8bd7d11e8e00d743492905d4", [] ], "softmax.json": [ @@ -457743,7 +458549,7 @@ ] }, "utils.js": [ - "427b47e28cc2f9aeae42e9ed6fbf6b36128c9a0b", + "d24562eba1fe70f3c46b36c88426015c774505db", [] ] } @@ -477857,7 +478663,7 @@ ] ], "characteristic-is-removed.https.window.js": [ - "e97b94f73664bb2e1639715827c8ba870021f4e6", + "e80be43135ce114b960dfae14e4ec68ed7f8a302", [ "bluetooth/characteristic/readValue/characteristic-is-removed.https.window.html", { @@ -477877,8 +478683,13 @@ [ "script", "/bluetooth/resources/bluetooth-fake-devices.js" + ], + [ + "timeout", + "long" ] - ] + ], + "timeout": "long" } ] ], @@ -486486,7 +487297,7 @@ ] ], "compute_pressure_duplicate_updates.tentative.https.any.js": [ - "b5d7690d18295b82bf052faa3a7c93cc5ecc024a", + "dde92932dd14e7d8d2b65fcd49c947db8dda5fff", [ "compute-pressure/compute_pressure_duplicate_updates.tentative.https.any.html", { @@ -486546,7 +487357,7 @@ ] ], "compute_pressure_factors.tentative.https.any.js": [ - "7486a70f91170c180ea12f8a0acee46a2626b640", + "60d38d3f336cfcd931e85a2e26ccae164f1d2216", [ "compute-pressure/compute_pressure_factors.tentative.https.any.html", { @@ -487024,7 +487835,7 @@ ] ], "compute_pressure_update_toJSON.tentative.https.any.js": [ - "c1cd240a3bc52b4b9dc79cb594d48ebdd7f64ec7", + "0024d6975490619d1824b75814c5719c63120bcf", [ "compute-pressure/compute_pressure_update_toJSON.tentative.https.any.html", { @@ -496514,6 +497325,17 @@ {} ] ], + "isolation": { + "animation": { + "isolation-no-interpolation.html": [ + "666fb5358f9fadf97b292c1dc306892591dc04a7", + [ + null, + {} + ] + ] + } + }, "mix-blend-mode": { "mix-blend-mode-creates-stacking-context.html": [ "2d24a3f589cac5444c958b8b988d89daff6c4902", @@ -496619,6 +497441,13 @@ {} ] ], + "justify-no-interpolation.html": [ + "a242fb73e901d2a2bc933b9cf0b6a57afef70090", + [ + null, + {} + ] + ], "row-gap-composition.html": [ "238253adf0cda81aca80d9345219ac8cd8e0df50", [ @@ -498662,35 +499491,35 @@ ] ], "animation-range-end-computed.html": [ - "914d496458e84e482ccde7c83439c9178310aa01", + "4c96ee81b17203d6664ca89f8bddb58320b1d1d6", [ null, {} ] ], "animation-range-end-invalid.html": [ - "ec28da2fff1f18427a55785ad25e839948a89eb6", + "459cdfd0cd26a9c69b33d16e0b07957bed827676", [ null, {} ] ], "animation-range-end-valid.html": [ - "4a248f3b224ba0ae0c35bd3a4db827e3c3929eae", + "aeeb2ee5794b2af4b17d08da91f52237a99739f8", [ null, {} ] ], "animation-range-shorthand.html": [ - "e5f6e866204f70c34d8e38692c0a269d02f833de", + "8acf0b1c557befc09bbdb249427fdaf502e67e08", [ null, {} ] ], "animation-range-start-computed.html": [ - "9750fb50a39f7c48fdd1b3def30f3a4d4c89c4dd", + "044aea2ca67f6758d9699ddb0355de19ecf5248c", [ null, {} @@ -498704,7 +499533,7 @@ ] ], "animation-range-start-valid.html": [ - "d70a371db6f0b745442423bd6ad6a7991fd00a07", + "309f4ccf697ce7d1f0db966ff29fa7a7ac3cb9fa", [ null, {} @@ -499860,6 +500689,41 @@ null, {} ] + ], + "grid-block-end-column-auto-flow.html": [ + "c491301c8a6eaf987f60192d43c85ad85e7f296e", + [ + null, + {} + ] + ], + "grid-block-end-item-spans-multiple-rows.html": [ + "4ae597760b3228673e84912574ba830227d5ed9c", + [ + null, + {} + ] + ], + "grid-block-end.html": [ + "a0143364aab48c43c2cb8d9138b8976cf604f9d0", + [ + null, + {} + ] + ], + "grid-inline-start-item-negative-span.html": [ + "4dc553e15b2c679fdf7de9d3144d1d2b34149733", + [ + null, + {} + ] + ], + "grid-inline-start.html": [ + "7d4157acfed5d1592b0bb80d29dd42eeb46187ea", + [ + null, + {} + ] ] } }, @@ -500649,7 +501513,7 @@ ] ], "supports-import-parsing.html": [ - "58e1f7cd165381d7ab53a6eb6feb03bbc976ef97", + "64cf930e6cdc60469d04997d0590597edcf8b565", [ null, {} @@ -500914,7 +501778,7 @@ ] ], "color-computed-relative-color.html": [ - "44e0d8de7804eb6e4dcc278fa9e1bd8231aa6631", + "f1e0a734970ac60ddc1c6082d768459c6f71dba2", [ null, {} @@ -501054,7 +501918,7 @@ ] ], "color-valid-relative-color.html": [ - "a1c9461d2ee9bff374fd91e8027eaf92c945fba4", + "68a78a8d44cedd25af38e8acdd6c67ce7a255848", [ null, {} @@ -501126,13 +501990,22 @@ ] }, "css-color-adjust": { - "color-scheme-no-interpolation.html": [ - "acfa6ddbbebfc15f004bb9f2210f645e802f3eeb", - [ - null, - {} + "animation": { + "color-scheme-no-interpolation.html": [ + "306b4b3da1241b724573bb7d968c664598534210", + [ + null, + {} + ] + ], + "forced-color-adjust-no-interpolation.html": [ + "bcd2bdf223a98cb9635af1fa2059bb35594b7f5e", + [ + null, + {} + ] ] - ], + }, "inheritance.html": [ "f834d7bb54cd7b8adf32ce56a3b0fe1acbd58a0b", [ @@ -501378,14 +502251,14 @@ ] ], "at-container-style-parsing.html": [ - "5bd9e018c1a317f5fe0dd055e04ef3f87d55f1cd", + "b49205824b542069db8959dfbccdcdfa6ae627c9", [ null, {} ] ], "at-container-style-serialization.html": [ - "30e33609a7f33ee83f8f6f208d59bd6e99820c77", + "a4fb25378cbe36812dbb744b0d7c6aaf9c1a33c2", [ null, {} @@ -501700,7 +502573,7 @@ ] ], "custom-property-style-queries.html": [ - "52fbeeddec88d2d56e25b732ad2bb6088d2e336b", + "29b5004af06641dd8cda85ce943f2ad5002b37a6", [ null, {} @@ -502232,7 +503105,7 @@ ] ], "content-visibility-077.html": [ - "7cc9a335035678f9cf9f0514eaf700198553f889", + "9f2c69e9cf853b267e0f60b75c4f770b54a19e35", [ null, {} @@ -502297,6 +503170,13 @@ {} ] ], + "content-visibility-interpolation.html": [ + "9e5551a6f84d135ebaf3a4b7b1b96f739456ac95", + [ + null, + {} + ] + ], "content-visibility-svg.html": [ "568149ba7fb637082dd45523e9d20d322813b0e3", [ @@ -508284,6 +509164,13 @@ ] }, "animation": { + "grid-no-interpolation.html": [ + "1293cdb9d5d6807f8483dd4cdc723b0d93088d74", + [ + null, + {} + ] + ], "grid-template-columns-composition.html": [ "2db49bc53ee4d36ffb7c12b8d4d85d6639c0d361", [ @@ -509762,6 +510649,29 @@ ] }, "css-images": { + "animation": { + "image-no-interpolation.html": [ + "1f9faf7fbb512e76f5c938b8ea927f44e8b053db", + [ + null, + {} + ] + ], + "object-position-interpolation.html": [ + "13a1b177c8ac837844567fa95f243a4dd03ed208", + [ + null, + {} + ] + ], + "object-view-box-interpolation.html": [ + "18ac72db70d63a78f2f61ea358adb3396631042b", + [ + null, + {} + ] + ] + }, "empty-background-image.html": [ "5192ff254c8a020638e1545baef07c20c07200ed", [ @@ -509824,20 +510734,6 @@ {} ] ], - "object-position-interpolation.html": [ - "13a1b177c8ac837844567fa95f243a4dd03ed208", - [ - null, - {} - ] - ], - "object-view-box-interpolation.html": [ - "18ac72db70d63a78f2f61ea358adb3396631042b", - [ - null, - {} - ] - ], "object-view-box-parsing.html": [ "da17b7936fb9a3552ce263369c84282df30a4c23", [ @@ -509989,13 +510885,22 @@ } }, "css-inline": { - "alignment-baseline-no-interpolation.html": [ - "57deaf8abe68d05bb1c95a779a9c2b6c2ddb57b5", - [ - null, - {} + "animation": { + "alignment-baseline-no-interpolation.html": [ + "8cbe0c98d814bdf86a6004ea82fdd6e1cbcd4120", + [ + null, + {} + ] + ], + "dominant-baseline-no-interpolation.html": [ + "7f6be5aac2bf47a1f66047ef91e5a6a4e0929fa7", + [ + null, + {} + ] ] - ], + }, "baseline-source": { "baseline-source-computed.html": [ "e19f7ffca6d7c4ca504a6754874519d1c15a9835", @@ -510075,13 +510980,6 @@ ] ] }, - "dominant-baseline-no-interpolation.html": [ - "85bc377ba92254bed414ff9b1618397f96a86a34", - [ - null, - {} - ] - ], "inheritance.html": [ "6723c2a6e2ff38cb0af2ab13baf5ef9a9af0f18a", [ @@ -510112,6 +511010,13 @@ ] ] }, + "initial-letter-no-interoplation.html": [ + "1efc4123ca2e983d1b9bf4ed1a2c251ea05989e8", + [ + null, + {} + ] + ], "inline-crash-chrome-001.html": [ "cfc0fdd269fd334c8c76dfd357ff984df40e3064", [ @@ -512365,7 +513270,7 @@ ] ], "overscroll-behavior.html": [ - "f018d5cd8769bc4cf991d437f137d6153d2e7f93", + "0bf335d770d8dcc0af0231a6b3bdb080fca07aa2", [ null, { @@ -513643,7 +514548,7 @@ ] ], "register-property-syntax-parsing.html": [ - "97f00e6e8eb50530495c529e9cf719f440c4c725", + "16cbdf0c571a5f5d7fa328b6d9a6295bfd3a5db0", [ null, {} @@ -513671,7 +514576,7 @@ ] ], "registered-property-computation.html": [ - "ec2d35c7fb98a70cc8f9b534d736b36c721dffdf", + "f4c718b139baffda6bb7d20254bdca7c37265a56", [ null, {} @@ -513850,7 +514755,7 @@ ] ], "marker-computed-content.html": [ - "b2df337adcd1f0f65b21a270319e5e89180515ed", + "c58e0540448ee913e3c4418591c016f42c748bef", [ null, {} @@ -516403,6 +517308,13 @@ {} ] ], + "height-no-interpolation.html": [ + "902fe2e22f876db4ae989033cf9a467fc239a335", + [ + null, + {} + ] + ], "max-height-composition.html": [ "fb5b241d00865fe68c198a9fee88d932a8977f7e", [ @@ -516714,7 +517626,7 @@ ], "parsing": { "contain-intrinsic-size-computed.html": [ - "c03b282699777728e36dba774ecd455d98745532", + "18461c0ed2e818b40584c85fbcb70d3a760b8d3e", [ null, {} @@ -518157,6 +519069,13 @@ }, "css-text": { "animations": { + "hyphen-no-interpolation.html": [ + "e1e89d1772382aed394fb0217397546764a31d70", + [ + null, + {} + ] + ], "letter-spacing-composition.html": [ "c1b614b5ebaa5bc190a080bd8da5694096a2be20", [ @@ -518171,6 +519090,13 @@ {} ] ], + "line-break-no-interpolation.html": [ + "937b2483662f008cce6ab51fe131d6fc5f922d52", + [ + null, + {} + ] + ], "tab-size-interpolation.html": [ "3cf63782f59adb481c77539e4ab062a3de57df47", [ @@ -534218,6 +535144,13 @@ {} ] ], + "preventDefault-during-activation-behavior.html": [ + "928740313471656ccb64ca771e72b2b7c199e27f", + [ + null, + {} + ] + ], "relatedTarget.window.js": [ "ebc83ceb209a7c18cdc722cd70352845409cd893", [ @@ -540962,7 +541895,7 @@ ] ], "image-src-change.html": [ - "992712102cf00469d7b7076ad8195f812742a7b8", + "7416a3f365827a10a3f66457c67eab8fac51bc0e", [ null, {} @@ -553499,6 +554432,17 @@ {} ] ], + "eventsource-constructor-no-new.any.js": [ + "48bc551130ca850c3dcba0fa5789d37248803e81", + [ + "eventsource/dedicated-worker/eventsource-constructor-no-new.any.html", + {} + ], + [ + "eventsource/dedicated-worker/eventsource-constructor-no-new.any.worker.html", + {} + ] + ], "eventsource-constructor-non-same-origin.htm": [ "b49d7ed609d071a91079143a4538b12ef2d725f4", [ @@ -555053,6 +555997,549 @@ ] } }, + "fenced-frame": { + "csp-allowed.https.html": [ + "8c002bc8a9d03955d8ac7ff021fd1b326a16ad18", + [ + null, + {} + ] + ], + "csp-blocked.https.html": [ + "3826fdd7f42e325e04152a194c98780f576252b3", + [ + null, + {} + ] + ], + "csp-fenced-frame-src-allowed.https.html": [ + "cf603c29a690ff41d9f84aa8a2bc4164b7f792cd", + [ + null, + {} + ] + ], + "csp-fenced-frame-src-blocked.https.html": [ + "46f8778d47656e767e7c4c3d200945040f3ede69", + [ + null, + {} + ] + ], + "csp-frame-src-allowed.https.html": [ + "08c51fc3acf76fb51466f1b94a74ed73d8058cc6", + [ + null, + {} + ] + ], + "csp-frame-src-blocked.https.html": [ + "88e4a8b89f03b0deb675fc43d8317bbcefece5f5", + [ + null, + {} + ] + ], + "csp-transparent-url.https.html": [ + "c1c815d49e44f6bb3723be935201f91b5cfbbf47", + [ + null, + {} + ] + ], + "csp.https.html": [ + "6daa6a96e83b05648207cf587133eaa4b7448214", + [ + null, + {} + ] + ], + "cspee.https.html": [ + "7df3e882fa6d1d119ba00f3020dd28c764c47f04", + [ + null, + {} + ] + ], + "default-enabled-features-allow-all.https.html": [ + "faebeec26c482d6ddba19994bc801eb300109a7b", + [ + null, + {} + ] + ], + "default-enabled-features-allow-none.https.html": [ + "a338e00c874f1945b2ce1c017d701b1f8cbb71ef", + [ + null, + {} + ] + ], + "default-enabled-features-allow-self.https.html": [ + "d59ee7fcdc82e48b4773ebb45d019bab97d712bf", + [ + null, + {} + ] + ], + "default-enabled-features-attribute-allow.https.html": [ + "dd6dd4ec5022c7861b65e63ba4672630fe18c2dd", + [ + null, + {} + ] + ], + "default-enabled-features-attribute-change.https.html": [ + "179a8683e32c32007d54200db9e417e091f86d00", + [ + null, + {} + ] + ], + "default-enabled-features-attribute-disallow.https.html": [ + "29fdc788bf5b7d92ffb343625c4624d5b15178f7", + [ + null, + {} + ] + ], + "default-enabled-features-attribution-disabled.https.html": [ + "7683b35a69942044f95c35f4861e520eaae9e7ba", + [ + null, + {} + ] + ], + "default-enabled-features-unset.https.html": [ + "0e9c300bdcb95f24bd11cabe5db6e4b13f458eac", + [ + null, + {} + ] + ], + "disallowed-navigation-to-blob.https.html": [ + "9b299cd5e1e03641586004eb0b53ab14ce3bfd1b", + [ + null, + { + "timeout": "long" + } + ] + ], + "disallowed-navigation-to-data.https.html": [ + "7ab8edc7e11076ca33f4affa0a88a622e17afe8e", + [ + null, + { + "timeout": "long" + } + ] + ], + "disallowed-navigation-to-http.https.html": [ + "18ed92851af7f2dcf0370be3b1a1dfbe8751a888", + [ + null, + { + "timeout": "long" + } + ] + ], + "disallowed-navigations-dangling-markup-urn.https.html": [ + "1a5720b0343e485a374ab49cdafdecd63268e8c5", + [ + null, + { + "timeout": "long" + } + ] + ], + "disallowed-navigations-dangling-markup.https.html": [ + "72f0855d59f74ff1e50adf6cddc171d01264c7d6", + [ + null, + { + "timeout": "long" + } + ] + ], + "disallowed-navigations.https.html": [ + "5cde50d4201beb36418fbb18399dec693d3d50d4", + [ + null, + { + "timeout": "long" + } + ] + ], + "embedder-coop-coep-blocked.https.html": [ + "e0e418577dc97fc424a4e55e2a809bad5ce63e48", + [ + null, + {} + ] + ], + "embedder-csp-not-propagate.https.html": [ + "425cc9661e412153fc89869df1775092c5086e79", + [ + null, + {} + ] + ], + "embedder-no-coep.https.html": [ + "75980a13018c21ea97db03dfe0fdc26bf6845512", + [ + null, + {} + ] + ], + "embedder-require-corp.https.html": [ + "9432d0cbb5214e3885ee7a493a8d64180646f540", + [ + null, + { + "timeout": "long" + } + ] + ], + "fence-api.https.html": [ + "7d350ff75f0367e495ed222b60aa0f952a080dd7", + [ + null, + {} + ] + ], + "fence-report-event.https.html": [ + "ce217c7763a33b50b87bdf7d67750ad4d46b4e2b", + [ + null, + {} + ] + ], + "fence-urn-iframes.https.html": [ + "cdde07329d39a7c14335ddbea4315c66f9cc4d44", + [ + null, + {} + ] + ], + "insecure-context.html": [ + "44db6432a45674a8f0842df1ce8042149635ea4f", + [ + null, + {} + ] + ], + "navigate-ancestor-by-name.https.html": [ + "a5df1e99424e3d4561b977cc45c4df946102557d", + [ + null, + {} + ] + ], + "navigate-ancestor-nested-fenced-frame.https.html": [ + "ec41fe8757564da2dda6107bc494266a87b7f323", + [ + null, + {} + ] + ], + "navigate-ancestor-nested-iframe.https.html": [ + "977eae17486de1997c177921b1934d68ce1725bf", + [ + null, + {} + ] + ], + "navigate-ancestor-top-level-fenced-frame.https.html": [ + "9907f25292ca77a58dc8f310c57c3ccf6b7a8f8c", + [ + null, + {} + ] + ], + "navigate-by-name-succeed.https.html": [ + "4d558f8d2364d36b7a3d3411dc4ca91c6f554597", + [ + null, + {} + ] + ], + "navigate-descendant-by-name.https.html": [ + "08ce4b99f3aa0089aa10e962f39479dc5c4c4e9f", + [ + null, + {} + ] + ], + "navigate-related-page-by-name.https.html": [ + "755f32a5a3c175f4a526ef97910563fbd4dcc572", + [ + null, + {} + ] + ], + "navigator-keyboard-layout-map.https.html": [ + "03fbc062e14057fb6e04096ef3692e2ac319d525", + [ + null, + {} + ] + ], + "navigator-keyboard-lock.https.html": [ + "74092a41d275bf5773e7f94463220c0a99b687b5", + [ + null, + {} + ] + ], + "navigator-subapp.https.html": [ + "c5b980537b3d334eef9d76c4d9e5af745e245e73", + [ + null, + {} + ] + ], + "navigator-vibrate.https.html": [ + "6bcabf4d478711e256846e470b6054249f7a32fc", + [ + null, + { + "testdriver": true + } + ] + ], + "navigator-virtualkeyboard.https.html": [ + "4f2a17f2ff379959863b1ca1229691fd31f4bd15", + [ + null, + {} + ] + ], + "sandbox-attribute.https.html": [ + "1458145e4377e573f8aa13f5cb4d0dfdc7e09182", + [ + null, + { + "timeout": "long" + } + ] + ], + "sandbox-mandatory-flags.https.html": [ + "57a5bc49cfa5ce8a21892d38dee0e0ad36ec18ab", + [ + null, + { + "timeout": "long" + } + ] + ], + "sandboxed-features-alert.https.html": [ + "6d3f83208dcb44c3d02d9509dbcbcf96600b9c17", + [ + null, + {} + ] + ], + "sandboxed-features-confirm.https.html": [ + "bb55f15ff00d0a9d1ff7a574b0646024586e9a81", + [ + null, + {} + ] + ], + "sandboxed-features-documentdomain.https.html": [ + "e00ab23980077c5eefd511b3d9e988ebe21b1c86", + [ + null, + {} + ] + ], + "sandboxed-features-pointerlock.https.html": [ + "af598798b2eb62f501589f29dc14313dc88f334f", + [ + null, + {} + ] + ], + "sandboxed-features-presentation-request.https.html": [ + "7f9b1d7bd699de3d27d7fd2c32260ff4ec9ced28", + [ + null, + {} + ] + ], + "sandboxed-features-printdialog.https.html": [ + "b03f7a22d8b599cf7d0c0d791e4ff6bb548f9a48", + [ + null, + {} + ] + ], + "sandboxed-features-prompt.https.html": [ + "1207f4a76540352f5d649317476eaf05a17642b0", + [ + null, + {} + ] + ], + "sandboxed-features-screen-orientation-lock.https.html": [ + "4e80d92e1d8f715dc8b9008b7edc40832221a1ec", + [ + null, + {} + ] + ], + "selecturl-flexible-size.https.html": [ + "6b1a07e73a70744b493fea221fd12f94761242e6", + [ + null, + {} + ] + ], + "self-urn-navigation.https.html": [ + "4b1e989e8a78d08cfc4a3f493a8323e038d99ed7", + [ + null, + {} + ] + ], + "serviceWorker-dedicated-worker.https.html": [ + "92533e38735d0c026bfb1684fb135f059cd83f0d", + [ + null, + {} + ] + ], + "serviceWorker-frameType.https.html": [ + "ac0bc07f3dcefb9c485064aecedf54cd68d909d3", + [ + null, + {} + ] + ], + "serviceWorker-push.https.html": [ + "cb460d161ee1517d565cda82ab61af8862c7ff2f", + [ + null, + { + "testdriver": true + } + ] + ], + "set-automatic-beacon.https.html": [ + "f231018b85349700623421a53d48f7514c2edba4", + [ + null, + {} + ] + ], + "show-directory-picker.https.html": [ + "ae4494f51b94248ac97897220d76ead783629dde", + [ + null, + { + "testdriver": true + } + ] + ], + "show-open-file-picker.https.html": [ + "2f99fdfb3bccffc403b1bb4b0438d39d5c04d8cd", + [ + null, + { + "testdriver": true + } + ] + ], + "storage-partitioning.https.html": [ + "5d6060c66fe0bc54e8e8d35e84bf010f0bc8515a", + [ + null, + {} + ] + ], + "subframe-loading.https.html": [ + "758bdd87faea78ce8b944ccc0aabf3237d9e332b", + [ + null, + {} + ] + ], + "web-bluetooth.https.html": [ + "88bbd6ec3750cd2a7cecb7ddeee223d14b075982", + [ + null, + { + "testdriver": true + } + ] + ], + "web-nfc.https.html": [ + "c7de9d81f940b8114d5622e47d0f0fc727cdcd15", + [ + null, + {} + ] + ], + "web-share.https.html": [ + "13d182b2d1097d39a6266e97ad29259ad3b96890", + [ + null, + { + "testdriver": true + } + ] + ], + "web-usb.https.html": [ + "3156f68ea736f2bdf34a679d51a3a04f15ae08dd", + [ + null, + {} + ] + ], + "window-close.https.html": [ + "b581a0324c594890198c85126bc9905e79574673", + [ + null, + {} + ] + ], + "window-frameElement.https.html": [ + "bd4532b1ebeefe3cd3bb92bafb2a56707ebe3ad2", + [ + null, + {} + ] + ], + "window-navigation-204.https.html": [ + "67220603301af9c3eb4ad26f81e3dadafc2deb16", + [ + null, + {} + ] + ], + "window-outer-dimensions.https.html": [ + "c6a64ef193ae7e17f83030fe2659eb435fe0fdf0", + [ + null, + {} + ] + ], + "window-parent.https.html": [ + "c2f36040504fcbc8acdbfa259745af7a35b3dc6b", + [ + null, + {} + ] + ], + "window-top.https.html": [ + "9a8f39f08b91699610634cdec677dd1758e8dae1", + [ + null, + {} + ] + ] + }, "fetch": { "api": { "abort": { @@ -555857,7 +557344,7 @@ ] ], "keepalive.any.js": [ - "047f1ed23484ae8ba1292a0d25ef35aba8561452", + "4f33284d0c74cbbdedb15ad1954722b5f1457531", [ "fetch/api/basic/keepalive.any.html", { @@ -557021,7 +558508,7 @@ ] ], "mime-type.any.js": [ - "a0f90a0abdfc3e672997607611438ff0049ecf2c", + "67c9af7da2dd539c219bc5848af45e6baaae65a9", [ "fetch/api/body/mime-type.any.html", {} @@ -559193,7 +560680,7 @@ ] ], "redirect-keepalive.any.js": [ - "9f7cca7dbf75e687e69168be5fc10ecea313ac56", + "bcfc444f5a6569655c8e26f961392d6c1a5fd72e", [ "fetch/api/redirect/redirect-keepalive.any.html", { @@ -561574,7 +563061,7 @@ ] ], "response-clone.any.js": [ - "9f4f36ed2d1d63c0780a890b5957e98cf9f882a3", + "f5cda75149e2638a5faff7473c306db1de822b82", [ "fetch/api/response/response-clone.any.html", { @@ -563519,6 +565006,21 @@ } ] ], + "navigate.window.js": [ + "b532a006830b485992fa54ce9fccfb5d23dabe86", + [ + "fetch/data-urls/navigate.window.html", + { + "script_metadata": [ + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "processing.any.js": [ "cec97bd6be2b2e3f1b39c7a5e8128ee48d7ac3d4", [ @@ -567345,6 +568847,28 @@ }, "fledge": { "tentative": { + "auction-config.https.sub.window.js": [ + "1455871dad6ccf8cb9b7431e49c19a0e9af4f9f2", + [ + "fledge/tentative/auction-config.https.sub.window.html", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.js" + ] + ] + } + ] + ], "insecure-context.window.js": [ "9016277b73139d050e3d688c3f21cb40048464e2", [ @@ -568925,14 +570449,14 @@ ] ], "FileSystemSyncAccessHandle-read-write.https.tentative.worker.js": [ - "8fa3799a67a4f1bb0fdc2c623638bb60d6ae2c3c", + "a22608a2c7da86e80d747a119759c95321d86f73", [ "fs/FileSystemSyncAccessHandle-read-write.https.tentative.worker.html", {} ] ], "FileSystemSyncAccessHandle-truncate.https.tentative.worker.js": [ - "f2cd51ef1a1d9711343461888018a61600243885", + "e5f557e070caba40b861fd83bac7f2bae3bea492", [ "fs/FileSystemSyncAccessHandle-truncate.https.tentative.worker.html", {} @@ -572336,7 +573860,7 @@ ] ], "PopStateEvent.html": [ - "8db1d2788c04b0fb85f79cc023969b2ee4e4079f", + "5774c150f4275c6527c0457a2562db71a0c109cf", [ null, {} @@ -574529,7 +576053,7 @@ ] ], "beforeunload-canceling.html": [ - "a3622d2f0d43fa53e8a077cb99b5c66d92868264", + "29a685fa5905dcba01a087debe4f2a1d561ca0eb", [ null, {} @@ -580759,7 +582283,7 @@ ] ], "2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html": [ - "d405213d5b62fbe872d5570f6ded63b5f597eecf", + "71a8c9eb4843c3f1f8db1df27a6e372bfbd7240d", [ null, {} @@ -583063,7 +584587,7 @@ ] ], "2d.imageData.object.ctor.basics.html": [ - "46fa3445ba5d4165b3a372411531f61fed835658", + "b01b9da51b8cd662f95c6dd33d44fac4f75fac73", [ null, {} @@ -589961,14 +591485,14 @@ ] ], "2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html": [ - "7acc1e492d06798c0dbc90af2fc1d7ddfc28f2fa", + "e124341e441931b8e2f8f4c1e17d37e24a240dfb", [ null, {} ] ], "2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js": [ - "2746428a8844d02ee9a50520b7a0e60ca13f4797", + "ac3f98ab235ee6236e8d939bc415b30b358ad5ab", [ "html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.html", {} @@ -590548,7 +592072,7 @@ ] ], "offscreencanvas.constructor.html": [ - "0665f7452ce75f669b883d3666ec3c492b225ef4", + "a2ad1dcc7eee6dd20cfd6ab873814aea4d766985", [ null, {} @@ -599884,6 +601408,28 @@ } ] ], + "iframe-popup-about-blank.https.window.js": [ + "d63b69e83f33fe10d88c5e9aad59da0f596606e1", + [ + "html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-about-blank.https.window.html", + { + "script_metadata": [ + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ] + ] + } + ] + ], "iframe-popup-to-so.https.html": [ "740ff2595aa5891cfaf99a04cd281e71e4d4bc74", [ @@ -600098,7 +601644,7 @@ ] ], "aria-element-reflection-disconnected.html": [ - "7bc1052d94d3c12a0a546678a52f0e44a9a64264", + "d3acc35e9fb78e6fdafec3d6fc49741599da3370", [ null, {} @@ -600657,6 +602203,20 @@ {} ] ], + "the-anchor-attribute-001.tentative.html": [ + "c9faa6908ab96d786c8c84c62da8982743f716ae", + [ + null, + {} + ] + ], + "the-anchor-attribute-002.tentative.html": [ + "a1a237a2ee2d6fae494e85aa8fcdd00d258298c8", + [ + null, + {} + ] + ], "the-lang-attribute-001.html": [ "c2966f362060cd0025fa79cd4a5dbea540079656", [ @@ -610584,7 +612144,7 @@ }, "form-submission-0": { "FormDataEvent.window.js": [ - "830d536a66311a32085ccdb4b9b60c4b3b824d1a", + "4890fd862394bd08c47f60ba95cf020467a1909f", [ "html/semantics/forms/form-submission-0/FormDataEvent.window.html", {} @@ -613073,6 +614633,13 @@ {} ] ], + "dialog-overlay.html": [ + "a366f61a355e639d3a918fb981c49fa57264684b", + [ + null, + {} + ] + ], "dialog-return-value.html": [ "2a80de65a15a1b291890746306fea4238c7aeea8", [ @@ -613640,6 +615207,15 @@ } ] ], + "popover-invoker-reset.html": [ + "4b1ac6b588f70398e01de389bd0ab7c2bd305469", + [ + null, + { + "testdriver": true + } + ] + ], "popover-invoking-attribute.html": [ "22e7dc14a17f1d598cad66b39c0b7ebff856e374", [ @@ -613658,7 +615234,7 @@ ] ], "popover-light-dismiss.html": [ - "0cb13979407e4f942a72a4a1db9b64c6feccb94d", + "0ac73ec4549c6f91aa6e0c1f40508a2ba328dbdf", [ null, { @@ -613667,6 +615243,13 @@ } ] ], + "popover-move-documents.html": [ + "2ead18a2b73956e8821cd61490c4f25861e33ed8", + [ + null, + {} + ] + ], "popover-not-keyboard-focusable.html": [ "5246073c960180fb92d411fe45f7e60d7c11babc", [ @@ -613676,6 +615259,13 @@ } ] ], + "popover-overlay.html": [ + "a607844aee4f59e2a8b96528bbfa380688a1bb34", + [ + null, + {} + ] + ], "popover-removal-2.html": [ "b21c0bb557f0b4e36b0948d272a254890508ba14", [ @@ -613691,7 +615281,7 @@ ] ], "popover-shadow-dom.html": [ - "9279a121bea73d9c5ea08638065f1487ca60c61d", + "87293f1e3d56c22674e848eb2e926f1364ce9198", [ null, {} @@ -613705,7 +615295,7 @@ ] ], "popover-target-element-disabled.html": [ - "bf1f297148442f21d1f24dc6de7f9d7d77b4ff9d", + "d5c951768c083aa0fea3c6d473c9a370f386f31b", [ null, {} @@ -622553,7 +624143,7 @@ ] ], "messageevent-constructor.https.html": [ - "ef55886180233cef46e2dd894d8924b53d71bb53", + "2d62019dbf121d650b4687e123c9a33b73105baa", [ null, {} @@ -622855,7 +624445,7 @@ ] ], "promise-rejection-event-constructor.html": [ - "916527909173fd87429590e51a866a712cf97854", + "4319deee7b50163a68e556ee7f401373fab7495b", [ null, {} @@ -623343,6 +624933,46 @@ } } }, + "html-aam": { + "fragile": { + "area-role.html": [ + "9b6ded56860631e14ae091bcf8ffac36afb0a09a", + [ + null, + { + "testdriver": true + } + ] + ], + "optgroup-role.html": [ + "f36a5d69835452e440a5d74299d8241c9c601618", + [ + null, + { + "testdriver": true + } + ] + ] + }, + "roles.html": [ + "c5cb3e35487de534ddfecd04e0feafb369a0f3a0", + [ + null, + { + "testdriver": true + } + ] + ], + "table-roles.html": [ + "d7865f5fccab6ff12fc592835512e613e883ef80", + [ + null, + { + "testdriver": true + } + ] + ] + }, "html-media-capture": { "capture_reflect.html": [ "f593236b5325eb756ee6b43f653a3138cb1d8d6b", @@ -626667,28 +628297,28 @@ ] ], "element-only-when-fully-active.html": [ - "41bdc8f8b984e61ab62f39734a1e19342697ef4e", + "519b249196a6b00fd124a1700907290d8b187a99", [ null, {} ] ], "expanded-image.html": [ - "55adff91f2f45afe47c6fa84f43b8fb98d7d0424", + "90f803930c178ae81e68bfdf2919ab142dec0c0e", [ null, {} ] ], "first-letter-background.html": [ - "d2abd5d9c372aba61584e672b6ab1c04e463f30e", + "56ac1056770d079513c48c39ae8c1e6835c30f30", [ null, {} ] ], "first-paint-equals-lcp-text.html": [ - "97eb67e320efe52952740f90ab1e3fcea38eaea4", + "50bccd072e2db5c7f2865a8e2cf36aa30264ac21", [ null, {} @@ -626709,42 +628339,42 @@ ] ], "image-TAO.sub.html": [ - "8b7d99e47164803047cad4b7280e2b3e4950d93f", + "296fe5e65b8cd550fb4ef4c33b021332577cad5f", [ null, {} ] ], "image-full-viewport.html": [ - "7da6c5c3dc9a2c32699277da0bfecf1b7a4a1dab", + "e67e21a17c7d743e632c15770eafa8fe23cc1f6c", [ null, {} ] ], "image-inside-svg.html": [ - "ce96574609a56e5721a136416c5d411a1e37e38e", + "77e42fcc6d0d110de6cfd77c32bcda3939998778", [ null, {} ] ], "image-not-fully-visible.html": [ - "8990fd14c0787caa07225017108edb8031eca899", + "1aee495fe194fb3defb1b3296564bd90a76e264a", [ null, {} ] ], "image-removed-before-load.html": [ - "b4e92b4e9a5c8aaa24a590ad272eda6c14c15bf8", + "3e557a4fdc77266e8462047dc03658ac450ad79f", [ null, {} ] ], "image-src-change.html": [ - "f35d803025702d2e9ad7e1c94d4e0b5bd925b40c", + "e0701a2169b3860af4441a2562402bda284db34f", [ null, {} @@ -626758,21 +628388,21 @@ ] ], "image-upscaling.html": [ - "5cb3767ca7d29a30103797c8c8abe1c692787466", + "b3ce16f03f9f0131139bd0faef219a86a7c855a3", [ null, {} ] ], "initially-invisible-images.html": [ - "d0bede67614ac3b0ca413dbc380457f32ab0d1f0", + "b4d68a5cb9230232781b88bf1f37b8c19a38e35e", [ null, {} ] ], "invisible-images-composited-1.html": [ - "7723d2f2bea5b622395e09ae1bd7fd4bb6cf87bc", + "6b33c425b7d52531eeab9bb25cd51916f3f9494e", [ null, {} @@ -626807,7 +628437,7 @@ ] ], "loadTime-after-appendChild.html": [ - "2d19e73e60ff44d1a593f3338a3cc8120bf3ab20", + "52d8f0663b692f76c494c44d56f2b6960e94201b", [ null, {} @@ -626839,7 +628469,7 @@ ] ], "multiple-redirects-TAO.html": [ - "50130eebb2f2f141ef7076f779210bf19fee9710", + "b9745176bd2334b439307b6fc401b4f3288df432", [ null, {} @@ -626881,7 +628511,7 @@ ] ], "observe-css-generated-text.html": [ - "d4f10fb6babce14f7ea35a70ce5bb8ff6f859dc5", + "21ae68585ba8d6cec795c89c7104480e408ca237", [ null, {} @@ -626937,14 +628567,14 @@ ] ], "redirects-tao-star.html": [ - "f01c2496c0673feb4d4ee4821e4ad51b5a79cd49", + "5607ed792e8640da86ee554a486a1b749861fdb3", [ null, {} ] ], "repeated-image.html": [ - "a28409a848cc39bb1aeed87eb0d6e0117e2529f5", + "c69cc5b615bfb48815790232a1c96b352e5c8e51", [ null, {} @@ -626993,7 +628623,7 @@ ] ], "video-poster.html": [ - "b3a291886308da132ca07a46850ae71a615b9f26", + "fdc691819bd302e7f37226abe44abfe62a779d06", [ null, {} @@ -640419,7 +642049,7 @@ ] ], "permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html": [ - "daa47efb679dd0d24321b424447d0089e647f326", + "9d98d1abcca5780a750620987449f227f38c311e", [ null, {} @@ -642980,7 +644610,7 @@ } ] ], - "prefetch-headers.html": [ + "prefetch-headers.https.html": [ "0a475c7d7735cb535f24b62339fdd42d4d5443cb", [ null, @@ -642994,7 +644624,7 @@ {} ] ], - "prefetch-types.html": [ + "prefetch-types.https.html": [ "276439e5440b2157eb2bfaf6a2fbe8b4ec05b3ff", [ null, @@ -659153,6 +660783,15 @@ ] }, "screen-wake-lock": { + "chrome-bug-1348019.https.html": [ + "7c9909581ca3974c375397797d241f64301885ea", + [ + null, + { + "testdriver": true + } + ] + ], "idlharness.https.window.js": [ "6509d9c70e25785ef5779e954c834f567fbdb42c", [ @@ -659378,7 +661017,7 @@ ] ], "animation-timeline-ignored.tentative.html": [ - "32cb89c4ef8ba42416be57ca015215557451c559", + "54a6257f343e61574a8f393c08a54de13bb7b0c9", [ null, {} @@ -659399,7 +661038,7 @@ ] ], "animation-timeline-named-scroll-progress-timeline.tentative.html": [ - "30461723386a2e5c0440856664ff49b2cfd380e6", + "ed2c32d31e97bfbe8e5836a382a3a5b116c5ce29", [ null, {} @@ -659483,7 +661122,7 @@ ] ], "scroll-timeline-attachment.html": [ - "78ca257437322a5b24281f9bd45cffabf728cad2", + "96033859e29ed624921361110fc2fdbaa546179c", [ null, {} @@ -659518,7 +661157,7 @@ ] ], "scroll-timeline-dynamic.tentative.html": [ - "b0880a7cc5ac8f831fdb1fd29fd477935f3a3fe9", + "0d951e7b139c1d219284398c386e81a2753a281a", [ null, {} @@ -659573,6 +661212,13 @@ {} ] ], + "scroll-timeline-nearest-with-absolute-positioned-element.html": [ + "7fe2d12be30cdcfadfa5f6f30cb324a31565f390", + [ + null, + {} + ] + ], "scroll-timeline-paused-animations.html": [ "54518a5e871e59a8839bba708872c70dccb3f276", [ @@ -659679,7 +661325,7 @@ ] ], "view-timeline-attachment.html": [ - "47f4444b0dcad286f9a9d538e0e85d05623c3ea3", + "ff98ed78258c47f58678f3f00f5fb04eb3678f82", [ null, {} @@ -659700,7 +661346,7 @@ ] ], "view-timeline-dynamic.html": [ - "74da8850d467e74c83401abcc459ddbce2b2720f", + "76a30ad56603771c67b2325d2e13aed4a654b658", [ null, {} @@ -659964,7 +661610,7 @@ ] ], "setting-timeline.tentative.html": [ - "69b40cb6c4974dc21d35ded4892dfc815b9043b0", + "34d9af2bff17cb4cced9e7b975f99a190c1f57d6", [ null, {} @@ -660015,7 +661661,7 @@ ] ], "change-animation-range-updates-play-state.html": [ - "ecc80aea72a847a624a291c3db64d35b0c4777ff", + "53330d32f1f4b8a14a72b652ae9c486d1368c5da", [ null, {} @@ -664674,6 +666320,15 @@ {} ] ], + "partitioned-cookies.tentative.https.html": [ + "6744edc0eac6df3f618f4b5568686b8695a54889", + [ + null, + { + "timeout": "long" + } + ] + ], "partitioned-getRegistrations.tentative.https.html": [ "7c4d4f1e028b3966afdcfef10c060aefee54e344", [ @@ -666203,7 +667858,7 @@ ] ], "offsetTop-offsetLeft-across-shadow-boundaries.html": [ - "6b53c4ec06ce439c486e1f2e9950ba1e69cbbdbf", + "50a85afcbc1cbbfce6c06d0180afe7cd87255e54", [ null, {} @@ -677733,7 +679388,7 @@ "trust-tokens": { "end-to-end": { "has-trust-token-with-no-top-frame.tentative.https.html": [ - "587c641d8dca9ef5ce17f169cdd2e4430d2ac144", + "a384bec3c26d644ad9e993a965d58ed439e5abb3", [ null, {} @@ -690017,7 +691672,7 @@ ] ], "audioworkletnode-onerror.https.html": [ - "5bbb7304d9797b3154066e567b6f5da2ef85541d", + "95126a8c867787852583add14849efacde1dcaa4", [ null, {} @@ -690814,7 +692469,7 @@ ] ], "periodicWave.html": [ - "9048b7f5dad775cfa55e4749ad7057bf1636efc5", + "fe42f8ad50484d4f09a4aa4d15cbd93336f51b92", [ null, {} @@ -691469,6 +693124,24 @@ } ] ], + "audio-encoder-codec-specific.https.any.js": [ + "28c75d2a606679f605a7063aeeed57134c3f65fb", + [ + "webcodecs/audio-encoder-codec-specific.https.any.html", + { + "script_metadata": [ + [ + "global", + "window" + ], + [ + "script", + "/webcodecs/utils.js" + ] + ] + } + ] + ], "audio-encoder-config.https.any.js": [ "52ff3dc16e6c093b9867a9498b85f41377cb901f", [ @@ -695464,7 +697137,7 @@ ], "broadcastchannel": { "basics.any.js": [ - "68b4706028f5aaf29a78b123ad144a72656cfbe1", + "eec09d65a3aba27feb44bd330e0b5bf9dfdd96a2", [ "webmessaging/broadcastchannel/basics.any.html", {} @@ -696517,7 +698190,7 @@ ] ], "concat.https.any.js": [ - "07a1289cef0add6581aaeb859881aadf68c81261", + "b91e99e289e8ec3dbb7ef37ef189f54316b351c2", [ "webnn/concat.https.any.html", { @@ -696771,6 +698444,57 @@ } ] ], + "elu.https.any.js": [ + "57b624b5daa50e72ab87af69c22e61051c1c72e2", + [ + "webnn/elu.https.any.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API elu operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "webnn/elu.https.any.worker.html", + { + "script_metadata": [ + [ + "title", + "test WebNN API elu operation" + ], + [ + "global", + "window,dedicatedworker" + ], + [ + "script", + "./resources/utils.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "gemm.https.any.js": [ "179a1649b6e3077ba0cfd73bbce449d9683d461f", [ @@ -697290,7 +699014,7 @@ ] ], "reshape.https.any.js": [ - "9fa3262fe5240c549cf12e6cc39fad56e8bd7d88", + "a7126e63a1028c49036addb2c6e0449256cf2903", [ "webnn/reshape.https.any.html", { @@ -697392,7 +699116,7 @@ ] ], "slice.https.any.js": [ - "e8b130d5f22b71ab79ed97087b3b643c5e8af2f3", + "5e188af5352fe1bef6c5a6260495df8a0cc0e124", [ "webnn/slice.https.any.html", { @@ -711455,7 +713179,7 @@ ] ], "event_constructor.window.js": [ - "ba7dd919654e5aa54307739ceb366d24ddaf6c07", + "13f4ca5e97ca45fd8ec4e55a4b955184e3414017", [ "webstorage/event_constructor.window.html", {} @@ -711790,7 +713514,7 @@ }, "webtransport": { "close.https.any.js": [ - "b6b367badf5c75e758bd23b35b8f2a41f09fdff4", + "642d716a10342ad46ba2c852713e3360cfc5ca03", [ "webtransport/close.https.any.html", { @@ -711810,8 +713534,13 @@ [ "script", "/common/utils.js" + ], + [ + "timeout", + "long" ] - ] + ], + "timeout": "long" } ], [ @@ -711833,8 +713562,13 @@ [ "script", "/common/utils.js" + ], + [ + "timeout", + "long" ] - ] + ], + "timeout": "long" } ], [ @@ -711856,8 +713590,13 @@ [ "script", "/common/utils.js" + ], + [ + "timeout", + "long" ] - ] + ], + "timeout": "long" } ], [ @@ -711879,13 +713618,18 @@ [ "script", "/common/utils.js" + ], + [ + "timeout", + "long" ] - ] + ], + "timeout": "long" } ] ], "connect.https.any.js": [ - "93df5fe3f478df382918a49368d1a3ad0c5242aa", + "6bd18ae8de4e0bcdcee35ac9b49a1603550dc40c", [ "webtransport/connect.https.any.html", { @@ -711901,8 +713645,13 @@ [ "script", "resources/webtransport-test-helpers.sub.js" + ], + [ + "timeout", + "long" ] - ] + ], + "timeout": "long" } ], [ @@ -711920,8 +713669,13 @@ [ "script", "resources/webtransport-test-helpers.sub.js" + ], + [ + "timeout", + "long" ] - ] + ], + "timeout": "long" } ], [ @@ -711939,8 +713693,13 @@ [ "script", "resources/webtransport-test-helpers.sub.js" + ], + [ + "timeout", + "long" ] - ] + ], + "timeout": "long" } ], [ @@ -711958,8 +713717,13 @@ [ "script", "resources/webtransport-test-helpers.sub.js" + ], + [ + "timeout", + "long" ] - ] + ], + "timeout": "long" } ] ], @@ -715687,7 +717451,7 @@ ] ], "Worker_dispatchEvent_ErrorEvent.htm": [ - "11ade6050574fc10840a6ca6d85b340fa778b9ea", + "7ba56b89ecf16a3517cf3ee69ad2bb51a5233c80", [ null, {} @@ -743914,8 +745678,15 @@ {} ] ], + "arguments.py": [ + "81f90368279642b3c8562740aaea72da58b0815a", + [ + null, + {} + ] + ], "invalid.py": [ - "6a87d5c2fa7a5c1423be24d43255cd5fd10dbee1", + "54440ff67804b693afd3bae40f0f347e4131f7c7", [ null, {} @@ -743931,7 +745702,7 @@ }, "call_function": { "arguments.py": [ - "daf31fc869c3dab31218b508cf4b24b6a084f78a", + "9d2df76a7563997c76c885a57167f2949eba3745", [ null, {} @@ -743966,7 +745737,7 @@ ] ], "invalid.py": [ - "015fd40cf90ba3f1f07730d5feb39c547f3bfe13", + "234699abb91de226467ee89c2897070dc97e7c39", [ null, {} @@ -744022,7 +745793,7 @@ ] ], "this.py": [ - "17501b4ea5236a0d348f4e5b38819b17609ec5fd", + "baa4e65b28560f85d76aefded41d9365fad5a0fd", [ null, {} @@ -744184,6 +745955,15 @@ ] ] }, + "message": { + "message.py": [ + "4270dcc292d009f6efeb089449b0423fca6b263e", + [ + null, + {} + ] + ] + }, "remove_preload_script": { "invalid.py": [ "f32c5f57cac33c3b367e4b61a7d85def0c08321a", @@ -744840,7 +746620,7 @@ }, "get_computed_role": { "get.py": [ - "8d15e8fb90ddda39c13836134d179ca7cb5cc7fe", + "51b6a8b3b6d1e302be8885e4b2976cc0c02ff4bd", [ null, {} @@ -745371,14 +747151,14 @@ }, "perform_actions": { "key.py": [ - "eef0ab96f4bfaed7ec3736f148f2e858041274ba", + "6730b1c18bf761473be2cf1a54eed5f35b0a64e5", [ null, {} ] ], "key_events.py": [ - "9f912684c76f4e6b7347c8a08a8b9e9559d6d6bd", + "472fb54c28509cb936b98ee5c299288776a182e1", [ null, { @@ -745387,14 +747167,14 @@ ] ], "key_modifiers.py": [ - "e8ea30dd3d7d0be7ceddab672554fd871457bf7a", + "652106f46c2d3910b81afa6a795ae01a96524077", [ null, {} ] ], "key_shortcuts.py": [ - "b5ad7a21739ef1e3e62394b86ad29cb054d21500", + "46bc3c43390c5b178ff5a03b5f2cb2f8adb113a0", [ null, {} @@ -745415,7 +747195,7 @@ ] ], "pointer_contextmenu.py": [ - "50f684327f2ab044905cbd3b0da59336ead25f20", + "2e06e8ca59fea429ad00093100c2fb1094263032", [ null, {} @@ -745429,7 +747209,7 @@ ] ], "pointer_modifier_click.py": [ - "28c4086e0f8c99d9350523b8a29478b7c54fa17e", + "ffba6fc306b6913375fe0c229363ef08444252cd", [ null, {} diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-001.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-001.html.ini deleted file mode 100644 index 0842d0b5727..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-001.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[hit-test-floats-001.html] - [hit-test-floats-001] - expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini new file mode 100644 index 00000000000..968f62a2553 --- /dev/null +++ b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini @@ -0,0 +1,3 @@ +[hit-test-floats-002.html] + [Hit test float] + expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini deleted file mode 100644 index 665ec4646cb..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[hit-test-floats-003.html] - [Miss float below something else] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini index 665ec4646cb..13bd6abf376 100644 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini +++ b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini @@ -1,3 +1,3 @@ -[hit-test-floats-003.html] +[hit-test-floats-004.html] [Miss float below something else] expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini deleted file mode 100644 index 147f062e548..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[hit-test-floats-005.html] - [Miss clipped float] - expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/linebox/inline-negative-margin-001.html.ini b/tests/wpt/metadata/css/CSS2/linebox/inline-negative-margin-001.html.ini index 5e3a96e5999..a057f038339 100644 --- a/tests/wpt/metadata/css/CSS2/linebox/inline-negative-margin-001.html.ini +++ b/tests/wpt/metadata/css/CSS2/linebox/inline-negative-margin-001.html.ini @@ -8,5 +8,8 @@ [[data-expected-height\] 3] expected: FAIL - [[data-expected-height\] 4] + [[data-expected-height\] 1] + expected: FAIL + + [[data-expected-height\] 2] expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini b/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini index 51432362d66..ee34bc91078 100644 --- a/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini +++ b/tests/wpt/metadata/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini @@ -1,3 +1,6 @@ [block-in-inline-hittest-002.html] [elementsFromPoint] expected: FAIL + + [elementFromPoint] + expected: FAIL diff --git a/tests/wpt/metadata/css/compositing/isolation/animation/isolation-no-interpolation.html.ini b/tests/wpt/metadata/css/compositing/isolation/animation/isolation-no-interpolation.html.ini new file mode 100644 index 00000000000..b5a1c83b7a5 --- /dev/null +++ b/tests/wpt/metadata/css/compositing/isolation/animation/isolation-no-interpolation.html.ini @@ -0,0 +1,84 @@ +[isolation-no-interpolation.html] + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [CSS Transitions: property <isolation> from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (-0.3) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (0) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (0.3) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property <isolation> from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [CSS Animations: property <isolation> from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [Web Animations: property <isolation> from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-align/animation/justify-no-interpolation.html.ini b/tests/wpt/metadata/css/css-align/animation/justify-no-interpolation.html.ini new file mode 100644 index 00000000000..a7fe12e3e2d --- /dev/null +++ b/tests/wpt/metadata/css/css-align/animation/justify-no-interpolation.html.ini @@ -0,0 +1,168 @@ +[justify-no-interpolation.html] + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-items> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (-0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (0) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-items> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-items> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-items> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property <justify-self> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (-0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (0) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property <justify-self> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Animations: property <justify-self> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [Web Animations: property <justify-self> from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-animations/parsing/animation-range-end-computed.html.ini b/tests/wpt/metadata/css/css-animations/parsing/animation-range-end-computed.html.ini index 3bbd76c76c1..93eec7d3388 100644 --- a/tests/wpt/metadata/css/css-animations/parsing/animation-range-end-computed.html.ini +++ b/tests/wpt/metadata/css/css-animations/parsing/animation-range-end-computed.html.ini @@ -79,3 +79,12 @@ [Property animation-range-end value 'exit'] expected: FAIL + + [Property animation-range-end value '0'] + expected: FAIL + + [Property animation-range-end value '120%'] + expected: FAIL + + [Property animation-range-end value '120px'] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-animations/parsing/animation-range-end-valid.html.ini b/tests/wpt/metadata/css/css-animations/parsing/animation-range-end-valid.html.ini index 51b44a642da..f8944b438e7 100644 --- a/tests/wpt/metadata/css/css-animations/parsing/animation-range-end-valid.html.ini +++ b/tests/wpt/metadata/css/css-animations/parsing/animation-range-end-valid.html.ini @@ -73,3 +73,12 @@ [e.style['animation-range-end'\] = "exit" should set the property value] expected: FAIL + + [e.style['animation-range-end'\] = "0" should set the property value] + expected: FAIL + + [e.style['animation-range-end'\] = "120%" should set the property value] + expected: FAIL + + [e.style['animation-range-end'\] = "120px" should set the property value] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-animations/parsing/animation-range-shorthand.html.ini b/tests/wpt/metadata/css/css-animations/parsing/animation-range-shorthand.html.ini index 9f659627628..363f43e3af5 100644 --- a/tests/wpt/metadata/css/css-animations/parsing/animation-range-shorthand.html.ini +++ b/tests/wpt/metadata/css/css-animations/parsing/animation-range-shorthand.html.ini @@ -325,3 +325,51 @@ [e.style['animation-range'\] = "exit calc(10% + 50px)" should not set unrelated longhands] expected: FAIL + + [e.style['animation-range'\] = "50% exit 50%" should set the property value] + expected: FAIL + + [e.style['animation-range'\] = "normal 100px" should set the property value] + expected: FAIL + + [e.style['animation-range'\] = "100px" should set the property value] + expected: FAIL + + [e.style['animation-range'\] = "100px normal" should set the property value] + expected: FAIL + + [e.style['animation-range'\] = "10% normal" should set the property value] + expected: FAIL + + [Property animation-range value '10em exit 20em'] + expected: FAIL + + [Property animation-range value 'normal 100px'] + expected: FAIL + + [Property animation-range value '100px'] + expected: FAIL + + [Property animation-range value '100px normal'] + expected: FAIL + + [Property animation-range value '10% normal'] + expected: FAIL + + [e.style['animation-range'\] = "100px" should set animation-range-end] + expected: FAIL + + [e.style['animation-range'\] = "100px" should set animation-range-start] + expected: FAIL + + [e.style['animation-range'\] = "100px" should not set unrelated longhands] + expected: FAIL + + [e.style['animation-range'\] = "10%" should set animation-range-end] + expected: FAIL + + [e.style['animation-range'\] = "10%" should set animation-range-start] + expected: FAIL + + [e.style['animation-range'\] = "10%" should not set unrelated longhands] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-animations/parsing/animation-range-start-computed.html.ini b/tests/wpt/metadata/css/css-animations/parsing/animation-range-start-computed.html.ini index c207d2c402c..2b898df520c 100644 --- a/tests/wpt/metadata/css/css-animations/parsing/animation-range-start-computed.html.ini +++ b/tests/wpt/metadata/css/css-animations/parsing/animation-range-start-computed.html.ini @@ -79,3 +79,12 @@ [Property animation-range-start value 'exit'] expected: FAIL + + [Property animation-range-start value '0'] + expected: FAIL + + [Property animation-range-start value '120%'] + expected: FAIL + + [Property animation-range-start value '120px'] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-animations/parsing/animation-range-start-valid.html.ini b/tests/wpt/metadata/css/css-animations/parsing/animation-range-start-valid.html.ini index d9d0349423b..6c7d9a056e8 100644 --- a/tests/wpt/metadata/css/css-animations/parsing/animation-range-start-valid.html.ini +++ b/tests/wpt/metadata/css/css-animations/parsing/animation-range-start-valid.html.ini @@ -73,3 +73,12 @@ [e.style['animation-range-start'\] = "exit" should set the property value] expected: FAIL + + [e.style['animation-range-start'\] = "0" should set the property value] + expected: FAIL + + [e.style['animation-range-start'\] = "120%" should set the property value] + expected: FAIL + + [e.style['animation-range-start'\] = "120px" should set the property value] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-color/animation/opacity-animation-ending-correctly-002.html.ini b/tests/wpt/metadata/css/css-color/animation/opacity-animation-ending-correctly-002.html.ini new file mode 100644 index 00000000000..eb3cf41a070 --- /dev/null +++ b/tests/wpt/metadata/css/css-color/animation/opacity-animation-ending-correctly-002.html.ini @@ -0,0 +1,2 @@ +[opacity-animation-ending-correctly-002.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-images/animation/image-no-interpolation.html.ini b/tests/wpt/metadata/css/css-images/animation/image-no-interpolation.html.ini new file mode 100644 index 00000000000..99eaa1f1ad0 --- /dev/null +++ b/tests/wpt/metadata/css/css-images/animation/image-no-interpolation.html.ini @@ -0,0 +1,114 @@ +[image-no-interpolation.html] + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [CSS Transitions: property <image-orientation> from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (-0.3) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (0) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (0.3) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-orientation> from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [CSS Animations: property <image-orientation> from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [Web Animations: property <image-orientation> from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-rendering> from [initial\] to [pixelated\] at (-0.3) should be [pixelated\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-rendering> from [initial\] to [pixelated\] at (0) should be [pixelated\]] + expected: FAIL + + [CSS Transitions with transition: all: property <image-rendering> from [initial\] to [pixelated\] at (0.3) should be [pixelated\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (0.5) should be [pixelated\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (0.6) should be [pixelated\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (1) should be [pixelated\]] + expected: FAIL + + [Web Animations: property <image-rendering> from [initial\] to [pixelated\] at (1.5) should be [pixelated\]] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/animation/object-position-interpolation.html.ini b/tests/wpt/metadata/css/css-images/animation/object-position-interpolation.html.ini new file mode 100644 index 00000000000..bba280ebef4 --- /dev/null +++ b/tests/wpt/metadata/css/css-images/animation/object-position-interpolation.html.ini @@ -0,0 +1,336 @@ +[object-position-interpolation.html] + [CSS Transitions: property <object-position> from neutral to [left top\] at (-0.25) should be [62.5% 62.5%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from neutral to [left top\] at (0) should be [50% 50%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from neutral to [left top\] at (0.25) should be [37.5% 37.5%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from neutral to [left top\] at (0.5) should be [25% 25%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from neutral to [left top\] at (0.75) should be [12.5% 12.5%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from neutral to [left top\] at (1) should be [0% 0%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from neutral to [left top\] at (1.25) should be [-12.5% -12.5%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from neutral to [left top\] at (-0.25) should be [62.5% 62.5%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from neutral to [left top\] at (0) should be [50% 50%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from neutral to [left top\] at (0.25) should be [37.5% 37.5%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from neutral to [left top\] at (0.5) should be [25% 25%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from neutral to [left top\] at (0.75) should be [12.5% 12.5%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from neutral to [left top\] at (1) should be [0% 0%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from neutral to [left top\] at (1.25) should be [-12.5% -12.5%\]] + expected: FAIL + + [CSS Animations: property <object-position> from neutral to [left top\] at (-0.25) should be [62.5% 62.5%\]] + expected: FAIL + + [CSS Animations: property <object-position> from neutral to [left top\] at (0) should be [50% 50%\]] + expected: FAIL + + [CSS Animations: property <object-position> from neutral to [left top\] at (0.25) should be [37.5% 37.5%\]] + expected: FAIL + + [CSS Animations: property <object-position> from neutral to [left top\] at (0.5) should be [25% 25%\]] + expected: FAIL + + [CSS Animations: property <object-position> from neutral to [left top\] at (0.75) should be [12.5% 12.5%\]] + expected: FAIL + + [CSS Animations: property <object-position> from neutral to [left top\] at (1) should be [0% 0%\]] + expected: FAIL + + [CSS Animations: property <object-position> from neutral to [left top\] at (1.25) should be [-12.5% -12.5%\]] + expected: FAIL + + [Web Animations: property <object-position> from neutral to [left top\] at (-0.25) should be [62.5% 62.5%\]] + expected: FAIL + + [Web Animations: property <object-position> from neutral to [left top\] at (0) should be [50% 50%\]] + expected: FAIL + + [Web Animations: property <object-position> from neutral to [left top\] at (0.25) should be [37.5% 37.5%\]] + expected: FAIL + + [Web Animations: property <object-position> from neutral to [left top\] at (0.5) should be [25% 25%\]] + expected: FAIL + + [Web Animations: property <object-position> from neutral to [left top\] at (0.75) should be [12.5% 12.5%\]] + expected: FAIL + + [Web Animations: property <object-position> from neutral to [left top\] at (1) should be [0% 0%\]] + expected: FAIL + + [Web Animations: property <object-position> from neutral to [left top\] at (1.25) should be [-12.5% -12.5%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [center top\] at (-0.25) should be [50% 62.5%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [center top\] at (0) should be [50% 50%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [center top\] at (0.25) should be [50% 37.5%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [center top\] at (0.5) should be [50% 25%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [center top\] at (0.75) should be [50% 12.5%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [center top\] at (1) should be [50% 0%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [center top\] at (1.25) should be [50% -12.5%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [center top\] at (-0.25) should be [50% 62.5%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [center top\] at (0) should be [50% 50%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [center top\] at (0.25) should be [50% 37.5%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [center top\] at (0.5) should be [50% 25%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [center top\] at (0.75) should be [50% 12.5%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [center top\] at (1) should be [50% 0%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [center top\] at (1.25) should be [50% -12.5%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [center top\] at (-0.25) should be [50% 62.5%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [center top\] at (0) should be [50% 50%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [center top\] at (0.25) should be [50% 37.5%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [center top\] at (0.5) should be [50% 25%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [center top\] at (0.75) should be [50% 12.5%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [center top\] at (1) should be [50% 0%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [center top\] at (1.25) should be [50% -12.5%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [center top\] at (-0.25) should be [50% 62.5%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [center top\] at (0) should be [50% 50%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [center top\] at (0.25) should be [50% 37.5%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [center top\] at (0.5) should be [50% 25%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [center top\] at (0.75) should be [50% 12.5%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [center top\] at (1) should be [50% 0%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [center top\] at (1.25) should be [50% -12.5%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [left center\] at (-0.25) should be [62.5% 50%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [left center\] at (0) should be [50% 50%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [left center\] at (0.25) should be [37.5% 50%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [left center\] at (0.5) should be [25% 50%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [left center\] at (0.75) should be [12.5% 50%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [left center\] at (1) should be [0% 50%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [initial\] to [left center\] at (1.25) should be [-12.5% 50%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [left center\] at (-0.25) should be [62.5% 50%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [left center\] at (0) should be [50% 50%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [left center\] at (0.25) should be [37.5% 50%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [left center\] at (0.5) should be [25% 50%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [left center\] at (0.75) should be [12.5% 50%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [left center\] at (1) should be [0% 50%\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [initial\] to [left center\] at (1.25) should be [-12.5% 50%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [left center\] at (-0.25) should be [62.5% 50%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [left center\] at (0) should be [50% 50%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [left center\] at (0.25) should be [37.5% 50%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [left center\] at (0.5) should be [25% 50%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [left center\] at (0.75) should be [12.5% 50%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [left center\] at (1) should be [0% 50%\]] + expected: FAIL + + [CSS Animations: property <object-position> from [initial\] to [left center\] at (1.25) should be [-12.5% 50%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [left center\] at (-0.25) should be [62.5% 50%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [left center\] at (0) should be [50% 50%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [left center\] at (0.25) should be [37.5% 50%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [left center\] at (0.5) should be [25% 50%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [left center\] at (0.75) should be [12.5% 50%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [left center\] at (1) should be [0% 50%\]] + expected: FAIL + + [Web Animations: property <object-position> from [initial\] to [left center\] at (1.25) should be [-12.5% 50%\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [20px 20px\] to [100px 100px\] at (-0.25) should be [0px 0px\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [20px 20px\] to [100px 100px\] at (0) should be [20px 20px\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [20px 20px\] to [100px 100px\] at (0.25) should be [40px 40px\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [20px 20px\] to [100px 100px\] at (0.5) should be [60px 60px\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [20px 20px\] to [100px 100px\] at (0.75) should be [80px 80px\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [20px 20px\] to [100px 100px\] at (1) should be [100px 100px\]] + expected: FAIL + + [CSS Transitions: property <object-position> from [20px 20px\] to [100px 100px\] at (1.25) should be [120px 120px\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [20px 20px\] to [100px 100px\] at (-0.25) should be [0px 0px\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [20px 20px\] to [100px 100px\] at (0) should be [20px 20px\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [20px 20px\] to [100px 100px\] at (0.25) should be [40px 40px\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [20px 20px\] to [100px 100px\] at (0.5) should be [60px 60px\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [20px 20px\] to [100px 100px\] at (0.75) should be [80px 80px\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [20px 20px\] to [100px 100px\] at (1) should be [100px 100px\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-position> from [20px 20px\] to [100px 100px\] at (1.25) should be [120px 120px\]] + expected: FAIL + + [CSS Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (-0.25) should be [0px 0px\]] + expected: FAIL + + [CSS Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (0) should be [20px 20px\]] + expected: FAIL + + [CSS Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (0.25) should be [40px 40px\]] + expected: FAIL + + [CSS Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (0.5) should be [60px 60px\]] + expected: FAIL + + [CSS Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (0.75) should be [80px 80px\]] + expected: FAIL + + [CSS Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (1) should be [100px 100px\]] + expected: FAIL + + [CSS Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (1.25) should be [120px 120px\]] + expected: FAIL + + [Web Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (-0.25) should be [0px 0px\]] + expected: FAIL + + [Web Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (0) should be [20px 20px\]] + expected: FAIL + + [Web Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (0.25) should be [40px 40px\]] + expected: FAIL + + [Web Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (0.5) should be [60px 60px\]] + expected: FAIL + + [Web Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (0.75) should be [80px 80px\]] + expected: FAIL + + [Web Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (1) should be [100px 100px\]] + expected: FAIL + + [Web Animations: property <object-position> from [20px 20px\] to [100px 100px\] at (1.25) should be [120px 120px\]] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/animation/object-view-box-interpolation.html.ini b/tests/wpt/metadata/css/css-images/animation/object-view-box-interpolation.html.ini new file mode 100644 index 00000000000..f2b138b2dcd --- /dev/null +++ b/tests/wpt/metadata/css/css-images/animation/object-view-box-interpolation.html.ini @@ -0,0 +1,144 @@ +[object-view-box-interpolation.html] + [CSS Transitions: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (0) should be [inset(0px)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (0.5) should be [inset(10px)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (1) should be [inset(20px)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (0) should be [inset(0px)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (0.5) should be [inset(10px)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (1) should be [inset(20px)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (0) should be [inset(0px)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (0.5) should be [inset(10px)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (1) should be [inset(20px)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (0) should be [inset(0px)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (0.5) should be [inset(10px)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [inset(0px)\] to [inset(20px)\] at (1) should be [inset(20px)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (0) should be [inset(0%)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (0.5) should be [inset(10%)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (1) should be [inset(20%)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (0) should be [inset(0%)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (0.5) should be [inset(10%)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (1) should be [inset(20%)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (0) should be [inset(0%)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (0.5) should be [inset(10%)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (1) should be [inset(20%)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (0) should be [inset(0%)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (0.5) should be [inset(10%)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [inset(0%)\] to [inset(20%)\] at (1) should be [inset(20%)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (0) should be [rect(0px 10px 20px 30px)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (0.5) should be [rect(5px 15px 25px 35px)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (1) should be [rect(10px 20px 30px 40px)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (0) should be [rect(0px 10px 20px 30px)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (0.5) should be [rect(5px 15px 25px 35px)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (1) should be [rect(10px 20px 30px 40px)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (0) should be [rect(0px 10px 20px 30px)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (0.5) should be [rect(5px 15px 25px 35px)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (1) should be [rect(10px 20px 30px 40px)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (0) should be [rect(0px 10px 20px 30px)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (0.5) should be [rect(5px 15px 25px 35px)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [rect(0px 10px 20px 30px)\] to [rect(10px 20px 30px 40px)\] at (1) should be [rect(10px 20px 30px 40px)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (0) should be [xywh(0px 10px 20px 30px)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (0.5) should be [xywh(5px 15px 25px 35px)\]] + expected: FAIL + + [CSS Transitions: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (1) should be [xywh(10px 20px 30px 40px)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (0) should be [xywh(0px 10px 20px 30px)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (0.5) should be [xywh(5px 15px 25px 35px)\]] + expected: FAIL + + [CSS Transitions with transition: all: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (1) should be [xywh(10px 20px 30px 40px)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (0) should be [xywh(0px 10px 20px 30px)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (0.5) should be [xywh(5px 15px 25px 35px)\]] + expected: FAIL + + [CSS Animations: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (1) should be [xywh(10px 20px 30px 40px)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (0) should be [xywh(0px 10px 20px 30px)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (0.5) should be [xywh(5px 15px 25px 35px)\]] + expected: FAIL + + [Web Animations: property <object-view-box> from [xywh(0px 10px 20px 30px)\] to [xywh(10px 20px 30px 40px)\] at (1) should be [xywh(10px 20px 30px 40px)\]] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/animations/hyphen-no-interpolation.html.ini b/tests/wpt/metadata/css/css-text/animations/hyphen-no-interpolation.html.ini new file mode 100644 index 00000000000..8002dbb452e --- /dev/null +++ b/tests/wpt/metadata/css/css-text/animations/hyphen-no-interpolation.html.ini @@ -0,0 +1,252 @@ +[hyphen-no-interpolation.html] + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-character> from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (-0.3) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (0) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (0.3) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-character> from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [CSS Animations: property <hyphenate-character> from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [Web Animations: property <hyphenate-character> from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [CSS Transitions: property <hyphenate-limit-chars> from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (-0.3) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (0) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.3) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphenate-limit-chars> from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [CSS Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [Web Animations: property <hyphenate-limit-chars> from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [CSS Transitions: property <hyphens> from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (-0.3) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (0) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (0.3) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property <hyphens> from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [CSS Animations: property <hyphens> from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [Web Animations: property <hyphens> from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/animations/line-break-no-interpolation.html.ini b/tests/wpt/metadata/css/css-text/animations/line-break-no-interpolation.html.ini new file mode 100644 index 00000000000..d883f52a121 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/animations/line-break-no-interpolation.html.ini @@ -0,0 +1,84 @@ +[line-break-no-interpolation.html] + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [CSS Transitions: property <line-break> from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (-0.3) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (0) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (0.3) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property <line-break> from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property <line-break> from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [Web Animations: property <line-break> from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini b/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini index cfd069eec6c..25cee5c527d 100644 --- a/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini +++ b/tests/wpt/metadata/css/css-transitions/properties-value-inherit-002.html.ini @@ -326,3 +326,153 @@ [margin-right length(mm) / values] expected: [FAIL, PASS] + + [color color(rgba) / values] + expected: FAIL + + [font-size length(pt) / values] + expected: FAIL + + [font-size length(pc) / values] + expected: FAIL + + [font-size length(px) / values] + expected: FAIL + + [font-size length(em) / values] + expected: FAIL + + [font-size length(ex) / values] + expected: FAIL + + [font-size length(mm) / values] + expected: FAIL + + [font-size length(cm) / values] + expected: FAIL + + [font-size length(in) / values] + expected: FAIL + + [font-size percentage(%) / values] + expected: FAIL + + [font-weight font-weight(keyword) / values] + expected: FAIL + + [font-weight font-weight(numeric) / values] + expected: FAIL + + [line-height number(integer) / values] + expected: FAIL + + [line-height number(decimal) / values] + expected: FAIL + + [line-height length(pt) / values] + expected: FAIL + + [line-height length(pc) / values] + expected: FAIL + + [line-height length(px) / values] + expected: FAIL + + [line-height length(em) / values] + expected: FAIL + + [line-height length(ex) / values] + expected: FAIL + + [line-height length(mm) / values] + expected: FAIL + + [line-height length(cm) / values] + expected: FAIL + + [line-height length(in) / values] + expected: FAIL + + [line-height percentage(%) / values] + expected: FAIL + + [letter-spacing length(pt) / values] + expected: FAIL + + [letter-spacing length(pc) / values] + expected: FAIL + + [letter-spacing length(px) / values] + expected: FAIL + + [letter-spacing length(em) / values] + expected: FAIL + + [letter-spacing length(ex) / values] + expected: FAIL + + [letter-spacing length(mm) / values] + expected: FAIL + + [letter-spacing length(cm) / values] + expected: FAIL + + [letter-spacing length(in) / values] + expected: FAIL + + [word-spacing length(pt) / values] + expected: FAIL + + [word-spacing length(pc) / values] + expected: FAIL + + [word-spacing length(px) / values] + expected: FAIL + + [word-spacing length(em) / values] + expected: FAIL + + [word-spacing length(ex) / values] + expected: FAIL + + [word-spacing length(mm) / values] + expected: FAIL + + [word-spacing length(cm) / values] + expected: FAIL + + [word-spacing length(in) / values] + expected: FAIL + + [word-spacing percentage(%) / values] + expected: FAIL + + [text-indent length(pt) / values] + expected: FAIL + + [text-indent length(pc) / values] + expected: FAIL + + [text-indent length(px) / values] + expected: FAIL + + [text-indent length(em) / values] + expected: FAIL + + [text-indent length(ex) / values] + expected: FAIL + + [text-indent length(mm) / values] + expected: FAIL + + [text-indent length(cm) / values] + expected: FAIL + + [text-indent length(in) / values] + expected: FAIL + + [text-indent percentage(%) / values] + expected: FAIL + + [text-shadow shadow(shadow) / values] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini deleted file mode 100644 index 72b09371038..00000000000 --- a/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[elementFromPoint-001.html] - [CSSOM View - 5 - extensions to the Document interface] - expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini new file mode 100644 index 00000000000..d1b2e9e0b54 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini @@ -0,0 +1,2 @@ +[elementFromPoint-dynamic-anon-box.html] + expected: CRASH diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-float-in-relative.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-float-in-relative.html.ini new file mode 100644 index 00000000000..7e9331b6bc2 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementFromPoint-float-in-relative.html.ini @@ -0,0 +1,3 @@ +[elementFromPoint-float-in-relative.html] + [elementFromPoint-float-in-relative] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-subpixel.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-subpixel.html.ini deleted file mode 100644 index 8f6f663ba61..00000000000 --- a/tests/wpt/metadata/css/cssom-view/elementFromPoint-subpixel.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[elementFromPoint-subpixel.html] - [Hit test top left corner of box] - expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-visibility-hidden-resizer.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-visibility-hidden-resizer.html.ini new file mode 100644 index 00000000000..a6bca7ac372 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementFromPoint-visibility-hidden-resizer.html.ini @@ -0,0 +1,3 @@ +[elementFromPoint-visibility-hidden-resizer.html] + [elementFromPoint on resizer area of an element with visibility:hidden] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-invalid-cases.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-invalid-cases.html.ini new file mode 100644 index 00000000000..a3496a40d07 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-invalid-cases.html.ini @@ -0,0 +1,3 @@ +[elementsFromPoint-invalid-cases.html] + [The root element is the last element returned for otherwise empty queries within the viewport] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/scroll-behavior-smooth-navigation.html.ini b/tests/wpt/metadata/css/cssom-view/scroll-behavior-smooth-navigation.html.ini deleted file mode 100644 index a3e30250229..00000000000 --- a/tests/wpt/metadata/css/cssom-view/scroll-behavior-smooth-navigation.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[scroll-behavior-smooth-navigation.html] - [Instant scrolling while doing history navigation.] - expected: FAIL - - [Smooth scrolling while doing history navigation.] - expected: FAIL diff --git a/tests/wpt/metadata/fetch/api/body/mime-type.any.js.ini b/tests/wpt/metadata/fetch/api/body/mime-type.any.js.ini new file mode 100644 index 00000000000..18bfbe1ca61 --- /dev/null +++ b/tests/wpt/metadata/fetch/api/body/mime-type.any.js.ini @@ -0,0 +1,82 @@ +[mime-type.any.worker.html] + expected: TIMEOUT + [Response: MIME type for Blob from empty body] + expected: TIMEOUT + + [Request: MIME type for Blob from empty body with Content-Type] + expected: NOTRUN + + [Response: MIME type for Blob from empty body with Content-Type] + expected: NOTRUN + + [Request: MIME type for Blob] + expected: NOTRUN + + [Response: MIME type for Blob] + expected: NOTRUN + + [Request: MIME type for Blob with non-empty type] + expected: NOTRUN + + [Response: MIME type for Blob with non-empty type] + expected: NOTRUN + + [Request: Extract a MIME type with clone] + expected: NOTRUN + + [Response: Extract a MIME type with clone] + expected: NOTRUN + + [Request: Content-Type in headers wins Blob"s type] + expected: NOTRUN + + [Response: Content-Type in headers wins Blob"s type] + expected: NOTRUN + + [Request: setting missing Content-Type in headers and it wins Blob"s type] + expected: NOTRUN + + [Response: setting missing Content-Type in headers and it wins Blob"s type] + expected: NOTRUN + + +[mime-type.any.html] + expected: TIMEOUT + [Response: MIME type for Blob from empty body] + expected: TIMEOUT + + [Request: MIME type for Blob from empty body with Content-Type] + expected: NOTRUN + + [Response: MIME type for Blob from empty body with Content-Type] + expected: NOTRUN + + [Request: MIME type for Blob] + expected: NOTRUN + + [Response: MIME type for Blob] + expected: NOTRUN + + [Request: MIME type for Blob with non-empty type] + expected: NOTRUN + + [Response: MIME type for Blob with non-empty type] + expected: NOTRUN + + [Request: Extract a MIME type with clone] + expected: NOTRUN + + [Response: Extract a MIME type with clone] + expected: NOTRUN + + [Request: Content-Type in headers wins Blob"s type] + expected: NOTRUN + + [Response: Content-Type in headers wins Blob"s type] + expected: NOTRUN + + [Request: setting missing Content-Type in headers and it wins Blob"s type] + expected: NOTRUN + + [Response: setting missing Content-Type in headers and it wins Blob"s type] + expected: NOTRUN diff --git a/tests/wpt/metadata/fetch/api/redirect/redirect-keepalive.any.js.ini b/tests/wpt/metadata/fetch/api/redirect/redirect-keepalive.any.js.ini new file mode 100644 index 00000000000..73c79c76452 --- /dev/null +++ b/tests/wpt/metadata/fetch/api/redirect/redirect-keepalive.any.js.ini @@ -0,0 +1,12 @@ +[redirect-keepalive.any.html] + [[keepalive\][new window\][unload\] same-origin redirect] + expected: FAIL + + [[keepalive\][new window\][unload\] same-origin redirect + preflight] + expected: FAIL + + [[keepalive\][new window\][unload\] cross-origin redirect] + expected: FAIL + + [[keepalive\][new window\][unload\] cross-origin redirect + preflight] + expected: FAIL diff --git a/tests/wpt/metadata/fetch/local-network-access/worker-blob-fetch.window.js.ini b/tests/wpt/metadata/fetch/local-network-access/worker-blob-fetch.window.js.ini index 25ca088668d..91d2464fca8 100644 --- a/tests/wpt/metadata/fetch/local-network-access/worker-blob-fetch.window.js.ini +++ b/tests/wpt/metadata/fetch/local-network-access/worker-blob-fetch.window.js.ini @@ -23,9 +23,6 @@ [treat-as-public to private: failure.] expected: FAIL - [treat-as-public to public: success.] - expected: FAIL - [local https to local https: success.] expected: FAIL diff --git a/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini b/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini index 36a410bfecb..0d48169e3cc 100644 --- a/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini +++ b/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini @@ -147,5 +147,5 @@ [list-style-image sec-fetch-site - HTTPS downgrade-upgrade] expected: FAIL - [border-image sec-fetch-site - HTTPS downgrade (header not sent)] - expected: FAIL + [background-image sec-fetch-site - HTTPS downgrade (header not sent)] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini index 6e9f7acf151..c8a3c8f9e68 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin.html.ini @@ -1,6 +1,6 @@ [scroll-restoration-fragment-scrolling-cross-origin.html] type: testharness - expected: TIMEOUT + expected: ERROR [Manual scroll restoration should take precedent over scrolling to fragment in cross origin navigation] expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini index dd7320bb46e..277436ffad2 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini @@ -1,10 +1,3 @@ [iframe-src-aboutblank-navigate-immediately.html] - expected: TIMEOUT [Navigating to a different document with window.open] expected: FAIL - - [Navigating to a different document with form submission] - expected: NOTRUN - - [Navigating to a different document with link click] - expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini index bcda478adb1..5a245d61359 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini @@ -1,10 +1,6 @@ [javascript-url-referrer.window.html] - expected: TIMEOUT [unsafe-url referrer policy used to create the starting page] expected: FAIL [origin referrer policy used to create the starting page] expected: FAIL - - [no-referrer referrer policy used to create the starting page] - expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini new file mode 100644 index 00000000000..49cc2e16746 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini @@ -0,0 +1,3 @@ +[navigation-unload-same-origin-fragment.html] + [Tests that a fragment navigation in the unload handler will not block the initial navigation] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini deleted file mode 100644 index 7dc346632a4..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini +++ /dev/null @@ -1,3 +0,0 @@ -[navigation-unload-same-origin.window.html] - [Same-origin navigation started from unload handler must be ignored] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini deleted file mode 100644 index 60a4fa51f8a..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[a-click.html] - [aElement.click() before the load event must NOT replace] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-image-in-popup.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-image-in-popup.html.ini new file mode 100644 index 00000000000..d993e8dcc42 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/read-media/pageload-image-in-popup.html.ini @@ -0,0 +1,3 @@ +[pageload-image-in-popup.html] + [The document for a standalone media file should have one child in the body.] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini new file mode 100644 index 00000000000..4b4820d1729 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini @@ -0,0 +1,3 @@ +[creating_browsing_context_test_01.html] + [first argument: absolute url] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini b/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini index 558ce5dcaa5..3613f3de8bf 100644 --- a/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini +++ b/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini @@ -1,4 +1,5 @@ [embedded-opener-remove-frame.html] + expected: CRASH [opener and "removed" embedded documents] expected: FAIL diff --git a/tests/wpt/metadata/html/dom/aria-element-reflection-disconnected.html.ini b/tests/wpt/metadata/html/dom/aria-element-reflection-disconnected.html.ini index 6181519f294..a9902efaec6 100644 --- a/tests/wpt/metadata/html/dom/aria-element-reflection-disconnected.html.ini +++ b/tests/wpt/metadata/html/dom/aria-element-reflection-disconnected.html.ini @@ -1,3 +1,9 @@ [aria-element-reflection-disconnected.html] [Element references should stay valid when content is disconnected] expected: FAIL + + [Element references should stay valid when content is disconnected (single element)] + expected: FAIL + + [Element references should stay valid when content is disconnected (element array)] + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/the-anchor-attribute-001.tentative.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-anchor-attribute-001.tentative.html.ini new file mode 100644 index 00000000000..c6d237ad786 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/global-attributes/the-anchor-attribute-001.tentative.html.ini @@ -0,0 +1,6 @@ +[the-anchor-attribute-001.tentative.html] + [The anchor attribute should position the target element next to its implicit anchor] + expected: FAIL + + [The element.anchorElement IDL should reflect the element pointed to by the anchor attribute] + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/the-anchor-attribute-002.tentative.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/the-anchor-attribute-002.tentative.html.ini new file mode 100644 index 00000000000..d8b0639bfd1 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/global-attributes/the-anchor-attribute-002.tentative.html.ini @@ -0,0 +1,6 @@ +[the-anchor-attribute-002.tentative.html] + [Layout should be updated when anchor attribute changes to another element] + expected: FAIL + + [Layout should be updated when anchor attribute changes to a non-existent element] + expected: FAIL diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index d169bd2e9fa..58a99633547 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,15 +1,19 @@ [supported-elements.html] + expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL [Element with tabindex should support autofocus] - expected: FAIL + expected: TIMEOUT [Host element with delegatesFocus including no focusable descendants should be skipped] - expected: FAIL + expected: NOTRUN [Area element should support autofocus] - expected: FAIL + expected: NOTRUN [Host element with delegatesFocus should support autofocus] - expected: FAIL + expected: NOTRUN + + [Non-HTMLElement should not support autofocus] + expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini index 25d9964f057..2d3fbf0f308 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini @@ -1,4 +1,5 @@ [iframe_sandbox_popups_escaping-1.html] type: testharness + expected: TIMEOUT [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini index 6f7461b9472..f9138fb999a 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini @@ -1,4 +1,5 @@ [iframe_sandbox_popups_nonescaping-1.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/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index d5fd800f09d..ff6467094b8 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/metadata/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/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini index 47b45e65a1c..3cdeb8ebcbc 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini @@ -1,9 +1,3 @@ [non-active-document.html] [DOMParser] expected: FAIL - - [createHTMLDocument] - expected: FAIL - - [<template>] - expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini new file mode 100644 index 00000000000..7682a4830bf --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini @@ -0,0 +1,4 @@ +[reparent-form-during-planned-navigation-task.html] + expected: TIMEOUT + [reparent-form-during-planned-navigation-task] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/semantics/forms/historical.html.ini b/tests/wpt/metadata/html/semantics/forms/historical.html.ini deleted file mode 100644 index 5d8289307cc..00000000000 --- a/tests/wpt/metadata/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/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-overlay-re-add-during-transition.html.ini b/tests/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-overlay-re-add-during-transition.html.ini new file mode 100644 index 00000000000..2d29b5ffff8 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-overlay-re-add-during-transition.html.ini @@ -0,0 +1,2 @@ +[dialog-overlay-re-add-during-transition.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html.ini b/tests/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html.ini new file mode 100644 index 00000000000..7b198642090 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html.ini @@ -0,0 +1,6 @@ +[dialog-overlay.html] + [dialog computed overlay initially 'none'] + expected: FAIL + + [Opening and closing a modal dialog changes computed overlay to 'auto' and back to 'none'] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/popovers/popover-move-documents.html.ini b/tests/wpt/metadata/html/semantics/popovers/popover-move-documents.html.ini new file mode 100644 index 00000000000..845b8a74add --- /dev/null +++ b/tests/wpt/metadata/html/semantics/popovers/popover-move-documents.html.ini @@ -0,0 +1,9 @@ +[popover-move-documents.html] + [Moving popovers between documents while showing should throw an exception.] + expected: FAIL + + [Moving popovers between documents while hiding should not throw an exception.] + expected: FAIL + + [Moving popovers between documents during light dismiss should throw an exception.] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/popovers/popover-overlay.html.ini b/tests/wpt/metadata/html/semantics/popovers/popover-overlay.html.ini new file mode 100644 index 00000000000..f3930b28ce9 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/popovers/popover-overlay.html.ini @@ -0,0 +1,12 @@ +[popover-overlay.html] + [dialog.show() should not put popover dialog in top layer] + expected: FAIL + + [dialog.showModal() should put popover dialog in top layer] + expected: FAIL + + [dialog.showPopover() should put popover dialog in top layer] + expected: FAIL + + [div.showPopover() should put popover div in top layer] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/popovers/popover-target-element-disabled.html.ini b/tests/wpt/metadata/html/semantics/popovers/popover-target-element-disabled.html.ini index 0273c7dae9a..fd5bb22a83f 100644 --- a/tests/wpt/metadata/html/semantics/popovers/popover-target-element-disabled.html.ini +++ b/tests/wpt/metadata/html/semantics/popovers/popover-target-element-disabled.html.ini @@ -22,3 +22,18 @@ [Modifying popovertarget on a button which doesn't break the chain shouldn't close any popovers.] expected: FAIL + + [Disabling popover*target buttons when popovers are open should not cause popovers to be closed.] + expected: FAIL + + [Setting the form attribute on popover*target buttons when popovers are open should not close them.] + expected: FAIL + + [Changing the input type on a popover*target button when popovers are open should not close anything.] + expected: FAIL + + [Disconnecting popover*target buttons when popovers are open should not close anything.] + expected: FAIL + + [Changing the popovertarget attribute to break the chain should not close anything.] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini new file mode 100644 index 00000000000..1181798bd79 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini @@ -0,0 +1,4 @@ +[async-script.html] + +[async-script.html?reload] + expected: ERROR diff --git a/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini b/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini new file mode 100644 index 00000000000..b8bdf33cb65 --- /dev/null +++ b/tests/wpt/metadata/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/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini new file mode 100644 index 00000000000..53acb938c1b --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini @@ -0,0 +1,3 @@ +[module-static-import-delayed.html] + [document.write in an imported module] + expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index e55f8f2ce3c..8845054116d 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -3,6 +3,3 @@ 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/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini b/tests/wpt/metadata/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/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini +++ b/tests/wpt/metadata/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/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini index 1d71471b73c..4a48dd15a9d 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini @@ -1,7 +1,6 @@ [promise-rejection-events.html] - expected: TIMEOUT [delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire] - expected: TIMEOUT + expected: FAIL [unhandledrejection: from createImageBitmap which is UA triggered] expected: FAIL diff --git a/tests/wpt/metadata/url/failure.html.ini b/tests/wpt/metadata/url/failure.html.ini index e739baf2ea5..9e541022c0a 100644 --- a/tests/wpt/metadata/url/failure.html.ini +++ b/tests/wpt/metadata/url/failure.html.ini @@ -1,5 +1,6 @@ [failure.html] type: testharness + expected: CRASH [Test URL parser failure consistency] expected: FAIL diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini index eed03df37f3..b7537329068 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini @@ -1,4 +1,5 @@ [audiocontext-not-fully-active.html] + expected: TIMEOUT [frame in navigated remote-site frame] expected: FAIL diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html.ini index bf50e77e178..db601391263 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html.ini @@ -3,3 +3,11 @@ [\n Test onprocessorerror handler in AudioWorkletNode\n ] expected: FAIL + [Test if |onprocessorerror| is called for an exception thrown from the processor constructor.] + expected: NOTRUN + + [Test if |onprocessorerror| is called for a transfered object that cannot be deserialized on the AudioWorkletGlobalScope.] + expected: NOTRUN + + [Test if |onprocessorerror| is called upon failure of process() method.] + expected: NOTRUN diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html.ini index f1af52f1bb7..03f61b657cb 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html.ini @@ -41,3 +41,11 @@ [# AUDIT TASK RUNNER FINISHED: 6 out of 7 tasks were failed.] expected: FAIL + [X context.createPeriodicWave(new Float32Array(8192), new Float32Array(8192)) incorrectly threw TypeError: "context.createPeriodicWave is not a function".] + expected: FAIL + + [X new PeriodicWave(context, { real : new Float32Array(8192), imag : new Float32Array(8192) }) incorrectly threw ReferenceError: "PeriodicWave is not defined".] + expected: FAIL + + [X new PeriodicWave(context, { real : new Float32Array(8192), imag : new Float32Array(4) }) threw "ReferenceError" instead of IndexSizeError.] + expected: FAIL diff --git a/tests/wpt/metadata/webmessaging/with-ports/017.html.ini b/tests/wpt/metadata/webmessaging/with-ports/017.html.ini new file mode 100644 index 00000000000..c7946fc91b4 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/with-ports/017.html.ini @@ -0,0 +1,4 @@ +[017.html] + expected: TIMEOUT + [origin of the script that invoked the method, about:blank] + expected: TIMEOUT diff --git a/tests/wpt/metadata/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini b/tests/wpt/metadata/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini deleted file mode 100644 index aa6c9e5b826..00000000000 --- a/tests/wpt/metadata/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[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/metadata/workers/constructors/Worker/Worker-constructor.html.ini b/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini deleted file mode 100644 index 80f9a4f15b8..00000000000 --- a/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[Worker-constructor.html] - expected: ERROR diff --git a/tests/wpt/web-platform-tests/accessibility/ReadMe.md b/tests/wpt/web-platform-tests/accessibility/ReadMe.md new file mode 100644 index 00000000000..ecfb30b1619 --- /dev/null +++ b/tests/wpt/web-platform-tests/accessibility/ReadMe.md @@ -0,0 +1,14 @@ +# ReadMe for /accessibility + +This top-level `/accessibility` directory contains primarily (only?) general crash tests. + +Accessibility specs are tested in top-level directories named after the particular spec. For example, see automated accessibility tests in: + +- `/wai-aria` +- `/html-aam` +- `/accname` +- etc. + +Primary reviewers for each of those specs can often be found in the META.yml file in each respective directory. Reach out directly or file related issues in each spec repo. + +Pull requests welcome. Thank you! diff --git a/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py b/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py index 4d4c3fd5ec7..9682a6dd24d 100644 --- a/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py +++ b/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py @@ -9,6 +9,8 @@ from wptserve.utils import isomorphic_decode, isomorphic_encode # Key used to access the reports in the stash. REPORTS = "4691a2d7fca5430fb0f33b1bd8a9d388" +CLEAR_STASH = isomorphic_encode("clear_stash") + Header = Tuple[str, str] Status = Tuple[int, str] Response = Tuple[Status, List[Header], str] @@ -38,8 +40,14 @@ def handle_post_report(request: Request, headers: List[Header]) -> Response: """Handles POST request for reports. Retrieves the report from the request body and stores the report in the - stash. + stash. If clear_stash is specified in the query params, clears the stash. """ + if request.GET.get(CLEAR_STASH): + clear_stash(request.server.stash) + return (200, "OK"), headers, json.dumps({ + "code": 200, + "message": "Stash successfully cleared.", + }) store_report( request.server.stash, get_request_origin(request), { "body": request.body.decode("utf-8"), @@ -76,6 +84,10 @@ def store_report(stash: Stash, origin: str, report: str) -> None: stash.put(REPORTS, reports_dict) return None +def clear_stash(stash: Stash) -> None: + "Clears the stash." + stash.take(REPORTS) + return None def take_reports(stash: Stash, origin: str) -> List[str]: """Takes all the reports from the stash and returns them.""" diff --git a/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/characteristic-is-removed.https.window.js b/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/characteristic-is-removed.https.window.js index e97b94f7366..e80be43135c 100644 --- a/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/characteristic-is-removed.https.window.js +++ b/tests/wpt/web-platform-tests/bluetooth/characteristic/readValue/characteristic-is-removed.https.window.js @@ -2,15 +2,20 @@ // META: script=/resources/testdriver-vendor.js // META: script=/bluetooth/resources/bluetooth-test.js // META: script=/bluetooth/resources/bluetooth-fake-devices.js +// META: timeout=long 'use strict'; const test_desc = 'Characteristic gets removed. Reject with InvalidStateError.'; const expected = new DOMException( 'GATT Characteristic no longer exists.', 'InvalidStateError'); -bluetooth_test(async () => { +bluetooth_test_crbug1430625(async () => { + console.log('[crbug.com/1430625] To getMeasurementIntervalCharacteristic'); const {characteristic, fake_characteristic} = await getMeasurementIntervalCharacteristic(); + console.log('[crbug.com/1430625] To fake_characteristic.remove()'); await fake_characteristic.remove(); + console.log('[crbug.com/1430625] To characteristic.readValue()'); await assert_promise_rejects_with_message( characteristic.readValue(), expected, 'Characteristic got removed.'); + console.log('[crbug.com/1430625] End of the test'); }, test_desc); diff --git a/tests/wpt/web-platform-tests/bluetooth/resources/bluetooth-test.js b/tests/wpt/web-platform-tests/bluetooth/resources/bluetooth-test.js index 7ad1b937e1f..7852aadf466 100644 --- a/tests/wpt/web-platform-tests/bluetooth/resources/bluetooth-test.js +++ b/tests/wpt/web-platform-tests/bluetooth/resources/bluetooth-test.js @@ -89,6 +89,25 @@ function bluetooth_test( }, name, properties); } +function bluetooth_test_crbug1430625( + test_function, name, properties, validate_response_consumed = true) { +return promise_test(async (t) => { + assert_implements(navigator.bluetooth, 'missing navigator.bluetooth'); + // Trigger Chromium-specific setup. + await performChromiumSetup(); + assert_implements( + navigator.bluetooth.test, 'missing navigator.bluetooth.test'); + console.log('[crbug.com/1430625] To test_function'); + await test_function(t); + if (validate_response_consumed) { + console.log('[crbug.com/1430625] To wait allResponsesConsumed'); + let consumed = await navigator.bluetooth.test.allResponsesConsumed(); + assert_true(consumed); + } + console.log('[crbug.com/1430625] End'); +}, name, properties); +} + /** * Test Helpers */ diff --git a/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_duplicate_updates.tentative.https.any.js b/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_duplicate_updates.tentative.https.any.js index b5d7690d182..dde92932dd1 100644 --- a/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_duplicate_updates.tentative.https.any.js +++ b/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_duplicate_updates.tentative.https.any.js @@ -30,33 +30,3 @@ pressure_test(async (t, mockPressureService) => { assert_equals(pressureChanges[0][0].state, 'critical'); assert_equals(pressureChanges[1][0].state, 'nominal'); }, 'Changes that fail the "has change in data" test are discarded.'); - -pressure_test(async (t, mockPressureService) => { - const pressureChanges = await new Promise(async resolve => { - const observer_changes = []; - let n = 0; - const observer = new PressureObserver(changes => { - observer_changes.push(changes); - if (++n === 2) - resolve(observer_changes); - }, {sampleRate: 5.0}); - observer.observe('cpu'); - const updatesDelivered = mockPressureService.updatesDelivered(); - mockPressureService.setPressureUpdate('cpu', 'critical', ['thermal']); - mockPressureService.startPlatformCollector(/*sampleRate*/ 5.0); - - // Deliver 2 updates. - await t.step_wait( - () => mockPressureService.updatesDelivered() >= (updatesDelivered + 2), - 'Wait for more than one update to be delivered to the observer'); - mockPressureService.setPressureUpdate('cpu', 'critical', ['power-supply']); - // Deliver more updates, |resolve()| will be called when the new pressure - // state reaches PressureObserver and its callback is invoked - // for the second time. - }); - assert_equals(pressureChanges.length, 2); - assert_equals(pressureChanges[0][0].state, 'critical'); - assert_equals(pressureChanges[0][0].factors[0], 'thermal'); - assert_equals(pressureChanges[1][0].state, 'critical'); - assert_equals(pressureChanges[1][0].factors[0], 'power-supply'); -}, 'Factors that fail the "has change in data" test are discarded.'); diff --git a/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_factors.tentative.https.any.js b/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_factors.tentative.https.any.js index 7486a70f911..60d38d3f336 100644 --- a/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_factors.tentative.https.any.js +++ b/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_factors.tentative.https.any.js @@ -9,12 +9,11 @@ pressure_test(async (t, mockPressureService) => { const observer = new PressureObserver(resolve); t.add_cleanup(() => observer.disconnect()); observer.observe('cpu'); - mockPressureService.setPressureUpdate('cpu', 'critical', ['thermal']); + mockPressureService.setPressureUpdate('cpu', 'critical'); mockPressureService.startPlatformCollector(/*sampleRate=*/ 5.0); }); assert_true(changes.length === 1); assert_equals(changes[0].state, 'critical'); assert_equals(changes[0].source, 'cpu'); assert_equals(typeof changes[0].time, 'number'); - assert_equals(changes[0].factors[0], 'thermal'); }, 'Basic factors functionality test'); diff --git a/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_update_toJSON.tentative.https.any.js b/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_update_toJSON.tentative.https.any.js index c1cd240a3bc..0024d697549 100644 --- a/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_update_toJSON.tentative.https.any.js +++ b/tests/wpt/web-platform-tests/compute-pressure/compute_pressure_update_toJSON.tentative.https.any.js @@ -6,13 +6,12 @@ pressure_test(async (t, mockPressureService) => { const changes = await new Promise(resolve => { const observer = new PressureObserver(resolve); observer.observe('cpu'); - mockPressureService.setPressureUpdate('cpu', 'critical', ['thermal']); + mockPressureService.setPressureUpdate('cpu', 'critical'); mockPressureService.startPlatformCollector(/*sampleRate=*/ 5.0); }); assert_true(changes.length === 1); const json = changes[0].toJSON(); assert_equals(json.state, 'critical'); assert_equals(json.source, 'cpu'); - assert_equals(json.factors[0], 'thermal'); assert_equals(typeof json.time, 'number'); }, 'Basic functionality test'); diff --git a/tests/wpt/web-platform-tests/css/compositing/isolation/animation/isolation-no-interpolation.html b/tests/wpt/web-platform-tests/css/compositing/isolation/animation/isolation-no-interpolation.html new file mode 100644 index 00000000000..666fb5358f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/compositing/isolation/animation/isolation-no-interpolation.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://drafts.fxtf.org/compositing/#isolation"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body> +<script> +test_no_interpolation({ + property: 'isolation', + from: 'initial', + to: 'isolate' +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-align/animation/justify-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-align/animation/justify-no-interpolation.html new file mode 100644 index 00000000000..a242fb73e90 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-align/animation/justify-no-interpolation.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-align/#justify-items-property"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-align/#justify-self-property"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body> +<script> +test_no_interpolation({ + property: 'justify-items', + from: 'initial', + to: 'baseline' +}); + +test_no_interpolation({ + property: 'justify-self', + from: 'initial', + to: 'baseline' +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-computed.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-computed.html index 914d496458e..4c96ee81b17 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-computed.html +++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-computed.html @@ -12,6 +12,9 @@ test_computed_value("animation-range-end", "cover 100%", "cover"); test_computed_value("animation-range-end", "COVER 0%", "cover 0%"); test_computed_value("animation-range-end", "COVER 100%", "cover"); test_computed_value("animation-range-end", "cover 120%"); +test_computed_value("animation-range-end", "0", "0px"); +test_computed_value("animation-range-end", "120%"); +test_computed_value("animation-range-end", "120px"); test_computed_value("animation-range-end", "cover 42%"); test_computed_value("animation-range-end", "cover -42%"); test_computed_value("animation-range-end", "contain 42%"); diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-invalid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-invalid.html index ec28da2fff1..459cdfd0cd2 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-invalid.html +++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-invalid.html @@ -5,11 +5,8 @@ <script src="/css/support/parsing-testcommon.js"></script> <script> test_invalid_value("animation-range-end", "infinite"); -test_invalid_value("animation-range-end", "0"); test_invalid_value("animation-range-end", "1s 2s"); test_invalid_value("animation-range-end", "1s / 2s"); -test_invalid_value("animation-range-end", "100px"); -test_invalid_value("animation-range-end", "100%"); test_invalid_value("animation-range-end", "peek 50%"); test_invalid_value("animation-range-end", "50% contain"); diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-valid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-valid.html index 4a248f3b224..aeeb2ee5794 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-valid.html +++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-end-valid.html @@ -10,6 +10,9 @@ test_valid_value("animation-range-end", "cover 0%"); test_valid_value("animation-range-end", "cover 100%", "cover"); test_valid_value("animation-range-end", "cover 120%"); test_valid_value("animation-range-end", "cover 42%"); +test_valid_value("animation-range-end", "0", "0px"); +test_valid_value("animation-range-end", "120%"); +test_valid_value("animation-range-end", "120px"); test_valid_value("animation-range-end", "cover -42%"); test_valid_value("animation-range-end", "contain 42%"); test_valid_value("animation-range-end", "exit 42%"); diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-shorthand.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-shorthand.html index e5f6e866204..8acf0b1c557 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-shorthand.html +++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-shorthand.html @@ -40,6 +40,11 @@ test_valid_value("animation-range", "exit calc(10% + 50px)"); test_valid_value("animation-range", "entry 50% exit 50%"); test_valid_value("animation-range", "cover 50% entry 50%, contain 50% exit 50%"); +test_valid_value("animation-range", "50% exit 50%"); +test_valid_value("animation-range", "normal 100px"); +test_valid_value("animation-range", "100px"); +test_valid_value("animation-range", "100px normal", "100px"); +test_valid_value("animation-range", "10% normal", "10%"); test_computed_value("animation-range", "normal"); test_computed_value("animation-range", "normal normal", "normal"); @@ -75,6 +80,11 @@ test_computed_value("animation-range", "cover 50% entry 50%, contain 50% exit 50%"); test_computed_value("animation-range", "entry 10em exit 20em", "entry 100px exit 200px"); +test_computed_value("animation-range", "10em exit 20em", "100px exit 200px"); +test_computed_value("animation-range", "normal 100px"); +test_computed_value("animation-range", "100px"); +test_computed_value("animation-range", "100px normal", "100px"); +test_computed_value("animation-range", "10% normal", "10%"); test_invalid_value("animation-range", "entry 50% 0s", "entry 50%"); test_invalid_value("animation-range", "0s entry 50%"); @@ -157,4 +167,12 @@ test_shorthand_value('animation-range', 'exit calc(10% + 50px)', { 'animation-range-start': 'exit calc(10% + 50px)', 'animation-range-end': 'exit', }); +test_shorthand_value('animation-range', '100px', { + 'animation-range-start': '100px', + 'animation-range-end': 'normal', +}); +test_shorthand_value('animation-range', '10%', { + 'animation-range-start': '10%', + 'animation-range-end': 'normal', +}); </script> diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-start-computed.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-start-computed.html index 9750fb50a39..044aea2ca67 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-start-computed.html +++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-start-computed.html @@ -13,6 +13,9 @@ test_computed_value("animation-range-start", "COVER 0%", "cover"); test_computed_value("animation-range-start", "COVER 100%", "cover 100%"); test_computed_value("animation-range-start", "cover 120%"); test_computed_value("animation-range-start", "cover 42%"); +test_computed_value("animation-range-start", "0", "0px"); +test_computed_value("animation-range-start", "120%"); +test_computed_value("animation-range-start", "120px"); test_computed_value("animation-range-start", "cover -42%"); test_computed_value("animation-range-start", "contain 42%"); test_computed_value("animation-range-start", "exit 42%"); diff --git a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-start-valid.html b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-start-valid.html index d70a371db6f..309f4ccf697 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-start-valid.html +++ b/tests/wpt/web-platform-tests/css/css-animations/parsing/animation-range-start-valid.html @@ -10,6 +10,9 @@ test_valid_value("animation-range-start", "cover 0%", "cover"); test_valid_value("animation-range-start", "cover 100%"); test_valid_value("animation-range-start", "cover 120%"); test_valid_value("animation-range-start", "cover 42%"); +test_valid_value("animation-range-start", "0", "0px"); +test_valid_value("animation-range-start", "120%"); +test_valid_value("animation-range-start", "120px"); test_valid_value("animation-range-start", "cover -42%"); test_valid_value("animation-range-start", "contain 42%"); test_valid_value("animation-range-start", "exit 42%"); diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-column-auto-flow.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-column-auto-flow.html new file mode 100644 index 00000000000..c491301c8a6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-column-auto-flow.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<html> +<head> +<link rel="author" href="mailto:sammy.gill@apple.com"> +<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-grid"> +<meta name="assert" content="Trimmed block-end margins for grid items should be reflected in computed style"> +</head> +<style> +grid { + display: grid; + width: min-content; + grid-auto-flow: column; + border: 1px solid black; + grid-template-rows: auto auto auto; + margin-trim: block-end; +} +item { + display: block; + width: 50px; + height: 50px; + margin-block-end: 10px; +} +.span-four { + grid-row: span 4; +} +item:nth-child(1) { + grid-row: 1; + background-color: green; +} +item:nth-child(2) { + grid-row: 2; + background-color: blue; +} +item:nth-child(3) { + grid-row: 3; + background-color: purple; +} +item:nth-child(4) { + background-color:burlywood; +} +item:nth-child(5) { + background-color: grey; + grid-row: 4; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('grid > item')"> + <div id="target"> + <grid> + <item data-expected-margin-bottom="10"></item> + <item data-expected-margin-bottom="10"></item> + <item data-expected-margin-bottom="10"></item> + <item data-expected-margin-bottom="0" class="span-four"></item> + <item data-expected-margin-bottom="0"></item> + </grid> + </div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-item-spans-multiple-rows.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-item-spans-multiple-rows.html new file mode 100644 index 00000000000..4ae597760b3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-item-spans-multiple-rows.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<html> +<head> +<link rel="author" href="mailto:sammy.gill@apple.com"> +<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-grid"> +<meta name="assert" content="item that spans into last row should have block-end margin trimmed"> +</head> +<style> +grid { + display: grid; + border: 1px solid black; + grid-template-columns: auto auto; + margin-trim: block-end; +} +item { + display: block; + width: 50px; + height: 50px; + margin-bottom: 10px; +} +.row-two { + grid-row: 2; + background-color: green; +} +.span-two-rows { + grid-row: span 2; + background-color: blue; + height: 90px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('grid > item')"> + <div id="target"> + <grid> + <item data-expected-margin-bottom="0" class="span-two-rows"></item> + <item data-expected-margin-bottom="0" class="row-two"></item> + </grid> + </div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end.html new file mode 100644 index 00000000000..a0143364aab --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html> +<head> +<link rel="author" href="mailto:sammy.gill@apple.com"> +<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-grid"> +<meta name="assert" content="Trimmed block-end margins for grid items should be reflected in computed style"> +</head> +<style> +grid { + display: grid; + width: min-content; + border: 1px solid black; + grid-template-columns: repeat(4, auto); + margin-trim: block-end; +} +item { + display: block; + width: 50px; + height: 50px; + margin-bottom: 10px; +} +.locked-position { + grid-row: 2; + grid-column: 2; + margin-block-end: 50px; + background-color: magenta; +} +.span-three-columns { + grid-column: span 3; + background-color: purple; +} +.span-five-columns { + grid-column: span 5; +} +item:nth-child(1) { + background-color: green; +} +item:nth-child(4) { + background-color: blue; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('grid > item')"> + <div id="target"> + <grid> + <item class="span-five-columns" data-expected-margin-bottom="10"></item> + <item class="locked-position" data-expected-margin-bottom="50"></item> + <item class="span-three-columns" data-expected-margin-bottom="10"></item> + <item data-expected-margin-bottom="0"></item> + </grid> + </div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start-item-negative-span.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start-item-negative-span.html new file mode 100644 index 00000000000..4dc553e15b2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start-item-negative-span.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html> +<head> +<link rel="author" href="mailto:sammy.gill@apple.com"> +<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-grid"> +<meta name="assert" content="trimmed inline-start margins in grid should be reflected in computed style"> +</head> +<style> +grid { + display: grid; + width: min-content; + outline: 1px solid black; + grid-template-columns: repeat(2, auto); + margin-trim: inline-start; +} +item { + display: block; + width: 50px; + height: 50px; + margin-inline-start: 10px; + background-color: green; +} +.negative-line-number { + width: 50px; + grid-row: 2; + grid-column: -3; + background-color: blue; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('grid > item')"> + <div id="target"> + <grid> + <item data-expected-margin-left="0" class="negative-line-number"></item> + <item data-expected-margin-left="0"></item> + </grid> + </div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start.html new file mode 100644 index 00000000000..7d4157acfed --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html> +<head> +<link rel="author" href="mailto:sammy.gill@apple.com"> +<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-grid"> +<meta name="assert" content="trimmed inline-start margins in grid should be reflected in computed style"> +</head> +<style> +grid { + display: grid; + width: min-content; + outline: 1px solid black; + grid-template-columns: repeat(2, auto); + margin-trim: inline-start; +} +item { + display: block; + width: 50px; + height: 50px; +} +.locked-position { + grid-row: 3; + grid-column: 1; + margin-inline-start: -30px; +} +item:nth-child(1) { + background-color: green; + margin-inline-start: 30px; +} +item:nth-child(2) { + background-color: blue; + margin-inline-start: 10px; +} +item:nth-child(3) { + background-color: orchid; + margin-inline-start: 10%; +} +item:nth-child(4) { + background-color: maroon; +} +item:nth-child(5) { + background-color: salmon; + width: auto; + grid-column: span 2; + margin-inline-start: 10px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('grid > item')"> + <div id="target"> + <grid> + <item data-expected-margin-left="0"></item> + <item data-expected-margin-left="10"></item> + <item data-expected-margin-left="0"></item> + <item class="locked-position" data-expected-margin-left="0"></item> + <item data-expected-margin-left="0"></item> + </grid> + </div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-break/flexbox/single-line-row-flex-fragmentation-044-ref.html b/tests/wpt/web-platform-tests/css/css-break/flexbox/single-line-row-flex-fragmentation-044-ref.html new file mode 100644 index 00000000000..af1c8155bd9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/flexbox/single-line-row-flex-fragmentation-044-ref.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> + <meta charset="utf-8"> + <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> + <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination"> + + <style> + .multicol { + column-count: 2; + column-gap: 0; + column-fill: auto; + width: 200px; + border: 5px solid gray; + height: 0px; + } + .flexbox { + position: relative + } + .flexbox > div { + position: absolute; + width: 50px; + contain: size; + } + </style> + + <div class="multicol"> + <div class="flexbox"> + <div style="height: 10px; background: pink; left: 100px;"></div> + <div style="height: 20px; background: orange; left: 50px;"></div> + </div> + </div> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-break/flexbox/single-line-row-flex-fragmentation-044.html b/tests/wpt/web-platform-tests/css/css-break/flexbox/single-line-row-flex-fragmentation-044.html new file mode 100644 index 00000000000..6da4fde6ee9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/flexbox/single-line-row-flex-fragmentation-044.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> + <meta charset="utf-8"> + <title>Test that the first flex item is pushed to the second column due to insufficient space, and the browser shouldn't create infinite columns.</title> + <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> + <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination"> + <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1827582"> + <link rel="match" href="single-line-row-flex-fragmentation-044-ref.html"> + + <style> + .multicol { + column-count: 2; + column-gap: 0; + column-fill: auto; + width: 200px; + border: 5px solid gray; + height: 0px; + } + .flexbox { + display: flex; + width: 100px; + } + .flexbox > div { + width: 50px; + contain: size; + } + </style> + + <div class="multicol"> + <div class="flexbox"> + <!-- To reproduce the bug, the first item should have margin-top, and its + block-end should be smaller than the second item's block-end. --> + <div style="height: 10px; background: pink; margin-top: 5px;"></div> + <div style="height: 20px; background: orange"></div> + </div> + </div> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-break/rounded-clipped-border-ref.html b/tests/wpt/web-platform-tests/css/css-break/rounded-clipped-border-ref.html new file mode 100644 index 00000000000..be08126fd2c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/rounded-clipped-border-ref.html @@ -0,0 +1,120 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> + +<style> + .container { + float: left; + margin: 10px; + text-align: center; + inline-size: fit-content; + } + .multicol { + inline-size: 320px; + block-size: 120px; + border: solid; + background: lightgray; + } + .column { + float: left; + inline-size: 100px; + margin-inline-start: 10px; + } + .column:first-child { + margin-inline-start:0; + } + .clipper { + position: relative; + border-radius: 50px; + border: 20px solid blue; + overflow: clip; + background: red; + } + .clipper.part1 { + block-size: 100px; + border-block-end: none; + border-end-start-radius: 0; + border-end-end-radius: 0; + } + .clipper.part2 { + block-size: 120px; + border-block-start: none; + border-block-end: none; + border-radius: 0; + } + .clipper.part3 { + block-size: 80px; + border-block-start: none; + border-start-start-radius: 0; + border-start-end-radius: 0; + } + .child { + block-size: 300px; + background: yellow; + } +</style> + +<p>In each figure there should be a yellow box with a rounded blue border around + it, split into three columns. There should be no red.</p> + +<div class="container"> + horizontal-tb: + <div class="multicol"> + <div class="column"> + <div class="clipper part1"> + <div class="child"></div> + </div> + </div> + <div class="column"> + <div class="clipper part2"> + <div class="child"></div> + </div> + </div> + <div class="column"> + <div class="clipper part3"> + <div class="child"></div> + </div> + </div> + </div> +</div> + +<div class="container"> + vertical-rl: + <div class="multicol" style="writing-mode:vertical-rl;"> + <div class="column"> + <div class="clipper part1"> + <div class="child"></div> + </div> + </div> + <div class="column"> + <div class="clipper part2"> + <div class="child"></div> + </div> + </div> + <div class="column"> + <div class="clipper part3"> + <div class="child"></div> + </div> + </div> + </div> +</div> + +<div class="container"> + vertical-lr: + <div class="multicol" style="writing-mode:vertical-lr;"> + <div class="column"> + <div class="clipper part1"> + <div class="child"></div> + </div> + </div> + <div class="column"> + <div class="clipper part2"> + <div class="child"></div> + </div> + </div> + <div class="column"> + <div class="clipper part3"> + <div class="child"></div> + </div> + </div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-break/rounded-clipped-border.html b/tests/wpt/web-platform-tests/css/css-break/rounded-clipped-border.html new file mode 100644 index 00000000000..60f4dfd8ba6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/rounded-clipped-border.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1433413"> +<link rel="match" href="rounded-clipped-border-ref.html"> +<meta name="fuzzy" content="maxDifference=0-15;totalPixels=0-900"> + +<style> + .container { + float: left; + margin: 10px; + text-align: center; + inline-size: fit-content; + } + .multicol { + columns: 3; + column-fill: auto; + gap: 10px; + inline-size: 320px; + block-size: 120px; + border: solid; + background: lightgray; + } + .clipper { + block-size: 300px; + border-radius: 50px; + border: 20px solid blue; + overflow: clip; + background: red; + } + .child { + block-size: 300px; + background: yellow; + } +</style> + +<p>In each figure there should be a yellow box with a rounded blue border around + it, split into three columns. There should be no red.</p> + +<div class="container"> + horizontal-tb: + <div class="multicol"> + <div class="clipper"> + <div class="child"></div> + </div> + </div> +</div> + +<div class="container"> + vertical-rl: + <div class="multicol" style="writing-mode:vertical-rl;"> + <div class="clipper"> + <div class="child"></div> + </div> + </div> +</div> + +<div class="container"> + vertical-lr: + <div class="multicol" style="writing-mode:vertical-lr;"> + <div class="clipper"> + <div class="child"></div> + </div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-cascade/parsing/supports-import-parsing.html b/tests/wpt/web-platform-tests/css/css-cascade/parsing/supports-import-parsing.html index 58e1f7cd165..64cf930e6cd 100644 --- a/tests/wpt/web-platform-tests/css/css-cascade/parsing/supports-import-parsing.html +++ b/tests/wpt/web-platform-tests/css/css-cascade/parsing/supports-import-parsing.html @@ -56,6 +56,10 @@ test_valid_supports_import('@import url("nonexist.css") supports((display: flex) or (foo: bar));'); test_valid_supports_import('@import url("nonexist.css") supports(display: block !important);'); + test_valid_supports_import('@import url("nonexist.css") layer supports();'); + test_valid_supports_import('@import url("nonexist.css") layer(A) supports((display: flex) or (foo: bar));'); + test_valid_supports_import('@import url("nonexist.css") layer(A.B) supports((display: flex) and (foo: bar));'); + test_valid_supports_import('@import url("nonexist.css") supports(selector(a));'); test_valid_supports_import('@import url("nonexist.css") supports(selector(p a));'); test_valid_supports_import('@import url("nonexist.css") supports(selector(p > a));'); diff --git a/tests/wpt/web-platform-tests/css/css-color-adjust/color-scheme-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-color-adjust/animation/color-scheme-no-interpolation.html index acfa6ddbbeb..306b4b3da12 100644 --- a/tests/wpt/web-platform-tests/css/css-color-adjust/color-scheme-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-color-adjust/animation/color-scheme-no-interpolation.html @@ -1,6 +1,7 @@ <!DOCTYPE html> <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-color-adjust/#color-scheme-prop"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/interpolation-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-color-adjust/animation/forced-color-adjust-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-color-adjust/animation/forced-color-adjust-no-interpolation.html new file mode 100644 index 00000000000..bcd2bdf223a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-color-adjust/animation/forced-color-adjust-no-interpolation.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-color-adjust/#forced-color-adjust-prop"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body> +<script> +test_no_interpolation({ + property: 'forced-color-adjust', + from: 'initial', + to: 'none' +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-color/parsing/color-computed-relative-color.html b/tests/wpt/web-platform-tests/css/css-color/parsing/color-computed-relative-color.html index 44e0d8de780..f1e0a734970 100644 --- a/tests/wpt/web-platform-tests/css/css-color/parsing/color-computed-relative-color.html +++ b/tests/wpt/web-platform-tests/css/css-color/parsing/color-computed-relative-color.html @@ -99,9 +99,9 @@ test_computed_value(`color`, `rgb(from rebeccapurple r 20% 10)`, `rgb(102, 51, 10)`); test_computed_value(`color`, `rgb(from rebeccapurple r 10 20%)`, `rgb(102, 10, 51)`); test_computed_value(`color`, `rgb(from rebeccapurple 0% 10 10)`, `rgb(0, 10, 10)`); - test_computed_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) r 20% 10)`, `rgb(51, 51, 10)`); - test_computed_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) r 10 20%)`, `rgb(51, 10, 51)`); - test_computed_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) 0% 10 10)`, `rgb(0, 10, 10)`); + test_computed_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) r 20% 10)`, `rgba(51, 51, 10, 0.8)`); + test_computed_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) r 10 20%)`, `rgba(51, 10, 51, 0.8)`); + test_computed_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) 0% 10 10)`, `rgba(0, 10, 10, 0.8)`); // r g b // 102 51 153 @@ -184,7 +184,7 @@ test_computed_value(`color`, `hsl(from rebeccapurple h alpha l / s)`, `rgba(102, 0, 204, 0.5)`); test_computed_value(`color`, `hsl(from rebeccapurple h l l / l)`, `rgba(102, 61, 143, 0.4)`); test_computed_value(`color`, `hsl(from rebeccapurple h alpha alpha / alpha)`, `rgb(255, 255, 255)`); - test_computed_value(`color`, `hsl(from rgb(20%, 40%, 60%, 80%) h l s)`, `rgb(77, 128, 179)`); + test_computed_value(`color`, `hsl(from rgb(20%, 40%, 60%, 80%) h l s)`, `rgba(77, 128, 179, 0.8)`); test_computed_value(`color`, `hsl(from rgb(20%, 40%, 60%, 80%) h alpha l / s)`, `rgba(20, 102, 184, 0.5)`); test_computed_value(`color`, `hsl(from rgb(20%, 40%, 60%, 80%) h l l / l)`, `rgba(61, 102, 143, 0.4)`); test_computed_value(`color`, `hsl(from rgb(20%, 40%, 60%, 80%) h alpha alpha / alpha)`, `rgba(163, 204, 245, 0.8)`); @@ -206,7 +206,7 @@ // FIXME: Clarify with spec editors if 'none' should pass through to the constants. test_computed_value(`color`, `hsl(from hsl(none none none) h s l)`, `rgb(0, 0, 0)`); test_computed_value(`color`, `hsl(from hsl(none none none / none) h s l / alpha)`, `rgba(0, 0, 0, 0)`); - test_computed_value(`color`, `hsl(from hsl(120deg none 50% / .5) h s l)`, `rgb(128, 128, 128)`); + test_computed_value(`color`, `hsl(from hsl(120deg none 50% / .5) h s l)`, `rgba(128, 128, 128, 0.5)`); test_computed_value(`color`, `hsl(from hsl(120deg 20% 50% / none) h s l / alpha)`, `rgba(102, 153, 102, 0)`); test_computed_value(`color`, `hsl(from hsl(none 20% 50% / .5) h s l / alpha)`, `rgba(153, 102, 102, 0.5)`); @@ -265,7 +265,7 @@ test_computed_value(`color`, `hwb(from rebeccapurple h alpha w / b)`, `rgba(213, 213, 213, 0.4)`); test_computed_value(`color`, `hwb(from rebeccapurple h w w / w)`, `rgba(128, 51, 204, 0.2)`); test_computed_value(`color`, `hwb(from rebeccapurple h alpha alpha / alpha)`, `rgb(128, 128, 128)`); - test_computed_value(`color`, `hwb(from rgb(20%, 40%, 60%, 80%) h b w)`, `rgb(102, 153, 204)`); + test_computed_value(`color`, `hwb(from rgb(20%, 40%, 60%, 80%) h b w)`, `rgba(102, 153, 204, 0.8)`); test_computed_value(`color`, `hwb(from rgb(20%, 40%, 60%, 80%) h alpha w / b)`, `rgba(204, 204, 204, 0.4)`); test_computed_value(`color`, `hwb(from rgb(20%, 40%, 60%, 80%) h w w / w)`, `rgba(51, 128, 204, 0.2)`); test_computed_value(`color`, `hwb(from rgb(20%, 40%, 60%, 80%) h alpha alpha / alpha)`, `rgba(128, 128, 128, 0.8)`); @@ -287,7 +287,7 @@ // FIXME: Clarify with spec editors if 'none' should pass through to the constants. test_computed_value(`color`, `hwb(from hwb(none none none) h w b)`, `rgb(255, 0, 0)`); test_computed_value(`color`, `hwb(from hwb(none none none / none) h w b / alpha)`, `rgba(255, 0, 0, 0)`); - test_computed_value(`color`, `hwb(from hwb(120deg none 50% / .5) h w b)`, `rgb(0, 128, 0)`); + test_computed_value(`color`, `hwb(from hwb(120deg none 50% / .5) h w b)`, `rgba(0, 128, 0, 0.5)`); test_computed_value(`color`, `hwb(from hwb(120deg 20% 50% / none) h w b / alpha)`, `rgba(51, 128, 51, 0)`); test_computed_value(`color`, `hwb(from hwb(none 20% 50% / .5) h w b / alpha)`, `rgba(128, 51, 51, 0.5)`); @@ -333,7 +333,7 @@ // Testing valid permutation (types match). test_computed_value(`color`, `lab(from lab(25 20 50) l b a)`, `lab(25 50 20)`); test_computed_value(`color`, `lab(from lab(25 20 50) l a a / a)`, `lab(25 20 20)`); - test_computed_value(`color`, `lab(from lab(25 20 50 / 40%) l b a)`, `lab(25 50 20)`); + test_computed_value(`color`, `lab(from lab(25 20 50 / 40%) l b a)`, `lab(25 50 20 / 0.4)`); test_computed_value(`color`, `lab(from lab(25 20 50 / 40%) l a a / a)`, `lab(25 20 20)`); // Testing with calc(). @@ -396,7 +396,7 @@ // Testing valid permutation (types match). test_computed_value(`color`, `oklab(from oklab(0.25 0.2 0.5) l b a)`, `oklab(0.25 0.5 0.2)`); test_computed_value(`color`, `oklab(from oklab(0.25 0.2 0.5) l a a / a)`, `oklab(0.25 0.2 0.2 / 0.2)`); - test_computed_value(`color`, `oklab(from oklab(0.25 0.2 0.5 / 40%) l b a)`, `oklab(0.25 0.5 0.2)`); + test_computed_value(`color`, `oklab(from oklab(0.25 0.2 0.5 / 40%) l b a)`, `oklab(0.25 0.5 0.2 / 0.4)`); test_computed_value(`color`, `oklab(from oklab(0.25 0.2 0.5 / 40%) l a a / a)`, `oklab(0.25 0.2 0.2 / 0.2)`); // Testing with calc(). @@ -595,7 +595,7 @@ // Testing no modifications. test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} r g b)`, `color(${colorSpace} 0.7 0.5 0.3)`); test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} r g b / alpha)`, `color(${colorSpace} 0.7 0.5 0.3)`); - test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} r g b)`, `color(${colorSpace} 0.7 0.5 0.3)`); + test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} r g b)`, `color(${colorSpace} 0.7 0.5 0.3 / 0.4)`); test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} r g b / alpha)`, `color(${colorSpace} 0.7 0.5 0.3 / 0.4)`); // Test nesting relative colors. @@ -644,7 +644,7 @@ test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} b alpha r / g)`, `color(${colorSpace} 0.3 1 0.7 / 0.5)`); test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} r r r / r)`, `color(${colorSpace} 0.7 0.7 0.7 / 0.7)`); test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} alpha alpha alpha / alpha)`, `color(${colorSpace} 1 1 1)`); - test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} g b r)`, `color(${colorSpace} 0.5 0.3 0.7)`); + test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} g b r)`, `color(${colorSpace} 0.5 0.3 0.7 / 0.4)`); test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} b alpha r / g)`, `color(${colorSpace} 0.3 0.4 0.7 / 0.5)`); test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} r r r / r)`, `color(${colorSpace} 0.7 0.7 0.7 / 0.7)`); test_computed_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} alpha alpha alpha / alpha)`, `color(${colorSpace} 0.4 0.4 0.4 / 0.4)`); @@ -656,7 +656,7 @@ test_computed_value(`color`, `color(from color(${colorSpace} 1.7 1.5 1.3 / 140%) ${colorSpace} r g b / alpha)`, `color(${colorSpace} 1.7 1.5 1.3)`); test_computed_value(`color`, `color(from color(${colorSpace} -0.7 -0.5 -0.3) ${colorSpace} r g b)`, `color(${colorSpace} -0.7 -0.5 -0.3)`); test_computed_value(`color`, `color(from color(${colorSpace} -0.7 -0.5 -0.3) ${colorSpace} r g b / alpha)`, `color(${colorSpace} -0.7 -0.5 -0.3)`); - test_computed_value(`color`, `color(from color(${colorSpace} -0.7 -0.5 -0.3 / -40%) ${colorSpace} r g b)`, `color(${colorSpace} -0.7 -0.5 -0.3)`); + test_computed_value(`color`, `color(from color(${colorSpace} -0.7 -0.5 -0.3 / -40%) ${colorSpace} r g b)`, `color(${colorSpace} -0.7 -0.5 -0.3 / 0)`); test_computed_value(`color`, `color(from color(${colorSpace} -0.7 -0.5 -0.3 / -40%) ${colorSpace} r g b / alpha)`, `color(${colorSpace} -0.7 -0.5 -0.3 / 0)`); // Testing with calc(). @@ -684,7 +684,7 @@ // Testing no modifications. test_computed_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} x y z)`, `color(${resultColorSpace} 7 -20.5 100)`); test_computed_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} x y z / alpha)`, `color(${resultColorSpace} 7 -20.5 100)`); - test_computed_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} x y z)`, `color(${resultColorSpace} 7 -20.5 100)`); + test_computed_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} x y z)`, `color(${resultColorSpace} 7 -20.5 100 / 0.4)`); test_computed_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} x y z / alpha)`, `color(${resultColorSpace} 7 -20.5 100 / 0.4)`); // Test nesting relative colors. @@ -716,7 +716,7 @@ // Testing valid permutation (types match). test_computed_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} y z x)`, `color(${resultColorSpace} -20.5 100 7)`); test_computed_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} x x x / x)`, `color(${resultColorSpace} 7 7 7)`); - test_computed_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} y z x)`, `color(${resultColorSpace} -20.5 100 7)`); + test_computed_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} y z x)`, `color(${resultColorSpace} -20.5 100 7 / 0.4)`); test_computed_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} x x x / x)`, `color(${resultColorSpace} 7 7 7)`); // Testing with calc(). diff --git a/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-relative-color.html b/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-relative-color.html index a1c9461d2ee..68a78a8d44c 100644 --- a/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-relative-color.html +++ b/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-relative-color.html @@ -98,9 +98,9 @@ test_valid_value(`color`, `rgb(from rebeccapurple r 20% 10)`, `rgb(102, 51, 10)`); test_valid_value(`color`, `rgb(from rebeccapurple r 10 20%)`, `rgb(102, 10, 51)`); test_valid_value(`color`, `rgb(from rebeccapurple 0% 10 10)`, `rgb(0, 10, 10)`); - test_valid_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) r 20% 10)`, `rgb(51, 51, 10)`); - test_valid_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) r 10 20%)`, `rgb(51, 10, 51)`); - test_valid_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) 0% 10 10)`, `rgb(0, 10, 10)`); + test_valid_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) r 20% 10)`, `rgba(51, 51, 10, 0.8)`); + test_valid_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) r 10 20%)`, `rgba(51, 10, 51, 0.8)`); + test_valid_value(`color`, `rgb(from rgb(20%, 40%, 60%, 80%) 0% 10 10)`, `rgba(0, 10, 10, 0.8)`); // r g b // 102 51 153 @@ -183,7 +183,7 @@ test_valid_value(`color`, `hsl(from rebeccapurple h alpha l / s)`, `rgba(102, 0, 204, 0.5)`); test_valid_value(`color`, `hsl(from rebeccapurple h l l / l)`, `rgba(102, 61, 143, 0.4)`); test_valid_value(`color`, `hsl(from rebeccapurple h alpha alpha / alpha)`, `rgb(255, 255, 255)`); - test_valid_value(`color`, `hsl(from rgb(20%, 40%, 60%, 80%) h l s)`, `rgb(77, 128, 179)`); + test_valid_value(`color`, `hsl(from rgb(20%, 40%, 60%, 80%) h l s)`, `rgba(77, 128, 179, 0.8)`); test_valid_value(`color`, `hsl(from rgb(20%, 40%, 60%, 80%) h alpha l / s)`, `rgba(20, 102, 184, 0.5)`); test_valid_value(`color`, `hsl(from rgb(20%, 40%, 60%, 80%) h l l / l)`, `rgba(61, 102, 143, 0.4)`); test_valid_value(`color`, `hsl(from rgb(20%, 40%, 60%, 80%) h alpha alpha / alpha)`, `rgba(163, 204, 245, 0.8)`); @@ -205,7 +205,7 @@ // FIXME: Clarify with spec editors if 'none' should pass through to the constants. test_valid_value(`color`, `hsl(from hsl(none none none) h s l)`, `rgb(0, 0, 0)`); test_valid_value(`color`, `hsl(from hsl(none none none / none) h s l / alpha)`, `rgba(0, 0, 0, 0)`); - test_valid_value(`color`, `hsl(from hsl(120deg none 50% / .5) h s l)`, `rgb(128, 128, 128)`); + test_valid_value(`color`, `hsl(from hsl(120deg none 50% / .5) h s l)`, `rgba(128, 128, 128, 0.5)`); test_valid_value(`color`, `hsl(from hsl(120deg 20% 50% / none) h s l / alpha)`, `rgba(102, 153, 102, 0)`); test_valid_value(`color`, `hsl(from hsl(none 20% 50% / .5) h s l / alpha)`, `rgba(153, 102, 102, 0.5)`); @@ -264,7 +264,7 @@ test_valid_value(`color`, `hwb(from rebeccapurple h alpha w / b)`, `rgba(213, 213, 213, 0.4)`); test_valid_value(`color`, `hwb(from rebeccapurple h w w / w)`, `rgba(128, 51, 204, 0.2)`); test_valid_value(`color`, `hwb(from rebeccapurple h alpha alpha / alpha)`, `rgb(128, 128, 128)`); - test_valid_value(`color`, `hwb(from rgb(20%, 40%, 60%, 80%) h b w)`, `rgb(102, 153, 204)`); + test_valid_value(`color`, `hwb(from rgb(20%, 40%, 60%, 80%) h b w)`, `rgba(102, 153, 204, 0.8)`); test_valid_value(`color`, `hwb(from rgb(20%, 40%, 60%, 80%) h alpha w / b)`, `rgba(204, 204, 204, 0.4)`); test_valid_value(`color`, `hwb(from rgb(20%, 40%, 60%, 80%) h w w / w)`, `rgba(51, 128, 204, 0.2)`); test_valid_value(`color`, `hwb(from rgb(20%, 40%, 60%, 80%) h alpha alpha / alpha)`, `rgba(128, 128, 128, 0.8)`); @@ -286,7 +286,7 @@ // FIXME: Clarify with spec editors if 'none' should pass through to the constants. test_valid_value(`color`, `hwb(from hwb(none none none) h w b)`, `rgb(255, 0, 0)`); test_valid_value(`color`, `hwb(from hwb(none none none / none) h w b / alpha)`, `rgba(255, 0, 0, 0)`); - test_valid_value(`color`, `hwb(from hwb(120deg none 50% / .5) h w b)`, `rgb(0, 128, 0)`); + test_valid_value(`color`, `hwb(from hwb(120deg none 50% / .5) h w b)`, `rgba(0, 128, 0, 0.5)`); test_valid_value(`color`, `hwb(from hwb(120deg 20% 50% / none) h w b / alpha)`, `rgba(51, 128, 51, 0)`); test_valid_value(`color`, `hwb(from hwb(none 20% 50% / .5) h w b / alpha)`, `rgba(128, 51, 51, 0.5)`); @@ -332,7 +332,7 @@ // Testing valid permutation (types match). test_valid_value(`color`, `lab(from lab(25 20 50) l b a)`, `lab(25 50 20)`); test_valid_value(`color`, `lab(from lab(25 20 50) l a a / a)`, `lab(25 20 20)`); - test_valid_value(`color`, `lab(from lab(25 20 50 / 40%) l b a)`, `lab(25 50 20)`); + test_valid_value(`color`, `lab(from lab(25 20 50 / 40%) l b a)`, `lab(25 50 20 / 0.4)`); test_valid_value(`color`, `lab(from lab(25 20 50 / 40%) l a a / a)`, `lab(25 20 20)`); // Testing with calc(). @@ -395,7 +395,7 @@ // Testing valid permutation (types match). test_valid_value(`color`, `oklab(from oklab(0.25 0.2 0.5) l b a)`, `oklab(0.25 0.5 0.2)`); test_valid_value(`color`, `oklab(from oklab(0.25 0.2 0.5) l a a / a)`, `oklab(0.25 0.2 0.2 / 0.2)`); - test_valid_value(`color`, `oklab(from oklab(0.25 0.2 0.5 / 40%) l b a)`, `oklab(0.25 0.5 0.2)`); + test_valid_value(`color`, `oklab(from oklab(0.25 0.2 0.5 / 40%) l b a)`, `oklab(0.25 0.5 0.2 / 0.4)`); test_valid_value(`color`, `oklab(from oklab(0.25 0.2 0.5 / 40%) l a a / a)`, `oklab(0.25 0.2 0.2 / 0.2)`); // Testing with calc(). @@ -594,7 +594,7 @@ // Testing no modifications. test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} r g b)`, `color(${colorSpace} 0.7 0.5 0.3)`); test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} r g b / alpha)`, `color(${colorSpace} 0.7 0.5 0.3)`); - test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} r g b)`, `color(${colorSpace} 0.7 0.5 0.3)`); + test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} r g b)`, `color(${colorSpace} 0.7 0.5 0.3 / 0.4)`); test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} r g b / alpha)`, `color(${colorSpace} 0.7 0.5 0.3 / 0.4)`); // Test nesting relative colors. @@ -643,7 +643,7 @@ test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} b alpha r / g)`, `color(${colorSpace} 0.3 1 0.7 / 0.5)`); test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} r r r / r)`, `color(${colorSpace} 0.7 0.7 0.7 / 0.7)`); test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} alpha alpha alpha / alpha)`, `color(${colorSpace} 1 1 1)`); - test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} g b r)`, `color(${colorSpace} 0.5 0.3 0.7)`); + test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} g b r)`, `color(${colorSpace} 0.5 0.3 0.7 / 0.4)`); test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} b alpha r / g)`, `color(${colorSpace} 0.3 0.4 0.7 / 0.5)`); test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} r r r / r)`, `color(${colorSpace} 0.7 0.7 0.7 / 0.7)`); test_valid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} alpha alpha alpha / alpha)`, `color(${colorSpace} 0.4 0.4 0.4 / 0.4)`); @@ -655,7 +655,7 @@ test_valid_value(`color`, `color(from color(${colorSpace} 1.7 1.5 1.3 / 140%) ${colorSpace} r g b / alpha)`, `color(${colorSpace} 1.7 1.5 1.3)`); test_valid_value(`color`, `color(from color(${colorSpace} -0.7 -0.5 -0.3) ${colorSpace} r g b)`, `color(${colorSpace} -0.7 -0.5 -0.3)`); test_valid_value(`color`, `color(from color(${colorSpace} -0.7 -0.5 -0.3) ${colorSpace} r g b / alpha)`, `color(${colorSpace} -0.7 -0.5 -0.3)`); - test_valid_value(`color`, `color(from color(${colorSpace} -0.7 -0.5 -0.3 / -40%) ${colorSpace} r g b)`, `color(${colorSpace} -0.7 -0.5 -0.3)`); + test_valid_value(`color`, `color(from color(${colorSpace} -0.7 -0.5 -0.3 / -40%) ${colorSpace} r g b)`, `color(${colorSpace} -0.7 -0.5 -0.3 / 0)`); test_valid_value(`color`, `color(from color(${colorSpace} -0.7 -0.5 -0.3 / -40%) ${colorSpace} r g b / alpha)`, `color(${colorSpace} -0.7 -0.5 -0.3 / 0)`); // Testing with calc(). @@ -683,7 +683,7 @@ // Testing no modifications. test_valid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} x y z)`, `color(${resultColorSpace} 7 -20.5 100)`); test_valid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} x y z / alpha)`, `color(${resultColorSpace} 7 -20.5 100)`); - test_valid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} x y z)`, `color(${resultColorSpace} 7 -20.5 100)`); + test_valid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} x y z)`, `color(${resultColorSpace} 7 -20.5 100 / 0.4)`); test_valid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} x y z / alpha)`, `color(${resultColorSpace} 7 -20.5 100 / 0.4)`); // Test nesting relative colors. @@ -715,7 +715,7 @@ // Testing valid permutation (types match). test_valid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} y z x)`, `color(${resultColorSpace} -20.5 100 7)`); test_valid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} x x x / x)`, `color(${resultColorSpace} 7 7 7)`); - test_valid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} y z x)`, `color(${resultColorSpace} -20.5 100 7)`); + test_valid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} y z x)`, `color(${resultColorSpace} -20.5 100 7 / 0.4)`); test_valid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} x x x / x)`, `color(${resultColorSpace} 7 7 7)`); // Testing with calc(). diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/at-container-style-parsing.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/at-container-style-parsing.html index 5bd9e018c1a..b49205824b5 100644 --- a/tests/wpt/web-platform-tests/css/css-contain/container-queries/at-container-style-parsing.html +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/at-container-style-parsing.html @@ -68,8 +68,8 @@ test_condition_known('style(--my-prop:)'); test_condition_known('style(--my-prop: )'); test_condition_known('style(--foo: bar !important)'); + test_condition_known('style(--foo)'); test_condition_unknown('style(--foo: bar;)'); - test_condition_unknown('style(--foo)'); test_condition_unknown('style(style(--foo: bar))'); </script> diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization.html index 30e33609a7f..a4fb25378cb 100644 --- a/tests/wpt/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization.html +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization.html @@ -25,7 +25,7 @@ ["style(--foo: bar)", "Normalize spaces"], ["style(--foo: )", "Empty declaration value - spaces"], ["style(--foo: )", "Empty declaration value"], - ["STyle(--foo)", "Missing declaration value"], + ["style(--foo)", "No declaration value"], ["style((--FOO: BAR) or ( prop: val ))", "Unknown CSS property after 'or'"], ["style (--foo: bar)", "Not a style function with space before '('"], ["style(--foo: bar baz)", "Spaces preserved in custom property value"], diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/chrome-bug-1429955-crash.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/chrome-bug-1429955-crash.html new file mode 100644 index 00000000000..bdf4002753c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/crashtests/chrome-bug-1429955-crash.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<link rel="help" href="https://crbug.com/1429955.html"> +<div id="mc" style="display:list-item; width:0; columns:2; container-type:size;"> + <div id="abs" style="position:absolute; container-type:inline-size;">line</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries.html index 52fbeeddec8..29b5004af06 100644 --- a/tests/wpt/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries.html +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries.html @@ -210,9 +210,15 @@ @container style(--initial: initial) { #initial { color: green; } } + @container not style(--initial) { + #initial-implicit { color: green; } + } @container not style(--initial-no: initial) { #initial-no { color: green; } } + @container style(--initial-no) { + #initial-no-implicit { color: green; } + } @container style(--inherit: inherit) { #inherit { color: green; } } @@ -229,7 +235,9 @@ <div id="defaulting"> <div id="defaulting-container"> <div id="initial"></div> + <div id="initial-implicit"></div> <div id="initial-no"></div> + <div id="initial-no-implicit"></div> <div id="inherit"></div> <div id="inherit-no"></div> <div id="unset"></div> @@ -242,10 +250,18 @@ }, "Style query 'initial' matching"); test(() => { + assert_equals(getComputedStyle(document.querySelector("#initial-implicit")).color, green); + }, "Style query matching negated value-less query against initial value"); + + test(() => { assert_equals(getComputedStyle(document.querySelector("#initial-no")).color, green); }, "Style query 'initial' not matching"); test(() => { + assert_equals(getComputedStyle(document.querySelector("#initial-no-implicit")).color, green); + }, "Style query matching value-less query against non-initial value"); + + test(() => { assert_equals(getComputedStyle(document.querySelector("#inherit")).color, green); }, "Style query 'inherit' matching"); @@ -284,6 +300,9 @@ @container style(--reg-length: initial) { #reg-px-initial { color: green; } } + @container not style(--reg-length) { + #reg-px-initial-implicit { color: green; } + } #reg-container-font-relative { --reg-length: 10px; @@ -316,11 +335,15 @@ @container style(--reg-length: initial) { #reg-initial-keyword { color: green; } } + @container not style(--reg-length) { + #reg-initial-implicit { color: green; } + } </style> <div id="registered"> <div id="reg-container-px"> <div id="reg-px"></div> <div id="reg-px-initial"></div> + <div id="reg-px-initial-implicit"></div> </div> <div id="reg-container-font-relative"> <div id="reg-font-relative"></div> @@ -334,6 +357,7 @@ <div id="reg-container-initial"> <div id="reg-initial-value"></div> <div id="reg-initial-keyword"></div> + <div id="reg-initial-implicit"></div> </div> </div> <script> diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002-ref.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002-ref.html index 9dc6c572b30..da96a826cff 100644 --- a/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002-ref.html +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002-ref.html @@ -4,13 +4,3 @@ <div>PASS</div> <div>PASS</div> <div>PASS</div> -<div><span style="color:green">P</span>ASS if P is green.</div> -<div><span style="color:green">P</span>ASS if P is green.</div> -<div><span style="color:green">P</span>ASS if P is green.</div> -<div><span style="color:green">P</span>ASS if P is green.</div> -<div style="color:green">PASS if text is green.</div> -<div style="color:green">PASS if text is green.</div> -<div style="color:green">PASS if text is green.</div> -<div style="color:green">PASS if text is green.</div> -<div style="color:green">PASS if text is green.</div> -<div style="color:green">PASS if text is green.</div> diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002.html index 96e7db40cef..a44c64c7007 100644 --- a/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002.html +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<title>CSS Container Queries Test: Container for pseudo elements</title> +<title>CSS Container Queries Test: Container for ::before/::after pseudo elements</title> <link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-queries"> <link rel="match" href="pseudo-elements-002-ref.html"> <style> @@ -16,61 +16,13 @@ @container (max-width: 100px) { #c4::after { content: "PASS" } } @container (min-width: 150px) { #c4::after { content: "FAIL" } } - - @container (max-width: 300px) { #c5::first-letter { color: green } } - @container (max-width: 300px) { #c6::first-letter { color: green } } - - @container (min-width: 400px) { #c7::first-letter { color: green } } - @container (min-width: 400px) { #c8::first-letter { color: green } } - - @container (max-width: 300px) { #c9::first-line { color: green } } - @container (max-width: 300px) { #c10::first-line { color: green } } - - @container (min-width: 400px) { #c11::first-line { color: green } } - @container (min-width: 400px) { #c12::first-line { color: green } } - - #c13::first-line { color: red } - @container (min-width: 400px) { #c13::first-line { color: green } } - @container (min-width: 400px) { #c14::first-line { color: green } } </style> <div id="c1" class="container" style="width:100px"></div> <div id="c2" class="container" style="width:200px"></div> <div id="c3" class="container" style="width:100px"></div> <div id="c4" class="container" style="width:200px"></div> -<div class="container" style="width:400px"> - <div id="c5" class="container" style="width:300px">PASS if P is green.</div> -</div> -<div class="container" style="width:400px"> - <div id="c6" class="container" style="width:400px">PASS if P is green.</div> -</div> -<div id="c7" class="container" style="width:400px"> - <div class="container" style="width:300px">PASS if P is green.</div> -</div> -<div id="c8" class="container" style="width:300px"> - <div class="container" style="width:300px">PASS if P is green.</div> -</div> -<div class="container" style="width:400px"> - <div id="c9" class="container" style="width:300px">PASS if text is green.</div> -</div> -<div class="container" style="width:400px"> - <div id="c10" class="container" style="width:400px">PASS if text is green.</div> -</div> -<div id="c11" class="container" style="width:400px"> - <div class="container" style="width:300px">PASS if text is green.</div> -</div> -<div id="c12" class="container" style="width:300px"> - <div class="container" style="width:300px">PASS if text is green.</div> -</div> -<div id="c13" class="container" style="width:300px">PASS if text is green.</div> -<div id="c14" class="container" style="width:300px">PASS if text is green.</div> <script> document.body.offsetTop; c2.style.width = "100px"; c4.style.width = "100px"; - c6.style.width = "300px"; - c8.style.width = "400px"; - c10.style.width = "300px"; - c12.style.width = "400px"; - c13.style.width = "400px"; - c14.style.width = "400px"; </script> diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002b-ref.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002b-ref.html new file mode 100644 index 00000000000..5783b77fec3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002b-ref.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<title>CSS Test Reference</title> +<div><span style="color:green">P</span>ASS if P is green.</div> +<div><span style="color:green">P</span>ASS if P is green.</div> +<div><span style="color:green">P</span>ASS if P is green.</div> +<div><span style="color:green">P</span>ASS if P is green.</div> +<div style="color:green">PASS if text is green.</div> +<div style="color:green">PASS if text is green.</div> +<div style="color:green">PASS if text is green.</div> +<div style="color:green">PASS if text is green.</div> +<div style="color:green">PASS if text is green.</div> +<div style="color:green">PASS if text is green.</div> diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002b.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002b.html new file mode 100644 index 00000000000..e1874e035b0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002b.html @@ -0,0 +1,58 @@ +<!DOCTYPE html> +<title>CSS Container Queries Test: Container for ::first-letter/::first-line pseudo elements</title> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-queries"> +<link rel="match" href="pseudo-elements-002b-ref.html"> +<style> + .container { container-type: inline-size; } + + @container (max-width: 300px) { #c5::first-letter { color: green } } + @container (max-width: 300px) { #c6::first-letter { color: green } } + + @container (min-width: 400px) { #c7::first-letter { color: green } } + @container (min-width: 400px) { #c8::first-letter { color: green } } + + @container (max-width: 300px) { #c9::first-line { color: green } } + @container (max-width: 300px) { #c10::first-line { color: green } } + + @container (min-width: 400px) { #c11::first-line { color: green } } + @container (min-width: 400px) { #c12::first-line { color: green } } + + #c13::first-line { color: red } + @container (min-width: 400px) { #c13::first-line { color: green } } + @container (min-width: 400px) { #c14::first-line { color: green } } +</style> +<div class="container" style="width:400px"> + <div id="c5" class="container" style="width:300px">PASS if P is green.</div> +</div> +<div class="container" style="width:400px"> + <div id="c6" class="container" style="width:400px">PASS if P is green.</div> +</div> +<div id="c7" class="container" style="width:400px"> + <div class="container" style="width:300px">PASS if P is green.</div> +</div> +<div id="c8" class="container" style="width:300px"> + <div class="container" style="width:300px">PASS if P is green.</div> +</div> +<div class="container" style="width:400px"> + <div id="c9" class="container" style="width:300px">PASS if text is green.</div> +</div> +<div class="container" style="width:400px"> + <div id="c10" class="container" style="width:400px">PASS if text is green.</div> +</div> +<div id="c11" class="container" style="width:400px"> + <div class="container" style="width:300px">PASS if text is green.</div> +</div> +<div id="c12" class="container" style="width:300px"> + <div class="container" style="width:300px">PASS if text is green.</div> +</div> +<div id="c13" class="container" style="width:300px">PASS if text is green.</div> +<div id="c14" class="container" style="width:300px">PASS if text is green.</div> +<script> + document.body.offsetTop; + c6.style.width = "300px"; + c8.style.width = "400px"; + c10.style.width = "300px"; + c12.style.width = "400px"; + c13.style.width = "400px"; + c14.style.width = "400px"; +</script> diff --git a/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-077.html b/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-077.html index 7cc9a335035..9f2c69e9cf8 100644 --- a/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-077.html +++ b/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-077.html @@ -1,9 +1,9 @@ <!doctype HTML> <meta charset="utf8"> -<title>CSS Content Visibility: content-visibility is not animatable.</title> +<title>CSS Content Visibility: content-visibility is animatable.</title> <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> -<meta name="assert" content="content-visibility is not animatable"> +<meta name="assert" content="content-visibility is animatable"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> @@ -22,6 +22,6 @@ <script> test(() => { const computedStyle = getComputedStyle(container); - assert_equals(computedStyle.contentVisibility, "visible"); -}, "Content-visibility is not animatable"); + assert_equals(computedStyle.contentVisibility, "auto"); +}, "Content-visibility is animatable"); </script> diff --git a/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-interpolation.html b/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-interpolation.html new file mode 100644 index 00000000000..9e5551a6f84 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/content-visibility/content-visibility-interpolation.html @@ -0,0 +1,86 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/6429"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body> +<script> +const alwaysVisible = [ + {at: -1, expect: 'visible'}, + {at: 0, expect: 'visible'}, + {at: 0.1, expect: 'visible'}, + {at: 0.9, expect: 'visible'}, + {at: 1, expect: 'visible'}, + {at: 1.5, expect: 'visible'}, +]; +const alwaysHidden = [ + {at: -1, expect: 'hidden'}, + {at: 0, expect: 'hidden'}, + {at: 0.1, expect: 'hidden'}, + {at: 0.9, expect: 'hidden'}, + {at: 1, expect: 'hidden'}, + {at: 1.5, expect: 'hidden'}, +]; + +test_interpolation({ + property: 'content-visibility', + from: 'visible', + to: 'hidden', + // transition:all is not supposed to allow content-visibility to be transitioned. + 'CSS Transitions with transition: all': alwaysHidden, +}, [ + {at: -1, expect: 'visible'}, + {at: 0, expect: 'visible'}, + {at: 0.1, expect: 'visible'}, + {at: 0.9, expect: 'visible'}, + {at: 1, expect: 'hidden'}, + {at: 1.5, expect: 'hidden'}, +]); + +test_interpolation({ + property: 'content-visibility', + from: 'hidden', + to: 'visible', + // transition:all is not supposed to allow content-visibility to be transitioned. + 'CSS Transitions with transition: all': alwaysVisible, +}, [ + {at: -1, expect: 'hidden'}, + {at: 0, expect: 'hidden'}, + {at: 0.1, expect: 'visible'}, + {at: 0.9, expect: 'visible'}, + {at: 1, expect: 'visible'}, + {at: 1.5, expect: 'visible'}, +]); + +test_no_interpolation({ + property: 'content-visibility', + from: 'auto', + to: 'visible' +}); + +test_interpolation({ + property: 'content-visibility', + from: 'visible', + to: 'visible' +}, [ + {at: -1, expect: 'visible'}, + {at: 0, expect: 'visible'}, + {at: 0.5, expect: 'visible'}, + {at: 1, expect: 'visible'}, + {at: 1.5, expect: 'visible'}, +]); + +test_interpolation({ + property: 'content-visibility', + from: 'hidden', + to: 'hidden' +}, [ + {at: -1, expect: 'hidden'}, + {at: 0, expect: 'hidden'}, + {at: 0.5, expect: 'hidden'}, + {at: 1, expect: 'hidden'}, + {at: 1.5, expect: 'hidden'}, +]); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-03.html b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-03.html index 4270e2e0d3c..10273637267 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-03.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-03.html @@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: character-variant(doesnt-exist) styleset(doesnt-exist); } .high { font-variant-alternates: stylistic(foo); diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-06.html b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-06.html index bbeca548f63..c3f315723cb 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-06.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-06.html @@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: styleset(doesnt-exist); } .high { font-variant-alternates: styleset(foo); diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-09.html b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-09.html index 7cc6a1a30aa..2c67b1439e6 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-09.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-09.html @@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: character-variant(doesnt-exist); } .high { font-variant-alternates: character-variant(foo); diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-12.html b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-12.html index 12f1cc75955..0f2b9d317b9 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-12.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-12.html @@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: swash(doesnt-exist); } .high { font-variant-alternates: swash(foo); diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-15.html b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-15.html index becb4d40b80..58a58d3cd15 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-15.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-15.html @@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: ornaments(doesnt-exist); } .high { font-variant-alternates: ornaments(foo); diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-18.html b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-18.html index 8dfe0b86503..26e1ecd0c22 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-18.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-variant-alternates-18.html @@ -24,6 +24,7 @@ font-family: fwf; font-size: 2em; line-height: 1.1; + font-variant-alternates: annotation(doesnt-exist); } .high { font-variant-alternates: annotation(foo); diff --git a/tests/wpt/web-platform-tests/css/css-grid/animation/grid-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-grid/animation/grid-no-interpolation.html new file mode 100644 index 00000000000..1293cdb9d5d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/animation/grid-no-interpolation.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-grid/#auto-tracks"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-grid/#grid-auto-flow-property"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-grid/#line-placement"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-grid/#propdef-grid-template-areas"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body> +<script> +test_no_interpolation({ + property: 'grid-auto-columns', + from: 'initial', + to: '123px' +}); + +test_no_interpolation({ + property: 'grid-auto-flow', + from: 'initial', + to: 'column' +}); + +test_no_interpolation({ + property: 'grid-auto-rows', + from: 'initial', + to: '123px' +}); + +test_no_interpolation({ + property: 'grid-column-end', + from: 'initial', + to: '123' +}); + +test_no_interpolation({ + property: 'grid-column-start', + from: 'initial', + to: '123' +}); + +test_no_interpolation({ + property: 'grid-row-end', + from: 'initial', + to: '123' +}); + +test_no_interpolation({ + property: 'grid-row-start', + from: 'initial', + to: '123' +}); + +test_no_interpolation({ + property: 'grid-template-areas', + from: 'initial', + to: '"."' +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-images/animation/image-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-images/animation/image-no-interpolation.html new file mode 100644 index 00000000000..1f9faf7fbb5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-images/animation/image-no-interpolation.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-images/#the-image-rendering"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-images/#the-image-orientation"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body> +<script> +test_no_interpolation({ + property: 'image-orientation', + from: 'initial', + to: 'none' +}); + +test_no_interpolation({ + property: 'image-rendering', + from: 'initial', + to: 'pixelated' +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-images/object-position-interpolation.html b/tests/wpt/web-platform-tests/css/css-images/animation/object-position-interpolation.html index 13a1b177c8a..13a1b177c8a 100644 --- a/tests/wpt/web-platform-tests/css/css-images/object-position-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-images/animation/object-position-interpolation.html diff --git a/tests/wpt/web-platform-tests/css/css-images/object-view-box-interpolation.html b/tests/wpt/web-platform-tests/css/css-images/animation/object-view-box-interpolation.html index 18ac72db70d..18ac72db70d 100644 --- a/tests/wpt/web-platform-tests/css/css-images/object-view-box-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-images/animation/object-view-box-interpolation.html diff --git a/tests/wpt/web-platform-tests/css/css-inline/alignment-baseline-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-inline/animation/alignment-baseline-no-interpolation.html index 57deaf8abe6..8cbe0c98d81 100644 --- a/tests/wpt/web-platform-tests/css/css-inline/alignment-baseline-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-inline/animation/alignment-baseline-no-interpolation.html @@ -1,6 +1,8 @@ <!DOCTYPE html> <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-inline/#alignment-baseline-property"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/interpolation-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-inline/dominant-baseline-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-inline/animation/dominant-baseline-no-interpolation.html index 85bc377ba92..7f6be5aac2b 100644 --- a/tests/wpt/web-platform-tests/css/css-inline/dominant-baseline-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-inline/animation/dominant-baseline-no-interpolation.html @@ -1,6 +1,8 @@ <!DOCTYPE html> <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-inline/#dominant-baseline-property"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/interpolation-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-inline/initial-letter-no-interoplation.html b/tests/wpt/web-platform-tests/css/css-inline/initial-letter-no-interoplation.html new file mode 100644 index 00000000000..1efc4123ca2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-inline/initial-letter-no-interoplation.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-inline/#sizing-drop-initials"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body> +<script> +test_no_interpolation({ + property: 'initial-letter', + from: 'initial', + to: '123' +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-lists/inline-block-list-marker-ref.html b/tests/wpt/web-platform-tests/css/css-lists/inline-block-list-marker-ref.html index 6a36181107e..6deadbfc9b6 100644 --- a/tests/wpt/web-platform-tests/css/css-lists/inline-block-list-marker-ref.html +++ b/tests/wpt/web-platform-tests/css/css-lists/inline-block-list-marker-ref.html @@ -18,7 +18,7 @@ li { border: 1px solid; display: list-item; } li::marker { content: counters(list-item, ".") " "; } .wrap { width: 22ch; } -.m { width: -webkit-min-content; width: min-content; } +.m { width: fit-content; } ib { display:inline-block; } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/css-lists/inline-block-list-ref.html b/tests/wpt/web-platform-tests/css/css-lists/inline-block-list-ref.html index 41b8504e4df..fc5b92c9078 100644 --- a/tests/wpt/web-platform-tests/css/css-lists/inline-block-list-ref.html +++ b/tests/wpt/web-platform-tests/css/css-lists/inline-block-list-ref.html @@ -17,7 +17,7 @@ body { margin-left: 40px; } li { border: 1px solid; display: list-item; } .wrap { width: 22ch; } -.m { width: -webkit-min-content; width: min-content; } +.m { width: fit-content; } ib { display:inline-block; } </style> </head> diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-filter.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-filter.html index cbfa8baaa76..0ba7a0021da 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-filter.html +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-filter.html @@ -2,7 +2,7 @@ <html class="reftest-wait"> <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#basic-shape-interpolation"> <link rel="match" href="clip-path-animation-filter-ref.html"> -<meta name="fuzzy" content="maxDifference=0-10; totalPixels=0-150"> +<meta name="fuzzy" content="maxDifference=0-10; totalPixels=0-151"> <style> .container { width: 100px; diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-003.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-003.html new file mode 100644 index 00000000000..af1de750c5b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-path-003.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<title>CSS Masking: clip-path property and path() function with non-zero reference box offset</title> +<link rel="help" href="https://drafts.csswg.org/css-shapes/#basic-shape-functions"> +<link rel="help" href="https://drafts.csswg.org/css-shapes/#funcdef-basic-shape-path"> +<link rel="match" href="reference/green-100x100.html"> +<style> + #target { + clip-path: path('M0 100h100v100h-100z'); + } +</style> +<svg> + <g id="target"> + <rect y="-100" width="100" height="300" fill="red"/> + <rect width="100" height="100" fill="green"/> + </g> +</svg> diff --git a/tests/wpt/web-platform-tests/css/css-multicol/crashtests/float-multicol-crash.html b/tests/wpt/web-platform-tests/css/css-multicol/crashtests/float-multicol-crash.html new file mode 100644 index 00000000000..a8f01db169e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-multicol/crashtests/float-multicol-crash.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<style> +#htmlvar00001 { + shape-outside: inset(-1px 8px 1px 1px); +} + +* { + font-size: 1px; + float: right; + column-width: 7px; +} +</style> +<select id="htmlvar00001" size="1"></select> +<wbr> +<span contenteditable="true"></span> diff --git a/tests/wpt/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior.html b/tests/wpt/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior.html index f018d5cd876..0bf335d770d 100644 --- a/tests/wpt/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior.html +++ b/tests/wpt/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior.html @@ -102,10 +102,10 @@ function verify_y_prevented_and_set_boundary_prevents_x() { instruction1.style.fontWeight = 'normal'; instruction2.style.fontWeight = 'bold'; test.step(function() { - assert_equals(root.scrollTop, 100); - assert_equals(root.scrollLeft, 0); + assert_equals(root.scrollTop, 100, "overscroll-behavior-y: none should prevent scroll propagation on y axis."); + assert_equals(root.scrollLeft, 0, "overscroll-behavior-y: none should only prevent scroll propagation on y axis."); window.scrollTo(0, 0); - }, "overscroll-behavior-y: none should only prevent scroll propagation on y axis."); + }); container.style.overscrollBehaviorX = 'none'; container.style.overscrollBehaviorY = 'auto'; @@ -118,9 +118,9 @@ function verify_x_prevented_and_set_boundary_allows_inner() { instruction2.style.fontWeight = 'normal'; instruction3.style.fontWeight = 'bold'; test.step(function() { - assert_equals(root.scrollTop, 0); - assert_equals(root.scrollLeft, 100); - }, "overscroll-behavior-x: none should only prevent scroll propagation on x axis."); + assert_equals(root.scrollTop, 0, "overscroll-behavior-x: none should only prevent scroll propagation on x axis."); + assert_equalhhs(root.scrollLeft, 100, "overscroll-behavior-x: none should prevent scroll propagation on x axis." ); + }); container.style.overscrollBehaviorX = 'none'; container.style.overscrollBehaviorY = 'none'; @@ -135,11 +135,11 @@ function verify_inner_allowed_and_set_nonscrollable_allows_propagation() { instruction3.style.fontWeight = 'normal'; instruction4.style.fontWeight = 'bold'; test.step(function() { - assert_equals(container.scrollTop, 0); - assert_equals(container.scrollLeft, 0); - assert_equals(root.scrollTop, 100); - assert_equals(root.scrollLeft, 100); - }, "overscroll-behavior should latch the scroll to the inner container."); + assert_equals(container.scrollTop, 0, "overscroll-behavior should latch the scroll to the inner container."); + assert_equals(container.scrollLeft, 0, "overscroll-behavior should latch the scroll to the inner container."); + assert_equals(root.scrollTop, 100, "overscroll-behavior should latch the scroll to the inner container."); + assert_equals(root.scrollLeft, 100, "overscroll-behavior should latch the scroll to the inner container."); + }); non_scrollable.style.overscrollBehaviorX = 'none'; non_scrollable.style.overscrollBehaviorY = 'none'; @@ -149,9 +149,9 @@ function verify_inner_allowed_and_set_nonscrollable_allows_propagation() { function verify_non_scrollable_allows_propagation() { test.step(function() { - assert_equals(root.scrollLeft, 0); - assert_equals(root.scrollTop, 0); - }, "overscroll-behavior on non-scrollable area should not affect scroll propagation."); + assert_equals(root.scrollLeft, 0, "overscroll-behavior on non-scrollable area should not affect scroll propagation."); + assert_equals(root.scrollTop, 0, "overscroll-behavior on non-scrollable area should not affect scroll propagation."); + }); actions_promise.then( () => { test.done(); }); diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing.html index 97f00e6e8eb..16cbdf0c571 100644 --- a/tests/wpt/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing.html +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing.html @@ -60,6 +60,7 @@ assert_valid("<percentage> | <length>+", "calc(100vh - 10px) 30px"); assert_valid("<number>", "-109"); assert_valid("<number>", "2.3e4"); +assert_valid("<number>", "calc(1 / 2)"); assert_valid("<integer>", "-109"); assert_valid("<integer>", "19"); assert_valid("<integer>", "calc(1)"); diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-computation.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-computation.html index ec2d35c7fb9..f4c718b139b 100644 --- a/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-computation.html +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/registered-property-computation.html @@ -141,6 +141,12 @@ test_computed_value('<integer>', 'calc(2.6 + 3.1)', '6'); test_computed_value('<integer>+', '15 calc(2.4) calc(2.6)', '15 2 3'); +test_computed_value('<number>', '15', '15'); +test_computed_value('<number>', 'calc(15 + 15)', '30'); +test_computed_value('<number>', 'calc(24 / 10)', '2.4'); + +test_computed_value('<number>+', '15 calc(15 + 15) calc(24 / 10)', '15 30 2.4'); + test_computed_value('<color>', '#ff0000', 'rgb(255, 0, 0)'); test_computed_value('<color>', '#000f00', 'rgb(0, 15, 0)'); test_computed_value('<color>', '#00000a', 'rgb(0, 0, 10)'); diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/marker-computed-content.html b/tests/wpt/web-platform-tests/css/css-pseudo/marker-computed-content.html index b2df337adcd..c58e0540448 100644 --- a/tests/wpt/web-platform-tests/css/css-pseudo/marker-computed-content.html +++ b/tests/wpt/web-platform-tests/css/css-pseudo/marker-computed-content.html @@ -51,7 +51,6 @@ const expectations = { for (const target of document.querySelectorAll('.list > li')) { const {content} = getComputedStyle(target, '::marker'); test(() => { - debugger; assert_equals(content, expectations[target.className]); }, `Computed 'content' for list-item ::marker, variant ${target.className}`); } diff --git a/tests/wpt/web-platform-tests/css/css-sizing/animation/height-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-sizing/animation/height-no-interpolation.html new file mode 100644 index 00000000000..902fe2e22f8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/animation/height-no-interpolation.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-sizing/#preferred-size-properties"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body> +<script> +// height is interpolable, but height:auto is not. +test_no_interpolation({ + property: 'height', + from: '0px', + to: 'auto' +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-computed.html b/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-computed.html index c03b2826997..18461c0ed2e 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-computed.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/parsing/contain-intrinsic-size-computed.html @@ -9,6 +9,9 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/computed-testcommon.js"></script> +<style> +#scratch { display: none } +</style> </head> <body> <div id=target></div> diff --git a/tests/wpt/web-platform-tests/css/css-text/animations/hyphen-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-text/animations/hyphen-no-interpolation.html new file mode 100644 index 00000000000..e1e89d17723 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/animations/hyphen-no-interpolation.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-text-4/#propdef-hyphenate-character"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-text-4/#propdef-hyphenate-limit-chars"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-text/#hyphens-property"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body> +<script> +test_no_interpolation({ + property: 'hyphenate-character', + from: 'initial', + to: '"e"' +}); + +test_no_interpolation({ + property: 'hyphenate-limit-chars', + from: 'initial', + to: '10' +}); + +test_no_interpolation({ + property: 'hyphens', + from: 'initial', + to: 'auto' +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-text/animations/line-break-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-text/animations/line-break-no-interpolation.html new file mode 100644 index 00000000000..937b2483662 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/animations/line-break-no-interpolation.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> +<link rel=help href="https://w3c.github.io/csswg-drafts/css-text/#line-break-property"> +<link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/interpolation-testcommon.js"></script> + +<body> +<script> +test_no_interpolation({ + property: 'line-break', + from: 'initial', + to: 'anywhere' +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content-ref.html b/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content-ref.html new file mode 100644 index 00000000000..eae9e2c4711 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content-ref.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> +<title>View transitions: animations in the new element show up in the images (ref)</title> +<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/"> +<link rel="author" href="mailto:khushalsagar@chromium.org"> + +<style> +#target { + width:100px; + height:100px; + background: grey; + will-change: transform; +} + +.child { + width: 50px; + height: 50px; + will-change: transform; + background: green; +} +</style> + +<div id="target"> + <div class="child"> + I'm the inner composited child. + </div> +</div> + diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content-subset-ref.html b/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content-subset-ref.html new file mode 100644 index 00000000000..eee7f19529b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content-subset-ref.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> +<title>View transitions: animations in the new element show up in the images if it partially changes (ref)</title> +<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/"> +<link rel="author" href="mailto:khushalsagar@chromium.org"> + +<style> +#target { + width:100px; + height:100px; + background: blue; + will-change: transform; +} + +.child { + width: 50px; + height: 50px; + will-change: transform; + background: grey; +} +</style> + +<div id="target"> + <div class="child"> + I'm the inner composited child. + </div> +</div> + diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content-subset.html b/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content-subset.html new file mode 100644 index 00000000000..d5a342c5720 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content-subset.html @@ -0,0 +1,80 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<title>View transitions: animations in the new element show up in the images if it partially changes</title> +<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/"> +<link rel="author" href="mailto:khushalsagar@chromium.org"> +<link rel="match" href="animating-new-content-subset-ref.html"> + +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> +<style> +#target { + width:100px; + height:100px; + background: blue; + view-transition-name: target; + will-change: transform; +} + +.child { + width: 50px; + height: 50px; + will-change: transform; + background: green; +} + +.hidden { + width: 10px; + height: 10px; + background: grey; + view-transition-name: hidden; +} + +html::view-transition-group(hidden) { animation-duration: 300s; visibility: hidden;} + +html::view-transition-group(target) { + animation: unset; +} + +html::view-transition-image-pair(target) { + isolation: unset; +} +html::view-transition-old(target), html::view-transition-new(target) { + animation: unset; + mix-blend-mode: normal; +} + +html::view-transition-old(target) { + opacity: 0; +} + +html::view-transition-new(target) { + opacity: 1; +} +</style> + +<div id="target"> + <div class="child" id="child"> + I'm the inner composited child. + </div> +</div> +<div class="hidden"></div> + +<script> +failIfNot(document.startViewTransition, "Missing document.startViewTransition"); + +async function runTest() { + let transition = document.startViewTransition(); + transition.ready.then(async () => { + await waitForAtLeastOneFrame(); + await waitForAtLeastOneFrame(); + child.style.background = "grey"; + + await waitForAtLeastOneFrame(); + await waitForAtLeastOneFrame(); + takeScreenshot(); + }); +} +onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); +</script> + diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content.html b/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content.html new file mode 100644 index 00000000000..9bfcb51a913 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-view-transitions/animating-new-content.html @@ -0,0 +1,75 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<title>View transitions: animations in the new element show up in the images</title> +<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/"> +<link rel="author" href="mailto:khushalsagar@chromium.org"> +<link rel="match" href="animating-new-content-ref.html"> + +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> +<style> +#target { + width:100px; + height:100px; + background: blue; + view-transition-name: target; + will-change: transform; +} + +.child { + width: 50px; + height: 50px; + will-change: transform; + background: green; +} + +.hidden { + width: 10px; + height: 10px; + background: grey; + view-transition-name: hidden; +} + +html::view-transition-group(hidden) { animation-duration: 300s; } +html::view-transition-image-pair(hidden) { animation: unset; opacity: 0; } + +html::view-transition-group(target) { + animation: unset; +} + +html::view-transition-old(target) { + animation: unset; + opacity: 0; +} + +html::view-transition-new(target) { + animation: unset; + opacity: 1; +} +</style> + +<div id="target"> + <div class="child"> + I'm the inner composited child. + </div> +</div> +<div class="hidden"></div> + +<script> +failIfNot(document.startViewTransition, "Missing document.startViewTransition"); + +async function runTest() { + let transition = document.startViewTransition(); + transition.ready.then(async () => { + await waitForAtLeastOneFrame(); + await waitForAtLeastOneFrame(); + target.style.background = "grey"; + + await waitForAtLeastOneFrame(); + await waitForAtLeastOneFrame(); + takeScreenshot(); + }); +} +onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); +</script> + diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/README.md b/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/README.md deleted file mode 100644 index 9bf89de07a8..00000000000 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/README.md +++ /dev/null @@ -1,24 +0,0 @@ -Generators -========== - -Following test files are generated by the programs in this directory: -* orthogonal-parent-shrink-to-fit-001 - -## Setup - -1. Install node.js. -2. Change the current directory to this directory. -3. Type the following commands: -``` -npm install -``` -4. (optional) Install gulp globally so it'll be on your path: -``` -sudo npm install -g gulp -``` - -## Generate Test Files - -``` -gulp -``` diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/generate.py b/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/generate.py new file mode 100755 index 00000000000..6d54eebc050 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/generate.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +import os +import string + +from typing import List, Tuple + +test_template = """<h3>{number}: {title}</h3> +<div class="test"> + {html} +</div>""" + + +def generate_test_list() -> List[Tuple[str, str]]: + test_list = []; + outers = [ + ["inline-block", '<div class="inline-block">', '</div><span class="next">ZZ</span>'], + ["float", '<div class="float">', '</div><span class="next">ZZ</span>'], + ["table-cell", '<table><tr><td>', '</td><td class="next">ZZ</td></tr></table>']]; + middles = [ + None, + ["inline-block", '<div class="inline-block">', '</div>']]; + targets = [ + ["block", '<div class="target">HH</div>'], + ["inline", '<span class="target">HH</span>'], + ["block with borders", '<div class="target border">HHH</div>'], + ["inline with borders", '<span class="target border">HHH</span>']]; + for outer in outers: + for middle in middles: + for target in targets: + title = target[0]; + html = target[1]; + if middle is not None: + title += " in " + middle[0]; + html = middle[1] + html + middle[2]; + title = "Shrink-to-fit " + outer[0] + " with a child of orthogonal " + title; + html = outer[1] + html + outer[2]; + test_list.append((title, html)); + return test_list + + +def read_template() -> str: + with open("template.html") as f: + return f.read() + + +def main(): + template = read_template() + test_list = generate_test_list() + + dest_dir = os.path.abspath( + os.path.join(os.path.dirname(os.path.abspath(__file__)), + os.path.pardir, + os.path.pardir)) + + for index in range(-1, len(test_list)): + if index == -1: + offset = 0 + suffix = "" + tests = test_list + title = "Shrink-to-fit with orthogonal children" + flags = " combo" + else: + offset = index + suffix = string.ascii_letters[index] + tests = [test_list[index]] + title = tests[0][0] + flags = "" + + filename = f"orthogonal-parent-shrink-to-fit-001{suffix}.html" + + tests_data = [] + for idx, (test_title, html) in enumerate(tests): + number = offset + idx + 1 + tests_data.append(test_template.format(number=number, + title=test_title, + html=html)) + + output = template.replace("{{title}}", title) + output = output.replace("{{flags}}", flags) + output = output.replace("{{tests}}", "\n".join(tests_data)) + with open(os.path.join(dest_dir, filename), "w") as f: + f.write(output) + + +if __name__ == "__main__": + main() diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/gulpfile.js b/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/gulpfile.js deleted file mode 100644 index f364024084d..00000000000 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/gulpfile.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -var browserSync = null; -var gulp = require("gulp"); -var ejs = require("gulp-ejs"); -var rename = require("gulp-rename"); -var minimist = require('minimist'); -var argv = minimist(process.argv.slice(2)); - -gulp.task("default", [ - "orthogonal-parent-shrink-to-fit", -]); - -gulp.task("test", ["browser-sync", "watch"]); - -gulp.task("watch", function () { - gulp.watch("orthogonal-parent-shrink-to-fit.ejs", ["orthogonal-parent-shrink-to-fit"]); -}); - -gulp.task("browser-sync", function () { - if (!browserSync) - browserSync = require("browser-sync"); - browserSync({ - server: { - baseDir: "../../..", - directory: true, - }, - startPath: "css-writing-modes-3/", - }); -}); - -function reload() { - if (browserSync) - browserSync.reload(); -} - -gulp.task("server", function () { - var connect = require("connect"); - var serveIndex = require("serve-index"); - var serveStatic = require("serve-static"); - var directory = "../../.."; - var port = 8000; - connect() - .use(serveIndex(directory)) - .use(serveStatic(directory)) - .listen(port); - console.log("Listening on port " + port); -}) - -gulpTaskFromTemplateWithAffixes("orthogonal-parent-shrink-to-fit", "-001", -1, 24); - -gulp.task("update", function () { - const unicodeData = require('./unicode-data.js'); - unicodeData.copyToLocal(); -}); - -function gulpTaskFromTemplateWithAffixes(name, suffix, min, lim) { - if (argv.nocombo && min < 0) - min = 0; - if (argv.nochild && lim > 0) - lim = 0; - gulp.task(name, function () { - for (var i = min; i < lim; ++i) { - gulp.src(name + ".ejs") - .pipe(ejs({ index: i })) - .pipe(rename(name + suffix + affixFromIndex(i) + ".html")) - .pipe(gulp.dest("../..")); - } - reload(); - }); -} - -function affixFromIndex(index) { - if (index < 0) - return ""; - if (index >= 26) - throw new Error("Affix index too large (" + index + ")"); - return String.fromCharCode("a".charCodeAt(0) + index); -} diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/package.json b/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/package.json deleted file mode 100644 index 8046cf4240a..00000000000 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "generators", - "version": "1.0.0", - "description": "", - "main": "gulpfile.js", - "dependencies": {}, - "devDependencies": { - "browser-sync": "^2.10.1", - "connect": "^3.4.0", - "ejs": "^2.3.1", - "gulp": "^3.8.11", - "gulp-ejs": "^1.1.0", - "gulp-rename": "^1.2.2", - "minimist": "^1.1.1", - "serve-index": "^1.7.2", - "serve-static": "^1.10.0" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC" -} diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/orthogonal-parent-shrink-to-fit.ejs b/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/template.html index 043cbaf747a..74fc1852320 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/orthogonal-parent-shrink-to-fit.ejs +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/tools/generators/template.html @@ -1,48 +1,9 @@ <!DOCTYPE html> <meta charset="utf-8"> -<% -var testlist = []; -var outers = [ - ["inline-block", '<div class="inline-block">', '</div><span class="next">ZZ</span>'], - ["float", '<div class="float">', '</div><span class="next">ZZ</span>'], - ["table-cell", '<table><tr><td>', '</td><td class="next">ZZ</td></tr></table>']]; -var middles = [ - null, - ["inline-block", '<div class="inline-block">', '</div>']]; -var targets = [ - ["block", '<div class="target">HH</div>'], - ["inline", '<span class="target">HH</span>'], - ["block with borders", '<div class="target border">HHH</div>'], - ["inline with borders", '<span class="target border">HHH</span>']]; -for (var outer of outers) { - for (var middle of middles) { - for (var target of targets) { - var title = target[0]; - var html = target[1]; - if (middle) { - title += " in " + middle[0]; - html = middle[1] + html + middle[2]; - } - title = "Shrink-to-fit " + outer[0] + " with a child of orthogonal " + title; - html = outer[1] + html + outer[2]; - testlist.push([title, html]); - } - } -} -var min, limit, title; -if (index < 0) { - min = 0; - limit = testlist.length; - title = "Shrink-to-fit with orthogonal children" -} else { - min = index; - limit = index + 1; - title = testlist[index][0]; -} -%><title>CSS Writing Modes Test: <%= title %></title> +<title>CSS Writing Modes Test: {{title}}</title> <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#orthogonal-flows" title="7.3. Orthogonal Flows"> -<meta name="assert" content="<%= title %>"> -<meta name="flags" content="ahem dom<%= index < 0 ? ' combo' : ''%>"> +<meta name="assert" content="{{title}}"> +<meta name="flags" content="ahem dom{{flags}}"> <link rel="author" title="Koji Ishii" href="mailto:kojiishi@gmail.com"> <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2015-12-23 --> <script src="/resources/testharness.js"></script> @@ -88,13 +49,8 @@ td { <div id="container"> <p>Test passes if the X-position of the <b>left</b> edge of the orange box and the <b>right</b> edge of the blue box are the same. <p>If script is enabled, there should be one or more PASS and no FAIL. -<% for (var i = min; i < limit; ++i) { - var test = testlist[i]; -%><h3><%= (i + 1) + ": " + test[0] %></h3> -<div class="test"> - <%- test[1] %> +{{tests}} </div> -<% } %></div> <script> if (window.location.search == "?wait") { console.log("Sleeping 5 secs for debug"); diff --git a/tests/wpt/web-platform-tests/dom/events/preventDefault-during-activation-behavior.html b/tests/wpt/web-platform-tests/dom/events/preventDefault-during-activation-behavior.html new file mode 100644 index 00000000000..92874031347 --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/events/preventDefault-during-activation-behavior.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<title>preventDefault during activation behavior</title> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1197032"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/C#the-button-element"> +<link rel="help" href="https://dom.spec.whatwg.org/#dispatching-events"> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> + +<form id="f"> + <input type="submit" id="b"> +</form> + +<script> + +promise_test(async () => { + let form = document.getElementById("f"); + let button = document.getElementById("b"); + + let cached_event; + let submit_fired = false; + + let click_promise = new Promise((resolve, reject) => { + button.addEventListener("click", event => { + assert_false(submit_fired); + cached_event = event; + resolve(); + }); + }); + + form.addEventListener("submit", event => { + assert_false(submit_fired); + assert_true(!!cached_event, "click should have fired"); + + // Call preventDefault on the click event during its activation + // behavior, to test the bug that we're trying to test. + cached_event.preventDefault(); + + // prevent the form submission from navigating the page + event.preventDefault(); + + submit_fired = true; + }); + + assert_false(submit_fired); + button.click(); + await click_promise; + assert_true(submit_fired); +}, "behavior of preventDefault during activation behavior"); + +</script> diff --git a/tests/wpt/web-platform-tests/element-timing/image-src-change.html b/tests/wpt/web-platform-tests/element-timing/image-src-change.html index 992712102cf..7416a3f3658 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-src-change.html +++ b/tests/wpt/web-platform-tests/element-timing/image-src-change.html @@ -14,6 +14,8 @@ <script src="resources/element-timing-helpers.js"></script> <img elementtiming='my_image' id='my_id' /> <script> + setup({"hide_test_state": true}); + const performanceEntryPromise = (pathname) => { return new Promise(resolve => { new PerformanceObserver((entryList, observer) => { diff --git a/tests/wpt/web-platform-tests/eventsource/dedicated-worker/eventsource-constructor-no-new.any.js b/tests/wpt/web-platform-tests/eventsource/dedicated-worker/eventsource-constructor-no-new.any.js new file mode 100644 index 00000000000..48bc551130c --- /dev/null +++ b/tests/wpt/web-platform-tests/eventsource/dedicated-worker/eventsource-constructor-no-new.any.js @@ -0,0 +1,7 @@ +test(function() { + assert_throws_js(TypeError, + function() { + EventSource(''); + }, + "Calling EventSource constructor without 'new' must throw"); +}) diff --git a/tests/wpt/web-platform-tests/fenced-frame/csp-allowed.https.html b/tests/wpt/web-platform-tests/fenced-frame/csp-allowed.https.html new file mode 100644 index 00000000000..8c002bc8a9d --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/csp-allowed.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<title>Test opaque fenced frame navigations with allowed CSP</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +for (const resolve_to_config of [true, false]) { + const allowedCSPs = ["*", "https:", "https://*:*"]; + allowedCSPs.forEach((csp) => { + promise_test(async() => { + setupCSP(csp); + + const key = token(); + window.addEventListener('securitypolicyviolation', function(e) { + // Write to the server even though the listener is in the same file in + // the test below. + writeValueToServer(key, e.violatedDirective + ";" + e.blockedURI); + }, {once: true}); + + attachFencedFrame(await runSelectURL("resources/embeddee.html", + [key], resolve_to_config)); + + const result = await nextValueFromServer(key); + assert_equals(result, "PASS", + "The fenced frame should load for CSP fenced-frame-src " + csp); + }, "Fenced frame loaded for CSP fenced-frame-src " + csp + " using " + + (resolve_to_config ? "config" : "urn:uuid")); + + promise_test(async() => { + setupCSP(csp); + assert_true(navigator.canLoadAdAuctionFencedFrame()); + }, "Opaque-ads can load API returns true for " + csp + " using " + + (resolve_to_config ? "config" : "urn:uuid")); + }); +} +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/csp-blocked.https.html b/tests/wpt/web-platform-tests/fenced-frame/csp-blocked.https.html new file mode 100644 index 00000000000..3826fdd7f42 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/csp-blocked.https.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<title>Test opaque fenced frame navigations with disallowed CSP blocked</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +for (const resolve_to_config of [true, false]) { + const blockedCSPs = ["'none'", "'self'", "data:", "https://*", "https://*:80", + "https://b.test:*"]; + blockedCSPs.forEach((csp) => { + promise_test(async() => { + setupCSP(csp); + + const key = token(); + window.addEventListener('securitypolicyviolation', function(e) { + // Write to the server even though the listener is in the same file in + // the test below. + writeValueToServer(key, e.violatedDirective + ";" + e.blockedURI); + }, {once: true}); + + attachFencedFrame(await runSelectURL("resources/embeddee.html", + [key], resolve_to_config)); + + const result = await nextValueFromServer(key); + assert_equals(result, "fenced-frame-src;", + "The fenced frame should not load for CSP fenced-frame-src " + csp); + }, "Fenced frame blocked for CSP fenced-frame-src " + csp + " using " + + (resolve_to_config ? "config" : "urn:uuid")); + + promise_test(async() => { + setupCSP(csp); + assert_false(navigator.canLoadAdAuctionFencedFrame()); + }, "Opaque-ads can load API returns false for " + csp + " using " + + (resolve_to_config ? "config" : "urn:uuid")); + }); + + promise_test(async() => { + setupCSP("*", "'self'"); + + const key = token(); + window.addEventListener('securitypolicyviolation', function(e) { + // Write to the server even though the listener is in the same file in + // the test below. + writeValueToServer(key, e.violatedDirective + ";" + e.blockedURI); + }, {once: true}); + + attachFencedFrame(await runSelectURL("resources/embeddee.html", + [key], resolve_to_config)); + + const result = await nextValueFromServer(key); + assert_equals(result, "fenced-frame-src;", + "The fenced frame should not load for CSP frame-src 'self' even if " + + "another CSP allows loading a fenced frame."); + + // Test the canLoadOpaqueURL API to ensure it arrives at the same result. + assert_false(navigator.canLoadAdAuctionFencedFrame()); + }, "Fenced frame not loaded using " + + (resolve_to_config ? "config" : "urn:uuid") + + " if any of CSPs in place disallow loading"); +} +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/csp-fenced-frame-src-allowed.https.html b/tests/wpt/web-platform-tests/fenced-frame/csp-fenced-frame-src-allowed.https.html new file mode 100644 index 00000000000..cf603c29a69 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/csp-fenced-frame-src-allowed.https.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<meta http-equiv="Content-Security-Policy" content="fenced-frame-src 'self'"> +<title>Test Content-Security-Policy fenced-frame-src</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> +<script> +const key = token(); + +promise_test(async () => { + attachFencedFrame(generateURL( + "resources/csp-fenced-frame-src-allowed-inner.html", + [key])); + const result = await nextValueFromServer(key); + assert_equals(result, "loaded", + "The fenced frame is loaded as expected"); +}, "csp-fenced-frame-src-allowed"); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/csp-fenced-frame-src-blocked.https.html b/tests/wpt/web-platform-tests/fenced-frame/csp-fenced-frame-src-blocked.https.html new file mode 100644 index 00000000000..46f8778d476 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/csp-fenced-frame-src-blocked.https.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<meta http-equiv="Content-Security-Policy" content="fenced-frame-src 'none'"> +<title>Test Content-Security-Policy fenced-frame-src</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> +<script> +const key = token(); + +window.addEventListener('securitypolicyviolation', function(e) { + // Write to the server even though the listener is in the same file in the + // test below. + writeValueToServer(key, e.violatedDirective + ";" + e.blockedURI); +}); + +promise_test(async () => { + attachFencedFrame(generateURL( + "resources/csp-fenced-frame-src-blocked-inner.html", + [key])); + const result = await nextValueFromServer(key); + + const expected_blocked_uri = generateURL( + "resources/csp-fenced-frame-src-blocked-inner.html", + [key]).toString(); + assert_equals(result, "fenced-frame-src;" + expected_blocked_uri, + "The fenced frame is blocked because of CSP violation"); +}, "csp-fenced-frame-src-blocked"); + +promise_test(async () => { + assert_false(navigator.canLoadAdAuctionFencedFrame()); +}, "fenced-frame-src none is taken into account with " + + "navigator.canLoadAdAuctionFencedFrame"); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/csp-frame-src-allowed.https.html b/tests/wpt/web-platform-tests/fenced-frame/csp-frame-src-allowed.https.html new file mode 100644 index 00000000000..08c51fc3acf --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/csp-frame-src-allowed.https.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<meta http-equiv="Content-Security-Policy" content="frame-src 'self'"> +<title>Test Content-Security-Policy fenced-frame-src falling back to frame-src</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> +<script> +const key = token(); + +promise_test(async () => { + attachFencedFrame(generateURL( + "resources/csp-frame-src-allowed-inner.html", + [key])); + const result = await nextValueFromServer(key); + assert_equals(result, "loaded", + "The fenced frame is loaded as expected"); +}, "csp-frame-src-allowed"); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/csp-frame-src-blocked.https.html b/tests/wpt/web-platform-tests/fenced-frame/csp-frame-src-blocked.https.html new file mode 100644 index 00000000000..88e4a8b89f0 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/csp-frame-src-blocked.https.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<meta http-equiv="Content-Security-Policy" content="img-src 'self' https: https://*:*"> +<meta http-equiv="Content-Security-Policy" content="frame-src 'none'"> +<title>Test Content-Security-Policy fenced-frame-src falling back to frame-src</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> +<script> +const key = token(); + +window.addEventListener('securitypolicyviolation', function(e) { + // Write to the server even though the listener is in the same file in the + // test below. + writeValueToServer(key, e.violatedDirective + ";" + e.blockedURI); +}); + +promise_test(async () => { + attachFencedFrame(generateURL( + "resources/csp-frame-src-blocked-inner.html", + [key])); + const result = await nextValueFromServer(key); + + const expected_blocked_uri = generateURL( + "resources/csp-frame-src-blocked-inner.html", [key]).toString(); + assert_equals(result, "fenced-frame-src;" + expected_blocked_uri, + "The fenced frame is blocked because of CSP violation"); +}, "csp-frame-src-blocked"); + +promise_test(async () => { + assert_false(navigator.canLoadAdAuctionFencedFrame()); +}, "frame-src none is taken into account with navigator.canLoadAdAuctionFencedFrame"); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/csp-transparent-url.https.html b/tests/wpt/web-platform-tests/fenced-frame/csp-transparent-url.https.html new file mode 100644 index 00000000000..c1c815d49e4 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/csp-transparent-url.https.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<title>Test transparent url navigated in fenced frame interacting with CSP</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +function setupCSP(csp) { + let meta = document.createElement('meta'); + meta.httpEquiv = "Content-Security-Policy"; + meta.content = "fenced-frame-src " + csp; + document.head.appendChild(meta); +} + +const allowedCSPs = ["*", "https:", "'self'"]; +allowedCSPs.forEach((csp) => { + promise_test(async(t) => { + setupCSP(csp); + + t.step_timeout(t.unreached_func( + "The fenced frame should load for CSP fenced-frame-src " + csp), 3000); + + const fencedframe = attachFencedFrameContext(); + await fencedframe.execute(() => {}); + }, "Fenced frame loaded for CSP fenced-frame-src " + csp); +}); + +const blockedCSPs = ["'none'"]; +blockedCSPs.forEach((csp) => { + promise_test(async(t) => { + setupCSP(csp); + + const csp_violation = new Promise(resolve => { + window.addEventListener("securitypolicyviolation", resolve); + }); + + const fencedframe = attachFencedFrameContext(); + + const fencedframe_loaded = fencedframe.execute(() => {}); + fencedframe_loaded.then(t.unreached_func( + "The fenced frame should not load for CSP fenced-frame-src " + csp)); + + const csp_violation_event = await csp_violation; + const remote_url = getRemoteContextURL(location.origin).toString(); + assert_true(csp_violation_event.blockedURI.includes(remote_url), + "blockedURI should include the url"); + }, "Fenced frame blocked for CSP fenced-frame-src " + csp); +}); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/csp.https.html b/tests/wpt/web-platform-tests/fenced-frame/csp.https.html new file mode 100644 index 00000000000..6daa6a96e83 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/csp.https.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> + <title>Test Content Security Policy</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="resources/utils.js"></script> + <script src="/common/utils.js"></script> + + <body> + + <script> + promise_test(async () => { + const csp_key = token(); + + // The 'csp' property does not appear in the IDL definition for + // fenced frames, so ensure that the 'csp' property didn't + // leak over from the IFrame prototype. + assert_equals(HTMLFencedFrameElement.prototype.hasOwnProperty('csp'), + false); + + const new_frame = document.createElement('fencedframe'); + const new_config = new FencedFrameConfig(generateURL( + "resources/csp-inner.html", + [csp_key])); + new_frame.config = new_config; + + // This attribute will be ignored since the IDL for + // fenced frames do not support the 'csp' attribute. + new_frame.setAttribute("csp", "style-src 'none';"); + document.body.append(new_frame); + + // Get the result for the top-level fenced frame. + const fenced_frame_result = await nextValueFromServer(csp_key); + assert_equals(fenced_frame_result, "pass"); + + }, "Fenced Frames should not honor the csp attribute from parent page"); + </script> + + </body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/cspee.https.html b/tests/wpt/web-platform-tests/fenced-frame/cspee.https.html new file mode 100644 index 00000000000..7df3e882fa6 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/cspee.https.html @@ -0,0 +1,58 @@ +<!DOCTYPE html> +<title>Test fenced frame in CSPEE</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async(t) => { + const iframe = attachIFrameContext({attributes:[["csp", "frame-src *"]]}); + t.step_timeout(() => t.done(), 1000); + await iframe.execute(async (t) => { + const fencedframe = attachFencedFrameContext(); + await fencedframe.execute(() => {}); + }); + assert_unreached("fenced frame should not be loaded."); +}, 'fenced frame should not be loaded in CSPEE'); + +promise_test(async(t) => { + const iframe_a = attachIFrameContext({attributes:[["csp", "frame-src *"]]}); + t.step_timeout(() => t.done(), 1000); + await iframe_a.execute(async (t) => { + const iframe_b = attachIFrameContext(); + await iframe_b.execute(async (t) => { + const fencedframe = attachFencedFrameContext(); + await fencedframe.execute(() => {}); + }); + }); + assert_unreached("fenced frame should not be loaded."); +}, 'fenced frame should not be loaded if any ancestor has CSPEE'); + +promise_test(async(t) => { + const iframe = attachIFrameContext({attributes:[["csp", "frame-src *"]]}); + await iframe.execute(async (t) => { + assert_false(navigator.canLoadAdAuctionFencedFrame()); + }); +}, 'canLoadOpaqueURL considers CSPEE headers'); + +promise_test(async(t) => { + const iframe_a = attachIFrameContext({attributes:[["csp", "frame-src *"]]}); + await iframe_a.execute(async (t) => { + const iframe_b = attachIFrameContext(); + await iframe_b.execute(async (t) => { + assert_false(navigator.canLoadAdAuctionFencedFrame()); + }); + }); +}, 'canLoadOpaqueURL considers CSPEE headers up the ancestor chain'); + +promise_test(async(t) => { + const iframe = attachIFrameContext(); + await iframe.execute(async (t) => { + assert_true(navigator.canLoadAdAuctionFencedFrame()); + }); +}, 'canLoadOpaqueURL returns true if no CSPEE headers are present in iframe'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html new file mode 100644 index 00000000000..faebeec26c4 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<title>Test default permission policy features gating (*)</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/default-enabled-features-helper.js"></script> + +<body> +<script> +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, true, get_host_info().ORIGIN); +}, 'Same-origin fenced frame loads when feature policies are *'); + +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, true, get_host_info().REMOTE_ORIGIN); +}, 'Cross-origin fenced frame loads when feature policies are *'); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html.headers new file mode 100644 index 00000000000..d39cf98dd5c --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html.headers @@ -0,0 +1 @@ +Permissions-Policy: attribution-reporting=(*), shared-storage=(*)
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html new file mode 100644 index 00000000000..a338e00c874 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<title>Test default permission policy features gating ()</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/default-enabled-features-helper.js"></script> + +<body> +<script> +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, false, get_host_info().ORIGIN); +}, 'Same-origin fenced frame does not load when feature policies are none'); + +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, false, get_host_info().REMOTE_ORIGIN); +}, 'Cross-origin fenced frame does not load when feature policies are none'); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html.headers new file mode 100644 index 00000000000..5d534499d74 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html.headers @@ -0,0 +1 @@ +Permissions-Policy: attribution-reporting=(), shared-storage=()
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html new file mode 100644 index 00000000000..d59ee7fcdc8 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html @@ -0,0 +1,71 @@ +<!DOCTYPE html> +<title>Test default permission policy features gating (self)</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/default-enabled-features-helper.js"></script> + +<body> +<script> +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, true, get_host_info().ORIGIN); +}, 'Same-origin fenced frame loads when feature policies are self'); + +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, false, get_host_info().REMOTE_ORIGIN); +}, 'Cross-origin fenced frame does not load when feature policies are self'); + +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({ + generator_api: "sharedstorage", + origin: get_host_info().ORIGIN}); + + await fencedframe.execute(async () => { + assert_true(document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should be allowed in the outer fenced frame."); + const fencedframe_inner = await attachFencedFrameContext({ + generator_api: "sharedstorage", + origin: get_host_info().REMOTE_ORIGIN}); + + await fencedframe_inner.execute(async () => { + assert_true( + document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should be allowed in the nested fenced " + + "frame that's cross origin to its embedder."); + }, []); + }, []); +}, 'Fenced frames default feature policies are set to allow *'); + +promise_test(async(t) => { + // We do this test the "old fashioned way" because a redirect in a fenced + // frame remote context will cause it to lose its ability to communicate with + // the main page (which results in a timeout). + const page1_key = token(); + const redirect_key = token(); + + const urn = await generateURNFromFledge("resources/default-enabled-features-redirect.https.html", [page1_key, redirect_key]); + const fencedframe = attachFencedFrame(urn); + + // The fenced frame will send its attribution reporting result and then + // attempt to redirect to a remote origin page. + const page1_resp = await nextValueFromServer(page1_key); + assert_equals(page1_resp, "true", + "Attribution reporting should be enabled on the original page."); + + // There is no API to observe whether the document in the fenced frame loaded + // or not. Instead, set up a timeout. If the document loads, "FAIL" will be + // sent to the server. Otherwise "blocked" will be sent after 2 seconds. + const fencedframe_blocked = new Promise(r => t.step_timeout(r, 1000)); + assert_equals("blocked", await Promise.any([ + nextValueFromServer(redirect_key).then(() => "loaded"), + fencedframe_blocked.then(() => "blocked") + ]), "The fenced frame redirect should not be successful."); +}, 'A fenced frame redirected to a page that does not allow feature policies ' + + 'does not navigate'); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html.headers new file mode 100644 index 00000000000..8bfa33eb8a3 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html.headers @@ -0,0 +1 @@ +Permissions-Policy: attribution-reporting=(self), shared-storage=(self)
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-allow.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-allow.https.html new file mode 100644 index 00000000000..dd6dd4ec502 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-allow.https.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<title>Test default permission policy features with allow="" attribute</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/default-enabled-features-helper.js"></script> + +<body> +<script> +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, /*should_load=*/true, + get_host_info().ORIGIN, + allow="shared-storage *; attribution-reporting *"); +}, 'Same-origin fenced frame with allow attribute enabling required features'); + +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, /*should_load=*/true, + get_host_info().REMOTE_ORIGIN, + allow="shared-storage *; attribution-reporting *"); +}, 'Cross-origin fenced frame with allow attribute enabling required features'); + +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({ + generator_api: "fledge", + headers: [["Permissions-Policy", "attribution-reporting=()"]], + origin: get_host_info().ORIGIN}); + + await fencedframe.execute(async () => { + assert_false(document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should NOT be allowed in the fenced frame."); + }, []); +}, 'Delivered policies can further restrict permissions of a fenced frame'); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-change.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-change.https.html new file mode 100644 index 00000000000..179a8683e32 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-change.https.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<title>Test changing the allow="" attribute after a navigation</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/default-enabled-features-helper.js"></script> + +<body> +<script> +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({ + generator_api: "sharedstorage", + attributes: [["allow", "shared-storage *; attribution-reporting *"]], + origin: get_host_info().ORIGIN}); + + fencedframe.element.allow = "attribution-reporting 'none'"; + + await fencedframe.execute(async () => { + assert_true(document.featurePolicy.allowsFeature('attribution-reporting'), + "Changing the allow attribute should do nothing for this navigation."); + }, []); +}, 'Changing the allow attribute is a no-op for the current navigation'); + +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({ + generator_api: "sharedstorage", + attributes: [["allow", "shared-storage *; attribution-reporting *"]], + origin: get_host_info().ORIGIN}); + + fencedframe.element.allow = "attribution-reporting 'none'"; + + await fencedframe.execute(async () => { + location.reload(); + }, []); + + await fencedframe.execute(async () => { + assert_true(document.featurePolicy.allowsFeature('attribution-reporting'), + "Changing the allow attribute should do nothing on frame refresh."); + }, []); + +}, 'Changing the allow attribute is a no-op for frame-initiated navigations'); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-disallow.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-disallow.https.html new file mode 100644 index 00000000000..29fdc788bf5 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-disallow.https.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<title>Test default permission policy features with allow="" attribute</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/default-enabled-features-helper.js"></script> + +<body> +<script> +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, /*should_load=*/false, + get_host_info().ORIGIN, allow="shared-storage 'none'"); +}, 'Same-origin fenced frame with allow attribute disabling required feature'); + +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, /*should_load=*/false, + get_host_info().REMOTE_ORIGIN, allow="shared-storage 'none'"); +}, 'Cross-origin fenced frame with allow attribute disabling required feature'); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html new file mode 100644 index 00000000000..7683b35a699 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<title>Test where attribution-reporting is disabled in the top-level page</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/default-enabled-features-helper.js"></script> + +<body> +<script> +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, /*should_load=*/false, + get_host_info().ORIGIN, + allow="attribution-reporting *; shared-storage *;"); +}, 'Same-origin fenced frame with allow attribute enabling required feature ' + + 'but page disabling feature.'); + +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, /*should_load=*/false, + get_host_info().REMOTE_ORIGIN, + allow="attribution-reporting *; shared-storage *;"); +}, 'Cross-origin fenced frame with allow attribute enabling required feature ' + + 'but page disabling feature.'); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html.headers new file mode 100644 index 00000000000..af6d6ecb2e9 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html.headers @@ -0,0 +1 @@ +Permissions-Policy: attribution-reporting=()
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html new file mode 100644 index 00000000000..0e9c300bdcb --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<title>Test default permission policy features gating unset</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/default-enabled-features-helper.js"></script> + +<body> +<script> +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, /*should_load=*/true, + get_host_info().ORIGIN); +}, 'Same-origin fenced frame loads when feature policies are unset'); + +promise_test(async(t) => { + await runDefaultEnabledFeaturesTest(t, /*should_load=*/true, + get_host_info().REMOTE_ORIGIN); +}, 'Cross-origin fenced frame loads when feature policies are unset'); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html.headers new file mode 100644 index 00000000000..e087474e2aa --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html.headers @@ -0,0 +1 @@ +Permissions-Policy: geolocation=(*)
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigation-to-blob.https.html b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigation-to-blob.https.html new file mode 100644 index 00000000000..9b299cd5e1e --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigation-to-blob.https.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<title>Fenced frame disallowed navigations to blob: URL</title> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="/fetch/local-network-access/resources/support.sub.js"></script> + +<body> +<script> +const kPublicUtils = resolveUrl("resources/utils.js", Server.HTTPS_PUBLIC); + +function getTimeoutPromise(t) { + return new Promise(resolve => + t.step_timeout(() => resolve("NOT LOADED"), 2000)); +} + +// The following tests ensure that an embedder cannot navigate a +// `mode=opaque-ads` fenced frame to an opaque URN or a fenced frame config +// object that represents a blob: URL +for (const resolve_to_config of [true, false]) { + promise_test(async t => { + const key = token(); + const blobURL = URL.createObjectURL( + new Blob([`${createLocalSource(key, kPublicUtils)}`], + {type: 'text/html'})); + const select_url_result = await runSelectURL(blobURL); + attachFencedFrame(select_url_result); + const loaded_promise = nextValueFromServer(key); + const result = await Promise.any([loaded_promise, getTimeoutPromise(t)]); + assert_equals(result, "NOT LOADED"); + }, "fenced frame " + (resolve_to_config ? "config" : "urn:uuid") + + " => blob: URL"); +} +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigation-to-data.https.html b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigation-to-data.https.html new file mode 100644 index 00000000000..7ab8edc7e11 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigation-to-data.https.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<title>Fenced frame disallowed navigations to data: URL</title> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="/fetch/local-network-access/resources/support.sub.js"></script> + +<body> +<script> +const kPublicUtils = resolveUrl("resources/utils.js", Server.HTTPS_PUBLIC); + +function getTimeoutPromise(t) { + return new Promise(resolve => + t.step_timeout(() => resolve("NOT LOADED"), 2000)); +} + +// The following tests ensure that an embedder cannot navigate a +// `mode=opaque-ads` fenced frame to an opaque URN or a fenced frame config +// object that represents a data: URL +for (const resolve_to_config of [true, false]) { + promise_test(async t => { + const key = token(); + const select_url_result = await + runSelectURL(`data:text/html, ${createLocalSource(key, kPublicUtils)}`); + attachFencedFrame(select_url_result); + const loaded_promise = nextValueFromServer(key); + const result = await Promise.any([loaded_promise, getTimeoutPromise(t)]); + assert_equals(result, "NOT LOADED"); + }, "fenced frame " + (resolve_to_config ? "config" : "urn:uuid") + + " => data: URL"); +} +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigation-to-http.https.html b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigation-to-http.https.html new file mode 100644 index 00000000000..18ed92851af --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigation-to-http.https.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<title>Fenced frame disallowed navigations</title> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +function getTimeoutPromise(t) { + return new Promise(resolve => + t.step_timeout(() => resolve("NOT LOADED"), 2000)); +} + +// The following test ensures that an embedder cannot navigate a +// `mode=opaque-ads` fenced frame to an opaque URN that represents a: +// - http: URL +// We split this into a separate test file because `sharedStorage.selectURL()`, +// which is used to generate the URN in the test, has a limit of 3 calls per +// origin per pageload. We are unabled to generate this URN from FLEDGE. +for (const resolve_to_config of [true, false]) { + promise_test(async t => { + const key = token(); + const http_url = new URL("resources/embeddee.html", + get_host_info().HTTP_ORIGIN + location.pathname); + const select_url_result = await runSelectURL(http_url, [key], + resolve_to_config); + const fencedframe = attachFencedFrame(select_url_result, + /*mode=*/'opaque-ads'); + const loaded_promise = nextValueFromServer(key); + const result = await Promise.any([loaded_promise, getTimeoutPromise(t)]); + assert_equals(result, "NOT LOADED"); + }, "fenced frame " + (resolve_to_config ? "config" : "urn:uuid") + + " => http: URL"); +} +</script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigations-dangling-markup-urn.https.html b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigations-dangling-markup-urn.https.html new file mode 100644 index 00000000000..1a5720b0343 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigations-dangling-markup-urn.https.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<title>Fenced frame disallowed navigations with potentially-dangling markup</title> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="/fetch/local-network-access/resources/support.sub.js"></script> +<script src="resources/dangling-markup-helper.js"></script> + +<body> + +<script> +// These tests assert that fenced frames cannot be navigated to a urn:uuid URL +// that represents an HTTPS URLs with dangling markup. +for (const substring of kDanglingMarkupSubstrings) { + promise_test(async t => { + const key = token(); + + // Copied from from `generateURNFromFlege()`, since we have to modify the + // final URL that goes into `interestGroup.ads[0].renderUrl` for + // `navigator.joinAdInterestGroup()`. + const bidding_token = token(); + const seller_token = token(); + + let url_string = generateURL("resources/report-url.html?blocked", + [key]).toString(); + url_string = url_string.replace("blocked", substring); + + const interestGroup = { + name: 'testAd1', + owner: location.origin, + biddingLogicUrl: new URL(FLEDGE_BIDDING_URL, location.origin), + ads: [{renderUrl: url_string, bid: 1}], + userBiddingSignals: {biddingToken: bidding_token}, + trustedBiddingSignalsKeys: ['key1'], + adComponents: [], + }; + + // Pick an arbitrarily high duration to guarantee that we never leave the + // ad interest group while the test runs. + navigator.joinAdInterestGroup(interestGroup, /*durationSeconds=*/3000000); + + const auctionConfig = { + seller: location.origin, + interestGroupBuyers: [location.origin], + decisionLogicUrl: new URL(FLEDGE_DECISION_URL, location.origin), + auctionSignals: {biddingToken: bidding_token, sellerToken: seller_token}, + }; + + const urn = await navigator.runAdAuction(auctionConfig); + + const fencedframe = attachFencedFrame(urn); + const loaded_promise = nextValueFromServer(key); + const result = await Promise.any([loaded_promise, getTimeoutPromise(t)]); + assert_equals(result, "NOT LOADED"); + }, `fenced frame opaque URN => https: URL with dangling markup '${substring}'`); +} + +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigations-dangling-markup.https.html b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigations-dangling-markup.https.html new file mode 100644 index 00000000000..72f0855d59f --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigations-dangling-markup.https.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<title>Fenced frame disallowed navigations with potentially-dangling markup</title> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="/fetch/local-network-access/resources/support.sub.js"></script> +<script src="resources/dangling-markup-helper.js"></script> + +<body> + +<script> +// These tests assert that fenced frames cannot be navigated to HTTPs URLs +// with dangling markup. +for (const substring of kDanglingMarkupSubstrings) { + promise_test(async t => { + const key = token(); + let url_string = generateURL("resources/embeddee.html?blocked", [key]).toString(); + url_string = url_string.replace("blocked", substring); + const fencedframe = attachFencedFrame(url_string); + const loaded_promise = nextValueFromServer(key); + const result = await Promise.any([loaded_promise, getTimeoutPromise(t)]); + assert_equals(result, "NOT LOADED"); + }, `fenced frame dangling-markup URL with '${substring}'`); +} + +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigations.https.html b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigations.https.html new file mode 100644 index 00000000000..5cde50d4201 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/disallowed-navigations.https.html @@ -0,0 +1,118 @@ +<!DOCTYPE html> +<title>Fenced frame disallowed navigations</title> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="/fetch/local-network-access/resources/support.sub.js"></script> + +<body> + +<script> +// Baseline tests: +// - Embedder can navigate iframe to blob: URL +// - Embedder can navigate iframe to data: URL +// - Same-origin embedder can navigate iframe to javascript: URL +// - Embedder can navigate iframe to http: URL +// Fenced frame tests: +// - Embedder cannot navigate fenced frame to blob: URL +// - Embedder cannot navigate fenced frame to data: URL +// - Same-origin embedder cannot navigate fenced frame to +// javascript: URL +// - Embedder cannot navigate fenced frame to http: URL + +// Fenced frames are always put in the public IP address space which is the +// least privileged. In case a navigation to a local data: URL or blob: URL +// resource is allowed, they would only be able to fetch things that are *also* +// in the public IP address space. So for the document described by these local +// URLs, we'll set them up to only communicate back to the outer page via +// resources obtained in the public address space. +const kPublicUtils = resolveUrl("resources/utils.js", Server.HTTPS_PUBLIC); + +// These are just baseline tests asserting that this test's machinery to load +// blob:, data:, and javascript: URLs work properly in contexts where they are +// expected to. +promise_test(async () => { + const key = token(); + attachIFrame(`data:text/html, ${createLocalSource(key, kPublicUtils)}`); + const result = await nextValueFromServer(key); + assert_equals(result, "LOADED"); +}, "iframe data: URL"); + +promise_test(async () => { + const key = token(); + const blobURL = URL.createObjectURL( + new Blob([`${createLocalSource(key, kPublicUtils)}`], + {type: 'text/html'})); + attachIFrame(blobURL); + const result = await nextValueFromServer(key); + assert_equals(result, "LOADED"); +}, "iframe blob: URL"); + +promise_test(async () => { + const iframe = attachIFrameContext(); + iframe.src = "javascript:window.jsURLExecuted = true;" + await iframe.execute(async () => { + assert_equals(window.jsURLExecuted, true); + }); +}, "iframe javascript: URL"); + +// The following tests ensure that an embedder cannot navigate a fenced frame +// to: +// - data: URLs +// - blob: URLs +// - javascript: URLs +// - http: URLs +function getTimeoutPromise(t) { + return new Promise(resolve => + t.step_timeout(() => resolve("NOT LOADED"), 2000)); +} + +promise_test(async t => { + const key = token(); + attachFencedFrame(`data:text/html, ${createLocalSource(key, kPublicUtils)}`); + const loaded_promise = nextValueFromServer(key); + const result = await Promise.any([loaded_promise, getTimeoutPromise(t)]); + assert_equals(result, "NOT LOADED"); +}, `fenced frame data: URL`); + +promise_test(async t => { + const key = token(); + const blobURL = URL.createObjectURL( + new Blob([`${createLocalSource(key, kPublicUtils)}`], + {type: 'text/html'})); + attachFencedFrame(blobURL); + const loaded_promise = nextValueFromServer(key); + const result = await Promise.any([loaded_promise, getTimeoutPromise(t)]); + assert_equals(result, "NOT LOADED"); +}, `fenced frame blob: URL`); + +promise_test(async t => { + const fencedframe = attachFencedFrameContext(); + fencedframe.src = "javascript:window.jsURLExecuted = true;" + // Just in case the javascript URL executes asynchronously, let's wait for + // it. + await getTimeoutPromise(t); + await fencedframe.execute(async () => { + assert_equals(window.jsURLExecuted, undefined); + }); +}, `fenced frame javascript: URL`); + +promise_test(async t => { + const key = token(); + let http_url = new URL("resources/embeddee.html", + get_host_info().HTTP_ORIGIN + location.pathname); + http_url = generateURL(http_url, [key]); + assert_equals(http_url.protocol, "http:"); + const fencedframe = attachFencedFrame(http_url); + const loaded_promise = nextValueFromServer(key); + const result = await Promise.any([loaded_promise, getTimeoutPromise(t)]); + assert_equals(result, "NOT LOADED"); +}, `fenced frame http: URL`); + +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/embedder-coop-coep-blocked.https.html b/tests/wpt/web-platform-tests/fenced-frame/embedder-coop-coep-blocked.https.html new file mode 100644 index 00000000000..e0e418577dc --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/embedder-coop-coep-blocked.https.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<title>Test COOP/COEP properties set for a Fenced Frame Tree</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async(t) => { + const fencedframe = attachFencedFrameContext(); + const fencedframe_loaded = fencedframe.execute(() => {}); + const fencedframe_blocked = new Promise(r => t.step_timeout(r, 1000)); + assert_equals("blocked", await Promise.any([ + fencedframe_blocked.then(() => "blocked"), + fencedframe_loaded.then(() => "loaded"), + ]), "fenced frame should not be loaded."); +}, 'Create a fencedframe without COEP from an embedder setting COEP'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/embedder-coop-coep-blocked.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/embedder-coop-coep-blocked.https.html.headers new file mode 100644 index 00000000000..807872014ac --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/embedder-coop-coep-blocked.https.html.headers @@ -0,0 +1,2 @@ +cross-origin-opener-policy:same-origin +cross-origin-embedder-policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/embedder-csp-not-propagate.https.html b/tests/wpt/web-platform-tests/fenced-frame/embedder-csp-not-propagate.https.html new file mode 100644 index 00000000000..425cc9661e4 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/embedder-csp-not-propagate.https.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<title>Test embedder CSP not propagate to fenced frame</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async(t) => { + const iframe = attachIFrameContext( + {headers:[["Content-Security-Policy", "frame-src 'self'"]]}); + await iframe.execute(async() => { + const fencedframe = attachFencedFrameContext(); + await fencedframe.execute(async() => { + const nested_iframe = attachIFrameContext( + {origin:get_host_info().HTTPS_REMOTE_ORIGIN}); + await nested_iframe.execute(() => {}); + }); + }); +}, 'Embedder CSP should not propagate to fenced frame'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/embedder-no-coep.https.html b/tests/wpt/web-platform-tests/fenced-frame/embedder-no-coep.https.html new file mode 100644 index 00000000000..75980a13018 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/embedder-no-coep.https.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<title>Test COEP properties set for a Fenced Frame Tree</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="resources/embedder-policy.js"></script> + +<body> +<script> +promise_test(async () => { + const uuid = token(); + const frame = setupTest("coep:require-corp", uuid); + const result = await nextValueFromServer(uuid); + assert_equals(result, "PASS", "embedded page has been loaded."); +}, "Create fencedframe with COEP:require-corp"); + +promise_test(async () => { + const uuid = token(); + const frame = setupTest("no coep", uuid); + const result = await nextValueFromServer(uuid); + assert_equals(result, "PASS", + "page without COEP should be able to load page with COEP"); +}, "Create fencedframe without COEP header"); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/embedder-require-corp.https.html b/tests/wpt/web-platform-tests/fenced-frame/embedder-require-corp.https.html new file mode 100644 index 00000000000..9432d0cbb52 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/embedder-require-corp.https.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<meta name="timeout" content="long"> +<title>Test COEP properties set for a Fenced Frame Tree</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="resources/embedder-policy.js"></script> + +<body> +<script> +promise_test(async (t) => { + const uuid = token(); + const frame = setupTest("coep:require-corp", uuid); + const result = await nextValueFromServer(uuid); + assert_equals(result, "PASS", "embedded page has been loaded."); +}, "Create fencedframe with COEP:require-corp"); + +promise_test(async (t) => { + const uuid = token(); + t.step_timeout(() => t.done(), 1000); + const frame = setupTest("no coep", uuid); + const result = await nextValueFromServer(uuid); + assert_unreached("embedded page should not be loaded."); +}, "Create fencedframe without COEP header"); + +promise_test(async (t) => { + const uuid = token(); + // Make sure a different site is used. + hostname = get_host_info().REMOTE_HOST; + t.step_timeout(() => t.done(), 1000); + const frame = setupTest("coep:require-corp", uuid, hostname=hostname); + const result = await nextValueFromServer(uuid); + assert_unreached("embedded page should not be loaded."); +}, "Create fencedframe with a cross site COEP:require-corp and CORP:same-orign"); +</script> +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/embedder-require-corp.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/embedder-require-corp.https.html.headers new file mode 100644 index 00000000000..8df98474b58 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/embedder-require-corp.https.html.headers @@ -0,0 +1 @@ +cross-origin-embedder-policy: require-corp diff --git a/tests/wpt/web-platform-tests/fenced-frame/fence-api.https.html b/tests/wpt/web-platform-tests/fenced-frame/fence-api.https.html new file mode 100644 index 00000000000..7d350ff75f0 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/fence-api.https.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<title>Test window.fence object</title> + +<body> +<script> +promise_test(async () => { + + // Check that window.fence is undefined in the top-level frame. + assert_true(window.fence == null, + "window.fence should only be visible inside fenced frames."); + assert_true(fence == null, + "fence should only be visible inside fenced frames."); + + // Create a fenced frame. + const fence_api_token = token(); + const frame_url = generateURL("resources/fence-api-inner.https.html", + [fence_api_token]); + attachFencedFrame(frame_url); + + // Wait for the fenced frame to complete its fence API tests. + await nextValueFromServer(fence_api_token); + +}, "window.fence"); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/fence-report-event.https.html b/tests/wpt/web-platform-tests/fenced-frame/fence-report-event.https.html new file mode 100644 index 00000000000..ce217c7763a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/fence-report-event.https.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<title>Test window.fence.reportEvent</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({generator_api: 'fledge'}); + await fencedframe.execute(() => { + let event = {}; + assert_throws_js(TypeError, () => {window.fence.reportEvent(event);}); + + event.eventType = "click"; + assert_throws_js(TypeError, () => {window.fence.reportEvent(event);}); + + event.eventData = "dummy"; + assert_throws_js(TypeError, () => {window.fence.reportEvent(event);}); + + event.destination = ["buyer"]; + window.fence.reportEvent(event); + }); +}, 'window.fence.reportEvent'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/fence-urn-iframes.https.html b/tests/wpt/web-platform-tests/fenced-frame/fence-urn-iframes.https.html new file mode 100644 index 00000000000..cdde07329d3 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/fence-urn-iframes.https.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<title>Test window.fence availability in iframes.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> + +promise_test(async(t) => { + const frame = await attachIFrameContext(); + await frame.execute(() => { + assert_equals(window.fence, null); + }); +}, 'window.fence is unavailable in normal (non-urn) iframes'); + +promise_test(async(t) => { + // window.fence works in urn iframes. + var frame = await attachIFrameContext({generator_api: 'fledge'}); + await frame.execute(() => { + assert_not_equals(window.fence, null); + }); + // window.fence works after navigating to a new urn. + frame = await replaceFrameContext(frame, {generator_api: 'fledge'}); + await frame.execute(() => { + assert_not_equals(window.fence, null); + }); + // window.fence still works after embedder-initiated navigations to non-urns, + // because the concept of "embedder-initiated" navigations is nebulous in + // iframes. + frame = await replaceFrameContext(frame); + await frame.execute(() => { + assert_not_equals(window.fence, null); + }); +}, 'window.fence is available in urn iframes'); + +promise_test(async(t) => { + // window.fence works in urn iframes. + const frame = await attachIFrameContext({generator_api: 'fledge'}); + await frame.execute(async () => { + assert_not_equals(window.fence, null); + const nested_frame = await attachIFrameContext(); + await nested_frame.execute(() => { + assert_not_equals(window.fence, null); + }); + }); +}, 'window.fence is available in same-origin subframes of urn iframes'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/insecure-context.html b/tests/wpt/web-platform-tests/fenced-frame/insecure-context.html new file mode 100644 index 00000000000..44db6432a45 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/insecure-context.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<title>Insecure Context Test</title> +<script src="/common/utils.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> + +<body> + +<script> +promise_test(async t => { + const loaded_key = token(); + attachFencedFrame(generateURL( + "resources/csp-fenced-frame-src-allowed-inner.html", [loaded_key])); + + // There is no API to observe whether the document in the FencedFrame loaded + // or not. Instead, set up a timeout. If the document loads, "loaded" will be + // sent to the server. Otherwise "blocked" will be sent after 3 seconds. + step_timeout(() => { + writeValueToServer(loaded_key, "blocked"); + }, 3000); + + const message = await nextValueFromServer(loaded_key); + + assert_equals(message, "blocked"); +}, 'FencedFrame is not available in an insecure context'); + +promise_test(async t => { + assert_throws_js(TypeError, () => navigator.canLoadAdAuctionFencedFrame()); +}, 'navigator.canLoadAdAuctionFencedFrame is unavailable in insecure contexts'); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-by-name.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-by-name.https.html new file mode 100644 index 00000000000..a5df1e99424 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-by-name.https.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<title>Test named frame navigation of ancestors.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async () => { + // This test uses the following layout: + // A: Top-level frame + // B: iframe + // C: fencedframe + // D: fencedframe + // E: iframe + // + // The purpose is to test that name resolution of navigation targets ignores + // ancestors beyond fence boundaries. + + // Create an iframe B. + const B = attachIFrameContext(); + await B.execute(async () => { + window.name = "B"; + + // Create a fenced frame C inside of it. + window.C = attachFencedFrameContext(); + await window.C.execute(async () => { + window.name = "C"; + + // Navigate the target "B" from inside the fenced frame. + // It should open in a new tab due to fenced name lookup. + window.open("resources/dummy.html", "B"); + }); + }); + + // Observe that it created a new window, and the frame B is still here. + await B.execute(async () => { + // Create a nested iframe and fenced frame. + await window.C.execute(async () => { + window.D = attachFencedFrameContext(); + window.E = attachIFrameContext(); + + // Navigate the target "C" from inside the nested fenced frame. + // It should open in a new tab due to fenced name lookup. + await window.D.execute(async () => { + window.open("resources/dummy.html", "C"); + }); + }); + // Observe that it created a new window, and the frame C is still here. + await window.C.execute(async () => { + // Now attempt to navigate the target "C" from inside the iframe. + // It should open in a new tab with a console error, because sandboxed + // iframes (inherited from the fenced frame) are not allowed to navigate + // their ancestors. + await window.E.execute(() => { + window.open("resources/dummy.html", "C"); + }); + }); + + // Observe that C is still here. + await window.C.execute(() => {}); + }); +}, 'navigate named ancestors'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-nested-fenced-frame.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-nested-fenced-frame.https.html new file mode 100644 index 00000000000..ec41fe87575 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-nested-fenced-frame.https.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<title>Test navigating an ancestor frame from a nested fenced frame</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/navigate-ancestor-helper.js"></script> + +<body> +<script> +promise_test(async t => { + await runNavigateAncestorTest("nested fenced frame", "parent"); +}, "Nested fenced frames that navigate _parent end up navigating themselves"); + +promise_test(async t => { + await runNavigateAncestorTest("nested fenced frame", "top"); +}, "Nested fenced frames that navigate _top end up navigating themselves"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-nested-iframe.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-nested-iframe.https.html new file mode 100644 index 00000000000..977eae17486 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-nested-iframe.https.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<title>Test navigating an ancestor frame from a iframe in a fenced frame</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/navigate-ancestor-helper.js"></script> + +<body> +<script> +promise_test(async t => { + await runNavigateAncestorTest("nested iframe", "parent"); +}, "Iframes nested in fenced frames fail to navigate _parent"); + +promise_test(async t => { + await runNavigateAncestorTest("nested iframe", "top"); +}, "Iframes nested in fenced frames fail to navigate _top"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-top-level-fenced-frame.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-top-level-fenced-frame.https.html new file mode 100644 index 00000000000..9907f25292c --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigate-ancestor-top-level-fenced-frame.https.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<title>Test navigating an ancestor frame from a fenced frame</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/navigate-ancestor-helper.js"></script> + +<body> +<script> +promise_test(async t => { + await runNavigateAncestorTest("top-level fenced frame", "parent"); +}, "Top-level fenced frames that navigate _parent end up navigating themselves"); + +promise_test(async t => { + await runNavigateAncestorTest("top-level fenced frame", "top"); +}, "Top-level fenced frames that navigate _top end up navigating themselves"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigate-by-name-succeed.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigate-by-name-succeed.https.html new file mode 100644 index 00000000000..4d558f8d236 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigate-by-name-succeed.https.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<title>Test successful named frame navigation.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async () => { + // This test uses the following layout: + // A: Top-level frame + // B: fencedframe + // C: iframe + // + // The purpose is to test that named target lookups of C succeed in A, i.e. + // that lookups work even when the first child of a frame is fenced. + + const fencedframe = attachFencedFrameContext(); + const iframe = attachIFrameContext(); + + // Give the iframe a name. + await iframe.execute(() => { window.name = "target_frame"; }); + + // Modify state in the iframe, using a JS navigation to the target name. + window.open("javascript:window.success=true;", "target_frame"); + + // Check that the navigation happened in the iframe. + await iframe.execute(() => { + // If the JS code didn't run in the iframe, `window.success` would be + // undefined. + assert_true(window.success, 'The JS code ran in the iframe.'); + }); +}, 'navigate iframe sibling of fenced frame'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigate-descendant-by-name.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigate-descendant-by-name.https.html new file mode 100644 index 00000000000..08ce4b99f3a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigate-descendant-by-name.https.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> +<title>Test named frame navigation of descendants</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> + <!-- This anchor element is clicked via script to navigate a target frame by + name. The target frame will always exist inside a fenced frame tree, and + therefore shouldn't actually work. The expected behavior is that the + navigation should end up in a new top-level browsing context, as per [1], + which will communicate back to the main page (via the server stash) + letting us know that the navigation succeeded, and did not successfully + target a frame inside the fenced frame boundary. + + [1]: https://html.spec.whatwg.org/C/#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name + --> +<script> + const kAssertion = "The anchor element did not navigate a frame inside the " + + "fenced frame boundary: "; + // This is used by `navigate-by-name-reporting-helper.html` to let us know if + // the navigation correctly opened a new top-level popup window, or + // incorrectly targeted a browsing context inside the fenced frame boundary. + const navigation_success_key = token(); + // This is sent by the `navigate-by-name-inner.html` to indicate that it has + // set up a frame whose name is `target_frame`, that we are supposed to try + // and navigate by name. + const ready_for_navigation_key = token(); + + const a = document.createElement("a"); + a.href = generateURL('resources/navigate-by-name-reporting-helper.html', + [navigation_success_key]); + a.innerText = "Click to navigate target frame"; + a.target = "target_frame"; + document.body.append(a); + +async function runTest(test_type) { + const fenced_frame = + attachFencedFrame(generateURL( + `resources/navigate-by-name-inner.html`, + [ready_for_navigation_key, test_type])); + + // Wait for the fenced frame to say it is ready for us (the outer page) to + // initiate a named frame navigation, targeting a frame inside the fence. + let result = await nextValueFromServer(ready_for_navigation_key); + assert_equals(result, "READY", "The top-level fenced frame is ready for " + + "us to navigate"); + + // Now that the fenced frame has a frame whose name is `target_frame`, let's + // try and navigate it. + a.click(); + result = await nextValueFromServer(navigation_success_key); + assert_equals(result, "PASS", kAssertion + test_type); + + // Get a reference to the window opened up by the anchor navigation, and + // close it. + const win = window.open("", "target_frame"); + win.close(); + + // Clean up the fenced frame + document.body.removeChild(fenced_frame); +} + +promise_test(async() => { + // First just test that when we have no real target frame to navigate, + // everything works as expected. + a.click(); + const result = await nextValueFromServer(navigation_success_key); + assert_equals(result, "PASS", "The initial test works"); + + // Get a reference to the already-opened window and close it. + const win = window.open("", "target_frame"); + win.close(); +}, "setup"); + +promise_test(async () => { + return runTest("top-level fenced frame"); +}, "navigate top-level fenced frame by name"); + +promise_test(async () => { + return runTest("nested iframe"); +}, "navigate iframe nested in a fenced frame by name"); + +promise_test(async () => { + return runTest("nested fenced frame"); +}, "navigate nested fenced frame by name"); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigate-related-page-by-name.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigate-related-page-by-name.https.html new file mode 100644 index 00000000000..755f32a5a3c --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigate-related-page-by-name.https.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<title>Test named frame navigation of related pages.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async () => { + // A: top-level frame + // C: fencedframe + // B: auxiliary browsing context + // + // C should not be able to navigate B. + + // Create an auxiliary browsing context with a particular name. + const second_window = attachWindowContext({target: "target_name"}); + + // Create a fenced frame, and use the same target name inside of it. + const frame = attachFencedFrameContext(); + await frame.execute(async () => { + window.open("resources/dummy.html", "target_name"); + }); + + // Confirm that the top-level frame's related page (`second_window`) + // wasn't navigated by the fenced frame, i.e. that name resolution + // for related pages is fenced. + await second_window.execute(() => {}); +}, 'navigate related pages from inside a fenced frame'); + +promise_test(async () => { + // A: top-level frame + // B: auxiliary browsing context + // C: fencedframe + // + // A should not be able to navigate C. + + // Create an auxiliary browsing context. + const second_window = attachWindowContext(); + await second_window.execute(async () => { + // Create a fenced frame inside that context and give it a particular name. + window.frame = attachFencedFrameContext(); + await window.frame.execute(() => { + window.name = "target_name"; + }); + }); + + // Navigate that target name from the original top-level frame. + window.open("resources/dummy.html", "target_name"); + + // Confirm that the fenced frame wasn't navigated. + await second_window.execute(async () => { + await frame.execute(() => {}); + }); +}, 'navigate fenced frames inside related pages from the embedder'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigator-keyboard-layout-map.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigator-keyboard-layout-map.https.html new file mode 100644 index 00000000000..03fbc062e14 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigator-keyboard-layout-map.https.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<title>Test navigator.keyboard.getLayoutMap()</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> + +<script> +promise_test(async () => { + const keyboard_layout_key = token(); + + attachFencedFrame(generateURL( + "resources/navigator-keyboard-layout-map-inner.html", + [keyboard_layout_key])); + const actual_result = await nextValueFromServer(keyboard_layout_key); + + assert_equals(actual_result, "rejected", + "The fenced frame is not allowed to fetch keyboard map."); + +}, "keyboard.getLayoutMap()"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigator-keyboard-lock.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigator-keyboard-lock.https.html new file mode 100644 index 00000000000..74092a41d27 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigator-keyboard-lock.https.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<title>Test navigator.keyboard.lock</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> + +<script> +promise_test(async () => { + const keyboard_lock_key = token(); + + attachFencedFrame(generateURL( + "resources/navigator-keyboard-lock-inner.html", + [keyboard_lock_key])); + const actual_result = await nextValueFromServer(keyboard_lock_key); + + assert_equals(actual_result, "rejected", + "The fenced frame is not allowed to lock keyboard."); + +}, "keyboard.lock"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigator-subapp.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigator-subapp.https.html new file mode 100644 index 00000000000..c5b980537b3 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigator-subapp.https.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<title>navigator.subApp API test</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async () => { + const frame = attachFencedFrameContext(); + const result = await frame.execute(async () => { + const expected_error_message = + 'Failed to execute \'list\' on \'SubApps\': API is only supported in primary top-level browsing contexts.'; + try { + const list = await navigator.subApps.list(); + return 'navigator.subApps.list() succeeded'; + } catch (e) { + if (e.name === 'InvalidStateError' && + e.message === expected_error_message) { + return 'navigator.subApps.list() was disallowed'; + } + return 'navigator.subApps.list() failed with unknown error' + + `${e.name} ${e.message}`; + } + }); + assert_equals(result, 'navigator.subApps.list() was disallowed'); +}, 'navigator.subApps.list() should fail in the fenced frame.'); +</script> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigator-vibrate.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigator-vibrate.https.html new file mode 100644 index 00000000000..6bcabf4d478 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigator-vibrate.https.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<title>Test that navigator.vibrate is disabled in fenced frames.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +// Simulate a click in frame context `frame`. +async function click(frame) { + var actions = new test_driver.Actions(); + await actions.pointerMove(0, 0, {origin: frame}) + .pointerDown() + .pointerUp() + .send(); +} + +promise_test(async () => { + // This test ensures that vibration is disabled in fenced frames. + // It uses a top-level frame A and a fenced frame B. + // The structure of the test is as follows: + // - Check that B can't vibrate before user activation. + // - Check that B can't vibrate after user activation. + // - Check that A can't vibrate before user activation. + // - Check that A CAN vibrate after user activation. + + const B = attachFencedFrameContext(); + await B.execute(() => { + assert_false(navigator.userActivation.hasBeenActive); + var success = navigator.vibrate(100); + assert_false(success, + "Vibration failed in fenced frame before user activation"); + }); + + await click(B.element); + await B.execute(() => { + assert_true(navigator.userActivation.hasBeenActive); + var success = navigator.vibrate(100); + assert_false(success, + "Vibration failed in fenced frame, even after user activation"); + }); + + var success = navigator.vibrate(100); + assert_false(navigator.userActivation.hasBeenActive); + assert_false(success, + "Vibration failed in top-level frame before user activation"); + + await click(document.documentElement); + assert_true(navigator.userActivation.hasBeenActive); + var success = navigator.vibrate(100); + assert_true(success, + "Vibration succeeded in top-level frame after user activation"); +}, 'navigator.vibrate'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/navigator-virtualkeyboard.https.html b/tests/wpt/web-platform-tests/fenced-frame/navigator-virtualkeyboard.https.html new file mode 100644 index 00000000000..4f2a17f2ff3 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/navigator-virtualkeyboard.https.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<title>Test navigator.virtualKeyboard.overlaysContent</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> + +<script> +promise_test(async () => { + const frame = attachFencedFrameContext(); + + const response = await frame.execute(() => { + navigator.virtualKeyboard.overlaysContent = true; + return navigator.virtualKeyboard.overlaysContent; + }); + assert_equals(response, false, "overlaysContent had no effect"); +}, "virtualKeyboard.overlaysContent"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-inner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-inner.https.html new file mode 100644 index 00000000000..1bca25a957a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-inner.https.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to report the result of background fetch</title> + +<body> + <script> + (async function () { + const [background_fetch_register_key, method] = parseKeylist(); + const file = 'background-fetch-inner.https.html.headers'; + + navigator.serviceWorker.register("empty-worker.js", { scope: location.href }); + const registration = await navigator.serviceWorker.ready; + + const url = new URL(location.href); + + let promise; + switch (method) { + case 'fetch': + promise = registration.backgroundFetch.fetch('test-fetch', file); + break; + case 'get': + promise = registration.backgroundFetch.get('test-fetch'); + break; + case 'getIds': + promise = registration.backgroundFetch.getIds(); + break + default: + promise = Promise.resolve(); + } + + promise + .then(() => { + writeValueToServer(background_fetch_register_key, + `[backgroundFetch.${method}] Unexpectedly started`); + }) + .catch(() => { + writeValueToServer(background_fetch_register_key, + `[backgroundFetch.${method}] Failed inside fencedframe as expected`); + }) + .finally(() => { + registration.unregister(); + }); + })(); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-inner.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-inner.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-sw-inner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-sw-inner.https.html new file mode 100644 index 00000000000..78e58e5bbf5 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-sw-inner.https.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to report the result of background fetch in SW</title> + +<body> + <script type="module"> + const [background_fetch_register_key, method] = parseKeylist(); + + const getController = () => { + if (navigator.serviceWorker.controller) { + return navigator.serviceWorker.controller; + } + return new Promise(resolve => { + navigator.serviceWorker.addEventListener('controllerchange', () => { + resolve(navigator.serviceWorker.controller); + }); + }); + }; + + const sendMessageToServiceWorker = async () => { + const ctrl = await getController(); + return new Promise(resolve => { + ctrl.postMessage(method); + navigator.serviceWorker.onmessage = e => { + resolve(e.data); + } + }); + }; + + await navigator.serviceWorker.register( + "background-fetch-sw.js", { scope: location.href }); + const data = await sendMessageToServiceWorker(); + + writeValueToServer(background_fetch_register_key, data); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-sw-inner.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-sw-inner.https.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-sw-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-sw.js b/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-sw.js new file mode 100644 index 00000000000..44b7d087b57 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-fetch-sw.js @@ -0,0 +1,36 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async e => { + const method = e.data; + + let promise; + switch (method) { + case 'fetch': + promise = self.registration.backgroundFetch.fetch( + 'test-fetch', ['background-fetch-inner.https.html.headers'], + {title: 'Background Fetch'}); + break; + case 'get': + promise = self.registration.backgroundFetch.get('test-fetch') + break; + case 'getIds': + promise = registration.backgroundFetch.getIds(); + break; + default: + promise = Promise.resolve(); + break; + } + + const message = + await promise + .then(() => { + return `[backgroundFetch.${method}] Unexpectedly started`; + }) + .catch((e) => { + return `[backgroundFetch.${ + method}] Failed inside fencedframe as expected`; + }); + + e.source.postMessage(message); +}); diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-helper.js b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-helper.js new file mode 100644 index 00000000000..78b69f15de7 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-helper.js @@ -0,0 +1,23 @@ +const getOneShotSyncPromise = (registration, method) => { + if (method === 'register') { + return registration.sync.register('fencedframe-oneshot'); + } else if (method === 'getTags') { + return registration.sync.getTags(); + } + return Promise.resolve(); +}; + +const getPeriodicSyncPromise = (registration, method) => { + if (method === 'register') { + return registration.periodicSync.register( + 'fencedframe-periodic', {minInterval: 1000}); + } else if (method === 'getTags') { + return registration.periodicSync.getTags(); + } else if (method === 'unregister') { + return registration.periodicSync.unregister('fencedframe-periodic'); + } else { + return Promise.resolve(); + } +}; + +export {getOneShotSyncPromise, getPeriodicSyncPromise} diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-inner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-inner.https.html new file mode 100644 index 00000000000..81974c803ad --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-inner.https.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to report the result of background sync's register</title> + +<body> +<script type="module"> + import {getOneShotSyncPromise, getPeriodicSyncPromise} from './background-sync-helper.js'; + + const [background_sync_register_key] = parseKeylist(); + const searchParams = new URL(location.href).searchParams; + const method = searchParams.get('method'); + const periodic = searchParams.get('periodic'); + + navigator.serviceWorker.register("empty-worker.js", { scope: location.href }); + const registration = await navigator.serviceWorker.ready; + + try { + if (periodic) { + await getPeriodicSyncPromise(registration, method); + } else { + await getOneShotSyncPromise(registration, method); + } + writeValueToServer(background_sync_register_key, "unexpectedly registered"); + } catch (e) { + writeValueToServer(background_sync_register_key, e.message); + } finally { + registration.unregister(); + } +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-inner.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-inner.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-sw-inner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-sw-inner.https.html new file mode 100644 index 00000000000..b9521a4e20a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-sw-inner.https.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to report the result of background sync's register in SW</title> + +<body> +<script type="module"> + const [background_sync_register_key] = parseKeylist(); + const searchParams = new URL(location.href).searchParams; + const method = searchParams.get('method'); + const isPeriodic = searchParams.get('periodic'); + + const getController = () => { + if (navigator.serviceWorker.controller) { + return navigator.serviceWorker.controller; + } + return new Promise(resolve => { + navigator.serviceWorker.addEventListener('controllerchange', () => { + resolve(navigator.serviceWorker.controller); + }); + }); + }; + + const sendMessageToServiceWorker = async () => { + const ctrl = await getController(); + return new Promise(resolve => { + ctrl.postMessage({method, isPeriodic}); + navigator.serviceWorker.onmessage = e => { + resolve(e.data); + } + }); + }; + + await navigator.serviceWorker.register( + "background-sync-sw.js", { scope: location.href, type: "module" }); + const data = await sendMessageToServiceWorker(); + + writeValueToServer(background_sync_register_key, data); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-sw-inner.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-sw-inner.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-sw-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-sw.js b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-sw.js new file mode 100644 index 00000000000..5b0c791f0d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/background-sync-sw.js @@ -0,0 +1,21 @@ +import {getOneShotSyncPromise, getPeriodicSyncPromise} from './background-sync-helper.js'; + +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async e => { + const {method, isPeriodic} = e.data; + const promise = isPeriodic ? + getPeriodicSyncPromise(self.registration, method) : + getOneShotSyncPromise(self.registration, method); + const message = + await promise + .then(() => { + return `[background synnc ${method}] Unexpectedly started`; + }) + .catch((e) => { + return e.message; + }); + + e.source.postMessage(message); +}); diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/badging-sw.js b/tests/wpt/web-platform-tests/fenced-frame/resources/badging-sw.js new file mode 100644 index 00000000000..5bc3c9a1907 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/badging-sw.js @@ -0,0 +1,23 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async e => { + const method = e.data; + + let promise; + if (method === 'setAppBadge') { + promise = self.navigator.setAppBadge(1); + } else if (method === 'clearAppBadge') { + promise = self.navigator.clearAppBadge(); + } else { + promise = Promise.resolve(); + } + + const error = await promise + .then(() => { + return `[Badging API ${method}] Unexpectedly started`; + }) + .catch((e) => e); + + e.source.postMessage(error); +}); diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/before-unload-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/before-unload-inner.html new file mode 100644 index 00000000000..6d23cf88a3c --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/before-unload-inner.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Fenced frame content to report the beforeunload event is not fired</title> + +<body> +<script> +window.onload = () => { + const [before_unload_key] = parseKeylist(); + const url = new URL(location.href); + const next_url = url.searchParams.get('next_url'); + + if (next_url != null) { + writeValueToServer( + before_unload_key, 'Loaded the next url in a fenced frame'); + return; + } + + window.onbeforeunload = () => { + writeValueToServer( + before_unload_key, 'The beforeunload event is unexpectely fired.'); + }; + + location.href = + generateURL('before-unload-inner.html?next_url', [before_unload_key]); +}; +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/before-unload-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/before-unload-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/before-unload-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/check-header-referrer.py b/tests/wpt/web-platform-tests/fenced-frame/resources/check-header-referrer.py new file mode 100644 index 00000000000..b06fbc27047 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/check-header-referrer.py @@ -0,0 +1,16 @@ +import os + +from wptserve.utils import isomorphic_decode + + +def main(request, response): + response.headers.set(b"supports-loading-mode", b"fenced-frame") + + script = u""" + <script src="utils.js"></script> + <script> + const [referrer_key, _] = parseKeylist(); + writeValueToServer(referrer_key, "%s") + </script> + """ % (isomorphic_decode(request.headers.get(b"referer", b""))) + return (200, [], script) diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/check-header-sec-fetch-dest.py b/tests/wpt/web-platform-tests/fenced-frame/resources/check-header-sec-fetch-dest.py new file mode 100644 index 00000000000..98231079b33 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/check-header-sec-fetch-dest.py @@ -0,0 +1,14 @@ +import os + + +def main(request, response): + response.headers.set(b"supports-loading-mode", b"fenced-frame") + + script = u""" + <script src="utils.js"></script> + <script> + const [secfetch_key] = parseKeylist(); + writeValueToServer(secfetch_key, "%s") + </script> + """ % (request.headers.get(b"sec-fetch-dest", b"none")) + return (200, [], script) diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/content-index-sw.js b/tests/wpt/web-platform-tests/fenced-frame/resources/content-index-sw.js new file mode 100644 index 00000000000..c2759d9630e --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/content-index-sw.js @@ -0,0 +1,28 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async event => { + const method = event.data; + const {index} = self.registration; + const id = 'fenced-frame-id-sw'; + + let promise; + if (method === 'add') { + promise = index.add({ + id, + title: 'same title', + description: 'same description', + url: 'resources/' + }); + } else if (method === 'delete') { + promise = index.delete(id); + } else if (method === 'getAll') { + promise = index.getAll(); + } else { + promise = Promise.resolve(); + } + + const message = await promise.then(() => 'success').catch(e => e.message); + + event.source.postMessage(message); +}); diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/cookie-access.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/cookie-access.https.html new file mode 100644 index 00000000000..34e56811394 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/cookie-access.https.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Page loaded in a frame in a fenced frame tree</title> +<script> + // This page is loaded either in an iframe or a fenced frame + // nested inside a root fenced frame. + document.cookie = 'G=nested_in_fenced_frame; SameSite=Lax'; + const [cookie_value_key] = parseKeylist() + const cookie_value = document.cookie; + writeValueToServer(cookie_value_key, cookie_value); +</script> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/cookie-access.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/cookie-access.https.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/cookie-access.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/create-credential-inner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/create-credential-inner.https.html new file mode 100644 index 00000000000..5725177f217 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/create-credential-inner.https.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/webauthn/helpers.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to report the result of navigator.credentials.create</title> + +<body> +<script> +function base_path() { + return location.pathname.replace(/\/[^\/]*$/, '/'); +} + +standardSetup(function() { + 'use strict'; + async function init() { + // This file is meant to be navigated to from a <fencedframe> element. It + // reports back to the page hosting the <fencedframe> whether or not + // `navigator.credentials.create` is allowed. + const [key] = parseKeylist(); + + // Report whether or not `credentials.create` is allowed. + createCredential().then( + () => { + writeValueToServer(key, 'createCredential passed'); + }, + () => { + writeValueToServer(key, 'createCredential failed'); + }, + ); + } + + init(); +}); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/create-credential-inner.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/create-credential-inner.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/create-credential-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/create-popup.html b/tests/wpt/web-platform-tests/fenced-frame/resources/create-popup.html new file mode 100644 index 00000000000..a6cd81ec14f --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/create-popup.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Nested frames in a Fenced Frame tree creating popups</title> +<script> + // It is the document that `popup-noopener-inner.html` loads in a nested + // iframe/fenced frame. + // It's expected that the opener/openee references should be null, and + // window.name should be the empty string. + const [popup_noopener_key, popup_openee_key, popup_name_key] = parseKeylist(); + const src_popup = generateURL(`popup-noopener-destination.html`, + [popup_noopener_key, popup_name_key]); + const popup = window.open(src_popup, "foo"); + if (popup) { + writeValueToServer(popup_openee_key, "FAIL"); + } else { + writeValueToServer(popup_openee_key, "PASS"); + } +</script> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/create-popup.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/create-popup.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/create-popup.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html new file mode 100644 index 00000000000..bdb448c3473 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Page embedded as a fenced frame</title> +<script> + const [key] = parseKeylist(); + writeValueToServer(key, "loaded"); +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-allowed-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html new file mode 100644 index 00000000000..990f5ee469e --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Page embedded as a fenced frame</title> +<script> + // This file is expected to be unreachable from + // `csp-fenced-frame-src-blocked.html` in the parent directory because of CSP + // violation. + const [key] = parseKeylist(); + writeValueToServer(key, "loaded"); +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-fenced-frame-src-blocked-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-allowed-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-allowed-inner.html new file mode 100644 index 00000000000..bdb448c3473 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-allowed-inner.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Page embedded as a fenced frame</title> +<script> + const [key] = parseKeylist(); + writeValueToServer(key, "loaded"); +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-allowed-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-allowed-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-allowed-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-blocked-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-blocked-inner.html new file mode 100644 index 00000000000..eb90bb94e9a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-blocked-inner.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Page embedded as a fenced frame</title> +<script> + // This file is expected to be unreachable from `csp-frame-src-blocked.html` + // in the parent directory because of CSP violation. + const [key] = parseKeylist(); + writeValueToServer(key, "loaded"); +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-blocked-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-blocked-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-frame-src-blocked-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-inner.html new file mode 100644 index 00000000000..99df39fdc51 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-inner.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> + <script src="utils.js"></script> + + <style> + body {background-color: red;} + </style> + + <title>Fenced frame content to test Content Security Policies</title> + + <body> + <script> + const [csp_key] = parseKeylist(); + + function fail() { + writeValueToServer(csp_key, + "FAIL: img-src policy was not honored in fenced frame"); + } + + function pass() { + // The parent page is going to attempt to pass a + // style-src: 'none' CSP to the fenced frame. Make sure that + // the header is not honored. + const bgcolor = window.getComputedStyle(document.body, null) + .getPropertyValue('background-color'); + + if (bgcolor != "rgb(255, 0, 0)") { + writeValueToServer(csp_key, + "FAIL: style-src policy was passed to fenced frame"); + return; + } + + writeValueToServer(csp_key, "pass"); + } + </script> + <img src="csp.png" id="my_img" onload="fail();" onerror="pass();"> + </body> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-inner.html.headers new file mode 100644 index 00000000000..e89be70a431 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp-inner.html.headers @@ -0,0 +1,2 @@ +Supports-Loading-Mode: fenced-frame +Content-Security-Policy: img-src 'none'
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/csp.png b/tests/wpt/web-platform-tests/fenced-frame/resources/csp.png Binary files differnew file mode 100644 index 00000000000..53a9748ae02 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/csp.png diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/dangling-markup-helper.js b/tests/wpt/web-platform-tests/fenced-frame/resources/dangling-markup-helper.js new file mode 100644 index 00000000000..9e0fff23015 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/dangling-markup-helper.js @@ -0,0 +1,15 @@ +// These are used in tests that rely on URLs containing dangling markup. See +// https://github.com/whatwg/fetch/pull/519. +const kDanglingMarkupSubstrings = [ + "blo\nck<ed", + "blo\rck<ed", + "blo\tck<ed", + "blo<ck\ned", + "blo<ck\red", + "blo<ck\ted", +]; + +function getTimeoutPromise(t) { + return new Promise(resolve => + t.step_timeout(() => resolve("NOT LOADED"), 1500)); +}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js new file mode 100644 index 00000000000..d7eb3c63bef --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js @@ -0,0 +1,36 @@ +// This is a helper file used for the attribution-reporting-*.https.html tests. +// To use this, make sure you import these scripts: +// <script src="/resources/testharness.js"></script> +// <script src="/resources/testharnessreport.js"></script> +// <script src="/common/utils.js"></script> +// <script src="/common/dispatcher/dispatcher.js"></script> +// <script src="resources/utils.js"></script> +// <script src="/common/get-host-info.sub.js"></script> + +async function runDefaultEnabledFeaturesTest(t, should_load, fenced_origin, allow="") { + const fencedframe = await attachFencedFrameContext({ + generator_api: "fledge", + attributes: [["allow", allow]], + origin: fenced_origin}); + + if (!should_load) { + const fencedframe_blocked = new Promise(r => t.step_timeout(r, 1000)); + const fencedframe_loaded = fencedframe.execute(() => {}); + assert_equals(await Promise.any([ + fencedframe_blocked.then(() => "blocked"), + fencedframe_loaded.then(() => "loaded"), + ]), "blocked", "The fenced frame should not be loaded."); + return; + } + + await fencedframe.execute(() => { + assert_true( + document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should be allowed if the fenced " + + "frame loaded."); + assert_true( + document.featurePolicy.allowsFeature('shared-storage'), + "Shared storage should be allowed if the fenced " + + "frame loaded."); + }); +} diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html new file mode 100644 index 00000000000..000b1eb6dd7 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<title>Fenced frame attribution reporting redirect test</title> + +<body> +<script> +// This helper function will redirect a fenced frame to a remote origin page +// while embedded in a frame that does not allow attribution reporting on +// remote origins. That redirect should fail to load because of the attribution +// reporting restriction. +const [key1, key2] = parseKeylist(); + +if (location.origin == get_host_info().ORIGIN) { + const result_val = + document.featurePolicy.allowsFeature('attribution-reporting') & + document.featurePolicy.allowsFeature('shared-storage'); + + writeValueToServer(key1, + document.featurePolicy.allowsFeature('attribution-reporting')); + + const next_url = getRemoteOriginURL(generateURL( + "attribution-reporting-redirect.https.html", [key1, key2])); + location.href = next_url; +} else { + // The redirect should have been unsuccessful, so we should not reach this + // point. + writeValueToServer(key2, "FAIL"); +} + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/dummy.html b/tests/wpt/web-platform-tests/fenced-frame/resources/dummy.html new file mode 100644 index 00000000000..a0cf50713ec --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/dummy.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<title>Dummy page</title> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/embeddee.html b/tests/wpt/web-platform-tests/fenced-frame/resources/embeddee.html new file mode 100644 index 00000000000..3423be9aa4c --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/embeddee.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>A page embedded as a Fenced Frame for COEP tests</title> +<script> +const [uuid] = parseKeylist(); +writeValueToServer(uuid, "PASS"); +</script> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/embeddee.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/embeddee.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/embeddee.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/embedder-policy.js b/tests/wpt/web-platform-tests/fenced-frame/resources/embedder-policy.js new file mode 100644 index 00000000000..8c96afafce1 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/embedder-policy.js @@ -0,0 +1,39 @@ +// This file should be loaded alongside with utils.js. +// +// This file is loaded by: +// - embedder-no-coep.https.html +// - embedder-require-corp.https.html + +// Make input list to be used as a wptserve pipe +// (https://web-platform-tests.org/writing-tests/server-pipes.html). +// e.g. +// args: ['content-type,text/plain','Age,0'] +// return: 'header(content-type,text/plain)|header(Age,0)' +function generateHeader(headers) { + return headers.map((h) => { + return 'header(' + h + ')'; + }).join('|'); +} + +// Setup a fenced frame for embedder-* WPTs. +async function setupTest(test_type, uuid, hostname='') { + let headers = ["Supports-Loading-Mode,fenced-frame"]; + switch (test_type) { + case "coep:require-corp": + headers.push("cross-origin-embedder-policy,require-corp"); + headers.push("cross-origin-resource-policy,same-origin"); + break; + case "no coep": + break; + default: + assert_unreachable("unknown test_type:" + test_type); + break; + } + const tmp_url = new URL('resources/embeddee.html', location.href); + if (hostname) { + tmp_url.hostname = hostname; + } + tmp_url.searchParams.append("pipe", generateHeader(headers)); + const url = generateURL(tmp_url.toString(), [uuid]); + return attachFencedFrame(url); +} diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/empty-worker.js b/tests/wpt/web-platform-tests/fenced-frame/resources/empty-worker.js new file mode 100644 index 00000000000..49ceb2648a9 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/empty-worker.js @@ -0,0 +1 @@ +// Do nothing. diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fedcm-get-credential-inner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/fedcm-get-credential-inner.https.html new file mode 100644 index 00000000000..f30cd77838e --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fedcm-get-credential-inner.https.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to report the result of navigator.credentials.get</title> + +<body> +<script> +function isExpectedErrorMessage(e) { + return e.name === 'NotAllowedError' && + e.message === + 'The credential operation is not allowed in a fenced frame tree.'; +} + +// This file is meant to be navigated to from a <fencedframe> element. It +// reports back to the page hosting the <fencedframe> whether or not +// `navigator.credentials.get` is allowed. +const [key] = parseKeylist(); + +const test_options = { + federated: { + providers: [{ + configURL: 'https://idp.test/fedcm.json', + clientId: '1', + nonce: '2', + }] + } +}; +navigator.credentials.get(test_options) + .then( + () => { + writeValueToServer(key, 'unexpected passed'); + }, + (e) => { + if (isExpectedErrorMessage(e)) { + writeValueToServer(key, 'navigator.credentials.get failed'); + } else { + writeValueToServer( + key, 'navigator.credentials.get failed by unexpected reason'); + } + }, + ); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fedcm-get-credential-inner.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/fedcm-get-credential-inner.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fedcm-get-credential-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fence-api-inner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/fence-api-inner.https.html new file mode 100644 index 00000000000..814ea785590 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fence-api-inner.https.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to test window.fence object</title> + +<body> +<script> + + // Get the token for communication with the parent. + const [fence_api_token] = parseKeylist(); + + // Check that window.fence is visible inside fenced frames. + assert_true(window.fence != null, + "window.fence should be visible inside fenced frames"); + assert_true(fence != null, + "fence should be visible inside fenced frames"); + + // Tell the parent that the test succeeded. + writeValueToServer(fence_api_token, ""); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fence-api-inner.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/fence-api-inner.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fence-api-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-loaded.html b/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-loaded.html new file mode 100644 index 00000000000..00547627839 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-loaded.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<script src="utils.js"></script> +<title>Fenced frame loaded</title> +<body> +<script> +(async function() { + const [parent_key] = parseKeylist(); + writeValueToServer(parent_key, "fenced frame loaded"); +})(); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-loaded.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-loaded.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-loaded.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html b/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html new file mode 100644 index 00000000000..9b67be775e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Nested fenced frame named navigation helper</title> +<!-- This is a helper file. It is meant to be the document loaded inside a + nested fenced frame by `navigate-by-name-inner.html`. Once this document is + loaded and changes its `window.name` to `target_frame`, it reports to the + server so that the outermost document can attempt to navigate it by name. + (The navigation should not succeed - see the test expectations). +--> +<body> +<script> + const [ready_for_navigation_key] = parseKeylist(); + window.name = "target_frame"; + writeValueToServer(ready_for_navigation_key, "READY"); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fenced-frame-set-name-and-report-ready-for-outermost-document-to-navigate.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic-with-size.js b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic-with-size.js new file mode 100644 index 00000000000..1a22bcec3d6 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic-with-size.js @@ -0,0 +1,37 @@ +// These functions are used by FLEDGE to determine the logic for the ad buyer. +// For our testing purposes, we only need the minimal amount of boilerplate +// code in place to allow them to be invoked properly and move the FLEDGE +// process along. The tests do not deal with reporting results, so we leave +// `reportWin` empty. See `generateURNFromFledge` in "utils.js" to see how +// these files are used. + +function generateBid(interestGroup, auctionSignals, perBuyerSignals, + trustedBiddingSignals, browserSignals) { + const ad = interestGroup.ads[0]; + + // `auctionSignals` controls whether or not component auctions are allowed. + let allowComponentAuction = + typeof auctionSignals === 'string' && + auctionSignals.includes('bidderAllowsComponentAuction'); + + let result = { + 'ad': ad, + 'bid': 1, + 'render': { url: ad.renderUrl, width: "100px", height: "50px" }, + 'allowComponentAuction': allowComponentAuction + }; + if (interestGroup.adComponents && interestGroup.adComponents.length > 0) + result.adComponents = interestGroup.adComponents.map((component) => { + return { + url: component.renderUrl, + width: "100px", + height: "50px" + }; + }); + return result; +} + +function reportWin( + auctionSignals, perBuyerSignals, sellerSignals, browserSignals) { + return; +} diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic-with-size.js.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic-with-size.js.headers new file mode 100644 index 00000000000..776bf2987b4 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic-with-size.js.headers @@ -0,0 +1,2 @@ +Content-Type: Application/Javascript +X-Allow-FLEDGE: true
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic.js b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic.js new file mode 100644 index 00000000000..c19cc1d0337 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic.js @@ -0,0 +1,29 @@ +// These functions are used by FLEDGE to determine the logic for the ad buyer. +// For our testing purposes, we only need the minimal amount of boilerplate +// code in place to allow them to be invoked properly and move the FLEDGE +// process along. The tests do not deal with reporting results, so we leave +// `reportWin` empty. See `generateURNFromFledge` in "utils.js" to see how +// these files are used. + +function generateBid(interestGroup, auctionSignals, perBuyerSignals, + trustedBiddingSignals, browserSignals) { + const ad = interestGroup.ads[0]; + + // `auctionSignals` controls whether or not component auctions are allowed. + let allowComponentAuction = + typeof auctionSignals === 'string' && + auctionSignals.includes('bidderAllowsComponentAuction'); + + let result = {'ad': ad, 'bid': 1, 'render': ad.renderUrl, + 'allowComponentAuction': allowComponentAuction}; + if (interestGroup.adComponents && interestGroup.adComponents.length > 0) + result.adComponents = interestGroup.adComponents.map((component) => { + return component.renderUrl; + }); + return result; +} + +function reportWin( + auctionSignals, perBuyerSignals, sellerSignals, browserSignals) { + return; +} diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic.js.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic.js.headers new file mode 100644 index 00000000000..776bf2987b4 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-bidding-logic.js.headers @@ -0,0 +1,2 @@ +Content-Type: Application/Javascript +X-Allow-FLEDGE: true
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-decision-logic.js b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-decision-logic.js new file mode 100644 index 00000000000..dc92f5a5e1a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-decision-logic.js @@ -0,0 +1,15 @@ +// These functions are used by FLEDGE to determine the logic for the ad seller. +// For our testing purposes, we only need the minimal amount of boilerplate +// code in place to allow them to be invoked properly and move the FLEDGE +// process along. The tests do not deal with reporting results, so we leave +// `reportResult` empty. See `generateURNFromFledge` in "utils.js" to see how +// these files are used. + +function scoreAd( + adMetadata, bid, auctionConfig, trustedScoringSignals, browserSignals) { + return 2*bid; +} + +function reportResult(auctionConfig, browserSignals) { + return; +} diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-decision-logic.js.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-decision-logic.js.headers new file mode 100644 index 00000000000..776bf2987b4 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/fledge-decision-logic.js.headers @@ -0,0 +1,2 @@ +Content-Type: Application/Javascript +X-Allow-FLEDGE: true
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html new file mode 100644 index 00000000000..4fe496f29c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<title>child frame with delayed onload event</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="utils.js"></script> + +<body> +</body> +<script> + (function () { + const [element_type, toplevel_loaded_key, result_key] = parseKeylist(); + + // Delays the onload event of the iframe for 2 sec. + if (element_type == "iframe") { + const img = document.createElement("img"); + img.src = "/common/square.png?pipe=trickle(d2)"; + document.body.appendChild(img); + return; + } + + const iframe = document.createElement('iframe'); + iframe.src = generateURL("ignore-child-fenced-frame-onload-event-inner." + + "html", ["iframe"]); + document.body.append(iframe); + + let iframe_loaded = false; + let result = "passed"; + window.onload = async function () { + const toplevel_loaded = await readValueFromServer(toplevel_loaded_key); + if (!toplevel_loaded.status || !iframe_loaded) + result = "failed"; + writeValueToServer(result_key, result); + } + + iframe.onload = function () { + iframe_loaded = true; + } + })(); +</script> + +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/ignore-child-fenced-frame-onload-event-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/key-value-store.py b/tests/wpt/web-platform-tests/fenced-frame/resources/key-value-store.py new file mode 100644 index 00000000000..c9fd81b2a3d --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/key-value-store.py @@ -0,0 +1,46 @@ +"""Key-Value store server. + +The request takes "key=" and "value=" URL parameters. The key must be UUID +generated by token(). + +- When only the "key=" is specified, serves a 200 response whose body contains + the stored value specified by the key. If the stored value doesn't exist, + serves a 200 response with an empty body. +- When both the "key=" and "value=" are specified, stores the pair and serves + a 200 response without body. +""" + + +def main(request, response): + key = request.GET.get(b"key") + value = request.GET.get(b"value") + + # Store the value. + # We have two ways to check the truthiness of `value`: + # 1. `if value` + # 2. `if value != None` + # While (1) is the most intuitive, we actually need (2), which is a looser + # check. We need the looser check so that if the URL contains `&value=` to + # set the value equal to the empty string (a case we need to support), this + # condition still evaluates to true and we enter this branch. + if value != None: + # We opted for (2) above which is the looser of the truthiness tests + # that lets empty strings into this branch. So you might think that when + # the URL contains `&value=`, then the `value` variable here would be + # equal `""`, but instead it equals the empty byte string. If you just + # store that empty byte string into the stash and retrieve it later, you + # actually get <Not set> because it doesn't recognize the empty byte + # string as a real value, so we instead have to override it to the empty + # normal string, and then we can store it for later use. This is + # because we have to support storage and retrieval of empty strings. + if type(value) is bytes and value == b'': + value = "" + + request.server.stash.put(key, value) + return (200, [], b"") + + # Get the value. + data = request.server.stash.take(key) + if not data and data != "": + return (200, [], b"<Not set>") + return (200, [], data) diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-destination.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-destination.https.html new file mode 100644 index 00000000000..f12849c8ec6 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-destination.https.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Nested fenced frame named navigation helper</title> +<!-- See `navigate-ancestor-from-nested-{fencedframe,iframe}.https.html` for + more documentation --> +<script> + // This is a helper file. It is the document that + // `navigate-ancestor-from-nested{fencedframe,iframe}-helper.https.html` + // explicitly navigates the "correct" ancestor frame to, for any test run by + // `navigate-ancestor-test-runner.https.html`. The test itself is responsible + // for verifying that this document loaded in the correct frame. We just + // simply report that we successfully wound up in this document, to indicate + // that we're finished. + const [navigate_ancestor_key] = parseKeylist(); + writeValueToServer(navigate_ancestor_key, + "navigate-ancestor-destination.https.html"); +</script> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-destination.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-destination.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-destination.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html new file mode 100644 index 00000000000..74800b969f7 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<title>Navigate ancestor helper</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="utils.js"></script> + +<body> +<script> +(async () => { + // This document is loaded into a fenced frame by + // `navigate-ancestor-test-runner.https.html`. It creates a nested fenced + // frame and navigates it to `navigate-ancestor-helper.https.html`. + + // - navigate_ancestor_key: + // Sent by `navigate-ancestor-destination.https.html`. We listen to it, and + // report back to our embedder that it loaded correctly and did not navigate + // *this* frame. + // - navigate_ancestor_from_nested_key: + // Sent by us to our embedder to indicate (depending on the message) either: + // - PASS: The nested fenced frame was navigated correctly when it tried to + // navigate its ancestor (parent or top) frame + // - FAIL: When the nested fenced frame tried to navigate its ancestor + // frame, it actually navigated *this frame*, which is wrong + const [navigate_ancestor_key, navigate_ancestor_from_nested_key, + ancestor_type] = parseKeylist(); + + window.onbeforeunload = e => { + writeValueToServer(navigate_ancestor_from_nested_key, + `FAIL nested fenced frame ${ancestor_type}`); + } + + attachFencedFrame(generateURL(`navigate-ancestor-helper.https.html`, + [navigate_ancestor_key, ancestor_type])); + await nextValueFromServer(navigate_ancestor_key); + window.onbeforeunload = null; + writeValueToServer(navigate_ancestor_from_nested_key, "PASS"); +})(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-fenced-frame.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html new file mode 100644 index 00000000000..63a0cca8b4f --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<title>Navigate ancestor helper from nested fenced frame</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="utils.js"></script> + +<body> +<script> +(async () => { + // This document is loaded into a fenced frame by + // `navigate-ancestor-test-runner.https.html`. It creates a nested iframe and + // navigates it to `navigate-ancestor-helper.https.html`. + + // navigate_ancestor_from_nested_key sent by us to our embedder to + // indicate that an message was sent from the nested iframe when it failed to + // navigate the ancestor (this) frame. + const [navigate_ancestor_key, navigate_ancestor_from_nested_key, + ancestor_type] = parseKeylist(); + + // An message should be sent from the iframe. + window.addEventListener('message', (e) => { + window.onbeforeunload = null; + writeValueToServer( + navigate_ancestor_from_nested_key, + `PASS: [${ancestor_type}] ${e.data}`); + }); + + // When the iframe tries to navigate its ancestor frame, it should not + // navigate *this* frame, because the sandboxed navigation browsing context + // flag [1] must be set in fenced frame trees. + // [1] https://html.spec.whatwg.org/multipage/origin.html#sandboxed-navigation-browsing-context-flag + const iframe = document.createElement('iframe'); + iframe.src = generateURL(`navigate-ancestor-helper.https.html`, + [navigate_ancestor_key, ancestor_type]); + document.body.append(iframe); +})(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-from-nested-iframe.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-helper.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-helper.https.html new file mode 100644 index 00000000000..2cd8fcf7861 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-helper.https.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<title>Navigate ancestor helper</title> + +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="utils.js"></script> +<body> +<script> +(async () => { + // This document is loaded into either a top-level fenced frame, a nested + // fenced frame, or an iframe in a top-level fenced frame. In any case, this + // document is always the inner-most document in any test. It navigates an + // ancestor frame by clicking the anchor above via script. When this document + // is loaded in a fenced frame, the frame that should actually navigate is + // this one, since fenced frames are top-level browsing contexts. + // When this document is loaded into a top-level fenced frame or a nested + // fenced frame, we test that the right frame is navigated in + // `navigate-ancestor-test-runner.https.html`. When this document is loaded + // into an iframe in a top-level fenced frame, we test that the navigation is + // blocked due to the sandbox behavior of fenced frame trees. + const [navigate_ancestor_key, ancestor_type] = parseKeylist(); + const url = generateURL(`navigate-ancestor-destination.https.html`, + [navigate_ancestor_key]); + await simulateGesture(); + try { + window[ancestor_type].location = url; + } catch (e) { + window[ancestor_type].postMessage('location change failed.'); + } +})(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-helper.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-helper.https.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-helper.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-helper.js b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-helper.js new file mode 100644 index 00000000000..6178ea78da4 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-helper.js @@ -0,0 +1,28 @@ + +async function runNavigateAncestorTest(test_type, ancestor_type) { + // See documentation in `resources/navigate-ancestor-test-runner.https.html`. + // For each test type here, this document opens a new auxiliary window that + // runs the actual test. The tests in some way or another, direct a frame + // *inside* a fenced frame to navigate an ancestor frame via an + // <a target="_parent|_top"></a>. We need to run the real test in a new window + // so that if that window ends up navigating unexpectedly (because the fenced + // frame can accidentally navigated its embedder, for example) we can detect + // it from ths page, which never navigates away. + const navigate_ancestor_key = token(); + const navigate_ancestor_from_nested_key = token(); + + const win = window.open(generateURL( + "resources/navigate-ancestor-test-runner.https.html", + [navigate_ancestor_key, navigate_ancestor_from_nested_key])); + await new Promise(resolve => { + win.onload = resolve; + }); + + const unloadPromise = new Promise(resolve => { + win.onunload = resolve; + }); + + await win.runTest(test_type, ancestor_type); + win.close(); + await unloadPromise; +} diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-test-runner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-test-runner.https.html new file mode 100644 index 00000000000..d0f2e8d694a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-ancestor-test-runner.https.html @@ -0,0 +1,76 @@ +<!DOCTYPE html> +<title>Test navigating an ancestor frame from within a fenced frame</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="utils.js"></script> + +<body> +<script> +// This function is called by `window.opener`, which is a same-origin window. +window.runTest = function(test_type, ancestor_type) { + // Messages by this key are sent from + // `navigate-ancestor-destination.https.html` to let us know if the "_parent" + // navigations performed inside fenced frames landed on the right page. + // If somehow *this document* gets navigated unexpectedly, the test will fail + // given `beforeunloadPromise` below. + // For "nested" tests, this document hosts a top-level fenced frame navigated + // to `navigate-ancestor-from-nested-{fenced-frame,iframe}.https.html`, + // which itself hosts a nested fenced frame or iframe. The top-level fenced + // frame will wait for the right confirmation that the nested document has + // operated correctly, and report back to *us* that everything is OK via this + // key below. + const [navigate_ancestor_key, navigate_ancestor_from_nested_key] = + parseKeylist(); + + const beforeunloadPromise = new Promise((resolve, reject) => { + window.onbeforeunload = e => { + reject(`The top-level test runner document does not navigate when a ` + + `${test_type} navigates ${ancestor_type}`); + } + }); + + let test_promise = null; + switch (test_type) { + case 'top-level fenced frame': + // This fenced frame will attempt to navigate its parent to + // `navigate-ancestor-destination.https.html`. It should end up navigating + // *itself* since it is a top-level browsing context. Just in case it + // accidentally navigates *this* frame, we have an `onbeforeunload` + // handler that will automatically fail the test before. + attachFencedFrame(generateURL( + `navigate-ancestor-helper.https.html`, + [navigate_ancestor_key, ancestor_type])); + test_promise = nextValueFromServer(navigate_ancestor_key); + break; + case 'nested fenced frame': + attachFencedFrame(generateURL( + `navigate-ancestor-from-nested-fenced-frame.https.html`, + [navigate_ancestor_key, navigate_ancestor_from_nested_key, + ancestor_type])); + test_promise = nextValueFromServer(navigate_ancestor_from_nested_key) + .then(message => { + if (message != "PASS") { + throw message; + } + }); + break; + case 'nested iframe': + attachFencedFrame(generateURL( + `navigate-ancestor-from-nested-iframe.https.html`, + [navigate_ancestor_key, navigate_ancestor_from_nested_key, + ancestor_type])); + test_promise = nextValueFromServer(navigate_ancestor_from_nested_key) + .then(message => { + if (message != `PASS: [${ancestor_type}] location change failed.`) { + throw message; + } + }); + + break; + } + + return Promise.race([test_promise, beforeunloadPromise]); +} +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-inner.html new file mode 100644 index 00000000000..c7d7d6f2782 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-inner.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="utils.js"></script> +<title>Fenced frame hosting named frames</title> + +<body> +<script> +async function init() { + // This file is meant to run in a <fencedframe>. It sets up multiple frames + // all with the name `target_frame` in the following arrangements: + // 1.) A top-level fenced frame + // 2.) An iframe within a fenced frame + // 3.) A nested fenced frame + // Navigations to all of the above should fail, and thus should open a new + // top-level popup window instead of navigating these frames. + + const [ready_for_navigation_key, test_type] = parseKeylist(); + + switch (test_type) { + case "top-level fenced frame": + // Set up the named frame and report to the outer document that we're ready + // for it to try and navigate the named frame. + window.name = "target_frame"; + writeValueToServer(ready_for_navigation_key, "READY"); + break; + case "nested iframe": + const iframe = document.createElement('iframe'); + iframe.name = "target_frame"; + document.body.append(iframe); + writeValueToServer(ready_for_navigation_key, "READY"); + break; + case "nested fenced frame": + // This fenced frame will report to the outermost document when it is ready. + const ff = + attachFencedFrame(generateURL( + "fenced-frame-set-name-and-report-ready-for-" + + "outermost-document-to-navigate.html", + [ready_for_navigation_key])); + break; + } +} + +init(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-reporting-helper.html b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-reporting-helper.html new file mode 100644 index 00000000000..d3bd955697a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-reporting-helper.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Navigate reporting helper</title> +<!-- This document is used as a helper by `../navigate-by-name.html`. That test + attempts to navigate various frames all named `target_frame`, to this + document. All of these navigations should fail, due to the frames being + unreachable to the initiator (because of the "fence" of the fenced frame). + As a result, this document should always load in a new top-level + "outermost" pop-up window. +--> + +<script> +const [navigation_success_key] = parseKeylist(); + +// We're currently using `window.opener` as a proxy for "did this load in a new +// outermost popup window?". Note that if we try and test navigations initiated +// from inside a fenced frame and they open up in a new outermost popup, there +// will be no opener by default (crbug.com/1250694) so using `window.opener` as +// a signal will be insufficient. In order to test anchor navigations to this +// document from within a fenced frame, we'll need a better signal for +// outermost-ness. We should consider adding a value to `document.loadingMode` +// for fenced frames: +// https://wicg.github.io/nav-speculation/prerendering.htmlprerendering.html#browsing-context-loading-mode. +// +// Alternatively if we really want to detect if this loaded inside a fenced +// frame, we could just remove the opt-in headers and then implementations that +// support fenced frame opt-ins would timeout if they somehow don't honor the +// fence on named frame navigations, but that's not a very good outcome. +if (window.opener) { + writeValueToServer(navigation_success_key, "PASS"); +} else { + writeValueToServer(navigation_success_key, "FAIL"); +} +</script> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-reporting-helper.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-reporting-helper.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigate-by-name-reporting-helper.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html new file mode 100644 index 00000000000..59170c75120 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Fenced frame content to report the value of navigator.keyboard.getLayoutMap</title> + +<body> +<script> +async function init() { // Needed in order to use top-level await. + // This file is meant to be navigated to from a <fencedframe> element. It + // reports back to the page hosting the <fencedframe> whether or not + // `keyboard.getLayoutMap` is allowed. + const keyboard_layout_key = parseKeylist(); + // Report whether or not `navigator.keyboard.getLayoutMap()` is allowed. + navigator.keyboard.getLayoutMap().then( + () => { writeValueToServer(keyboard_layout_key, "resolved"); }, + () => { writeValueToServer(keyboard_layout_key, "rejected");}, + ); +} + +init(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-layout-map-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-lock-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-lock-inner.html new file mode 100644 index 00000000000..105166c7adc --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-lock-inner.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Fenced frame content to report the value of navigator.keyboard.lock</title> + +<body> +<script> +async function init() { // Needed in order to use top-level await. + // This file is meant to be navigated to from a <fencedframe> element. It + // reports back to the page hosting the <fencedframe> whether or not + // `keyboard.lock` is allowed. + const [keyboard_lock_key] = parseKeylist(); + // Report whether or not `navigator.keyboard.lock()` is allowed. + navigator.keyboard.lock().then( + () => { writeValueToServer(keyboard_lock_key, "resolved"); }, + () => { writeValueToServer(keyboard_lock_key, "rejected");}, + ); +} + +init(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-lock-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-lock-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/navigator-keyboard-lock-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/notification-sw.js b/tests/wpt/web-platform-tests/fenced-frame/resources/notification-sw.js new file mode 100644 index 00000000000..e9b1e2b9ddf --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/notification-sw.js @@ -0,0 +1,20 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async event => { + const method = event.data; + + if (method === 'constructor') { + try { + new Notification('test'); + } catch (e) { + event.source.postMessage(e.message); + } + } else if (method === 'showNotification') { + try { + await self.registration.showNotification('test', {body: 'test'}); + } catch (e) { + event.source.postMessage(e.message); + } + } +}); diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/opaque-ad-sizes-utils.js b/tests/wpt/web-platform-tests/fenced-frame/resources/opaque-ad-sizes-utils.js new file mode 100644 index 00000000000..edf8640f20a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/opaque-ad-sizes-utils.js @@ -0,0 +1,47 @@ +async function runOpaqueAdSizesTest(input_width, input_height, output_width, output_height) { + // Attach a FLEDGE fenced frame whose outer container has dimensions + // `input_width` by `input_height`. + const frame = await attachFencedFrameContext({ + generator_api: "fledge", resolve_to_config: true, attributes: [ + ["width", input_width], ["height", input_height]]}); + + const assert_dimensions = + (label, input_width, input_height, output_width, output_height) => { + assert_equals(getComputedStyle(document.documentElement).width, + output_width+"px", + label + " the computed width coerces to " + output_width); + assert_equals(window.innerWidth, output_width, + label + " the innerWidth " + input_width + " coerces to " + output_width); + assert_equals(window.innerHeight, output_height, + label + " the innerHeight " + input_height + " coerces to " + output_height); + } + + // Assert that the fenced frame sees its dimensions rounded to the nearest + // ad size. + await frame.execute(assert_dimensions, + ["After navigation", input_width, input_height, output_width, output_height]); + + // Assert that the embedder sees the fenced frame's original dimensions. + assert_equals(frame.width, input_width.toString(), + "The outer container width is the requested width."); + assert_equals(frame.height, input_height.toString(), + "The outer container height is the requested height."); + + // Resize the fenced frame's outer container. + const new_size_x = 320; + const new_size_y = 50; + frame.width = new_size_x; + frame.height = new_size_y; + + // Refresh the fenced frame. + await frame.execute(() => { + window.executor.suspend(() => { + location.href = location.href; + }); + }); + + // Observe that navigations after the first don't change the fenced frame's + // inner dimensions. + await frame.execute(assert_dimensions, + ["After resizing", input_width, input_height, output_width, output_height]); +} diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/payment-handler-sw.js b/tests/wpt/web-platform-tests/fenced-frame/resources/payment-handler-sw.js new file mode 100644 index 00000000000..8b5e83cddf0 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/payment-handler-sw.js @@ -0,0 +1,10 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', event => { + try { + self.registration.paymentManager; + } catch (e) { + event.source.postMessage(e); + } +}); diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/presentation-receiver-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/presentation-receiver-inner.html new file mode 100644 index 00000000000..2e170dd91bb --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/presentation-receiver-inner.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Fenced frame content to report the result of navigator.presentation.receiver</title> + +<body> +<script> +(async () => { + const [presentation_receiver_key] = parseKeylist(); + const result = await navigator.presentation.receiver; + if (result == null) { + writeValueToServer(presentation_receiver_key, "denied"); + } else { + writeValueToServer(presentation_receiver_key, "allowed"); + } +})(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/presentation-receiver-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/presentation-receiver-inner.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/presentation-receiver-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/remote-context-executor.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/remote-context-executor.https.html new file mode 100644 index 00000000000..6b2f5ccc000 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/remote-context-executor.https.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="/common/utils.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<title>Script to wait for instructions from RemoteContext.</title> + +<body> +<script> +window.addEventListener("load", async () => { + // Find the uuid to communicate with the parent. + const uuid = new URLSearchParams(window.location.search).get('uuid'); + + // Wait for the window to have its size computed and become visible, + // so that simulated user gestures will be handled properly. + while (window.innerWidth == 0) { + await new Promise(resolve => requestAnimationFrame(resolve)); + } + + // Create a RemoteContext Executor, which will wait in the background + // for scripts to execute. + window.executor = new Executor(uuid); +}); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/report-url.html b/tests/wpt/web-platform-tests/fenced-frame/resources/report-url.html new file mode 100644 index 00000000000..e0b7d0982ae --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/report-url.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>A page embedded as a fenced frame that reports the document URL</title> +<script> +const [uuid] = parseKeylist(); +writeValueToServer(uuid, location.href); +</script> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/report-url.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/report-url.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/report-url.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/response-204.py b/tests/wpt/web-platform-tests/fenced-frame/resources/response-204.py new file mode 100644 index 00000000000..e6cf8d4ac91 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/response-204.py @@ -0,0 +1,4 @@ +def main(request, response): + response_headers = [] + body = "No content" + return (204, response_headers, body)
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-iframe.sub.html b/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-iframe.sub.html new file mode 100644 index 00000000000..7ee8b7d98f7 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-iframe.sub.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<title>Iframe content to load a fenced frame and report a value to the server</title> +<script src="utils.js"></script> + +<body> +<script> + const fencedframe = document.createElement("fencedframe"); + fencedframe.config = new FencedFrameConfig( + generateURL("sandbox-mandatory-flags-inner.sub.html?key={{GET[key]}}" + + "&value={{GET[value]}}", [])); + document.body.appendChild(fencedframe); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html b/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html new file mode 100644 index 00000000000..5f400b5bde9 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<title>Fenced frame content to report a value to the server</title> + +<body> +<img src="key-value-store.py?key={{GET[key]}}&value={{GET[value]}}"> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-inner.sub.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-looser-restriction.sub.html b/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-looser-restriction.sub.html new file mode 100644 index 00000000000..0ad64c1a5cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/sandbox-mandatory-flags-looser-restriction.sub.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Iframe content to load a nested sandboxed iframe with all mandatory allow-* flags</title> + +<body> +<iframe + src="sandbox-mandatory-flags-iframe.sub.html?key={{GET[key]}}&value={{GET[value]}}" + sandbox="allow-same-origin + allow-forms + allow-scripts + allow-popups + allow-popups-to-escape-sandbox + allow-top-navigation-by-user-activation"> +</iframe> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-inner.sub.html b/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-inner.sub.html new file mode 100644 index 00000000000..f3bcbc8ba18 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-inner.sub.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="utils.js"></script> +<script src="sandboxed-features.js"></script> +<body> +<script> +(async () => { + try { + await {{GET[test_func]}}(); + } catch (e) { + writeValueToServer('{{GET[key]}}', e.message); + return; + } + writeValueToServer('{{GET[key]}}', 'done'); +})() +</script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-inner.sub.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-inner.sub.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-inner.sub.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html b/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html new file mode 100644 index 00000000000..44584440e15 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<body> +<iframe + src="sandboxed-features-inner.sub.html?key={{GET[key]}}&test_func={{GET[test_func]}}" + sandbox="allow-forms + allow-modals + allow-orientation-lock + allow-pointer-lock + allow-popups + allow-popups-to-escape-sandbox + allow-presentation + allow-same-origin + allow-scripts + allow-top-navigation + allow-top-navigation-by-user-activation + allow-downloads"> +</iframe> + +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features-looser-restriction.sub.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features.js b/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features.js new file mode 100644 index 00000000000..1cbd4a48f30 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/sandboxed-features.js @@ -0,0 +1,126 @@ +const run_in_fenced_frame = (func_name, description, is_nested) => { + promise_test(async test => { + const key = token(); + const url = is_nested ? + 'resources/sandboxed-features-looser-restriction.sub.html?' : + 'resources/sandboxed-features-inner.sub.html?'; + let params = new URLSearchParams(); + params.set('key', key); + params.set('test_func', func_name); + const frame = document.createElement('fencedframe'); + const frame_url = 'resources/sandboxed-features-inner.sub.html?' + + params.toString(); + const config = new FencedFrameConfig(generateURL(frame_url, [])); + frame.config = config; + test.add_cleanup(() => { + frame.remove(); + }); + document.body.appendChild(frame); + assert_equals(await nextValueFromServer(key), 'done'); + }, description); +}; + +const run_sanboxed_feature_test = (func_name, description) => { + run_in_fenced_frame(func_name, description, false); + run_in_fenced_frame(func_name, description + '[looser sandboxed]', true); +}; + +async function test_prompt() { + assert_equals( + window.prompt('Test prompt'), + null, + 'window.prompt() must synchronously return null in a fenced frame without' + + ' blocking on user input.'); +} + +async function test_alert() { + assert_equals( + window.alert('Test alert'), + undefined, + 'window.alert() must synchronously return undefined in a fenced frame' + + ' without blocking on user input.'); +} + +async function test_confirm() { + assert_equals( + window.confirm('Test confirm'), + false, + 'window.confirm() must synchronously return false in a fenced frame' + + ' without blocking on user input.'); +} + +async function test_print() { + assert_equals( + window.print(), + undefined, + 'window.print() must synchronously return undefined in a fenced frame' + + ' without blocking on user input.'); + + assert_equals( + document.execCommand('print', false, null), + false, + 'execCommand(\'print\') must synchronously return false in a fenced frame' + + ' without blocking on user input.'); +} + +async function test_document_domain() { + assert_throws_dom('SecurityError', () => { + document.domain = 'example.test'; + }); + assert_throws_dom('SecurityError', () => { + document.domain = document.domain; + }); + assert_throws_dom('SecurityError', () => { + (new Document).domain = document.domain; + }); + assert_throws_dom('SecurityError', () => { + document.implementation.createHTMLDocument().domain = document.domain; + }); + assert_throws_dom('SecurityError', () => { + document.implementation.createDocument(null, '').domain = document.domain; + }); + assert_throws_dom('SecurityError', () => { + document.createElement('template').content.ownerDocument.domain = + document.domain; + }); +} + +async function test_presentation_request() { + assert_throws_dom('SecurityError', () => { + new PresentationRequest([location.href]); + }); +} + +async function test_screen_orientation_lock() { + try { + await screen.orientation.lock('portrait'); + } catch (e) { + assert_equals( + e.name, + 'SecurityError', + 'orientation.lock() must throw a SecurityError in a fenced frame.'); + return; + } + assert_unreached('orientation.lock() must throw an error'); +} + +async function test_pointer_lock() { + await simulateGesture(); + + const canvas = document.createElement('canvas'); + document.body.appendChild(canvas); + const pointerlockerror_promise = new Promise(resolve => { + document.addEventListener('pointerlockerror', resolve); + }); + try { + await canvas.requestPointerLock(); + } catch (e) { + assert_equals( + e.name, + 'SecurityError', + 'orientation.lock() must throws a SecurityError in a fenced frame.'); + await pointerlockerror_promise; + return; + } + assert_unreached('requestPointerLock() must fail in a fenced frame'); +} diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html new file mode 100644 index 00000000000..02f28bd82ea --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<script src="utils.js"></script> + +<body> + <script type="module"> + // Ask the worker to do a fetch request that will be handled by the service + // worker via postMessage. + const checkIfServiceWorkerCanControlWebWorker = async () => { + const dedicated_worker = new Worker('serviceWorker-dedicated-worker.js'); + return new Promise((resolve, reject) => { + dedicated_worker.addEventListener('message', e => { + resolve(e.data) + }); + dedicated_worker.postMessage('fetch'); + }) + } + + const [key] = parseKeylist(); + const url = new URL(location.href); + if (url.searchParams.get('useServiceWorkerInFencedFrame')) { + await navigator.serviceWorker.register('serviceWorker-dedicated-worker-sw.js'); + await navigator.serviceWorker.ready; + } + + const result = await checkIfServiceWorkerCanControlWebWorker(); + writeValueToServer(key, result); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js new file mode 100644 index 00000000000..027995a218a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js @@ -0,0 +1,18 @@ +self.addEventListener('fetch', async (e) => { + if (e.request.url.includes('fenced_frame_dedicated_worker_test')) { + e.respondWith(new Response('OK')); + return; + } + + e.respondWith(fetch(e.request).catch(() => { + return new Response('not found'); + })); +}) + +self.addEventListener('install', () => { + return self.skipWaiting(); +}); + +self.addEventListener('activate', () => { + return self.clients.claim(); +}); diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js.headers new file mode 100644 index 00000000000..d0b9633bb06 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker-sw.js.headers @@ -0,0 +1 @@ +Service-Worker-Allowed: / diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker.js b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker.js new file mode 100644 index 00000000000..8a9fa5ef361 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-dedicated-worker.js @@ -0,0 +1,8 @@ +self.addEventListener('message', async (e) => { + if (e.data === 'fetch') { + // Send a request to non-existing URL but handled by SW. + const res = await fetch('./fenced_frame_dedicated_worker_test'); + const data = res.ok ? await res.text() : res.statusText; + self.postMessage(data); + } +}); diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-inner.html new file mode 100644 index 00000000000..103236e52ae --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-inner.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<body> +<script> + +function getFrameType(service_worker, url) { + return new Promise((resolve, reject) => { + const channel = new MessageChannel(); + channel.port1.onmessage = e => { + resolve(e.data); + }; + service_worker.postMessage({port:channel.port2, url:url}, + [channel.port2]); + }); +} + +(async function() { + await navigator.serviceWorker.register('serviceWorker-frameType.js'); + const registration = await navigator.serviceWorker.ready; + const service_worker = registration.active; + + const [frame_type_key, frame_type_ack_key] = parseKeylist(); + + const frame_type = await getFrameType(service_worker, location.href); + writeValueToServer(frame_type_key, frame_type); + + // Wait for ACK, so we know that the outer page has read the last value from + // the `serviceWorker.frameType` stash and we can write to it again. + await nextValueFromServer(frame_type_ack_key); + + const iframe = document.createElement('iframe'); + iframe.src = generateURL("serviceWorker-frameType-nested.html", + [frame_type_key]); + document.body.append(iframe); +})(); +</script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-nested.html b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-nested.html new file mode 100644 index 00000000000..10bb7ff8bdf --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-nested.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<body> +<script> + +function getFrameType(service_worker, url) { + return new Promise((resolve, reject) => { + const channel = new MessageChannel(); + channel.port1.onmessage = e => { + resolve(e.data); + }; + service_worker.postMessage({port:channel.port2, url:url}, + [channel.port2]); + }); +} + +(async function() { + const service_worker = navigator.serviceWorker.controller; + const frame_type = await getFrameType(service_worker, location.href); + + const [frame_type_key] = parseKeylist(); + writeValueToServer(frame_type_key, frame_type); +})(); +</script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-nested.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-nested.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType-nested.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType.js b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType.js new file mode 100644 index 00000000000..91003fc1315 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-frameType.js @@ -0,0 +1,19 @@ +self.onmessage = function(e) { + var port = e.data.port; + var url = e.data.url; + + e.waitUntil(self.clients.matchAll({includeUncontrolled: true}) + .then(function(clients) { + var frame_type = "none"; + for (client of clients) { + if (client.url === url) { + frame_type = client.frameType; + break; + } + } + port.postMessage(frame_type); + }) + .catch(e => { + port.postMessage('clients.matchAll() rejected: ' + e); + })); +};
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html new file mode 100644 index 00000000000..4d77d9e9a64 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<body> +<script> + +(async function() { + const [navigate_key] = parseKeylist(); + writeValueToServer(navigate_key, 'success'); +})(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner-success.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner.html new file mode 100644 index 00000000000..aaf330f4f67 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<body> +<script> + +(async function() { + await navigator.serviceWorker.register('serviceWorker-navigate.js'); + const registration = await navigator.serviceWorker.ready; + const service_worker = registration.active; + + const [navigate_key] = parseKeylist(); + + service_worker.postMessage({key:navigate_key, url:location.href}); +})(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate.js b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate.js new file mode 100644 index 00000000000..a7a4db52ee6 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-navigate.js @@ -0,0 +1,18 @@ +self.importScripts('utils.js'); + +self.onmessage = function(e) { + var key = e.data.key; + var url = e.data.url; + + e.waitUntil(self.clients.claim().then(() => { + return self.clients.matchAll({type: 'window'}); + }).then(clients => { + return clients.map(client => { + // Check to make sure WindowClient.navigate() is supported. + if (client.url === url) { + return client.navigate(generateURL('serviceWorker-navigate-inner-success.html', + [key])); + } + }); + })); +}; diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-push-sw.js b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-push-sw.js new file mode 100644 index 00000000000..e344b45fd8c --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/serviceWorker-push-sw.js @@ -0,0 +1,19 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', async e => { + const method = e.data; + + const promise = method === 'subscribe' ? + self.registration.pushManager.subscribe({userVisibleOnly: true}) : + Promise.resolve(); + const message = await promise + .then(() => { + return `${method}: Unexpectedly started`; + }) + .catch((e) => { + return e.message; + }); + + e.source.postMessage(message); +}); diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/unique-cookie-partition-inner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/unique-cookie-partition-inner.https.html new file mode 100644 index 00000000000..1cf3fc86808 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/unique-cookie-partition-inner.https.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="utils.js"></script> +<title>Fenced frame accessing cookies</title> + +<body> +<script> +async function init() { + // This file is meant to run in a <fencedframe>. It sets up multiple frames + // in the following arrangements: + // 1.) A top-level fenced frame + // 2.) An iframe within a fenced frame + // 3.) A nested fenced frame + + // Set cookies in the root fenced frame via document and cookieStore APIs. + const [cookie_value_key, test_type] = parseKeylist(); + document.cookie = 'C=fenced; SameSite=Lax'; + document.cookie = 'D=fenced; SameSite=None; Secure'; + await cookieStore.set('E', 'fenced'); + + const cookie_access_url = generateURL("cookie-access.https.html", + [cookie_value_key]); + + switch (test_type) { + case "top-level fenced frame": + const cookie_value = document.cookie; + writeValueToServer(cookie_value_key, cookie_value); + break; + case "nested iframe": + const iframe = document.createElement('iframe'); + document.body.append(iframe); + iframe.src = cookie_access_url; + break; + case "nested fenced frame": + const ff = attachFencedFrame(cookie_access_url); + break; + } +} + +init(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/unique-cookie-partition-inner.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/unique-cookie-partition-inner.https.html.headers new file mode 100644 index 00000000000..e2b453f4638 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/unique-cookie-partition-inner.https.html.headers @@ -0,0 +1,2 @@ +Supports-Loading-Mode: fenced-frame +Set-Cookie: F=fenced; SameSite=Lax diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/utils.js b/tests/wpt/web-platform-tests/fenced-frame/resources/utils.js new file mode 100644 index 00000000000..d35855cbcfc --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/utils.js @@ -0,0 +1,463 @@ +const STORE_URL = '/fenced-frame/resources/key-value-store.py'; +const REMOTE_EXECUTOR_URL = '/fenced-frame/resources/remote-context-executor.https.html'; +const FLEDGE_BIDDING_URL = '/fenced-frame/resources/fledge-bidding-logic.js'; +const FLEDGE_BIDDING_WITH_SIZE_URL = '/fenced-frame/resources/fledge-bidding-logic-with-size.js'; +const FLEDGE_DECISION_URL = '/fenced-frame/resources/fledge-decision-logic.js'; + +// Creates a URL that includes a list of stash key UUIDs that are being used +// in the test. This allows us to generate UUIDs on the fly and let anything +// (iframes, fenced frames, pop-ups, etc...) that wouldn't have access to the +// original UUID variable know what the UUIDs are. +// @param {string} href - The base url of the page being navigated to +// @param {string list} keylist - The list of key UUIDs to be used. Note that +// order matters when extracting the keys +function generateURL(href, keylist) { + const ret_url = new URL(href, location.href); + ret_url.searchParams.append("keylist", keylist.join(',')); + return ret_url; +} + +function getRemoteContextURL(origin) { + return new URL(REMOTE_EXECUTOR_URL, origin); +} + +async function runSelectRawURL(href, resolve_to_config = false) { + try { + await sharedStorage.worklet.addModule( + "/shared-storage/resources/simple-module.js"); + } catch (e) { + // Shared Storage needs to have a module added before we can operate on it. + // It is generated on the fly with this call, and since there's no way to + // tell through the API if a module already exists, wrap the addModule call + // in a try/catch so that if it runs a second time in a test, it will + // gracefully fail rather than bring the whole test down. + } + return await sharedStorage.selectURL( + 'test-url-selection-operation', [{url: href}], { + data: {'mockResult': 0}, + resolveToConfig: resolve_to_config, + keepAlive: true + }); +} + +// Similar to generateURL, but creates +// 1. An urn:uuid if `resolve_to_config` is false. +// 2. A fenced frame config object if `resolve_to_config` is true. +// This relies on a mock Shared Storage auction, since it is the simplest +// WP-exposed way to turn a url into an urn:uuid or a fenced frame config. +// Note: this function, unlike generateURL, is asynchronous and needs to be +// called with an await operator. +// @param {string} href - The base url of the page being navigated to +// @param {string list} keylist - The list of key UUIDs to be used. Note that +// order matters when extracting the keys +// @param {boolean} [resolve_to_config = false] - Determines whether the result +// of `sharedStorage.selectURL()` +// is an urn:uuid or a fenced +// frame config. +// Note: +// 1. There is a limit of 3 calls per origin per pageload for +// `sharedStorage.selectURL()`, so `runSelectURL()` must also respect this +// limit. +// 2. If `resolve_to_config` is true, blink feature `FencedFramesAPIChanges` +// needs to be enabled for `selectURL()` to return a fenced frame config. +// Otherwise `selectURL()` will fall back to the old behavior that returns an +// urn:uuid. +async function runSelectURL(href, keylist = [], resolve_to_config = false) { + const full_url = generateURL(href, keylist); + return await runSelectRawURL(full_url, resolve_to_config); +} + +async function generateURNFromFledgeRawURL(href, + nested_urls, + resolve_to_config = false, + ad_with_size = false) { + const bidding_token = token(); + const seller_token = token(); + + const ad_components_list = nested_urls.map((url) => { + return ad_with_size ? + { renderUrl: url, sizeGroup: "group1" } : + { renderUrl: url } + }); + + const interestGroup = ad_with_size ? + { + name: 'testAd1', + owner: location.origin, + biddingLogicUrl: new URL(FLEDGE_BIDDING_WITH_SIZE_URL, location.origin), + ads: [{ renderUrl: href, sizeGroup: "group1", bid: 1 }], + userBiddingSignals: { biddingToken: bidding_token }, + trustedBiddingSignalsKeys: ['key1'], + adComponents: ad_components_list, + adSizes: { "size1": { width: "100px", height: "50px" } }, + sizeGroups: { "group1": ["size1"] } + } : + { + name: 'testAd1', + owner: location.origin, + biddingLogicUrl: new URL(FLEDGE_BIDDING_URL, location.origin), + ads: [{ renderUrl: href, bid: 1 }], + userBiddingSignals: { biddingToken: bidding_token }, + trustedBiddingSignalsKeys: ['key1'], + adComponents: ad_components_list, + }; + + // Pick an arbitrarily high duration to guarantee that we never leave the + // ad interest group while the test runs. + navigator.joinAdInterestGroup(interestGroup, /*durationSeconds=*/3000000); + + const auctionConfig = { + seller: location.origin, + interestGroupBuyers: [location.origin], + decisionLogicUrl: new URL(FLEDGE_DECISION_URL, location.origin), + auctionSignals: {biddingToken: bidding_token, sellerToken: seller_token}, + resolveToConfig: resolve_to_config, + }; + return navigator.runAdAuction(auctionConfig); +} + +// Similar to runSelectURL, but uses FLEDGE instead of Shared Storage as the +// auctioning tool. +// Note: this function, unlike generateURL, is asynchronous and needs to be +// called with an await operator. @param {string} href - The base url of the +// page being navigated to @param {string list} keylist - The list of key UUIDs +// to be used. Note that order matters when extracting the keys +// @param {string} href - The base url of the page being navigated to +// @param {string list} keylist - The list of key UUIDs to be used. Note that +// order matters when extracting the keys +// @param {string list} nested_urls - A list of urls that will eventually become +// the nested configs/ad components +// @param {boolean} [resolve_to_config = false] - Determines whether the result +// of `navigator.runAdAuction()` +// is an urn:uuid or a fenced +// frame config. +// @param {boolean} [ad_with_size = false] - Determines whether the auction is +// run with ad sizes specified. +async function generateURNFromFledge(href, keylist, nested_urls=[], resolve_to_config = false, ad_with_size = false) { + const full_url = generateURL(href, keylist); + return generateURNFromFledgeRawURL(full_url, nested_urls, resolve_to_config, ad_with_size); +} + +// Extracts a list of UUIDs from the from the current page's URL. +// @returns {string list} - The list of UUIDs extracted from the page. This can +// be read into multiple variables using the +// [key1, key2, etc...] = parseKeyList(); pattern. +function parseKeylist() { + const url = new URL(location.href); + const keylist = url.searchParams.get("keylist"); + return keylist.split(','); +} + +// Converts a same-origin URL to a cross-origin URL +// @param {URL} url - The URL object whose origin is being converted +// @param {boolean} [https=true] - Whether or not to use the HTTPS origin +// +// @returns {URL} The new cross-origin URL +function getRemoteOriginURL(url, https=true) { + const same_origin = location.origin; + const cross_origin = https ? get_host_info().HTTPS_REMOTE_ORIGIN + : get_host_info().HTTP_REMOTE_ORIGIN; + return new URL(url.toString().replace(same_origin, cross_origin)); +} + +// Builds a URL to be used as a remote context executor. +function generateRemoteContextURL(headers, origin) { + // Generate the unique id for the parent/child channel. + const uuid = token(); + + // Use the absolute path of the remote context executor source file, so that + // nested contexts will work. + const url = getRemoteContextURL(origin ? origin : location.origin); + url.searchParams.append('uuid', uuid); + + // Add the header to allow loading in a fenced frame. + headers.push(["Supports-Loading-Mode", "fenced-frame"]); + + // Transform the headers into the expected format. + // https://web-platform-tests.org/writing-tests/server-pipes.html#headers + function escape(s) { + return s.replace('(', '\\(').replace(')', '\\)'); + } + const formatted_headers = headers.map((header) => { + return `header(${escape(header[0])}, ${escape(header[1])})`; + }); + url.searchParams.append('pipe', formatted_headers.join('|')); + + return [uuid, url]; +} + +function buildRemoteContextForObject(object, uuid, html) { + // https://github.com/web-platform-tests/wpt/blob/master/common/dispatcher/README.md + const context = new RemoteContext(uuid); + if (html) { + context.execute_script( + (html_source) => { + document.body.insertAdjacentHTML('beforebegin', html_source); + }, + [html]); + } + + // We need a little bit of boilerplate in the handlers because Proxy doesn't + // work so nicely with HTML elements. + const handler = { + get: (target, key) => { + if (key == "execute") { + return context.execute_script; + } + if (key == "element") { + return object; + } + if (key in target) { + return target[key]; + } + return context[key]; + }, + set: (target, key, value) => { + target[key] = value; + return value; + } + }; + + const proxy = new Proxy(object, handler); + return proxy; +} + +// Attaches an object that waits for scripts to execute from RemoteContext. +// (In practice, this is either a frame or a window.) +// Returns a proxy for the object that first resolves to the object itself, +// then resolves to the RemoteContext if the property isn't found. +// The proxy also has an extra attribute `execute`, which is an alias for the +// remote context's `execute_script(fn, args=[])`. +function attachContext(object_constructor, html, headers, origin) { + const [uuid, url] = generateRemoteContextURL(headers, origin); + const object = object_constructor(url); + return buildRemoteContextForObject(object, uuid, html); +} + +// TODO(crbug.com/1347953): Update this function to also test +// `sharedStorage.selectURL()` that returns a fenced frame config object. +// This should be done after fixing the following flaky tests that use this +// function. +// 1. crbug.com/1372536: resize-lock-input.https.html +// 2. crbug.com/1394559: unfenced-top.https.html +async function attachOpaqueContext(generator_api, resolve_to_config, ad_with_size, object_constructor, html, headers, origin) { + const [uuid, url] = generateRemoteContextURL(headers, origin); + const id = await (generator_api == 'fledge' ? generateURNFromFledge(url, [], [], resolve_to_config, ad_with_size) : runSelectURL(url, [], resolve_to_config)); + const object = object_constructor(id); + return buildRemoteContextForObject(object, uuid, html); +} + +function attachPotentiallyOpaqueContext(generator_api, resolve_to_config, ad_with_size, frame_constructor, html, headers, origin) { + generator_api = generator_api.toLowerCase(); + if (generator_api == 'fledge' || generator_api == 'sharedstorage') { + return attachOpaqueContext(generator_api, resolve_to_config, ad_with_size, frame_constructor, html, headers, origin); + } else { + return attachContext(frame_constructor, html, headers, origin); + } +} + +function attachFrameContext(element_name, generator_api, resolve_to_config, ad_with_size, html, headers, attributes, origin) { + frame_constructor = (id) => { + frame = document.createElement(element_name); + attributes.forEach(attribute => { + frame.setAttribute(attribute[0], attribute[1]); + }); + if (element_name == "iframe") { + frame.src = id; + } else if (id instanceof FencedFrameConfig) { + frame.config = id; + } else { + const config = new FencedFrameConfig(id); + frame.config = config; + } + document.body.append(frame); + return frame; + }; + return attachPotentiallyOpaqueContext(generator_api, resolve_to_config, ad_with_size, frame_constructor, html, headers, origin); +} + +function replaceFrameContext(frame_proxy, {generator_api="", resolve_to_config=false, html="", headers=[], origin=""}={}) { + frame_constructor = (id) => { + if (frame_proxy.element.nodeName == "IFRAME") { + frame_proxy.element.src = id; + } else if (id instanceof FencedFrameConfig) { + frame_proxy.element.config = id; + } else { + const config = new FencedFrameConfig(id); + frame_proxy.element.config = config; + } + return frame_proxy.element; + }; + return attachPotentiallyOpaqueContext(generator_api, resolve_to_config, ad_with_size=false, frame_constructor, html, headers, origin); +} + +// Attach a fenced frame that waits for scripts to execute. +// Takes as input a(n optional) dictionary of configs: +// - generator_api: the name of the API that should generate the urn/config. +// Supports (case-insensitive) "fledge" and "sharedstorage", or any other +// value as a default. +// If you generate a urn, then you need to await the result of this function. +// - resolve_to_config: whether a config should be used. (currently only works +// for FLEDGE and sharedStorage generator_api) +// - ad_with_size: whether an ad auction is run with size specified for the ads +// and ad components. (currently only works for FLEDGE) +// - html: extra HTML source code to inject into the loaded frame +// - headers: an array of header pairs [[key, value], ...] +// - attributes: an array of attribute pairs to set on the frame [[key, value], ...] +// - origin: origin of the url, default to location.origin if not set +// Returns a proxy that acts like the frame HTML element, but with an extra +// function `execute`. See `attachFrameContext` or the README for more details. +function attachFencedFrameContext({generator_api="", resolve_to_config=false, ad_with_size=false, html = "", headers=[], attributes=[], origin=""}={}) { + return attachFrameContext('fencedframe', generator_api, resolve_to_config, ad_with_size, html, headers, attributes, origin); +} + +// Attach an iframe that waits for scripts to execute. +// See `attachFencedFrameContext` for more details. +function attachIFrameContext({generator_api="", html="", headers=[], attributes=[], origin=""}={}) { + return attachFrameContext('iframe', generator_api, resolve_to_config=false, ad_with_size=false, html, headers, attributes, origin); +} + +// Open a window that waits for scripts to execute. +// Returns a proxy that acts like the window object, but with an extra +// function `execute`. See `attachContext` for more details. +function attachWindowContext({target="_blank", html="", headers=[], origin=""}={}) { + window_constructor = (url) => { + return window.open(url, target); + } + + return attachContext(window_constructor, html, headers, origin); +} + +// Converts a key string into a key uuid using a cryptographic hash function. +// This function only works in secure contexts (HTTPS). +async function stringToStashKey(string) { + // Compute a SHA-256 hash of the input string, and convert it to hex. + const data = new TextEncoder().encode(string); + const digest = await crypto.subtle.digest('SHA-256', data); + const digest_array = Array.from(new Uint8Array(digest)); + const digest_as_hex = digest_array.map(b => b.toString(16).padStart(2, '0')).join(''); + + // UUIDs are structured as 8X-4X-4X-4X-12X. + // Use the first 32 hex digits and ignore the rest. + const digest_slices = [digest_as_hex.slice(0,8), + digest_as_hex.slice(8,12), + digest_as_hex.slice(12,16), + digest_as_hex.slice(16,20), + digest_as_hex.slice(20,32)]; + return digest_slices.join('-'); +} + +// Create a fenced frame. Then navigate it using the given `target`, which can +// be either an urn:uuid or a fenced frame config object. +function attachFencedFrame(target) { + assert_implements( + window.HTMLFencedFrameElement, + 'The HTMLFencedFrameElement should be exposed on the window object'); + + const fenced_frame = document.createElement('fencedframe'); + + if (target instanceof FencedFrameConfig) { + fenced_frame.config = target; + } else { + const config = new FencedFrameConfig(target); + fenced_frame.config = config; + } + + document.body.append(fenced_frame); + return fenced_frame; +} + +function attachIFrame(url) { + const iframe = document.createElement('iframe'); + iframe.src = url; + document.body.append(iframe); + return iframe; +} + +// Reads the value specified by `key` from the key-value store on the server. +async function readValueFromServer(key) { + // Resolve the key if it is a Promise. + key = await key; + + const serverUrl = `${STORE_URL}?key=${key}`; + const response = await fetch(serverUrl); + if (!response.ok) + throw new Error('An error happened in the server'); + const value = await response.text(); + + // The value is not stored in the server. + if (value === "<Not set>") + return { status: false }; + + return { status: true, value: value }; +} + +// Convenience wrapper around the above getter that will wait until a value is +// available on the server. +async function nextValueFromServer(key) { + // Resolve the key if it is a Promise. + key = await key; + + while (true) { + // Fetches the test result from the server. + const { status, value } = await readValueFromServer(key); + if (!status) { + // The test result has not been stored yet. Retry after a while. + await new Promise(resolve => setTimeout(resolve, 20)); + continue; + } + + return value; + } +} + +// Writes `value` for `key` in the key-value store on the server. +async function writeValueToServer(key, value, origin = '') { + // Resolve the key if it is a Promise. + key = await key; + + const serverUrl = `${origin}${STORE_URL}?key=${key}&value=${value}`; + await fetch(serverUrl, {"mode": "no-cors"}); +} + +// Simulates a user gesture. +async function simulateGesture() { + // Wait until the window size is initialized. + while (window.innerWidth == 0) { + await new Promise(resolve => requestAnimationFrame(resolve)); + } + await test_driver.bless('simulate gesture'); +} + +// Fenced frames are always put in the public IP address space which is the +// least privileged. In case a navigation to a local data: URL or blob: URL +// resource is allowed, they would only be able to fetch things that are *also* +// in the public IP address space. So for the document described by these local +// URLs, we'll set them up to only communicate back to the outer page via +// resources obtained in the public address space. +function createLocalSource(key, url) { + return ` + <head> + <script src="${url}"><\/script> + </head> + <body> + <script> + writeValueToServer("${key}", "LOADED", /*origin=*/"${url.origin}"); + <\/script> + </body> + `; +} + +function setupCSP(csp, second_csp=null) { + let meta = document.createElement('meta'); + meta.httpEquiv = "Content-Security-Policy"; + meta.content = "fenced-frame-src " + csp; + document.head.appendChild(meta); + + if (second_csp != null) { + let second_meta = document.createElement('meta'); + second_meta.httpEquiv = "Content-Security-Policy"; + second_meta.content = "frame-src " + second_csp; + document.head.appendChild(second_meta); + } +} diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/web-bluetooth-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/web-bluetooth-inner.html new file mode 100644 index 00000000000..3236886b978 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/web-bluetooth-inner.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to test Web Bluetooth</title> + +<body> +<button id="button">Button</button> +<script> +(async () => { + await simulateGesture(); + const [bluetooth_request_device_key] = parseKeylist(); + try { + await navigator.bluetooth.requestDevice({filters: [{name: 'device'}]}); + writeValueToServer(bluetooth_request_device_key, + 'Web Bluetooth requestDevice() succeeded'); + } catch(e) { + if (e.name == 'NotAllowedError' && + e.message.includes( + 'Web Bluetooth is not allowed in a fenced frame tree.')) { + writeValueToServer(bluetooth_request_device_key, + 'Web Bluetooth requestDevice() failed'); + } else { + writeValueToServer( + bluetooth_request_device_key, + 'Web Bluetooth requestDevice() failed with unknown error - ' + + `${e.name}: ${e.message}`); + } + } +})(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/web-bluetooth-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/web-bluetooth-inner.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/web-bluetooth-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/web-nfc-inner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/web-nfc-inner.https.html new file mode 100644 index 00000000000..682805d5d2c --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/web-nfc-inner.https.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Fenced frame content to report the value of Web NFC API</title> + +<body> +<script> +async function init() { + const [ndef_write_key, ndef_scan_key] = parseKeylist(); + + const ndef = new NDEFReader(); + ndef.write("Hello").then( + () => { writeValueToServer(ndef_write_key, "resolved"); }, + () => { writeValueToServer(ndef_write_key, "rejected"); } + ); + ndef.scan().then( + () => { writeValueToServer(ndef_scan_key, "resolved"); }, + () => { writeValueToServer(ndef_scan_key, "rejected"); } + ); +} + +init(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/web-nfc-inner.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/web-nfc-inner.https.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/web-nfc-inner.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/web-share-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/web-share-inner.html new file mode 100644 index 00000000000..aada6f04e1a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/web-share-inner.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to test Web Share</title> + +<body> +<script> +(async () => { + await simulateGesture(); + const [navigator_share_key] = parseKeylist(); + try { + await navigator.share({text: 'hello world'}); + writeValueToServer(navigator_share_key, 'Web Share succeeded'); + } catch(error) { + writeValueToServer(navigator_share_key, 'Web Share failed'); + } +})(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/web-share-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/web-share-inner.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/web-share-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/window-frameElement-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/window-frameElement-inner.html new file mode 100644 index 00000000000..897d9a0d592 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/window-frameElement-inner.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Fenced frame content to report the value of window.frameElement</title> + +<body> +<script> +(async () => { + // Report whether or not `window.frameElement` is null + const [frame_element_key] = parseKeylist(); + let result = (window.frameElement == null) ? "PASS" : "FAIL"; + writeValueToServer(frame_element_key, result); +})(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/window-frameElement-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/window-frameElement-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/window-frameElement-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/window-navigation-204-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/window-navigation-204-inner.html new file mode 100644 index 00000000000..e5e5adef1d6 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/window-navigation-204-inner.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to report the value of window.navigation</title> + +<body> +<script> +function init() { + // This file is meant to be navigated to from a <fencedframe> element. It + // reports back to the page hosting the <fencedframe> after manual timeout + // indicating that the 204 navigation succeeds without navigating away. + location.href = "response-204.py"; + + step_timeout(function() { + const [window_data_key] = parseKeylist(); + writeValueToServer(window_data_key, "still in page"); + }, 1000); +} + +init(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/window-navigation-204-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/window-navigation-204-inner.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/window-navigation-204-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/window-outer-dimensions-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/window-outer-dimensions-inner.html new file mode 100644 index 00000000000..81dee800fc6 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/window-outer-dimensions-inner.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<title>Fenced frame content to report the result of prerendering</title> + +<body> + <script> + async function report() { // Needed in order to use top-level await. + // This file is meant to run in a <fencedframe>. It reports its dimensions + // back to the outermost page, which in turn checks for correctness. + const [window_outer_size_key, window_inner_size_key, dimension, + extra_children] = parseKeylist(); + + const url = new URL(location.href); + + if (extra_children == "0") { + let outer_result = (dimension == "width") ? + window.outerWidth : window.outerHeight; + + let inner_result = (dimension == "width") ? + window.innerWidth : window.innerHeight; + + writeValueToServer(window_outer_size_key, outer_result); + writeValueToServer(window_inner_size_key, inner_result); + } else { + const iframe = document.createElement('iframe'); + const frame_url = generateURL('window-outer-dimensions-inner.html', + [window_outer_size_key, window_inner_size_key, dimension, + (parseInt(extra_children) - 1)]); + iframe.src = frame_url; + document.body.append(iframe); + } + + } + report(); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/window-outer-dimensions-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/window-outer-dimensions-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/window-outer-dimensions-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/window-parent-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/window-parent-inner.html new file mode 100644 index 00000000000..9008d7d9235 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/window-parent-inner.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to report the value of window.parent</title> + +<body> +<script> +async function init() { // Needed in order to use top-level await. + // This file is meant to run in a <fencedframe>. It reports back to the + // outermost page whether or not the value of `window.parent` was correct for: + // 1.) Top-level fenced frames + // 2.) Nested iframes inside a fenced frame + // 3.) Nested fenced frames + const url = new URL(location.href); + + const [window_parent_key, window_parent_ack_key, nested] = parseKeylist(); + const is_nested_fenced_frame = (nested == "nested"); + + // Report whether or not `window.parent` was correct. + let pass_string = ""; + if (is_nested_fenced_frame) + pass_string = "pass: fenced frame > fenced frame"; + else + pass_string = "pass: fenced frame"; + + let result = (window.parent == window) ? pass_string : "fail"; + writeValueToServer(window_parent_key, result); + + // If this page is a nested fenced frame, all we need to do is report the + // top-level value. + if (is_nested_fenced_frame) + return; + + // Wait for ACK, so we know that the outer page has read the last value from + // the `window_parent_key` stash and we can write to it again. + await nextValueFromServer(window_parent_ack_key); + + // Now test `window.parent` inside an iframe. + const iframe = document.createElement('iframe'); + iframe.src = "dummy.html"; + const load_promise = new Promise((resolve, reject) => { + iframe.onload = resolve; + iframe.onerror = reject; + }); + document.body.append(iframe); + + await load_promise; + + // Report whether or not the subframe's `window.parent` was correct. + result = (iframe.contentWindow.parent == window) ? + "pass: fenced frame > iframe" : "fail"; + writeValueToServer(window_parent_key, result); + + // Wait for ACK, so we know that the outer page has read the last value from + // the `window_parent_key` stash and we can write to it again. + await nextValueFromServer(window_parent_ack_key); + + attachFencedFrame(generateURL("window-parent-inner.html", + [window_parent_key, window_parent_ack_key, "nested"])); +} + +init(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/window-parent-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/window-parent-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/window-parent-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/window-top-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/window-top-inner.html new file mode 100644 index 00000000000..ddc30bf71b4 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/window-top-inner.html @@ -0,0 +1,63 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="utils.js"></script> +<title>Fenced frame content to report the value of window.top</title> + +<body> +<script> +async function init() { // Needed in order to use top-level await. + // This file is meant to run in a <fencedframe>. It reports back to the + // outermost page whether or not the value of `window.top` was correct for: + // 1.) Top-level fenced frames + // 2.) Nested iframes inside a fenced frame + // 3.) Nested fenced frames + const url = new URL(location.href); + + const [window_top_key, window_top_ack_key, nested] = parseKeylist(); + + // Report whether or not `window.top` was correct. + let pass_string = ""; + if (nested == "nested") + pass_string = "pass: fenced frame > fenced frame"; + else + pass_string = "pass: fenced frame"; + + let result = (window.top == window) ? pass_string : "fail"; + writeValueToServer(window_top_key, result); + + // If this page is a nested fenced frame, all we need to do is report the + // top-level value. + if (nested == "nested") + return; + + // Wait for ACK, so we know that the outer page has read the last value from + // the `window_top_key` stash and we can write to it again. + await nextValueFromServer(window_top_ack_key); + + // Now test `window.top` inside an iframe. + const iframe = document.createElement('iframe'); + iframe.src = "dummy.html"; + const load_promise = new Promise((resolve, reject) => { + iframe.onload = resolve; + iframe.onerror = reject; + }); + document.body.append(iframe); + + await load_promise; + + // Report whether or not the subframe's `window.top` was correct. + result = (iframe.contentWindow.top == window) ? + "pass: fenced frame > iframe" : "fail"; + writeValueToServer(window_top_key, result); + + // Wait for ACK, so we know that the outer page has read the last value from + // the `window_top_key` stash and we can write to it again. + await nextValueFromServer(window_top_ack_key); + + attachFencedFrame(generateURL("window-top-inner.html", + [window_top_key, window_top_ack_key, "nested"])); +} + +init(); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/window-top-inner.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/window-top-inner.html.headers new file mode 100644 index 00000000000..6247f6d6321 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/window-top-inner.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/fenced-frame/sandbox-attribute.https.html b/tests/wpt/web-platform-tests/fenced-frame/sandbox-attribute.https.html new file mode 100644 index 00000000000..1458145e437 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/sandbox-attribute.https.html @@ -0,0 +1,63 @@ +<!DOCTYPE html> +<title>Test fenced frame sandbox attribute.</title> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> + +async function runTest(t, sandbox_flags, success) { + const frame = await attachFencedFrameContext({ + generator_api: 'fledge', resolve_to_config: true, + attributes: [['sandbox', sandbox_flags]]}); + + assert_equals(frame.element.sandbox.value, sandbox_flags); + if (sandbox_flags) { + assert_equals(frame.element.sandbox.length, sandbox_flags.split(' ').length); + } else { + assert_equals(frame.element.sandbox.length, 0); + } + + const result = await Promise.any([ + frame.execute(() => { return 'success';}), + new Promise(resolve => t.step_timeout(() => resolve('failure'), 2000))]); + if (success) { + assert_equals(result, 'success'); + } else { + assert_equals(result, 'failure'); + } +} + +// We omit test cases that lack the sandbox attribute, because that's covered +// by every other test that doesn't explicitly use the `sandbox` attribute. + +promise_test(async t => { + return runTest(t, '', false); +}, 'Navigation fails with no allowed features'); + +promise_test(async t => { + return runTest(t, 'allow-same-origin allow-forms allow-scripts allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation', true); +}, 'Navigation succeeds with exactly the required unsandboxed features'); + +promise_test(async t => { + return runTest(t, 'allow-same-origin allow-forms allow-scripts allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-pointer-lock', true); +}, 'Navigation succeeds with extra unsandboxed features'); + +promise_test(async t => { + return runTest(t, 'allow-same-origin allow-forms allow-scripts allow-popups allow-popups-to-escape-sandbox', false); +}, 'Navigation fails with too few unsandboxed features'); + +promise_test(async t => { + return runTest(t, 'foo bar baz', false); +}, 'Navigation fails with malformed sandbox flags'); + +promise_test(async t => { + return runTest(t, 'allow-same-origin allow-forms allow-scripts allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-foobarbaz', true); +}, 'Navigation fails with the required unsandboxed features, plus some malformed ones'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/sandbox-mandatory-flags.https.html b/tests/wpt/web-platform-tests/fenced-frame/sandbox-mandatory-flags.https.html new file mode 100644 index 00000000000..57a5bc49cfa --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/sandbox-mandatory-flags.https.html @@ -0,0 +1,136 @@ +<!DOCTYPE html> +<meta name=timeout content=long> +<title>Test of sandbox mandatory flags</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> + +<body> + +<script> + +const mandatory_flags = [ + 'allow-same-origin', + 'allow-forms', + 'allow-scripts', + 'allow-popups', + 'allow-popups-to-escape-sandbox', + 'allow-top-navigation-by-user-activation']; + +promise_test(async t => { + const key = token(); + const value = 'fenced frame loaded'; + const iframe = document.createElement('iframe'); + iframe.src = + 'resources/sandbox-mandatory-flags-iframe.sub.html?key=' + key + + '&value=' + value; + mandatory_flags.forEach(flag => { + iframe.sandbox.add(flag); + }); + + document.body.appendChild(iframe); + t.add_cleanup(() => { + iframe.remove(); + }); + const result = await nextValueFromServer(key); + assert_equals(result, value, 'The fenced frame must be loaded.'); +}, 'Sandboxed Iframe with mandatory flags can load a fenced frame.'); + +promise_test(async t => { + const key = token(); + // Try to load a fenced frame in a sandboxed iframe like this: + // <iframe sandbox="|mandatory_flags| without |missing_flag|" + // src="sandbox-mandatory-flags-iframe.sub.html"> + // <fencedframe src="sandbox-mandatory-flags-inner.sub.html"> + // <img src="key-value-store.py?key=|key|&value=|value|"> + // <fencedframe> + // </iframe> + // But this should fail because the sandboxed iframe is loaded without + // |missing_flag|. + for (let missing_flag of mandatory_flags) { + const value = + 'a fenced frame was loaded in a sandboxed iframe without ' + + missing_flag + '.'; + const iframe = document.createElement('iframe'); + iframe.src = + 'resources/sandbox-mandatory-flags-iframe.sub.html?key=' + key + + '&value=' + value; + mandatory_flags.forEach(flag => { + if (flag != missing_flag) { + iframe.sandbox.add(flag); + } + }); + document.body.appendChild(iframe); + t.add_cleanup(() => { + iframe.remove(); + }); + } + t.step_timeout(() => t.done(), 3000); + let server_value = await nextValueFromServer(key); + assert_unreached('fenced frame should not be loaded, but ' + server_value); +}, 'Sandboxed Iframe without one of mandatory flag must fail to load a fenced' + + ' frame.'); + +promise_test(async t => { + const key = token(); + // Try to load a fenced frame in a nested sandboxed iframe like this: + // <iframe sandbox="|mandatory_flags| without |missing_flag|" + // src="sandbox-mandatory-flags-looser-restriction.sub.html"> + // <iframe sandbox="|mandatory_flags|" + // src="sandbox-mandatory-flags-iframe.sub.html"> + // <fencedframe src="resources/sandbox-mandatory-flags-inner.sub.html"> + // <img src="key-value-store.py?key=|key|&value=|value|"> + // <fencedframe> + // </iframe> + // </iframe> + // But this should fail because the nested iframe is loaded sandboxed + // without |missing_flag|. + for (let missing_flag of mandatory_flags) { + const value = + 'a fenced frame was loaded in a nested sandboxed iframe without ' + + missing_flag + '.'; + const iframe = document.createElement('iframe'); + iframe.src = + 'resources/sandbox-mandatory-flags-looser-restriction.sub.html?key=' + + key + '&value=' + value; + mandatory_flags.forEach(flag => { + if (flag != missing_flag) { + iframe.sandbox.add(flag); + } + }); + document.body.appendChild(iframe); + t.add_cleanup(() => { + iframe.remove(); + }); + } + t.step_timeout(() => t.done(), 3000); + let server_value = await nextValueFromServer(key); + assert_unreached('fenced frame should not be loaded, but ' + server_value); +}, 'Nested sandboxed iframe without one of mandatory flag must fail to load a' + + 'fenced frame even when the inner nested sandboxed iframe has all ' + + 'mandatory allow- flags.'); + +promise_test(async t => { + const key = token(); + // allow-scripts is needed to run iframe.execute, so we will test every other + // sandbox flag + for (let missing_flag of + mandatory_flags.filter(word => word != "allow-scripts")) { + const value = + 'canLoadOpaqueURL returned true even with flag ' + + missing_flag + ' not set.'; + const flags_to_add = mandatory_flags + .filter(word => word != missing_flag) + .join(" "); + const iframe = attachIFrameContext( + {attributes: [["sandbox", flags_to_add]]}); + await iframe.execute(async (t) => { + assert_false(navigator.canLoadAdAuctionFencedFrame()); + }); + } +}, 'navigator.canLoadAdAuctionFencedFrame considers mandatory sandbox flags'); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-alert.https.html b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-alert.https.html new file mode 100644 index 00000000000..6d3f83208dc --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-alert.https.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Test of sandboxed features - alert</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="resources/sandboxed-features.js"></script> + +<body> +<script> +run_sanboxed_feature_test('test_alert', + 'The fenced frame must fail to open an alert dialog.'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-confirm.https.html b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-confirm.https.html new file mode 100644 index 00000000000..bb55f15ff00 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-confirm.https.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<title>Test of sandbox features - confirm</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="resources/sandboxed-features.js"></script> + +<body> +<script> +run_sanboxed_feature_test('test_confirm', + 'The fenced frame must fail to open a confirm dialog.'); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-documentdomain.https.html b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-documentdomain.https.html new file mode 100644 index 00000000000..e00ab239800 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-documentdomain.https.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Test of sandboxed features - document.domain</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="resources/sandboxed-features.js"></script> + +<body> +<script> +run_sanboxed_feature_test('test_document_domain', + 'The fenced frame must fail to change Document.domain.'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-pointerlock.https.html b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-pointerlock.https.html new file mode 100644 index 00000000000..af598798b2e --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-pointerlock.https.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Test of sandboxed features - pointer lock</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="resources/sandboxed-features.js"></script> + +<body> +<script> +run_sanboxed_feature_test('test_pointer_lock', + 'The fenced frame must fail to call requestPointerLock().'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-presentation-request.https.html b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-presentation-request.https.html new file mode 100644 index 00000000000..7f9b1d7bd69 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-presentation-request.https.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Test of sandboxed features - PresentationRequest</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="resources/sandboxed-features.js"></script> + +<body> +<script> +run_sanboxed_feature_test('test_presentation_request', + 'The fenced frame must fail to create a PresentationRequest.'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-printdialog.https.html b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-printdialog.https.html new file mode 100644 index 00000000000..b03f7a22d8b --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-printdialog.https.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Test of sandboxed features - print</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="resources/sandboxed-features.js"></script> + +<body> +<script> +run_sanboxed_feature_test('test_print', + 'The fenced frame must fail to print the page.'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-prompt.https.html b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-prompt.https.html new file mode 100644 index 00000000000..1207f4a7654 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-prompt.https.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Test of sandboxed features - prompt</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="resources/sandboxed-features.js"></script> + +<body> +<script> +run_sanboxed_feature_test('test_prompt', + 'The fenced frame must fail to open a prompt.'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-screen-orientation-lock.https.html b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-screen-orientation-lock.https.html new file mode 100644 index 00000000000..4e80d92e1d8 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/sandboxed-features-screen-orientation-lock.https.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Test of sandboxed features - screen.orientation.lock</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> +<script src="resources/sandboxed-features.js"></script> + +<body> +<script> +run_sanboxed_feature_test('test_screen_orientation_lock', + 'The fenced frame must fail to call screen.orientation.lock().'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/selecturl-flexible-size.https.html b/tests/wpt/web-platform-tests/fenced-frame/selecturl-flexible-size.https.html new file mode 100644 index 00000000000..6b1a07e73a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/selecturl-flexible-size.https.html @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<title>Test frame size behavior in selectURL fenced frames.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +async function runTest(original_width, original_height, new_width, new_height) { + // Attach a selectURL fenced frame whose outer container has dimensions + // `original_width` by `original_height`. + const frame = await attachFencedFrameContext({ + generator_api: "sharedstorage", resolve_to_config: true, + attributes: [["width", original_width], ["height", original_height]]}); + + const assert_dimensions = + (label, original_width, original_height, + expected_width, expected_height) => { + assert_equals(getComputedStyle(document.documentElement).width, + expected_width+"px", + label + " the computed width (originally " + original_width + + ") should be " + expected_width); + assert_equals(window.innerWidth, expected_width, + label + " the innerWidth (originally " + original_width + + ") should be " + expected_width); + assert_equals(window.innerHeight, expected_height, + label + " the innerHeight (originally " + original_height + + ") should be " + expected_height); + } + + // Assert that the fenced frame sees the original dimensions. + await frame.execute(assert_dimensions, ["After navigation", + original_width, original_height, original_width, original_height]); + + // Assert that the embedder sees the fenced frame's original dimensions. + assert_equals(frame.width, original_width.toString(), + "The outer container width is the requested width."); + assert_equals(frame.height, original_height.toString(), + "The outer container height is the requested height."); + + // Resize the fenced frame's outer container. + frame.width = new_width; + frame.height = new_height; + + // Observe that the selectURL fenced frame sees the new size. + await frame.execute(assert_dimensions, ["After resizing", + original_width, original_height, new_width, new_height]); +} + +// Exact size cases. +promise_test(async () => { return runTest(299, 72, 100, 101); }, '299x72->100x101'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/self-urn-navigation.https.html b/tests/wpt/web-platform-tests/fenced-frame/self-urn-navigation.https.html new file mode 100644 index 00000000000..4b1e989e8a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/self-urn-navigation.https.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<title>Test that fenced frame-initiated self urn navigations fail.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +function getTimeoutPromise(t) { + return new Promise(resolve => + t.step_timeout(() => resolve("NOT LOADED"), 2000)); +} + +// A fenced frame root should not be able to navigate itself to a urn:uuid. +promise_test(async t => { + const frame = attachFencedFrameContext(); + urn = await runSelectURL(frame.src); + + // Send the urn:uuid to the fenced frame over the network, and attempt to + // self-"refresh" to that urn. + await frame.execute(async (urn) => { + window.executor.suspend(() => { + location.href = urn; + }); + }, [urn]); + + // The navigation should fail as intended. + const urn_load_success_promise = frame.execute(() => {}); + const urn_load_failure_promise = getTimeoutPromise(t); + const result = + await Promise.any([urn_load_success_promise, urn_load_failure_promise]); + assert_equals(result, "NOT LOADED"); +}, 'fenced frame-initiated self urn navigation'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/serviceWorker-dedicated-worker.https.html b/tests/wpt/web-platform-tests/fenced-frame/serviceWorker-dedicated-worker.https.html new file mode 100644 index 00000000000..92533e38735 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/serviceWorker-dedicated-worker.https.html @@ -0,0 +1,71 @@ +<!DOCTYPE html> +<title>Service Worker: Check if dedicated workers are controlled</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> + <script> + const frameUrl = './resources/serviceWorker-dedicated-worker-inner.html'; + const unregisterAllSW = async () => { + const regs = await navigator.serviceWorker.getRegistrations(); + return Promise.all(regs.map(reg => reg.unregister())); + }; + + promise_test(async t => { + t.add_cleanup(unregisterAllSW); + const key = token(); + + // Inside the fenced frame, the service worker is registered and fetch + // request is triggered from the dedicated worker to the url that is + // handled in the service worker. + const url = `${frameUrl}?useServiceWorkerInFencedFrame=true`; + attachFencedFrame(generateURL(url, [key])); + const result = await nextValueFromServer(key); + assert_equals(result, "OK"); + }, "Fenced frame's service workers can control fenced frame's dedicated workers"); + + promise_test(async t => { + t.add_cleanup(unregisterAllSW); + const key = token(); + + // Set a service worker in the fenced frame. Inside the fenced frame, a + // dedicated worker is created and triggers a fetch request. But we don't + // use the fetch request result in this test. This test will check if the + // dedicated worker in the parent frame is controlled by the SW in FF. + const url = `${frameUrl}?useServiceWorkerInFencedFrame=true`; + attachFencedFrame(generateURL(url, [key])); + await nextValueFromServer(key); + + const checkIfWorkerIsControlled = async () => { + const dedicated_worker = new Worker('resources/serviceWorker-dedicated-worker.js'); + return new Promise((resolve, reject) => { + dedicated_worker.addEventListener('message', e => { + resolve(e.data) + }); + dedicated_worker.postMessage('fetch'); + }); + } + + const result = await checkIfWorkerIsControlled() + assert_equals(result, "Not Found"); + }, "Fenced frame's service workers can not control the dedicated workers in the parent frame"); + + promise_test(async t => { + t.add_cleanup(unregisterAllSW); + const key = token(); + + // Register a service worker in the parent frame. + await navigator.serviceWorker.register('resources/serviceWorker-dedicated-worker-sw.js', { scope: '/' }); + await navigator.serviceWorker.ready; + + // Inside the fenced frame, fetch request to unexisting URL is triggered + // from the dedicated worker. + attachFencedFrame(generateURL(frameUrl, [key])); + + const result = await nextValueFromServer(key); + assert_equals(result, "Not Found"); + }, "Service workers in the parent frame of fenced frames can not control dedicated workers in fenced frames"); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/serviceWorker-frameType.https.html b/tests/wpt/web-platform-tests/fenced-frame/serviceWorker-frameType.https.html new file mode 100644 index 00000000000..ac0bc07f3dc --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/serviceWorker-frameType.https.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<title>Service Worker: Clients.matchAll with includeUncontrolled</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> +<body> +<script> + +promise_test(async t => { + const frame_type_key = token(); + const frame_type_ack_key = token(); + + attachFencedFrame(generateURL('resources/serviceWorker-frameType-inner.html', + [frame_type_key, frame_type_ack_key])); + + const frame_type_result = await nextValueFromServer(frame_type_key); + assert_equals(frame_type_result, "top-level", + "The service worker for the top-level fenced frame has the " + + "right value for `serviceWorker.frameType`"); + + // Write an ACK, so that the fenced frame knows it can send message over the + // `serviceWorker.frameType` channel again. + writeValueToServer(frame_type_ack_key, "ACK"); + + const nested_frame_type_result = await nextValueFromServer(frame_type_key); + assert_equals(nested_frame_type_result, "nested", + "The service worker for the iframe inside the top-level " + + "fenced frame has the right value for `serviceWorker.frameType`"); +}, 'serviceWorker.frameType'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/serviceWorker-push.https.html b/tests/wpt/web-platform-tests/fenced-frame/serviceWorker-push.https.html new file mode 100644 index 00000000000..cb460d161ee --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/serviceWorker-push.https.html @@ -0,0 +1,62 @@ +<!doctype html> +<html> +<head> +<title>Service Worker: Push Messaging Test</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +</head> +<body> +<script> + promise_test(async () => { + const frame = attachFencedFrameContext(); + try { + await frame.execute(async () => { + await navigator.serviceWorker.register( + 'empty-worker.js', { scope: location.href }); + const registration= await navigator.serviceWorker.ready; + return await registration.pushManager.subscribe({ + userVisibleOnly: true + }); + }); + assert_unreached('subscribe() executed without error; want error'); + } catch(e) { + assert_equals(e.message, + "Failed to execute 'subscribe' on 'PushManager': subscribe() is not " + + "allowed in fenced frames."); + } + }, 'subscribe() should fail inside a fenced frame'); + + promise_test(async () => { + const frame = attachFencedFrameContext(); + const message = await frame.execute(async () => { + const getController = () => { + if (navigator.serviceWorker.controller) { + return navigator.serviceWorker.controller; + } + return new Promise(resolve => { + navigator.serviceWorker.addEventListener('controllerchange', () => { + resolve(navigator.serviceWorker.controller); + }); + }); + }; + await navigator.serviceWorker.register( + 'serviceWorker-push-sw.js', { scope: location.href }); + return new Promise(async resolve => { + const ctrl = await getController(); + ctrl.postMessage('subscribe'); + navigator.serviceWorker.onmessage = e => { + resolve(e.data); + } + }); + }); + assert_equals(message, "Failed to execute 'subscribe' on " + + "'PushManager': subscribe() is not allowed in fenced frames."); + }, 'subscribe() should fail from the service worker inside a fenced frame'); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/set-automatic-beacon.https.html b/tests/wpt/web-platform-tests/fenced-frame/set-automatic-beacon.https.html new file mode 100644 index 00000000000..f231018b853 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/set-automatic-beacon.https.html @@ -0,0 +1,54 @@ +<!DOCTYPE html> +<title>Test window.fence.setReportEventDataForAutomaticBeacons</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext( + {generator_api: 'fledge'}); + await fencedframe.execute(() => { + let event = { + eventType: "reserved.top_navigation", + eventData: "a".repeat(64000), + destination: ["buyer"], + } + window.fence.setReportEventDataForAutomaticBeacons(event); + }); +}, 'setReportEventDataForAutomaticBeacons works at the size limit'); + +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext( + {generator_api: 'fledge'}); + await fencedframe.execute(() => { + let event = { + eventType: "reserved.top_navigation", + eventData: "a".repeat(64001), + destination: ["buyer"], + } + assert_throws_dom("SecurityError", () => { + window.fence.setReportEventDataForAutomaticBeacons(event); + }); + }); +}, 'setReportEventDataForAutomaticBeacons fails over the size limit'); + +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext( + {generator_api: 'fledge'}); + await fencedframe.execute(() => { + let event = { + eventType: "reserved.top_navigation", + eventData: "a".repeat(32), + destination: ["invalid"], + } + assert_throws_js(TypeError, () => { + window.fence.setReportEventDataForAutomaticBeacons(event); + }); + }); +}, 'setReportEventDataForAutomaticBeacons fails for invalid destination'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/show-directory-picker.https.html b/tests/wpt/web-platform-tests/fenced-frame/show-directory-picker.https.html new file mode 100644 index 00000000000..ae4494f51b9 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/show-directory-picker.https.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<title>showDirectoryPicker API test</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/resources/testdriver-actions.js"></script> + +<body> +<script> +promise_test(async () => { + const frame = attachFencedFrameContext(); + const result = await frame.execute(async () => { + await simulateGesture(); + try { + const dir = await window.showDirectoryPicker(); + return 'opened directory picker'; + } catch (e) { + if (e.name === 'SecurityError' && + e.message === "Failed to execute 'showDirectoryPicker' on 'Window': Cross origin sub frames aren't allowed to show a file picker.") { + return 'Access to the directory picker was disallowed'; + } + return `showDirectoryPicker failed with unknown error ${e.name} ${e.message}`; + } + }); + assert_equals(result, 'Access to the directory picker was disallowed'); +}, 'Directory information should not be read in the fenced frame.'); +</script> diff --git a/tests/wpt/web-platform-tests/fenced-frame/show-open-file-picker.https.html b/tests/wpt/web-platform-tests/fenced-frame/show-open-file-picker.https.html new file mode 100644 index 00000000000..2f99fdfb3bc --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/show-open-file-picker.https.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<title>showOpenFilePicker API test</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/resources/testdriver-actions.js"></script> + +<body> +<script> +promise_test(async () => { + const frame = attachFencedFrameContext(); + const result = await frame.execute(async () => { + await simulateGesture(); + try { + const dir = await window.showOpenFilePicker(); + return 'opened file picker'; + } catch (e) { + if (e.name === 'SecurityError' && + e.message === "Failed to execute 'showOpenFilePicker' on 'Window': Cross origin sub frames aren't allowed to show a file picker.") { + return 'Access to the open file picker was disallowed'; + } + return `showOpenFilePicker failed with unknown error ${e.name} ${e.message}`; + } + }); + assert_equals(result, 'Access to the open file picker was disallowed'); +}, 'Directory information should not be read in the fenced frame.'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/storage-partitioning.https.html b/tests/wpt/web-platform-tests/fenced-frame/storage-partitioning.https.html new file mode 100644 index 00000000000..5d6060c66fe --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/storage-partitioning.https.html @@ -0,0 +1,88 @@ +<!DOCTYPE html> +<title>Test storage partitioning in fenced frames</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> + +// `getter(key)` : reads the value of `key`, null if not set +// `setter(key, value)`: sets `key` to `value` +async function runTest(getter, setter) { + const key = "key"; + const outer_value = "outer"; + const inner_value = "inner"; + + // Set the value in the top-level frame, and check that it worked. + setter(key, outer_value); + assert_equals(getter(key), outer_value, + "Stored the value in the top-level frame."); + + // Attach a fenced frame. + const frame = attachFencedFrameContext(); + + // Check that the outer value isn't visible. + const inner_before_set = await frame.execute(getter, [key]); + assert_equals(inner_before_set, null, + "The outer value isn't visible inside the fenced frame."); + + // Set the value inside the fenced frame, and check that it worked. + await frame.execute(setter, [key, inner_value]); + const inner_after_set = await frame.execute(getter, [key]); + assert_equals(inner_after_set, inner_value, + "Stored the value in the fenced frame."); + + // Check that the inner value isn't visible in the top-level frame. + assert_equals(getter(key), outer_value, + "The inner value isn't visible outside the fenced frame."); + + // Perform an embedder-initiated navigation that will fail. + const original_config = frame.config; + frame.config = new FencedFrameConfig("resources/response-204.py"); + await step_timeout(() => {}, 1000); + + // Check that the failed navigation didn't change the storage partition. + // (The partition nonce should be reinitialized on navigation commit.) + const inner_after_failure = await frame.execute(getter, [key]); + assert_equals(inner_after_failure, inner_value, + "The inner value is still present after the failed navigation."); + + // Refresh the fenced frame from within. + await frame.execute(() => { + window.executor.suspend(() => { location.href = location.href; }); + }); + + // Check that the storage partition is the same. + const inner_after_inner_refresh = await frame.execute(getter, [key]); + assert_equals(inner_after_inner_refresh, inner_value, + "The inner value is the same after a fencedframe-initiated refresh."); + + // Refresh the fenced frame from the embedder. + await frame.execute(() => window.executor.suspend(() => {})); + frame.element.config = original_config; + + // Check that there is a blank slate. + const inner_after_embedder_refresh = await frame.execute(getter, [key]); + assert_equals(inner_after_embedder_refresh, null, + "The inner value is gone after an embedder-initiated refresh."); +} + +promise_test(async () => { + return runTest( + (_) => { return document.cookie || null; }, + (_, value) => { document.cookie = value;} + ); +}, 'document.cookie'); + +promise_test(async () => { + return runTest( + (key) => { return localStorage.getItem(key); }, + (key, value) => { return localStorage.setItem(key, value); } + ); +}, 'localStorage'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/subframe-loading.https.html b/tests/wpt/web-platform-tests/fenced-frame/subframe-loading.https.html new file mode 100644 index 00000000000..758bdd87fae --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/subframe-loading.https.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<title>Test Subframe Loading Disabler</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> +<script> + +promise_test(async () => { + const container = document.body.appendChild(document.createElement("div")); + + // Create a helper iframe that triggers loading the new fenced frame + // simultaneously when the parent container is removed. + const helperFrame = container.appendChild(document.createElement("iframe")); + + helperFrame.contentWindow.onunload = function() { + const fenced_frame = document.createElement("fencedframe"); + fenced_frame.src = "resources/dummy.https.html"; + container.appendChild(fenced_frame); + }; + + // If the fenced frame loads when it's not supposed to, + // a DCHECK will catch that and cause the test to crash. + document.body.removeChild(container); + +}, "Fenced frames should not load if its parent has subframe loading disabled"); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/web-bluetooth.https.html b/tests/wpt/web-platform-tests/fenced-frame/web-bluetooth.https.html new file mode 100644 index 00000000000..88bbd6ec375 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/web-bluetooth.https.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<title>Test of Web Bluetooth API</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> + +<script> +promise_test(async t => { + const bluetooth_request_device_key = token(); + + attachFencedFrame(generateURL('resources/web-bluetooth-inner.html', + [bluetooth_request_device_key])); + const result = await nextValueFromServer(bluetooth_request_device_key); + + assert_equals( + result, 'Web Bluetooth requestDevice() failed', + 'Web Bluetooth requestDevice() must fail in a fenced frame.'); +}, 'Web Bluetooth requestDevice() must fail in a fenced frame'); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/web-nfc.https.html b/tests/wpt/web-platform-tests/fenced-frame/web-nfc.https.html new file mode 100644 index 00000000000..c7de9d81f94 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/web-nfc.https.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<title>Test Web NFC API</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> + +<script> +promise_test(async () => { + const ndef_write_key = token(); + const ndef_scan_key = token(); + + attachFencedFrame(generateURL("resources/web-nfc-inner.https.html", + [ndef_write_key, ndef_scan_key])); + + let result = await nextValueFromServer(ndef_write_key); + assert_equals(result, "rejected", + "The fenced frame is not allowed to NDEFReader.write()."); + result = await nextValueFromServer(ndef_scan_key); + assert_equals(result, "rejected", + "The fenced frame is not allowed to NDEFReader.scan()."); + +}, "Test Web NFC API"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/web-share.https.html b/tests/wpt/web-platform-tests/fenced-frame/web-share.https.html new file mode 100644 index 00000000000..13d182b2d10 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/web-share.https.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<title>Test of Web Share</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> + +<script> +promise_test(async t => { + const navigator_share_key = token(); + + attachFencedFrame(generateURL('resources/web-share-inner.html', + [navigator_share_key])); + const result = await nextValueFromServer(navigator_share_key); + + assert_equals( + result, 'Web Share failed', + 'Web Share in a fenced frame must fail.'); +}, 'Web Sharelock in a fenced frame must fail'); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/web-usb.https.html b/tests/wpt/web-platform-tests/fenced-frame/web-usb.https.html new file mode 100644 index 00000000000..3156f68ea73 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/web-usb.https.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<title>Test WebUSB navigator.usb.requestDevice()</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async () => { + const frame = attachFencedFrameContext(); + await frame.execute(async () => { + // Request USB access inside the fenced frame. It should fail. + // https://github.com/shivanigithub/fenced-frame#security-considerations. + try { + await navigator.usb.requestDevice({ filters: [{ vendorId: 0}] }); + throw 'The USB request should not succeed.'; + } catch (e) { + assert_equals(e.name, 'SecurityError'); + assert_equals(e.message, + "Failed to execute 'requestDevice' on 'USB': " + + 'Access to the feature "usb" is disallowed by permissions policy.', + 'Fenced frame has the right error for usb.requestDevice.'); + } + }); +}, 'navigator.usb.requestDevice'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/window-close.https.html b/tests/wpt/web-platform-tests/fenced-frame/window-close.https.html new file mode 100644 index 00000000000..b581a0324c5 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/window-close.https.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<title>Test window.close has no effect</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async () => { + const frame = attachFencedFrameContext(); + await frame.execute(async () => { + // This should have no effect for fenced frames. + window.close(); + // window.closed will be true if the window closing steps have begun. + assert_false(window.closed); + }); +}, 'window.close'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/window-frameElement.https.html b/tests/wpt/web-platform-tests/fenced-frame/window-frameElement.https.html new file mode 100644 index 00000000000..bd4532b1ebe --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/window-frameElement.https.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<title>Test window.parent</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> + +<body> + +<script> +promise_test(async () => { + const frame_element_key = token(); + + attachFencedFrame(generateURL("resources/window-frameElement-inner.html", + [frame_element_key])); + const fenced_frame_result = await nextValueFromServer(frame_element_key); + assert_equals(fenced_frame_result, "PASS"); +}, "window.frameElement null for same-origin fenced frames"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/window-navigation-204.https.html b/tests/wpt/web-platform-tests/fenced-frame/window-navigation-204.https.html new file mode 100644 index 00000000000..67220603301 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/window-navigation-204.https.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<title>Test window.navigation.204</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/utils.js"></script> + +<body> + +<script> +promise_test(async () => { + const window_data_key = token(); + + attachFencedFrame(generateURL("resources/window-navigation-204-inner.html", + [window_data_key])); + + const actual_result = await nextValueFromServer(window_data_key); + assert_equals(actual_result, "still in page", + "The fenced frame has the right value for `204 response` upon " + + "subsequent navigation resulting in HTTP 204"); +}, "window.navigation.204"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/window-outer-dimensions.https.html b/tests/wpt/web-platform-tests/fenced-frame/window-outer-dimensions.https.html new file mode 100644 index 00000000000..c6a64ef193a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/window-outer-dimensions.https.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<title>Test window.prompt</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> + +<body> + <script> + async function runTest(dimension, extra_children) { + const window_outer_size_key = token(); + const window_inner_size_key = token(); + + const window_outer_size_from_top_frame = (dimension == "width" ? + window.outerWidth : window.outerHeight).toString(); + + const frame_url = generateURL( + 'resources/window-outer-dimensions-inner.html', + [window_outer_size_key, window_inner_size_key, dimension, extra_children]); + const new_frame = attachFencedFrame(frame_url); + + // Get the outer and inner width/height from either the top level + // fencedframe or the nested iframe. + const result_outer = await nextValueFromServer(window_outer_size_key); + const result_inner = await nextValueFromServer(window_inner_size_key); + + assert_not_equals(result_outer, + window_outer_size_from_top_frame, + "Outer " + dimension + " not read in fenced frame" + + " tree."); + + assert_equals(result_outer, + result_inner, + "Fencedframe's outer/inner " + dimension + " match."); + } + + promise_test(async () => { + return runTest("width", 0); + }, "window.outerWidth"); + + promise_test(async () => { + return runTest("height", 0); + }, "window.outerHeight"); + + promise_test(async () => { + return runTest("width", 1); + }, "window.outerWidth nested iframe"); + + promise_test(async () => { + return runTest("height", 1); + }, "window.outerHeight nested iframe"); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/window-parent.https.html b/tests/wpt/web-platform-tests/fenced-frame/window-parent.https.html new file mode 100644 index 00000000000..c2f36040504 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/window-parent.https.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<title>Test window.parent</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> + +<body> + +<script> +promise_test(async () => { + const window_parent_key = token(); + const window_parent_ack_key = token(); + + attachFencedFrame(generateURL("resources/window-parent-inner.html", + [window_parent_key, window_parent_ack_key])); + + // Get the result for the top-level fenced frame. + const fenced_frame_result = await nextValueFromServer(window_parent_key); + assert_equals(fenced_frame_result, "pass: fenced frame", "The top-level " + + "fenced frame has the right value for " + + "`window.parent`"); + + // Write an ACK, so that the fenced frame knows it can send message over the + // `window_parent_key` channel again. + writeValueToServer(window_parent_ack_key, "ACK"); + + // Get the result for the iframe inside the fenced frame. + const iframe_in_fenced_frame_result = await nextValueFromServer(window_parent_key); + assert_equals(iframe_in_fenced_frame_result, "pass: fenced frame > iframe", + "The iframe inside the top-level fenced frame has the right " + + "value for `window.parent`"); + + writeValueToServer(window_parent_ack_key, "ACK"); + + // Get the result for the nested fenced frame. + const nested_fenced_frame_result = await nextValueFromServer(window_parent_key); + assert_equals(nested_fenced_frame_result, "pass: fenced frame > fenced frame", + "The nested fenced frame inside the top-level fenced frame " + + "has the right value for `window.parent`"); +}, "window.parent"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/window-top.https.html b/tests/wpt/web-platform-tests/fenced-frame/window-top.https.html new file mode 100644 index 00000000000..9a8f39f08b9 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/window-top.https.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<title>Test window.top</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="resources/utils.js"></script> + +<body> + +<script> +promise_test(async () => { + const window_top_key = token(); + const window_top_ack_key = token(); + + attachFencedFrame(generateURL("resources/window-top-inner.html", + [window_top_key, window_top_ack_key, "not nested"])); + + // Get the result for the top-level fenced frame. + const fenced_frame_result = await nextValueFromServer(window_top_key); + assert_equals(fenced_frame_result, "pass: fenced frame", "The top-level " + + "fenced frame has the right value for " + + "`window.top`"); + + // Write an ACK, so that the fenced frame knows it can send message over the + // `window_top_key` channel again. + writeValueToServer(window_top_ack_key, "ACK"); + + // Get the result for the iframe inside the fenced frame. + const iframe_in_fenced_frame_result = await nextValueFromServer(window_top_key); + assert_equals(iframe_in_fenced_frame_result, "pass: fenced frame > iframe", + "The iframe inside the top-level fenced frame has the right " + + "value for `window.top`"); + + writeValueToServer(window_top_ack_key, "ACK"); + + // Get the result for the nested fenced frame. + const nested_fenced_frame_result = await nextValueFromServer(window_top_key); + assert_equals(nested_fenced_frame_result, "pass: fenced frame > fenced frame", + "The nested fenced frame inside the top-level fenced frame " + + "has the right value for `window.top`"); +}, "window.top"); +</script> + +</body> diff --git a/tests/wpt/web-platform-tests/fetch/api/basic/keepalive.any.js b/tests/wpt/web-platform-tests/fetch/api/basic/keepalive.any.js index 047f1ed2348..4f33284d0c7 100644 --- a/tests/wpt/web-platform-tests/fetch/api/basic/keepalive.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/basic/keepalive.any.js @@ -27,13 +27,3 @@ for (const method of ['GET', 'POST']) { assertStashedTokenAsync(`simple ${method} request: no payload`, token1); }, `simple ${method} request: no payload; setting up`); } - -promise_test(async (test) => { - const w = window.open(`${ - HTTP_NOTSAMESITE_ORIGIN}/fetch/api/resources/keepalive-redirect-window.html`); - const token = await getTokenFromMessage(); - w.close(); - - assertStashedTokenAsync( - 'keepalive in onunload in nested frame in another window', token); -}, 'keepalive in onunload in nested frame in another window; setting up'); diff --git a/tests/wpt/web-platform-tests/fetch/api/body/mime-type.any.js b/tests/wpt/web-platform-tests/fetch/api/body/mime-type.any.js index a0f90a0abdf..67c9af7da2d 100644 --- a/tests/wpt/web-platform-tests/fetch/api/body/mime-type.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/body/mime-type.any.js @@ -38,3 +38,90 @@ assert_equals(blob.type, newMIMEType); }, `${bodyContainer.constructor.name}: setting missing Content-Type`); }); + +[ + () => new Request("about:blank", { method: "POST" }), + () => new Response(), +].forEach(bodyContainerCreator => { + const bodyContainer = bodyContainerCreator(); + promise_test(async t => { + const blob = await bodyContainer.blob(); + assert_equals(blob.type, ""); + }, `${bodyContainer.constructor.name}: MIME type for Blob from empty body`); +}); + +[ + () => new Request("about:blank", { method: "POST", headers: [["Content-Type", "Mytext/Plain"]] }), + () => new Response("", { headers: [["Content-Type", "Mytext/Plain"]] }) +].forEach(bodyContainerCreator => { + const bodyContainer = bodyContainerCreator(); + promise_test(async t => { + const blob = await bodyContainer.blob(); + assert_equals(blob.type, 'mytext/plain'); + }, `${bodyContainer.constructor.name}: MIME type for Blob from empty body with Content-Type`); +}); + +[ + () => new Request("about:blank", { body: new Blob([""]), method: "POST" }), + () => new Response(new Blob([""])) +].forEach(bodyContainerCreator => { + const bodyContainer = bodyContainerCreator(); + promise_test(async t => { + const blob = await bodyContainer.blob(); + assert_equals(blob.type, ""); + assert_equals(bodyContainer.headers.get("Content-Type"), null); + }, `${bodyContainer.constructor.name}: MIME type for Blob`); +}); + +[ + () => new Request("about:blank", { body: new Blob([""], { type: "Text/Plain" }), method: "POST" }), + () => new Response(new Blob([""], { type: "Text/Plain" })) +].forEach(bodyContainerCreator => { + const bodyContainer = bodyContainerCreator(); + promise_test(async t => { + const blob = await bodyContainer.blob(); + assert_equals(blob.type, "text/plain"); + assert_equals(bodyContainer.headers.get("Content-Type"), "text/plain"); + }, `${bodyContainer.constructor.name}: MIME type for Blob with non-empty type`); +}); + +[ + () => new Request("about:blank", { method: "POST", body: new Blob([""], { type: "Text/Plain" }), headers: [["Content-Type", "Text/Html"]] }), + () => new Response(new Blob([""], { type: "Text/Plain" }, { headers: [["Content-Type", "Text/Html"]] })) +].forEach(bodyContainerCreator => { + const bodyContainer = bodyContainerCreator(); + const cloned = bodyContainer.clone(); + promise_test(async t => { + const blobs = [await bodyContainer.blob(), await cloned.blob()]; + assert_equals(blobs[0].type, "text/html"); + assert_equals(blobs[1].type, "text/html"); + assert_equals(bodyContainer.headers.get("Content-Type"), "Text/Html"); + assert_equals(cloned.headers.get("Content-Type"), "Text/Html"); + }, `${bodyContainer.constructor.name}: Extract a MIME type with clone`); +}); + +[ + () => new Request("about:blank", { body: new Blob([], { type: "text/plain" }), method: "POST", headers: [["Content-Type", "text/html"]] }), + () => new Response(new Blob([], { type: "text/plain" }), { headers: [["Content-Type", "text/html"]] }), +].forEach(bodyContainerCreator => { + const bodyContainer = bodyContainerCreator(); + promise_test(async t => { + assert_equals(bodyContainer.headers.get("Content-Type"), "text/html"); + const blob = await bodyContainer.blob(); + assert_equals(blob.type, "text/html"); + }, `${bodyContainer.constructor.name}: Content-Type in headers wins Blob"s type`); +}); + +[ + () => new Request("about:blank", { body: new Blob([], { type: "text/plain" }), method: "POST" }), + () => new Response(new Blob([], { type: "text/plain" })), +].forEach(bodyContainerCreator => { + const bodyContainer = bodyContainerCreator(); + promise_test(async t => { + assert_equals(bodyContainer.headers.get("Content-Type"), "text/plain"); + const newMIMEType = "text/html"; + bodyContainer.headers.set("Content-Type", newMIMEType); + const blob = await bodyContainer.blob(); + assert_equals(blob.type, newMIMEType); + }, `${bodyContainer.constructor.name}: setting missing Content-Type in headers and it wins Blob"s type`); +}); diff --git a/tests/wpt/web-platform-tests/fetch/api/redirect/redirect-keepalive.any.js b/tests/wpt/web-platform-tests/fetch/api/redirect/redirect-keepalive.any.js index 9f7cca7dbf7..bcfc444f5a6 100644 --- a/tests/wpt/web-platform-tests/fetch/api/redirect/redirect-keepalive.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/redirect/redirect-keepalive.any.js @@ -14,43 +14,81 @@ const { HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT } = get_host_info(); -promise_test(async (test) => { - const token1 = token(); - const iframe = document.createElement('iframe'); - iframe.src = getKeepAliveAndRedirectIframeUrl( - token1, '', '', /*withPreflight=*/ false); - document.body.appendChild(iframe); - await iframeLoaded(iframe); - assert_equals(await getTokenFromMessage(), token1); - iframe.remove(); - - assertStashedTokenAsync('same-origin redirect', token1); -}, 'same-origin redirect; setting up'); - -promise_test(async (test) => { - const token1 = token(); - const iframe = document.createElement('iframe'); - iframe.src = getKeepAliveAndRedirectIframeUrl( - token1, HTTP_REMOTE_ORIGIN, HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT, - /*withPreflight=*/ false); - document.body.appendChild(iframe); - await iframeLoaded(iframe); - assert_equals(await getTokenFromMessage(), token1); - iframe.remove(); - - assertStashedTokenAsync('cross-origin redirect', token1); -}, 'cross-origin redirect; setting up'); - -promise_test(async (test) => { - const token1 = token(); - const iframe = document.createElement('iframe'); - iframe.src = getKeepAliveAndRedirectIframeUrl( - token1, HTTP_REMOTE_ORIGIN, HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT, - /*withPreflight=*/ true); - document.body.appendChild(iframe); - await iframeLoaded(iframe); - assert_equals(await getTokenFromMessage(), token1); - iframe.remove(); - - assertStashedTokenAsync('cross-origin redirect with preflight', token1); -}, 'cross-origin redirect with preflight; setting up'); +/** + * In an iframe, test to fetch a keepalive URL that involves in redirect to + * another URL. + */ +function keepaliveRedirectTest( + desc, {origin1 = '', origin2 = '', withPreflight = false} = {}) { + desc = `[keepalive] ${desc}`; + promise_test(async (test) => { + const tokenToStash = token(); + const iframe = document.createElement('iframe'); + iframe.src = getKeepAliveAndRedirectIframeUrl( + tokenToStash, origin1, origin2, withPreflight); + document.body.appendChild(iframe); + await iframeLoaded(iframe); + assert_equals(await getTokenFromMessage(), tokenToStash); + iframe.remove(); + + assertStashedTokenAsync(desc, tokenToStash); + }, `${desc}; setting up`); +} + +/** + * Opens a different site window, and in `unload` event handler, test to fetch + * a keepalive URL that involves in redirect to another URL. + */ +function keepaliveRedirectInUnloadTest(desc, { + origin1 = '', + origin2 = '', + url2 = '', + withPreflight = false, + shouldPass = true +} = {}) { + desc = `[keepalive][new window][unload] ${desc}`; + + promise_test(async (test) => { + const targetUrl = + `${HTTP_NOTSAMESITE_ORIGIN}/fetch/api/resources/keepalive-redirect-window.html?` + + `origin1=${origin1}&` + + `origin2=${origin2}&` + + `url2=${url2}&` + (withPreflight ? `with-headers` : ``); + const w = window.open(targetUrl); + const token = await getTokenFromMessage(); + w.close(); + + assertStashedTokenAsync(desc, token, {shouldPass}); + }, `${desc}; setting up`); +} + +keepaliveRedirectTest(`same-origin redirect`); +keepaliveRedirectTest( + `same-origin redirect + preflight`, {withPreflight: true}); +keepaliveRedirectTest(`cross-origin redirect`, { + origin1: HTTP_REMOTE_ORIGIN, + origin2: HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT +}); +keepaliveRedirectTest(`cross-origin redirect + preflight`, { + origin1: HTTP_REMOTE_ORIGIN, + origin2: HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT, + withPreflight: true +}); + +keepaliveRedirectInUnloadTest('same-origin redirect'); +keepaliveRedirectInUnloadTest( + 'same-origin redirect + preflight', {withPreflight: true}); +keepaliveRedirectInUnloadTest('cross-origin redirect', { + origin1: HTTP_REMOTE_ORIGIN, + origin2: HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT +}); +keepaliveRedirectInUnloadTest('cross-origin redirect + preflight', { + origin1: HTTP_REMOTE_ORIGIN, + origin2: HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT, + withPreflight: true +}); +keepaliveRedirectInUnloadTest( + 'redirect to file URL', {url2: 'file://tmp/bar.txt', shouldPass: false}); +keepaliveRedirectInUnloadTest( + 'redirect to data URL', + {url2: 'data:text/plain;base64,cmVzcG9uc2UncyBib2R5', shouldPass: false}); diff --git a/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-helper.js b/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-helper.js index 42f20ac30af..c7048d1ff33 100644 --- a/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-helper.js +++ b/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-helper.js @@ -60,7 +60,7 @@ async function queryToken(token) { // for the rest of the work. Note that we want the serialized behavior // for the steps so far, so we don't want to make the entire test case // an async_test. -function assertStashedTokenAsync(testName, token) { +function assertStashedTokenAsync(testName, token, {shouldPass = true} = {}) { async_test((test) => { new Promise((resolve) => test.step_timeout(resolve, 3000)) .then(() => { @@ -73,7 +73,11 @@ function assertStashedTokenAsync(testName, token) { test.done(); }) .catch(test.step_func((e) => { - assert_unreached(e); + if (shouldPass) { + assert_unreached(e); + } else { + test.done(); + } })); }, testName); } diff --git a/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-redirect-window.html b/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-redirect-window.html index 6ccf484644c..c18650796cc 100644 --- a/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-redirect-window.html +++ b/tests/wpt/web-platform-tests/fetch/api/resources/keepalive-redirect-window.html @@ -10,20 +10,28 @@ const { HTTP_REMOTE_ORIGIN, HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT } = get_host_info(); -const REDIRECT_DESTINATION = - `${HTTP_REMOTE_ORIGIN_WITH_DIFFERENT_PORT}/fetch/api/resources/stash-put.py` + + +const SEARCH_PARAMS = new URL(location.href).searchParams; +const WITH_HEADERS = !!SEARCH_PARAMS.has('with-headers'); +const ORIGIN1 = SEARCH_PARAMS.get('origin1') || ''; +const ORIGIN2 = SEARCH_PARAMS.get('origin2') || ''; +const URL2 = SEARCH_PARAMS.get('url2') || ''; + +const REDIRECT_DESTINATION = URL2 ? URL2 : + `${ORIGIN2}/fetch/api/resources/stash-put.py` + `?key=${TOKEN}&value=on`; -const URL = - `${HTTP_REMOTE_ORIGIN}/fetch/api/resources/redirect.py?` + +const FROM_URL = + `${ORIGIN1}/fetch/api/resources/redirect.py?` + `delay=500&` + `allow_headers=foo&` + `location=${encodeURIComponent(REDIRECT_DESTINATION)}`; addEventListener('load', () => { + const headers = WITH_HEADERS ? {'foo': 'bar'} : undefined; const iframe = document.createElement('iframe'); document.body.appendChild(iframe); iframe.contentWindow.addEventListener('unload', () => { - iframe.contentWindow.fetch(URL, {keepalive: true, headers: {foo: 'bar'}}); + iframe.contentWindow.fetch(FROM_URL, {keepalive: true, headers}); }); window.opener.postMessage(TOKEN, '*'); diff --git a/tests/wpt/web-platform-tests/fetch/api/response/response-clone.any.js b/tests/wpt/web-platform-tests/fetch/api/response/response-clone.any.js index 9f4f36ed2d1..f5cda75149e 100644 --- a/tests/wpt/web-platform-tests/fetch/api/response/response-clone.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/response/response-clone.any.js @@ -103,7 +103,21 @@ function testReadableStreamClone(initialBuffer, bufferType) return stream2.getReader().read(); }).then(function(data) { assert_false(data.done); - assert_array_equals(data.value, initialBuffer, "Cloned buffer chunks have the same content"); + if (initialBuffer instanceof ArrayBuffer) { + assert_true(data.value instanceof ArrayBuffer, "Cloned buffer is ArrayBufer"); + assert_equals(initialBuffer.byteLength, data.value.byteLength, "Length equal"); + assert_array_equals(new Uint8Array(data.value), new Uint8Array(initialBuffer), "Cloned buffer chunks have the same content"); + } else if (initialBuffer instanceof DataView) { + assert_true(data.value instanceof DataView, "Cloned buffer is DataView"); + assert_equals(initialBuffer.byteLength, data.value.byteLength, "Lengths equal"); + assert_equals(initialBuffer.byteOffset, data.value.byteOffset, "Offsets equal"); + for (let i = 0; i < initialBuffer.byteLength; ++i) { + assert_equals( + data.value.getUint8(i), initialBuffer.getUint8(i), "Mismatch at byte ${i}"); + } + } else { + assert_array_equals(data.value, initialBuffer, "Cloned buffer chunks have the same content"); + } assert_equals(Object.getPrototypeOf(data.value), Object.getPrototypeOf(initialBuffer), "Cloned buffers have the same type"); assert_not_equals(data.value, initialBuffer, "Buffer of cloned response stream is a clone of the original buffer"); }); diff --git a/tests/wpt/web-platform-tests/fetch/data-urls/navigate.window.js b/tests/wpt/web-platform-tests/fetch/data-urls/navigate.window.js new file mode 100644 index 00000000000..b532a006830 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/data-urls/navigate.window.js @@ -0,0 +1,75 @@ +// META: timeout=long +// +// Test some edge cases around navigation to data: URLs to ensure they use the same code path + +[ + { + input: "data:text/html,<script>parent.postMessage(1, '*')</script>", + result: 1, + name: "Nothing fancy", + }, + { + input: "data:text/html;base64,PHNjcmlwdD5wYXJlbnQucG9zdE1lc3NhZ2UoMiwgJyonKTwvc2NyaXB0Pg==", + result: 2, + name: "base64", + }, + { + input: "data:text/html;base64,PHNjcmlwdD5wYXJlbnQucG9zdE1lc3NhZ2UoNCwgJyonKTwvc2NyaXB0Pr+/", + result: 4, + name: "base64 with code points that differ from base64url" + }, + { + input: "data:text/html;base64,PHNjcml%09%20%20%0A%0C%0DwdD5wYXJlbnQucG9zdE1lc3NhZ2UoNiwgJyonKTwvc2NyaXB0Pg==", + result: 6, + name: "ASCII whitespace in the input is removed" + } +].forEach(({ input, result, name }) => { + // Use promise_test so they go sequentially + promise_test(async t => { + const event = await new Promise((resolve, reject) => { + self.addEventListener("message", t.step_func(resolve), { once: true }); + const frame = document.body.appendChild(document.createElement("iframe")); + t.add_cleanup(() => frame.remove()); + + // The assumption is that postMessage() is quicker + t.step_timeout(reject, 500); + frame.src = input; + }); + assert_equals(event.data, result); + }, name); +}); + +// Failure cases +[ + { + input: "data:text/html;base64,PHNjcmlwdD5wYXJlbnQucG9zdE1lc3NhZ2UoMywgJyonKTwvc2NyaXB0Pg=", + name: "base64 with incorrect padding", + }, + { + input: "data:text/html;base64,PHNjcmlwdD5wYXJlbnQucG9zdE1lc3NhZ2UoNSwgJyonKTwvc2NyaXB0Pr-_", + name: "base64url is not supported" + }, + { + input: "data:text/html;base64,%0BPHNjcmlwdD5wYXJlbnQucG9zdE1lc3NhZ2UoNywgJyonKTwvc2NyaXB0Pg==", + name: "Vertical tab in the input leads to an error" + } +].forEach(({ input, name }) => { + // Continue to use promise_test so they go sequentially + promise_test(async t => { + const event = await new Promise((resolve, reject) => { + self.addEventListener("message", t.step_func(reject), { once: true }); + const frame = document.body.appendChild(document.createElement("iframe")); + t.add_cleanup(() => frame.remove()); + + // The assumption is that postMessage() is quicker + t.step_timeout(resolve, 500); + frame.src = input; + }); + }, name); +}); + +// I found some of the interesting code point cases above through brute force: +// +// for (i = 0; i < 256; i++) { +// w(btoa("<script>parent.postMessage(5, '*')<\/script>" + String.fromCodePoint(i) + String.fromCodePoint(i))); +// } diff --git a/tests/wpt/web-platform-tests/fledge/tentative/auction-config.https.sub.window.js b/tests/wpt/web-platform-tests/fledge/tentative/auction-config.https.sub.window.js new file mode 100644 index 00000000000..1455871dad6 --- /dev/null +++ b/tests/wpt/web-platform-tests/fledge/tentative/auction-config.https.sub.window.js @@ -0,0 +1,214 @@ +// META: script=/resources/testdriver.js +// META: script=/common/utils.js +// META: script=resources/fledge-util.js + +"use strict;" + +// The tests in this file focus on calls to runAdAuction with various +// auctionConfigs. + +const makeTest = ({ + // Test name + name, + // Expectation function (EXPECT_NULL, etc.) + expect, + // Overrides to the auction config. + auctionConfigOverrides = {}, +}) => { + promise_test(async test => { + const uuid = generateUuid(test); + // Join an interest group so the auction actually runs. + await joinInterestGroup(test, uuid); + let auctionResult; + try { + auctionResult = await runBasicFledgeAuction(test, uuid, auctionConfigOverrides); + } catch (e) { + auctionResult = e; + } + expect(auctionResult); + }, name); +}; + +// Expect an unsuccessful auction (yielding null). +const EXPECT_NO_WINNER = auctionResult => { + assert_equals(auctionResult, null, 'Auction unexpected had a winner'); +}; + +// Expect an exception of the given type. +const EXPECT_EXCEPTION = exceptionType => auctionResult => { + assert_not_equals(auctionResult, null, "got null instead of expected error"); + assert_true(auctionResult instanceof Error, "did not get expected error: " + auctionResult); + assert_throws_js(exceptionType, () => { throw auctionResult; }); +}; + +makeTest({ + name: 'no buyers => no winners', + expect: EXPECT_NO_WINNER, + auctionConfigOverrides: {interestGroupBuyers: []}, +}); + +makeTest({ + name: 'seller is not an https URL', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: {seller: "ftp://not-https"}, +}); + +makeTest({ + name: 'decisionLogicUrl is invalid', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { decisionLogicUrl: "https://foo:99999999999" }, +}); + +makeTest({ + name: 'decisionLogicUrl is cross-origin with seller', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { decisionLogicUrl: "https://example.com" }, +}); + +makeTest({ + name: 'trustedScoringSignalsUrl is invalid', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { trustedScoringSignalsUrl: "https://foo:99999999999" }, +}); + +makeTest({ + name: 'trustedScoringSignalsUrl is cross-origin with seller', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { trustedScoringSignalsUrl: "https://example.com" }, +}); + +makeTest({ + name: 'interestGroupBuyer is invalid', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { interestGroupBuyers: ["https://foo:99999999999"] }, +}); + +makeTest({ + name: 'interestGroupBuyer is not https', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { interestGroupBuyers: ["http://example.com"] }, +}); + +makeTest({ + name: 'only one interestGroupBuyer is invalid', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { + interestGroupBuyers: ["https://example.com", "https://foo:99999999999"], + }, +}); + +makeTest({ + name: 'only one interestGroupBuyer is not https', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { + interestGroupBuyers: ["https://example.com", "http://example.com"], + }, +}); + +makeTest({ + name: 'auctionSignals is invalid as JSON', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { auctionSignals: { sig: BigInt(13) } }, +}); + +makeTest({ + name: 'sellerSignals is invalid as JSON', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { sellerSignals: { sig: BigInt(13) } }, +}); + +makeTest({ + name: 'directFromSellerSignals is invalid', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { directFromSellerSignals: "https://foo:99999999999" }, +}); + +makeTest({ + name: 'directFromSellerSignals is cross-origin with seller', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { directFromSellerSignals: "https://example.com" }, +}); + +makeTest({ + name: 'directFromSellerSignals has nonempty query', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { directFromSellerSignals: window.location.origin + "?foo=bar" }, +}); + +makeTest({ + name: 'perBuyerSignals has invalid URL in a key', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { perBuyerSignals: { "https://foo:99999999999" : {} }}, +}); + +makeTest({ + name: 'perBuyerSignals value is invalid as JSON', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { + perBuyerSignals: { "https://example.com" : { sig: BigInt(1) }, + }}, +}); + +makeTest({ + name: 'perBuyerGroupLimits has invalid URL in a key', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { perBuyerGroupLimits: { "https://foo:99999999999" : 5 }}, +}); + +makeTest({ + name: 'perBuyerExperimentGroupIds has invalid URL in a key', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { perBuyerExperimentGroupIds: { "https://foo:99999999999" : 11 }}, +}); + +makeTest({ + name: 'perBuyerPrioritySignals has invalid URL in a key', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { + perBuyerPrioritySignals: { "https://foo:99999999999" : { sig: 2.5} }, + }, +}); + +makeTest({ + name: 'perBuyerPrioritySignals has a value with a key with prefix "browserSignals"', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { + perBuyerPrioritySignals: { "https://example.com" : { "browserSignals.foo" : true } }, + }, +}); + +makeTest({ + name: 'component auctions are not allowed within component auctions', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { + interestGroupBuyers: undefined, + componentAuctions: [ + { + seller: window.location.origin, + decisionLogicUrl: window.location.origin, + interestGroupBuyers: undefined, + componentAuctions: [ + { + seller: window.location.origin, + decisionLogicUrl: window.location.origin, + } + ], + }, + ], + }, +}); + +makeTest({ + name: 'component auctions are not allowed with interestGroupBuyers', + expect: EXPECT_EXCEPTION(TypeError), + auctionConfigOverrides: { + interestGroupBuyers: ["https://example.com"], + componentAuctions: [ + { + seller: window.location.origin, + decisionLogicUrl: window.location.origin, + interestGroupBuyers: [], + }, + ], + }, +}); diff --git a/tests/wpt/web-platform-tests/fs/FileSystemSyncAccessHandle-read-write.https.tentative.worker.js b/tests/wpt/web-platform-tests/fs/FileSystemSyncAccessHandle-read-write.https.tentative.worker.js index 8fa3799a67a..a22608a2c7d 100644 --- a/tests/wpt/web-platform-tests/fs/FileSystemSyncAccessHandle-read-write.https.tentative.worker.js +++ b/tests/wpt/web-platform-tests/fs/FileSystemSyncAccessHandle-read-write.https.tentative.worker.js @@ -195,6 +195,7 @@ sync_access_handle_test((t, handle) => { const bufferLength = expected.length; const readBuffer = new Uint8Array(expected.length); + // No options parameter provided, should read at offset 0. const readBytes = handle.read(readBuffer, {at: 0}); assert_equals(expected.length, readBytes, 'Check that all bytes were read'); const actual = new TextDecoder().decode(readBuffer); @@ -238,62 +239,64 @@ sync_access_handle_test((t, handle) => { const readBuffer = new Uint8Array(24); const readBytes = handle.read(readBuffer, {at: 0}); + assert_equals(0, readBytes, 'Check that no bytes were written'); }, 'Test writing at a negative offset fails.'); sync_access_handle_test((t, handle) => { - const text = 'foobar'; - const writeBuffer = new TextEncoder().encode(text); - let writtenBytes = handle.write(writeBuffer); - assert_equals( - writeBuffer.byteLength, writtenBytes, - 'Check that all bytes were written.'); - - // This should double the file size, not overwrite the existing bytes. - writtenBytes = handle.write(writeBuffer); - assert_equals( - writeBuffer.byteLength, writtenBytes, - 'Check that all bytes were written.'); - - // Reading at the cursor will read zero bytes at the end of the file. - const expectedFileSize = text.length * 2; - const readBuffer = new Uint8Array(expectedFileSize); - let readBytes = handle.read(readBuffer); - assert_equals(0, readBytes, 'Check that no bytes were read'); - - // Reading from the start of the file. - readBytes = handle.read(readBuffer, {at: 0}); - assert_equals(expectedFileSize, readBytes, 'Check that all bytes were read'); -}, 'Test that writing moves the file position cursor'); + if (!('TextEncoder' in self)) { + return; + } -sync_access_handle_test((t, handle) => { + const encoder = new TextEncoder(); const decoder = new TextDecoder(); - const text = 'foobar'; - const writeBuffer = new TextEncoder().encode(text); + let writeBuffer = encoder.encode("Hello "); let writtenBytes = handle.write(writeBuffer); + writeBuffer = encoder.encode("World"); + writtenBytes += handle.write(writeBuffer); + let readBuffer = new Uint8Array(256); + let readBytes = handle.read(readBuffer, {at: 0}); + assert_equals(readBytes, "Hello World".length, 'Check that all bytes were read'); + let actual = decoder.decode(readBuffer).substring(0, readBytes); assert_equals( - writeBuffer.byteLength, writtenBytes, - 'Check that all bytes were written.'); + actual, "Hello World", + 'Check content read from the handle'); - // Read the first half of the file. - let expected = 'foo'; - const readBuffer = new Uint8Array(3); - let readBytes = handle.read(readBuffer, {at: 0}); - assert_equals(3, readBytes, 'Check that all bytes were read'); - let actual = decoder.decode(readBuffer); + readBuffer = new Uint8Array(5); + readBytes = handle.read(readBuffer, {at: 0}); + assert_equals(readBytes, 5, 'Check that all bytes were read'); + actual = decoder.decode(readBuffer).substring(0, readBytes); assert_equals( - expected, actual, - `Expected to read ${expected} but the actual value was ${actual}.`); + actual, "Hello", + 'Check content read from the handle'); - // Read the second half of the file, without specifying an offset. - expected = 'bar'; + readBuffer = new Uint8Array(256); readBytes = handle.read(readBuffer); - assert_equals(3, readBytes, 'Check that all bytes were read'); + assert_equals(readBytes, "Hello World".length - 5, 'Check that all bytes were read'); + actual = decoder.decode(readBuffer).substring(0, readBytes); + assert_equals( + actual, " World", + 'Check content read from the handle'); + + readBuffer = new Uint8Array(5); + readBytes = handle.read(readBuffer, {at: 0}); + assert_equals(readBytes, 5, 'Check that all bytes were read'); actual = decoder.decode(readBuffer); assert_equals( - expected, actual, - `Expected to read ${expected} but the actual value was ${actual}.`); -}, 'Test that reading moves the file position cursor'); + actual, "Hello", + 'Check content read from the handle'); + writeBuffer = encoder.encode(" X"); + writtenBytes = handle.write(writeBuffer); + assert_equals(writtenBytes, 2, 'Check overwrite length'); + + readBuffer = new Uint8Array(256); + readBytes = handle.read(readBuffer, {at: 0}); + assert_equals(readBytes, "Hello Xorld".length, 'Check that all bytes were read'); + actual = decoder.decode(readBuffer).substring(0, readBytes); + assert_equals( + actual, "Hello Xorld", + 'Check content read from the handle'); +}, 'Test reading and writing a file using the cursor'); done(); diff --git a/tests/wpt/web-platform-tests/fs/FileSystemSyncAccessHandle-truncate.https.tentative.worker.js b/tests/wpt/web-platform-tests/fs/FileSystemSyncAccessHandle-truncate.https.tentative.worker.js index f2cd51ef1a1..e5f557e070c 100644 --- a/tests/wpt/web-platform-tests/fs/FileSystemSyncAccessHandle-truncate.https.tentative.worker.js +++ b/tests/wpt/web-platform-tests/fs/FileSystemSyncAccessHandle-truncate.https.tentative.worker.js @@ -38,22 +38,33 @@ sync_access_handle_test((t, handle) => { }, 'test SyncAccessHandle.truncate after SyncAccessHandle.write'); sync_access_handle_test((t, handle) => { - // The cursor will be at the end of the file after this write. const writeBuffer = new Uint8Array(4); - writeBuffer.set([0, 1, 2, 3]); + writeBuffer.set([96, 97, 98, 99]); + handle.write(writeBuffer, {at: 0}); + + // Moves cursor to 2 + handle.truncate(2); + let readBuffer = new Uint8Array(256); + assert_equals(handle.read(readBuffer), 0); + + writeBuffer.set([100, 101, 102, 103]); handle.write(writeBuffer); - // Extending the file should not move the cursor. - handle.truncate(6); - let readBuffer = new Uint8Array(2); - let expected = new Uint8Array(2); - expected.set([0, 0]); - assert_equals(2, handle.read(readBuffer)); - assert_array_equals(expected, readBuffer); + assert_equals(handle.read(readBuffer, {at: 0}), 6); + let expected = new Uint8Array(256); + expected.set([96, 97, 100, 101, 102, 103]); + assert_array_equals(readBuffer, expected); - // Shortening the file should move the cursor to the new end. - handle.truncate(2); - assert_equals(0, handle.read(readBuffer)); -}, 'test SyncAccessHandle.truncate resets the file position cursor'); + // Resize the file to 10, expect that everything beyond the old size is '0'. + handle.truncate(10); // file cursor should still be at 6 + // overwrite two bytes + const writeBuffer2 = new Uint8Array(2); + writeBuffer2.set([110, 111]); + handle.write(writeBuffer2); + expected = new Uint8Array(256); + expected.set([96, 97, 100, 101, 102, 103, 110, 111, 0, 0]); + assert_equals(handle.read(readBuffer, {at: 0}), 10); + assert_array_equals(readBuffer, expected); +}, 'Test truncate effect on cursor'); done(); diff --git a/tests/wpt/web-platform-tests/html-aam/META.yaml b/tests/wpt/web-platform-tests/html-aam/META.yaml new file mode 100644 index 00000000000..572918600ac --- /dev/null +++ b/tests/wpt/web-platform-tests/html-aam/META.yaml @@ -0,0 +1,4 @@ +spec: https://w3c.github.io/html-aam/ +suggested_reviewers: + - cookiecrook + - scottaohara
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html-aam/fragile/area-role.html b/tests/wpt/web-platform-tests/html-aam/fragile/area-role.html new file mode 100644 index 00000000000..9b6ded56860 --- /dev/null +++ b/tests/wpt/web-platform-tests/html-aam/fragile/area-role.html @@ -0,0 +1,25 @@ +<!doctype html> +<html> +<head> + <title>HTMLAreaElement Role Verification Tests</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + <script src="/resources/testdriver-actions.js"></script> + <script src="/wai-aria/scripts/aria-utils.js"></script> +</head> +<body> + +<map name="areamap"> + <area shape="rect" coords="0,0,15,15" href="#" alt="x" data-testname="el-area" data-expectedrole="link" class="ex"> + <area shape="rect" coords="15,15,31,31" alt="x" data-testname="el-area-no-href" data-expectedrole="generic" class="ex"> +</map> +<img usemap="#areamap" src="#" style="width: 32px; height: 32px;" alt="x"> + +<script> +AriaUtils.verifyRolesBySelector(".ex"); +</script> + +</body> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html-aam/fragile/optgroup-role.html b/tests/wpt/web-platform-tests/html-aam/fragile/optgroup-role.html new file mode 100644 index 00000000000..f36a5d69835 --- /dev/null +++ b/tests/wpt/web-platform-tests/html-aam/fragile/optgroup-role.html @@ -0,0 +1,30 @@ +<!doctype html> +<html> +<head> + <title>HTMLOptGroupElement Role Verification Tests</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + <script src="/resources/testdriver-actions.js"></script> + <script src="/wai-aria/scripts/aria-utils.js"></script> +</head> +<body> + +<select> + <optgroup label="x" data-testname="el-optgroup" data-expectedrole="group" class="ex"> + <option>x1</option> + <option>x2</option> + </optgroup> + <optgroup data-testname="el-optgroup-no-label" data-expectedrole="not defined in spec?" class="ex-todo"> + <option>y1</option> + <option>y2</option> + </optgroup> +</select> + +<script> +AriaUtils.verifyRolesBySelector(".ex"); +</script> + +</body> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html-aam/roles.html b/tests/wpt/web-platform-tests/html-aam/roles.html new file mode 100644 index 00000000000..c5cb3e35487 --- /dev/null +++ b/tests/wpt/web-platform-tests/html-aam/roles.html @@ -0,0 +1,223 @@ +<!doctype html> +<html> +<head> + <title>HTML-AAM Role Verification Tests</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + <script src="/resources/testdriver-actions.js"></script> + <script src="/wai-aria/scripts/aria-utils.js"></script> +</head> +<body> + +<!-- Most test names correspond to unique ID defined in the https://w3c.github.io/html-aam/ spec. --> + +<a href="#" data-testname="el-a" data-expectedrole="link" class="ex">x</a> +<a data-testname="el-a-no-href" data-expectedrole="generic" class="ex">x</a> +<!-- todo: abbr --> +<address data-testname="el-address" data-expectedrole="group" class="ex">x</address> +<!-- area -> ./fragile/area-role.html --> +<article data-testname="el-article" data-expectedrole="article" class="ex">x</article> + +<!-- el-aside --> +<nav> + <aside data-testname="el-aside-in-section-with-name" data-expectedrole="complementary" aria-label="x" class="ex">x</aside> + <aside data-testname="el-aside-in-section-without-name" data-expectedrole="generic" class="ex">x</aside> +</nav> +<aside data-testname="el-aside-ancestorbodymain" data-expectedrole="complementary" class="ex">x</aside> + +<!-- todo: audio --> +<!-- todo: autonomous custom element --> +<b data-testname="el-b" data-expectedrole="strong" class="ex">x</b> +<!-- base (not mapped) --> +<bdi data-testname="el-bdi" data-expectedrole="generic" class="ex">x</bdi> +<bdo data-testname="el-bdo" data-expectedrole="generic" class="ex">x</bdo> +<blockquote data-testname="el-blockquote" data-expectedrole="blockquote" class="ex">x</blockquote> +<!-- todo: body --> +<!-- br (not mapped) --> +<button data-testname="el-button" data-expectedrole="button" class="ex">x</button> +<!-- todo: canvas --> +<!-- caption -> ./table-roles.html --> +<!-- todo: cite --> +<code data-testname="el-code" data-expectedrole="code" class="ex">x</code> +<!-- todo: col --> +<!-- todo: colgroup --> +<data value="1" data-testname="el-data" data-expectedrole="generic" class="ex">x</data> +<!-- todo: datalist --> + +<!-- el-dd --> +<dl> + <dt>x</dt> + <dd data-testname="el-dd" data-expectedrole="definition" class="ex">x</dd> +</dl> + +<del data-testname="el-del" data-expectedrole="deletion" class="ex">x</del> +<details data-testname="el-details" data-expectedrole="group" class="ex"><summary>x</summary>x</details> +<dfn data-testname="el-dfn" data-expectedrole="term" class="ex">x</dfn> +<div open data-testname="el-div" data-expectedrole="generic" class="ex">x</div> +<!-- todo: dl --> + +<!-- el-dt --> +<dl> + <dt data-testname="el-dt" data-expectedrole="term" class="ex">x</dt> + <dd>x</dd> +</dl> + +<em data-testname="el-em" data-expectedrole="emphasis" class="ex">x</em> +<!-- todo: embed --> +<fieldset data-testname="el-fieldset" data-expectedrole="group" class="ex"><legend>x</legend><input></fieldset> +<!-- todo: figcaption --> +<figure data-testname="el-figure" data-expectedrole="figure" class="ex"><img src="#" alt="x"><figcaption>x</figcaption></figure> + +<!-- el-footer --> +<nav> + <footer data-testname="el-footer" data-expectedrole="generic" aria-label="x" class="ex">x</aside> +</nav> +<footer data-testname="el-footer-ancestorbody" data-expectedrole="contentinfo" class="ex">x</footer> + +<form data-testname="el-form" data-expectedrole="form" class="ex"><input></form> +<!-- todo: form-associated custom element --> + +<!-- el-h1-h6 --> +<h1 data-testname="el-h1" data-expectedrole="heading" class="ex">x</h1> +<h2 data-testname="el-h2" data-expectedrole="heading" class="ex">x</h2> +<h3 data-testname="el-h3" data-expectedrole="heading" class="ex">x</h3> +<h4 data-testname="el-h4" data-expectedrole="heading" class="ex">x</h4> +<h5 data-testname="el-h5" data-expectedrole="heading" class="ex">x</h5> +<h6 data-testname="el-h6" data-expectedrole="heading" class="ex">x</h6> + +<!-- head (not mapped) --> + +<!-- el-header --> +<nav> + <header data-testname="el-header" data-expectedrole="generic" aria-label="x" class="ex">x</header> +</nav> +<header data-testname="el-header-ancestorbody" data-expectedrole="banner" class="ex">x</header> + +<hgroup data-testname="el-hgroup" data-expectedrole="group" class="ex"><h1>x</h1></hgroup> +<hr data-testname="el-hr" data-expectedrole="separator" class="ex"> +<!-- todo: html --> +<i data-testname="el-i" data-expectedrole="generic" class="ex">x</i> +<!-- todo: iframe --> +<img src="#" alt="x" data-testname="el-img" data-expectedrole="image" class="ex"> + +<!-- Implementations might also be valid if ignored rather than returning 'none' for the following images. --> +<img src="#" alt data-testname="el-img-alt-no-value" data-expectedrole="none" class="ex"> +<img src="#" alt="" data-testname="el-img-empty-alt" data-expectedrole="none" class="ex"> + +<input type="button" value="x" data-testname="el-input-button" data-expectedrole="button" class="ex"> +<input type="checkbox" data-testname="el-input-checkbox" data-expectedrole="checkbox" class="ex"> +<!-- todo: input type="color" --> +<!-- todo: input type="date" --> +<!-- todo: input type="datetime" --> +<!-- todo: input type="datetime-local" --> +<input type="email" data-testname="el-input-email" data-expectedrole="textbox" class="ex"> +<!-- todo: input type="file" --> +<!-- input type="hidden" (not mapped) --> +<!-- todo: input type="month" --> + +<!-- Blocked: HTML-AAM Issue #467 --> +<!-- <input type="number" data-testname="el-input-number" data-expectedrole="spinbutton" class="ex"> --> + +<!-- todo: input type="password" --> +<input type="radio" data-testname="el-input-radio" data-expectedrole="radio" class="ex"> +<input type="range" data-testname="el-input-range" data-expectedrole="slider" class="ex"> +<input type="reset" value="x" data-testname="el-input-reset" data-expectedrole="button" class="ex"> +<input type="search" data-testname="el-input-search" data-expectedrole="searchbox" class="ex"> +<input type="submit" value="x" data-testname="el-input-submit" data-expectedrole="button" class="ex"> +<input type="tel" data-testname="el-input-tel" data-expectedrole="textbox" class="ex"> +<input type="text" data-testname="el-input-text" data-expectedrole="textbox" class="ex"> +<!-- todo: input (type attribute in the Text, Search, Telephone, URL, or E-mail states with a suggestions source element) --> +<!-- todo: input type="time" --> +<input type="url" data-testname="el-input-url" data-expectedrole="textbox" class="ex"> +<!-- todo: input type="week" --> +<ins data-testname="el-ins" data-expectedrole="insertion" class="ex">x</ins> +<!-- todo: kbd --> +<!-- todo: label --> +<!-- todo: legend --> + +<!-- el-li --> +<li data-testname="el-li-orphaned" data-expectedrole="generic" class="ex">x</li> +<ul><li data-testname="el-li-in-ul" data-expectedrole="listitem" class="ex">x</li><li>x</li></ul> +<ol><li data-testname="el-li-in-ol" data-expectedrole="listitem" class="ex">x</li><li>x</li></ol> + +<!-- link (not mapped) --> +<main data-testname="el-main" data-expectedrole="main" class="ex">x</main> +<!-- map (not mapped) --> +<mark data-testname="el-mark" data-expectedrole="mark" class="ex">x</mark> +<!-- todo: math --> +<menu data-testname="el-menu" data-expectedrole="list" class="ex"><li>x</li></menu> +<!-- meta (not mapped) --> +<meter data-testname="el-meter" data-expectedrole="meter" class="ex" min="0" max="100" low="20" high="80" optimum="60" value="50">x</meter> +<nav data-testname="el-nav" data-expectedrole="navigation" class="ex">x</nav> +<!-- noscript (not mapped) --> +<!-- object (not mapped) --> +<ol data-testname="el-ol" data-expectedrole="list" class="ex"><li>x</li><li>x</li></ol> + +<!-- optgroup -> ./fragile/optgroup-role.html --> + +<!-- option --> +<select> + <option data-testname="el-option" data-expectedrole="option" class="ex">x</option> + <option>x</option> +</select> + +<output data-testname="el-output" data-expectedrole="status" class="ex">x</output> +<p data-testname="el-p" data-expectedrole="paragraph" class="ex">x</p> +<!-- param (not mapped) --> +<!-- todo: picture --> +<pre data-testname="el-pre" data-expectedrole="generic" class="ex">x</pre> +<progress data-testname="el-progress" data-expectedrole="progressbar" class="ex">x</progress> +<q data-testname="el-q" data-expectedrole="generic" class="ex">x</q> +<!-- todo: rp -> /ruby-aam? --> +<!-- todo: rt -> /ruby-aam? --> +<!-- todo: ruby -> /ruby-aam? --> +<s data-testname="el-s" data-expectedrole="deletion" class="ex">x</s> +<samp data-testname="el-samp" data-expectedrole="generic" class="ex">x</samp> +<!-- script (not mapped) --> +<search data-testname="el-search" data-expectedrole="search" class="ex">x</search> + +<!-- el-section --> +<section data-testname="el-section" aria-label="x" data-expectedrole="region" class="ex">x</section> +<section data-testname="el-section-no-name" data-expectedrole="generic" class="ex">x</section> + +<!-- Blocked: HTML-AAM Issue #467 --> +<!-- <select data-testname="el-select-combobox" data-expectedrole="combobox" class="ex"><option>a1</option><option>a2</option></select>--> + +<select data-testname="el-select-listbox" size="2" data-expectedrole="listbox" class="ex"><option>b1</option><option>b2</option></select> + +<!-- slot (not mapped) --> +<small data-testname="el-small" data-expectedrole="generic" class="ex">x</small> +<!-- source (not mapped) --> +<span data-testname="el-span" data-expectedrole="generic" class="ex">x</span> +<strong data-testname="el-strong" data-expectedrole="strong" class="ex">x</strong> +<!-- style (not mapped) --> +<sub data-testname="el-sub" data-expectedrole="subscript" class="ex">x</sub> +<!-- todo: summary --> +<sup data-testname="el-sup" data-expectedrole="superscript" class="ex">x</sup> +<!-- todo: svg (see /graphics-aam and /svg-aam tests) --> +<!-- table -> ./table-roles.html --> +<!-- tbody -> ./table-roles.html --> +<!-- td -> ./table-roles.html --> +<!-- template (not mapped) --> +<!-- tfoot -> ./table-roles.html --> +<!-- th -> ./table-roles.html --> +<!-- thead -> ./table-roles.html --> +<time data-testname="el-time" data-expectedrole="time" class="ex">x</time> +<!-- title (not mapped) --> +<!-- tr -> ./table-roles.html --> +<textarea data-testname="el-textarea" data-expectedrole="textbox" class="ex">x</textarea> +<!-- track (not mapped) --> +<u data-testname="el-u" data-expectedrole="generic" class="ex">x</u> +<ul data-testname="el-ul" data-expectedrole="list" class="ex"><li>x</li><li>x</li></ul> +<!-- var (not mapped) --> +<!-- todo: video --> +<!-- wbr (not mapped) --> + +<script> +AriaUtils.verifyRolesBySelector(".ex"); +</script> + +</body> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html-aam/table-roles.html b/tests/wpt/web-platform-tests/html-aam/table-roles.html new file mode 100644 index 00000000000..d7865f5fcca --- /dev/null +++ b/tests/wpt/web-platform-tests/html-aam/table-roles.html @@ -0,0 +1,49 @@ +<!doctype html> +<html> +<head> + <title>HTML-AAM Role Verification Tests</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/testdriver.js"></script> + <script src="/resources/testdriver-vendor.js"></script> + <script src="/resources/testdriver-actions.js"></script> + <script src="/wai-aria/scripts/aria-utils.js"></script> +</head> +<body> + +<table data-testname="el-table" data-expectedrole="table" class="ex"> + <caption data-testname="el-caption" data-expectedrole="caption" class="ex">caption</caption> + <thead data-testname="el-thead" data-expectedrole="rowgroup" class="ex"> + <tr data-testname="el-tr-thead" data-expectedrole="row" class="ex"> + <th data-testname="el-th" data-expectedrole="columnheader" class="ex">a</th> + <th>b</th> + <th>c</th> + </tr> + </thead> + <tbody data-testname="el-tbody" data-expectedrole="rowgroup" class="ex"> + <tr data-testname="el-tr-tbody" data-expectedrole="row" class="ex"> + <th data-testname="el-th-in-row" data-expectedrole="rowheader" class="ex">1</th> + <td data-testname="el-td" data-expectedrole="cell" class="ex">2</td> + <td>3</td> + </tr> + <tr> + <th>4</th> + <td>5</td> + <td>6</td> + </tr> + </tbody> + <tfoot data-testname="el-tfoot" data-expectedrole="rowgroup" class="ex"> + <tr> + <th>x</th> + <th>y</th> + <th>z</th> + </tr> + </tfoot> +</table> + +<script> +AriaUtils.verifyRolesBySelector(".ex"); +</script> + +</body> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/PopStateEvent.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/PopStateEvent.html index 8db1d2788c0..5774c150f42 100644 --- a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/PopStateEvent.html +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/history-traversal/PopStateEvent.html @@ -5,6 +5,14 @@ <script src="/resources/testharnessreport.js"></script> <div id="log"></div> <script> +test(function() { + assert_throws_js( + TypeError, + () => PopStateEvent(''), + "Calling PopStateEvent constructor without 'new' must throw" + ); +}, "PopStateEvent constructor called as normal function"); + test(function () { assert_false('initPopStateEvent' in PopStateEvent.prototype, 'There should be no PopStateEvent#initPopStateEvent'); diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html index a3622d2f0d4..29a685fa590 100644 --- a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html @@ -156,9 +156,14 @@ const testCases = [ expectedReturnValue: "foo" }, { + setReturnValue: "", + expectedReturnValue: "", + expectCancelation: false, + }, + { expectCancelation: true, - cancel: true, - expectedReturnValue: "" + expectedReturnValue: "", + cancel: true }, { setReturnValue: "foo", diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html index d405213d5b6..71a8c9eb484 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html @@ -39,16 +39,6 @@ _assert(new CanvasFilter({filter: 'dropShadow', dy: false}), "new CanvasFilter({ _assert(new CanvasFilter({filter: 'dropShadow', dy: []}), "new CanvasFilter({filter: 'dropShadow', dy: []})"); _assert(new CanvasFilter({filter: 'dropShadow', dy: [20]}), "new CanvasFilter({filter: 'dropShadow', dy: [\""+(20)+"\"]})"); _assert(new CanvasFilter({filter: 'dropShadow', dy: '30'}), "new CanvasFilter({filter: 'dropShadow', dy: '30'})"); -// stdDeviation -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})"); // floodOpacity _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 10})"); _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: -1})"); @@ -59,6 +49,21 @@ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: false}), "new Canv _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: []}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: []})"); _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: [\""+(20)+"\"]})"); _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'})"); +// stdDeviation +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]})"); // floodColor _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'red'})"); _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'})"); @@ -82,14 +87,6 @@ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: 'test'}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: {}}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: [1, 2]}); }); -// stdDeviation -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2]}); }); // floodOpacity assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: NaN}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: Infinity}); }); @@ -98,6 +95,21 @@ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: 'test'}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: {}}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: [1, 2]}); }); +// stdDeviation +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2, 3]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, NaN]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, Infinity]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, -Infinity]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, undefined]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 'test']}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, {}]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, [2, 3]]}); }); // floodColor assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'test'}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html index 8327b5cad48..86c5710132f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html @@ -4,33 +4,54 @@ <h1>2d.filter.canvasFilterObject.dropShadow.tentative</h1> <p class="desc">Test CanvasFilter() dropShadow object.</p> -<svg width=620 height=320 xmlns="http://www.w3.org/2000/svg"> +<svg xmlns="http://www.w3.org/2000/svg" + width=520 height=420 + color-interpolation-filters="sRGB"> <rect x=0 y=0 width=100% height=50 fill="teal" /> <rect x=0 y=100 width=100% height=50 fill="teal" /> <rect x=0 y=200 width=100% height=50 fill="teal" /> + <rect x=0 y=300 width=100% height=50 fill="teal" /> <rect x=10 y=10 width=80 height=80 fill="crimson" - style="filter: drop-shadow(2px 2px 2px black)"/> + filter="drop-shadow(2px 2px 2px black)"/> <rect x=110 y=10 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 5px rgba(128, 0, 128, 0.7))"/> + filter="drop-shadow(9px 12px 5px rgba(128, 0, 128, 0.7))"/> <rect x=10 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(10px 10px 3px purple)"/> + filter="drop-shadow(9px 12px 3px purple)"/> <rect x=110 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 3px LinkText)"/> + filter="drop-shadow(9px 12px 3px LinkText)"/> <rect x=210 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(10px 15px 0px purple)"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 1))"/> <rect x=310 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(9px 12px 3px rgba(20, 50, 130, 1))"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 0.7))"/> <rect x=410 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 3px rgba(20, 50, 130, 0.7))"/> - <rect x=510 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 3px rgba(20, 50, 130, 0.49))"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 0.49))"/> <rect x=10 y=210 width=80 height=80 fill="crimson" - style="filter: drop-shadow(-5px 0px 0px purple)"/> + filter="drop-shadow(9px 12px 0px purple)"/> <rect x=110 y=210 width=80 height=80 fill="crimson" - style="filter: drop-shadow(0px 5px 0px rgba(128, 0, 128, 0.8))"/> + filter="drop-shadow(9px 12px 5px purple)"/> <rect x=210 y=210 width=80 height=80 fill="crimson" - style="filter: drop-shadow(1px 10px 0px rgba(128, 0, 128, 0.4))"/> + filter="drop-shadow(9px 12px 0px purple)"/> + <filter id="separable-filter" + x="-100%" y="-100%" width="300%" height="300%"> + <feDropShadow dx=9 dy=12 stdDeviation="3 5" flood-color="purple"/> + </filter> + <rect x=310 y=210 width=80 height=80 fill="crimson" + filter="url(#separable-filter)"/> + <rect x=410 y=210 width=80 height=80 fill="crimson" + filter="drop-shadow(9px 12px 0px purple)"/> + + <rect x=10 y=310 width=80 height=80 fill="crimson" + filter="drop-shadow(-5px 0px 0px purple)"/> + <filter id="separable-filter-degenerate" + x="-100%" y="-100%" width="300%" height="300%"> + <feDropShadow dx=0 dy=5 stdDeviation="0 3" + flood-color="rgba(128, 0, 128, 0.8)"/> + </filter> + <rect x=110 y=310 width=80 height=80 fill="crimson" + filter="url(#separable-filter-degenerate)"/> + <rect x=210 y=310 width=80 height=80 fill="crimson" + filter="drop-shadow(1px 10px 0px rgba(128, 0, 128, 0.4))"/> </svg> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html index 712716d9f01..09eb09473d1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html @@ -4,7 +4,7 @@ <title>Canvas test: 2d.filter.canvasFilterObject.dropShadow.tentative</title> <h1>2d.filter.canvasFilterObject.dropShadow.tentative</h1> <p class="desc">Test CanvasFilter() dropShadow object.</p> -<canvas id="canvas" width="620" height="320"> +<canvas id="canvas" width="520" height="420"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script> @@ -12,9 +12,10 @@ const ctx = canvas.getContext('2d'); ctx.fillStyle = 'teal'; - ctx.fillRect(0, 0, 620, 50); - ctx.fillRect(0, 100, 620, 50); - ctx.fillRect(0, 200, 620, 50); + ctx.fillRect(0, 0, 520, 50); + ctx.fillRect(0, 100, 520, 50); + ctx.fillRect(0, 200, 520, 50); + ctx.fillRect(0, 300, 520, 50); ctx.fillStyle = 'crimson'; @@ -24,59 +25,83 @@ // All parameters specified. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 5, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 5, floodColor: 'purple', floodOpacity: 0.7}); ctx.fillRect(110, 10, 80, 80); // Named color. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 10, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'purple'}); ctx.fillRect(10, 110, 80, 80); // System color. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'LinkText'}); ctx.fillRect(110, 110, 80, 80); - // No blur. - ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 10, dy: 15, stdDeviation: 0, - floodColor: 'purple'}); - ctx.fillRect(210, 110, 80, 80); - // Numerical color. ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 1)'}); - ctx.fillRect(310, 110, 80, 80); + ctx.fillRect(210, 110, 80, 80); // Transparent floodColor. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 0.7)'}); - ctx.fillRect(410, 110, 80, 80); + ctx.fillRect(310, 110, 80, 80); // Transparent floodColor and floodOpacity. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 0.7)', floodOpacity: 0.7}); - ctx.fillRect(510, 110, 80, 80); + ctx.fillRect(410, 110, 80, 80); + + // No blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 0, + floodColor: 'purple'}); + ctx.fillRect(10, 210, 80, 80); + + // Single float blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 5, + floodColor: 'purple'}); + ctx.fillRect(110, 210, 80, 80); + + // Single negative float blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: -5, + floodColor: 'purple'}); + ctx.fillRect(210, 210, 80, 80); + + // Two floats (X&Y) blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: [3, 5], + floodColor: 'purple'}); + ctx.fillRect(310, 210, 80, 80); + + // Two negative floats (X&Y) blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: [-3, -5], + floodColor: 'purple'}); + ctx.fillRect(410, 210, 80, 80); // Degenerate parameter values. ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: [-5], dy: [], stdDeviation: null, floodColor: 'purple', floodOpacity: [2]}); - ctx.fillRect(10, 210, 80, 80); + ctx.fillRect(10, 310, 80, 80); ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: null, dy: '5', stdDeviation: -5, + {filter: 'dropShadow', dx: null, dy: '5', stdDeviation: [[-5], ['3']], floodColor: 'purple', floodOpacity: '0.8'}); - ctx.fillRect(110, 210, 80, 80); + ctx.fillRect(110, 310, 80, 80); ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: true, dy: ['10'], stdDeviation: false, floodColor: 'purple', floodOpacity: ['0.4']}); - ctx.fillRect(210, 210, 80, 80); + ctx.fillRect(210, 310, 80, 80); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html index 46fa3445ba5..b01b9da51b8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html @@ -63,6 +63,7 @@ var testColor = [0, 255, 255, 128]; setRGBA(imageData.data, 4, testColor); assertArrayEquals(getRGBA(imageData.data, 4), testColor); +assert_throws_js(TypeError, function() { ImageData(1, 1); }); assert_throws_js(TypeError, function() { new ImageData(10); }); assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(0, 10); }); assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(10, 0); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html index 7acc1e492d0..e124341e441 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html @@ -41,16 +41,6 @@ _assert(new CanvasFilter({filter: 'dropShadow', dy: false}), "new CanvasFilter({ _assert(new CanvasFilter({filter: 'dropShadow', dy: []}), "new CanvasFilter({filter: 'dropShadow', dy: []})"); _assert(new CanvasFilter({filter: 'dropShadow', dy: [20]}), "new CanvasFilter({filter: 'dropShadow', dy: [\""+(20)+"\"]})"); _assert(new CanvasFilter({filter: 'dropShadow', dy: '30'}), "new CanvasFilter({filter: 'dropShadow', dy: '30'})"); -// stdDeviation -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})"); // floodOpacity _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 10})"); _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: -1})"); @@ -61,6 +51,21 @@ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: false}), "new Canv _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: []}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: []})"); _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: [\""+(20)+"\"]})"); _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'})"); +// stdDeviation +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]})"); // floodColor _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'red'})"); _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'})"); @@ -84,14 +89,6 @@ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: 'test'}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: {}}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: [1, 2]}); }); -// stdDeviation -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2]}); }); // floodOpacity assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: NaN}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: Infinity}); }); @@ -100,6 +97,21 @@ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: 'test'}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: {}}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: [1, 2]}); }); +// stdDeviation +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2, 3]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, NaN]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, Infinity]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, -Infinity]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, undefined]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 'test']}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, {}]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, [2, 3]]}); }); // floodColor assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'test'}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js index 2746428a884..ac3f98ab235 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js @@ -36,16 +36,6 @@ _assert(new CanvasFilter({filter: 'dropShadow', dy: false}), "new CanvasFilter({ _assert(new CanvasFilter({filter: 'dropShadow', dy: []}), "new CanvasFilter({filter: 'dropShadow', dy: []})"); _assert(new CanvasFilter({filter: 'dropShadow', dy: [20]}), "new CanvasFilter({filter: 'dropShadow', dy: [\""+(20)+"\"]})"); _assert(new CanvasFilter({filter: 'dropShadow', dy: '30'}), "new CanvasFilter({filter: 'dropShadow', dy: '30'})"); -// stdDeviation -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})"); -_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})"); // floodOpacity _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 10})"); _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: -1})"); @@ -56,6 +46,21 @@ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: false}), "new Canv _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: []}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: []})"); _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: [\""+(20)+"\"]})"); _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'})"); +// stdDeviation +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})"); +_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]})"); // floodColor _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'red'})"); _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'})"); @@ -79,14 +84,6 @@ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: 'test'}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: {}}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: [1, 2]}); }); -// stdDeviation -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); }); -assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2]}); }); // floodOpacity assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: NaN}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: Infinity}); }); @@ -95,6 +92,21 @@ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: 'test'}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: {}}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: [1, 2]}); }); +// stdDeviation +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2, 3]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, NaN]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, Infinity]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, -Infinity]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, undefined]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 'test']}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, {}]}); }); +assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, [2, 3]]}); }); // floodColor assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'test'}); }); assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); }); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html index 8327b5cad48..86c5710132f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative-expected.html @@ -4,33 +4,54 @@ <h1>2d.filter.canvasFilterObject.dropShadow.tentative</h1> <p class="desc">Test CanvasFilter() dropShadow object.</p> -<svg width=620 height=320 xmlns="http://www.w3.org/2000/svg"> +<svg xmlns="http://www.w3.org/2000/svg" + width=520 height=420 + color-interpolation-filters="sRGB"> <rect x=0 y=0 width=100% height=50 fill="teal" /> <rect x=0 y=100 width=100% height=50 fill="teal" /> <rect x=0 y=200 width=100% height=50 fill="teal" /> + <rect x=0 y=300 width=100% height=50 fill="teal" /> <rect x=10 y=10 width=80 height=80 fill="crimson" - style="filter: drop-shadow(2px 2px 2px black)"/> + filter="drop-shadow(2px 2px 2px black)"/> <rect x=110 y=10 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 5px rgba(128, 0, 128, 0.7))"/> + filter="drop-shadow(9px 12px 5px rgba(128, 0, 128, 0.7))"/> <rect x=10 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(10px 10px 3px purple)"/> + filter="drop-shadow(9px 12px 3px purple)"/> <rect x=110 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 3px LinkText)"/> + filter="drop-shadow(9px 12px 3px LinkText)"/> <rect x=210 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(10px 15px 0px purple)"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 1))"/> <rect x=310 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(9px 12px 3px rgba(20, 50, 130, 1))"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 0.7))"/> <rect x=410 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 3px rgba(20, 50, 130, 0.7))"/> - <rect x=510 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 3px rgba(20, 50, 130, 0.49))"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 0.49))"/> <rect x=10 y=210 width=80 height=80 fill="crimson" - style="filter: drop-shadow(-5px 0px 0px purple)"/> + filter="drop-shadow(9px 12px 0px purple)"/> <rect x=110 y=210 width=80 height=80 fill="crimson" - style="filter: drop-shadow(0px 5px 0px rgba(128, 0, 128, 0.8))"/> + filter="drop-shadow(9px 12px 5px purple)"/> <rect x=210 y=210 width=80 height=80 fill="crimson" - style="filter: drop-shadow(1px 10px 0px rgba(128, 0, 128, 0.4))"/> + filter="drop-shadow(9px 12px 0px purple)"/> + <filter id="separable-filter" + x="-100%" y="-100%" width="300%" height="300%"> + <feDropShadow dx=9 dy=12 stdDeviation="3 5" flood-color="purple"/> + </filter> + <rect x=310 y=210 width=80 height=80 fill="crimson" + filter="url(#separable-filter)"/> + <rect x=410 y=210 width=80 height=80 fill="crimson" + filter="drop-shadow(9px 12px 0px purple)"/> + + <rect x=10 y=310 width=80 height=80 fill="crimson" + filter="drop-shadow(-5px 0px 0px purple)"/> + <filter id="separable-filter-degenerate" + x="-100%" y="-100%" width="300%" height="300%"> + <feDropShadow dx=0 dy=5 stdDeviation="0 3" + flood-color="rgba(128, 0, 128, 0.8)"/> + </filter> + <rect x=110 y=310 width=80 height=80 fill="crimson" + filter="url(#separable-filter-degenerate)"/> + <rect x=210 y=310 width=80 height=80 fill="crimson" + filter="drop-shadow(1px 10px 0px rgba(128, 0, 128, 0.4))"/> </svg> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html index 04326527905..55f2d2c24b5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.html @@ -4,17 +4,18 @@ <title>Canvas test: 2d.filter.canvasFilterObject.dropShadow.tentative</title> <h1>2d.filter.canvasFilterObject.dropShadow.tentative</h1> <p class="desc">Test CanvasFilter() dropShadow object.</p> -<canvas id="canvas" width="620" height="320"> +<canvas id="canvas" width="520" height="420"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script> - const offscreen_canvas = new OffscreenCanvas(620, 320); + const offscreen_canvas = new OffscreenCanvas(520, 420); const ctx = offscreen_canvas.getContext('2d'); ctx.fillStyle = 'teal'; - ctx.fillRect(0, 0, 620, 50); - ctx.fillRect(0, 100, 620, 50); - ctx.fillRect(0, 200, 620, 50); + ctx.fillRect(0, 0, 520, 50); + ctx.fillRect(0, 100, 520, 50); + ctx.fillRect(0, 200, 520, 50); + ctx.fillRect(0, 300, 520, 50); ctx.fillStyle = 'crimson'; @@ -24,61 +25,85 @@ // All parameters specified. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 5, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 5, floodColor: 'purple', floodOpacity: 0.7}); ctx.fillRect(110, 10, 80, 80); // Named color. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 10, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'purple'}); ctx.fillRect(10, 110, 80, 80); // System color. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'LinkText'}); ctx.fillRect(110, 110, 80, 80); - // No blur. - ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 10, dy: 15, stdDeviation: 0, - floodColor: 'purple'}); - ctx.fillRect(210, 110, 80, 80); - // Numerical color. ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 1)'}); - ctx.fillRect(310, 110, 80, 80); + ctx.fillRect(210, 110, 80, 80); // Transparent floodColor. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 0.7)'}); - ctx.fillRect(410, 110, 80, 80); + ctx.fillRect(310, 110, 80, 80); // Transparent floodColor and floodOpacity. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 0.7)', floodOpacity: 0.7}); - ctx.fillRect(510, 110, 80, 80); + ctx.fillRect(410, 110, 80, 80); + + // No blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 0, + floodColor: 'purple'}); + ctx.fillRect(10, 210, 80, 80); + + // Single float blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 5, + floodColor: 'purple'}); + ctx.fillRect(110, 210, 80, 80); + + // Single negative float blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: -5, + floodColor: 'purple'}); + ctx.fillRect(210, 210, 80, 80); + + // Two floats (X&Y) blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: [3, 5], + floodColor: 'purple'}); + ctx.fillRect(310, 210, 80, 80); + + // Two negative floats (X&Y) blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: [-3, -5], + floodColor: 'purple'}); + ctx.fillRect(410, 210, 80, 80); // Degenerate parameter values. ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: [-5], dy: [], stdDeviation: null, floodColor: 'purple', floodOpacity: [2]}); - ctx.fillRect(10, 210, 80, 80); + ctx.fillRect(10, 310, 80, 80); ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: null, dy: '5', stdDeviation: -5, + {filter: 'dropShadow', dx: null, dy: '5', stdDeviation: [[-5], ['3']], floodColor: 'purple', floodOpacity: '0.8'}); - ctx.fillRect(110, 210, 80, 80); + ctx.fillRect(110, 310, 80, 80); ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: true, dy: ['10'], stdDeviation: false, floodColor: 'purple', floodOpacity: ['0.4']}); - ctx.fillRect(210, 210, 80, 80); + ctx.fillRect(210, 310, 80, 80); const canvas = document.getElementById("canvas"); canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.w.html index de72f5fe3d9..633d202012c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.w.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.tentative.w.html @@ -5,18 +5,19 @@ <title>Canvas test: 2d.filter.canvasFilterObject.dropShadow.tentative</title> <h1>2d.filter.canvasFilterObject.dropShadow.tentative</h1> <p class="desc">Test CanvasFilter() dropShadow object.</p> -<canvas id="canvas" width="620" height="320"> +<canvas id="canvas" width="520" height="420"> <p class="fallback">FAIL (fallback content)</p> </canvas> <script id='myWorker' type='text/worker'> self.onmessage = function(e) { - const oc = new OffscreenCanvas(620, 320); + const oc = new OffscreenCanvas(520, 420); const ctx = oc.getContext('2d'); ctx.fillStyle = 'teal'; - ctx.fillRect(0, 0, 620, 50); - ctx.fillRect(0, 100, 620, 50); - ctx.fillRect(0, 200, 620, 50); + ctx.fillRect(0, 0, 520, 50); + ctx.fillRect(0, 100, 520, 50); + ctx.fillRect(0, 200, 520, 50); + ctx.fillRect(0, 300, 520, 50); ctx.fillStyle = 'crimson'; @@ -26,61 +27,85 @@ // All parameters specified. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 5, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 5, floodColor: 'purple', floodOpacity: 0.7}); ctx.fillRect(110, 10, 80, 80); // Named color. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 10, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'purple'}); ctx.fillRect(10, 110, 80, 80); // System color. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'LinkText'}); ctx.fillRect(110, 110, 80, 80); - // No blur. - ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 10, dy: 15, stdDeviation: 0, - floodColor: 'purple'}); - ctx.fillRect(210, 110, 80, 80); - // Numerical color. ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 1)'}); - ctx.fillRect(310, 110, 80, 80); + ctx.fillRect(210, 110, 80, 80); // Transparent floodColor. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 0.7)'}); - ctx.fillRect(410, 110, 80, 80); + ctx.fillRect(310, 110, 80, 80); // Transparent floodColor and floodOpacity. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 0.7)', floodOpacity: 0.7}); - ctx.fillRect(510, 110, 80, 80); + ctx.fillRect(410, 110, 80, 80); + + // No blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 0, + floodColor: 'purple'}); + ctx.fillRect(10, 210, 80, 80); + + // Single float blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 5, + floodColor: 'purple'}); + ctx.fillRect(110, 210, 80, 80); + + // Single negative float blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: -5, + floodColor: 'purple'}); + ctx.fillRect(210, 210, 80, 80); + + // Two floats (X&Y) blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: [3, 5], + floodColor: 'purple'}); + ctx.fillRect(310, 210, 80, 80); + + // Two negative floats (X&Y) blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: [-3, -5], + floodColor: 'purple'}); + ctx.fillRect(410, 210, 80, 80); // Degenerate parameter values. ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: [-5], dy: [], stdDeviation: null, floodColor: 'purple', floodOpacity: [2]}); - ctx.fillRect(10, 210, 80, 80); + ctx.fillRect(10, 310, 80, 80); ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: null, dy: '5', stdDeviation: -5, + {filter: 'dropShadow', dx: null, dy: '5', stdDeviation: [[-5], ['3']], floodColor: 'purple', floodOpacity: '0.8'}); - ctx.fillRect(110, 210, 80, 80); + ctx.fillRect(110, 310, 80, 80); ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: true, dy: ['10'], stdDeviation: false, floodColor: 'purple', floodOpacity: ['0.4']}); - ctx.fillRect(210, 210, 80, 80); + ctx.fillRect(210, 310, 80, 80); const bitmap = oc.transferToImageBitmap(); self.postMessage(bitmap, bitmap); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html index 0665f7452ce..a2ad1dcc7ee 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html @@ -6,6 +6,14 @@ <script> test(function() { + assert_throws_js( + TypeError, + () => OffscreenCanvas(100, 50), + "Calling OffscreenCanvas constructor without 'new' must throw" + ); +}, "OffscreenCanvas constructor called as normal function"); + +test(function() { var offscreenCanvas = new OffscreenCanvas(100, 50); assert_equals(offscreenCanvas.width, 100); assert_equals(offscreenCanvas.height, 50); diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml index 246b73e7f1a..292dfcc0ec7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml @@ -349,12 +349,13 @@ - name: 2d.filter.canvasFilterObject.dropShadow.tentative desc: Test CanvasFilter() dropShadow object. - size: 620, 320 + size: 520, 420 code: | ctx.fillStyle = 'teal'; - ctx.fillRect(0, 0, 620, 50); - ctx.fillRect(0, 100, 620, 50); - ctx.fillRect(0, 200, 620, 50); + ctx.fillRect(0, 0, 520, 50); + ctx.fillRect(0, 100, 520, 50); + ctx.fillRect(0, 200, 520, 50); + ctx.fillRect(0, 300, 520, 50); ctx.fillStyle = 'crimson'; @@ -364,91 +365,136 @@ // All parameters specified. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 5, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 5, floodColor: 'purple', floodOpacity: 0.7}); ctx.fillRect(110, 10, 80, 80); // Named color. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 10, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'purple'}); ctx.fillRect(10, 110, 80, 80); // System color. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'LinkText'}); ctx.fillRect(110, 110, 80, 80); - // No blur. - ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 10, dy: 15, stdDeviation: 0, - floodColor: 'purple'}); - ctx.fillRect(210, 110, 80, 80); - // Numerical color. ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 1)'}); - ctx.fillRect(310, 110, 80, 80); + ctx.fillRect(210, 110, 80, 80); // Transparent floodColor. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 0.7)'}); - ctx.fillRect(410, 110, 80, 80); + ctx.fillRect(310, 110, 80, 80); // Transparent floodColor and floodOpacity. ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3, + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3, floodColor: 'rgba(20, 50, 130, 0.7)', floodOpacity: 0.7}); - ctx.fillRect(510, 110, 80, 80); + ctx.fillRect(410, 110, 80, 80); + + // No blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 0, + floodColor: 'purple'}); + ctx.fillRect(10, 210, 80, 80); + + // Single float blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 5, + floodColor: 'purple'}); + ctx.fillRect(110, 210, 80, 80); + + // Single negative float blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: -5, + floodColor: 'purple'}); + ctx.fillRect(210, 210, 80, 80); + + // Two floats (X&Y) blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: [3, 5], + floodColor: 'purple'}); + ctx.fillRect(310, 210, 80, 80); + + // Two negative floats (X&Y) blur. + ctx.filter = new CanvasFilter( + {filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: [-3, -5], + floodColor: 'purple'}); + ctx.fillRect(410, 210, 80, 80); // Degenerate parameter values. ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: [-5], dy: [], stdDeviation: null, floodColor: 'purple', floodOpacity: [2]}); - ctx.fillRect(10, 210, 80, 80); + ctx.fillRect(10, 310, 80, 80); ctx.filter = new CanvasFilter( - {filter: 'dropShadow', dx: null, dy: '5', stdDeviation: -5, + {filter: 'dropShadow', dx: null, dy: '5', stdDeviation: [[-5], ['3']], floodColor: 'purple', floodOpacity: '0.8'}); - ctx.fillRect(110, 210, 80, 80); + ctx.fillRect(110, 310, 80, 80); ctx.filter = new CanvasFilter( {filter: 'dropShadow', dx: true, dy: ['10'], stdDeviation: false, floodColor: 'purple', floodOpacity: ['0.4']}); - ctx.fillRect(210, 210, 80, 80); + ctx.fillRect(210, 310, 80, 80); html_reference: | - <svg width=620 height=320 xmlns="http://www.w3.org/2000/svg"> + <svg xmlns="http://www.w3.org/2000/svg" + width=520 height=420 + color-interpolation-filters="sRGB"> <rect x=0 y=0 width=100% height=50 fill="teal" /> <rect x=0 y=100 width=100% height=50 fill="teal" /> <rect x=0 y=200 width=100% height=50 fill="teal" /> + <rect x=0 y=300 width=100% height=50 fill="teal" /> <rect x=10 y=10 width=80 height=80 fill="crimson" - style="filter: drop-shadow(2px 2px 2px black)"/> + filter="drop-shadow(2px 2px 2px black)"/> <rect x=110 y=10 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 5px rgba(128, 0, 128, 0.7))"/> + filter="drop-shadow(9px 12px 5px rgba(128, 0, 128, 0.7))"/> <rect x=10 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(10px 10px 3px purple)"/> + filter="drop-shadow(9px 12px 3px purple)"/> <rect x=110 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 3px LinkText)"/> + filter="drop-shadow(9px 12px 3px LinkText)"/> <rect x=210 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(10px 15px 0px purple)"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 1))"/> <rect x=310 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(9px 12px 3px rgba(20, 50, 130, 1))"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 0.7))"/> <rect x=410 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 3px rgba(20, 50, 130, 0.7))"/> - <rect x=510 y=110 width=80 height=80 fill="crimson" - style="filter: drop-shadow(15px 10px 3px rgba(20, 50, 130, 0.49))"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 0.49))"/> <rect x=10 y=210 width=80 height=80 fill="crimson" - style="filter: drop-shadow(-5px 0px 0px purple)"/> + filter="drop-shadow(9px 12px 0px purple)"/> <rect x=110 y=210 width=80 height=80 fill="crimson" - style="filter: drop-shadow(0px 5px 0px rgba(128, 0, 128, 0.8))"/> + filter="drop-shadow(9px 12px 5px purple)"/> <rect x=210 y=210 width=80 height=80 fill="crimson" - style="filter: drop-shadow(1px 10px 0px rgba(128, 0, 128, 0.4))"/> + filter="drop-shadow(9px 12px 0px purple)"/> + <filter id="separable-filter" + x="-100%" y="-100%" width="300%" height="300%"> + <feDropShadow dx=9 dy=12 stdDeviation="3 5" flood-color="purple"/> + </filter> + <rect x=310 y=210 width=80 height=80 fill="crimson" + filter="url(#separable-filter)"/> + <rect x=410 y=210 width=80 height=80 fill="crimson" + filter="drop-shadow(9px 12px 0px purple)"/> + + <rect x=10 y=310 width=80 height=80 fill="crimson" + filter="drop-shadow(-5px 0px 0px purple)"/> + <filter id="separable-filter-degenerate" + x="-100%" y="-100%" width="300%" height="300%"> + <feDropShadow dx=0 dy=5 stdDeviation="0 3" + flood-color="rgba(128, 0, 128, 0.8)"/> + </filter> + <rect x=110 y=310 width=80 height=80 fill="crimson" + filter="url(#separable-filter-degenerate)"/> + <rect x=210 y=310 width=80 height=80 fill="crimson" + filter="drop-shadow(1px 10px 0px rgba(128, 0, 128, 0.4))"/> </svg> - name: 2d.filter.canvasFilterObject.dropShadow.exceptions.tentative @@ -456,19 +502,31 @@ code: | @unroll @assert new CanvasFilter({\ filter: 'dropShadow', \ - <dx | dy | stdDeviation | floodOpacity>: \ + <dx | dy | floodOpacity>: \ <10 | -1 | 0.5 | null | true | false | [] | [20] | '30'>}); @unroll @assert new CanvasFilter({\ filter: 'dropShadow', \ + <stdDeviation>: \ + <10 | -1 | 0.5 | null | true | false | [] | [20] | '30' | \ + [10, -1] | [0.5, null] | [true, false] | [[], [20]] | \ + ['30', ['40']]>}); + @unroll @assert new CanvasFilter({\ + filter: 'dropShadow', \ <floodColor>: \ <'red' | 'canvas' | 'rgba(4, -3, 0.5, 1)' | '#aabbccdd' | '#abcd'>}); @unroll @assert throws TypeError new CanvasFilter({\ filter: 'dropShadow', \ - <dx | dy | stdDeviation | floodOpacity>: \ + <dx | dy | floodOpacity>: \ <NaN | Infinity | -Infinity | undefined | 'test' | {} | [1, 2]>}); @unroll @assert throws TypeError new CanvasFilter({\ filter: 'dropShadow', \ + <stdDeviation>: \ + <NaN | Infinity | -Infinity | undefined | 'test' | {} | [1, 2, 3] | \ + [1, NaN] | [1, Infinity] | [1, -Infinity] | [1, undefined] | \ + [1, 'test'] | [1, {}] | [1, [2, 3]]>}); + @unroll @assert throws TypeError new CanvasFilter({\ + filter: 'dropShadow', \ <floodColor>: \ <'test' | 'rgba(NaN, 3, 2, 1)' | 10 | undefined | null | NaN>}); diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml index 0ae664d2307..b9bdf3d2bdb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml @@ -563,6 +563,7 @@ setRGBA(imageData.data, 4, testColor); assertArrayEquals(getRGBA(imageData.data, 4), testColor); + @assert throws TypeError ImageData(1, 1); @assert throws TypeError new ImageData(10); @assert throws INDEX_SIZE_ERR new ImageData(0, 10); @assert throws INDEX_SIZE_ERR new ImageData(10, 0); diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-about-blank.https.window.js b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-about-blank.https.window.js new file mode 100644 index 00000000000..d63b69e83f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-about-blank.https.window.js @@ -0,0 +1,37 @@ +// META: script=/common/get-host-info.sub.js +// META: script=/common/utils.js +// META: script=/common/dispatcher/dispatcher.js + +const executor_path = '/common/dispatcher/executor.html?pipe='; +const cross_origin = get_host_info().OTHER_ORIGIN; +const coep_require_corp_header = + '|header(Cross-Origin-Embedder-Policy,require-corp)'; +const corp_cross_origin_header = + '|header(Cross-Origin-Resource-Policy,cross-origin)'; + +promise_test(async t => { + assert_true(crossOriginIsolated, 'Is main frame crossOriginIsolated?'); + + const reply_token = token(); + const iframe_token = token(); + + const iframe = document.createElement('iframe'); + iframe.src = cross_origin + executor_path + coep_require_corp_header + + corp_cross_origin_header + `&uuid=${iframe_token}`; + document.body.appendChild(iframe); + + send(iframe_token, `send('${reply_token}', 'Iframe loaded');`); + assert_equals(await receive(reply_token), 'Iframe loaded'); + + send(iframe_token, ` + window.popup = window.open(); + send('${reply_token}', popup === null); + `); + assert_equals(await receive(reply_token), 'false', 'Is popup handle null?'); + + send( + iframe_token, + `send('${reply_token}', popup.window.crossOriginIsolated);`); + assert_equals( + await receive(reply_token), 'false', 'Is popup crossOriginIsolated?'); +}); diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-about-blank.https.window.js.headers b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-about-blank.https.window.js.headers new file mode 100644 index 00000000000..19d0dbe4e18 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/iframe-popup-about-blank.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: restrict-properties +Cross-Origin-Embedder-Policy: require-corp diff --git a/tests/wpt/web-platform-tests/html/dom/aria-element-reflection-disconnected.html b/tests/wpt/web-platform-tests/html/dom/aria-element-reflection-disconnected.html index 7bc1052d94d..d3acc35e9fb 100644 --- a/tests/wpt/web-platform-tests/html/dom/aria-element-reflection-disconnected.html +++ b/tests/wpt/web-platform-tests/html/dom/aria-element-reflection-disconnected.html @@ -5,31 +5,78 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<div id=container> +<div id=single_element> <input aria-activedescendant=foo> <p id=foo></p> </div> +<div id=array> + <input aria-describedby="foo1 foo2"> + <div id=targets> + <p id=foo1></p> + <p id=foo2></p> + </div> +</div> + <script> - test(() => { - const container = document.getElementById('container'); + function isIterable(obj) { + if (obj === null) + return false; + return typeof obj[Symbol.iterator] === 'function'; + } + function toSet(elementOrList) { + if (!isIterable(elementOrList)) { + return new Set([elementOrList]); + } + return new Set(elementOrList); + } + function assert_equal_elements(arr1, arr2, msg) { + msg = msg || "Arrays not equal"; + arr1 = toSet(arr1); + arr2 = toSet(arr2); + assert_true(arr1.size === arr2.size && + [...arr1].every((x) => arr2.has(x)), msg); + } + function single_test(container, targets, contentAttr, idlAttr, isSingleTarget) { + // Start with idref-based reference: const el = container.querySelector('input'); - const target = container.querySelector('#foo'); - assert_equals(el.ariaActiveDescendantElement,target); + assert_true(el.getAttribute(contentAttr) != null && el.getAttribute(contentAttr) != '','Should start with idref attribute'); + assert_equal_elements(el[idlAttr],targets); container.remove(); - assert_equals(el.ariaActiveDescendantElement,null,'idrefs should stop working when target is disconnected'); - assert_equals(el.getAttribute('aria-activedescendant'),'foo','Attribute value is still ok'); + assert_equal_elements(el[idlAttr],targets,'idrefs should continue to work when target is disconnected'); document.body.appendChild(container); - assert_equals(el.ariaActiveDescendantElement,target,'functional when reconnected'); + assert_equal_elements(el[idlAttr],targets,'functional when reconnected'); + // Now set up an attr-associated element: - el.ariaActiveDescendantElement = target; - assert_equals(el.ariaActiveDescendantElement,target); - assert_equals(el.getAttribute('aria-activedescendant'),'','Content attribute is present but empty'); + el[idlAttr] = isSingleTarget ? targets[0] : targets; + assert_equal_elements(el[idlAttr],targets); + assert_equals(el.getAttribute(contentAttr),'','Content attribute is present but empty'); container.remove(); - assert_equals(el.ariaActiveDescendantElement,target,'attr-associated element still functional'); - assert_equals(el.getAttribute('aria-activedescendant'),'','Attribute still blank'); + assert_equal_elements(el[idlAttr],targets,'attr-associated element still functional'); + assert_equals(el.getAttribute(contentAttr),'','Attribute still blank'); document.body.appendChild(container); - assert_equals(el.ariaActiveDescendantElement,target,'still functional when reconnected'); - },'Element references should stay valid when content is disconnected'); + assert_equal_elements(el[idlAttr],targets,'still functional when reconnected'); + + // Sanity check: + el.removeAttribute(contentAttr); + assert_equal_elements(el[idlAttr],null); + assert_equals(el.getAttribute(contentAttr),null); + container.remove(); + assert_equal_elements(el[idlAttr],null); + assert_equals(el.getAttribute(contentAttr),null); + document.body.appendChild(container); + } + + test(() => { + const container = document.getElementById('single_element'); + const targets = [container.querySelector('#foo')]; + single_test(container, targets, 'aria-activedescendant', 'ariaActiveDescendantElement', true); + },'Element references should stay valid when content is disconnected (single element)'); + + test(() => { + const container = document.getElementById('array'); + const targets = Array.from(container.querySelector('#targets').children); + single_test(container, targets, 'aria-describedby', 'ariaDescribedByElements', false); + },'Element references should stay valid when content is disconnected (element array)'); </script> diff --git a/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/the-anchor-attribute-001.tentative.html b/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/the-anchor-attribute-001.tentative.html new file mode 100644 index 00000000000..c9faa6908ab --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/the-anchor-attribute-001.tentative.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/whatwg/html/pull/9144"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<style> +body { + margin: 0; +} +#anchor { + width: 100px; + height: 100px; + margin-left: 50px; + margin-top: 50px; + background: orange; +} +#target { + position: absolute; + left: anchor(right); + top: anchor(top); + width: 100px; + height: 100px; + background: lime; +} +</style> +<div id="anchor"></div> +<div id="target" anchor="anchor"></div> + +<script> +test(() => { + assert_equals(target.offsetLeft, 150); + assert_equals(target.offsetTop, 50); +}, 'The anchor attribute should position the target element next to its implicit anchor'); + +test(() => { + assert_equals(target.anchorElement, anchor); +}, 'The element.anchorElement IDL should reflect the element pointed to by the anchor attribute'); +</script> diff --git a/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/the-anchor-attribute-002.tentative.html b/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/the-anchor-attribute-002.tentative.html new file mode 100644 index 00000000000..a1a237a2ee2 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/the-anchor-attribute-002.tentative.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/whatwg/html/pull/9144"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<style> +body { + margin: 0; +} +.anchor { + width: 100px; + height: 100px; + margin-left: 50px; + margin-top: 50px; + background: orange; +} +.target { + position: absolute; + left: anchor(right, 123px); + top: anchor(top, 456px); + width: 100px; + height: 100px; + background: lime; +} +</style> +<div class="anchor" id="anchor1"></div> +<div class="anchor" id="anchor2"></div> +<div class="target" id="target1" anchor="anchor1"></div> +<div class="target" id="target2" anchor="anchor1"></div> + +<script> +test(() => { + document.body.offsetLeft; // Force layout + target1.setAttribute('anchor', 'anchor2'); + assert_equals(target1.offsetLeft, 150); + assert_equals(target1.offsetTop, 200); + + target1.setAttribute('anchor', 'anchor1'); + assert_equals(target1.offsetLeft, 150); + assert_equals(target1.offsetTop, 50); +}, 'Layout should be updated when anchor attribute changes to another element'); + +test(() => { + document.body.offsetLeft; // Force layout + target2.setAttribute('anchor', 'nonexist-anchor'); + assert_equals(target2.offsetLeft, 123); + assert_equals(target2.offsetTop, 456); +}, 'Layout should be updated when anchor attribute changes to a non-existent element'); +</script> diff --git a/tests/wpt/web-platform-tests/html/rendering/widgets/input-date-baseline-min-height-ref.html b/tests/wpt/web-platform-tests/html/rendering/widgets/input-date-baseline-min-height-ref.html new file mode 100644 index 00000000000..249076a5b7b --- /dev/null +++ b/tests/wpt/web-platform-tests/html/rendering/widgets/input-date-baseline-min-height-ref.html @@ -0,0 +1,6 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Test Reference</title> +<div> + abc <input type=date style="height: 40px"> def +</div> diff --git a/tests/wpt/web-platform-tests/html/rendering/widgets/input-date-baseline-min-height.html b/tests/wpt/web-platform-tests/html/rendering/widgets/input-date-baseline-min-height.html new file mode 100644 index 00000000000..86b552ab809 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/rendering/widgets/input-date-baseline-min-height.html @@ -0,0 +1,10 @@ +<!doctype html> +<meta charset="utf-8"> +<title>date input baseline should account for min-height</title> +<link rel="match" href="input-date-baseline-min-height-ref.html"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1825709"> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<div> + abc <input type=date style="min-height: 40px"> def +</div> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/FormDataEvent.window.js b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/FormDataEvent.window.js index 830d536a663..4890fd86239 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/FormDataEvent.window.js +++ b/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/FormDataEvent.window.js @@ -2,6 +2,7 @@ test(() => { let fd = new FormData(); + assert_throws_js(TypeError, () => { FormDataEvent('', {formData:fd}) }, "Calling FormDataEvent constructor without 'new' must throw"); assert_throws_js(TypeError, () => { new FormDataEvent() }, '0 arguments'); assert_throws_js(TypeError, () => { new FormDataEvent('foo') }, '1 argument'); assert_throws_js(TypeError, () => { new FormDataEvent(fd, fd) }, '2 invalid arguments'); diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-overlay-re-add-during-transition.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-overlay-re-add-during-transition.html new file mode 100644 index 00000000000..30d104a973a --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-overlay-re-add-during-transition.html @@ -0,0 +1,32 @@ +<!doctype html> +<html class="reftest-wait"> +<title>dialog: close and re-add modal dialog during overlay transition</title> +<link rel="help" href="https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element"> +<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay"> +<link rel="match" href="pass-dialog-ref.html"> +<script src="/common/reftest-wait.js"></script> +<dialog id="dialog1">PASS</dialog> +<dialog id="dialog2">FAIL</dialog> +<style> + dialog::backdrop { background-color: black; } + #dialog1 { + transition-property: overlay, display; + transition-duration: 100s; + } +</style> +<script> + const dialog1 = document.getElementById("dialog1"); + const dialog2 = document.getElementById("dialog2"); + + dialog1.showModal(); + dialog2.showModal(); + dialog1.close(); + requestAnimationFrame(() => + requestAnimationFrame(() => { + // dialog1 no longer "in top layer" even if rendered in top-layer, should + // be added as last top layer element. + dialog1.showModal(); + takeScreenshot(); + }) + ); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html new file mode 100644 index 00000000000..a366f61a355 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html @@ -0,0 +1,37 @@ +<!doctype html> +<title>dialog: overlay</title> +<link rel="help" href="https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element"> +<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<dialog id="dialog"></dialog> +<script> + const dialog = document.getElementById("dialog"); + + test(() => { + assert_equals(getComputedStyle(dialog).overlay, "none", + "Computed overlay"); + // dialog::backdrop {} UA rule always sets overlay to 'auto' even if + // ::backdrop pseudo is not generated. ::backdrop is only generated when the + // dialog is in the top layer. + assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "auto", + "Computed overlay for ::backdrop"); + }, "dialog computed overlay initially 'none'"); + + test(() => { + dialog.showModal(); + + assert_equals(getComputedStyle(dialog).overlay, "auto", + "Computed overlay on open dialog"); + assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "auto", + "Computed overlay for ::backdrop"); + + dialog.close(); + + assert_equals(getComputedStyle(dialog).overlay, "none", + "Computed overlay on closed dialog"); + // ::backdrop is always overlay:auto. See comment above. + assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "auto", + "Computed overlay for ::backdrop"); + }, "Opening and closing a modal dialog changes computed overlay to 'auto' and back to 'none'"); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/pass-dialog-ref.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/pass-dialog-ref.html new file mode 100644 index 00000000000..6f1a8fde211 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/pass-dialog-ref.html @@ -0,0 +1,9 @@ +<!doctype html> +<title>CSS Test Reference</title> +<style> + dialog::backdrop { background-color: black; } +</style> +<dialog id="dialog">PASS</dialog> +<script> + dialog.showModal(); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-invoker-reset.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-invoker-reset.html new file mode 100644 index 00000000000..4b1ac6b588f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-invoker-reset.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" href="mailto:masonf@chromium.org"> +<link rel=help href="https://open-ui.org/components/popup.research.explainer"> +<link rel=help href="https://github.com/whatwg/html/issues/9152"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/popover-utils.js"></script> + +<div id=p1 popover>Popover 1 + <button popovertarget=p2>Button</button> +</div> +<div id=p2 popover>Popover 2</div> + +<script> + test((t) => { + p1.showPopover(); + assert_true(p1.matches(':popover-open')); + const invoker = p1.querySelector('button'); + p2.addEventListener('beforetoggle',(e) => { + assert_equals(e.newState,'open'); + e.preventDefault(); + },{once:true}); + invoker.click(); // Will be cancelled + assert_false(p2.matches(':popover-open')); + assert_true(p1.matches(':popover-open')); + p2.showPopover(); + assert_true(p2.matches(':popover-open')); + assert_false(p1.matches(':popover-open'),'invoker was not used to show p2, so p1 should close'); + },'Invoker gets reset appropriately'); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html index 0cb13979407..0ac73ec4549 100644 --- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html @@ -298,11 +298,10 @@ assert_false(popover3.matches(':popover-open')); popover3.showPopover(); assert_true(popover3.matches(':popover-open')); - assert_true(popover5.matches(':popover-open')); - popover5.hidePopover(); + assert_false(popover5.matches(':popover-open'),'Popover 5 was not invoked from popover3\'s invoker'); + popover3.hidePopover(); assert_false(popover3.matches(':popover-open')); - assert_false(popover5.matches(':popover-open')); - },'An invoking element that was not used to invoke the popover can still be part of the ancestor chain'); + },'An invoking element that was not used to invoke the popover is not part of the ancestor chain'); </script> <div popover id=p6>Inside popover 6 @@ -537,3 +536,40 @@ promise_test(async () => { assert_false(p15.matches(':popover-open')); },'Hide the target popover during "hide all popovers until"'); </script> + +<div id=p16 popover>Popover 16 + <div id=p17 popover>Popover 17</div> + <div id=p18 popover>Popover 18</div> +</div> + +<script> +promise_test(async () => { + p16.showPopover(); + p18.showPopover(); + p18.addEventListener('beforetoggle', (e) => { + if (e.newState === "closed") + p17.showPopover(); + },{once:true}); + p16.hidePopover(); + assert_false(p16.matches(':popover-open')); + assert_false(p17.matches(':popover-open')); + assert_false(p18.matches(':popover-open')); +},'Show a sibling popover during "hide all popovers until"'); +</script> + +<div id=p19 popover>Popover 19</div> +<div id=p20 popover>Popover 20</div> +<button id=example2>Example 2</button> + +<script> +promise_test(async () => { + p19.showPopover(); + p19.addEventListener('beforetoggle', (e) => { + if (e.newState === "closed") + p20.showPopover(); + },{once:true}); + p19.hidePopover(); + assert_false(p19.matches(':popover-open')); + assert_true(p20.matches(':popover-open')); +},'Show an unrelated popover during "hide popover"'); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-move-documents.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-move-documents.html new file mode 100644 index 00000000000..2ead18a2b73 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-move-documents.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/whatwg/html/issues/9177"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<iframe id=myframe srcdoc="<p>iframe</p>"></iframe> +<div id=p1 popover=auto>p1</div> +<script> +test(() => { + p1.addEventListener('beforetoggle', () => { + myframe.contentWindow.document.body.appendChild(p1); + }); + assert_throws_dom('InvalidStateError', () => p1.showPopover()); +}, 'Moving popovers between documents while showing should throw an exception.'); +</script> + +<iframe id=myframe2 srcdoc="<p>iframe</p>"></iframe> +<div id=p2 popover=auto>p2</div> +<script> +test(() => { + const p2 = document.getElementById('p2'); + p2.showPopover(); + p2.addEventListener('beforetoggle', () => { + myframe2.contentWindow.document.body.appendChild(p2); + }); + assert_true(p2.matches(':popover-open'), + 'The popover should be open after calling showPopover()'); + + p2.hidePopover(); + assert_false(p2.matches(':popover-open'), + 'The popover should be closed after moving it between documents.'); +}, 'Moving popovers between documents while hiding should not throw an exception.'); +</script> + +<iframe id=myframe3 srcdoc="<p>iframe</p>"></iframe> +<div id=p3 popover=auto> + p3 + <div id=p4 popover=auto>p4</div> + <div id=p5 popover=auto>p5</div> +</div> +<script> +test(() => { + p3.showPopover(); + p4.showPopover(); + p4.addEventListener('beforetoggle', event => { + if (event.newState === 'closed') { + assert_true(p3.matches(':popover-open'), + 'p3 should be showing in the event handler.'); + assert_true(p4.matches(':popover-open'), + 'p4 should be showing in the event handler.'); + assert_equals(event.target, p4, + 'The events target should be p4.'); + myframe3.contentWindow.document.body.appendChild(p5); + } + }); + assert_true(p3.matches(':popover-open'), + 'p3 should be open after calling showPopover on it.'); + assert_true(p4.matches(':popover-open'), + 'p4 should be open after calling showPopover on it.'); + + const p5 = document.getElementById('p5'); + assert_throws_dom('InvalidStateError', () => p5.showPopover()); + assert_false(p5.matches(':popover-open'), + 'p5 should be closed after moving it between documents.'); +}, 'Moving popovers between documents during light dismiss should throw an exception.'); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-overlay.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-overlay.html new file mode 100644 index 00000000000..a607844aee4 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-overlay.html @@ -0,0 +1,51 @@ +<!doctype html> +<title>popover: overlay</title> +<link rel="help" href="https://html.spec.whatwg.org/multipage/popover.html#the-popover-attribute"> +<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<dialog popover id="popover-show-dialog"></dialog> +<dialog popover id="popover-show-modal-dialog"></dialog> +<dialog popover id="popover-dialog"></dialog> +<div popover id="popover-div"></div> +<script> + test(() => { + const popover_show_dialog = document.getElementById("popover-show-dialog"); + assert_equals(getComputedStyle(popover_show_dialog).overlay, "none", + "Computed overlay"); + popover_show_dialog.show(); + assert_equals(getComputedStyle(popover_show_dialog).overlay, "none", + "Computed overlay after show()"); + popover_show_dialog.close(); + }, "dialog.show() should not put popover dialog in top layer"); + + test(() => { + const popover_show_modal_dialog = document.getElementById("popover-show-modal-dialog"); + assert_equals(getComputedStyle(popover_show_modal_dialog).overlay, "none", + "Computed overlay"); + popover_show_modal_dialog.showModal(); + assert_equals(getComputedStyle(popover_show_modal_dialog).overlay, "auto", + "Computed overlay after showModal()"); + popover_show_modal_dialog.close(); + }, "dialog.showModal() should put popover dialog in top layer"); + + test(() => { + const popover_dialog = document.getElementById("popover-dialog"); + assert_equals(getComputedStyle(popover_dialog).overlay, "none", + "Computed overlay"); + popover_dialog.showPopover(); + assert_equals(getComputedStyle(popover_dialog).overlay, "auto", + "Computed overlay after showPopover()"); + popover_dialog.hidePopover(); + }, "dialog.showPopover() should put popover dialog in top layer"); + + test(() => { + const popover_div = document.getElementById("popover-div"); + assert_equals(getComputedStyle(popover_div).overlay, "none", + "Computed overlay"); + popover_div.showPopover(); + assert_equals(getComputedStyle(popover_div).overlay, "auto", + "Computed overlay after showPopover()"); + popover_div.hidePopover(); + }, "div.showPopover() should put popover div in top layer"); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-shadow-dom.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-shadow-dom.html index 9279a121bea..87293f1e3d5 100644 --- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-shadow-dom.html +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-shadow-dom.html @@ -187,7 +187,7 @@ polyfill_declarative_shadow_dom(test5); const [popover1,popover2] = getPopoverReferences('test5'); popover1.showPopover(); - popover2.showPopover(); + popover1.querySelector('button').click(); // Use invoker to keep 2 visible // Both 1 and 2 should be open at this point. assert_true(popover1.matches(':popover-open'), 'popover1 not open'); assert_true(isElementVisible(popover1)); diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-target-element-disabled.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-target-element-disabled.html index bf1f2971484..d5c951768c0 100644 --- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-target-element-disabled.html +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-target-element-disabled.html @@ -11,6 +11,10 @@ <script> test(() => { outerpopover.showPopover(); + outerpopover.querySelector('button').click(); // Invoke innerpopover + assert_false(innerpopover.matches(':popover-open'), + 'disabled button shouldn\'t open the target popover'); + assert_true(outerpopover.matches(':popover-open')); innerpopover.showPopover(); assert_true(innerpopover.matches(':popover-open'), 'The inner popover should be able to open successfully.'); @@ -26,39 +30,18 @@ test(() => { <script> test(() => { outerpopover2.showPopover(); - innerpopover2.showPopover(); + outerpopover2.querySelector('button').click(); // Invoke innerpopover assert_true(innerpopover2.matches(':popover-open'), 'The inner popover should be able to open successfully.'); assert_true(outerpopover2.matches(':popover-open'), 'The outer popover should stay open when opening the inner one.'); togglebutton2.disabled = true; - assert_false(innerpopover2.matches(':popover-open'), - 'The inner popover should be closed when the hierarchy is broken.'); - assert_false(outerpopover2.matches(':popover-open'), - 'The outer popover should be closed when the hierarchy is broken.'); -}, 'Disabling popover*target buttons when popovers are open should still cause all popovers to be closed when the formerly outer popover is closed.'); -</script> - -<div id=outerpopover3 popover=auto> - <button id=togglebutton3 popovertarget=innerpopover3>toggle popover</button> -</div> -<div id=innerpopover3 popover=auto>popover</div> -<script> -test(() => { - outerpopover3.showPopover(); - innerpopover3.showPopover(); - assert_true(innerpopover3.matches(':popover-open'), - 'The inner popover should be able to open successfully.'); - assert_true(outerpopover3.matches(':popover-open'), - 'The outer popover should stay open when opening the inner one.'); - - togglebutton3.disabled = true; - assert_false(innerpopover3.matches(':popover-open'), - 'The inner popover be should be closed when the hierarchy is broken.'); - assert_false(outerpopover3.matches(':popover-open'), - 'The outer popover be should be closed when the hierarchy is broken.'); -}, 'Disabling popover*target buttons when popovers are open should still cause all popovers to be closed when the formerly inner popover is closed.'); + assert_true(innerpopover2.matches(':popover-open'), + 'Changing disabled states after popovers are open shouldn\'t close anything'); + assert_true(outerpopover2.matches(':popover-open'), + 'Changing disabled states after popovers are open shouldn\'t close anything'); +}, 'Disabling popover*target buttons when popovers are open should not cause popovers to be closed.'); </script> <div id=outerpopover4 popover=auto> @@ -69,18 +52,18 @@ test(() => { <script> test(() => { outerpopover4.showPopover(); - innerpopover4.showPopover(); + outerpopover4.querySelector('button').click(); // Invoke innerpopover assert_true(innerpopover4.matches(':popover-open'), 'The inner popover should be able to open successfully.'); assert_true(outerpopover4.matches(':popover-open'), 'The outer popover should stay open when opening the inner one.'); togglebutton4.setAttribute('form', 'submitform'); - assert_false(innerpopover4.matches(':popover-open'), - 'The inner popover be should be closed when the hierarchy is broken.'); - assert_false(outerpopover4.matches(':popover-open'), - 'The outer popover be should be closed when the hierarchy is broken.'); -}, 'Setting the form attribute on popover*target buttons when popovers are open should close all popovers.'); + assert_true(innerpopover4.matches(':popover-open'), + 'The inner popover be should be not closed when invoking buttons cease to be invokers.'); + assert_true(outerpopover4.matches(':popover-open'), + 'The outer popover be should be not closed when invoking buttons cease to be invokers.'); +}, 'Setting the form attribute on popover*target buttons when popovers are open should not close them.'); </script> <div id=outerpopover5 popover=auto> @@ -90,18 +73,18 @@ test(() => { <script> test(() => { outerpopover5.showPopover(); - innerpopover5.showPopover(); + outerpopover5.querySelector('input').click(); // Invoke innerpopover assert_true(innerpopover5.matches(':popover-open'), 'The inner popover should be able to open successfully.'); assert_true(outerpopover5.matches(':popover-open'), 'The outer popover should stay open when opening the inner one.'); togglebutton5.setAttribute('type', 'text'); - assert_false(innerpopover5.matches(':popover-open'), - 'The inner popover be should be closed when the hierarchy is broken.'); - assert_false(outerpopover5.matches(':popover-open'), - 'The outer popover be should be closed when the hierarchy is broken.'); -}, 'Changing the input type on a popover*target button when popovers are open should close all popovers.'); + assert_true(innerpopover5.matches(':popover-open'), + 'The inner popover be should be not closed when invoking buttons cease to be invokers.'); + assert_true(outerpopover5.matches(':popover-open'), + 'The outer popover be should be not closed when invoking buttons cease to be invokers.'); +}, 'Changing the input type on a popover*target button when popovers are open should not close anything.'); </script> <div id=outerpopover6 popover=auto> @@ -111,18 +94,18 @@ test(() => { <script> test(() => { outerpopover6.showPopover(); - innerpopover6.showPopover(); + outerpopover6.querySelector('button').click(); // Invoke innerpopover assert_true(innerpopover6.matches(':popover-open'), 'The inner popover should be able to open successfully.'); assert_true(outerpopover6.matches(':popover-open'), 'The outer popover should stay open when opening the inner one.'); togglebutton6.remove(); - assert_false(innerpopover6.matches(':popover-open'), - 'The inner popover be should be closed when the hierarchy is broken.'); - assert_false(outerpopover6.matches(':popover-open'), - 'The outer popover be should be closed when the hierarchy is broken.'); -}, 'Disconnecting popover*target buttons when popovers are open should close all popovers.'); + assert_true(innerpopover6.matches(':popover-open'), + 'The inner popover be should be not closed when invoking buttons are removed.'); + assert_true(outerpopover6.matches(':popover-open'), + 'The outer popover be should be not closed when invoking buttons are removed.'); +}, 'Disconnecting popover*target buttons when popovers are open should not close anything.'); </script> <div id=outerpopover7 popover=auto> @@ -132,18 +115,18 @@ test(() => { <script> test(() => { outerpopover7.showPopover(); - innerpopover7.showPopover(); + outerpopover7.querySelector('button').click(); // Invoke innerpopover assert_true(innerpopover7.matches(':popover-open'), 'The inner popover should be able to open successfully.'); assert_true(outerpopover7.matches(':popover-open'), 'The outer popover should stay open when opening the inner one.'); togglebutton7.setAttribute('popovertarget', 'otherpopover7'); - assert_false(innerpopover7.matches(':popover-open'), - 'The inner popover be should be closed when the hierarchy is broken.'); - assert_false(outerpopover7.matches(':popover-open'), - 'The outer popover be should be closed when the hierarchy is broken.'); -}, 'Changing the popovertarget attribute to break the chain should close all popovers.'); + assert_true(innerpopover7.matches(':popover-open'), + 'The inner popover be should be not closed when invoking buttons are retargeted.'); + assert_true(outerpopover7.matches(':popover-open'), + 'The outer popover be should be not closed when invoking buttons are retargeted.'); +}, 'Changing the popovertarget attribute to break the chain should not close anything.'); </script> <div id=outerpopover8 popover=auto> diff --git a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html index ef558861802..2d62019dbf1 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html +++ b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https.html @@ -5,6 +5,14 @@ <script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script> <script> test(function() { + assert_throws_js( + TypeError, + () => MessageEvent(""), + "Calling MessageEvent constructor without 'new' must throw" + ); +}, "MessageEvent constructor called as normal function"); + +test(function() { var ev = new MessageEvent("test") assert_equals(ev.type, "test", "type attribute") assert_equals(ev.target, null, "target attribute") diff --git a/tests/wpt/web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html b/tests/wpt/web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html index 91652790917..4319deee7b5 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html +++ b/tests/wpt/web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html @@ -9,6 +9,12 @@ test(function() { var p = new Promise(function(resolve, reject) {}); + assert_throws_js(TypeError, + function() { + PromiseRejectionEvent('', { promise: p }); + }, + "Calling PromiseRejectionEvent constructor without 'new' must throw"); + // No custom options are passed (besides required promise). assert_equals(new PromiseRejectionEvent('eventType', { promise: p }).bubbles, false); assert_equals(new PromiseRejectionEvent('eventType', { promise: p }).cancelable, false); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/element-only-when-fully-active.html b/tests/wpt/web-platform-tests/largest-contentful-paint/element-only-when-fully-active.html index 41bdc8f8b98..519b249196a 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/element-only-when-fully-active.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/element-only-when-fully-active.html @@ -6,6 +6,7 @@ <script src="/resources/testharnessreport.js"></script> <iframe src="resources/iframe-stores-entry.html" id="ifr"></iframe> <script> + setup({"hide_test_state": true}); let t = async_test('Only expose element attribute for fully active documents'); window.triggerTest = t.step_func_done(entry => { assert_not_equals(entry.element, null); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/expanded-image.html b/tests/wpt/web-platform-tests/largest-contentful-paint/expanded-image.html index 55adff91f2f..90f803930c1 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/expanded-image.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/expanded-image.html @@ -12,6 +12,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/largest-contentful-paint-helpers.js"></script> <script> + setup({"hide_test_state": true}); async_test(function (t) { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/first-letter-background.html b/tests/wpt/web-platform-tests/largest-contentful-paint/first-letter-background.html index d2abd5d9c37..56ac1056770 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/first-letter-background.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/first-letter-background.html @@ -14,6 +14,7 @@ div { <script src="/resources/testharnessreport.js"></script> <script src="resources/largest-contentful-paint-helpers.js"></script> <script> + setup({"hide_test_state": true}); async_test(function (t) { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeLoad = performance.now(); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/first-paint-equals-lcp-text.html b/tests/wpt/web-platform-tests/largest-contentful-paint/first-paint-equals-lcp-text.html index 97eb67e320e..50bccd072e2 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/first-paint-equals-lcp-text.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/first-paint-equals-lcp-text.html @@ -5,6 +5,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> + setup({"hide_test_state": true}); async_test(function (t) { assert_implements(window.PerformancePaintTiming, "PerformancePaintTiming is not implemented"); assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); @@ -27,9 +28,14 @@ assert_equals(entry.entryType, 'largest-contentful-paint'); largestContentfulPaintTime = entry.renderTime; } - if (firstPaintTime && firstContentfulPaintTime && largestContentfulPaintTime) { - assert_less_than_equal(firstPaintTime, firstContentfulPaintTime, 'FP should be less than or equal to FCP.'); + // LCP fires necessarily after first-paint and first-contentful-paint. + if (largestContentfulPaintTime) { assert_equals(firstContentfulPaintTime, largestContentfulPaintTime, 'FCP should equal LCP.'); + // In PaintTiming spec, first-paint isn't a hard requirement, browsers can support + // first-contentful-paint only. + if (firstPaintTime) { + assert_less_than_equal(firstPaintTime, firstContentfulPaintTime, 'FP should be less than or equal to FCP.'); + } t.done(); } }); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-TAO.sub.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-TAO.sub.html index 8b7d99e4716..296fe5e65b8 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-TAO.sub.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-TAO.sub.html @@ -7,6 +7,7 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <div id='my_div'></div> <script> + setup({"hide_test_state": true}); async_test(t => { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const remote_img = 'http://{{domains[www]}}:{{ports[http][1]}}/element-timing/resources/TAOImage.py?' diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-full-viewport.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-full-viewport.html index 7da6c5c3dc9..e67e21a17c7 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-full-viewport.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-full-viewport.html @@ -15,6 +15,7 @@ body { <script> const viewportWidth = document.documentElement.clientWidth; const viewportHeight = document.documentElement.clientHeight; + setup({"hide_test_state": true}); async_test(function (t) { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-inside-svg.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-inside-svg.html index ce96574609a..77e42fcc6d0 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-inside-svg.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-inside-svg.html @@ -5,6 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/largest-contentful-paint-helpers.js"></script> <script> +setup({"hide_test_state": true}); async_test(function (t) { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-not-fully-visible.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-not-fully-visible.html index 8990fd14c07..1aee495fe19 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-not-fully-visible.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-not-fully-visible.html @@ -14,6 +14,7 @@ body { <script src="/resources/testharnessreport.js"></script> <script src="resources/largest-contentful-paint-helpers.js"></script> <script> + setup({"hide_test_state": true}); let beforeRender; const viewportWidth = document.documentElement.clientWidth; const viewportHeight = document.documentElement.clientHeight; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-removed-before-load.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-removed-before-load.html index b4e92b4e9a5..3e557a4fdc7 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-removed-before-load.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-removed-before-load.html @@ -8,6 +8,7 @@ <img id="target"/> <img id="target2"/> <script> + setup({"hide_test_state": true}); const numInitial = 100; const sleep = 1000; const small_img_src = '/images/green-16x16.png'; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-src-change.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-src-change.html index f35d8030257..e0701a2169b 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-src-change.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-src-change.html @@ -7,6 +7,7 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <img src='/images/black-rectangle.png' id='image_id'/> <script> + setup({"hide_test_state": true}); async_test(function (t) { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeLoad = performance.now(); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-upscaling.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-upscaling.html index 5cb3767ca7d..b3ce16f03f9 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-upscaling.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-upscaling.html @@ -7,12 +7,13 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <script src="/common/utils.js"></script> <script> + setup({"hide_test_state": true}); setup(() => assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented")); const imageURL = `${window.location.origin}/images/blue.png`; async function load_image_and_get_lcp_size(t, imageStyle = {}, containerStyle = {}) { - const popup = window.open('about:blank'); + const popup = window.open(); t.add_cleanup(() => popup.close()); const image = popup.document.createElement('img'); image.src = imageURL; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/initially-invisible-images.html b/tests/wpt/web-platform-tests/largest-contentful-paint/initially-invisible-images.html index d0bede67614..b4d68a5cb92 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/initially-invisible-images.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/initially-invisible-images.html @@ -24,6 +24,7 @@ </div> <script> // Spin the carousel +setup({"hide_test_state": true}); const images = document.querySelectorAll('img'); let selected = 0; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/invisible-images-composited-1.html b/tests/wpt/web-platform-tests/largest-contentful-paint/invisible-images-composited-1.html index 7723d2f2bea..6b33c425b7d 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/invisible-images-composited-1.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/invisible-images-composited-1.html @@ -20,6 +20,9 @@ will-change: opacity; } </style> +<script> +setup({"hide_test_state": true}); +</script> <img src='/images/blue.png' class='opacity0 willChangeTransform' id='opacity0-willChangeTransform'/> <img src='/images/green.png' class='visibilityHidden willChangeTransform' id='visibilityHidden'/> <img src='/images/red.png' class='displayNone willChangeTransform' id='displayNone'/> diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/loadTime-after-appendChild.html b/tests/wpt/web-platform-tests/largest-contentful-paint/loadTime-after-appendChild.html index 2d19e73e60f..52d8f0663b6 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/loadTime-after-appendChild.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/loadTime-after-appendChild.html @@ -6,6 +6,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/largest-contentful-paint-helpers.js"></script> <script> + setup({"hide_test_state": true}); async_test(function (t) { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeLoad; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/multiple-redirects-TAO.html b/tests/wpt/web-platform-tests/largest-contentful-paint/multiple-redirects-TAO.html index 50130eebb2f..b9745176bd2 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/multiple-redirects-TAO.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/multiple-redirects-TAO.html @@ -11,6 +11,7 @@ <img id='image'></img> <body> <script> +setup({"hide_test_state": true}); async_test(t => { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let destUrl = get_host_info().HTTP_REMOTE_ORIGIN diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/observe-css-generated-text.html b/tests/wpt/web-platform-tests/largest-contentful-paint/observe-css-generated-text.html index d4f10fb6bab..21ae68585ba 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/observe-css-generated-text.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/observe-css-generated-text.html @@ -20,6 +20,7 @@ </style> <body> <script> + setup({"hide_test_state": true}); const checkText = (entry, expectedSize, expectedID, beforeRender) => { assert_equals(entry.entryType, 'largest-contentful-paint', 'Entry should be of type largest-contentful-paint'); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/redirects-tao-star.html b/tests/wpt/web-platform-tests/largest-contentful-paint/redirects-tao-star.html index f01c2496c06..5607ed792e8 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/redirects-tao-star.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/redirects-tao-star.html @@ -10,6 +10,7 @@ </head> <body> <script> +setup({"hide_test_state": true}); async_test(t => { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let destUrl = get_host_info().HTTP_REMOTE_ORIGIN diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/repeated-image.html b/tests/wpt/web-platform-tests/largest-contentful-paint/repeated-image.html index a28409a848c..c69cc5b615b 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/repeated-image.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/repeated-image.html @@ -12,6 +12,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/largest-contentful-paint-helpers.js"></script> <script> + setup({"hide_test_state": true}); async_test(function (t) { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeLoad = performance.now(); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/video-poster.html b/tests/wpt/web-platform-tests/largest-contentful-paint/video-poster.html index b3a29188630..fdc691819bd 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/video-poster.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/video-poster.html @@ -5,6 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/largest-contentful-paint-helpers.js"></script> <script> +setup({"hide_test_state": true}); async_test(function (t) { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); diff --git a/tests/wpt/web-platform-tests/lint.ignore b/tests/wpt/web-platform-tests/lint.ignore index 056bbd0c230..862a2ba050b 100644 --- a/tests/wpt/web-platform-tests/lint.ignore +++ b/tests/wpt/web-platform-tests/lint.ignore @@ -161,6 +161,7 @@ SET TIMEOUT: encrypted-media/polyfill/clearkey-polyfill.js SET TIMEOUT: encrypted-media/scripts/playback-temporary-events.js SET TIMEOUT: fetch/metadata/resources/helper.sub.js SET TIMEOUT: fetch/metadata/resources/message-opener.html +SET TIMEOUT: fenced-frame/resources/utils.js SET TIMEOUT: focus/support/iframe-focus-with-different-site-intermediate-frame-outer.sub.html SET TIMEOUT: focus/support/iframe-focus-with-different-site-intermediate-frame-middle.sub.html SET TIMEOUT: focus/support/iframe-contentwindow-focus-with-different-site-intermediate-frame-outer.sub.html @@ -452,7 +453,9 @@ INDENT TABS: css/WOFF2/* CONSOLE: css/css-shapes/shape-outside/supported-shapes/support/test-utils.js CONSOLE: css/css-values/viewport-units-css2-001.html CONSOLE: css/css-writing-modes/orthogonal-parent-shrink-to-fit-001*.html -CONSOLE: css/css-writing-modes/tools/generators/gulpfile.js +CONSOLE: css/css-writing-modes/tools/generators/template.html +CONSOLE: bluetooth/characteristic/readValue/characteristic-is-removed.https.window.js +CONSOLE: bluetooth/resources/bluetooth-test.js TRAILING WHITESPACE: css/css-fonts/support/fonts/gsubtest-lookup3.ufo/features.fea @@ -492,6 +495,7 @@ SET TIMEOUT: css/css-writing-modes/orthogonal-parent-shrink-to-fit-001v.html SET TIMEOUT: css/css-writing-modes/orthogonal-parent-shrink-to-fit-001w.html SET TIMEOUT: css/css-writing-modes/orthogonal-parent-shrink-to-fit-001x.html SET TIMEOUT: css/css-writing-modes/support/text-orientation.js +SET TIMEOUT: css/css-writing-modes/tools/generators/template.html SET TIMEOUT: css/CSS2/backgrounds/background-root-101.xht SET TIMEOUT: css/CSS2/backgrounds/background-root-102.xht SET TIMEOUT: css/CSS2/backgrounds/background-root-103.xht diff --git a/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html b/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html index daa47efb679..9d98d1abcca 100644 --- a/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html +++ b/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html @@ -18,7 +18,7 @@ test(function() { assert_array_equals( document.featurePolicy.getAllowlistForFeature('fullscreen').sort(), - ["https://%2A.%2A.{{domains[]}}:{{ports[https][0]}}", "https://example.%2A.{{domains[]}}:{{ports[https][0]}}", "https://{{domains[]}}:{{ports[https][0]}}"].sort()); + ["https://*.example.com", "https://{{domains[]}}:{{ports[https][0]}}"].sort()); }, header_policy + ' -- test allowlist lists all the malformed wildcards and self.'); // Test that fullscreen is allowed on same-origin subframes with or without an allow attribute. diff --git a/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html.sub.headers b/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html.sub.headers index cfb0f3f5aee..d9facde69e0 100644 --- a/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html.sub.headers +++ b/tests/wpt/web-platform-tests/permissions-policy/permissions-policy-header-policy-allowed-for-malformed-wildcard.https.sub.html.sub.headers @@ -1 +1 @@ -Permissions-Policy: fullscreen=("*://{{domains[]}}:{{ports[https][0]}}" "https://{{domains[]}}:*" "https://*.*.{{domains[]}}:{{ports[https][0]}}" "https://example.*.{{domains[]}}:{{ports[https][0]}}" self) +Permissions-Policy: fullscreen=("*://{{domains[]}}:{{ports[https][0]}}" "https://{{domains[]}}:*" "https://*.*.{{domains[]}}:{{ports[https][0]}}" "https://example.*.{{domains[]}}:{{ports[https][0]}}" "https://*.example.com" self) diff --git a/tests/wpt/web-platform-tests/preload/prefetch-headers.html b/tests/wpt/web-platform-tests/preload/prefetch-headers.https.html index 0a475c7d773..0a475c7d773 100644 --- a/tests/wpt/web-platform-tests/preload/prefetch-headers.html +++ b/tests/wpt/web-platform-tests/preload/prefetch-headers.https.html diff --git a/tests/wpt/web-platform-tests/preload/prefetch-types.html b/tests/wpt/web-platform-tests/preload/prefetch-types.https.html index 276439e5440..276439e5440 100644 --- a/tests/wpt/web-platform-tests/preload/prefetch-types.html +++ b/tests/wpt/web-platform-tests/preload/prefetch-types.https.html diff --git a/tests/wpt/web-platform-tests/resources/chromium/mock-pressure-service.js b/tests/wpt/web-platform-tests/resources/chromium/mock-pressure-service.js index 21811ed52da..02d10f856ae 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/mock-pressure-service.js +++ b/tests/wpt/web-platform-tests/resources/chromium/mock-pressure-service.js @@ -1,5 +1,5 @@ import {PressureManager, PressureManagerReceiver, PressureStatus} from '/gen/services/device/public/mojom/pressure_manager.mojom.m.js' -import {PressureFactor, PressureSource, PressureState} from '/gen/services/device/public/mojom/pressure_update.mojom.m.js' +import {PressureSource, PressureState} from '/gen/services/device/public/mojom/pressure_update.mojom.m.js' class MockPressureService { constructor() { @@ -15,10 +15,6 @@ class MockPressureService { ['nominal', PressureState.kNominal], ['fair', PressureState.kFair], ['serious', PressureState.kSerious], ['critical', PressureState.kCritical] ]); - this.mojomFactorType_ = new Map([ - ['thermal', PressureFactor.kThermal], - ['power-supply', PressureFactor.kPowerSupply] - ]); this.pressureServiceReadingTimerId_ = null; } @@ -109,26 +105,16 @@ class MockPressureService { return this.updatesDelivered_; } - setPressureUpdate(source, state, factors) { + setPressureUpdate(source, state) { if (!this.mojomSourceType_.has(source)) throw new Error(`PressureSource '${source}' is invalid`); if (!this.mojomStateType_.has(state)) throw new Error(`PressureState '${state}' is invalid`); - let pressureFactors = []; - if (Array.isArray(factors)) { - for (const factor of factors) { - if (!this.mojomFactorType_.has(factor)) - throw new Error(`PressureFactor '${factor}' is invalid`); - pressureFactors.push(this.mojomFactorType_.get(factor)); - } - } - this.pressureUpdate_ = { source: this.mojomSourceType_.get(source), state: this.mojomStateType_.get(state), - factors: pressureFactors, }; } diff --git a/tests/wpt/web-platform-tests/screen-wake-lock/chrome-bug-1348019.https.html b/tests/wpt/web-platform-tests/screen-wake-lock/chrome-bug-1348019.https.html new file mode 100644 index 00000000000..7c9909581ca --- /dev/null +++ b/tests/wpt/web-platform-tests/screen-wake-lock/chrome-bug-1348019.https.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<link rel="author" href="mailto:caseq@chromium.org"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1348019"> +<title>Releasing wake locks upon visibility change does not cause crash if an iframe is appended in event listener</title> +<body> +<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="/page-visibility/resources/window_state_context.js"></script> +<script> +'use strict'; + +promise_test(async t => { + await test_driver.set_permission({ name: 'screen-wake-lock' }, 'granted'); + const { minimize } = window_state_context(t); + + const screenLock = await navigator.wakeLock.request('screen'); + + assert_false(screenLock.released, "The released attribute is initially false"); + + screenLock.addEventListener('release', () => { + const iframe = document.createElement('iframe'); + iframe.src = 'about:blank'; + document.body.appendChild(iframe); + }); + + const release = new EventWatcher(t, screenLock, 'release').wait_for('release'); + await Promise.all([minimize(), release]); + assert_true(screenLock.released, "The released attribute is true after the lock is released"); +}, "Appending iframe in release event listener does not cause a crash when page visibility changes"); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html index 32cb89c4ef8..54a6257f343 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html @@ -135,11 +135,11 @@ await waitForNextFrame(); assert_equals(getComputedStyle(element).width, '120px'); element.getAnimations()[0].timeline = null; - assert_equals(getComputedStyle(element).width, '0px'); + assert_equals(getComputedStyle(element).width, '120px'); // Changing the animation-timeline property should have no effect. element.style = 'animation-timeline:timeline2'; - assert_equals(getComputedStyle(element).width, '0px'); + assert_equals(getComputedStyle(element).width, '120px'); }, 'animation-timeline ignored after setting timeline with JS (null)'); </script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-named-scroll-progress-timeline.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-named-scroll-progress-timeline.tentative.html index 30461723386..ed2c32d31e9 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-named-scroll-progress-timeline.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-named-scroll-progress-timeline.tentative.html @@ -7,6 +7,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/web-animations/testcommon.js"></script> <script src="support/testcommon.js"></script> +<script src="/scroll-animations/scroll-timelines/testcommon.js"></script> <style> @keyframes anim { from { translate: 50px; } @@ -318,17 +319,24 @@ promise_test(async t => { await waitForCSSScrollTimelineStyle(); assert_equals(getComputedStyle(target).translate, '100px'); + const anim = target.getAnimations()[0]; + assert_percents_equal(anim.startTime, 0); + assert_percents_equal(anim.currentTime, 50); // This effectively removes the CSS-created ScrollTimeline on this element, // thus invoking "setting the timeline of an animation" [1] with a null- - // timeline on affected elements. This in turn causes the current time to - // become unresolved [2], ultimately resulting in no effect value. - // - // [1] https://drafts.csswg.org/web-animations-1/#setting-the-timeline - // [2] https://drafts.csswg.org/web-animations-1/#the-current-time-of-an-animation + // timeline on affected elements. This in turn runs the procedure to set the + // current time to previous progress * end time. Ultimately, this sets the + // hold time of the animation. + + // [1] https://www.w3.org/TR/web-animations-2/#setting-the-timeline + // [2] https://www.w3.org/TR/web-animations-2/ + // #setting-the-current-time-of-an-animation scroller.remove(); await waitForNextFrame(); - assert_equals(getComputedStyle(target).translate, 'none'); + assert_equals(getComputedStyle(target).translate, '100px'); + assert_equals(anim.startTime, null); + assert_times_equal(anim.currentTime, 5000); }, 'scroll-timeline-name on removed element affects subsequent siblings'); promise_test(async t => { @@ -371,13 +379,19 @@ promise_test(async t => { await waitForCSSScrollTimelineStyle(); assert_equals(getComputedStyle(target).translate, '100px'); + const anim = target.getAnimations()[0]; + assert_percents_equal(anim.startTime, 0); + assert_percents_equal(anim.currentTime, 50); // See comment in the test "scroll-timeline-name on removed element ..." for // an explantation of this result. (Setting display:none is similar to // removing the element). scroller.style.display = 'none'; await waitForNextFrame(); - assert_equals(getComputedStyle(target).translate, 'none'); + assert_equals(getComputedStyle(target).translate, '100px'); + assert_equals(anim.startTime, null); + assert_times_equal(anim.currentTime, 5000); + }, 'scroll-timeline-name on element becoming display:none affects subsequent siblings'); promise_test(async t => { @@ -461,13 +475,16 @@ promise_test(async t => { assert_true(!!anim, 'Failed to create animation'); assert_true(!!anim.timeline, 'Failed to create timeline'); assert_equals(getComputedStyle(target).translate, '100px'); + assert_percents_equal(anim.startTime, 0); + assert_percents_equal(anim.currentTime, 50); scroller.style.scrollTimelineName = 'timeline-B'; await waitForNextFrame(); assert_equals(anim.timeline, null, 'Failed to remove timeline'); - assert_equals(getComputedStyle(target).translate, 'none'); - + assert_equals(getComputedStyle(target).translate, '100px'); + assert_equals(anim.startTime, null); + assert_times_equal(anim.currentTime, 5000); }, 'Change in scroll-timeline-name to no longer match animation timeline updates animation.'); promise_test(async t => { diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-update-ref.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-update-ref.html new file mode 100644 index 00000000000..7e375a1df7f --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-update-ref.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1"> +<title>Reference file for various tests that update an animation with a scroll timeline</title> +<script src="/web-animations/testcommon.js"></script> +</head> +<style type="text/css"> + #scroller { + border: 1px solid black; + overflow: hidden; + width: 300px; + height: 200px; + } + #target { + margin-bottom: 800px; + margin-top: 800px; + margin-left: 10px; + margin-right: 10px; + width: 100px; + height: 100px; + z-index: -1; + background-color: green; + } +</style> +<body> + <div id="scroller"> + <div id="target"></div> + </div> +</body> +<script type="text/javascript"> + document.documentElement.addEventListener('TestRendered', async () => { + runTest(); + }, { once: true }); + + async function runTest() { + // Defaults to exit 60% if using a view timeline with subject = target. + const DEFAULT_SCROLL_POS = 860; + await waitForCompositorReady(); + + const urlParams = new URLSearchParams(window.location.search); + target.style.transform = + `translateX(${urlParams.get('translate') || "0px"}`; + + scroller.scrollTop = urlParams.get('scroll') || DEFAULT_SCROLL_POS; + await waitForNextFrame(); + await waitForNextFrame(); + + // Make sure change to animation range was properly picked up. + document.documentElement.classList.remove("reftest-wait"); + } +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment.html index 78ca2574373..96033859e29 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment.html @@ -294,3 +294,105 @@ assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); }, 'Dynamically detaching'); </script> + +<template id=scroll_timeline_ancestor_attached_removed> + <div class="timeline defer"> + <div class=target>Test</div> + <div class="scroller timeline ancestor"> + <div class=content></div> + </div> + </div> +</template> +<script> + promise_test(async (t) => { + inflate(t, scroll_timeline_ancestor_attached_removed); + let scroller = main.querySelector('.scroller'); + let target = main.querySelector('.target'); + await scrollTop(scroller, 350); // 50% + assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% + + let scroller_parent = scroller.parentElement; + scroller.remove(); + await waitForNextFrame(); + assert_equals(getComputedStyle(target).width, '0px'); + assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); + + scroller_parent.append(scroller); + await scrollTop(scroller, 350); // 50% + assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% + }, 'Removing/inserting ancestor attached element'); +</script> + +<template id=scroll_timeline_ancestor_attached_display_none> + <div class="timeline defer"> + <div class=target>Test</div> + <div class="scroller timeline ancestor"> + <div class=content></div> + </div> + </div> +</template> +<script> + promise_test(async (t) => { + inflate(t, scroll_timeline_ancestor_attached_display_none); + let scroller = main.querySelector('.scroller'); + let target = main.querySelector('.target'); + await scrollTop(scroller, 350); // 50% + assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% + + scroller.style.display = 'none'; + await waitForNextFrame(); + assert_equals(getComputedStyle(target).width, '0px'); + assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); + + scroller.style.display = 'block'; + await scrollTop(scroller, 350); // 50% + assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% + }, 'Ancestor attached element becoming display:none/block'); +</script> + +<template id=scroll_timeline_dynamic_defer> + <style> + .inner-scroller { + overflow-y: hidden; + width: 50px; + height: 50px; + } + .inner-scroller > .content { + margin: 100px 0px; + width: 20px; + height: 20px; + background-color: red; + } + </style> + <div class="scroller timeline"> + <div class="target content"> + <div class="inner-scroller timeline ancestor"> + <div class=content></div> + </div> + </div> + </div> +</template> +<script> + promise_test(async (t) => { + inflate(t, scroll_timeline_dynamic_defer); + let target = main.querySelector('.target'); + let outer_scroller = main.querySelector('.scroller'); + let inner_scroller = main.querySelector('.inner-scroller'); + + await scrollTop(outer_scroller, 350); // 50% + await scrollTop(inner_scroller, 17); // 10% + + // Attached to outer_scroller (local). + assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% + + // Effectively attached to inner_scroller. + outer_scroller.classList.add('defer'); + await waitForNextFrame(); + assert_equals(getComputedStyle(target).width, '20px'); // 0px => 200px, 10% + + // Attached to outer_scroller again. + outer_scroller.classList.remove('defer'); + await waitForNextFrame(); + assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% + }, 'Dynamically becoming a deferred timeline'); +</script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-dynamic.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-dynamic.tentative.html index b0880a7cc5a..0d951e7b139 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-dynamic.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-dynamic.tentative.html @@ -159,6 +159,10 @@ // DocumentTimeline applies by default. await assert_width(element, '100px'); + // Wait for the animation to be ready so that we a start time and no hold + // time. + await element.getAnimations()[0].ready; + // DocumentTimeline -> none element.style.animationTimeline = 'none'; await assert_width(element, '0px'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-nearest-with-absolute-positioned-element.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-nearest-with-absolute-positioned-element.html new file mode 100644 index 00000000000..7fe2d12be30 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-nearest-with-absolute-positioned-element.html @@ -0,0 +1,79 @@ +<!DOCTYPE html> +<title>The animation-timeline: scroll-timeline-name</title> +<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/rewrite#scroll-timelines-named"> +<link rel="help" src="https://github.com/w3c/csswg-drafts/issues/6674"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="support/testcommon.js"></script> +<style> + @keyframes grow-progress { + to { width: 300px; } + } + + .scrollcontainer { + overflow-x: scroll; + display: flex; + flex-direction: row; + scroll-timeline: timeline inline; + } + + .progress { + position: absolute; + z-index: 10; + left: 0; + top: 0; + width: 100px; + height: 1em; + background: red; + animation: auto grow-progress linear forwards; + animation-timeline: scroll(inline nearest); + } + + .entry { + min-height: 90vh; + min-width: 100vw; + } + + .entry:nth-child(even) { + background-color: #eee; + } + + .entry:nth-child(odd) { + background-color: #ddd; + } +</style> +<body> + <div class = "scrollcontainer" id = "scroller"> + <div class = "progress" id = "target"></div> + <div class = "entry"></div> + <div class = "entry"></div> + <div class = "entry"></div> + </div> +</body> +<script> +"use strict"; + +setup(assert_implements_animation_timeline); + +promise_test(async t => { + const maxScroll = scroller.scrollWidth - scroller.clientWidth; + scroller.scrollLeft = maxScroll; + + // Advance to next frame so that scroll-timeline has a valid time. + await waitForNextFrame(); + + // Flex container is not position relative and therefore not the container for + // the progress element. + assert_equals(getComputedStyle(target).width, "100px"); + + // Once the scroller is position relative, it becomes the container block for + // the progress element. + scroller.style.position = 'relative'; + await waitForNextFrame(); + + assert_equals(getComputedStyle(target).width, "300px"); +}, 'Resolving scroll(nearest) for an absolutely positioned element'); + +</script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-update-reversed-animation.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-update-reversed-animation.html new file mode 100644 index 00000000000..93ad6916ea7 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-update-reversed-animation.html @@ -0,0 +1,69 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1"> +<title>Attach a scroll timeline to a reversed animation refTest</title> +<link rel="help" src="https://www.w3.org/TR/scroll-animations-1/#scroll-timeline-name"> +<link rel="match" href="./animation-update-ref.html?translate=55px&scroll=825"> +<script src="/web-animations/testcommon.js"></script> +</head> +<style type="text/css"> + @keyframes anim { + from { transform: translateX(100px) } + to { transform: translateX(0px) } + } + #scroller { + border: 1px solid black; + overflow: hidden; + width: 300px; + height: 200px; + scroll-timeline: timeline; + } + #target { + margin-bottom: 800px; + margin-top: 800px; + margin-left: 10px; + margin-right: 10px; + width: 100px; + height: 100px; + z-index: -1; + background-color: green; + animation: anim 10s linear paused; + } + #target.update { + animation-play-state: running; + animation-timeline: timeline; + animation-duration: auto; + } +</style> +<body> + <div id="scroller"> + <div id="target"></div> + </div> +</body> +<script type="text/javascript"> + document.documentElement.addEventListener('TestRendered', async () => { + runTest(); + }, { once: true }); + + async function runTest() { + await waitForCompositorReady(); + + const anim = target.getAnimations()[0]; + anim.playbackRate = -1; + await anim.ready; + + // Scroll to 55% of maximum scroll while paused. + scroller.scrollTop = 825; + await waitForNextFrame(); + + target.classList.add('update'); + await waitForNextFrame(); + + // Make sure change to animation range was properly picked up. + document.documentElement.classList.remove("reftest-wait"); + } +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment.html index 47f4444b0dc..ff98ed78258 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment.html @@ -41,12 +41,6 @@ animation: anim auto linear; animation-timeline: t1; } - /* - .defer { - view-timeline-name: t1; - view-timeline-attachment: defer; - } - */ .timeline { view-timeline-name: t1; } @@ -305,6 +299,107 @@ }, 'Dynamically detaching'); </script> +<template id=view_timeline_ancestor_attached_removed> + <div class="timeline defer"> + <div class=target>Test</div> + <div class=scroller> + <div class="content timeline ancestor"></div> + </div> + </div> +</template> +<script> + promise_test(async (t) => { + inflate(t, view_timeline_ancestor_attached_removed); + let scroller = main.querySelector('.scroller'); + let target = main.querySelector('.target'); + let content = main.querySelector('.content'); + await scrollTop(scroller, 350); // 50% + assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% + + content.remove(); + await waitForNextFrame(); + assert_equals(getComputedStyle(target).width, '0px'); + assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); + + scroller.append(content); + await scrollTop(scroller, 350); // 50% + assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% + }, 'Removing/inserting ancestor attached element'); +</script> + +<template id=view_timeline_ancestor_attached_display_none> + <div class="timeline defer"> + <div class=target>Test</div> + <div class=scroller> + <div class="content timeline ancestor"></div> + </div> + </div> +</template> +<script> + promise_test(async (t) => { + inflate(t, view_timeline_ancestor_attached_display_none); + let scroller = main.querySelector('.scroller'); + let target = main.querySelector('.target'); + let content = main.querySelector('.content'); + await scrollTop(scroller, 350); // 50% + assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% + + content.style.display = 'none'; + await waitForNextFrame(); + assert_equals(getComputedStyle(target).width, '0px'); + assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); + + content.style.display = 'block'; + await scrollTop(scroller, 350); // 50% + assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% + }, 'Ancestor attached element becoming display:none/block'); +</script> + +<template id=view_timeline_dynamic_defer> + <style> + .inner-content { + margin: 100px 0px; + width: 20px; + height: 50px; + background-color: red; + } + </style> + <div class="scroller"> + <div class="content timeline"> + <div class="target"> + <div class="inner-content timeline ancestor"></div> + </div> + </div> + </div> +</template> +<script> + promise_test(async (t) => { + inflate(t, view_timeline_dynamic_defer); + let target = main.querySelector('.target'); + let scroller = main.querySelector('.scroller'); + let outer = main.querySelector('.content'); + let inner = main.querySelector('.inner-content'); + + // Outer view timeline range: [200, 500] + // Inner view timeline range: [200, 450] + + await scrollTop(scroller, 275); // 25% (outer), 30% (inner) + + // Attached to outer_view timeline (local). + assert_equals(getComputedStyle(target).width, '50px'); // 0px => 200px, 25% + + // Effectively attached to inner. + outer.classList.add('defer'); + await waitForNextFrame(); + assert_equals(getComputedStyle(target).width, '60px'); // 0px => 200px, 30% + + // Attached to outer_scroller again. + outer.classList.remove('defer'); + await waitForNextFrame(); + assert_equals(getComputedStyle(target).width, '50px'); // 0px => 200px, 25% + }, 'Dynamically becoming a deferred timeline'); +</script> + <!-- ViewTimelines and ScrollTimelines --> <template id=view_scroll_timeline_defer> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-dynamic.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-dynamic.html index 74da8850d46..76a30ad5660 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-dynamic.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-dynamic.html @@ -178,6 +178,10 @@ await scrollTop(scroller, 50); assert_equals(getComputedStyle(target).zIndex, '25'); timeline.style.display = 'none'; - assert_equals(getComputedStyle(target).zIndex, '-1'); + // Animation is held at previous current time. + assert_equals(getComputedStyle(target).zIndex, '25'); + const anim = target.getAnimations()[0]; + assert_equals(anim.startTime, null); + assert_times_equal(anim.currentTime, 250); }, 'Element with view-timeline becoming display:none'); </script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-update-reversed-animation.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-update-reversed-animation.html new file mode 100644 index 00000000000..c7199161607 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-update-reversed-animation.html @@ -0,0 +1,69 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1"> +<title>Update timeline range on reversed animation refTest</title> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#named-timeline-range"> +<link rel="match" href="./animation-update-ref.html?translate=60px"> +<script src="/web-animations/testcommon.js"></script> +</head> +<style type="text/css"> + @keyframes anim { + from { transform: translateX(100px) } + to { transform: translateX(0px) } + } + #scroller { + border: 1px solid black; + overflow: hidden; + width: 300px; + height: 200px; + } + #target { + margin-bottom: 800px; + margin-top: 800px; + margin-left: 10px; + margin-right: 10px; + width: 100px; + height: 100px; + z-index: -1; + background-color: green; + animation: anim auto linear; + animation-timeline: timeline; + view-timeline: timeline; + } + #target.exit-range { + animation-range-start: exit 0%; + animation-range-end: exit 100%; + } +</style> +<body> + <div id="scroller"> + <div id="target"></div> + </div> +</body> +<script type="text/javascript"> + document.documentElement.addEventListener('TestRendered', async () => { + runTest(); + }, { once: true }); + + async function runTest() { + await waitForCompositorReady(); + + const anim = target.getAnimations()[0]; + anim.playbackRate = -1; + + // Scroll to exit 60%. + scroller.scrollTop = 860; + await waitForNextFrame(); + + // Update the animation range. + target.classList.add('exit-range'); + await waitForNextFrame(); + + // Make sure change to animation range was properly picked up. + document.documentElement.classList.remove("reftest-wait"); + } +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-update.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-update.html new file mode 100644 index 00000000000..e8e761d86ba --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-update.html @@ -0,0 +1,68 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1"> +<title>Update timeline range refTest</title> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#named-timeline-range"> +<link rel="match" href="./animation-update-ref.html?translate=40px"> +<script src="/web-animations/testcommon.js"></script> +</head> +<style type="text/css"> + @keyframes anim { + from { transform: translateX(100px) } + to { transform: translateX(0px) } + } + #scroller { + border: 1px solid black; + overflow: hidden; + width: 300px; + height: 200px; + } + #target { + margin-bottom: 800px; + margin-top: 800px; + margin-left: 10px; + margin-right: 10px; + width: 100px; + height: 100px; + z-index: -1; + background-color: green; + animation: anim auto linear; + animation-timeline: timeline; + view-timeline: timeline; + } + #target.exit-range { + animation-range-start: exit 0%; + animation-range-end: exit 100%; + } +</style> +<body> + <div id="scroller"> + <div id="target"></div> + </div> +</body> +<script type="text/javascript"> + document.documentElement.addEventListener('TestRendered', async () => { + runTest(); + }, { once: true }); + + async function runTest() { + await waitForCompositorReady(); + + const anim = target.getAnimations()[0]; + + // Scroll to exit 60%. + scroller.scrollTop = 860; + await waitForNextFrame(); + + // Update the animation range. + target.classList.add('exit-range'); + await waitForNextFrame(); + + // Make sure change to animation range was properly picked up. + document.documentElement.classList.remove("reftest-wait"); + } +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html index 69b40cb6c49..34d9af2bff1 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html @@ -255,12 +255,14 @@ promise_test(async t => { await animation.ready; await updateScrollPosition(scrollTimeline, 100); - assert_equals(animation.playState, 'running'); + const progress = animation.currentTime.value / 100; + const duration = animation.effect.getTiming().duration; animation.timeline = null; - assert_equals(animation.playState, 'running'); + const expectedCurrentTime = progress * duration; + assert_times_equal(animation.currentTime, expectedCurrentTime); }, 'Transitioning from a scroll timeline to a null timeline on a running ' + - 'animation preserves the play state'); + 'animation preserves current progress.'); promise_test(async t => { const keyframeEfect = new KeyframeEffect(createDiv(t), diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html index ecc80aea72a..53330d32f1f 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html @@ -55,16 +55,21 @@ anim.rangeStart = 'contain 0%'; // 700px anim.rangeEnd = 'contain 100%'; // 800px assert_equals(anim.playState, 'running'); + assert_percents_equal(anim.currentTime, 100/6); // Animation in the after phase and switches to the finished state. anim.rangeStart = 'entry 0%'; // 600px anim.rangeEnd = 'entry 100%'; // 700px assert_equals(anim.playState, 'finished'); + // Clamp to effect end when finished. + assert_percents_equal(anim.currentTime, 100/3); // Animation in the before phase and switches back to the running state. anim.rangeStart = 'exit 0%'; // 800px anim.rangeEnd = 'exit 100%'; // 900px assert_equals(anim.playState, 'running'); + assert_percents_equal(anim.currentTime, -100/6); + }, 'Changing the animation range updates the play state'); } diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/partitioned-cookies.tentative.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/partitioned-cookies.tentative.https.html new file mode 100644 index 00000000000..6744edc0eac --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/partitioned-cookies.tentative.https.html @@ -0,0 +1,85 @@ +<!DOCTYPE html> +<head> +<meta charset="utf-8"/> +<meta name="timeout" content="long"> +<title>Service Worker: Partitioned Cookies</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-helpers.sub.js"></script> +<script src="/common/get-host-info.sub.js"></script> +</head> + +<!-- + This test exercises partitioned service workers' interaction with partitioned cookies. + Partitioned service workers should only be able to interact with partitioned cookies whose + partition key matches the worker's partition. +--> + +<body> +<script> + +promise_test(async t => { + const script = './resources/partitioned-cookies-sw.js' + const scope = './resources/partitioned-cookies-' + const absolute_scope = new URL(scope, window.location).href; + + const reg = await service_worker_unregister_and_register(t, script, scope); + await wait_for_state(t, reg.installing, 'activated'); + t.add_cleanup(() => reg.unregister()); + + // on_message will be reassigned below based on the expected reply from the service worker. + let on_message; + self.addEventListener('message', ev => on_message(ev)); + navigator.serviceWorker.addEventListener('message', evt => { + self.postMessage(evt.data, '*'); + }); + + const retrieved_registrations = + await navigator.serviceWorker.getRegistrations(); + // It's possible that other tests have left behind other service workers. + // This steps filters those other SWs out. + const filtered_registrations = + retrieved_registrations.filter(reg => reg.scope == absolute_scope); + + // First test that the worker script started correctly and message passing is enabed. + let resolve_wait_promise; + let wait_promise = new Promise(resolve => { + resolve_wait_promise = resolve; + }); + let got; + on_message = ev => { + got = ev.data; + resolve_wait_promise(); + }; + filtered_registrations[0].active.postMessage({type: 'test_message'}); + await wait_promise; + assert_true(got.ok, 'Message passing'); + + // Set a Partitioned cookie. + document.cookie = '__Host-partitioned=123; Secure; Path=/; SameSite=None; Partitioned;'; + assert_true(document.cookie.includes('__Host-partitioned=123')); + + // Test that the partitioned cookie is available to this worker. + wait_promise = new Promise(resolve => { + resolve_wait_promise = resolve; + }); + on_message = ev => { + got = ev.data; + resolve_wait_promise(); + }; + filtered_registrations[0].active.postMessage({type: 'echo_cookies'}); + await wait_promise; + assert_true(got.ok, 'Get cookies'); + assert_true(got.cookies.includes('__Host-partitioned'), 'Can access partitioned cookie'); + + const popup = window.open( + new URL( + `./resources/partitioned-cookies-3p-window.html?origin=${ + encodeURIComponent(self.location.origin)}`, + get_host_info().HTTPS_NOTSAMESITE_ORIGIN + self.location.pathname)); + await fetch_tests_from_window(popup); +}); + +</script> +</body> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-frame.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-frame.html new file mode 100644 index 00000000000..d3962d2e600 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-frame.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<head> +<meta charset="utf-8"/> +<meta name="timeout" content="long"> +<title>Service Worker: Partitioned Cookies 3P Iframe</title> +<script src="/resources/testharness.js"></script> +<script src="test-helpers.sub.js"></script> +</head> + +<body> +<script> + +promise_test(async t => { + const script = './partitioned-cookies-3p-sw.js'; + const scope = './partitioned-cookies-3p-'; + const absolute_scope = new URL(scope, window.location).href; + + assert_false(document.cookie.includes('__Host-partitioned=123'), 'DOM cannot access partitioned cookie'); + + const reg = await service_worker_unregister_and_register(t, script, scope); + await wait_for_state(t, reg.installing, 'activated'); + + let retrieved_registrations = + await navigator.serviceWorker.getRegistrations(); + let filtered_registrations = + retrieved_registrations.filter(reg => reg.scope == absolute_scope); + + // on_message will be reassigned below based on the expected reply from the service worker. + let on_message; + self.addEventListener('message', ev => on_message(ev)); + navigator.serviceWorker.addEventListener('message', evt => { + self.postMessage(evt.data, '*'); + }); + + // First test that the worker script started correctly and message passing is enabled. + let resolve_wait_promise; + let wait_promise = new Promise(resolve => { + resolve_wait_promise = resolve; + }); + let got; + on_message = ev => { + got = ev.data; + resolve_wait_promise(); + }; + filtered_registrations[0].active.postMessage({type: 'test_message'}); + await wait_promise; + assert_true(got.ok, 'Message passing'); + + // Test that the partitioned cookie is not available to this worker. + wait_promise = new Promise(resolve => { + resolve_wait_promise = resolve; + }); + on_message = ev => { + got = ev.data; + resolve_wait_promise(); + }; + filtered_registrations[0].active.postMessage({type: 'echo_cookies'}); + await wait_promise; + assert_true(got.ok, 'Get cookies'); + assert_false( + got.cookies.includes('__Host-partitioned'), + 'Worker cannot access partitioned cookie'); +}); + +</script> +</body> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-sw.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-sw.js new file mode 100644 index 00000000000..2f54a984b19 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-sw.js @@ -0,0 +1,30 @@ +self.addEventListener('message', ev => ev.waitUntil(onMessage(ev))); + +async function onMessage(event) { + if (!event.data) + return; + switch (event.data.type) { + case 'test_message': + return onTestMessage(event); + case 'echo_cookies': + return onEchoCookies(event); + default: + return; + } +} + +// test_message just verifies that the message passing is working. +async function onTestMessage(event) { + event.source.postMessage({ok: true}); +} + +// echo_cookies returns the names of all of the cookies available to the worker. +async function onEchoCookies(event) { + try { + const cookie_objects = await self.cookieStore.getAll(); + const cookies = cookie_objects.map(c => c.name); + event.source.postMessage({ok: true, cookies}); + } catch (err) { + event.source.postMessage({ok: false}); + } +} diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-window.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-window.html new file mode 100644 index 00000000000..d86a5eb2097 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-window.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<head> +<meta charset="utf-8"/> +<meta name="timeout" content="long"> +<title>Service Worker: Partitioned Cookies 3P Window</title> +<script src="/resources/testharness.js"></script> +</head> + +<body> +<script> + +promise_test(async t => { + assert_true( + location.search.includes('origin='), 'First party origin passed'); + const first_party_origin = decodeURIComponent( + location.search.split('origin=')[1]); + const iframe = document.createElement('iframe'); + iframe.src = new URL( + './partitioned-cookies-3p-frame.html', + first_party_origin + location.pathname).href; + document.body.appendChild(iframe); + fetch_tests_from_window(iframe.contentWindow); +}); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-sw.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-sw.js new file mode 100644 index 00000000000..2f54a984b19 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-sw.js @@ -0,0 +1,30 @@ +self.addEventListener('message', ev => ev.waitUntil(onMessage(ev))); + +async function onMessage(event) { + if (!event.data) + return; + switch (event.data.type) { + case 'test_message': + return onTestMessage(event); + case 'echo_cookies': + return onEchoCookies(event); + default: + return; + } +} + +// test_message just verifies that the message passing is working. +async function onTestMessage(event) { + event.source.postMessage({ok: true}); +} + +// echo_cookies returns the names of all of the cookies available to the worker. +async function onEchoCookies(event) { + try { + const cookie_objects = await self.cookieStore.getAll(); + const cookies = cookie_objects.map(c => c.name); + event.source.postMessage({ok: true, cookies}); + } catch (err) { + event.source.postMessage({ok: false}); + } +} diff --git a/tests/wpt/web-platform-tests/shadow-dom/offsetTop-offsetLeft-across-shadow-boundaries.html b/tests/wpt/web-platform-tests/shadow-dom/offsetTop-offsetLeft-across-shadow-boundaries.html index 6b53c4ec06c..50a85afcbc1 100644 --- a/tests/wpt/web-platform-tests/shadow-dom/offsetTop-offsetLeft-across-shadow-boundaries.html +++ b/tests/wpt/web-platform-tests/shadow-dom/offsetTop-offsetLeft-across-shadow-boundaries.html @@ -2,6 +2,7 @@ <link rel=author href="mailto:jarhar@chromium.org"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="/resources/declarative-shadow-dom-polyfill.js"></script> <style> .box { @@ -80,19 +81,7 @@ </div> <script> -// TODO delete this when all browsers support declarative shadowdom -(function attachShadowRoots(root) { - root.querySelectorAll("template[shadowroot]").forEach(template => { - const mode = template.getAttribute("shadowroot"); - const shadowRoot = template.parentNode.attachShadow({ mode }); - shadowRoot.appendChild(template.content); - template.remove(); - attachShadowRoots(shadowRoot); - }); -})(document); -</script> - -<script> +polyfill_declarative_shadow_dom(document); test(() => { assert_equals(target1.offsetTop, 38); }, 'Verifies that HTMLElement.offsetTop accounts for shadow boundaries.'); diff --git a/tests/wpt/web-platform-tests/svg/types/scripted/svglength-value-access-when-in-detached-document-crash.html b/tests/wpt/web-platform-tests/svg/types/scripted/svglength-value-access-when-in-detached-document-crash.html new file mode 100644 index 00000000000..5bca7a804f6 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/types/scripted/svglength-value-access-when-in-detached-document-crash.html @@ -0,0 +1,11 @@ +<!doctype html> +<title>Attempting to resolve a font-relative (em) SVGLength in a detached document does not crash</title> +<iframe></iframe> +<script> + const rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + rect.setAttribute("height", "16em"); + const iframe = document.querySelector('iframe'); + iframe.contentDocument.documentElement.appendChild(rect); + iframe.remove(); + rect.height.baseVal.value; +</script> diff --git a/tests/wpt/web-platform-tests/tools/ci/jobs.py b/tests/wpt/web-platform-tests/tools/ci/jobs.py index 5b2ef277a96..44de9fe1ad0 100644 --- a/tests/wpt/web-platform-tests/tools/ci/jobs.py +++ b/tests/wpt/web-platform-tests/tools/ci/jobs.py @@ -35,6 +35,7 @@ job_path_map = { "update_built": ["update-built-tests\\.sh", "conformance-checkers/", "css/css-ui/", + "css/css-writing-modes/", "html/", "infrastructure/", "mimesniff/"], diff --git a/tests/wpt/web-platform-tests/tools/ci/requirements_build.txt b/tests/wpt/web-platform-tests/tools/ci/requirements_build.txt index c2137af3156..4216606d3d7 100644 --- a/tests/wpt/web-platform-tests/tools/ci/requirements_build.txt +++ b/tests/wpt/web-platform-tests/tools/ci/requirements_build.txt @@ -1,4 +1,4 @@ -cairocffi==1.5.0 +cairocffi==1.5.1 fonttools==4.39.3 genshi==0.7.7 jinja2==3.1.2 diff --git a/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt b/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt index 64b51841b0c..58a7ef6058e 100644 --- a/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt +++ b/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt @@ -1,4 +1,4 @@ pygithub==1.58.1 pyyaml==6.0 requests==2.28.2 -taskcluster==49.0.0 +taskcluster==49.1.1 diff --git a/tests/wpt/web-platform-tests/tools/ci/update_built.py b/tests/wpt/web-platform-tests/tools/ci/update_built.py index 44b950b0e88..8e0f18589de 100644 --- a/tests/wpt/web-platform-tests/tools/ci/update_built.py +++ b/tests/wpt/web-platform-tests/tools/ci/update_built.py @@ -17,6 +17,7 @@ scripts = { "conformance-checkers/tools/url.py"], "css-images": ["css/css-images/tools/generate_object_view_box_tests.py"], "css-ui": ["css/css-ui/tools/appearance-build-webkit-reftests.py"], + "css-writing-modes": ["css/css-writing-modes/tools/generators/generate.py"], # FIXME: https://github.com/web-platform-tests/wpt/issues/32060 # "css-text": ["css/css-text/line-breaking/tools/generate-segment-break-transformation-rules-tests.py"], # "css-text-decor": ["css/css-text-decor/tools/generate-text-emphasis-line-height-tests.py", diff --git a/tests/wpt/web-platform-tests/tools/manifest/requirements.txt b/tests/wpt/web-platform-tests/tools/manifest/requirements.txt index 0236020bc1f..d7c173723ed 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/requirements.txt +++ b/tests/wpt/web-platform-tests/tools/manifest/requirements.txt @@ -1 +1 @@ -zstandard==0.20.0 +zstandard==0.21.0 diff --git a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt index c95a836e6ab..e56d65b3a6d 100644 --- a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt +++ b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt @@ -7,8 +7,8 @@ types-atomicwrites==1.4.5.1 types-python-dateutil==2.8.19.12 types-PyYAML==6.0.12.9 types-requests==2.28.11.17 -types-setuptools==67.6.0.7 +types-setuptools==67.6.0.8 types-six==1.16.21.8 -types-ujson==5.7.0.1 +types-ujson==5.7.0.3 types-urllib3==1.26.25.10 typing_extensions==4.5.0 diff --git a/tests/wpt/web-platform-tests/tools/requirements_pytest.txt b/tests/wpt/web-platform-tests/tools/requirements_pytest.txt index 78e1ae4d613..0d4be55a0ac 100644 --- a/tests/wpt/web-platform-tests/tools/requirements_pytest.txt +++ b/tests/wpt/web-platform-tests/tools/requirements_pytest.txt @@ -1,3 +1,3 @@ -pytest==7.3.0 +pytest==7.3.1 pytest-cov==4.0.0 -hypothesis==6.71.0 +hypothesis==6.72.0 diff --git a/tests/wpt/web-platform-tests/tools/requirements_tests.txt b/tests/wpt/web-platform-tests/tools/requirements_tests.txt index 9ccaaa0d02a..b404460243e 100644 --- a/tests/wpt/web-platform-tests/tools/requirements_tests.txt +++ b/tests/wpt/web-platform-tests/tools/requirements_tests.txt @@ -2,4 +2,4 @@ httpx[http2]==0.24.0 json-e==4.5.2 jsonschema==4.17.3 pyyaml==6.0 -taskcluster==49.0.0 +taskcluster==49.1.1 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt index bfd21934d99..b7d3524f611 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt @@ -3,7 +3,7 @@ mozdebug==0.3.0 mozinfo==1.2.2 # https://bugzilla.mozilla.org/show_bug.cgi?id=1621226 mozlog==7.1.1 mozprocess==1.3.0 -pillow==9.4.0 +pillow==9.5.0 requests==2.28.2 six==1.16.0 urllib3[secure]==1.26.15 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt index 0b51ee8f463..e8513ccf97a 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt @@ -6,5 +6,5 @@ mozleak==0.2 mozprofile==2.5.0 mozrunner==8.2.1 mozversion==2.3.0 -psutil==5.9.4 +psutil==5.9.5 redo==2.0.4 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_safari.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_safari.txt index 069e31c69e1..bcce11aed80 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_safari.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_safari.txt @@ -1 +1 @@ -psutil==5.9.4 +psutil==5.9.5 diff --git a/tests/wpt/web-platform-tests/trust-tokens/end-to-end/has-trust-token-with-no-top-frame.tentative.https.html b/tests/wpt/web-platform-tests/trust-tokens/end-to-end/has-trust-token-with-no-top-frame.tentative.https.html index 587c641d8dc..a384bec3c26 100644 --- a/tests/wpt/web-platform-tests/trust-tokens/end-to-end/has-trust-token-with-no-top-frame.tentative.https.html +++ b/tests/wpt/web-platform-tests/trust-tokens/end-to-end/has-trust-token-with-no-top-frame.tentative.https.html @@ -15,7 +15,7 @@ frame.remove(); test(() => { - assert_equals(cachedDocument.hasPrivateToken("https://issuer.example", 'private-state-token'), undefined, + assert_equals(cachedDocument.hasPrivateToken("https://issuer.example"), undefined, "Can't construct a Promise in a destroyed execution context."); }, 'hasPrivateToken in a destroyed document.'); </script> diff --git a/tests/wpt/web-platform-tests/webaudio/resources/audit.js b/tests/wpt/web-platform-tests/webaudio/resources/audit.js index ed0078b9c5c..2bb078b1118 100644 --- a/tests/wpt/web-platform-tests/webaudio/resources/audit.js +++ b/tests/wpt/web-platform-tests/webaudio/resources/audit.js @@ -878,8 +878,6 @@ window.Audit = (function() { let absExpected = this._expected ? Math.abs(this._expected) : 1; let error = Math.abs(this._actual - this._expected) / absExpected; - // debugger; - return this._assert( error <= this._options.threshold, '${actual} is ${expected} within an error of ${threshold}.', diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html index 5bbb7304d97..95126a8c867 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-onerror.https.html @@ -1,60 +1,58 @@ <!DOCTYPE html> -<html> - <head> - <title> - Test onprocessorerror handler in AudioWorkletNode - </title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="/webaudio/resources/audit.js"></script> - </head> - <body> - <script id="layout-test-code"> - const audit = Audit.createTaskRunner(); +<title>Test onprocessorerror handler in AudioWorkletNode</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +let context = null; - const filePath = 'processors/error-processor.js'; - const sampleRate = 48000; - const renderLength = sampleRate * 0.1; - const context = new OfflineAudioContext(1, renderLength, sampleRate); +promise_setup(async () => { + const sampleRate = 48000; + const renderLength = sampleRate * 0.1; + context = new OfflineAudioContext(1, renderLength, sampleRate); - // Test |onprocessorerror| called upon failure of processor constructor. - audit.define('constructor-error', (task, should) => { - const constructorErrorWorkletNode = - new AudioWorkletNode(context, 'constructor-error'); - constructorErrorWorkletNode.onprocessorerror = (error) => { - should(error instanceof ErrorEvent, - `onprocessorerror argument should be an ErrorEvent when - the constructor of AudioWorkletProcessor has an error.`) - .beTrue(); + // Loads all processor definitions that are necessary for tests in this file. + await context.audioWorklet.addModule('./processors/error-processor.js'); +}); - // Without 'processorerror' event callback, this test will be - // timed out. - task.done(); - }; - }); +promise_test(async () => { + const constructorErrorWorkletNode = + new AudioWorkletNode(context, 'constructor-error'); + let error = await new Promise(resolve => { + constructorErrorWorkletNode.onprocessorerror = (e) => resolve(e); + }); + assert_true(error instanceof ErrorEvent, + 'onprocessorerror argument should be an ErrorEvent when ' + + 'the constructor of AudioWorkletProcessor has an error.'); +}, 'Test if |onprocessorerror| is called for an exception thrown from the ' + + 'processor constructor.'); - // Test |onprocessorerror| called upon failure of process() method. - audit.define('process-error', (task, should) => { - const processErrorWorkletNode = - new AudioWorkletNode(context, 'process-error'); - processErrorWorkletNode.onprocessorerror = (error) => { - should(error instanceof ErrorEvent, - `onprocessorerror argument should be an ErrorEvent when - the process method of the AudioWorkletProcessor method - has an error.`) - .beTrue(); +promise_test(async () => { + // An arbitrary Blob for testing. This is not deserializable on + // AudioWorkletGlobalScope. + const blob = new Blob([JSON.stringify({ hello: "world"}, null, 2)], { + type: "application/json", + }); + const emptyErrorWorkletNode = + new AudioWorkletNode(context, 'empty-error', {processorOptions: {blob}}); + let error = await new Promise(resolve => { + emptyErrorWorkletNode.onprocessorerror = (e) => resolve(e); + }); + assert_true(error instanceof ErrorEvent, + 'onprocessorerror argument should be an ErrorEvent when ' + + 'the constructor of AudioWorkletProcessor has an error.'); +}, 'Test if |onprocessorerror| is called for a transfered object that cannot ' + + 'be deserialized on the AudioWorkletGlobalScope.'); - // Without 'processorerror' event callback, this test will be - // timed out. - task.done(); - }; - - context.startRendering(); - }); - - // 'error-processor.js' contains 2 class definitions represents an error - // in the constructor and an error in the process method respectively. - context.audioWorklet.addModule(filePath).then(() => audit.run()); - </script> - </body> -</html> +promise_test(async () => { + const processErrorWorkletNode = + new AudioWorkletNode(context, 'process-error'); + let error = await new Promise(resolve => { + processErrorWorkletNode.onprocessorerror = (e) => resolve(e); + // Need to start render to cause an exception in process(). + context.startRendering(); + }); + assert_true(error instanceof ErrorEvent, + 'onprocessorerror argument should be an ErrorEvent when the ' + + 'process method of the AudioWorkletProcessor has an error.'); +}, 'Test if |onprocessorerror| is called upon failure of process() method.'); +</script> diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/error-processor.js b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/error-processor.js index 3b010db4f22..66ff5e2e251 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/error-processor.js +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/processors/error-processor.js @@ -29,5 +29,12 @@ class ProcessErrorProcessor extends AudioWorkletProcessor { } +/** + * @class EmptyErrorProcessor + * @extends AudioWorkletProcessor + */ +class EmptyErrorProcessor extends AudioWorkletProcessor { process() {} } + registerProcessor('constructor-error', ConstructorErrorProcessor); registerProcessor('process-error', ProcessErrorProcessor); +registerProcessor('empty-error', EmptyErrorProcessor); diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html index 9048b7f5dad..fe42f8ad504 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-periodicwave-interface/periodicWave.html @@ -25,7 +25,7 @@ const imagPeak = imag[3]; const imagFundamental = 551.0; - const testLength = 4096; + const testLength = 8192; let context = new AudioContext(); let audit = Audit.createTaskRunner(); @@ -34,9 +34,9 @@ audit.define('create with factory method', (task, should) => { should(() => { - context.createPeriodicWave(new Float32Array(4096), new Float32Array(4096)); - }, 'context.createPeriodicWave(new Float32Array(4096), ' + - 'new Float32Array(4096))').notThrow(); + context.createPeriodicWave(new Float32Array(testLength), new Float32Array(testLength)); + }, 'context.createPeriodicWave(new Float32Array(' + testLength + '), ' + + 'new Float32Array(' + testLength + '))').notThrow(); task.done(); }); @@ -60,16 +60,16 @@ audit.define('create with constructor', (task, should) => { should(() => { - new PeriodicWave(context, { real: new Float32Array(4096), imag: new Float32Array(4096) }); - }, 'new PeriodicWave(context, { real : new Float32Array(4096), ' + - 'imag : new Float32Array(4096) })').notThrow(); + new PeriodicWave(context, { real: new Float32Array(testLength), imag: new Float32Array(testLength) }); + }, 'new PeriodicWave(context, { real : new Float32Array(' + testLength + '), ' + + 'imag : new Float32Array(' + testLength + ') })').notThrow(); task.done(); }); audit.define('different length with constructor', (task, should) => { should(() => { - new PeriodicWave(context, { real: new Float32Array(4096), imag: new Float32Array(4) }); - }, 'new PeriodicWave(context, { real : new Float32Array(4096), ' + + new PeriodicWave(context, { real: new Float32Array(testLength), imag: new Float32Array(4) }); + }, 'new PeriodicWave(context, { real : new Float32Array(' + testLength + '), ' + 'imag : new Float32Array(4) })').throw(DOMException, "IndexSizeError"); task.done(); }); @@ -83,7 +83,7 @@ }); audit.define('output test', (task, should) => { - let context = new OfflineAudioContext(2, 4096, 44100); + let context = new OfflineAudioContext(2, testLength, 44100); // Create the expected output buffer let expectations = context.createBuffer(2, testLength, context.sampleRate); for (var i = 0; i < expectations.length; ++i) { diff --git a/tests/wpt/web-platform-tests/webcodecs/audio-encoder-codec-specific.https.any.js b/tests/wpt/web-platform-tests/webcodecs/audio-encoder-codec-specific.https.any.js new file mode 100644 index 00000000000..28c75d2a606 --- /dev/null +++ b/tests/wpt/web-platform-tests/webcodecs/audio-encoder-codec-specific.https.any.js @@ -0,0 +1,98 @@ +// META: global=window +// META: script=/webcodecs/utils.js + +function make_silent_audio_data(timestamp, channels, sampleRate, frames) { + let data = new Float32Array(frames*channels); + + return new AudioData({ + timestamp: timestamp, + data: data, + numberOfChannels: channels, + numberOfFrames: frames, + sampleRate: sampleRate, + format: "f32-planar", + }); +} + +// The Opus DTX flag (discontinuous transmission) reduces the encoding bitrate +// for silence. This test ensures the DTX flag is working properly by encoding +// almost 10s of silence and comparing the bitrate with and without the flag. +promise_test(async t => { + let sample_rate = 48000; + let total_duration_s = 10; + let data_count = 100; + let normal_outputs = []; + let dtx_outputs = []; + + let normal_encoder = new AudioEncoder({ + error: e => { + assert_unreached('error: ' + e); + }, + output: chunk => { + normal_outputs.push(chunk); + } + }); + + let dtx_encoder = new AudioEncoder({ + error: e => { + assert_unreached('error: ' + e); + }, + output: chunk => { + dtx_outputs.push(chunk); + } + }); + + let config = { + codec: 'opus', + sampleRate: sample_rate, + numberOfChannels: 2, + bitrate: 256000, // 256kbit + }; + + let normal_config = {...config, opus: {usedtx: false}}; + let dtx_config = {...config, opus: {usedtx: true}}; + + let normal_config_support = await AudioEncoder.isConfigSupported(normal_config); + assert_implements_optional(normal_config_support.supported, "Opus not supported"); + + let dtx_config_support = await AudioEncoder.isConfigSupported(dtx_config); + assert_implements_optional(dtx_config_support.supported, "Opus DTX not supported"); + + // Configure one encoder with and one without the DTX flag + normal_encoder.configure(normal_config); + dtx_encoder.configure(dtx_config); + + let timestamp_us = 0; + let data_duration_s = total_duration_s / data_count; + let data_length = data_duration_s * config.sampleRate; + for (let i = 0; i < data_count; i++) { + let data; + + if (i == 0 || i == (data_count - 1)) { + // Send real data for the first and last 100ms. + data = make_audio_data( + timestamp_us, config.numberOfChannels, config.sampleRate, + data_length); + + } else { + // Send silence for the rest of the 10s. + data = make_silent_audio_data( + timestamp_us, config.numberOfChannels, config.sampleRate, + data_length); + } + + normal_encoder.encode(data); + dtx_encoder.encode(data); + data.close(); + + timestamp_us += data_duration_s * 1_000_000; + } + + await Promise.all([normal_encoder.flush(), dtx_encoder.flush()]) + + normal_encoder.close(); + dtx_encoder.close(); + + // We expect a significant reduction in the number of packets, over ~10s of silence. + assert_less_than(dtx_outputs.length, (normal_outputs.length / 2)); +}, 'Test the Opus DTX flag works.'); diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/conftest.py index 21a037a0f77..5bf7ca012bd 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/conftest.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/conftest.py @@ -29,13 +29,15 @@ def fetch(bidi_session, top_context, configuration): # the helper returns. await bidi_session.script.evaluate( expression=f""" - const controller = new AbortController(); - setTimeout(() => controller.abort(), {timeout_in_seconds * 1000}); - fetch("{url}", {{ - {method_arg} - {headers_arg} - signal: controller.signal - }}).then(response => response.text());""", + {{ + const controller = new AbortController(); + setTimeout(() => controller.abort(), {timeout_in_seconds * 1000}); + fetch("{url}", {{ + {method_arg} + {headers_arg} + signal: controller.signal + }}).then(response => response.text()); + }}""", target=ContextTarget(context["context"]), await_promise=True, ) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/add_preload_script/arguments.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/add_preload_script/arguments.py new file mode 100644 index 00000000000..81f90368279 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/add_preload_script/arguments.py @@ -0,0 +1,236 @@ +import pytest +from tests.support.sync import AsyncPoll +from webdriver.bidi.modules.script import ContextTarget + +from ... import any_string, recursive_compare + + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "channel, expected_data", + [ + ( + {"type": "channel", "value": {"channel": "channel_name"}}, + { + "type": "object", + "value": [ + ["foo", {"type": "string", "value": "bar"}], + [ + "baz", + { + "type": "object", + "value": [["1", {"type": "number", "value": 2}]], + }, + ], + ], + }, + ), + ( + { + "type": "channel", + "value": { + "channel": "channel_name", + "serializationOptions": {"maxObjectDepth": 0}, + }, + }, + {"type": "object"}, + ), + ( + { + "type": "channel", + "value": {"channel": "channel_name", "ownership": "root"}, + }, + { + "handle": any_string, + "type": "object", + "value": [ + ["foo", {"type": "string", "value": "bar"}], + [ + "baz", + { + "type": "object", + "value": [["1", {"type": "number", "value": 2}]], + }, + ], + ], + }, + ), + ], + ids=["default", "with serializationOptions", "with ownership"], +) +async def test_channel( + bidi_session, + subscribe_events, + wait_for_event, + add_preload_script, + channel, + expected_data, +): + await subscribe_events(["script.message"]) + + on_script_message = wait_for_event("script.message") + await add_preload_script( + function_declaration="""(channel) => channel({'foo': 'bar', 'baz': {'1': 2}})""", + arguments=[channel], + ) + + new_tab = await bidi_session.browsing_context.create(type_hint="tab") + event_data = await on_script_message + + recursive_compare( + { + "channel": "channel_name", + "data": expected_data, + "source": { + "realm": any_string, + "context": new_tab["context"], + }, + }, + event_data, + ) + + +async def test_channel_with_multiple_arguments( + bidi_session, subscribe_events, wait_for_event, add_preload_script +): + await subscribe_events(["script.message"]) + + on_script_message = wait_for_event("script.message") + await add_preload_script( + function_declaration="""(channel) => channel('will_be_send', 'will_be_ignored')""", + arguments=[{"type": "channel", "value": {"channel": "channel_name"}}], + ) + + new_tab = await bidi_session.browsing_context.create(type_hint="tab") + event_data = await on_script_message + + recursive_compare( + { + "channel": "channel_name", + "data": {"type": "string", "value": "will_be_send"}, + "source": { + "realm": any_string, + "context": new_tab["context"], + }, + }, + event_data, + ) + + +async def test_mutation_observer( + bidi_session, + subscribe_events, + wait_for_event, + new_tab, + inline, + add_preload_script, +): + await subscribe_events(["script.message"]) + + on_script_message = wait_for_event("script.message") + await add_preload_script( + function_declaration="""(channel) => { + const onMutation = (mutationList) => mutationList.forEach(mutation => { + const attributeName = mutation.attributeName; + const newValue = mutation.target.getAttribute(mutation.attributeName); + channel({ attributeName, newValue }); + }); + const observer = new MutationObserver(onMutation); + observer.observe(document, { attributes: true, subtree: true }); + }""", + arguments=[{"type": "channel", "value": {"channel": "channel_name"}}], + ) + + url = inline("<div class='old class name'>foo</div>") + await bidi_session.browsing_context.navigate( + context=new_tab["context"], + url=url, + wait="complete", + ) + + restult = await bidi_session.script.evaluate( + raw_result=True, + expression="document.querySelector('div').setAttribute('class', 'mutated')", + await_promise=True, + target=ContextTarget(new_tab["context"]), + ) + + event_data = await on_script_message + + recursive_compare( + { + "channel": "channel_name", + "data": { + "type": "object", + "value": [ + ["attributeName", {"type": "string", "value": "class"}], + ["newValue", {"type": "string", "value": "mutated"}], + ], + }, + "source": { + "realm": restult["realm"], + "context": new_tab["context"], + }, + }, + event_data, + ) + + +async def test_two_channels( + bidi_session, + subscribe_events, + add_preload_script, +): + await subscribe_events(["script.message"]) + + # Track all received script.message events in the events array + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener("script.message", on_event) + + await add_preload_script( + function_declaration="""(channel_1, channel_2) => { + channel_1('message_from_channel_1'); + channel_2('message_from_channel_2') + }""", + arguments=[ + {"type": "channel", "value": {"channel": "channel_name_1"}}, + {"type": "channel", "value": {"channel": "channel_name_2"}}, + ], + ) + + new_tab = await bidi_session.browsing_context.create(type_hint="tab") + # Wait for both events + wait = AsyncPoll(bidi_session, timeout=0.5) + await wait.until(lambda _: len(events) == 2) + + recursive_compare( + { + "channel": "channel_name_1", + "data": {"type": "string", "value": "message_from_channel_1"}, + "source": { + "realm": any_string, + "context": new_tab["context"], + }, + }, + events[0], + ) + + recursive_compare( + { + "channel": "channel_name_2", + "data": {"type": "string", "value": "message_from_channel_2"}, + "source": { + "realm": any_string, + "context": new_tab["context"], + }, + }, + events[1], + ) + + remove_listener() diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/add_preload_script/invalid.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/add_preload_script/invalid.py index 6a87d5c2fa7..54440ff6780 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/add_preload_script/invalid.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/add_preload_script/invalid.py @@ -5,7 +5,9 @@ pytestmark = pytest.mark.asyncio @pytest.mark.parametrize("function_declaration", [None, False, 42, {}, []]) -async def test_params_function_declaration_invalid_type(bidi_session, function_declaration): +async def test_params_function_declaration_invalid_type( + bidi_session, function_declaration +): with pytest.raises(error.InvalidArgumentException): await bidi_session.script.add_preload_script( function_declaration=function_declaration @@ -21,6 +23,169 @@ async def test_params_arguments_invalid_type(bidi_session, arguments): ) +@pytest.mark.parametrize("argument", [False, "SOME_STRING", 42, {}, []]) +async def test_params_arguments_entry_invalid_type(bidi_session, argument): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[argument], + ) + + +async def test_params_arguments_entry_invalid_value(bidi_session): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[{"type": "foo"}], + ) + + +@pytest.mark.parametrize("value", [None, False, "_UNKNOWN_", 42, []]) +async def test_params_arguments_channel_value_invalid_type(bidi_session, value): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[{"type": "channel", "value": value}], + ) + + +@pytest.mark.parametrize("channel", [None, False, 42, [], {}]) +async def test_params_arguments_channel_id_invalid_type(bidi_session, channel): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[{"type": "channel", "value": {"channel": channel}}], + ) + + +@pytest.mark.parametrize("ownership", [False, 42, {}, []]) +async def test_params_arguments_channel_ownership_invalid_type(bidi_session, ownership): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[{"type": "channel", "value": {"ownership": ownership}}], + ) + + +async def test_params_arguments_channel_ownership_invalid_value(bidi_session): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[{"type": "channel", "value": {"ownership": "_UNKNOWN_"}}], + ) + + +@pytest.mark.parametrize("serialization_options", [False, "_UNKNOWN_", 42, []]) +async def test_params_arguments_channel_serialization_options_invalid_type( + bidi_session, serialization_options +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[ + { + "type": "channel", + "value": {"serializationOptions": serialization_options}, + } + ], + ) + + +@pytest.mark.parametrize("max_dom_depth", [False, "_UNKNOWN_", {}, []]) +async def test_params_arguments_channel_max_dom_depth_invalid_type( + bidi_session, max_dom_depth +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[ + { + "type": "channel", + "value": {"serializationOptions": {"maxDomDepth": max_dom_depth}}, + } + ], + ) + + +async def test_params_arguments_channel_max_dom_depth_invalid_value(bidi_session): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[ + { + "type": "channel", + "value": {"serializationOptions": {"maxDomDepth": -1}}, + } + ], + ) + + +@pytest.mark.parametrize("max_object_depth", [False, "_UNKNOWN_", {}, []]) +async def test_params_arguments_channel_max_object_depth_invalid_type( + bidi_session, max_object_depth +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[ + { + "type": "channel", + "value": { + "serializationOptions": {"maxObjectDepth": max_object_depth} + }, + } + ], + ) + + +async def test_params_arguments_channel_max_object_depth_invalid_value(bidi_session): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[ + { + "type": "channel", + "value": {"serializationOptions": {"maxObjectDepth": -1}}, + } + ], + ) + + +@pytest.mark.parametrize("include_shadow_tree", [False, 42, {}, []]) +async def test_params_arguments_channel_include_shadow_tree_invalid_type( + bidi_session, include_shadow_tree +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[ + { + "type": "channel", + "value": { + "serializationOptions": { + "includeShadowTree": include_shadow_tree + } + }, + } + ], + ) + + +async def test_params_arguments_channel_include_shadow_tree_invalid_value(bidi_session): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + arguments=[ + { + "type": "channel", + "value": { + "serializationOptions": {"includeShadowTree": "_UNKNOWN_"} + }, + } + ], + ) + + @pytest.mark.parametrize("sandbox", [False, 42, {}, []]) async def test_params_sandbox_invalid_type(bidi_session, sandbox): with pytest.raises(error.InvalidArgumentException): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/arguments.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/arguments.py index daf31fc869c..9d2df76a756 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/arguments.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/arguments.py @@ -1,4 +1,5 @@ import pytest +from tests.support.sync import AsyncPoll import webdriver.bidi.error as error from webdriver.bidi.modules.script import ContextTarget @@ -463,3 +464,214 @@ async def test_remote_reference_dom_collection( ) recursive_compare(expected, result) + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "channel, expected_data", + [ + ( + {"type": "channel", "value": {"channel": "channel_name"}}, + { + "type": "object", + "value": [ + ["foo", {"type": "string", "value": "bar"}], + [ + "baz", + { + "type": "object", + "value": [["1", {"type": "number", "value": 2}]], + }, + ], + ], + }, + ), + ( + { + "type": "channel", + "value": { + "channel": "channel_name", + "serializationOptions": { + "maxObjectDepth": 0 + }, + }, + }, + {"type": "object"}, + ), + ( + { + "type": "channel", + "value": {"channel": "channel_name", "ownership": "root"}, + }, + { + "handle": any_string, + "type": "object", + "value": [ + ["foo", {"type": "string", "value": "bar"}], + [ + "baz", + { + "type": "object", + "value": [["1", {"type": "number", "value": 2}]], + }, + ], + ], + }, + ), + ], + ids=["default", "with serializationOptions", "with ownership"], +) +async def test_channel( + bidi_session, top_context, subscribe_events, wait_for_event, channel, expected_data +): + await subscribe_events(["script.message"]) + + on_script_message = wait_for_event("script.message") + result = await bidi_session.script.call_function( + raw_result=True, + function_declaration="""(channel) => channel({'foo': 'bar', 'baz': {'1': 2}})""", + arguments=[channel], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + event_data = await on_script_message + + recursive_compare( + { + "channel": "channel_name", + "data": expected_data, + "source": { + "realm": result["realm"], + "context": top_context["context"], + }, + }, + event_data, + ) + + +@pytest.mark.asyncio +async def test_channel_with_multiple_arguments( + bidi_session, top_context, subscribe_events, wait_for_event +): + await subscribe_events(["script.message"]) + + on_script_message = wait_for_event("script.message") + result = await bidi_session.script.call_function( + raw_result=True, + function_declaration="""(channel) => channel('will_be_send', 'will_be_ignored')""", + arguments=[{"type": "channel", "value": {"channel": "channel_name"}}], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + event_data = await on_script_message + + recursive_compare( + { + "channel": "channel_name", + "data": {"type": "string", "value": "will_be_send"}, + "source": { + "realm": result["realm"], + "context": top_context["context"], + }, + }, + event_data, + ) + + +@pytest.mark.asyncio +async def test_two_channels( + bidi_session, + top_context, + subscribe_events, +): + await subscribe_events(["script.message"]) + + # Track all received script.message events in the events array + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener("script.message", on_event) + + result = await bidi_session.script.call_function( + raw_result=True, + function_declaration="""(channel_1, channel_2) => { + channel_1('message_from_channel_1'); + channel_2('message_from_channel_2') + }""", + arguments=[ + {"type": "channel", "value": {"channel": "channel_name_1"}}, + {"type": "channel", "value": {"channel": "channel_name_2"}}, + ], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + # Wait for both events + wait = AsyncPoll(bidi_session, timeout=0.5) + await wait.until(lambda _: len(events) == 2) + + recursive_compare( + { + "channel": "channel_name_1", + "data": {"type": "string", "value": "message_from_channel_1"}, + "source": { + "realm": result["realm"], + "context": top_context["context"], + }, + }, + events[0], + ) + + recursive_compare( + { + "channel": "channel_name_2", + "data": {"type": "string", "value": "message_from_channel_2"}, + "source": { + "realm": result["realm"], + "context": top_context["context"], + }, + }, + events[1], + ) + + remove_listener() + + +@pytest.mark.asyncio +async def test_channel_and_nonchannel_arguments( + bidi_session, + top_context, + wait_for_event, + subscribe_events, +): + await subscribe_events(["script.message"]) + + on_script_message = wait_for_event("script.message") + result = await bidi_session.script.call_function( + raw_result=True, + function_declaration="""(string, channel) => { + channel(string); + }""", + arguments=[ + {"type": "string", "value": "foo"}, + {"type": "channel", "value": {"channel": "channel_name"}}, + ], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + event_data = await on_script_message + + recursive_compare( + { + "channel": "channel_name", + "data": {"type": "string", "value": "foo"}, + "source": { + "realm": result["realm"], + "context": top_context["context"], + }, + }, + event_data, + ) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/invalid.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/invalid.py index 015fd40cf90..234699abb91 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/invalid.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/invalid.py @@ -102,6 +102,192 @@ async def test_params_arguments_entry_invalid_type(bidi_session, top_context, target=ContextTarget(top_context["context"])) +@pytest.mark.parametrize("value", [None, False, "_UNKNOWN_", 42, []]) +async def test_params_arguments_channel_value_invalid_type( + bidi_session, top_context, value +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[{"type": "channel", "value": value}], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + +@pytest.mark.parametrize("channel", [None, False, 42, [], {}]) +async def test_params_arguments_channel_id_invalid_type( + bidi_session, top_context, channel +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[{"type": "channel", "value": {"channel": channel}}], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + +@pytest.mark.parametrize("ownership", [False, 42, {}, []]) +async def test_params_arguments_channel_ownership_invalid_type( + bidi_session, top_context, ownership +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[{"type": "channel", "value": {"ownership": ownership}}], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + +async def test_params_arguments_channel_ownership_invalid_value( + bidi_session, top_context +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[{"type": "channel", "value": {"ownership": "_UNKNOWN_"}}], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + +@pytest.mark.parametrize("serialization_options", [False, "_UNKNOWN_", 42, []]) +async def test_params_arguments_channel_serialization_options_invalid_type( + bidi_session, top_context, serialization_options +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[ + { + "type": "channel", + "value": {"serializationOptions": serialization_options}, + } + ], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + +@pytest.mark.parametrize("max_dom_depth", [False, "_UNKNOWN_", {}, []]) +async def test_params_arguments_channel_max_dom_depth_invalid_type( + bidi_session, top_context, max_dom_depth +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[ + { + "type": "channel", + "value": { + "serializationOptions": {"maxDomDepth": max_dom_depth} + }, + } + ], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + +async def test_params_arguments_channel_max_dom_depth_invalid_value( + bidi_session, top_context +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[ + { + "type": "channel", + "value": { + "serializationOptions": {"maxDomDepth": -1} + }, + } + ], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + +@pytest.mark.parametrize("max_object_depth", [False, "_UNKNOWN_", {}, []]) +async def test_params_arguments_channel_max_object_depth_invalid_type( + bidi_session, top_context, max_object_depth +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[ + { + "type": "channel", + "value": { + "serializationOptions": {"maxObjectDepth": max_object_depth} + }, + } + ], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + +async def test_params_arguments_channel_max_object_depth_invalid_value( + bidi_session, top_context +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[ + { + "type": "channel", + "value": {"serializationOptions": {"maxObjectDepth": -1}}, + } + ], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + +@pytest.mark.parametrize("include_shadow_tree", [False, 42, {}, []]) +async def test_params_arguments_channel_include_shadow_tree_invalid_type( + bidi_session, top_context, include_shadow_tree +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[ + { + "type": "channel", + "value": { + "serializationOptions": { + "includeShadowTree": include_shadow_tree + } + }, + } + ], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + +async def test_params_arguments_channel_include_shadow_tree_invalid_value( + bidi_session, top_context +): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.call_function( + function_declaration="(arg) => arg", + arguments=[ + { + "type": "channel", + "value": { + "serializationOptions": {"includeShadowTree": "_UNKNOWN_"} + }, + } + ], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + @pytest.mark.parametrize("value", [None, False, 42, {}, []]) async def test_params_arguments_handle_invalid_type( bidi_session, top_context, value diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/this.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/this.py index 17501b4ea52..baa4e65b285 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/this.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/call_function/this.py @@ -2,7 +2,7 @@ import pytest from webdriver.bidi.modules.script import ContextTarget -from ... import recursive_compare +from ... import any_string, recursive_compare @pytest.mark.asyncio @@ -83,3 +83,65 @@ async def test_remote_value_deserialization( await bidi_session.browsing_context.navigate( context=top_context["context"], url=top_context["url"], wait="complete" ) + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "channel, expected_data", + [ + ( + {"type": "channel", "value": {"channel": "channel_name"}}, + {"type": "object", "value": [["foo", {"type": "string", "value": "bar"}]]}, + ), + ( + { + "type": "channel", + "value": { + "channel": "channel_name", + "serializationOptions": { + "maxObjectDepth": 0 + }, + }, + }, + {"type": "object"}, + ), + ( + { + "type": "channel", + "value": {"channel": "channel_name", "ownership": "root"}, + }, + { + "handle": any_string, + "type": "object", + "value": [["foo", {"type": "string", "value": "bar"}]], + }, + ), + ], + ids=["default", "with serializationOptions", "with ownership"], +) +async def test_channel( + bidi_session, top_context, subscribe_events, wait_for_event, channel, expected_data +): + await subscribe_events(["script.message"]) + + on_entry_added = wait_for_event("script.message") + result = await bidi_session.script.call_function( + raw_result=True, + function_declaration="function() { return this({'foo': 'bar'}) }", + await_promise=False, + target=ContextTarget(top_context["context"]), + this=channel + ) + event_data = await on_entry_added + + recursive_compare( + { + "channel": "channel_name", + "data": expected_data, + "source": { + "realm": result["realm"], + "context": top_context["context"], + }, + }, + event_data, + ) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/message/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/message/__init__.py new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/message/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/message/message.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/message/message.py new file mode 100644 index 00000000000..4270dcc292d --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/script/message/message.py @@ -0,0 +1,101 @@ +import pytest +from tests.support.sync import AsyncPoll + +from webdriver.bidi.modules.script import ContextTarget +from webdriver.error import TimeoutException + + +pytestmark = pytest.mark.asyncio + +MESSAGE_EVENT = "script.message" + + +async def test_unsubscribe(bidi_session, top_context): + await bidi_session.session.subscribe(events=[MESSAGE_EVENT]) + await bidi_session.session.unsubscribe(events=[MESSAGE_EVENT]) + + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener(MESSAGE_EVENT, on_event) + + await bidi_session.script.call_function( + raw_result=True, + function_declaration="(channel) => channel('foo')", + arguments=[{"type": "channel", "value": {"channel": "channel_name"}}], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + assert len(events) == 0 + + remove_listener() + + +async def test_subscribe(bidi_session, subscribe_events, top_context, wait_for_event): + await subscribe_events(events=[MESSAGE_EVENT]) + + on_script_message = wait_for_event(MESSAGE_EVENT) + result = await bidi_session.script.call_function( + raw_result=True, + function_declaration="(channel) => channel('foo')", + arguments=[{"type": "channel", "value": {"channel": "channel_name"}}], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + event = await on_script_message + + assert event == { + "channel": "channel_name", + "data": {"type": "string", "value": "foo"}, + "source": { + "realm": result["realm"], + "context": top_context["context"], + }, + } + + +async def test_subscribe_to_one_context( + bidi_session, subscribe_events, top_context, new_tab +): + # Subscribe to a specific context + await subscribe_events( + events=[MESSAGE_EVENT], contexts=[top_context["context"]] + ) + + # Track all received script.message events in the events array + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener(MESSAGE_EVENT, on_event) + + # Send the event in the other context + await bidi_session.script.call_function( + raw_result=True, + function_declaration="(channel) => channel('foo')", + arguments=[{"type": "channel", "value": {"channel": "channel_name"}}], + await_promise=False, + target=ContextTarget(new_tab["context"]), + ) + + # Make sure we didn't receive the event for the new tab + wait = AsyncPoll(bidi_session, timeout=0.5) + with pytest.raises(TimeoutException): + await wait.until(lambda _: len(events) > 0) + + await bidi_session.script.call_function( + raw_result=True, + function_declaration="(channel) => channel('foo')", + arguments=[{"type": "channel", "value": {"channel": "channel_name"}}], + await_promise=False, + target=ContextTarget(top_context["context"]), + ) + + # Make sure we received the event for the right context + assert len(events) == 1 + + remove_listener() diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_computed_role/get.py b/tests/wpt/web-platform-tests/webdriver/tests/get_computed_role/get.py index 8d15e8fb90d..51b6a8b3b6d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_computed_role/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_computed_role/get.py @@ -77,9 +77,9 @@ def test_stale_element_reference(session, stale_element, as_frame): @pytest.mark.parametrize("html,tag,expected", [ - ("<li role=menuitem>foo", "li", "menuitem"), + ("<article>foo</article>", "article", "article"), ("<input role=searchbox>", "input", "searchbox"), - ("<img role=presentation>", "img", "presentation")]) + ("<img role=button tabindex=0>", "img", "button")]) def test_computed_roles(session, inline, html, tag, expected): session.url = inline(html) element = session.find.css(tag, all=False) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/conftest.py index 30069a02386..f2060a87eed 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/conftest.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/conftest.py @@ -2,8 +2,6 @@ import pytest from webdriver.error import NoSuchWindowException -from tests.perform_actions.support.keys import Keys - @pytest.fixture def session_new_window(capabilities, session): @@ -77,14 +75,6 @@ def key_reporter(session, test_actions_page, request): @pytest.fixture -def modifier_key(session): - if session.capabilities["platformName"] == "mac": - return Keys.META - else: - return Keys.CONTROL - - -@pytest.fixture def test_actions_page(session, url): session.url = url("/webdriver/tests/support/html/test_actions.html") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key.py b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key.py index eef0ab96f4b..6730b1c18bf 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key.py @@ -2,8 +2,8 @@ import pytest from webdriver.error import NoSuchWindowException -from tests.perform_actions.support.keys import Keys from tests.perform_actions.support.refine import get_keys +from tests.support.keys import Keys def test_null_response_value(session, key_chain): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_events.py b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_events.py index 9f912684c76..472fb54c285 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_events.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_events.py @@ -4,9 +4,9 @@ from collections import defaultdict import pytest -from tests.perform_actions.support.keys import ALL_EVENTS, Keys, ALTERNATIVE_KEY_NAMES from tests.perform_actions.support.refine import get_events, get_keys from tests.support.helpers import filter_dict, filter_supported_key_events +from tests.support.keys import ALL_EVENTS, ALTERNATIVE_KEY_NAMES, Keys def test_keyup_only_sends_no_events(session, key_reporter, key_chain): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_modifiers.py b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_modifiers.py index e8ea30dd3d7..652106f46c2 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_modifiers.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_modifiers.py @@ -1,6 +1,6 @@ import pytest -from tests.perform_actions.support.keys import Keys +from tests.support.keys import Keys @pytest.mark.parametrize("modifier", [Keys.SHIFT, Keys.R_SHIFT]) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_shortcuts.py b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_shortcuts.py index b5ad7a21739..46bc3c43390 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_shortcuts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_shortcuts.py @@ -1,5 +1,5 @@ -from tests.perform_actions.support.keys import Keys from tests.perform_actions.support.refine import get_keys +from tests.support.keys import Keys def test_mod_a_and_backspace_deletes_all_text(session, key_reporter, key_chain, modifier_key): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_contextmenu.py b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_contextmenu.py index 50f684327f2..2e06e8ca59f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_contextmenu.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_contextmenu.py @@ -1,8 +1,8 @@ import pytest -from tests.perform_actions.support.keys import Keys from tests.perform_actions.support.refine import get_events from tests.support.helpers import filter_dict +from tests.support.keys import Keys @pytest.mark.parametrize("modifier, prop", [ diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_modifier_click.py b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_modifier_click.py index 28c4086e0f8..ffba6fc306b 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_modifier_click.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_modifier_click.py @@ -1,8 +1,8 @@ import pytest -from tests.perform_actions.support.keys import Keys from tests.perform_actions.support.refine import get_events from tests.support.helpers import filter_dict +from tests.support.keys import Keys @pytest.mark.parametrize("modifier, prop", [ diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py b/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py index d0a08698d6c..0755d70d525 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py @@ -12,6 +12,7 @@ from tests.support import defaults from tests.support.helpers import cleanup_session, deep_update from tests.support.inline import build_inline from tests.support.http_request import HTTPRequest +from tests.support.keys import Keys SCRIPT_TIMEOUT = 1 @@ -210,6 +211,14 @@ def url(server_config): @pytest.fixture +def modifier_key(session): + if session.capabilities["platformName"] == "mac": + return Keys.META + else: + return Keys.CONTROL + + +@pytest.fixture def inline(url): """Take a source extract and produces well-formed documents. diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/support/keys.py b/tests/wpt/web-platform-tests/webdriver/tests/support/keys.py index e835a6a596f..e835a6a596f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/support/keys.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/support/keys.py diff --git a/tests/wpt/web-platform-tests/webmessaging/broadcastchannel/basics.any.js b/tests/wpt/web-platform-tests/webmessaging/broadcastchannel/basics.any.js index 68b4706028f..eec09d65a3a 100644 --- a/tests/wpt/web-platform-tests/webmessaging/broadcastchannel/basics.any.js +++ b/tests/wpt/web-platform-tests/webmessaging/broadcastchannel/basics.any.js @@ -1,3 +1,11 @@ +test(function() { + assert_throws_js( + TypeError, + () => BroadcastChannel(""), + "Calling BroadcastChannel constructor without 'new' must throw" + ); +}, "BroadcastChannel constructor called as normal function"); + async_test(t => { let c1 = new BroadcastChannel('eventType'); let c2 = new BroadcastChannel('eventType'); diff --git a/tests/wpt/web-platform-tests/webnn/concat.https.any.js b/tests/wpt/web-platform-tests/webnn/concat.https.any.js index 07a1289cef0..b91e99e289e 100644 --- a/tests/wpt/web-platform-tests/webnn/concat.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/concat.https.any.js @@ -8,7 +8,7 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-concat const buildConcat = (operationName, builder, resources) => { - // MLOperand concat(sequence<MLOperand> inputs, long axis); + // MLOperand concat(sequence<MLOperand> inputs, unsigned long axis); const namedOutputOperand = {}; const inputOperands = []; for (let input of resources.inputs) { diff --git a/tests/wpt/web-platform-tests/webnn/elu.https.any.js b/tests/wpt/web-platform-tests/webnn/elu.https.any.js new file mode 100644 index 00000000000..57b624b5daa --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/elu.https.any.js @@ -0,0 +1,10 @@ +// META: title=test WebNN API elu operation +// META: global=window,dedicatedworker +// META: script=./resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-elu + +testWebNNOperation('elu', buildOperationWithSingleInput);
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/reshape.https.any.js b/tests/wpt/web-platform-tests/webnn/reshape.https.any.js index 9fa3262fe52..a7126e63a10 100644 --- a/tests/wpt/web-platform-tests/webnn/reshape.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/reshape.https.any.js @@ -8,7 +8,7 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-reshape const buildReshape = (operationName, builder, resources) => { - // MLOperand reshape(MLOperand input, sequence<long> newShape); + // MLOperand reshape(MLOperand input, sequence<unsigned long?> newShape); const namedOutputOperand = {}; const inputOperand = createSingleInputOperand(builder, resources); // invoke builder.reshape() diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/elu.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/elu.json new file mode 100644 index 00000000000..68c0c80c59b --- /dev/null +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/elu.json @@ -0,0 +1,472 @@ +{ // elu: The calculation follows the expression max(0, x) + alpha * (exp(min(0, x)) - 1). + "tests": [ + { + "name": "elu float32 1D 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" + } + }, + "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 2D tensor default options", + "inputs": { + "x": { + "shape": [4, 6], + "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" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "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 3D tensor default options", + "inputs": { + "x": { + "shape": [2, 3, 4], + "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" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "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 4D tensor default options", + "inputs": { + "x": { + "shape": [1, 2, 3, 4], + "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" + } + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 4], + "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 5D tensor default options", + "inputs": { + "x": { + "shape": [1, 2, 1, 3, 4], + "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" + } + }, + "expected": { + "name": "output", + "shape": [1, 2, 1, 3, 4], + "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 4D tensor positive options.alpha", + "inputs": { + "x": { + "shape": [1, 2, 3, 4], + "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" + } + }, + "options": { + "alpha": 0.3607245505146506 + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 4], + "data": [ + 4.721739768981934, + 0.3768780529499054, + 1.4189997911453247, + -0.35317301750183105, + 1.3590080738067627, + -0.35315653681755066, + 7.839725494384766, + -0.36027640104293823, + 0.5456406474113464, + 5.776711463928223, + 7.263273239135742, + -0.36050841212272644, + 5.665064334869385, + -0.3602862060070038, + -0.3478761315345764, + -0.25319698452949524, + 7.255547046661377, + 8.903468132019043, + -0.3542475700378418, + 7.114678382873535, + -0.0382622666656971, + -0.3517060875892639, + 6.135150909423828, + -0.3607063591480255 + ], + "type": "float32" + } + }, + { + "name": "elu float32 4D tensor negative options.alpha", + "inputs": { + "x": { + "shape": [1, 2, 3, 4], + "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" + } + }, + "options": { + "alpha": -3.468180406374035 + }, + "expected": { + "name": "output", + "shape": [1, 2, 3, 4], + "data": [ + 4.721739768981934, + 0.3768780529499054, + 1.4189997911453247, + 3.3955764770507812, + 1.3590080738067627, + 3.3954179286956787, + 7.839725494384766, + 3.463871955871582, + 0.5456406474113464, + 5.776711463928223, + 7.263273239135742, + 3.466102361679077, + 5.665064334869385, + 3.463966131210327, + 3.34464955329895, + 2.434358596801758, + 7.255547046661377, + 8.903468132019043, + 3.40590763092041, + 7.114678382873535, + 0.3678719699382782, + 3.381472587585449, + 6.135150909423828, + 3.468005657196045 + ], + "type": "float32" + } + } + ] +}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/prelu.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/prelu.json index e1bf6782619..e45e12cd4b6 100644 --- a/tests/wpt/web-platform-tests/webnn/resources/test_data/prelu.json +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/prelu.json @@ -61,7 +61,8 @@ -1.7995220850663962, 9.29585020267449 ], - "type": "float32" + "type": "float32", + "constant": true } }, "expected": { @@ -157,7 +158,8 @@ -1.7995220850663962, 9.29585020267449 ], - "type": "float32" + "type": "float32", + "constant": true } }, "expected": { @@ -253,7 +255,8 @@ -1.7995220850663962, 9.29585020267449 ], - "type": "float32" + "type": "float32", + "constant": true } }, "expected": { @@ -349,7 +352,8 @@ -1.7995220850663962, 9.29585020267449 ], - "type": "float32" + "type": "float32", + "constant": true } }, "expected": { @@ -445,7 +449,8 @@ -1.7995220850663962, 9.29585020267449 ], - "type": "float32" + "type": "float32", + "constant": true } }, "expected": { @@ -520,7 +525,8 @@ 0.48077445494619653, -7.091750168010829 ], - "type": "float32" + "type": "float32", + "constant": true } }, "expected": { @@ -593,7 +599,8 @@ "data": [ 5.0114545056636395 ], - "type": "float32" + "type": "float32", + "constant": true } }, "expected": { @@ -671,7 +678,8 @@ -4.424202960837338, -6.654683521499036 ], - "type": "float32" + "type": "float32", + "constant": true } }, "expected": { @@ -746,7 +754,8 @@ 0.48077445494619653, -7.091750168010829 ], - "type": "float32" + "type": "float32", + "constant": true } }, "expected": { @@ -819,7 +828,8 @@ "data": [ 5.0114545056636395 ], - "type": "float32" + "type": "float32", + "constant": true } }, "expected": { diff --git a/tests/wpt/web-platform-tests/webnn/resources/test_data/slice.json b/tests/wpt/web-platform-tests/webnn/resources/test_data/slice.json index 9b250268dc0..ed193dd6563 100644 --- a/tests/wpt/web-platform-tests/webnn/resources/test_data/slice.json +++ b/tests/wpt/web-platform-tests/webnn/resources/test_data/slice.json @@ -1,7 +1,7 @@ { "tests": [ { - "name": "slice float32 1D tensor default axes options", + "name": "slice float32 1D tensor", "inputs": { "input": { "shape": [24], @@ -57,7 +57,7 @@ } }, { - "name": "slice float32 2D tensor default axes options", + "name": "slice float32 2D tensor", "inputs": { "input": { "shape": [4, 6], @@ -109,7 +109,7 @@ } }, { - "name": "slice float32 3D tensor default axes options", + "name": "slice float32 3D tensor", "inputs": { "input": { "shape": [4, 3, 2], @@ -159,7 +159,7 @@ } }, { - "name": "slice float32 4D tensor default axes options", + "name": "slice float32 4D tensor", "inputs": { "input": { "shape": [2, 2, 3, 2], @@ -205,7 +205,7 @@ } }, { - "name": "slice float32 5D tensor default axes options", + "name": "slice float32 5D tensor", "inputs": { "input": { "shape": [2, 2, 3, 2, 1], @@ -249,420 +249,6 @@ ], "type": "float32" } - }, - { - "name": "slice float32 3D tensor negative starts", - "inputs": { - "input": { - "shape": [4, 3, 2], - "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" - } - }, - "starts": [-3, -2, -1], // [-3, -2, -1] is equal to [1, 1, 1] - "sizes": [3, 2, 1], - "expected": { - "name": "output", - "shape": [3, 2, 1], - "data": [ - 57.4397087097168, - -4.513182163238525, - 74.02619171142578, - -27.306041717529297, - 79.80570983886719, - 42.665199279785156 - ], - "type": "float32" - } - }, - { - "name": "slice float32 4D tensor negative starts", - "inputs": { - "input": { - "shape": [2, 2, 3, 2], - "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" - } - }, - "starts": [-1, -2, -1, -1], // [-1, -2, -1, -1] is equal to [1, 0, 2, 1] - "sizes": [1, 2, 1, 1], - "expected": { - "name": "output", - "shape": [1, 2, 1, 1], - "data": [ - -27.306041717529297, - 42.665199279785156 - ], - "type": "float32" - } - }, - { - "name": "slice float32 4D tensor sizes having special value of -1", - "inputs": { - "input": { - "shape": [2, 2, 3, 2], - "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" - } - }, - "starts": [1, 0, 2, 1], - "sizes": [1, -1, 1, -1], // [1, -1, 1, -1] is equal to [1, 2, 1, 1] - "expected": { - "name": "output", - "shape": [1, 2, 1, 1], - "data": [ - -27.306041717529297, - 42.665199279785156 - ], - "type": "float32" - } - }, - { - "name": "slice float32 5D tensor sizes having special value of -1", - "inputs": { - "input": { - "shape": [2, 2, 3, 2, 1], - "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" - } - }, - "starts": [1, 0, 2, 1, 0], - "sizes": [-1, 2, -1, 1, -1], // [-1, 2, -1, 1, -1] is equal to [1, 2, 1, 1, 1] - "expected": { - "name": "output", - "shape": [1, 2, 1, 1, 1], - "data": [ - -27.306041717529297, - 42.665199279785156 - ], - "type": "float32" - } - }, - { - "name": "slice float32 1D tensor options.axes=[0]", - "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" - } - }, - "starts": [12], - "sizes": [12], - "options": { - "axes": [0] - }, - "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 2D tensor positive options.axes=[1]", - "inputs": { - "input": { - "shape": [4, 6], - "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" - } - }, - "starts": [2], - "sizes": [4], - "options": { - "axes": [1] - }, - "expected": { - "name": "output", - "shape": [4, 4], - "data": [ - -68.15961456298828, - 14.978987693786621, - 90.23090362548828, - 76.59095764160156, - 65.21376037597656, - 57.4397087097168, - 74.41775512695312, - -4.513182163238525, - 28.32765007019043, - 74.02619171142578, - -74.54559326171875, - -27.306041717529297, - -58.46095275878906, - 79.80570983886719, - -9.857853889465332, - 42.665199279785156 - ], - "type": "float32" - } - }, - { - "name": "slice float32 3D tensor positive options.axes=[1, 2]", - "inputs": { - "input": { - "shape": [4, 3, 2], - "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" - } - }, - "starts": [1, 1], - "sizes": [2, 1], - "options": { - "axes": [1, 2] - }, - "expected": { - "name": "output", - "shape": [4, 2, 1], - "data": [ - 14.978987693786621, - 76.59095764160156, - 57.4397087097168, - -4.513182163238525, - 74.02619171142578, - -27.306041717529297, - 79.80570983886719, - 42.665199279785156 - ], - "type": "float32" - } - }, - { - "name": "slice float32 4D tensor positive options.axes=[0, 2, 3]", - "inputs": { - "input": { - "shape": [2, 2, 3, 2], - "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" - } - }, - "options": { - "axes": [0, 2, 3] - }, - "starts": [1, 2, 1], - "sizes": [1, 1, 1], - "expected": { - "name": "output", - "shape": [1, 2, 1, 1], - "data": [ - -27.306041717529297, - 42.665199279785156 - ], - "type": "float32" - } } ] }
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webnn/resources/utils.js b/tests/wpt/web-platform-tests/webnn/resources/utils.js index 427b47e28cc..d24562eba1f 100644 --- a/tests/wpt/web-platform-tests/webnn/resources/utils.js +++ b/tests/wpt/web-platform-tests/webnn/resources/utils.js @@ -265,8 +265,9 @@ const PrecisionMetrics = { sin: {ATOL: {float32: 1/1024, float16: 1/512}}, tan: {ATOL: {float32: 1/1024, float16: 1/512}}, // End Element-wise unary operations - hardSwish: {ULP: {float32: 4, float16: 4}}, + elu: {ULP: {float32: 18, float16: 18}}, gemm: {ULP: {float32: getGemmPrecisionTolerance, float16: getGemmPrecisionTolerance}}, + hardSwish: {ULP: {float32: 4, float16: 4}}, leakyRelu: {ULP: {float32: 1, float16: 1}}, matmul: {ULP: {float32: getMatmulPrecisionTolerance, float16: getMatmulPrecisionTolerance}}, pad: {ULP: {float32: 0, float16: 0}}, diff --git a/tests/wpt/web-platform-tests/webnn/slice.https.any.js b/tests/wpt/web-platform-tests/webnn/slice.https.any.js index e8b130d5f22..5e188af5352 100644 --- a/tests/wpt/web-platform-tests/webnn/slice.https.any.js +++ b/tests/wpt/web-platform-tests/webnn/slice.https.any.js @@ -8,11 +8,11 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-slice const buildSlice = (operationName, builder, resources) => { - // MLOperand slice(MLOperand input, sequence<long> starts, sequence<long> sizes, optional MLSliceOptions options = {}); + // MLOperand slice(MLOperand input, sequence<unsigned long> starts, sequence<unsigned long> sizes); const namedOutputOperand = {}; const inputOperand = createSingleInputOperand(builder, resources); // invoke builder.slice() - namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, resources.starts, resources.sizes, resources.options); + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, resources.starts, resources.sizes); return namedOutputOperand; }; diff --git a/tests/wpt/web-platform-tests/webstorage/event_constructor.window.js b/tests/wpt/web-platform-tests/webstorage/event_constructor.window.js index ba7dd919654..13f4ca5e97c 100644 --- a/tests/wpt/web-platform-tests/webstorage/event_constructor.window.js +++ b/tests/wpt/web-platform-tests/webstorage/event_constructor.window.js @@ -1,4 +1,12 @@ test(function() { + assert_throws_js( + TypeError, + () => StorageEvent(""), + "Calling StorageEvent constructor without 'new' must throw" + ); +}, "StorageEvent constructor called as normal function"); + +test(function() { assert_throws_js(TypeError, () => new StorageEvent()); // should be redundant, but .length can be wrong with custom bindings assert_equals(StorageEvent.length, 1, 'StorageEvent.length'); diff --git a/tests/wpt/web-platform-tests/webtransport/close.https.any.js b/tests/wpt/web-platform-tests/webtransport/close.https.any.js index b6b367badf5..642d716a103 100644 --- a/tests/wpt/web-platform-tests/webtransport/close.https.any.js +++ b/tests/wpt/web-platform-tests/webtransport/close.https.any.js @@ -2,6 +2,7 @@ // META: script=/common/get-host-info.sub.js // META: script=resources/webtransport-test-helpers.sub.js // META: script=/common/utils.js +// META: timeout=long promise_test(async t => { const id = token(); diff --git a/tests/wpt/web-platform-tests/webtransport/connect.https.any.js b/tests/wpt/web-platform-tests/webtransport/connect.https.any.js index 93df5fe3f47..6bd18ae8de4 100644 --- a/tests/wpt/web-platform-tests/webtransport/connect.https.any.js +++ b/tests/wpt/web-platform-tests/webtransport/connect.https.any.js @@ -1,6 +1,7 @@ // META: global=window,worker // META: script=/common/get-host-info.sub.js // META: script=resources/webtransport-test-helpers.sub.js +// META: timeout=long promise_test(async t => { const wt = new WebTransport(webtransport_url('custom-response.py?:status=200')); diff --git a/tests/wpt/web-platform-tests/workers/Worker_dispatchEvent_ErrorEvent.htm b/tests/wpt/web-platform-tests/workers/Worker_dispatchEvent_ErrorEvent.htm index 11ade605057..7ba56b89ecf 100644 --- a/tests/wpt/web-platform-tests/workers/Worker_dispatchEvent_ErrorEvent.htm +++ b/tests/wpt/web-platform-tests/workers/Worker_dispatchEvent_ErrorEvent.htm @@ -28,4 +28,12 @@ test(function() { var e = new ErrorEvent("error"); assert_false("initErrorEvent" in e, "should not be supported"); }, "initErrorEvent"); + +test(function() { + assert_throws_js( + TypeError, + () => ErrorEvent(''), + "Calling ErrorEvent constructor without 'new' must throw" + ); +}, "ErrorEvent constructor called as normal function"); </script> diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/origin-clean-conformance-offscreencanvas.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/origin-clean-conformance-offscreencanvas.html.ini index 278f0d1eb20..4e4810ca509 100644 --- a/tests/wpt/webgl/meta/conformance/textures/misc/origin-clean-conformance-offscreencanvas.html.ini +++ b/tests/wpt/webgl/meta/conformance/textures/misc/origin-clean-conformance-offscreencanvas.html.ini @@ -2,3 +2,6 @@ expected: ERROR [WebGL test #2: Unable to fetch WebGL rendering context for Canvas] expected: FAIL + + [WebGL test #0: img was loaded] + expected: FAIL diff --git a/tests/wpt/webgl/meta/conformance2/textures/misc/origin-clean-conformance-offscreencanvas.html.ini b/tests/wpt/webgl/meta/conformance2/textures/misc/origin-clean-conformance-offscreencanvas.html.ini index 278f0d1eb20..4e4810ca509 100644 --- a/tests/wpt/webgl/meta/conformance2/textures/misc/origin-clean-conformance-offscreencanvas.html.ini +++ b/tests/wpt/webgl/meta/conformance2/textures/misc/origin-clean-conformance-offscreencanvas.html.ini @@ -2,3 +2,6 @@ expected: ERROR [WebGL test #2: Unable to fetch WebGL rendering context for Canvas] expected: FAIL + + [WebGL test #0: img was loaded] + expected: FAIL |