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 .] - 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 from [initial\] to [isolate\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [isolate\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [isolate\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [isolate\] at (-0.3) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [isolate\] at (0) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [isolate\] at (0.3) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [isolate\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [isolate\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [isolate\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [isolate\] at (1.5) should be [isolate\]] + expected: FAIL + + [Web Animations: property from [initial\] to [isolate\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [isolate\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [isolate\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [isolate\] at (0.5) should be [isolate\]] + expected: FAIL + + [Web Animations: property from [initial\] to [isolate\] at (0.6) should be [isolate\]] + expected: FAIL + + [Web Animations: property from [initial\] to [isolate\] at (1) should be [isolate\]] + expected: FAIL + + [Web Animations: property 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 from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (-0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (0) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (-0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (0) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (0.3) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [baseline\] at (1.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (0.5) should be [baseline\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (0.6) should be [baseline\]] + expected: FAIL + + [Web Animations: property from [initial\] to [baseline\] at (1) should be [baseline\]] + expected: FAIL + + [Web Animations: property 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 from [initial\] to [none\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [none\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [none\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [none\] at (-0.3) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [none\] at (0) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [none\] at (0.3) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [none\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [none\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [none\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [Web Animations: property from [initial\] to [none\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [none\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [none\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [none\] at (0.5) should be [none\]] + expected: FAIL + + [Web Animations: property from [initial\] to [none\] at (0.6) should be [none\]] + expected: FAIL + + [Web Animations: property from [initial\] to [none\] at (1) should be [none\]] + expected: FAIL + + [Web Animations: property from [initial\] to [none\] at (1.5) should be [none\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [pixelated\] at (-0.3) should be [pixelated\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [pixelated\] at (0) should be [pixelated\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [pixelated\] at (0.3) should be [pixelated\]] + expected: FAIL + + [Web Animations: property from [initial\] to [pixelated\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [pixelated\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [pixelated\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [pixelated\] at (0.5) should be [pixelated\]] + expected: FAIL + + [Web Animations: property from [initial\] to [pixelated\] at (0.6) should be [pixelated\]] + expected: FAIL + + [Web Animations: property from [initial\] to [pixelated\] at (1) should be [pixelated\]] + expected: FAIL + + [Web Animations: property 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 similarity index 100% rename from tests/wpt/metadata/css/css-images/object-position-interpolation.html.ini rename to 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 similarity index 100% rename from tests/wpt/metadata/css/css-images/object-view-box-interpolation.html.ini rename to 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 from [initial\] to ["e"\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to ["e"\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to ["e"\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to ["e"\] at (-0.3) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to ["e"\] at (0) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to ["e"\] at (0.3) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [CSS Animations: property from [initial\] to ["e"\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to ["e"\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to ["e"\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [CSS Animations: property from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [CSS Animations: property from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [CSS Animations: property from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [Web Animations: property from [initial\] to ["e"\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to ["e"\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to ["e"\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to ["e"\] at (0.5) should be ["e"\]] + expected: FAIL + + [Web Animations: property from [initial\] to ["e"\] at (0.6) should be ["e"\]] + expected: FAIL + + [Web Animations: property from [initial\] to ["e"\] at (1) should be ["e"\]] + expected: FAIL + + [Web Animations: property from [initial\] to ["e"\] at (1.5) should be ["e"\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [10\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [10\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [10\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [10\] at (-0.3) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [10\] at (0) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [10\] at (0.3) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [10\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [10\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [10\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [Web Animations: property from [initial\] to [10\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [10\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [10\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [10\] at (0.5) should be [10\]] + expected: FAIL + + [Web Animations: property from [initial\] to [10\] at (0.6) should be [10\]] + expected: FAIL + + [Web Animations: property from [initial\] to [10\] at (1) should be [10\]] + expected: FAIL + + [Web Animations: property from [initial\] to [10\] at (1.5) should be [10\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [auto\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [auto\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [auto\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [auto\] at (-0.3) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [auto\] at (0) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [auto\] at (0.3) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [auto\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [auto\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [auto\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [auto\] at (1.5) should be [auto\]] + expected: FAIL + + [Web Animations: property from [initial\] to [auto\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [auto\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [auto\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [auto\] at (0.5) should be [auto\]] + expected: FAIL + + [Web Animations: property from [initial\] to [auto\] at (0.6) should be [auto\]] + expected: FAIL + + [Web Animations: property from [initial\] to [auto\] at (1) should be [auto\]] + expected: FAIL + + [Web Animations: property 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 from [initial\] to [anywhere\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [anywhere\] at (0) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [anywhere\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [anywhere\] at (-0.3) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [anywhere\] at (0) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [anywhere\] at (0.3) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [anywhere\] at (-0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [anywhere\] at (0) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [anywhere\] at (0.3) should be [initial\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [anywhere\] at (1.5) should be [anywhere\]] + expected: FAIL + + [Web Animations: property from [initial\] to [anywhere\] at (-0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [anywhere\] at (0) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [anywhere\] at (0.3) should be [initial\]] + expected: FAIL + + [Web Animations: property from [initial\] to [anywhere\] at (0.5) should be [anywhere\]] + expected: FAIL + + [Web Animations: property from [initial\] to [anywhere\] at (0.6) should be [anywhere\]] + expected: FAIL + + [Web Animations: property from [initial\] to [anywhere\] at (1) should be [anywhere\]] + expected: FAIL + + [Web Animations: property 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 - [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 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 + 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 @@ + + + + + + + + + + \ 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 @@ + + + + + \ 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 @@ + + + + + + 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 @@ + + + + + \ 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 @@ + + + + + \ 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 @@ + + + + + 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 @@ + + + + + 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 @@ + + + +Fenced frame accessing cookies + + + + 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 === "") + 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 ` + + + + + +Fenced frame content to test Web Bluetooth + + + + + 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 @@ + + +Fenced frame content to report the value of Web NFC API + + + + 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 @@ + + + + + +Fenced frame content to test Web Share + + + + 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 @@ + + +Fenced frame content to report the value of window.frameElement + + + + 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 @@ + + + + +Fenced frame content to report the value of window.navigation + + + + 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 @@ + + +Fenced frame content to report the result of prerendering + + + + 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 @@ + + + +Fenced frame content to report the value of window.parent + + + + 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 @@ + + + +Fenced frame content to report the value of window.top + + + + 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 @@ + +Test fenced frame sandbox attribute. + + + + + + + + + + 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 @@ + + +Test of sandbox mandatory flags + + + + + + + + + + + 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 @@ + +Test of sandboxed features - alert + + + + + + + + + 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 @@ + +Test of sandbox features - confirm + + + + + + + + + + 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 @@ + +Test of sandboxed features - document.domain + + + + + + + + + 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 @@ + +Test of sandboxed features - pointer lock + + + + + + + + + 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 @@ + +Test of sandboxed features - PresentationRequest + + + + + + + + + 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 @@ + +Test of sandboxed features - print + + + + + + + + + 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 @@ + +Test of sandboxed features - prompt + + + + + + + + + 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 @@ + +Test of sandboxed features - screen.orientation.lock + + + + + + + + + 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 @@ + +Test frame size behavior in selectURL fenced frames. + + + + + + + + + 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 @@ + +Test that fenced frame-initiated self urn navigations fail. + + + + + + + + + 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 @@ + +Service Worker: Check if dedicated workers are controlled + + + + + + + + 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 @@ + +Service Worker: Clients.matchAll with includeUncontrolled + + + + + + + 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 @@ + + + +Service Worker: Push Messaging Test + + + + + + + + + + + + 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 @@ + +Test window.fence.setReportEventDataForAutomaticBeacons + + + + + + + + + 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 @@ + +showDirectoryPicker API test + + + + + + + + + + + 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 @@ + +showOpenFilePicker API test + + + + + + + + + + + + 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 @@ + +Test storage partitioning in fenced frames + + + + + + + + + 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 @@ + +Test Subframe Loading Disabler + + + + + + + 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 @@ + +Test of Web Bluetooth API + + + + + + + + + + + + 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 @@ + +Test Web NFC API + + + + + + + + + + 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 @@ + +Test of Web Share + + + + + + + + + + + + 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 @@ + +Test WebUSB navigator.usb.requestDevice() + + + + + + + + + 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 @@ + +Test window.close has no effect + + + + + + + + + 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 @@ + +Test window.parent + + + + + + + + + + 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 @@ + +Test window.navigation.204 + + + + + + + + + + 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 @@ + +Test window.prompt + + + + + + + + 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 @@ + +Test window.parent + + + + + + + + + + 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 @@ + +Test window.top + + + + + + + + + + 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(); +/** + * 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('same-origin redirect', token1); -}, 'same-origin redirect; setting up'); + assertStashedTokenAsync(desc, tokenToStash); + }, `${desc}; 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(); +/** + * 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}`; - assertStashedTokenAsync('cross-origin redirect', token1); -}, 'cross-origin redirect; setting up'); + 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(); -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(desc, token, {shouldPass}); + }, `${desc}; setting up`); +} - assertStashedTokenAsync('cross-origin redirect with preflight', token1); -}, 'cross-origin redirect with preflight; 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,", + 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(" + + + + + + + + + + x + x + +x + + + + + \ 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 @@ + + + + HTMLOptGroupElement Role Verification Tests + + + + + + + + + + + + + + + \ 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 @@ + + + + HTML-AAM Role Verification Tests + + + + + + + + + + + +x +x + +
x
+ +
x
+ + + + + + + +x + +x +x +
x
+ + + + + + +x + + +x + + + +
+
x
+
x
+
+ +x +
xx
+x +
x
+ + + +
+
x
+
x
+
+ +x + +
x
+ +
x
x
+ + + +
x
+ +
+ + + +

x

+

x

+

x

+

x

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

x

+
+ +x + +x + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +x + + + + + +
  • x
  • +
    • x
    • x
    +
    1. x
    2. x
    + + +
    x
    + +x + +
  • x
  • + +x + + + +
    1. x
    2. x
    + + + + + + +x +

    x

    + + +
    x
    +x +x + + + +x +x + +x + + +
    x
    +
    x
    + + + + + + + +x + +x +x + +x + +x + + + + + + + + + + + + + +x +
    • x
    • x
    + + + + + + + + \ 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 @@ + + + + HTML-AAM Role Verification Tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    caption
    abc
    123
    456
    xyz
    + + + + + \ 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 @@
    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 @@

    2d.filter.canvasFilterObject.dropShadow.tentative

    Test CanvasFilter() dropShadow object.

    - + + + filter="drop-shadow(2px 2px 2px black)"/> + filter="drop-shadow(9px 12px 5px rgba(128, 0, 128, 0.7))"/> + filter="drop-shadow(9px 12px 3px purple)"/> + filter="drop-shadow(9px 12px 3px LinkText)"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 1))"/> + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 0.7))"/> - + filter="drop-shadow(9px 12px 3px rgba(20, 50, 130, 0.49))"/> + filter="drop-shadow(9px 12px 0px purple)"/> + filter="drop-shadow(9px 12px 5px purple)"/> + filter="drop-shadow(9px 12px 0px purple)"/> + + + + + + + + + + + + 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 @@ Canvas test: 2d.filter.canvasFilterObject.dropShadow.tentative

    2d.filter.canvasFilterObject.dropShadow.tentative

    Test CanvasFilter() dropShadow object.

    - +

    FAIL (fallback content)

    -
    +

    +
    + +
    +

    +

    +
    +
    + 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 @@ + + + + + + + +
    +
    + + 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 @@ + + + + + + + +
    +
    +
    +
    + + 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 @@ + + +CSS Test Reference +
    + abc def +
    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 @@ + + +date input baseline should account for min-height + + + + +
    + abc def +
    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 @@ + + +dialog: close and re-add modal dialog during overlay transition + + + + +PASS +FAIL + + 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 @@ + +dialog: overlay + + + + + + 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 @@ + +CSS Test Reference + +PASS + 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 @@ + + + + + + + + + + + + +
    Popover 1 + +
    +
    Popover 2
    + + 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');
    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"'); + +
    Popover 16 +
    Popover 17
    +
    Popover 18
    +
    + + + +
    Popover 19
    +
    Popover 20
    + + + 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 @@ + + + + + + + +
    p1
    + + + +
    p2
    + + + +
    + p3 +
    p4
    +
    p5
    +
    + 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 @@ + +popover: overlay + + + + + + + +
    + 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 @@ - -
    - -
    -
    popover
    -
    @@ -69,18 +52,18 @@ test(() => {
    @@ -90,18 +73,18 @@ test(() => {
    @@ -111,18 +94,18 @@ test(() => {
    @@ -132,18 +115,18 @@ test(() => {
    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 @@ -4,6 +4,14 @@
    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 @@ + + + + + + + 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)'); 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 @@ + + +
    +
    +
    + + + + 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'); + + + + + + + + + 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 @@ + +The animation-timeline: scroll-timeline-name + + + + + + + + + +
    +
    +
    +
    +
    +
    + + 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 @@ + + + + + +Attach a scroll timeline to a reversed animation refTest + + + + + + +
    +
    +
    + + + + 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'); + + + + + + + + +