diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini deleted file mode 100644 index 968f62a2553..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[hit-test-floats-002.html] - [Hit test float] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini new file mode 100644 index 00000000000..13bd6abf376 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini @@ -0,0 +1,3 @@ +[hit-test-floats-004.html] + [Miss float below something else] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini new file mode 100644 index 00000000000..147f062e548 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini @@ -0,0 +1,3 @@ +[hit-test-floats-005.html] + [Miss clipped float] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/fonts/font-variant-applies-to-010.xht.ini b/tests/wpt/metadata-layout-2020/css/CSS2/fonts/font-variant-applies-to-010.xht.ini new file mode 100644 index 00000000000..8abb741c0dc --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/fonts/font-variant-applies-to-010.xht.ini @@ -0,0 +1,2 @@ +[font-variant-applies-to-010.xht] + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini index 51432362d66..ee34bc91078 100644 --- a/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini +++ b/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/block-in-inline-hittest-002.html.ini @@ -1,3 +1,6 @@ [block-in-inline-hittest-002.html] [elementsFromPoint] expected: FAIL + + [elementFromPoint] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/block-in-inline-hittest-relpos-zindex.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/block-in-inline-hittest-relpos-zindex.html.ini index f9e216a8cfc..cdd8b55f192 100644 --- a/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/block-in-inline-hittest-relpos-zindex.html.ini +++ b/tests/wpt/metadata-layout-2020/css/CSS2/normal-flow/block-in-inline-hittest-relpos-zindex.html.ini @@ -1,6 +1,3 @@ [block-in-inline-hittest-relpos-zindex.html] [position: relative; z-index: -1;] expected: FAIL - - [block-in-inline-hittest-relpos-zindex] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-align/parsing/align-tracks-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-align/parsing/align-tracks-computed.html.ini new file mode 100644 index 00000000000..e63929a5b30 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-align/parsing/align-tracks-computed.html.ini @@ -0,0 +1,45 @@ +[align-tracks-computed.html] + [Property align-tracks value 'normal'] + expected: FAIL + + [Property align-tracks value 'baseline'] + expected: FAIL + + [Property align-tracks value 'last baseline'] + expected: FAIL + + [Property align-tracks value 'space-between'] + expected: FAIL + + [Property align-tracks value 'space-around'] + expected: FAIL + + [Property align-tracks value 'space-evenly'] + expected: FAIL + + [Property align-tracks value 'stretch'] + expected: FAIL + + [Property align-tracks value 'center'] + expected: FAIL + + [Property align-tracks value 'start'] + expected: FAIL + + [Property align-tracks value 'end'] + expected: FAIL + + [Property align-tracks value 'flex-start'] + expected: FAIL + + [Property align-tracks value 'flex-end'] + expected: FAIL + + [Property align-tracks value 'unsafe end'] + expected: FAIL + + [Property align-tracks value 'safe flex-start'] + expected: FAIL + + [Property align-tracks value 'normal, normal'] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-align/parsing/align-tracks-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-align/parsing/align-tracks-valid.html.ini new file mode 100644 index 00000000000..cbe763cc151 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-align/parsing/align-tracks-valid.html.ini @@ -0,0 +1,54 @@ +[align-tracks-valid.html] + [e.style['align-tracks'\] = "normal" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "baseline" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "first baseline" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "last baseline" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "space-between" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "space-around" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "space-evenly" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "stretch" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "center" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "start" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "end" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "flex-start" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "flex-end" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "unsafe end" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "safe flex-start" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "flex-start, last baseline" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "normal, normal" should set the property value] + expected: FAIL + + [e.style['align-tracks'\] = "start, flex-end, flex-end, flex-end, flex-end" should set the property value] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-align/parsing/justify-tracks-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-align/parsing/justify-tracks-computed.html.ini new file mode 100644 index 00000000000..c5b835863d7 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-align/parsing/justify-tracks-computed.html.ini @@ -0,0 +1,45 @@ +[justify-tracks-computed.html] + [Property justify-tracks value 'normal'] + expected: FAIL + + [Property justify-tracks value 'space-between'] + expected: FAIL + + [Property justify-tracks value 'space-around'] + expected: FAIL + + [Property justify-tracks value 'space-evenly'] + expected: FAIL + + [Property justify-tracks value 'stretch'] + expected: FAIL + + [Property justify-tracks value 'center'] + expected: FAIL + + [Property justify-tracks value 'start'] + expected: FAIL + + [Property justify-tracks value 'end'] + expected: FAIL + + [Property justify-tracks value 'flex-start'] + expected: FAIL + + [Property justify-tracks value 'flex-end'] + expected: FAIL + + [Property justify-tracks value 'unsafe end'] + expected: FAIL + + [Property justify-tracks value 'safe flex-start'] + expected: FAIL + + [Property justify-tracks value 'left'] + expected: FAIL + + [Property justify-tracks value 'unsafe right'] + expected: FAIL + + [Property justify-tracks value 'normal, normal'] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-align/parsing/justify-tracks-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-align/parsing/justify-tracks-valid.html.ini new file mode 100644 index 00000000000..641b10fa7bd --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-align/parsing/justify-tracks-valid.html.ini @@ -0,0 +1,51 @@ +[justify-tracks-valid.html] + [e.style['justify-tracks'\] = "normal" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "space-between" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "space-around" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "space-evenly" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "stretch" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "center" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "start" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "end" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "flex-start" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "flex-end" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "unsafe end" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "safe flex-start" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "left" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "unsafe right" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "flex-start, last baseline" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "normal, normal" should set the property value] + expected: FAIL + + [e.style['justify-tracks'\] = "start, flex-end, flex-end, flex-end, flex-end" should set the property value] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-animations/idlharness.html.ini b/tests/wpt/metadata-layout-2020/css/css-animations/idlharness.html.ini index 81fa027d83f..9f40b8cca86 100644 --- a/tests/wpt/metadata-layout-2020/css/css-animations/idlharness.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-animations/idlharness.html.ini @@ -26,3 +26,8 @@ [HTMLElement interface: attribute onanimationcancel] expected: FAIL + [CSSKeyframesRule interface: attribute length] + expected: FAIL + + [CSSKeyframesRule interface: keyframes must inherit property "length" with the proper type] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/hittest-anonymous-box.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/hittest-anonymous-box.html.ini deleted file mode 100644 index b8f8d45a31f..00000000000 --- a/tests/wpt/metadata-layout-2020/css/css-flexbox/hittest-anonymous-box.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[hittest-anonymous-box.html] - [Hit-testing within an anonymous flex-item should return the flexbox as the hittest result.] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/hittest-before-pseudo.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/hittest-before-pseudo.html.ini new file mode 100644 index 00000000000..5b685485f3c --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/hittest-before-pseudo.html.ini @@ -0,0 +1,3 @@ +[hittest-before-pseudo.html] + [Hit-testing text within a pseudo-element flex-item should return the flexbox as the hittest result.] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-fonts/animations/font-style-interpolation.html.ini b/tests/wpt/metadata-layout-2020/css/css-fonts/animations/font-style-interpolation.html.ini new file mode 100644 index 00000000000..3780a67b928 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-fonts/animations/font-style-interpolation.html.ini @@ -0,0 +1,252 @@ +[font-style-interpolation.html] + [CSS Transitions: property from [normal\] to [oblique 10deg\] at (-2) should be [oblique -20deg\]] + expected: FAIL + + [CSS Transitions: property from [normal\] to [oblique 10deg\] at (-0.25) should be [oblique -2.5deg\]] + expected: FAIL + + [CSS Transitions: property from [normal\] to [oblique 10deg\] at (0) should be [normal\]] + expected: FAIL + + [CSS Transitions: property from [normal\] to [oblique 10deg\] at (0.3) should be [oblique 3deg\]] + expected: FAIL + + [CSS Transitions: property from [normal\] to [oblique 10deg\] at (0.6) should be [oblique 6deg\]] + expected: FAIL + + [CSS Transitions: property from [normal\] to [oblique 10deg\] at (1.5) should be [oblique 15deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [normal\] to [oblique 10deg\] at (-2) should be [oblique -20deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [normal\] to [oblique 10deg\] at (-0.25) should be [oblique -2.5deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [normal\] to [oblique 10deg\] at (0) should be [normal\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [normal\] to [oblique 10deg\] at (0.3) should be [oblique 3deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [normal\] to [oblique 10deg\] at (0.6) should be [oblique 6deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [normal\] to [oblique 10deg\] at (1.5) should be [oblique 15deg\]] + expected: FAIL + + [CSS Animations: property from [normal\] to [oblique 10deg\] at (-2) should be [oblique -20deg\]] + expected: FAIL + + [CSS Animations: property from [normal\] to [oblique 10deg\] at (-0.25) should be [oblique -2.5deg\]] + expected: FAIL + + [CSS Animations: property from [normal\] to [oblique 10deg\] at (0.3) should be [oblique 3deg\]] + expected: FAIL + + [CSS Animations: property from [normal\] to [oblique 10deg\] at (0.6) should be [oblique 6deg\]] + expected: FAIL + + [CSS Animations: property from [normal\] to [oblique 10deg\] at (1) should be [oblique 10deg\]] + expected: FAIL + + [CSS Animations: property from [normal\] to [oblique 10deg\] at (1.5) should be [oblique 15deg\]] + expected: FAIL + + [Web Animations: property from [normal\] to [oblique 10deg\] at (-2) should be [oblique -20deg\]] + expected: FAIL + + [Web Animations: property from [normal\] to [oblique 10deg\] at (-0.25) should be [oblique -2.5deg\]] + expected: FAIL + + [Web Animations: property from [normal\] to [oblique 10deg\] at (0) should be [normal\]] + expected: FAIL + + [Web Animations: property from [normal\] to [oblique 10deg\] at (0.3) should be [oblique 3deg\]] + expected: FAIL + + [Web Animations: property from [normal\] to [oblique 10deg\] at (0.6) should be [oblique 6deg\]] + expected: FAIL + + [Web Animations: property from [normal\] to [oblique 10deg\] at (1) should be [oblique 10deg\]] + expected: FAIL + + [Web Animations: property from [normal\] to [oblique 10deg\] at (1.5) should be [oblique 15deg\]] + expected: FAIL + + [Web Animations: property from [oblique 5deg\] to [oblique 15deg\] at (-2) should be [oblique -15deg\]] + expected: FAIL + + [Web Animations: property from [oblique 5deg\] to [oblique 15deg\] at (-0.25) should be [oblique 2.5deg\]] + expected: FAIL + + [Web Animations: property from [oblique 5deg\] to [oblique 15deg\] at (0) should be [oblique 5deg\]] + expected: FAIL + + [Web Animations: property from [oblique 5deg\] to [oblique 15deg\] at (0.3) should be [oblique 8deg\]] + expected: FAIL + + [Web Animations: property from [oblique 5deg\] to [oblique 15deg\] at (0.6) should be [oblique 11deg\]] + expected: FAIL + + [Web Animations: property from [oblique 5deg\] to [oblique 15deg\] at (1) should be [oblique 15deg\]] + expected: FAIL + + [Web Animations: property from [oblique 5deg\] to [oblique 15deg\] at (1.5) should be [oblique 20deg\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [inherit\] at (-2) should be [oblique -40deg\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [inherit\] at (-0.25) should be [oblique -5deg\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [inherit\] at (0) should be [normal\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [inherit\] at (0.3) should be [oblique 6deg\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [inherit\] at (0.6) should be [oblique 12deg\]] + expected: FAIL + + [CSS Transitions: property from [initial\] to [inherit\] at (1.5) should be [oblique 30deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [inherit\] at (-2) should be [oblique -40deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [inherit\] at (-0.25) should be [oblique -5deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [inherit\] at (0) should be [normal\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [inherit\] at (0.3) should be [oblique 6deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [inherit\] at (0.6) should be [oblique 12deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [initial\] to [inherit\] at (1.5) should be [oblique 30deg\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [inherit\] at (-2) should be [oblique -40deg\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [inherit\] at (-0.25) should be [oblique -5deg\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [inherit\] at (0.3) should be [oblique 6deg\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [inherit\] at (0.6) should be [oblique 12deg\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [inherit\] at (1) should be [oblique 20deg\]] + expected: FAIL + + [CSS Animations: property from [initial\] to [inherit\] at (1.5) should be [oblique 30deg\]] + expected: FAIL + + [Web Animations: property from [initial\] to [inherit\] at (-2) should be [oblique -40deg\]] + expected: FAIL + + [Web Animations: property from [initial\] to [inherit\] at (-0.25) should be [oblique -5deg\]] + expected: FAIL + + [Web Animations: property from [initial\] to [inherit\] at (0) should be [normal\]] + expected: FAIL + + [Web Animations: property from [initial\] to [inherit\] at (0.3) should be [oblique 6deg\]] + expected: FAIL + + [Web Animations: property from [initial\] to [inherit\] at (0.6) should be [oblique 12deg\]] + expected: FAIL + + [Web Animations: property from [initial\] to [inherit\] at (1) should be [oblique 20deg\]] + expected: FAIL + + [Web Animations: property from [initial\] to [inherit\] at (1.5) should be [oblique 30deg\]] + expected: FAIL + + [CSS Transitions: property from [oblique 20deg\] to [normal\] at (-1) should be [oblique 40deg\]] + expected: FAIL + + [CSS Transitions: property from [oblique 20deg\] to [normal\] at (0) should be [oblique 20deg\]] + expected: FAIL + + [CSS Transitions: property from [oblique 20deg\] to [normal\] at (0.5) should be [oblique 10deg\]] + expected: FAIL + + [CSS Transitions: property from [oblique 20deg\] to [normal\] at (1.5) should be [oblique -10deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [oblique 20deg\] to [normal\] at (-1) should be [oblique 40deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [oblique 20deg\] to [normal\] at (0) should be [oblique 20deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [oblique 20deg\] to [normal\] at (0.5) should be [oblique 10deg\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [oblique 20deg\] to [normal\] at (1.5) should be [oblique -10deg\]] + expected: FAIL + + [CSS Animations: property from [oblique 20deg\] to [normal\] at (-1) should be [oblique 40deg\]] + expected: FAIL + + [CSS Animations: property from [oblique 20deg\] to [normal\] at (0) should be [oblique 20deg\]] + expected: FAIL + + [CSS Animations: property from [oblique 20deg\] to [normal\] at (0.5) should be [oblique 10deg\]] + expected: FAIL + + [CSS Animations: property from [oblique 20deg\] to [normal\] at (1.5) should be [oblique -10deg\]] + expected: FAIL + + [Web Animations: property from [oblique 20deg\] to [normal\] at (-1) should be [oblique 40deg\]] + expected: FAIL + + [Web Animations: property from [oblique 20deg\] to [normal\] at (0) should be [oblique 20deg\]] + expected: FAIL + + [Web Animations: property from [oblique 20deg\] to [normal\] at (0.5) should be [oblique 10deg\]] + expected: FAIL + + [Web Animations: property from [oblique 20deg\] to [normal\] at (1) should be [normal\]] + expected: FAIL + + [Web Animations: property from [oblique 20deg\] to [normal\] at (1.5) should be [oblique -10deg\]] + expected: FAIL + + [CSS Transitions: property from [oblique -90deg\] to [oblique 90deg\] at (0.5) should be [normal\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [oblique -90deg\] to [oblique 90deg\] at (0.5) should be [normal\]] + expected: FAIL + + [CSS Animations: property from [oblique -90deg\] to [oblique 90deg\] at (0.5) should be [normal\]] + expected: FAIL + + [Web Animations: property from [oblique -90deg\] to [oblique 90deg\] at (-2) should be [oblique -90deg\]] + expected: FAIL + + [Web Animations: property from [oblique -90deg\] to [oblique 90deg\] at (-1) should be [oblique -90deg\]] + expected: FAIL + + [Web Animations: property from [oblique -90deg\] to [oblique 90deg\] at (0) should be [oblique -90deg\]] + expected: FAIL + + [Web Animations: property from [oblique -90deg\] to [oblique 90deg\] at (0.5) should be [normal\]] + expected: FAIL + + [Web Animations: property from [oblique -90deg\] to [oblique 90deg\] at (1) should be [oblique 90deg\]] + expected: FAIL + + [Web Animations: property from [oblique -90deg\] to [oblique 90deg\] at (1.5) should be [oblique 90deg\]] + expected: FAIL + + [An interpolation to inherit updates correctly on a parent style change.] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-fonts/font-size-adjust-order-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-fonts/font-size-adjust-order-001.html.ini new file mode 100644 index 00000000000..f5693b3cd78 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-fonts/font-size-adjust-order-001.html.ini @@ -0,0 +1,2 @@ +[font-size-adjust-order-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-fonts/font-size-adjust-units-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-fonts/font-size-adjust-units-001.html.ini new file mode 100644 index 00000000000..e6329aeaf61 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-fonts/font-size-adjust-units-001.html.ini @@ -0,0 +1,2 @@ +[font-size-adjust-units-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-fonts/font-variant-alternates-layers.html.ini b/tests/wpt/metadata-layout-2020/css/css-fonts/font-variant-alternates-layers.html.ini new file mode 100644 index 00000000000..b2b9cbdfacd --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-fonts/font-variant-alternates-layers.html.ini @@ -0,0 +1,2 @@ +[font-variant-alternates-layers.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-fonts/variations/at-font-face-font-matching.html.ini b/tests/wpt/metadata-layout-2020/css/css-fonts/variations/at-font-face-font-matching.html.ini index 4cdcdbaa1a6..e8b3bd3d92c 100644 --- a/tests/wpt/metadata-layout-2020/css/css-fonts/variations/at-font-face-font-matching.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-fonts/variations/at-font-face-font-matching.html.ini @@ -149,9 +149,6 @@ [Matching font-style: 'italic' should prefer 'oblique 0deg' over 'oblique -60deg -30deg'] expected: FAIL - [Matching font-style: 'oblique 21deg' should prefer 'oblique 0deg' over 'oblique -50deg -20deg'] - expected: FAIL - [Matching font-style: 'oblique 10deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'] expected: FAIL @@ -236,9 +233,6 @@ [Matching font-weight: '500' should prefer '500' over '450 460'] expected: FAIL - [Matching font-weight: '399' should prefer '200 300' over '400'] - expected: FAIL - [Matching font-weight: '399' should prefer '400' over '450 460'] expected: FAIL @@ -293,9 +287,6 @@ [Matching font-style: 'italic' should prefer 'oblique -60deg -30deg' over 'oblique -50deg -40deg'] expected: FAIL - [Matching font-style: 'oblique -10deg' should prefer 'oblique -50deg -40deg' over 'italic'] - expected: FAIL - [Matching font-weight: '430' should prefer '500' over '400 425'] expected: FAIL @@ -310,3 +301,18 @@ [Matching font-style: 'oblique -21deg' should prefer 'oblique -60deg -40deg' over 'oblique -10deg'] expected: FAIL + + [Matching font-weight: '400' should prefer '351 398' over '501 550'] + expected: FAIL + + [Matching font-weight: '430' should prefer '450 460' over '500'] + expected: FAIL + + [Matching font-weight: '430' should prefer '400 425' over '350 399'] + expected: FAIL + + [Matching font-style: 'oblique 21deg' should prefer 'oblique 20deg' over 'oblique 10deg'] + expected: FAIL + + [Matching font-style: 'oblique -21deg' should prefer 'oblique -21deg' over 'oblique -60deg -40deg'] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-images/object-view-box-fit-cover-video.html.ini b/tests/wpt/metadata-layout-2020/css/css-images/object-view-box-fit-cover-video.html.ini new file mode 100644 index 00000000000..bc8e4ad026d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-images/object-view-box-fit-cover-video.html.ini @@ -0,0 +1,2 @@ +[object-view-box-fit-cover-video.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/bidi/bidi-lines-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/bidi/bidi-lines-002.html.ini new file mode 100644 index 00000000000..6a5b59fbeab --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/bidi/bidi-lines-002.html.ini @@ -0,0 +1,2 @@ +[bidi-lines-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-001.html.ini new file mode 100644 index 00000000000..f3989e1c424 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-001.html.ini @@ -0,0 +1,2 @@ +[hyphens-i18n-auto-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-002.html.ini new file mode 100644 index 00000000000..a701101bcb5 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-002.html.ini @@ -0,0 +1,2 @@ +[hyphens-i18n-auto-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-003.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-003.html.ini new file mode 100644 index 00000000000..c1de6aa6781 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-003.html.ini @@ -0,0 +1,2 @@ +[hyphens-i18n-auto-003.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-004.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-004.html.ini new file mode 100644 index 00000000000..eb41c437a73 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-004.html.ini @@ -0,0 +1,2 @@ +[hyphens-i18n-auto-004.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-005.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-005.html.ini new file mode 100644 index 00000000000..32339e8288b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-auto-005.html.ini @@ -0,0 +1,2 @@ +[hyphens-i18n-auto-005.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-001.html.ini new file mode 100644 index 00000000000..9b911263f8f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-001.html.ini @@ -0,0 +1,2 @@ +[hyphens-i18n-manual-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-002.html.ini new file mode 100644 index 00000000000..22217afa234 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-002.html.ini @@ -0,0 +1,2 @@ +[hyphens-i18n-manual-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-003.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-003.html.ini new file mode 100644 index 00000000000..f2678305c41 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-003.html.ini @@ -0,0 +1,2 @@ +[hyphens-i18n-manual-003.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-004.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-004.html.ini new file mode 100644 index 00000000000..27d28706683 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-004.html.ini @@ -0,0 +1,2 @@ +[hyphens-i18n-manual-004.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-005.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-005.html.ini new file mode 100644 index 00000000000..863ba77e2ff --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/hyphens/i18n/hyphens-i18n-manual-005.html.ini @@ -0,0 +1,2 @@ +[hyphens-i18n-manual-005.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/letter-spacing/letter-spacing-ligatures-002.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/letter-spacing/letter-spacing-ligatures-002.html.ini new file mode 100644 index 00000000000..fa87a1d43f4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/letter-spacing/letter-spacing-ligatures-002.html.ini @@ -0,0 +1,2 @@ +[letter-spacing-ligatures-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/letter-spacing/letter-spacing-ligatures-003.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/letter-spacing/letter-spacing-ligatures-003.html.ini new file mode 100644 index 00000000000..8b0f8b5aed2 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/letter-spacing/letter-spacing-ligatures-003.html.ini @@ -0,0 +1,2 @@ +[letter-spacing-ligatures-003.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/letter-spacing/letter-spacing-ligatures-004.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/letter-spacing/letter-spacing-ligatures-004.html.ini new file mode 100644 index 00000000000..d4835dc7f6c --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/letter-spacing/letter-spacing-ligatures-004.html.ini @@ -0,0 +1,2 @@ +[letter-spacing-ligatures-004.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-022.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-022.html.ini new file mode 100644 index 00000000000..faa943ebfdc --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-022.html.ini @@ -0,0 +1,2 @@ +[line-breaking-022.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-023.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-023.html.ini new file mode 100644 index 00000000000..b72147da865 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-023.html.ini @@ -0,0 +1,2 @@ +[line-breaking-023.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-024.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-024.html.ini new file mode 100644 index 00000000000..c90a18a4db9 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-024.html.ini @@ -0,0 +1,2 @@ +[line-breaking-024.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-025.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-025.html.ini new file mode 100644 index 00000000000..490e03342d8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-025.html.ini @@ -0,0 +1,2 @@ +[line-breaking-025.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-026.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-026.html.ini new file mode 100644 index 00000000000..885652a0c25 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-026.html.ini @@ -0,0 +1,2 @@ +[line-breaking-026.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-027.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-027.html.ini new file mode 100644 index 00000000000..7b586c55a96 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/line-breaking/line-breaking-027.html.ini @@ -0,0 +1,2 @@ +[line-breaking-027.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/overflow-wrap/overflow-wrap-anywhere-inline-002.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/overflow-wrap/overflow-wrap-anywhere-inline-002.tentative.html.ini new file mode 100644 index 00000000000..97039429c52 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/overflow-wrap/overflow-wrap-anywhere-inline-002.tentative.html.ini @@ -0,0 +1,2 @@ +[overflow-wrap-anywhere-inline-002.tentative.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/overflow-wrap/overflow-wrap-anywhere-inline-003.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/overflow-wrap/overflow-wrap-anywhere-inline-003.tentative.html.ini new file mode 100644 index 00000000000..887c19b3ded --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/overflow-wrap/overflow-wrap-anywhere-inline-003.tentative.html.ini @@ -0,0 +1,2 @@ +[overflow-wrap-anywhere-inline-003.tentative.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/overflow-wrap/overflow-wrap-anywhere-inline-004.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/overflow-wrap/overflow-wrap-anywhere-inline-004.tentative.html.ini new file mode 100644 index 00000000000..36f9032e815 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/overflow-wrap/overflow-wrap-anywhere-inline-004.tentative.html.ini @@ -0,0 +1,2 @@ +[overflow-wrap-anywhere-inline-004.tentative.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/parsing/text-justify-computed-legacy.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/parsing/text-justify-computed-legacy.html.ini new file mode 100644 index 00000000000..210a79f60ac --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/parsing/text-justify-computed-legacy.html.ini @@ -0,0 +1,3 @@ +[text-justify-computed-legacy.html] + [Property text-justify value 'distribute'] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/text-align/text-align-match-parent-05.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/text-align/text-align-match-parent-05.html.ini new file mode 100644 index 00000000000..5dbe4e3bcb9 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/text-align/text-align-match-parent-05.html.ini @@ -0,0 +1,2 @@ +[text-align-match-parent-05.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/trailing-other-space-separators-break-spaces-004.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/trailing-other-space-separators-break-spaces-004.html.ini deleted file mode 100644 index 3257d1b4d49..00000000000 --- a/tests/wpt/metadata-layout-2020/css/css-text/white-space/trailing-other-space-separators-break-spaces-004.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[trailing-other-space-separators-break-spaces-004.html] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/trailing-other-space-separators-break-spaces-007.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/trailing-other-space-separators-break-spaces-007.html.ini new file mode 100644 index 00000000000..98f844212dd --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/trailing-other-space-separators-break-spaces-007.html.ini @@ -0,0 +1,2 @@ +[trailing-other-space-separators-break-spaces-007.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-ethiopic.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-ethiopic.html.ini new file mode 100644 index 00000000000..4cd08ee4c34 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-ethiopic.html.ini @@ -0,0 +1,2 @@ +[word-break-break-all-ethiopic.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-inline-004.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-inline-004.tentative.html.ini new file mode 100644 index 00000000000..4f8a76e98c7 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-inline-004.tentative.html.ini @@ -0,0 +1,2 @@ +[word-break-break-all-inline-004.tentative.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-inline-007.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-inline-007.tentative.html.ini new file mode 100644 index 00000000000..0aad3a150dd --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-inline-007.tentative.html.ini @@ -0,0 +1,2 @@ +[word-break-break-all-inline-007.tentative.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-inline-010.tentative.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-inline-010.tentative.html.ini new file mode 100644 index 00000000000..96372271bca --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/word-break/word-break-break-all-inline-010.tentative.html.ini @@ -0,0 +1,2 @@ +[word-break-break-all-inline-010.tentative.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini index 4a1232b3c22..3f9c5003739 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini @@ -1,6 +1,3 @@ [transform-scale-hittest.html] [Hit test intersecting scaled box] expected: FAIL - - [Hit test within unscaled box] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-001.html.ini index ddb5c8d2b0c..c4daffd168f 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-001.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transitions/properties-value-001.html.ini @@ -52,153 +52,3 @@ [background-position length(px) / events] expected: FAIL - - [color color(rgba) / values] - expected: FAIL - - [font-size length(pt) / values] - expected: FAIL - - [font-size length(pc) / values] - expected: FAIL - - [font-size length(px) / values] - expected: FAIL - - [font-size length(em) / values] - expected: FAIL - - [font-size length(ex) / values] - expected: FAIL - - [font-size length(mm) / values] - expected: FAIL - - [font-size length(cm) / values] - expected: FAIL - - [font-size length(in) / values] - expected: FAIL - - [font-size percentage(%) / values] - expected: FAIL - - [font-weight font-weight(keyword) / values] - expected: FAIL - - [font-weight font-weight(numeric) / values] - expected: FAIL - - [line-height number(integer) / values] - expected: FAIL - - [line-height number(decimal) / values] - expected: FAIL - - [line-height length(pt) / values] - expected: FAIL - - [line-height length(pc) / values] - expected: FAIL - - [line-height length(px) / values] - expected: FAIL - - [line-height length(em) / values] - expected: FAIL - - [line-height length(ex) / values] - expected: FAIL - - [line-height length(mm) / values] - expected: FAIL - - [line-height length(cm) / values] - expected: FAIL - - [line-height length(in) / values] - expected: FAIL - - [line-height percentage(%) / values] - expected: FAIL - - [letter-spacing length(pt) / values] - expected: FAIL - - [letter-spacing length(pc) / values] - expected: FAIL - - [letter-spacing length(px) / values] - expected: FAIL - - [letter-spacing length(em) / values] - expected: FAIL - - [letter-spacing length(ex) / values] - expected: FAIL - - [letter-spacing length(mm) / values] - expected: FAIL - - [letter-spacing length(cm) / values] - expected: FAIL - - [letter-spacing length(in) / values] - expected: FAIL - - [word-spacing length(pt) / values] - expected: FAIL - - [word-spacing length(pc) / values] - expected: FAIL - - [word-spacing length(px) / values] - expected: FAIL - - [word-spacing length(em) / values] - expected: FAIL - - [word-spacing length(ex) / values] - expected: FAIL - - [word-spacing length(mm) / values] - expected: FAIL - - [word-spacing length(cm) / values] - expected: FAIL - - [word-spacing length(in) / values] - expected: FAIL - - [word-spacing percentage(%) / values] - expected: FAIL - - [text-indent length(pt) / values] - expected: FAIL - - [text-indent length(pc) / values] - expected: FAIL - - [text-indent length(px) / values] - expected: FAIL - - [text-indent length(em) / values] - expected: FAIL - - [text-indent length(ex) / values] - expected: FAIL - - [text-indent length(mm) / values] - expected: FAIL - - [text-indent length(cm) / values] - expected: FAIL - - [text-indent length(in) / values] - expected: FAIL - - [text-indent percentage(%) / values] - expected: FAIL - - [text-shadow shadow(shadow) / values] - expected: FAIL diff --git a/tests/wpt/metadata-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 845bef47ab4..270150fa9f4 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 @@ -179,302 +179,152 @@ [padding-bottom length(em) / events] expected: FAIL - [max-height length(ex) / events] + [padding-bottom length(ex) / events] expected: FAIL - [max-height length(mm) / events] + [padding-bottom length(mm) / events] expected: FAIL - [max-height length(cm) / events] + [padding-bottom length(cm) / events] expected: FAIL - [max-height length(in) / events] + [padding-bottom length(in) / events] expected: FAIL - [max-height percentage(%) / events] + [padding-left length(pt) / events] expected: FAIL - [max-width length(pt) / events] + [padding-left length(pc) / events] expected: FAIL - [max-width length(pc) / events] + [padding-left length(px) / events] expected: FAIL - [max-width length(px) / events] + [padding-left length(em) / events] expected: FAIL - [max-width length(em) / events] + [padding-left length(ex) / events] expected: FAIL - [max-width length(ex) / events] + [padding-left length(mm) / events] expected: FAIL - [max-width length(mm) / events] + [padding-left length(cm) / events] expected: FAIL - [max-width length(cm) / events] + [padding-left length(in) / events] expected: FAIL - [max-width length(in) / events] + [padding-right length(pt) / events] expected: FAIL - [max-width percentage(%) / events] + [padding-right length(pc) / events] expected: FAIL - [top length(pt) / events] + [padding-right length(px) / events] expected: FAIL - [top length(pc) / events] + [padding-right length(em) / events] expected: FAIL - [top length(px) / events] + [padding-right length(ex) / events] expected: FAIL - [top length(em) / events] + [padding-right length(mm) / events] expected: FAIL - [top length(ex) / events] + [padding-right length(cm) / events] expected: FAIL - [top length(mm) / events] + [padding-right length(in) / events] expected: FAIL - [top length(cm) / events] + [padding-top length(pt) / events] expected: FAIL - [top length(in) / events] + [padding-top length(pc) / events] expected: FAIL - [top percentage(%) / events] + [padding-top length(px) / events] expected: FAIL - [right length(pt) / events] + [padding-top length(em) / events] expected: FAIL - [right length(pc) / events] + [padding-top length(ex) / events] expected: FAIL - [right length(px) / events] + [padding-top length(mm) / events] expected: FAIL - [right length(em) / events] + [padding-top length(cm) / events] expected: FAIL - [right length(ex) / events] + [padding-top length(in) / events] expected: FAIL - [right length(mm) / events] + [margin-bottom length(pt) / events] expected: FAIL - [right length(cm) / events] + [margin-bottom length(pc) / events] expected: FAIL - [right length(in) / events] + [margin-bottom length(px) / events] expected: FAIL - [right percentage(%) / events] + [margin-bottom length(em) / events] expected: FAIL - [bottom length(pt) / events] + [margin-bottom length(ex) / events] expected: FAIL - [bottom length(pc) / events] + [margin-bottom length(mm) / events] expected: FAIL - [bottom length(px) / events] + [margin-bottom length(cm) / events] expected: FAIL - [bottom length(em) / events] + [margin-bottom length(in) / events] expected: FAIL - [bottom length(ex) / events] + [margin-left length(pt) / events] expected: FAIL - [bottom length(mm) / events] + [margin-left length(pc) / events] expected: FAIL - [bottom length(cm) / events] + [margin-left length(px) / events] expected: FAIL - [bottom length(in) / events] + [margin-left length(em) / events] expected: FAIL - [bottom percentage(%) / events] + [margin-left length(ex) / events] expected: FAIL - [left length(pt) / events] + [margin-left length(mm) / events] expected: FAIL - [left length(pc) / events] + [margin-left length(cm) / events] expected: FAIL - [left length(px) / events] + [margin-left length(in) / events] expected: FAIL - [left length(em) / events] + [margin-right length(pt) / events] expected: FAIL - [left length(ex) / events] + [margin-right length(pc) / events] expected: FAIL - [left length(mm) / events] + [margin-right length(px) / events] expected: FAIL - [left length(cm) / events] + [margin-right length(em) / events] expected: FAIL - [left length(in) / events] + [margin-right length(ex) / events] expected: FAIL - [left percentage(%) / events] - expected: FAIL - - [color color(rgba) / events] - expected: FAIL - - [font-size length(pt) / events] - expected: FAIL - - [font-size length(pc) / events] - expected: FAIL - - [font-size length(px) / events] - expected: FAIL - - [font-size length(em) / events] - expected: FAIL - - [font-size length(ex) / events] - expected: FAIL - - [font-size length(mm) / events] - expected: FAIL - - [font-size length(cm) / events] - expected: FAIL - - [font-size length(in) / events] - expected: FAIL - - [font-size percentage(%) / events] - expected: FAIL - - [font-weight font-weight(keyword) / events] - expected: FAIL - - [font-weight font-weight(numeric) / events] - expected: FAIL - - [line-height number(integer) / events] - expected: FAIL - - [line-height number(decimal) / events] - expected: FAIL - - [line-height length(pt) / events] - expected: FAIL - - [line-height length(pc) / events] - expected: FAIL - - [line-height length(px) / events] - expected: FAIL - - [line-height length(em) / events] - expected: FAIL - - [line-height length(ex) / events] - expected: FAIL - - [line-height length(mm) / events] - expected: FAIL - - [line-height length(cm) / events] - expected: FAIL - - [line-height length(in) / events] - expected: FAIL - - [line-height percentage(%) / events] - expected: FAIL - - [letter-spacing length(pt) / events] - expected: FAIL - - [letter-spacing length(pc) / events] - expected: FAIL - - [letter-spacing length(px) / events] - expected: FAIL - - [letter-spacing length(em) / events] - expected: FAIL - - [letter-spacing length(ex) / events] - expected: FAIL - - [letter-spacing length(mm) / events] - expected: FAIL - - [letter-spacing length(cm) / events] - expected: FAIL - - [letter-spacing length(in) / events] - expected: FAIL - - [word-spacing length(pt) / events] - expected: FAIL - - [word-spacing length(pc) / events] - expected: FAIL - - [word-spacing length(px) / events] - expected: FAIL - - [word-spacing length(em) / events] - expected: FAIL - - [word-spacing length(ex) / events] - expected: FAIL - - [word-spacing length(mm) / events] - expected: FAIL - - [word-spacing length(cm) / events] - expected: FAIL - - [word-spacing length(in) / events] - expected: FAIL - - [word-spacing percentage(%) / events] - expected: FAIL - - [text-indent length(pt) / events] - expected: FAIL - - [text-indent length(pc) / events] - expected: FAIL - - [text-indent length(px) / events] - expected: FAIL - - [text-indent length(em) / events] - expected: FAIL - - [text-indent length(ex) / events] - expected: FAIL - - [text-indent length(mm) / events] - expected: FAIL - - [text-indent length(cm) / events] - expected: FAIL - - [text-indent length(in) / events] - expected: FAIL - - [text-indent percentage(%) / events] - expected: FAIL - - [text-shadow shadow(shadow) / events] + [margin-right length(mm) / events] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-ui/accent-color-invalidation-currentcolor.html.ini b/tests/wpt/metadata-layout-2020/css/css-ui/accent-color-invalidation-currentcolor.html.ini deleted file mode 100644 index 19a0be52219..00000000000 --- a/tests/wpt/metadata-layout-2020/css/css-ui/accent-color-invalidation-currentcolor.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[accent-color-invalidation-currentcolor.html] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-values/rch-invalidation.html.ini b/tests/wpt/metadata-layout-2020/css/css-values/rch-invalidation.html.ini new file mode 100644 index 00000000000..da811342a70 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-values/rch-invalidation.html.ini @@ -0,0 +1,3 @@ +[rch-invalidation.html] + [CSS Values and Units Test: rch invalidation] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-values/ric-invalidation.html.ini b/tests/wpt/metadata-layout-2020/css/css-values/ric-invalidation.html.ini new file mode 100644 index 00000000000..c1defcda118 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-values/ric-invalidation.html.ini @@ -0,0 +1,3 @@ +[ric-invalidation.html] + [CSS Values and Units Test: ric invalidation] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-values/rlh-invalidation.html.ini b/tests/wpt/metadata-layout-2020/css/css-values/rlh-invalidation.html.ini new file mode 100644 index 00000000000..c789d36e7f1 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-values/rlh-invalidation.html.ini @@ -0,0 +1,3 @@ +[rlh-invalidation.html] + [CSS Values and Units Test: rlh invalidation] + 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 new file mode 100644 index 00000000000..cf67b5d03dd --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-dynamic-anon-box.html.ini @@ -0,0 +1,3 @@ +[elementFromPoint-dynamic-anon-box.html] + [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-list-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-list-001.html.ini index 1f892861935..f50036a37ba 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-list-001.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-list-001.html.ini @@ -13,3 +13,6 @@ [
  • Outside 1
  • ] expected: FAIL + + [
  • Image Inside 2
  • ] + 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 3ddd598f5c4..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 @@ -16,6 +16,3 @@ [test the top of layer] expected: FAIL - - [test some point of the element: top left corner] - expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/idlharness.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/idlharness.html.ini index 15e216708fd..090fc204ddd 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/idlharness.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/idlharness.html.ini @@ -577,3 +577,9 @@ [Element interface: calling checkVisibility(optional CheckVisibilityOptions) on document.createElementNS("x", "y") with too few arguments must throw TypeError] expected: FAIL + + [VisualViewport interface: attribute onscrollend] + expected: FAIL + + [VisualViewport interface: self.visualViewport must inherit property "onscrollend" with the proper type] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-attribute.html.ini b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-attribute.html.ini new file mode 100644 index 00000000000..c5e02240439 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-attribute.html.ini @@ -0,0 +1,2 @@ +[nth-child-of-attribute.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-classname-002.html.ini b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-classname-002.html.ini new file mode 100644 index 00000000000..618d0d20ac1 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-classname-002.html.ini @@ -0,0 +1,2 @@ +[nth-child-of-classname-002.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-has.html.ini b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-has.html.ini new file mode 100644 index 00000000000..f9ae9a26de4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-has.html.ini @@ -0,0 +1,2 @@ +[nth-child-of-has.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-not.html.ini b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-not.html.ini new file mode 100644 index 00000000000..85379cd3514 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-not.html.ini @@ -0,0 +1,2 @@ +[nth-child-of-not.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-nth-child.html.ini b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-nth-child.html.ini new file mode 100644 index 00000000000..e98ea78c8db --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-nth-child.html.ini @@ -0,0 +1,2 @@ +[nth-child-of-nth-child.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-universal-selector.html.ini b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-universal-selector.html.ini new file mode 100644 index 00000000000..ab158554b19 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/selectors/nth-child-of-universal-selector.html.ini @@ -0,0 +1,2 @@ +[nth-child-of-universal-selector.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/custom-elements/form-associated/ElementInternals-validation.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/form-associated/ElementInternals-validation.html.ini index 087d27c84b4..54dc5e07d36 100644 --- a/tests/wpt/metadata-layout-2020/custom-elements/form-associated/ElementInternals-validation.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/form-associated/ElementInternals-validation.html.ini @@ -32,3 +32,6 @@ [Custom control affects :valid :invalid for FORM and FIELDSET] expected: FAIL + + [willValidate after upgrade (document.createElement)] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/custom-elements/htmlconstructor/newtarget-customized-builtins.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/htmlconstructor/newtarget-customized-builtins.html.ini new file mode 100644 index 00000000000..61d65764ac3 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/custom-elements/htmlconstructor/newtarget-customized-builtins.html.ini @@ -0,0 +1,12 @@ +[newtarget-customized-builtins.html] + [If prototype is not object (null), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements)] + expected: FAIL + + [If prototype is not object (undefined), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements)] + expected: FAIL + + [If prototype is not object (5), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements)] + expected: FAIL + + [If prototype is not object (string), derives the fallback from NewTarget's GetFunctionRealm (customized built-in elements)] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/parser/serializing-html-fragments.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/parser/serializing-html-fragments-customized-builtins.html.ini similarity index 78% rename from tests/wpt/metadata/custom-elements/parser/serializing-html-fragments.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/parser/serializing-html-fragments-customized-builtins.html.ini index 42d99dad314..15f02f181e4 100644 --- a/tests/wpt/metadata/custom-elements/parser/serializing-html-fragments.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/parser/serializing-html-fragments-customized-builtins.html.ini @@ -1,7 +1,6 @@ -[serializing-html-fragments.html] +[serializing-html-fragments-customized-builtins.html] ["is" value should be serialized if the custom element has no "is" content attribute] expected: FAIL ["is" value should be serialized even for an undefined element] expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/custom-elements/pseudo-class-defined-customized-builtins.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/pseudo-class-defined-customized-builtins.html.ini new file mode 100644 index 00000000000..ee47a01f3e2 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/custom-elements/pseudo-class-defined-customized-builtins.html.ini @@ -0,0 +1,12 @@ +[pseudo-class-defined-customized-builtins.html] + [createElementNS("http://www.w3.org/2000/svg", "abbr", is:"my-abbr") should be :defined] + expected: FAIL + + [Without browsing context: createElementNS("http://www.w3.org/2000/svg", "abbr", is:"my-abbr") should be :defined] + expected: FAIL + + [createElementNS("http://www.w3.org/2000/svg", "p", is:"") should be :defined] + expected: FAIL + + [Without browsing context: createElementNS("http://www.w3.org/2000/svg", "p", is:"") should be :defined] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLAreaElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLAreaElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLAreaElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLAreaElement.html.ini index 1e92b595991..3701b29cccc 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLAreaElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLAreaElement.html.ini @@ -1,32 +1,11 @@ [HTMLAreaElement.html] - [alt on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [shape on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [referrerPolicy on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [download on HTMLAreaElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [coords on HTMLAreaElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - [alt on HTMLAreaElement must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL - [ping on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] + [alt on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [ping on HTMLAreaElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [referrerPolicy on HTMLAreaElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [download on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] + [coords on HTMLAreaElement must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL [coords on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] @@ -35,3 +14,23 @@ [shape on HTMLAreaElement must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL + [shape on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL + + [download on HTMLAreaElement must enqueue an attributeChanged reaction when adding a new attribute] + expected: FAIL + + [download on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL + + [ping on HTMLAreaElement must enqueue an attributeChanged reaction when adding a new attribute] + expected: FAIL + + [ping on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL + + [referrerPolicy on HTMLAreaElement must enqueue an attributeChanged reaction when adding a new attribute] + expected: FAIL + + [referrerPolicy on HTMLAreaElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLBaseElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLBaseElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLBaseElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLBaseElement.html.ini index 33970e18200..6db6a78d335 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLBaseElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLBaseElement.html.ini @@ -4,4 +4,3 @@ [target on HTMLBaseElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLButtonElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLButtonElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLButtonElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLButtonElement.html.ini index c6bbb361c93..56a441ed6d7 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLButtonElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLButtonElement.html.ini @@ -1,7 +1,6 @@ [HTMLButtonElement.html] - [autofocus on HTMLButtonElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - [autofocus on HTMLButtonElement must enqueue an attributeChanged reaction when adding autofocus content attribute] expected: FAIL + [autofocus on HTMLButtonElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLEmbedElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLEmbedElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLEmbedElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLEmbedElement.html.ini index b67dd39418e..12b25cfb862 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLEmbedElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLEmbedElement.html.ini @@ -2,16 +2,13 @@ [src on HTMLEmbedElement must enqueue an attributeChanged reaction when adding src content attribute] expected: FAIL - [height on HTMLEmbedElement must enqueue an attributeChanged reaction when adding height content attribute] - expected: FAIL - - [type on HTMLEmbedElement must enqueue an attributeChanged reaction when replacing an existing attribute] + [src on HTMLEmbedElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL [type on HTMLEmbedElement must enqueue an attributeChanged reaction when adding type content attribute] expected: FAIL - [src on HTMLEmbedElement must enqueue an attributeChanged reaction when replacing an existing attribute] + [type on HTMLEmbedElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL [width on HTMLEmbedElement must enqueue an attributeChanged reaction when adding width content attribute] @@ -20,6 +17,8 @@ [width on HTMLEmbedElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [height on HTMLEmbedElement must enqueue an attributeChanged reaction when replacing an existing attribute] + [height on HTMLEmbedElement must enqueue an attributeChanged reaction when adding height content attribute] expected: FAIL + [height on HTMLEmbedElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLImageElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLImageElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLImageElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLImageElement.html.ini index 22170bf6d9a..e06ae4f37f9 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLImageElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLImageElement.html.ini @@ -1,13 +1,12 @@ [HTMLImageElement.html] - [decoding on HTMLImageElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [decoding on HTMLImageElement must enqueue an attributeChanged reaction when adding a new attribute] + [sizes on HTMLImageElement must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL [sizes on HTMLImageElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [sizes on HTMLImageElement must enqueue an attributeChanged reaction when adding a new attribute] + [decoding on HTMLImageElement must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL + [decoding on HTMLImageElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLMapElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLMapElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLMapElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLMapElement.html.ini index 56f94582f18..737e940ad89 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLMapElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLMapElement.html.ini @@ -4,4 +4,3 @@ [name on HTMLMapElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLMetaElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLMetaElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLMetaElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLMetaElement.html.ini index a3f9d106282..9a39c5f77b1 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLMetaElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLMetaElement.html.ini @@ -4,4 +4,3 @@ [httpEquiv on HTMLMetaElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLMeterElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLMeterElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLMeterElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLMeterElement.html.ini index cd06c4cfd9b..4a09a19f78e 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLMeterElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLMeterElement.html.ini @@ -1,37 +1,36 @@ [HTMLMeterElement.html] - [max on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [high on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [min on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [optimum on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [low on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [low on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - - [min on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [high on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] - expected: FAIL - [value on HTMLMeterElement must enqueue an attributeChanged reaction when adding value content attribute] expected: FAIL [value on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL + [min on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] + expected: FAIL + + [min on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL + [max on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL + [max on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL + + [low on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] + expected: FAIL + + [low on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL + + [high on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] + expected: FAIL + + [high on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL + + [optimum on HTMLMeterElement must enqueue an attributeChanged reaction when adding a new attribute] + expected: FAIL + [optimum on HTMLMeterElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLModElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLModElement.html.ini new file mode 100644 index 00000000000..49a1ab3fc0e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLModElement.html.ini @@ -0,0 +1,2 @@ +[HTMLModElement.html] + expected: ERROR diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLOListElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLOListElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLOListElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLOListElement.html.ini index c1ab7a594a9..e88df5cf54f 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLOListElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLOListElement.html.ini @@ -1,19 +1,18 @@ [HTMLOListElement.html] - [type on HTMLOListElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [start on HTMLOListElement must enqueue an attributeChanged reaction when adding start content attribute] - expected: FAIL - - [type on HTMLOListElement must enqueue an attributeChanged reaction when adding type content attribute] + [reversed on HTMLOListElement must enqueue an attributeChanged reaction when adding reversed content attribute] expected: FAIL [reversed on HTMLOListElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [reversed on HTMLOListElement must enqueue an attributeChanged reaction when adding reversed content attribute] + [start on HTMLOListElement must enqueue an attributeChanged reaction when adding start content attribute] expected: FAIL [start on HTMLOListElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL + [type on HTMLOListElement must enqueue an attributeChanged reaction when adding type content attribute] + expected: FAIL + + [type on HTMLOListElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLOptGroupElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLOptGroupElement.html.ini new file mode 100644 index 00000000000..bf855bdb2ca --- /dev/null +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLOptGroupElement.html.ini @@ -0,0 +1,2 @@ +[HTMLOptGroupElement.html] + expected: ERROR diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLParamElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLParamElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLParamElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLParamElement.html.ini index 88f230d70bc..e5bcbca7f26 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLParamElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLParamElement.html.ini @@ -1,13 +1,12 @@ [HTMLParamElement.html] - [value on HTMLParamElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [value on HTMLParamElement must enqueue an attributeChanged reaction when adding a new attribute] + [name on HTMLParamElement must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL [name on HTMLParamElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [name on HTMLParamElement must enqueue an attributeChanged reaction when adding a new attribute] + [value on HTMLParamElement must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL + [value on HTMLParamElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLQuoteElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLQuoteElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLQuoteElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLQuoteElement.html.ini index 3994e9b0b94..b3598f04958 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLQuoteElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLQuoteElement.html.ini @@ -1,13 +1,12 @@ [HTMLQuoteElement.html] - [cite on q use HTMLQuoteElement must enqueue an attributeChanged reaction when adding cite content attribute] - expected: FAIL - - [cite on q use HTMLQuoteElement must enqueue an attributeChanged reaction when replacing an existing attribute] + [cite on blockquote use HTMLQuoteElement must enqueue an attributeChanged reaction when adding cite content attribute] expected: FAIL [cite on blockquote use HTMLQuoteElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [cite on blockquote use HTMLQuoteElement must enqueue an attributeChanged reaction when adding cite content attribute] + [cite on q use HTMLQuoteElement must enqueue an attributeChanged reaction when adding cite content attribute] expected: FAIL + [cite on q use HTMLQuoteElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLSlotElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLSlotElement.html.ini new file mode 100644 index 00000000000..06f319e7a49 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLSlotElement.html.ini @@ -0,0 +1,2 @@ +[HTMLSlotElement.html] + expected: ERROR diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLStyleElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLStyleElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLStyleElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLStyleElement.html.ini index 14e46c3d902..49c92ee6498 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLStyleElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLStyleElement.html.ini @@ -1,7 +1,6 @@ [HTMLStyleElement.html] - [media on HTMLStyleElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - [media on HTMLStyleElement must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL + [media on HTMLStyleElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLTableCellElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLTableCellElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLTableCellElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLTableCellElement.html.ini index d76142fdac4..478feef5051 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLTableCellElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLTableCellElement.html.ini @@ -1,25 +1,24 @@ [HTMLTableCellElement.html] - [abbr on HTMLTableCellElement in th must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - [headers on HTMLTableCellElement in td must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL - [scope on HTMLTableCellElement in th must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - [headers on HTMLTableCellElement in td must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [headers on HTMLTableCellElement in th must enqueue an attributeChanged reaction when replacing an existing attribute] + [headers on HTMLTableCellElement in th must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL - [headers on HTMLTableCellElement in th must enqueue an attributeChanged reaction when adding a new attribute] + [headers on HTMLTableCellElement in th must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL [scope on HTMLTableCellElement in th must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL + [scope on HTMLTableCellElement in th must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL + [abbr on HTMLTableCellElement in th must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL + [abbr on HTMLTableCellElement in th must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLTableColElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLTableColElement.html.ini similarity index 99% rename from tests/wpt/metadata/custom-elements/reactions/HTMLTableColElement.html.ini rename to tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLTableColElement.html.ini index 6652b29bf0b..c50556892c8 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLTableColElement.html.ini +++ b/tests/wpt/metadata-layout-2020/custom-elements/reactions/customized-builtins/HTMLTableColElement.html.ini @@ -1,7 +1,6 @@ [HTMLTableColElement.html] - [span on HTMLTableColElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - [span on HTMLTableColElement must enqueue an attributeChanged reaction when adding a new attribute] expected: FAIL + [span on HTMLTableColElement must enqueue an attributeChanged reaction when replacing an existing attribute] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/dom/abort/abort-signal-any.tentative.any.js.ini b/tests/wpt/metadata-layout-2020/dom/abort/abort-signal-any.tentative.any.js.ini new file mode 100644 index 00000000000..3a0ce1c9b13 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/dom/abort/abort-signal-any.tentative.any.js.ini @@ -0,0 +1,5 @@ +[abort-signal-any.tentative.any.html] + expected: ERROR + +[abort-signal-any.tentative.any.worker.html] + expected: ERROR diff --git a/tests/wpt/metadata-layout-2020/dom/nodes/ParentNode-querySelector-scope.html.ini b/tests/wpt/metadata-layout-2020/dom/nodes/ParentNode-querySelector-scope.html.ini index 59214c7bb44..6cc9f8bb118 100644 --- a/tests/wpt/metadata-layout-2020/dom/nodes/ParentNode-querySelector-scope.html.ini +++ b/tests/wpt/metadata-layout-2020/dom/nodes/ParentNode-querySelector-scope.html.ini @@ -5,3 +5,11 @@ [querySelector] expected: FAIL + [querySelector with :scope] + expected: FAIL + + [querySelector with id and sibling] + expected: FAIL + + [querySelectorAll with :scope] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/fetch/content-length/parsing.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-length/parsing.window.js.ini index 3285a4f15ac..959ec1fd02b 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-length/parsing.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-length/parsing.window.js.ini @@ -76,3 +76,6 @@ [Input: "Content-Length: ". Expected: 42.] expected: FAIL + + [Input: "Content-Length: 42\\r\\nContent-Length: 42,42". Expected: 42.] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini index 736ff6130a5..774d2d8bf36 100644 --- a/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini @@ -7,3 +7,9 @@ [X-Content-Type-Options%3A%20nosniff%0C] expected: FAIL + + [X-Content-Type-Options%3A%20%2Cnosniff] + expected: FAIL + + [X-Content-Type-Options%3A%20%22nosniFF%22] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/gamepad/idlharness-extensions.https.window.js.ini b/tests/wpt/metadata-layout-2020/gamepad/idlharness-extensions.https.window.js.ini index dfe411024c2..1904bd6929d 100644 --- a/tests/wpt/metadata-layout-2020/gamepad/idlharness-extensions.https.window.js.ini +++ b/tests/wpt/metadata-layout-2020/gamepad/idlharness-extensions.https.window.js.ini @@ -58,3 +58,15 @@ [Gamepad interface: attribute touchEvents] expected: FAIL + + [GamepadHapticActuator interface: operation canPlayEffectType(GamepadHapticEffectType)] + expected: FAIL + + [GamepadHapticActuator interface: operation playEffect(GamepadHapticEffectType, optional GamepadEffectParameters)] + expected: FAIL + + [GamepadHapticActuator interface: operation reset()] + expected: FAIL + + [Gamepad interface: attribute vibrationActuator] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/failure-check-sequence.https.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/failure-check-sequence.https.html.ini index 1d68034a37d..ab9ac6e835e 100644 --- a/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/failure-check-sequence.https.html.ini +++ b/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/failure-check-sequence.https.html.ini @@ -1,12 +1,13 @@ [failure-check-sequence.https.html] + expected: TIMEOUT [CSP check precedes COEP check - CSP header first] - expected: FAIL + expected: NOTRUN [COEP check precedes X-Frame-Options check] - expected: FAIL + expected: NOTRUN [CSP check precedes COEP check - COEP header first] - expected: FAIL + expected: NOTRUN [CSP check precedes X-Frame-Options check] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini index 530635e744f..1bca09f21d6 100644 --- a/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini +++ b/tests/wpt/metadata-layout-2020/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini @@ -4,3 +4,6 @@ [Navigating to a different document with link click] expected: FAIL + + [Navigating to a different document with form submission] + expected: FAIL 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 b6aa0bab7b8..51fd557bd7f 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,6 +7,3 @@ [load & pageshow events do not fire on contentWindow of + diff --git a/tests/wpt/web-platform-tests/custom-elements/pseudo-class-defined.html b/tests/wpt/web-platform-tests/custom-elements/pseudo-class-defined.html index f5bf2750a05..89d027adafa 100644 --- a/tests/wpt/web-platform-tests/custom-elements/pseudo-class-defined.html +++ b/tests/wpt/web-platform-tests/custom-elements/pseudo-class-defined.html @@ -8,8 +8,6 @@ const testList = [ { tag_name: 'div', defined: true }, { tag_name: 'a-a', defined: false }, { tag_name: 'font-face', defined: true }, - { tag_name: 'abbr', is: 'my-abbr', defined: false }, - { tag_name: 'p', is: '', defined: false }, ]; // Setup iframe to test the parser. @@ -22,19 +20,18 @@ iframe.srcdoc = `` - + testList.map(d => `<${d.tag_name}${d.is !== undefined ? ' is=' + d.is : ''}>`).join(''); + + testList.map(d => `<${d.tag_name}>`).join(''); setup({ explicit_done: true }); iframe.onload = () => { const doc = iframe.contentDocument; const doc_without_browsing_context = doc.implementation.createHTMLDocument(); for (const data of testList) { // Test elements inserted by parser. - test_defined(data.defined, doc.getElementsByTagName(data.tag_name)[0], - `<${data.tag_name}${data.is ? ' is=' + data.is : ''}>`); + test_defined(data.defined, doc.getElementsByTagName(data.tag_name)[0], `<${data.tag_name}>`); // Test DOM createElement() methods. - let try_upgrade = !data.defined && (data.is === undefined || data.is.length > 0); - test_defined_for_createElement(data.defined, try_upgrade, doc, data.tag_name, data.is); + let try_upgrade = !data.defined; + test_defined_for_createElement(data.defined, try_upgrade, doc, data.tag_name); // Documents without browsing context should behave the same. test_defined_for_createElement(data.defined, false, doc_without_browsing_context, data.tag_name, data.is, 'Without browsing context: '); @@ -44,39 +41,30 @@ iframe.onload = () => { }; function test_defined_for_createElement(defined, should_test_change, doc, tag_name, is, description = '') { - let has_is = is !== undefined; - let is_desc = has_is ? `, { is: "${is}" }` : ''; // Test document.createElement(). - let element = has_is ? doc.createElement(tag_name, { is: is }) : doc.createElement(tag_name); + let element = doc.createElement(tag_name); doc.body.appendChild(element); - test_defined(defined, element, `${description}createElement("${tag_name}"${is_desc})`); + test_defined(defined, element, `${description}createElement("${tag_name}")`); // Test document.createElementNS(). - let html_element = has_is ? doc.createElementNS('http://www.w3.org/1999/xhtml', tag_name, { is: is }) - : doc.createElementNS('http://www.w3.org/1999/xhtml', tag_name); + let html_element = doc.createElementNS('http://www.w3.org/1999/xhtml', tag_name); doc.body.appendChild(html_element); - test_defined(defined, html_element, `${description}createElementNS("http://www.w3.org/1999/xhtml", "${tag_name}"${is_desc})`); + test_defined(defined, html_element, `${description}createElementNS("http://www.w3.org/1999/xhtml", "${tag_name}")`); // If the element namespace is not HTML, it should be "uncustomized"; i.e., "defined". - let svg_element = has_is ? doc.createElementNS('http://www.w3.org/2000/svg', tag_name, { is: is }) - : doc.createElementNS('http://www.w3.org/2000/svg', tag_name); + let svg_element = doc.createElementNS('http://www.w3.org/2000/svg', tag_name); doc.body.appendChild(svg_element); - test_defined(true, svg_element, `${description}createElementNS("http://www.w3.org/2000/svg", "${tag_name}"${is_desc})`); + test_defined(true, svg_element, `${description}createElementNS("http://www.w3.org/2000/svg", "${tag_name}")`); // Test ":defined" changes when the custom element was defined. if (should_test_change) { let w = doc.defaultView; assert_false(!w, 'defaultView required to test change'); - if (is) { - w.customElements.define(is, class extends w.HTMLElement {}, { extends: tag_name }); - } else { - w.customElements.define(tag_name, class extends w.HTMLElement { - constructor() { super(); } - }); - } - - test_defined(true, element, `Upgraded ${description}createElement("${tag_name}"${is_desc})`); - test_defined(true, html_element, `Upgraded ${description}createElementNS("http://www.w3.org/1999/xhtml", "${tag_name}"${is_desc})`); + w.customElements.define(tag_name, class extends w.HTMLElement { + constructor() { super(); } + }); + test_defined(true, element, `Upgraded ${description}createElement("${tag_name}")`); + test_defined(true, html_element, `Upgraded ${description}createElementNS("http://www.w3.org/1999/xhtml", "${tag_name}")`); } } diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLAreaElement.html b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html similarity index 95% rename from tests/wpt/web-platform-tests/custom-elements/reactions/HTMLAreaElement.html rename to tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html index 95059b7c8d0..3d53ff87ff0 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLAreaElement.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLAreaElement.html @@ -6,8 +6,8 @@ - - + + diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLBaseElement.html b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html similarity index 87% rename from tests/wpt/web-platform-tests/custom-elements/reactions/HTMLBaseElement.html rename to tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html index 82ab9228043..8d8470074cc 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLBaseElement.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLBaseElement.html @@ -6,8 +6,8 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLInputElement.html b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html similarity index 96% rename from tests/wpt/web-platform-tests/custom-elements/reactions/HTMLInputElement.html rename to tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html index 13d1591b01f..adf43ee74d2 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLInputElement.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLInputElement.html @@ -7,8 +7,8 @@ - - + + - - + + - - + +
    diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLMapElement.html b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html similarity index 85% rename from tests/wpt/web-platform-tests/custom-elements/reactions/HTMLMapElement.html rename to tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html index f6bd04bd1f9..5b2e674afb7 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLMapElement.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMapElement.html @@ -5,8 +5,8 @@ - - + + yellow pic green pic diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLMediaElement.html b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html similarity index 97% rename from tests/wpt/web-platform-tests/custom-elements/reactions/HTMLMediaElement.html rename to tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html index 4f29b35f28b..58e002c52ca 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLMediaElement.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLMediaElement.html @@ -6,8 +6,8 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLStyleElement.html b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html similarity index 84% rename from tests/wpt/web-platform-tests/custom-elements/reactions/HTMLStyleElement.html rename to tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html index 718b3cefc7b..d68d5cb76dd 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLStyleElement.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLStyleElement.html @@ -5,8 +5,8 @@ - - + + - - + +
    diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLTableColElement.html b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html similarity index 86% rename from tests/wpt/web-platform-tests/custom-elements/reactions/HTMLTableColElement.html rename to tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html index 017c7999f4d..8e4d1359d8b 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLTableColElement.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/customized-builtins/HTMLTableColElement.html @@ -5,8 +5,8 @@ - - + +
    - - + + + + + + + diff --git a/tests/wpt/web-platform-tests/custom-elements/upgrading/Document-importNode.html b/tests/wpt/web-platform-tests/custom-elements/upgrading/Document-importNode.html index b80f90648d1..3da4ccf46a8 100644 --- a/tests/wpt/web-platform-tests/custom-elements/upgrading/Document-importNode.html +++ b/tests/wpt/web-platform-tests/custom-elements/upgrading/Document-importNode.html @@ -28,29 +28,5 @@ test_with_window((w, doc) => { let imported = doc.importNode(original); assert_true(imported instanceof MyElement3); }, 'autonomous: document.importNode() should import "undefined" custom elements successfully'); - -test_with_window((w, doc) => { - class MyDiv extends HTMLDivElement {} - class MyDiv2 extends w.HTMLDivElement {} - customElements.define('my-div', MyDiv, { extends: 'div' }); - w.customElements.define('my-div', MyDiv2, { extends: 'div' }); - - let original = document.createElement('div', { is: 'my-div' }); - assert_true(original instanceof MyDiv); - - let imported = doc.importNode(original); - assert_true(imported instanceof MyDiv2); -}, 'built-in: document.importNode() should import custom elements successfully'); - -test_with_window((w, doc) => { - class MyDiv2 extends w.HTMLDivElement {} - w.customElements.define('my-div2', MyDiv2, { extends: 'div' }); - - let original = document.createElement('div', { is: 'my-div2' }); - assert_equals(original.constructor, HTMLDivElement); - - let imported = doc.importNode(original); - assert_true(imported instanceof MyDiv2); -}, 'built-in: document.importNode() should import "undefined" custom elements successfully'); diff --git a/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html b/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html new file mode 100644 index 00000000000..5e1122cc84b --- /dev/null +++ b/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode-customized-builtins.html @@ -0,0 +1,48 @@ + + + +Custom Elements: Upgrading + + + + + + + + +
    + + + diff --git a/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html b/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html index 364cecd76de..1a05e96964f 100644 --- a/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html +++ b/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html @@ -49,35 +49,6 @@ test(function () { 'A cloned custom element must be an instance of the custom element'); }, 'Node.prototype.cloneNode(false) must be able to clone as a autonomous custom element when it contains is attribute'); -test(function () { - class MyDiv1 extends HTMLDivElement {}; - class MyDiv2 extends HTMLDivElement {}; - class MyDiv3 extends HTMLDivElement {}; - customElements.define('my-div1', MyDiv1, { extends: 'div' }); - customElements.define('my-div2', MyDiv2, { extends: 'div' }); - - let instance = document.createElement('div', { is: 'my-div1'}); - assert_true(instance instanceof MyDiv1); - instance.setAttribute('is', 'my-div2'); - let clone = instance.cloneNode(false); - assert_not_equals(instance, clone); - assert_true(clone instanceof MyDiv1, - 'A cloned custom element must be an instance of the custom element even with an inconsistent "is" attribute'); - - let instance3 = document.createElement('div', { is: 'my-div3'}); - assert_false(instance3 instanceof MyDiv3); - instance3.setAttribute('is', 'my-div2'); - let clone3 = instance3.cloneNode(false); - assert_not_equals(instance3, clone); - customElements.define('my-div3', MyDiv3, { extends: 'div' }); - document.body.appendChild(instance3); - document.body.appendChild(clone3); - assert_true(instance3 instanceof MyDiv3, - 'An undefined element must be upgraded even with an inconsistent "is" attribute'); - assert_true(clone3 instanceof MyDiv3, - 'A cloned undefined element must be upgraded even with an inconsistent "is" attribute'); -}, 'Node.prototype.cloneNode(false) must be able to clone as a customized built-in element when it has an inconsistent "is" attribute'); - test_with_window(function (contentWindow) { var contentDocument = contentWindow.document; class MyCustomElement extends contentWindow.HTMLElement {} diff --git a/tests/wpt/web-platform-tests/dom/abort/abort-signal-any.tentative.any.js b/tests/wpt/web-platform-tests/dom/abort/abort-signal-any.tentative.any.js new file mode 100644 index 00000000000..b4abb14c1a3 --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/abort/abort-signal-any.tentative.any.js @@ -0,0 +1,4 @@ +// META: script=./resources/abort-signal-any-tests.js + +abortSignalAnySignalOnlyTests(AbortSignal); +abortSignalAnyTests(AbortSignal, AbortController); diff --git a/tests/wpt/web-platform-tests/dom/abort/resources/abort-signal-any-tests.js b/tests/wpt/web-platform-tests/dom/abort/resources/abort-signal-any-tests.js new file mode 100644 index 00000000000..66e4141eacc --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/abort/resources/abort-signal-any-tests.js @@ -0,0 +1,185 @@ +// Tests for AbortSignal.any() and subclasses that don't use a controller. +function abortSignalAnySignalOnlyTests(signalInterface) { + const desc = `${signalInterface.name}.any()` + + test(t => { + const signal = signalInterface.any([]); + assert_false(signal.aborted); + }, `${desc} works with an empty array of signals`); +} + +// Tests for AbortSignal.any() and subclasses that use a controller. +function abortSignalAnyTests(signalInterface, controllerInterface) { + const suffix = `(using ${controllerInterface.name})`; + const desc = `${signalInterface.name}.any()`; + + test(t => { + const controller = new controllerInterface(); + const signal = controller.signal; + const cloneSignal = signalInterface.any([signal]); + assert_false(cloneSignal.aborted); + assert_true("reason" in cloneSignal, "cloneSignal has reason property"); + assert_equals(cloneSignal.reason, undefined, + "cloneSignal.reason is initially undefined"); + assert_not_equals(signal, cloneSignal, + `${desc} returns a new signal.`); + + let eventFired = false; + cloneSignal.onabort = t.step_func((e) => { + assert_equals(e.target, cloneSignal, + `The event target is the signal returned by ${desc}`); + eventFired = true; + }); + + controller.abort("reason string"); + assert_true(signal.aborted); + assert_true(cloneSignal.aborted); + assert_true(eventFired); + assert_equals(cloneSignal.reason, "reason string", + `${desc} propagates the abort reason`); + }, `${desc} follows a single signal ${suffix}`); + + test(t => { + for (let i = 0; i < 3; ++i) { + const controllers = []; + for (let j = 0; j < 3; ++j) { + controllers.push(new controllerInterface()); + } + const combinedSignal = signalInterface.any(controllers.map(c => c.signal)); + + let eventFired = false; + combinedSignal.onabort = t.step_func((e) => { + assert_equals(e.target, combinedSignal, + `The event target is the signal returned by ${desc}`); + eventFired = true; + }); + + controllers[i].abort(); + assert_true(eventFired); + assert_true(combinedSignal.aborted); + assert_true(combinedSignal.reason instanceof DOMException, + "signal.reason is a DOMException"); + assert_equals(combinedSignal.reason.name, "AbortError", + "signal.reason is a AbortError"); + } + }, `${desc} follows multiple signals ${suffix}`); + + test(t => { + const controllers = []; + for (let i = 0; i < 3; ++i) { + controllers.push(new controllerInterface()); + } + controllers[1].abort("reason 1"); + controllers[2].abort("reason 2"); + + const signal = signalInterface.any(controllers.map(c => c.signal)); + assert_true(signal.aborted); + assert_equals(signal.reason, "reason 1", + "The signal should be aborted with the first reason"); + }, `${desc} returns an aborted signal if passed an aborted signal ${suffix}`); + + test(t => { + const controller = new controllerInterface(); + const signal = signalInterface.any([controller.signal, controller.signal]); + assert_false(signal.aborted); + controller.abort("reason"); + assert_true(signal.aborted); + assert_equals(signal.reason, "reason"); + }, `${desc} can be passed the same signal more than once ${suffix}`); + + test(t => { + const controller1 = new controllerInterface(); + controller1.abort("reason 1"); + const controller2 = new controllerInterface(); + controller2.abort("reason 2"); + + const signal = signalInterface.any([controller1.signal, controller2.signal, controller1.signal]); + assert_true(signal.aborted); + assert_equals(signal.reason, "reason 1"); + }, `${desc} uses the first instance of a duplicate signal ${suffix}`); + + test(t => { + for (let i = 0; i < 3; ++i) { + const controllers = []; + for (let j = 0; j < 3; ++j) { + controllers.push(new controllerInterface()); + } + const combinedSignal1 = + signalInterface.any([controllers[0].signal, controllers[1].signal]); + const combinedSignal2 = + signalInterface.any([combinedSignal1, controllers[2].signal]); + + let eventFired = false; + combinedSignal2.onabort = t.step_func((e) => { + eventFired = true; + }); + + controllers[i].abort(); + assert_true(eventFired); + assert_true(combinedSignal2.aborted); + assert_true(combinedSignal2.reason instanceof DOMException, + "signal.reason is a DOMException"); + assert_equals(combinedSignal2.reason.name, "AbortError", + "signal.reason is a AbortError"); + } + }, `${desc} signals are composable ${suffix}`); + + async_test(t => { + const controller = new controllerInterface(); + const timeoutSignal = AbortSignal.timeout(5); + + const combinedSignal = signalInterface.any([controller.signal, timeoutSignal]); + + combinedSignal.onabort = t.step_func_done(() => { + assert_true(combinedSignal.aborted); + assert_true(combinedSignal.reason instanceof DOMException, + "combinedSignal.reason is a DOMException"); + assert_equals(combinedSignal.reason.name, "TimeoutError", + "combinedSignal.reason is a TimeoutError"); + }); + }, `${desc} works with signals returned by AbortSignal.timeout() ${suffix}`); + + test(t => { + const controller = new controllerInterface(); + let combined = signalInterface.any([controller.signal]); + combined = signalInterface.any([combined]); + combined = signalInterface.any([combined]); + combined = signalInterface.any([combined]); + + let eventFired = false; + combined.onabort = () => { + eventFired = true; + } + + assert_false(eventFired); + assert_false(combined.aborted); + + controller.abort("the reason"); + + assert_true(eventFired); + assert_true(combined.aborted); + assert_equals(combined.reason, "the reason"); + }, `${desc} works with intermediate signals ${suffix}`); + + test(t => { + const controller = new controllerInterface(); + const signals = []; + // The first event should be dispatched on the originating signal. + signals.push(controller.signal); + // All dependents are linked to `controller.signal` (never to another + // composite signal), so this is the order events should fire. + signals.push(signalInterface.any([controller.signal])); + signals.push(signalInterface.any([controller.signal])); + signals.push(signalInterface.any([signals[0]])); + signals.push(signalInterface.any([signals[1]])); + + let result = ""; + for (let i = 0; i < signals.length; i++) { + signals[i].addEventListener('abort', () => { + result += i; + }); + } + controller.abort(); + assert_equals(result, "01234"); + }, `Abort events for ${desc} signals fire in the right order ${suffix}`); +} diff --git a/tests/wpt/web-platform-tests/dom/nodes/ParentNode-querySelector-scope.html b/tests/wpt/web-platform-tests/dom/nodes/ParentNode-querySelector-scope.html index b08a1674ac4..d984956d6c4 100644 --- a/tests/wpt/web-platform-tests/dom/nodes/ParentNode-querySelector-scope.html +++ b/tests/wpt/web-platform-tests/dom/nodes/ParentNode-querySelector-scope.html @@ -1,11 +1,10 @@ -querySelector(All) must work with :scope +querySelector(All) scoped to a root element - -

    hello

    +

    hello

    diff --git a/tests/wpt/web-platform-tests/fonts/Scheherazade-Regular.woff b/tests/wpt/web-platform-tests/fonts/Scheherazade-Regular.woff old mode 100755 new mode 100644 diff --git a/tests/wpt/web-platform-tests/html/semantics/disabled-elements/disabled-event-dispatch.tentative.html b/tests/wpt/web-platform-tests/html/semantics/disabled-elements/disabled-event-dispatch.tentative.html index c5e34a2341b..e2b8846fc3d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/disabled-elements/disabled-event-dispatch.tentative.html +++ b/tests/wpt/web-platform-tests/html/semantics/disabled-elements/disabled-event-dispatch.tentative.html @@ -1,4 +1,5 @@ + @@ -9,37 +10,48 @@
    - + + hello world + child +
    diff --git a/tests/wpt/web-platform-tests/html/semantics/disabled-elements/event-propagate-disabled.tentative.html b/tests/wpt/web-platform-tests/html/semantics/disabled-elements/event-propagate-disabled.tentative.html index 0c00cc8db07..9c8642d10f9 100644 --- a/tests/wpt/web-platform-tests/html/semantics/disabled-elements/event-propagate-disabled.tentative.html +++ b/tests/wpt/web-platform-tests/html/semantics/disabled-elements/event-propagate-disabled.tentative.html @@ -47,9 +47,15 @@ + Text + + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/select-willvalidate-readonly-attribute.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/select-willvalidate-readonly-attribute.html new file mode 100644 index 00000000000..d3f4ce43cfa --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-select-element/select-willvalidate-readonly-attribute.html @@ -0,0 +1,24 @@ + + +Select element with "readonly" attribute shouldn't be barred from constraint validation + + + + + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-basic.tentative.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-basic.tentative.html index 1bc32dbace3..d16e34f896e 100644 --- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-basic.tentative.html +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-basic.tentative.html @@ -57,6 +57,7 @@ diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus-2.tentative.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus-2.tentative.html index e0effbd866c..569b633886c 100644 --- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus-2.tentative.html +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus-2.tentative.html @@ -90,6 +90,22 @@ promise_test(async t => { }, "Popover focus navigation"); + +
    + + + +
    + + +
    diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.tentative.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.tentative.html index 82b8a5e62f6..b1e59a13971 100644 --- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.tentative.html +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.tentative.html @@ -124,6 +124,19 @@ assert_equals(document.activeElement, priorFocus, 'prior element should get focus after Escape'); await finishAnimationsAndVerifyHide(popover); + // Move focus into the popover, then hit Escape: + let containedButton = popover.querySelector('button'); + if (containedButton) { + priorFocus.focus(); + assert_equals(document.activeElement, priorFocus); + popover.showPopover(); + containedButton.focus(); + assert_equals(document.activeElement, containedButton); + await sendEscape(); + assert_equals(document.activeElement, priorFocus, 'prior element should get focus after Escape'); + await finishAnimationsAndVerifyHide(popover); + } + // Change the popover type: priorFocus.focus(); popover.showPopover(); @@ -165,7 +178,16 @@ assert_true(popover.matches(':open')); assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by button.click()`); + // Make sure Escape works in the invoker case: + await sendEscape(); + assert_equals(document.activeElement, priorFocus, 'prior element should get focus after Escape (via invoker)'); + await finishAnimationsAndVerifyHide(popover); + // Make sure we can directly focus the (already open) popover: + priorFocus.focus(); + button.click(); + assert_true(popover.matches(':open')); + assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by button.click()`); popover.focus(); assert_equals(document.activeElement, popover.hasAttribute('tabindex') ? popover : expectedFocusedElement, `${testName} directly focus with popover.focus()`); button.click(); // Button is set to toggle the popover @@ -187,11 +209,7 @@ assert_true(popover.matches(':open')); await clickOn(button); // This will *not* light dismiss, but will "toggle" the popover. assert_false(popover.matches(':open')); - const changesFocus = !popover.hasAttribute('data-no-focus'); - if (changesFocus) - assert_equals(document.activeElement, priorFocus, 'focus should return to the prior focus, if focus moved on show'); - else - assert_equals(document.activeElement, button, 'focus should remain on the button, since focus didn\t move on show'); + assert_equals(document.activeElement, priorFocus, 'focus should return to the prior focus'); await finishAnimationsAndVerifyHide(popover); // Same thing, but the button is contained within the popover @@ -202,14 +220,13 @@ priorFocus.focus(); popover.showPopover(); assert_true(popover.matches(':open')); + const changesFocus = !popover.hasAttribute('data-no-focus'); if (changesFocus) { assert_not_equals(document.activeElement, priorFocus, 'focus should shift for this element'); } await clickOn(button); assert_false(popover.matches(':open'), 'clicking button should hide the popover'); - if (changesFocus) { - assert_equals(document.activeElement, priorFocus, 'Contained button should return focus to the previously focused element, if focus moved on show'); - } + assert_equals(document.activeElement, priorFocus, 'Contained button should return focus to the previously focused element'); await finishAnimationsAndVerifyHide(popover); // Same thing, but the button is unrelated (no popovertoggletarget) diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.tentative.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.tentative.html index 83573c86f06..3c48bd9274e 100644 --- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.tentative.html +++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.tentative.html @@ -392,8 +392,9 @@

    Popover 4

    -
    Popover 2 +
    Popover 2 (self-anchor-linked) +
    Popover 3 diff --git a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/compile-event-handler-lexical-scopes-form-owner.html b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/compile-event-handler-lexical-scopes-form-owner.html new file mode 100644 index 00000000000..e31bd2496a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/compile-event-handler-lexical-scopes-form-owner.html @@ -0,0 +1,48 @@ + + +Form's lexical scope is established only for form-associated elements + + + + + + + + img +
    div
    + x-foo + + + diff --git a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/server/http2-websocket.sub.h2.any.js.ini b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/server/http2-websocket.sub.h2.any.js.ini index 1922b1c42f4..74470b82c24 100644 --- a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/server/http2-websocket.sub.h2.any.js.ini +++ b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/server/http2-websocket.sub.h2.any.js.ini @@ -3,7 +3,7 @@ if product == "safari": TIMEOUT [WSS over h2] expected: - if product == "firefox" or product == "epiphany" or product == "webkit": FAIL + if product == "epiphany" or product == "webkit": FAIL if product == "safari": TIMEOUT @@ -12,5 +12,5 @@ if product == "safari": TIMEOUT [WSS over h2] expected: - if product == "firefox" or product == "epiphany" or product == "webkit": FAIL + if product == "epiphany" or product == "webkit": FAIL if product == "safari": TIMEOUT diff --git a/tests/wpt/web-platform-tests/interfaces/badging.idl b/tests/wpt/web-platform-tests/interfaces/badging.idl index 28578621c9a..f34dfa7e04a 100644 --- a/tests/wpt/web-platform-tests/interfaces/badging.idl +++ b/tests/wpt/web-platform-tests/interfaces/badging.idl @@ -3,14 +3,12 @@ // (https://github.com/w3c/webref) // Source: Badging API (https://w3c.github.io/badging/) -// Methods only exposed on documents. [SecureContext] partial interface Navigator { Promise setClientBadge(optional [EnforceRange] unsigned long long contents); Promise clearClientBadge(); }; -// Methods exposed on both documents and service workers. [SecureContext] interface mixin NavigatorBadge { Promise setAppBadge(optional [EnforceRange] unsigned long long contents); diff --git a/tests/wpt/web-platform-tests/interfaces/compute-pressure.idl b/tests/wpt/web-platform-tests/interfaces/compute-pressure.idl index 92a105bd527..2a11b84c45d 100644 --- a/tests/wpt/web-platform-tests/interfaces/compute-pressure.idl +++ b/tests/wpt/web-platform-tests/interfaces/compute-pressure.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Compute Pressure Level 1 (https://wicg.github.io/compute-pressure/) +// Source: Compute Pressure Level 1 (https://w3c.github.io/compute-pressure/) enum PressureState { "nominal", "fair", "serious", "critical" }; @@ -24,8 +24,6 @@ interface PressureObserver { sequence takeRecords(); [SameObject] static readonly attribute FrozenArray supportedSources; - - [Exposed=Window] static Promise requestPermission(); }; [Exposed=(DedicatedWorker,SharedWorker,Window), SecureContext] diff --git a/tests/wpt/web-platform-tests/interfaces/contact-api.idl b/tests/wpt/web-platform-tests/interfaces/contact-api.idl index d7f2ba5d959..aece81664e4 100644 --- a/tests/wpt/web-platform-tests/interfaces/contact-api.idl +++ b/tests/wpt/web-platform-tests/interfaces/contact-api.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Contact Picker API (https://w3c.github.io/contact-api/spec/) +// Source: Contact Picker API (https://w3c.github.io/contact-picker/spec/) [Exposed=Window] partial interface Navigator { diff --git a/tests/wpt/web-platform-tests/interfaces/css-animations.idl b/tests/wpt/web-platform-tests/interfaces/css-animations.idl index eda1d0f72a4..6620e0156dc 100644 --- a/tests/wpt/web-platform-tests/interfaces/css-animations.idl +++ b/tests/wpt/web-platform-tests/interfaces/css-animations.idl @@ -31,7 +31,9 @@ interface CSSKeyframeRule : CSSRule { interface CSSKeyframesRule : CSSRule { attribute CSSOMString name; readonly attribute CSSRuleList cssRules; + readonly attribute unsigned long length; + getter CSSKeyframeRule (unsigned long index); undefined appendRule(CSSOMString rule); undefined deleteRule(CSSOMString select); CSSKeyframeRule? findRule(CSSOMString select); diff --git a/tests/wpt/web-platform-tests/interfaces/css-view-transitions.idl b/tests/wpt/web-platform-tests/interfaces/css-view-transitions.idl index 26c2e304066..c7ac9f336cf 100644 --- a/tests/wpt/web-platform-tests/interfaces/css-view-transitions.idl +++ b/tests/wpt/web-platform-tests/interfaces/css-view-transitions.idl @@ -4,19 +4,15 @@ // Source: CSS View Transitions Module Level 1 (https://drafts.csswg.org/css-view-transitions-1/) partial interface Document { - ViewTransition createTransition(ViewTransitionInit init); -}; - -dictionary ViewTransitionInit { - required UpdateDOMCallback updateDOM; + ViewTransition startViewTransition(optional UpdateDOMCallback? callback = null); }; callback UpdateDOMCallback = Promise (); [Exposed=Window] interface ViewTransition { - undefined skipTransition(); - readonly attribute Promise finished; - readonly attribute Promise ready; - readonly attribute Promise domUpdated; + undefined skipTransition(); + readonly attribute Promise finished; + readonly attribute Promise ready; + readonly attribute Promise domUpdated; }; diff --git a/tests/wpt/web-platform-tests/interfaces/cssom-view.idl b/tests/wpt/web-platform-tests/interfaces/cssom-view.idl index a61f17ea488..2046b38533f 100644 --- a/tests/wpt/web-platform-tests/interfaces/cssom-view.idl +++ b/tests/wpt/web-platform-tests/interfaces/cssom-view.idl @@ -196,4 +196,5 @@ interface VisualViewport : EventTarget { attribute EventHandler onresize; attribute EventHandler onscroll; + attribute EventHandler onscrollend; }; diff --git a/tests/wpt/web-platform-tests/interfaces/event-timing.idl b/tests/wpt/web-platform-tests/interfaces/event-timing.idl index 2f8e031ce15..741a05dc6bc 100644 --- a/tests/wpt/web-platform-tests/interfaces/event-timing.idl +++ b/tests/wpt/web-platform-tests/interfaces/event-timing.idl @@ -18,15 +18,10 @@ interface EventCounts { readonly maplike; }; -[Exposed=Window] -interface InteractionCounts { - readonly maplike; -}; - [Exposed=Window] partial interface Performance { [SameObject] readonly attribute EventCounts eventCounts; - [SameObject] readonly attribute InteractionCounts interactionCounts; + readonly attribute unsigned long long interactionCount; }; partial dictionary PerformanceObserverInit { diff --git a/tests/wpt/web-platform-tests/interfaces/fetch.idl b/tests/wpt/web-platform-tests/interfaces/fetch.idl index ba69c462f62..866d09d31bd 100644 --- a/tests/wpt/web-platform-tests/interfaces/fetch.idl +++ b/tests/wpt/web-platform-tests/interfaces/fetch.idl @@ -71,6 +71,7 @@ dictionary RequestInit { boolean keepalive; AbortSignal? signal; RequestDuplex duplex; + RequestPriority priority; any window; // can only be set to null }; @@ -80,6 +81,7 @@ enum RequestCredentials { "omit", "same-origin", "include" }; enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" }; enum RequestRedirect { "follow", "error", "manual" }; enum RequestDuplex { "half" }; +enum RequestPriority { "high", "low", "auto" }; [Exposed=(Window,Worker)]interface Response { constructor(optional BodyInit? body = null, optional ResponseInit init = {}); diff --git a/tests/wpt/web-platform-tests/interfaces/gamepad-extensions.idl b/tests/wpt/web-platform-tests/interfaces/gamepad-extensions.idl index 29ab815c411..ddfc0d9c06a 100644 --- a/tests/wpt/web-platform-tests/interfaces/gamepad-extensions.idl +++ b/tests/wpt/web-platform-tests/interfaces/gamepad-extensions.idl @@ -12,11 +12,33 @@ enum GamepadHand { [Exposed=Window] interface GamepadHapticActuator { readonly attribute GamepadHapticActuatorType type; + boolean canPlayEffectType(GamepadHapticEffectType type); + Promise playEffect( + GamepadHapticEffectType type, + optional GamepadEffectParameters params = {}); Promise pulse(double value, double duration); + Promise reset(); +}; + +enum GamepadHapticsResult { + "complete", + "preempted" }; enum GamepadHapticActuatorType { - "vibration" + "vibration", + "dual-rumble" +}; + +enum GamepadHapticEffectType { + "dual-rumble" +}; + +dictionary GamepadEffectParameters { + double duration = 0.0; + double startDelay = 0.0; + double strongMagnitude = 0.0; + double weakMagnitude = 0.0; }; [Exposed=Window] @@ -45,4 +67,5 @@ partial interface Gamepad { readonly attribute FrozenArray hapticActuators; readonly attribute GamepadPose? pose; readonly attribute FrozenArray? touchEvents; + [SameObject] readonly attribute GamepadHapticActuator vibrationActuator; }; diff --git a/tests/wpt/web-platform-tests/interfaces/html.idl b/tests/wpt/web-platform-tests/interfaces/html.idl index d053798c057..70eb5eff761 100644 --- a/tests/wpt/web-platform-tests/interfaces/html.idl +++ b/tests/wpt/web-platform-tests/interfaces/html.idl @@ -884,7 +884,7 @@ interface HTMLInputElement : HTMLElement { [CEReactions] attribute DOMString formTarget; [CEReactions] attribute unsigned long height; attribute boolean indeterminate; - readonly attribute HTMLElement? list; + readonly attribute HTMLDataListElement? list; [CEReactions] attribute DOMString max; [CEReactions] attribute long maxLength; [CEReactions] attribute DOMString min; diff --git a/tests/wpt/web-platform-tests/interfaces/manifest-incubations.idl b/tests/wpt/web-platform-tests/interfaces/manifest-incubations.idl index 5342b611fcc..bab3998dedd 100644 --- a/tests/wpt/web-platform-tests/interfaces/manifest-incubations.idl +++ b/tests/wpt/web-platform-tests/interfaces/manifest-incubations.idl @@ -22,18 +22,3 @@ partial interface Window { attribute EventHandler onappinstalled; attribute EventHandler onbeforeinstallprompt; }; - -[Exposed=Window] interface LaunchParams { - readonly attribute DOMString? targetURL; - readonly attribute FrozenArray files; -}; - -callback LaunchConsumer = any (LaunchParams params); - -partial interface Window { - readonly attribute LaunchQueue launchQueue; -}; - -[Exposed=Window] interface LaunchQueue { - undefined setConsumer(LaunchConsumer consumer); -}; diff --git a/tests/wpt/web-platform-tests/interfaces/payment-handler.idl b/tests/wpt/web-platform-tests/interfaces/payment-handler.idl index 109e405268f..c76ef0983f6 100644 --- a/tests/wpt/web-platform-tests/interfaces/payment-handler.idl +++ b/tests/wpt/web-platform-tests/interfaces/payment-handler.idl @@ -41,19 +41,10 @@ partial interface ServiceWorkerGlobalScope { [Exposed=ServiceWorker] interface CanMakePaymentEvent : ExtendableEvent { - constructor(DOMString type, optional CanMakePaymentEventInit eventInitDict = {}); - readonly attribute USVString topOrigin; - readonly attribute USVString paymentRequestOrigin; - readonly attribute FrozenArray methodData; + constructor(DOMString type); undefined respondWith(Promise canMakePaymentResponse); }; -dictionary CanMakePaymentEventInit : ExtendableEventInit { - USVString topOrigin; - USVString paymentRequestOrigin; - sequence methodData; -}; - partial interface ServiceWorkerGlobalScope { attribute EventHandler onpaymentrequest; }; diff --git a/tests/wpt/web-platform-tests/interfaces/performance-timeline.idl b/tests/wpt/web-platform-tests/interfaces/performance-timeline.idl index d3a5a278055..cdd8fafd8c6 100644 --- a/tests/wpt/web-platform-tests/interfaces/performance-timeline.idl +++ b/tests/wpt/web-platform-tests/interfaces/performance-timeline.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Performance Timeline Level 2 (https://w3c.github.io/performance-timeline/) +// Source: Performance Timeline (https://w3c.github.io/performance-timeline/) partial interface Performance { PerformanceEntryList getEntries (); diff --git a/tests/wpt/web-platform-tests/interfaces/permissions.idl b/tests/wpt/web-platform-tests/interfaces/permissions.idl index 701392194df..fbcb674e561 100644 --- a/tests/wpt/web-platform-tests/interfaces/permissions.idl +++ b/tests/wpt/web-platform-tests/interfaces/permissions.idl @@ -38,5 +38,4 @@ enum PermissionState { dictionary PermissionSetParameters { required PermissionDescriptor descriptor; required PermissionState state; - boolean oneRealm = false; }; diff --git a/tests/wpt/web-platform-tests/interfaces/priority-hints.idl b/tests/wpt/web-platform-tests/interfaces/priority-hints.idl index 15c90bbe1ab..cbff6a5222d 100644 --- a/tests/wpt/web-platform-tests/interfaces/priority-hints.idl +++ b/tests/wpt/web-platform-tests/interfaces/priority-hints.idl @@ -3,16 +3,6 @@ // (https://github.com/w3c/webref) // Source: Priority Hints (https://wicg.github.io/priority-hints/) -enum FetchPriority { "high", "low", "auto" }; - -partial interface Request { - readonly attribute FetchPriority priority; -}; - -partial dictionary RequestInit { - FetchPriority priority; -}; - partial interface HTMLImageElement { [CEReactions] attribute DOMString fetchPriority; }; diff --git a/tests/wpt/web-platform-tests/interfaces/resource-timing.idl b/tests/wpt/web-platform-tests/interfaces/resource-timing.idl index 65f0d4d4e5d..242df0bd804 100644 --- a/tests/wpt/web-platform-tests/interfaces/resource-timing.idl +++ b/tests/wpt/web-platform-tests/interfaces/resource-timing.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Resource Timing Level 2 (https://w3c.github.io/resource-timing/) +// Source: Resource Timing (https://w3c.github.io/resource-timing/) [Exposed=(Window,Worker)] interface PerformanceResourceTiming : PerformanceEntry { diff --git a/tests/wpt/web-platform-tests/interfaces/screen-capture.idl b/tests/wpt/web-platform-tests/interfaces/screen-capture.idl index 4c64a2f35cb..9abd4d2c1ad 100644 --- a/tests/wpt/web-platform-tests/interfaces/screen-capture.idl +++ b/tests/wpt/web-platform-tests/interfaces/screen-capture.idl @@ -63,6 +63,7 @@ partial dictionary MediaTrackSettings { boolean logicalSurface; DOMString cursor; boolean restrictOwnAudio; + boolean suppressLocalAudioPlayback; }; partial dictionary MediaTrackCapabilities { diff --git a/tests/wpt/web-platform-tests/interfaces/screen-orientation.idl b/tests/wpt/web-platform-tests/interfaces/screen-orientation.idl index 62bc8642822..df8a1db5392 100644 --- a/tests/wpt/web-platform-tests/interfaces/screen-orientation.idl +++ b/tests/wpt/web-platform-tests/interfaces/screen-orientation.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: The Screen Orientation API (https://w3c.github.io/screen-orientation/) +// Source: Screen Orientation (https://w3c.github.io/screen-orientation/) partial interface Screen { [SameObject] readonly attribute ScreenOrientation orientation; diff --git a/tests/wpt/web-platform-tests/interfaces/scroll-animations.idl b/tests/wpt/web-platform-tests/interfaces/scroll-animations.idl index 1ba137c3674..30ecbd81c90 100644 --- a/tests/wpt/web-platform-tests/interfaces/scroll-animations.idl +++ b/tests/wpt/web-platform-tests/interfaces/scroll-animations.idl @@ -36,7 +36,6 @@ interface ViewTimeline : ScrollTimeline { }; [Exposed=Window] -interface AnimationTimeline { - readonly attribute CSSNumberish? currentTime; +partial interface AnimationTimeline { CSSNumericValue? getCurrentTime(optional CSSOMString rangeName); }; diff --git a/tests/wpt/web-platform-tests/interfaces/secure-payment-confirmation.idl b/tests/wpt/web-platform-tests/interfaces/secure-payment-confirmation.idl index 6a68f059e56..6b6083b165e 100644 --- a/tests/wpt/web-platform-tests/interfaces/secure-payment-confirmation.idl +++ b/tests/wpt/web-platform-tests/interfaces/secure-payment-confirmation.idl @@ -13,6 +13,7 @@ dictionary SecurePaymentConfirmationRequest { USVString payeeOrigin; AuthenticationExtensionsClientInputs extensions; sequence locale; + boolean showOptOut; }; partial dictionary AuthenticationExtensionsClientInputs { @@ -52,6 +53,7 @@ dictionary PaymentCredentialInstrument { enum TransactionAutomationMode { "none", - "autoaccept", - "autoreject" + "autoAccept", + "autoReject", + "autoOptOut" }; diff --git a/tests/wpt/web-platform-tests/interfaces/selection-api.idl b/tests/wpt/web-platform-tests/interfaces/selection-api.idl index 6aaa1ae9460..c1eed2a9cf2 100644 --- a/tests/wpt/web-platform-tests/interfaces/selection-api.idl +++ b/tests/wpt/web-platform-tests/interfaces/selection-api.idl @@ -17,6 +17,7 @@ interface Selection { undefined removeRange(Range range); undefined removeAllRanges(); undefined empty(); + StaticRange getComposedRange(ShadowRoot... shadowRoots); undefined collapse(Node? node, optional unsigned long offset = 0); undefined setPosition(Node? node, optional unsigned long offset = 0); undefined collapseToStart(); diff --git a/tests/wpt/web-platform-tests/interfaces/web-animations.idl b/tests/wpt/web-platform-tests/interfaces/web-animations.idl index 6030dad332f..ed612302a47 100644 --- a/tests/wpt/web-platform-tests/interfaces/web-animations.idl +++ b/tests/wpt/web-platform-tests/interfaces/web-animations.idl @@ -3,6 +3,11 @@ // (https://github.com/w3c/webref) // Source: Web Animations (https://drafts.csswg.org/web-animations-1/) +[Exposed=Window] +interface AnimationTimeline { + readonly attribute double? currentTime; +}; + dictionary DocumentTimelineOptions { DOMHighResTimeStamp originTime = 0; }; diff --git a/tests/wpt/web-platform-tests/interfaces/web-app-launch.idl b/tests/wpt/web-platform-tests/interfaces/web-app-launch.idl new file mode 100644 index 00000000000..c3b6e39f3fa --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/web-app-launch.idl @@ -0,0 +1,19 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: Web App Launch Handler API (https://wicg.github.io/web-app-launch/) + +[Exposed=Window] interface LaunchParams { + readonly attribute DOMString? targetURL; + readonly attribute FrozenArray files; +}; + +callback LaunchConsumer = any (LaunchParams params); + +partial interface Window { + readonly attribute LaunchQueue launchQueue; +}; + +[Exposed=Window] interface LaunchQueue { + undefined setConsumer(LaunchConsumer consumer); +}; diff --git a/tests/wpt/web-platform-tests/interfaces/webaudio.idl b/tests/wpt/web-platform-tests/interfaces/webaudio.idl index 092ab52a01c..1569de204bd 100644 --- a/tests/wpt/web-platform-tests/interfaces/webaudio.idl +++ b/tests/wpt/web-platform-tests/interfaces/webaudio.idl @@ -4,9 +4,9 @@ // Source: Web Audio API (https://webaudio.github.io/web-audio-api/) enum AudioContextState { - "suspended", - "running", - "closed" + "suspended", + "running", + "closed" }; callback DecodeErrorCallback = undefined (DOMException error); @@ -15,604 +15,604 @@ callback DecodeSuccessCallback = undefined (AudioBuffer decodedData); [Exposed=Window] interface BaseAudioContext : EventTarget { - readonly attribute AudioDestinationNode destination; - readonly attribute float sampleRate; - readonly attribute double currentTime; - readonly attribute AudioListener listener; - readonly attribute AudioContextState state; - [SameObject, SecureContext] - readonly attribute AudioWorklet audioWorklet; - attribute EventHandler onstatechange; + readonly attribute AudioDestinationNode destination; + readonly attribute float sampleRate; + readonly attribute double currentTime; + readonly attribute AudioListener listener; + readonly attribute AudioContextState state; + [SameObject, SecureContext] + readonly attribute AudioWorklet audioWorklet; + attribute EventHandler onstatechange; - AnalyserNode createAnalyser (); - BiquadFilterNode createBiquadFilter (); - AudioBuffer createBuffer (unsigned long numberOfChannels, - unsigned long length, - float sampleRate); - AudioBufferSourceNode createBufferSource (); - ChannelMergerNode createChannelMerger (optional unsigned long numberOfInputs = 6); - ChannelSplitterNode createChannelSplitter ( - optional unsigned long numberOfOutputs = 6); - ConstantSourceNode createConstantSource (); - ConvolverNode createConvolver (); - DelayNode createDelay (optional double maxDelayTime = 1.0); - DynamicsCompressorNode createDynamicsCompressor (); - GainNode createGain (); - IIRFilterNode createIIRFilter (sequence feedforward, - sequence feedback); - OscillatorNode createOscillator (); - PannerNode createPanner (); - PeriodicWave createPeriodicWave (sequence real, - sequence imag, - optional PeriodicWaveConstraints constraints = {}); - ScriptProcessorNode createScriptProcessor( - optional unsigned long bufferSize = 0, - optional unsigned long numberOfInputChannels = 2, - optional unsigned long numberOfOutputChannels = 2); - StereoPannerNode createStereoPanner (); - WaveShaperNode createWaveShaper (); + AnalyserNode createAnalyser (); + BiquadFilterNode createBiquadFilter (); + AudioBuffer createBuffer (unsigned long numberOfChannels, + unsigned long length, + float sampleRate); + AudioBufferSourceNode createBufferSource (); + ChannelMergerNode createChannelMerger (optional unsigned long numberOfInputs = 6); + ChannelSplitterNode createChannelSplitter ( + optional unsigned long numberOfOutputs = 6); + ConstantSourceNode createConstantSource (); + ConvolverNode createConvolver (); + DelayNode createDelay (optional double maxDelayTime = 1.0); + DynamicsCompressorNode createDynamicsCompressor (); + GainNode createGain (); + IIRFilterNode createIIRFilter (sequence feedforward, + sequence feedback); + OscillatorNode createOscillator (); + PannerNode createPanner (); + PeriodicWave createPeriodicWave (sequence real, + sequence imag, + optional PeriodicWaveConstraints constraints = {}); + ScriptProcessorNode createScriptProcessor( + optional unsigned long bufferSize = 0, + optional unsigned long numberOfInputChannels = 2, + optional unsigned long numberOfOutputChannels = 2); + StereoPannerNode createStereoPanner (); + WaveShaperNode createWaveShaper (); - Promise decodeAudioData ( - ArrayBuffer audioData, - optional DecodeSuccessCallback? successCallback, - optional DecodeErrorCallback? errorCallback); + Promise decodeAudioData ( + ArrayBuffer audioData, + optional DecodeSuccessCallback? successCallback, + optional DecodeErrorCallback? errorCallback); }; enum AudioContextLatencyCategory { - "balanced", - "interactive", - "playback" + "balanced", + "interactive", + "playback" }; enum AudioSinkType { - "none" + "none" }; [Exposed=Window] interface AudioContext : BaseAudioContext { - constructor (optional AudioContextOptions contextOptions = {}); - readonly attribute double baseLatency; - readonly attribute double outputLatency; - [SecureContext] readonly attribute (DOMString or AudioSinkInfo) sinkId; - [SecureContext] readonly attribute AudioRenderCapacity renderCapacity; - attribute EventHandler onsinkchange; - AudioTimestamp getOutputTimestamp (); - Promise resume (); - Promise suspend (); - Promise close (); - [SecureContext] Promise setSinkId ((DOMString or AudioSinkOptions) sinkId); - MediaElementAudioSourceNode createMediaElementSource (HTMLMediaElement mediaElement); - MediaStreamAudioSourceNode createMediaStreamSource (MediaStream mediaStream); - MediaStreamTrackAudioSourceNode createMediaStreamTrackSource ( - MediaStreamTrack mediaStreamTrack); - MediaStreamAudioDestinationNode createMediaStreamDestination (); + constructor (optional AudioContextOptions contextOptions = {}); + readonly attribute double baseLatency; + readonly attribute double outputLatency; + [SecureContext] readonly attribute (DOMString or AudioSinkInfo) sinkId; + [SecureContext] readonly attribute AudioRenderCapacity renderCapacity; + attribute EventHandler onsinkchange; + AudioTimestamp getOutputTimestamp (); + Promise resume (); + Promise suspend (); + Promise close (); + [SecureContext] Promise setSinkId ((DOMString or AudioSinkOptions) sinkId); + MediaElementAudioSourceNode createMediaElementSource (HTMLMediaElement mediaElement); + MediaStreamAudioSourceNode createMediaStreamSource (MediaStream mediaStream); + MediaStreamTrackAudioSourceNode createMediaStreamTrackSource ( + MediaStreamTrack mediaStreamTrack); + MediaStreamAudioDestinationNode createMediaStreamDestination (); }; dictionary AudioContextOptions { - (AudioContextLatencyCategory or double) latencyHint = "interactive"; - float sampleRate; - (DOMString or AudioSinkOptions) sinkId; + (AudioContextLatencyCategory or double) latencyHint = "interactive"; + float sampleRate; + (DOMString or AudioSinkOptions) sinkId; }; dictionary AudioSinkOptions { - required AudioSinkType type; + required AudioSinkType type; }; [Exposed=Window] interface AudioSinkInfo { - readonly attribute AudioSinkType type; + readonly attribute AudioSinkType type; }; dictionary AudioTimestamp { - double contextTime; - DOMHighResTimeStamp performanceTime; + double contextTime; + DOMHighResTimeStamp performanceTime; }; [Exposed=Window] interface AudioRenderCapacity : EventTarget { - undefined start(optional AudioRenderCapacityOptions options = {}); - undefined stop(); - attribute EventHandler onupdate; + undefined start(optional AudioRenderCapacityOptions options = {}); + undefined stop(); + attribute EventHandler onupdate; }; dictionary AudioRenderCapacityOptions { - double updateInterval = 1; + double updateInterval = 1; }; [Exposed=Window] interface AudioRenderCapacityEvent : Event { - constructor (DOMString type, optional AudioRenderCapacityEventInit eventInitDict = {}); - readonly attribute double timestamp; - readonly attribute double averageLoad; - readonly attribute double peakLoad; - readonly attribute double underrunRatio; + constructor (DOMString type, optional AudioRenderCapacityEventInit eventInitDict = {}); + readonly attribute double timestamp; + readonly attribute double averageLoad; + readonly attribute double peakLoad; + readonly attribute double underrunRatio; }; dictionary AudioRenderCapacityEventInit : EventInit { - double timestamp = 0; - double averageLoad = 0; - double peakLoad = 0; - double underrunRatio = 0; + double timestamp = 0; + double averageLoad = 0; + double peakLoad = 0; + double underrunRatio = 0; }; [Exposed=Window] interface OfflineAudioContext : BaseAudioContext { - constructor(OfflineAudioContextOptions contextOptions); - constructor(unsigned long numberOfChannels, unsigned long length, float sampleRate); - Promise startRendering(); - Promise resume(); - Promise suspend(double suspendTime); - readonly attribute unsigned long length; - attribute EventHandler oncomplete; + constructor(OfflineAudioContextOptions contextOptions); + constructor(unsigned long numberOfChannels, unsigned long length, float sampleRate); + Promise startRendering(); + Promise resume(); + Promise suspend(double suspendTime); + readonly attribute unsigned long length; + attribute EventHandler oncomplete; }; dictionary OfflineAudioContextOptions { - unsigned long numberOfChannels = 1; - required unsigned long length; - required float sampleRate; + unsigned long numberOfChannels = 1; + required unsigned long length; + required float sampleRate; }; [Exposed=Window] interface OfflineAudioCompletionEvent : Event { - constructor (DOMString type, OfflineAudioCompletionEventInit eventInitDict); - readonly attribute AudioBuffer renderedBuffer; + constructor (DOMString type, OfflineAudioCompletionEventInit eventInitDict); + readonly attribute AudioBuffer renderedBuffer; }; dictionary OfflineAudioCompletionEventInit : EventInit { - required AudioBuffer renderedBuffer; + required AudioBuffer renderedBuffer; }; [Exposed=Window] interface AudioBuffer { - constructor (AudioBufferOptions options); - readonly attribute float sampleRate; - readonly attribute unsigned long length; - readonly attribute double duration; - readonly attribute unsigned long numberOfChannels; - Float32Array getChannelData (unsigned long channel); - undefined copyFromChannel (Float32Array destination, + constructor (AudioBufferOptions options); + readonly attribute float sampleRate; + readonly attribute unsigned long length; + readonly attribute double duration; + readonly attribute unsigned long numberOfChannels; + Float32Array getChannelData (unsigned long channel); + undefined copyFromChannel (Float32Array destination, + unsigned long channelNumber, + optional unsigned long bufferOffset = 0); + undefined copyToChannel (Float32Array source, unsigned long channelNumber, optional unsigned long bufferOffset = 0); - undefined copyToChannel (Float32Array source, - unsigned long channelNumber, - optional unsigned long bufferOffset = 0); }; dictionary AudioBufferOptions { - unsigned long numberOfChannels = 1; - required unsigned long length; - required float sampleRate; + unsigned long numberOfChannels = 1; + required unsigned long length; + required float sampleRate; }; [Exposed=Window] interface AudioNode : EventTarget { - AudioNode connect (AudioNode destinationNode, - optional unsigned long output = 0, - optional unsigned long input = 0); - undefined connect (AudioParam destinationParam, optional unsigned long output = 0); - undefined disconnect (); - undefined disconnect (unsigned long output); - undefined disconnect (AudioNode destinationNode); - undefined disconnect (AudioNode destinationNode, unsigned long output); - undefined disconnect (AudioNode destinationNode, - unsigned long output, - unsigned long input); - undefined disconnect (AudioParam destinationParam); - undefined disconnect (AudioParam destinationParam, unsigned long output); - readonly attribute BaseAudioContext context; - readonly attribute unsigned long numberOfInputs; - readonly attribute unsigned long numberOfOutputs; - attribute unsigned long channelCount; - attribute ChannelCountMode channelCountMode; - attribute ChannelInterpretation channelInterpretation; + AudioNode connect (AudioNode destinationNode, + optional unsigned long output = 0, + optional unsigned long input = 0); + undefined connect (AudioParam destinationParam, optional unsigned long output = 0); + undefined disconnect (); + undefined disconnect (unsigned long output); + undefined disconnect (AudioNode destinationNode); + undefined disconnect (AudioNode destinationNode, unsigned long output); + undefined disconnect (AudioNode destinationNode, + unsigned long output, + unsigned long input); + undefined disconnect (AudioParam destinationParam); + undefined disconnect (AudioParam destinationParam, unsigned long output); + readonly attribute BaseAudioContext context; + readonly attribute unsigned long numberOfInputs; + readonly attribute unsigned long numberOfOutputs; + attribute unsigned long channelCount; + attribute ChannelCountMode channelCountMode; + attribute ChannelInterpretation channelInterpretation; }; enum ChannelCountMode { - "max", - "clamped-max", - "explicit" + "max", + "clamped-max", + "explicit" }; enum ChannelInterpretation { - "speakers", - "discrete" + "speakers", + "discrete" }; dictionary AudioNodeOptions { - unsigned long channelCount; - ChannelCountMode channelCountMode; - ChannelInterpretation channelInterpretation; + unsigned long channelCount; + ChannelCountMode channelCountMode; + ChannelInterpretation channelInterpretation; }; enum AutomationRate { - "a-rate", - "k-rate" + "a-rate", + "k-rate" }; [Exposed=Window] interface AudioParam { - attribute float value; - attribute AutomationRate automationRate; - readonly attribute float defaultValue; - readonly attribute float minValue; - readonly attribute float maxValue; - AudioParam setValueAtTime (float value, double startTime); - AudioParam linearRampToValueAtTime (float value, double endTime); - AudioParam exponentialRampToValueAtTime (float value, double endTime); - AudioParam setTargetAtTime (float target, double startTime, float timeConstant); - AudioParam setValueCurveAtTime (sequence values, - double startTime, - double duration); - AudioParam cancelScheduledValues (double cancelTime); - AudioParam cancelAndHoldAtTime (double cancelTime); + attribute float value; + attribute AutomationRate automationRate; + readonly attribute float defaultValue; + readonly attribute float minValue; + readonly attribute float maxValue; + AudioParam setValueAtTime (float value, double startTime); + AudioParam linearRampToValueAtTime (float value, double endTime); + AudioParam exponentialRampToValueAtTime (float value, double endTime); + AudioParam setTargetAtTime (float target, double startTime, float timeConstant); + AudioParam setValueCurveAtTime (sequence values, + double startTime, + double duration); + AudioParam cancelScheduledValues (double cancelTime); + AudioParam cancelAndHoldAtTime (double cancelTime); }; [Exposed=Window] interface AudioScheduledSourceNode : AudioNode { - attribute EventHandler onended; - undefined start(optional double when = 0); - undefined stop(optional double when = 0); + attribute EventHandler onended; + undefined start(optional double when = 0); + undefined stop(optional double when = 0); }; [Exposed=Window] interface AnalyserNode : AudioNode { - constructor (BaseAudioContext context, optional AnalyserOptions options = {}); - undefined getFloatFrequencyData (Float32Array array); - undefined getByteFrequencyData (Uint8Array array); - undefined getFloatTimeDomainData (Float32Array array); - undefined getByteTimeDomainData (Uint8Array array); - attribute unsigned long fftSize; - readonly attribute unsigned long frequencyBinCount; - attribute double minDecibels; - attribute double maxDecibels; - attribute double smoothingTimeConstant; + constructor (BaseAudioContext context, optional AnalyserOptions options = {}); + undefined getFloatFrequencyData (Float32Array array); + undefined getByteFrequencyData (Uint8Array array); + undefined getFloatTimeDomainData (Float32Array array); + undefined getByteTimeDomainData (Uint8Array array); + attribute unsigned long fftSize; + readonly attribute unsigned long frequencyBinCount; + attribute double minDecibels; + attribute double maxDecibels; + attribute double smoothingTimeConstant; }; dictionary AnalyserOptions : AudioNodeOptions { - unsigned long fftSize = 2048; - double maxDecibels = -30; - double minDecibels = -100; - double smoothingTimeConstant = 0.8; + unsigned long fftSize = 2048; + double maxDecibels = -30; + double minDecibels = -100; + double smoothingTimeConstant = 0.8; }; [Exposed=Window] interface AudioBufferSourceNode : AudioScheduledSourceNode { - constructor (BaseAudioContext context, - optional AudioBufferSourceOptions options = {}); - attribute AudioBuffer? buffer; - readonly attribute AudioParam playbackRate; - readonly attribute AudioParam detune; - attribute boolean loop; - attribute double loopStart; - attribute double loopEnd; - undefined start (optional double when = 0, - optional double offset, - optional double duration); + constructor (BaseAudioContext context, + optional AudioBufferSourceOptions options = {}); + attribute AudioBuffer? buffer; + readonly attribute AudioParam playbackRate; + readonly attribute AudioParam detune; + attribute boolean loop; + attribute double loopStart; + attribute double loopEnd; + undefined start (optional double when = 0, + optional double offset, + optional double duration); }; dictionary AudioBufferSourceOptions { - AudioBuffer? buffer; - float detune = 0; - boolean loop = false; - double loopEnd = 0; - double loopStart = 0; - float playbackRate = 1; + AudioBuffer? buffer; + float detune = 0; + boolean loop = false; + double loopEnd = 0; + double loopStart = 0; + float playbackRate = 1; }; [Exposed=Window] interface AudioDestinationNode : AudioNode { - readonly attribute unsigned long maxChannelCount; + readonly attribute unsigned long maxChannelCount; }; [Exposed=Window] interface AudioListener { - readonly attribute AudioParam positionX; - readonly attribute AudioParam positionY; - readonly attribute AudioParam positionZ; - readonly attribute AudioParam forwardX; - readonly attribute AudioParam forwardY; - readonly attribute AudioParam forwardZ; - readonly attribute AudioParam upX; - readonly attribute AudioParam upY; - readonly attribute AudioParam upZ; - undefined setPosition (float x, float y, float z); - undefined setOrientation (float x, float y, float z, float xUp, float yUp, float zUp); + readonly attribute AudioParam positionX; + readonly attribute AudioParam positionY; + readonly attribute AudioParam positionZ; + readonly attribute AudioParam forwardX; + readonly attribute AudioParam forwardY; + readonly attribute AudioParam forwardZ; + readonly attribute AudioParam upX; + readonly attribute AudioParam upY; + readonly attribute AudioParam upZ; + undefined setPosition (float x, float y, float z); + undefined setOrientation (float x, float y, float z, float xUp, float yUp, float zUp); }; [Exposed=Window] interface AudioProcessingEvent : Event { - constructor (DOMString type, AudioProcessingEventInit eventInitDict); - readonly attribute double playbackTime; - readonly attribute AudioBuffer inputBuffer; - readonly attribute AudioBuffer outputBuffer; + constructor (DOMString type, AudioProcessingEventInit eventInitDict); + readonly attribute double playbackTime; + readonly attribute AudioBuffer inputBuffer; + readonly attribute AudioBuffer outputBuffer; }; dictionary AudioProcessingEventInit : EventInit { - required double playbackTime; - required AudioBuffer inputBuffer; - required AudioBuffer outputBuffer; + required double playbackTime; + required AudioBuffer inputBuffer; + required AudioBuffer outputBuffer; }; enum BiquadFilterType { - "lowpass", - "highpass", - "bandpass", - "lowshelf", - "highshelf", - "peaking", - "notch", - "allpass" + "lowpass", + "highpass", + "bandpass", + "lowshelf", + "highshelf", + "peaking", + "notch", + "allpass" }; [Exposed=Window] interface BiquadFilterNode : AudioNode { - constructor (BaseAudioContext context, optional BiquadFilterOptions options = {}); - attribute BiquadFilterType type; - readonly attribute AudioParam frequency; - readonly attribute AudioParam detune; - readonly attribute AudioParam Q; - readonly attribute AudioParam gain; - undefined getFrequencyResponse (Float32Array frequencyHz, - Float32Array magResponse, - Float32Array phaseResponse); + constructor (BaseAudioContext context, optional BiquadFilterOptions options = {}); + attribute BiquadFilterType type; + readonly attribute AudioParam frequency; + readonly attribute AudioParam detune; + readonly attribute AudioParam Q; + readonly attribute AudioParam gain; + undefined getFrequencyResponse (Float32Array frequencyHz, + Float32Array magResponse, + Float32Array phaseResponse); }; dictionary BiquadFilterOptions : AudioNodeOptions { - BiquadFilterType type = "lowpass"; - float Q = 1; - float detune = 0; - float frequency = 350; - float gain = 0; + BiquadFilterType type = "lowpass"; + float Q = 1; + float detune = 0; + float frequency = 350; + float gain = 0; }; [Exposed=Window] interface ChannelMergerNode : AudioNode { - constructor (BaseAudioContext context, optional ChannelMergerOptions options = {}); + constructor (BaseAudioContext context, optional ChannelMergerOptions options = {}); }; dictionary ChannelMergerOptions : AudioNodeOptions { - unsigned long numberOfInputs = 6; + unsigned long numberOfInputs = 6; }; [Exposed=Window] interface ChannelSplitterNode : AudioNode { - constructor (BaseAudioContext context, optional ChannelSplitterOptions options = {}); + constructor (BaseAudioContext context, optional ChannelSplitterOptions options = {}); }; dictionary ChannelSplitterOptions : AudioNodeOptions { - unsigned long numberOfOutputs = 6; + unsigned long numberOfOutputs = 6; }; [Exposed=Window] interface ConstantSourceNode : AudioScheduledSourceNode { - constructor (BaseAudioContext context, optional ConstantSourceOptions options = {}); - readonly attribute AudioParam offset; + constructor (BaseAudioContext context, optional ConstantSourceOptions options = {}); + readonly attribute AudioParam offset; }; dictionary ConstantSourceOptions { - float offset = 1; + float offset = 1; }; [Exposed=Window] interface ConvolverNode : AudioNode { - constructor (BaseAudioContext context, optional ConvolverOptions options = {}); - attribute AudioBuffer? buffer; - attribute boolean normalize; + constructor (BaseAudioContext context, optional ConvolverOptions options = {}); + attribute AudioBuffer? buffer; + attribute boolean normalize; }; dictionary ConvolverOptions : AudioNodeOptions { - AudioBuffer? buffer; - boolean disableNormalization = false; + AudioBuffer? buffer; + boolean disableNormalization = false; }; [Exposed=Window] interface DelayNode : AudioNode { - constructor (BaseAudioContext context, optional DelayOptions options = {}); - readonly attribute AudioParam delayTime; + constructor (BaseAudioContext context, optional DelayOptions options = {}); + readonly attribute AudioParam delayTime; }; dictionary DelayOptions : AudioNodeOptions { - double maxDelayTime = 1; - double delayTime = 0; + double maxDelayTime = 1; + double delayTime = 0; }; [Exposed=Window] interface DynamicsCompressorNode : AudioNode { - constructor (BaseAudioContext context, - optional DynamicsCompressorOptions options = {}); - readonly attribute AudioParam threshold; - readonly attribute AudioParam knee; - readonly attribute AudioParam ratio; - readonly attribute float reduction; - readonly attribute AudioParam attack; - readonly attribute AudioParam release; + constructor (BaseAudioContext context, + optional DynamicsCompressorOptions options = {}); + readonly attribute AudioParam threshold; + readonly attribute AudioParam knee; + readonly attribute AudioParam ratio; + readonly attribute float reduction; + readonly attribute AudioParam attack; + readonly attribute AudioParam release; }; dictionary DynamicsCompressorOptions : AudioNodeOptions { - float attack = 0.003; - float knee = 30; - float ratio = 12; - float release = 0.25; - float threshold = -24; + float attack = 0.003; + float knee = 30; + float ratio = 12; + float release = 0.25; + float threshold = -24; }; [Exposed=Window] interface GainNode : AudioNode { - constructor (BaseAudioContext context, optional GainOptions options = {}); - readonly attribute AudioParam gain; + constructor (BaseAudioContext context, optional GainOptions options = {}); + readonly attribute AudioParam gain; }; dictionary GainOptions : AudioNodeOptions { - float gain = 1.0; + float gain = 1.0; }; [Exposed=Window] interface IIRFilterNode : AudioNode { - constructor (BaseAudioContext context, IIRFilterOptions options); - undefined getFrequencyResponse (Float32Array frequencyHz, - Float32Array magResponse, - Float32Array phaseResponse); + constructor (BaseAudioContext context, IIRFilterOptions options); + undefined getFrequencyResponse (Float32Array frequencyHz, + Float32Array magResponse, + Float32Array phaseResponse); }; dictionary IIRFilterOptions : AudioNodeOptions { - required sequence feedforward; - required sequence feedback; + required sequence feedforward; + required sequence feedback; }; [Exposed=Window] interface MediaElementAudioSourceNode : AudioNode { - constructor (AudioContext context, MediaElementAudioSourceOptions options); - [SameObject] readonly attribute HTMLMediaElement mediaElement; + constructor (AudioContext context, MediaElementAudioSourceOptions options); + [SameObject] readonly attribute HTMLMediaElement mediaElement; }; dictionary MediaElementAudioSourceOptions { - required HTMLMediaElement mediaElement; + required HTMLMediaElement mediaElement; }; [Exposed=Window] interface MediaStreamAudioDestinationNode : AudioNode { - constructor (AudioContext context, optional AudioNodeOptions options = {}); - readonly attribute MediaStream stream; + constructor (AudioContext context, optional AudioNodeOptions options = {}); + readonly attribute MediaStream stream; }; [Exposed=Window] interface MediaStreamAudioSourceNode : AudioNode { - constructor (AudioContext context, MediaStreamAudioSourceOptions options); - [SameObject] readonly attribute MediaStream mediaStream; + constructor (AudioContext context, MediaStreamAudioSourceOptions options); + [SameObject] readonly attribute MediaStream mediaStream; }; dictionary MediaStreamAudioSourceOptions { - required MediaStream mediaStream; + required MediaStream mediaStream; }; [Exposed=Window] interface MediaStreamTrackAudioSourceNode : AudioNode { - constructor (AudioContext context, MediaStreamTrackAudioSourceOptions options); + constructor (AudioContext context, MediaStreamTrackAudioSourceOptions options); }; dictionary MediaStreamTrackAudioSourceOptions { - required MediaStreamTrack mediaStreamTrack; + required MediaStreamTrack mediaStreamTrack; }; enum OscillatorType { - "sine", - "square", - "sawtooth", - "triangle", - "custom" + "sine", + "square", + "sawtooth", + "triangle", + "custom" }; [Exposed=Window] interface OscillatorNode : AudioScheduledSourceNode { - constructor (BaseAudioContext context, optional OscillatorOptions options = {}); - attribute OscillatorType type; - readonly attribute AudioParam frequency; - readonly attribute AudioParam detune; - undefined setPeriodicWave (PeriodicWave periodicWave); + constructor (BaseAudioContext context, optional OscillatorOptions options = {}); + attribute OscillatorType type; + readonly attribute AudioParam frequency; + readonly attribute AudioParam detune; + undefined setPeriodicWave (PeriodicWave periodicWave); }; dictionary OscillatorOptions : AudioNodeOptions { - OscillatorType type = "sine"; - float frequency = 440; - float detune = 0; - PeriodicWave periodicWave; + OscillatorType type = "sine"; + float frequency = 440; + float detune = 0; + PeriodicWave periodicWave; }; enum PanningModelType { - "equalpower", - "HRTF" + "equalpower", + "HRTF" }; enum DistanceModelType { - "linear", - "inverse", - "exponential" + "linear", + "inverse", + "exponential" }; [Exposed=Window] interface PannerNode : AudioNode { - constructor (BaseAudioContext context, optional PannerOptions options = {}); - attribute PanningModelType panningModel; - readonly attribute AudioParam positionX; - readonly attribute AudioParam positionY; - readonly attribute AudioParam positionZ; - readonly attribute AudioParam orientationX; - readonly attribute AudioParam orientationY; - readonly attribute AudioParam orientationZ; - attribute DistanceModelType distanceModel; - attribute double refDistance; - attribute double maxDistance; - attribute double rolloffFactor; - attribute double coneInnerAngle; - attribute double coneOuterAngle; - attribute double coneOuterGain; - undefined setPosition (float x, float y, float z); - undefined setOrientation (float x, float y, float z); + constructor (BaseAudioContext context, optional PannerOptions options = {}); + attribute PanningModelType panningModel; + readonly attribute AudioParam positionX; + readonly attribute AudioParam positionY; + readonly attribute AudioParam positionZ; + readonly attribute AudioParam orientationX; + readonly attribute AudioParam orientationY; + readonly attribute AudioParam orientationZ; + attribute DistanceModelType distanceModel; + attribute double refDistance; + attribute double maxDistance; + attribute double rolloffFactor; + attribute double coneInnerAngle; + attribute double coneOuterAngle; + attribute double coneOuterGain; + undefined setPosition (float x, float y, float z); + undefined setOrientation (float x, float y, float z); }; dictionary PannerOptions : AudioNodeOptions { - PanningModelType panningModel = "equalpower"; - DistanceModelType distanceModel = "inverse"; - float positionX = 0; - float positionY = 0; - float positionZ = 0; - float orientationX = 1; - float orientationY = 0; - float orientationZ = 0; - double refDistance = 1; - double maxDistance = 10000; - double rolloffFactor = 1; - double coneInnerAngle = 360; - double coneOuterAngle = 360; - double coneOuterGain = 0; + PanningModelType panningModel = "equalpower"; + DistanceModelType distanceModel = "inverse"; + float positionX = 0; + float positionY = 0; + float positionZ = 0; + float orientationX = 1; + float orientationY = 0; + float orientationZ = 0; + double refDistance = 1; + double maxDistance = 10000; + double rolloffFactor = 1; + double coneInnerAngle = 360; + double coneOuterAngle = 360; + double coneOuterGain = 0; }; [Exposed=Window] interface PeriodicWave { - constructor (BaseAudioContext context, optional PeriodicWaveOptions options = {}); + constructor (BaseAudioContext context, optional PeriodicWaveOptions options = {}); }; dictionary PeriodicWaveConstraints { - boolean disableNormalization = false; + boolean disableNormalization = false; }; dictionary PeriodicWaveOptions : PeriodicWaveConstraints { - sequence real; - sequence imag; + sequence real; + sequence imag; }; [Exposed=Window] interface ScriptProcessorNode : AudioNode { - attribute EventHandler onaudioprocess; - readonly attribute long bufferSize; + attribute EventHandler onaudioprocess; + readonly attribute long bufferSize; }; [Exposed=Window] interface StereoPannerNode : AudioNode { - constructor (BaseAudioContext context, optional StereoPannerOptions options = {}); - readonly attribute AudioParam pan; + constructor (BaseAudioContext context, optional StereoPannerOptions options = {}); + readonly attribute AudioParam pan; }; dictionary StereoPannerOptions : AudioNodeOptions { - float pan = 0; + float pan = 0; }; enum OverSampleType { - "none", - "2x", - "4x" + "none", + "2x", + "4x" }; [Exposed=Window] interface WaveShaperNode : AudioNode { - constructor (BaseAudioContext context, optional WaveShaperOptions options = {}); - attribute Float32Array? curve; - attribute OverSampleType oversample; + constructor (BaseAudioContext context, optional WaveShaperOptions options = {}); + attribute Float32Array? curve; + attribute OverSampleType oversample; }; dictionary WaveShaperOptions : AudioNodeOptions { - sequence curve; - OverSampleType oversample = "none"; + sequence curve; + OverSampleType oversample = "none"; }; [Exposed=Window, SecureContext] @@ -624,40 +624,40 @@ callback AudioWorkletProcessorConstructor = AudioWorkletProcessor (object option [Global=(Worklet, AudioWorklet), Exposed=AudioWorklet] interface AudioWorkletGlobalScope : WorkletGlobalScope { - undefined registerProcessor (DOMString name, - AudioWorkletProcessorConstructor processorCtor); - readonly attribute unsigned long long currentFrame; - readonly attribute double currentTime; - readonly attribute float sampleRate; - readonly attribute MessagePort port; + undefined registerProcessor (DOMString name, + AudioWorkletProcessorConstructor processorCtor); + readonly attribute unsigned long long currentFrame; + readonly attribute double currentTime; + readonly attribute float sampleRate; + readonly attribute MessagePort port; }; [Exposed=Window] interface AudioParamMap { - readonly maplike; + readonly maplike; }; [Exposed=Window, SecureContext] interface AudioWorkletNode : AudioNode { - constructor (BaseAudioContext context, DOMString name, + constructor (BaseAudioContext context, DOMString name, optional AudioWorkletNodeOptions options = {}); - readonly attribute AudioParamMap parameters; - readonly attribute MessagePort port; - attribute EventHandler onprocessorerror; + readonly attribute AudioParamMap parameters; + readonly attribute MessagePort port; + attribute EventHandler onprocessorerror; }; dictionary AudioWorkletNodeOptions : AudioNodeOptions { - unsigned long numberOfInputs = 1; - unsigned long numberOfOutputs = 1; - sequence outputChannelCount; - record parameterData; - object processorOptions; + unsigned long numberOfInputs = 1; + unsigned long numberOfOutputs = 1; + sequence outputChannelCount; + record parameterData; + object processorOptions; }; [Exposed=AudioWorklet] interface AudioWorkletProcessor { - constructor (); - readonly attribute MessagePort port; + constructor (); + readonly attribute MessagePort port; }; callback AudioWorkletProcessCallback = @@ -666,9 +666,9 @@ callback AudioWorkletProcessCallback = object parameters); dictionary AudioParamDescriptor { - required DOMString name; - float defaultValue = 0; - float minValue = -3.4028235e38; - float maxValue = 3.4028235e38; - AutomationRate automationRate = "a-rate"; + required DOMString name; + float defaultValue = 0; + float minValue = -3.4028235e38; + float maxValue = 3.4028235e38; + AutomationRate automationRate = "a-rate"; }; diff --git a/tests/wpt/web-platform-tests/interfaces/webauthn.idl b/tests/wpt/web-platform-tests/interfaces/webauthn.idl index d35ebbfc919..ef27322312f 100644 --- a/tests/wpt/web-platform-tests/interfaces/webauthn.idl +++ b/tests/wpt/web-platform-tests/interfaces/webauthn.idl @@ -20,7 +20,7 @@ dictionary RegistrationResponseJSON { Base64URLString id; Base64URLString rawId; AuthenticatorAttestationResponseJSON response; - DOMString? authenticatorAttachment; + DOMString? authenticatorAttachment; AuthenticationExtensionsClientOutputsJSON clientExtensionResults; DOMString type; }; @@ -35,7 +35,7 @@ dictionary AuthenticationResponseJSON { Base64URLString id; Base64URLString rawId; AuthenticatorAssertionResponseJSON response; - DOMString? authenticatorAttachment; + DOMString? authenticatorAttachment; AuthenticationExtensionsClientOutputsJSON clientExtensionResults; DOMString type; }; diff --git a/tests/wpt/web-platform-tests/interfaces/webcodecs-flac-codec-registration.idl b/tests/wpt/web-platform-tests/interfaces/webcodecs-flac-codec-registration.idl new file mode 100644 index 00000000000..0f7e13a53db --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/webcodecs-flac-codec-registration.idl @@ -0,0 +1,13 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: FLAC WebCodecs Registration (https://w3c.github.io/webcodecs/flac_codec_registration.html) + +partial dictionary AudioEncoderConfig { + FlacEncoderConfig flac; +}; + +dictionary FlacEncoderConfig { + [EnforceRange] unsigned long blockSize = 0; + [EnforceRange] unsigned long compressLevel = 5; +}; diff --git a/tests/wpt/web-platform-tests/interfaces/webgpu.idl b/tests/wpt/web-platform-tests/interfaces/webgpu.idl index f2e038c2047..b00e2374e58 100644 --- a/tests/wpt/web-platform-tests/interfaces/webgpu.idl +++ b/tests/wpt/web-platform-tests/interfaces/webgpu.idl @@ -106,7 +106,6 @@ enum GPUFeatureName { "timestamp-query", "indirect-first-instance", "shader-f16", - "bgra8unorm-storage", "rg11b10ufloat-renderable" }; @@ -585,6 +584,21 @@ interface GPUCompilationInfo { readonly attribute FrozenArray messages; }; +[Exposed=(Window, DedicatedWorker), SecureContext, Serializable] +interface GPUPipelineError : DOMException { + constructor(DOMString message, GPUPipelineErrorInit options); + readonly attribute GPUPipelineErrorReason reason; +}; + +dictionary GPUPipelineErrorInit { + required GPUPipelineErrorReason reason; +}; + +enum GPUPipelineErrorReason { + "validation", + "internal" +}; + enum GPUAutoLayoutMode { "auto" }; @@ -815,6 +829,34 @@ dictionary GPUVertexAttribute { required GPUIndex32 shaderLocation; }; +dictionary GPUImageDataLayout { + GPUSize64 offset = 0; + GPUSize32 bytesPerRow; + GPUSize32 rowsPerImage; +}; + +dictionary GPUImageCopyBuffer : GPUImageDataLayout { + required GPUBuffer buffer; +}; + +dictionary GPUImageCopyTexture { + required GPUTexture texture; + GPUIntegerCoordinate mipLevel = 0; + GPUOrigin3D origin = {}; + GPUTextureAspect aspect = "all"; +}; + +dictionary GPUImageCopyTextureTagged : GPUImageCopyTexture { + PredefinedColorSpace colorSpace = "srgb"; + boolean premultipliedAlpha = false; +}; + +dictionary GPUImageCopyExternalImage { + required (ImageBitmap or HTMLVideoElement or HTMLCanvasElement or OffscreenCanvas) source; + GPUOrigin2D origin = {}; + boolean flipY = false; +}; + [Exposed=(Window, DedicatedWorker), SecureContext] interface GPUCommandBuffer { }; @@ -876,34 +918,6 @@ GPUCommandEncoder includes GPUDebugCommandsMixin; dictionary GPUCommandEncoderDescriptor : GPUObjectDescriptorBase { }; -dictionary GPUImageDataLayout { - GPUSize64 offset = 0; - GPUSize32 bytesPerRow; - GPUSize32 rowsPerImage; -}; - -dictionary GPUImageCopyBuffer : GPUImageDataLayout { - required GPUBuffer buffer; -}; - -dictionary GPUImageCopyTexture { - required GPUTexture texture; - GPUIntegerCoordinate mipLevel = 0; - GPUOrigin3D origin = {}; - GPUTextureAspect aspect = "all"; -}; - -dictionary GPUImageCopyTextureTagged : GPUImageCopyTexture { - PredefinedColorSpace colorSpace = "srgb"; - boolean premultipliedAlpha = false; -}; - -dictionary GPUImageCopyExternalImage { - required (ImageBitmap or HTMLVideoElement or HTMLCanvasElement or OffscreenCanvas) source; - GPUOrigin2D origin = {}; - boolean flipY = false; -}; - interface mixin GPUBindingCommandsMixin { undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup, optional sequence dynamicOffsets = []); diff --git a/tests/wpt/web-platform-tests/interfaces/webnn.idl b/tests/wpt/web-platform-tests/interfaces/webnn.idl index 2f900b505b9..c8a09aed9e9 100644 --- a/tests/wpt/web-platform-tests/interfaces/webnn.idl +++ b/tests/wpt/web-platform-tests/interfaces/webnn.idl @@ -27,8 +27,13 @@ dictionary MLContextOptions { [SecureContext, Exposed=(Window, DedicatedWorker)] interface ML { - MLContext createContext(optional MLContextOptions options = {}); - MLContext createContext(GPUDevice gpuDevice); + Promise createContext(optional MLContextOptions options = {}); + Promise createContext(GPUDevice gpuDevice); + + [Exposed=(DedicatedWorker)] + MLContext createContextSync(optional MLContextOptions options = {}); + [Exposed=(DedicatedWorker)] + MLContext createContextSync(GPUDevice gpuDevice); }; typedef record MLNamedArrayBufferViews; @@ -38,12 +43,12 @@ interface MLContext {}; partial interface MLContext { [Exposed=(DedicatedWorker)] - undefined compute( + undefined computeSync( MLGraph graph, MLNamedArrayBufferViews inputs, MLNamedArrayBufferViews outputs); }; partial interface MLContext { - Promise computeAsync( + Promise compute( MLGraph graph, MLNamedArrayBufferViews inputs, MLNamedArrayBufferViews outputs); }; @@ -103,12 +108,12 @@ interface MLGraphBuilder { // Create a single-value operand from the specified number of the specified type. MLOperand constant(double value, optional MLOperandType type = "float32"); + // Compile the graph up to the specified output operands asynchronously. + Promise build(MLNamedOperands outputs); + // Compile the graph up to the specified output operands synchronously. [Exposed=(DedicatedWorker)] - MLGraph build(MLNamedOperands outputs); - - // Compile the graph up to the specified output operands asynchronously. - Promise buildAsync(MLNamedOperands outputs); + MLGraph buildSync(MLNamedOperands outputs); }; dictionary MLBatchNormalizationOptions { @@ -152,11 +157,11 @@ enum MLAutoPad { }; dictionary MLConv2dOptions { - sequence padding; - sequence strides; - sequence dilations; + sequence padding; + sequence strides; + sequence dilations; MLAutoPad autoPad = "explicit"; - long groups = 1; + unsigned long groups = 1; MLInputOperandLayout inputLayout = "nchw"; MLConv2dFilterOperandLayout filterLayout = "oihw"; MLOperand bias; @@ -174,13 +179,13 @@ enum MLConvTranspose2dFilterOperandLayout { }; dictionary MLConvTranspose2dOptions { - sequence padding; - sequence strides; - sequence dilations; - sequence outputPadding; - sequence outputSizes; + sequence padding; + sequence strides; + sequence dilations; + sequence outputPadding; + sequence outputSizes; MLAutoPad autoPad = "explicit"; - long groups = 1; + unsigned long groups = 1; MLInputOperandLayout inputLayout = "nchw"; MLConvTranspose2dFilterOperandLayout filterLayout = "iohw"; MLOperand bias; @@ -259,7 +264,6 @@ dictionary MLGruOptions { partial interface MLGraphBuilder { sequence gru(MLOperand input, MLOperand weight, MLOperand recurrentWeight, - long steps, long hiddenSize, optional MLGruOptions options = {}); }; @@ -273,7 +277,6 @@ dictionary MLGruCellOptions { partial interface MLGraphBuilder { MLOperand gruCell(MLOperand input, MLOperand weight, MLOperand recurrentWeight, - MLOperand hiddenState, long hiddenSize, optional MLGruCellOptions options = {}); }; @@ -301,7 +304,6 @@ dictionary MLInstanceNormalizationOptions { partial interface MLGraphBuilder { MLOperand instanceNormalization(MLOperand input, - optional MLInstanceNormalizationOptions options = {}); }; @@ -350,14 +352,14 @@ enum MLRoundingType { }; dictionary MLPool2dOptions { - sequence windowDimensions; - sequence padding; - sequence strides; - sequence dilations; + sequence windowDimensions; + sequence padding; + sequence strides; + sequence dilations; MLAutoPad autoPad = "explicit"; MLInputOperandLayout layout = "nchw"; MLRoundingType roundingType = "floor"; - sequence outputSizes; + sequence outputSizes; }; partial interface MLGraphBuilder { @@ -397,7 +399,7 @@ enum MLInterpolationMode { dictionary MLResample2dOptions { MLInterpolationMode mode = "nearest-neighbor"; sequence scales; - sequence sizes; + sequence sizes; sequence axes; }; @@ -406,7 +408,7 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { - MLOperand reshape(MLOperand input, sequence newShape); + MLOperand reshape(MLOperand input, sequence newShape); }; partial interface MLGraphBuilder { diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc-encoded-transform.idl b/tests/wpt/web-platform-tests/interfaces/webrtc-encoded-transform.idl index f1747f51150..13f3999db12 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc-encoded-transform.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc-encoded-transform.idl @@ -64,15 +64,15 @@ enum RTCEncodedVideoFrameType { }; dictionary RTCEncodedVideoFrameMetadata { - long long frameId; - sequence dependencies; + unsigned long long frameId; + sequence dependencies; unsigned short width; unsigned short height; - long spatialIndex; - long temporalIndex; + unsigned long spatialIndex; + unsigned long temporalIndex; unsigned long synchronizationSource; octet payloadType; - sequence contributingSources; + sequence contributingSources; }; // New interfaces to define encoded video and audio frames. Will eventually diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl b/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl index 237c7e474c9..397d7838b79 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl @@ -51,6 +51,7 @@ dictionary RTCInboundRtpStreamStats : RTCReceivedRtpStreamStats { DOMString remoteId; unsigned long framesDecoded; unsigned long keyFramesDecoded; + unsigned long framesRendered; unsigned long framesDropped; unsigned long frameWidth; unsigned long frameHeight; @@ -137,6 +138,7 @@ dictionary RTCOutboundRtpStreamStats : RTCSentRtpStreamStats { DOMString encoderImplementation; boolean powerEfficientEncoder; boolean active; + DOMString scalabilityMode; }; enum RTCQualityLimitationReason { @@ -180,11 +182,11 @@ dictionary RTCVideoSourceStats : RTCMediaSourceStats { }; dictionary RTCAudioPlayoutStats : RTCStats { - double synthesizedSamplesDuration; - unsigned long synthesizedSamplesEvents; - double totalSamplesDuration; - double totalPlayoutDelay; - double totalSamplesCount; + double synthesizedSamplesDuration; + unsigned long synthesizedSamplesEvents; + double totalSamplesDuration; + double totalPlayoutDelay; + unsigned long long totalSamplesCount; }; dictionary RTCPeerConnectionStats : RTCStats { diff --git a/tests/wpt/web-platform-tests/interfaces/webtransport.idl b/tests/wpt/web-platform-tests/interfaces/webtransport.idl index 1aa5a512da7..ba705807f12 100644 --- a/tests/wpt/web-platform-tests/interfaces/webtransport.idl +++ b/tests/wpt/web-platform-tests/interfaces/webtransport.idl @@ -28,11 +28,13 @@ interface WebTransport { readonly attribute WebTransportDatagramDuplexStream datagrams; - Promise createBidirectionalStream(); + Promise createBidirectionalStream( + optional WebTransportSendStreamOptions options = {}); /* a ReadableStream of WebTransportBidirectionalStream objects */ readonly attribute ReadableStream incomingBidirectionalStreams; - Promise createUnidirectionalStream(); + Promise createUnidirectionalStream( + optional WebTransportSendStreamOptions options = {}); /* a ReadableStream of WebTransportReceiveStream objects */ readonly attribute ReadableStream incomingUnidirectionalStreams; }; @@ -63,7 +65,11 @@ enum WebTransportCongestionControl { dictionary WebTransportCloseInfo { unsigned long closeCode = 0; - DOMString reason = ""; + USVString reason = ""; +}; + +dictionary WebTransportSendStreamOptions { + long long? sendOrder = null; }; dictionary WebTransportStats { @@ -88,7 +94,7 @@ dictionary WebTransportDatagramStats { unsigned long long lostOutgoing; }; -[Exposed=(Window,Worker), SecureContext] +[Exposed=(Window,Worker), SecureContext, Transferable] interface WebTransportSendStream : WritableStream { Promise getStats(); }; @@ -100,7 +106,7 @@ dictionary WebTransportSendStreamStats { unsigned long long bytesAcknowledged; }; -[Exposed=(Window,Worker), SecureContext] +[Exposed=(Window,Worker), SecureContext, Transferable] interface WebTransportReceiveStream : ReadableStream { Promise getStats(); }; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html b/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html index 9ca33f06771..8758c1c839b 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html @@ -1,52 +1,93 @@ Largest Contentful Paint: largest text is reported. - - - - - - -
    This is some text.
    -
    This is more text so it will be the Largest Contentful Paint!
    - - + + + + + + +
    +
    + + diff --git a/tests/wpt/web-platform-tests/lint.ignore b/tests/wpt/web-platform-tests/lint.ignore index 0fb0c4c32a7..ac1d870c7ae 100644 --- a/tests/wpt/web-platform-tests/lint.ignore +++ b/tests/wpt/web-platform-tests/lint.ignore @@ -116,6 +116,8 @@ CONSOLE: service-workers/service-worker/navigation-redirect.https.html CONSOLE: service-workers/service-worker/resources/clients-get-other-origin.html CONSOLE: webrtc/tools/* CONSOLE: webaudio/resources/audit.js:41 +CONSOLE: resource-timing/resources/resource-loaders.js +CONSOLE: resource-timing/resources/entry-invariants.js # use of console in a public library - annotation-model ensures # it is not actually used diff --git a/tests/wpt/web-platform-tests/native-io/META.yml b/tests/wpt/web-platform-tests/native-io/META.yml deleted file mode 100644 index 22a45c20c9b..00000000000 --- a/tests/wpt/web-platform-tests/native-io/META.yml +++ /dev/null @@ -1,4 +0,0 @@ -spec: https://todo.github.io/native-io/ -suggested_reviewers: - - pwnall - - mikewest diff --git a/tests/wpt/web-platform-tests/native-io/README.md b/tests/wpt/web-platform-tests/native-io/README.md deleted file mode 100644 index eb1a8d268ce..00000000000 --- a/tests/wpt/web-platform-tests/native-io/README.md +++ /dev/null @@ -1,16 +0,0 @@ -This directory contains tests for the -[NativeIO API](https://github.com/TODO/native-io). - -## Note on the synchronous APIs - -Chrome is currently working with developers to explore the performance -implications of using NativeIO as an asynchronous Promise-based API from -WebAssembly. - -In order to assess the performance overhead, a baseline is needed. This baseline -is a synchronous API that can be easily used to port existing database code to -WebAssembly. The synchronous API is only exposed to dedicated workers. - -Until our performance studies are concluded, Chrome has no plans of shipping the -synchronous API. In other words, there are no plans of adding a new synchronous -storage API to the Web Platform. diff --git a/tests/wpt/web-platform-tests/native-io/capacity_allocation_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/capacity_allocation_async_basic.tentative.https.any.js deleted file mode 100644 index 93e2e9873a8..00000000000 --- a/tests/wpt/web-platform-tests/native-io/capacity_allocation_async_basic.tentative.https.any.js +++ /dev/null @@ -1,37 +0,0 @@ -// META: title=NativeIO API: Acquiring, displaying and releasing capacity. -// META: global=window,worker - -'use strict'; - -promise_test(async testCase => { - const available_capacity = await storageFoundation.getRemainingCapacity(); - assert_equals(available_capacity, 0); -}, 'The starting capacity of a NativeIOFileManager is 0'); - -promise_test(async testCase => { - const requested_capacity = 4; - const granted_capacity = await storageFoundation.requestCapacity(requested_capacity); - const available_capacity = await storageFoundation.getRemainingCapacity(); - assert_equals(available_capacity, granted_capacity); - testCase.add_cleanup(async () => { - await storageFoundation.releaseCapacity(available_capacity); - }); -}, 'getRemainingCapacity() reports the capacity granted by requestCapacity()'); - -promise_test(async testCase => { - const requested_capacity = 4; - const granted_capacity = await storageFoundation.requestCapacity(requested_capacity); - await storageFoundation.releaseCapacity(granted_capacity); - const available_capacity = await storageFoundation.getRemainingCapacity(); - assert_equals(available_capacity, 0); -}, 'getRemainingCapacity() reports zero after a releaseCapacity() matching ' + - 'the capacity granted by a requestCapacity().'); - -promise_test(async testCase => { - const requested_capacity = 4; - const granted_capacity = await storageFoundation.requestCapacity(requested_capacity); - assert_greater_than_equal(granted_capacity, requested_capacity); - testCase.add_cleanup(async () => { - await storageFoundation.releaseCapacity(granted_capacity); - }); -}, 'requestCapacity() grants the requested capacity for small requests'); diff --git a/tests/wpt/web-platform-tests/native-io/capacity_allocation_async_failure_handling.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/capacity_allocation_async_failure_handling.tentative.https.any.js deleted file mode 100644 index 8bbeef5f29c..00000000000 --- a/tests/wpt/web-platform-tests/native-io/capacity_allocation_async_failure_handling.tentative.https.any.js +++ /dev/null @@ -1,9 +0,0 @@ -// META: title=NativeIO API: Failure handling for capacity allocation. -// META: global=window,worker - -'use strict'; - -promise_test(async testCase => { - await promise_rejects_dom( - testCase, 'QuotaExceededError', storageFoundation.releaseCapacity(10)); -}, 'Attempting to release more capacity than available fails.'); diff --git a/tests/wpt/web-platform-tests/native-io/capacity_allocation_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/capacity_allocation_sync_basic.tentative.https.any.js deleted file mode 100644 index 3ec2db383ef..00000000000 --- a/tests/wpt/web-platform-tests/native-io/capacity_allocation_sync_basic.tentative.https.any.js +++ /dev/null @@ -1,38 +0,0 @@ -// META: title=NativeIO API: Acquiring, displaying and releasing capacity. -// META: global=dedicatedworker - -'use strict'; - -test(testCase => { - const available_capacity = storageFoundation.getRemainingCapacitySync(); - assert_equals(available_capacity, 0); -}, 'The starting capacity of a NativeIOFileManager is 0'); - -test(testCase => { - const requested_capacity = 4; - const granted_capacity = storageFoundation.requestCapacitySync(requested_capacity); - const available_capacity = storageFoundation.getRemainingCapacitySync(); - assert_equals(available_capacity, granted_capacity); - testCase.add_cleanup(() => { - storageFoundation.releaseCapacitySync(available_capacity); - }); -}, 'getRemainingCapacitySync() reports the capacity granted by ' + - 'requestCapacitySync()'); - -test(testCase => { - const requested_capacity = 4; - const granted_capacity = storageFoundation.requestCapacitySync(requested_capacity); - storageFoundation.releaseCapacitySync(granted_capacity); - const available_capacity = storageFoundation.getRemainingCapacitySync(); - assert_equals(available_capacity, 0); -}, 'getRemainingCapacitySync() reports zero after a releaseCapacitySync() ' + - 'matching the capacity granted by a requestCapacitySync().'); - -test(testCase => { - const requested_capacity = 4; - const granted_capacity = storageFoundation.requestCapacitySync(requested_capacity); - assert_greater_than_equal(granted_capacity, requested_capacity); - testCase.add_cleanup(() => { - storageFoundation.releaseCapacitySync(granted_capacity); - }); -}, 'requestCapacitySync() grants the requested capacity for small requests'); diff --git a/tests/wpt/web-platform-tests/native-io/capacity_allocation_sync_failure_handling.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/capacity_allocation_sync_failure_handling.tentative.https.any.js deleted file mode 100644 index 82ba65890b6..00000000000 --- a/tests/wpt/web-platform-tests/native-io/capacity_allocation_sync_failure_handling.tentative.https.any.js +++ /dev/null @@ -1,10 +0,0 @@ -// META: title=NativeIO API: Failure handling for capacity allocation. -// META: global=dedicatedworker - -'use strict'; - -test(testCase => { - assert_throws_dom( - 'QuotaExceededError', - () => storageFoundation.releaseCapacitySync(10)); -}, 'Attempting to release more capacity than available fails.'); diff --git a/tests/wpt/web-platform-tests/native-io/close_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/close_async.tentative.https.any.js deleted file mode 100644 index 6913762e0cc..00000000000 --- a/tests/wpt/web-platform-tests/native-io/close_async.tentative.https.any.js +++ /dev/null @@ -1,130 +0,0 @@ -// META: title=NativeIO API: close(). -// META: global=window,worker -// META: script=resources/support.js -// META: timeout=long - -'use strict'; - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - assert_equals(await file.close(), undefined); - - assert_equals(await file.close(), undefined); -}, 'NativeIOFile.close is idempotent'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - const closePromise = file.close(); - - assert_equals(await file.close(), undefined); - assert_equals(await closePromise, undefined); -}, 'NativeIOFile.close is idempotent when called immediately'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - assert_equals(await file.close(), undefined); - - const readBuffer = new Uint8Array(4); - await promise_rejects_dom(testCase, 'InvalidStateError', - file.read(readBuffer, 4)); -}, 'NativeIOFile.read fails after NativeIOFile.close settles'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - const closePromise = file.close(); - - const readBuffer = new Uint8Array(4); - await promise_rejects_dom(testCase, 'InvalidStateError', - file.read(readBuffer, 4)); - assert_equals(await closePromise, undefined); -}, 'NativeIOFile.read fails immediately after calling NativeIOFile.close'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - assert_equals(await file.close(), undefined); - - const writeBuffer = new Uint8Array(4); - writeBuffer.set([96, 97, 98, 99]); - await promise_rejects_dom(testCase, 'InvalidStateError', - file.write(writeBuffer, 4)); -}, 'NativeIOFile.write fails after NativeIOFile.close settles'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - const closePromise = file.close(); - - const writeBuffer = new Uint8Array(4); - writeBuffer.set([96, 97, 98, 99]); - await promise_rejects_dom(testCase, 'InvalidStateError', - file.write(writeBuffer, 4)); - assert_equals(await closePromise, undefined); -}, 'NativeIOFile.write fails immediately after calling NativeIOFile.close'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - assert_equals(await file.close(), undefined); - - await promise_rejects_dom(testCase, 'InvalidStateError', file.getLength()); -}, 'NativeIOFile.getLength fails after NativeIOFile.close settles'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - const closePromise = file.close(); - - await promise_rejects_dom(testCase, 'InvalidStateError', file.getLength()); - assert_equals(await closePromise, undefined); -}, 'NativeIOFile.getLength fails immediately after calling NativeIOFile.close'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - assert_equals(await file.close(), undefined); - - await promise_rejects_dom(testCase, 'InvalidStateError', file.flush()); -}, 'NativeIOFile.flush fails after NativeIOFile.close settles'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - const closePromise = file.close(); - - await promise_rejects_dom(testCase, 'InvalidStateError', file.flush()); - assert_equals(await closePromise, undefined); -}, 'NativeIOFile.flush fails immediately after calling NativeIOFile.close'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - assert_equals(await file.close(), undefined); - - await promise_rejects_dom(testCase, 'InvalidStateError', file.setLength(5)); -}, 'NativeIOFile.setLength fails after NativeIOFile.close settles'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'file_name'); - const closePromise = file.close(); - - await promise_rejects_dom(testCase, 'InvalidStateError', file.setLength(5)); - assert_equals(await closePromise, undefined); -}, 'NativeIOFile.setLength fails immediately after calling NativeIOFile.close'); diff --git a/tests/wpt/web-platform-tests/native-io/close_sync.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/close_sync.tentative.https.any.js deleted file mode 100644 index a063842451f..00000000000 --- a/tests/wpt/web-platform-tests/native-io/close_sync.tentative.https.any.js +++ /dev/null @@ -1,61 +0,0 @@ -// META: title=Synchronous NativeIO API: close(). -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, 'file_name'); - assert_equals(undefined, file.close()); - - assert_equals(undefined, file.close()); -}, 'NativeIOFileSync.close is idempotent'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, 'file_name'); - assert_equals(undefined, file.close()); - - const readBuffer = new Uint8Array(4); - assert_throws_dom('InvalidStateError', () => file.read(readBuffer, 4)); -}, 'NativeIOFileSync.read fails after NativeIOFileSync.close'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, 'file_name'); - assert_equals(undefined, file.close()); - - const writeBuffer = Uint8Array.from([96, 97, 98, 99]); - assert_throws_dom('InvalidStateError', () => file.write(writeBuffer, 4)); -}, 'NativeIOFile.write fails after NativeIOFile.close'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, 'file_name'); - assert_equals(undefined, file.close()); - - assert_throws_dom('InvalidStateError', () => file.getLength()); -}, 'NativeIOFileSync.getLength fails after NativeIOFileSync.close'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, 'file_name'); - assert_equals(undefined, file.close()); - - assert_throws_dom('InvalidStateError', () => file.flush()); -}, 'NativeIOFileSync.flush fails after NativeIOFileSync.close'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, 'file_name'); - assert_equals(undefined, file.close()); - - assert_throws_dom('InvalidStateError', () => file.setLength(4)); -}, 'NativeIOFileSync.setLength fails after NativeIOFileSync.close'); diff --git a/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_flush_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_flush_async.tentative.https.any.js deleted file mode 100644 index ea51f878ad0..00000000000 --- a/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_flush_async.tentative.https.any.js +++ /dev/null @@ -1,35 +0,0 @@ -// META: title=NativeIO API: Concurrent io while flush is resolving. -// META: global=window,worker -// META: script=operation_helpers.js -// META: script=../resources/support.js - - -'use strict'; - -// See documentation in operation_helpers.js - -for (let op of kOperations) { - promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'flush_file'); - - const res = op.prepare(); - - const flushPromise = file.flush(); - await op.assertRejection(testCase, file, res); - - await flushPromise; - - const {buffer: readBuffer, readBytes} = - await file.read(new Uint8Array(4), 0); - - assert_equals(readBytes, 4, - `NativeIOFile.read() should not fail after a rejected ` + - `${op.name}() during flush()`); - assert_array_equals(readBuffer, [64, 65, 66, 67], - `Rejecting ${op.name}() during flush() should not ` + - `change the file.`); - op.assertUnchanged(res); - }, `${op.name}() rejects while flush() is resolving.`); -} diff --git a/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_getLength_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_getLength_async.tentative.https.any.js deleted file mode 100644 index e34018507ef..00000000000 --- a/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_getLength_async.tentative.https.any.js +++ /dev/null @@ -1,34 +0,0 @@ -// META: title=NativeIO API: Concurrent IO while getLength is resolving. -// META: global=window,worker -// META: script=operation_helpers.js -// META: script=../resources/support.js - -'use strict'; - -// See documentation in operation_helpers.js - -for (let op of kOperations) { - promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'getlength_file'); - - const res = op.prepare(); - - const getLengthPromise = file.getLength(); - await op.assertRejection(testCase, file, res); - - assert_equals(await getLengthPromise, 4); - - const {buffer: readBuffer, readBytes} = - await file.read(new Uint8Array(4), 0); - - assert_equals(readBytes, 4, - `NativeIOFile.read() should not fail after a rejected ` + - `${op.name} during getLength()`); - assert_array_equals(readBuffer, [64, 65, 66, 67], - `Rejecting ${op.name} during getLength() should not ` + - `change the file.`); - op.assertUnchanged(res); - }, `${op.name}() rejects while getLength() is resolving.`); -}; diff --git a/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_read_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_read_async.tentative.https.any.js deleted file mode 100644 index a680ff5c8f4..00000000000 --- a/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_read_async.tentative.https.any.js +++ /dev/null @@ -1,37 +0,0 @@ -// META: title=NativeIO API: Concurrent IO while read is resolving. -// META: global=window,worker -// META: script=operation_helpers.js -// META: script=../resources/support.js -// META: timeout=long - -'use strict'; - -// See documentation in operation_helpers.js - -for (let op of kOperations) { - promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'read_file'); - - const res = op.prepare(); - - const readPromise = file.read(new Uint8Array(4), 0); - await op.assertRejection(testCase, file, res); - - let {buffer: readBuffer, readBytes} = await readPromise; - assert_equals(readBytes, 4); - assert_array_equals(readBuffer, [64, 65, 66, 67]); - - readBuffer.fill(0); - - ({buffer: readBuffer, readBytes} = await file.read(readBuffer, 0)); - assert_equals(readBytes, 4, - 'NativeIOFile.read() should not fail after a rejected ' + - `${op.name} during read()`); - assert_array_equals(readBuffer, [64, 65, 66, 67], - `Rejecting ${op.name} during read() should not ` + - 'change the file.'); - op.assertUnchanged(res); - }, `${op.name}() rejects while read() is resolving.`); -}; diff --git a/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_setLength_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_setLength_async.tentative.https.any.js deleted file mode 100644 index 39b42163562..00000000000 --- a/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_setLength_async.tentative.https.any.js +++ /dev/null @@ -1,35 +0,0 @@ -// META: title=NativeIO API: Concurrent io while setLength is resolving. -// META: global=window,worker -// META: script=operation_helpers.js -// META: script=../resources/support.js -// META: timeout=long - -'use strict'; - -// See documentation in operation_helpers.js - -for (let op of kOperations) { - promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'setlength_file'); - - const res = op.prepare(); - - const setLengthPromise = file.setLength(5); - await op.assertRejection(testCase, file, res); - - await setLengthPromise; - - const {buffer: readBuffer, readBytes} = - await file.read(new Uint8Array(5), 0); - - assert_equals(readBytes, 5, - `NativeIOFile.read() should not fail after a rejected ` + - `${op.name}() during setLength().`); - assert_array_equals(readBuffer, [64, 65, 66, 67, 0], - `Rejecting ${op.name}() during setLength()` + - ` should not change the file.`); - op.assertUnchanged(res); - }, `${op.name}() rejects while setLength() is resolving.`); -}; diff --git a/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_write_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_write_async.tentative.https.any.js deleted file mode 100644 index e71186d3116..00000000000 --- a/tests/wpt/web-platform-tests/native-io/concurrent_io/concurrent_io_write_async.tentative.https.any.js +++ /dev/null @@ -1,36 +0,0 @@ -// META: title=NativeIO API: Concurrent IO while write is resolving. -// META: global=window,worker -// META: script=operation_helpers.js -// META: script=../resources/support.js -// META: timeout=long - -'use strict'; - -// See documentation in operation_helpers.js - -for (let op of kOperations) { - promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'write_file'); - - const res = op.prepare(); - - const writePromise = file.write(new Uint8Array([96, 97, 98, 99]), 0); - await op.assertRejection(testCase, file, res); - - const {buffer: writeBuffer, writtenBytes} = await writePromise; - assert_equals(writtenBytes, 4); - - const {buffer: readBuffer, readBytes} = - await file.read(new Uint8Array(4), 0); - - assert_equals(readBytes, 4, - `NativeIOFile.read() should not fail after a rejected ` + - `${op.name} during write()`); - assert_array_equals(readBuffer, writeBuffer, - `Rejecting ${op.name} during write() should still ` + - `complete the write.`); - op.assertUnchanged(res); - }, `${op.name}() rejects while write() is resolving.`); -}; diff --git a/tests/wpt/web-platform-tests/native-io/concurrent_io/operation_helpers.js b/tests/wpt/web-platform-tests/native-io/concurrent_io/operation_helpers.js deleted file mode 100644 index 8ff1ce236af..00000000000 --- a/tests/wpt/web-platform-tests/native-io/concurrent_io/operation_helpers.js +++ /dev/null @@ -1,89 +0,0 @@ -// The concurrency tests assert that no pair of asynchronous I/O operations is -// run concurrently. For any operation A, there is one file containing the tests -// asserting that while A is running, any other operation B rejects. In order to -// avoid constructing a quadratic number of tests, the rejecting operations are -// abstracted here. -// -// For any rejecting operation B, define the following. -// name: The operation's name -// prepare: Code needed before performing the operation, e.g., buffer -// allocation. Returns an object to be passed to assertRejection -// and assertUnchanged. May be empty. -// assertRejection: A promise_rejects_dom(...) statement that calls -// operation B. Takes the object returned by prepare as -// third parameter. Returns a promise. -// assertUnchanged: An assertion that rejecting the promise did not change -// the buffers in unexpected ways. The assertion does not -// check if the file itself was not changed. This will be -// after performing operation A in its file. Takes the -// object returned by prepare as parameter. May be empty. -// -// The array kOperations contains all abstractions. - -const kOperations = []; - -(() => { - const kOpRead = { - name: 'read', - prepare: () => { - const readBuffer = new Uint8Array(4); - return readBuffer; - }, - assertRejection: async (testCase, file, readBuffer) => { - await promise_rejects_dom(testCase, 'InvalidStateError', - file.read(readBuffer, 4)); - }, - assertUnchanged: (readBuffer) => { - assert_array_equals(readBuffer, [0, 0, 0, 0]); - }, - }; - kOperations.push(kOpRead); - - const kOpWrite = { - name: 'write', - prepare: () => { - const writeBuffer = new Uint8Array(4); - writeBuffer.set([96, 97, 98, 99]); - return writeBuffer; - }, - assertRejection: async (testCase, file, writeBuffer) => { - await promise_rejects_dom(testCase, 'InvalidStateError', - file.write(writeBuffer, 4)); - }, - assertUnchanged: () => {}, - }; - kOperations.push(kOpWrite); - - const kOpGetLength = { - name: 'getLength', - prepare: () => {}, - assertRejection: async (testCase, file) => { - await promise_rejects_dom(testCase, 'InvalidStateError', - file.getLength()); - }, - assertUnchanged: () => {}, - }; - kOperations.push(kOpGetLength); - - const kOpFlush = { - name: 'flush', - prepare: () => {}, - assertRejection: async (testCase, file) => { - await promise_rejects_dom(testCase, 'InvalidStateError', - file.flush()); - }, - assertUnchanged: () => {}, - }; - kOperations.push(kOpFlush); - - const kOpSetLength = { - name: 'setLength', - prepare: () => {}, - assertRejection: async (testCase, file) => { - await promise_rejects_dom(testCase, 'InvalidStateError', - file.setLength(2)); - }, - assertUnchanged: () => {}, - }; - kOperations.push(kOpSetLength); -})(); diff --git a/tests/wpt/web-platform-tests/native-io/delete_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/delete_async_basic.tentative.https.any.js deleted file mode 100644 index 149ce2a63f4..00000000000 --- a/tests/wpt/web-platform-tests/native-io/delete_async_basic.tentative.https.any.js +++ /dev/null @@ -1,26 +0,0 @@ -// META: title=NativeIO API: File deletion is reflected in listing. -// META: global=window,worker - -'use strict'; - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - testCase.add_cleanup(async () => { - await storageFoundation.delete('test_file'); - }); - await file.close(); - - const fileNamesBeforeDelete = await storageFoundation.getAll(); - assert_in_array('test_file', fileNamesBeforeDelete); - - await storageFoundation.delete('test_file'); - const fileNames = await storageFoundation.getAll(); - assert_equals(fileNames.indexOf('test_file'), -1); -}, 'storageFoundation.getAll does not return file deleted by' + - ' storageFoundation.delete'); - -promise_test(async testCase => { - await storageFoundation.delete('test_file'); - // Delete a second time if the file existed before the first delete. - await storageFoundation.delete('test_file'); -}, 'storageFoundation.delete does not fail when deleting a non-existing file'); diff --git a/tests/wpt/web-platform-tests/native-io/delete_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/delete_sync_basic.tentative.https.any.js deleted file mode 100644 index 49a8292c55c..00000000000 --- a/tests/wpt/web-platform-tests/native-io/delete_sync_basic.tentative.https.any.js +++ /dev/null @@ -1,27 +0,0 @@ -// META: title=Synchronous NativeIO API: File deletion is reflected in listing. -// META: global=dedicatedworker - -'use strict'; - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - testCase.add_cleanup(() => { - storageFoundation.deleteSync('test_file'); - }); - file.close(); - - const fileNamesBeforeDelete = storageFoundation.getAllSync(); - assert_in_array('test_file', fileNamesBeforeDelete); - - storageFoundation.deleteSync('test_file'); - const fileNames = storageFoundation.getAllSync(); - assert_equals(fileNames.indexOf('test_file'), -1); -}, 'storageFoundation.getAllSync does not return file deleted by' + - ' storageFoundation.deleteSync'); - -test(testCase => { - storageFoundation.deleteSync('test_file'); - // Delete a second time if the file existed before the first delete. - storageFoundation.deleteSync('test_file'); -}, 'storageFoundation.deleteSync does not fail when deleting a' + - ' non-existing file'); diff --git a/tests/wpt/web-platform-tests/native-io/detach_iframe_during_delete.https.window.js b/tests/wpt/web-platform-tests/native-io/detach_iframe_during_delete.https.window.js deleted file mode 100644 index 773421652a8..00000000000 --- a/tests/wpt/web-platform-tests/native-io/detach_iframe_during_delete.https.window.js +++ /dev/null @@ -1,16 +0,0 @@ -// META: title=NativeIO API: delete() does not crash in detached iframes. -// META: global=window - -promise_test(async testCase => { - const iframe = document.createElement("iframe"); - document.body.appendChild(iframe); - - const iframeStorageFoundation = iframe.contentWindow.storageFoundation; - - const deletePromise = iframeStorageFoundation.delete('test_file'); - iframe.remove(); - - // Call getAll() in the main frame. This should keep the test running long - // enough to catch any crash from the delete() call in the removed iframe. - await storageFoundation.getAll(); -}, 'Detaching iframe while storageFoundation.delete() settles'); diff --git a/tests/wpt/web-platform-tests/native-io/detach_iframe_during_getAll.https.window.js b/tests/wpt/web-platform-tests/native-io/detach_iframe_during_getAll.https.window.js deleted file mode 100644 index e5e90371953..00000000000 --- a/tests/wpt/web-platform-tests/native-io/detach_iframe_during_getAll.https.window.js +++ /dev/null @@ -1,16 +0,0 @@ -// META: title=NativeIO API: getAll() does not crash in detached iframes. -// META: global=window - -promise_test(async testCase => { - const iframe = document.createElement("iframe"); - document.body.appendChild(iframe); - - const iframeStorageFoundation = iframe.contentWindow.storageFoundation; - - const getAllPromise = iframeStorageFoundation.getAll(); - iframe.remove(); - - // Call getAll() in the main frame. This should keep the test running long - // enough to catch any crash from the getAll() call in the removed iframe. - await storageFoundation.getAll(); -}, 'Detaching iframe while storageFoundation.getAll() settles'); diff --git a/tests/wpt/web-platform-tests/native-io/detach_iframe_during_open.https.window.js b/tests/wpt/web-platform-tests/native-io/detach_iframe_during_open.https.window.js deleted file mode 100644 index 0c6625901ad..00000000000 --- a/tests/wpt/web-platform-tests/native-io/detach_iframe_during_open.https.window.js +++ /dev/null @@ -1,16 +0,0 @@ -// META: title=NativeIO API: open() does not crash in detached iframes. -// META: global=window - -promise_test(async testCase => { - const iframe = document.createElement("iframe"); - document.body.appendChild(iframe); - - const iframeStorageFoundation = iframe.contentWindow.storageFoundation; - - const openPromise = iframeStorageFoundation.open('test_file'); - iframe.remove(); - - // Call getAll() in the main frame. This should keep the test running long - // enough to catch any crash from the open() call in the removed iframe. - await storageFoundation.getAll(); -}, 'Detaching iframe while storageFoundation.open() settles'); diff --git a/tests/wpt/web-platform-tests/native-io/detach_iframe_during_releaseCapacity.https.window.js b/tests/wpt/web-platform-tests/native-io/detach_iframe_during_releaseCapacity.https.window.js deleted file mode 100644 index a7672971306..00000000000 --- a/tests/wpt/web-platform-tests/native-io/detach_iframe_during_releaseCapacity.https.window.js +++ /dev/null @@ -1,21 +0,0 @@ -// META: title=NativeIO API: releaseCapacity() does not crash in detached iframes. -// META: global=window - -promise_test(async testCase => { - const iframe = document.createElement("iframe"); - document.body.appendChild(iframe); - - const iframeStorageFoundation = iframe.contentWindow.storageFoundation; - - const grantedCapacity = - await iframeStorageFoundation.requestCapacity(1024 * 1024); - - const releasePromise = - iframeStorageFoundation.releaseCapacity(grantedCapacity); - iframe.remove(); - - // Call getAll() in the main frame. This should keep the test running long - // enough to catch any crash from the releaseCapacity() call in the removed - // iframe. - await storageFoundation.getAll(); -}, 'Detaching iframe while storageFoundation.releaseCapacityCapacity() settles'); diff --git a/tests/wpt/web-platform-tests/native-io/detach_iframe_during_requestCapacity.https.window.js b/tests/wpt/web-platform-tests/native-io/detach_iframe_during_requestCapacity.https.window.js deleted file mode 100644 index 4585c89ab64..00000000000 --- a/tests/wpt/web-platform-tests/native-io/detach_iframe_during_requestCapacity.https.window.js +++ /dev/null @@ -1,17 +0,0 @@ -// META: title=NativeIO API: requestCapacity() does not crash in detached iframes. -// META: global=window - -promise_test(async testCase => { - const iframe = document.createElement("iframe"); - document.body.appendChild(iframe); - - const iframeStorageFoundation = iframe.contentWindow.storageFoundation; - - const requestPromise = iframeStorageFoundation.requestCapacity(1024 * 1024); - iframe.remove(); - - // Call getAll() in the main frame. This should keep the test running long - // enough to catch any crash from the requestCapacity() call in the removed - // iframe. - await storageFoundation.getAll(); -}, 'Detaching iframe while storageFoundation.requestCapacity() settles'); diff --git a/tests/wpt/web-platform-tests/native-io/detached_iframe.https.window.js b/tests/wpt/web-platform-tests/native-io/detached_iframe.https.window.js deleted file mode 100644 index 1f34ab0d59b..00000000000 --- a/tests/wpt/web-platform-tests/native-io/detached_iframe.https.window.js +++ /dev/null @@ -1,33 +0,0 @@ -// META: title=NativeIO API: Do not crash in detached iframes. -// META: global=window - -promise_test(async testCase => { - const iframe = document.createElement("iframe"); - document.body.appendChild(iframe); - - const iframeStorageFoundation = iframe.contentWindow.storageFoundation; - const frameDOMException = iframe.contentWindow.DOMException; - iframe.remove(); - - await promise_rejects_dom( - testCase, 'InvalidStateError', frameDOMException, - iframeStorageFoundation.getAll()); - await promise_rejects_dom( - testCase, 'InvalidStateError', frameDOMException, - iframeStorageFoundation.open('test_file')); - await promise_rejects_dom( - testCase, 'InvalidStateError', frameDOMException, - iframeStorageFoundation.rename('test_file', 'test')); - await promise_rejects_dom( - testCase, 'InvalidStateError', frameDOMException, - iframeStorageFoundation.delete('test')); - await promise_rejects_dom( - testCase, 'InvalidStateError', frameDOMException, - iframeStorageFoundation.requestCapacity(10)); - await promise_rejects_dom( - testCase, 'InvalidStateError', frameDOMException, - iframeStorageFoundation.releaseCapacity(10)); - await promise_rejects_dom( - testCase, 'InvalidStateError', frameDOMException, - iframeStorageFoundation.getRemainingCapacity()); -}, 'storageFoundation must return an error when called from detached iframes.'); diff --git a/tests/wpt/web-platform-tests/native-io/flush_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/flush_async_basic.tentative.https.any.js deleted file mode 100644 index eb091d237bd..00000000000 --- a/tests/wpt/web-platform-tests/native-io/flush_async_basic.tentative.https.any.js +++ /dev/null @@ -1,22 +0,0 @@ -// META: title=Synchronous NativeIO API: Flushed data is read back. -// META: global=window,worker -// META: script=resources/support.js -// META: timeout=long - -'use strict'; - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const size = 1024; - const longArray = createLargeArray(size, /*seed = */ 103); - - const file = await createFile(testCase, 'test_file', longArray); - - await file.flush(); - const readBuffer = await readIoFile(file); - - assert_array_equals(readBuffer, longArray, - 'the bytes read should match the bytes written'); -}, 'NativeIOFile.read returns bytes written by NativeIOFile.write' + - ' after NativeIOFile.flush'); diff --git a/tests/wpt/web-platform-tests/native-io/flush_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/flush_sync_basic.tentative.https.any.js deleted file mode 100644 index 8d125e2908e..00000000000 --- a/tests/wpt/web-platform-tests/native-io/flush_sync_basic.tentative.https.any.js +++ /dev/null @@ -1,21 +0,0 @@ -// META: title=Synchronous NativeIO API: Flushed data is read back. -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const size = 1024; - const longArray = createLargeArray(size, /*seed = */ 107); - - const file = createFileSync(testCase, 'test_file', longArray); - - file.flush(); - const readBuffer = readIoFileSync(file); - - assert_array_equals(readBuffer, longArray, - 'the bytes read should match the bytes written'); -}, 'NativeIOFileSync.read returns bytes written by NativeIOFileSync.write' + - ' after NativeIOFileSync.flush'); diff --git a/tests/wpt/web-platform-tests/native-io/getLength_setLength_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/getLength_setLength_async_basic.tentative.https.any.js deleted file mode 100644 index 5c6f231cba2..00000000000 --- a/tests/wpt/web-platform-tests/native-io/getLength_setLength_async_basic.tentative.https.any.js +++ /dev/null @@ -1,39 +0,0 @@ -// META: title=NativeIO API: Assigned length is observed back. -// META: global=window,worker -// META: script=resources/support.js - -'use strict'; - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'test_file', [97, 98, 99, 100]); - - await file.setLength(3); - const readBuffer = await readIoFile(file); - - const remainingBytes = Uint8Array.from([97, 98, 99]); - - assert_array_equals( - readBuffer, remainingBytes, - 'NativeIOFile.setLength() should remove bytes from the end of ' + - 'a file when decreasing its length'); -}, 'NativeIOFile.setLength shrinks a file, NativeIOFile.getLength reports ' + - 'new length'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'test_file', [97, 98, 99, 100]); - - await file.setLength(5); - const readBuffer = await readIoFile(file); - - const expectedBytes = Uint8Array.from([97, 98, 99, 100, 0]); - - assert_array_equals( - readBuffer, expectedBytes, - 'NativeIOFile.setLength() should append zeros when increasing' + - ' the file size'); -}, 'NativeIOFile.setLength appends zeros to a file, NativeIOFile.getLength ' + - 'reports new length'); diff --git a/tests/wpt/web-platform-tests/native-io/getLength_setLength_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/getLength_setLength_sync_basic.tentative.https.any.js deleted file mode 100644 index 196b20bfac8..00000000000 --- a/tests/wpt/web-platform-tests/native-io/getLength_setLength_sync_basic.tentative.https.any.js +++ /dev/null @@ -1,38 +0,0 @@ -// META: title=Synchronous NativeIO API: Assigned length is observed back. -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, 'test_file', [97, 98, 99, 100]); - - file.setLength(3); - const readBuffer = readIoFileSync(file); - - const remainingBytes = Uint8Array.from([97, 98, 99]); - assert_array_equals( - readBuffer, remainingBytes, - 'NativeIOFileSync.setLength() should remove bytes from the end of ' + - 'a file when decreasing its length.'); -}, 'NativeIOFileSync.setLength shrinks a file and' + -' NativeIOFileSync.getLength reports its new length.'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, 'test_file', [97, 98, 99, 100]); - - file.setLength(5); - const readBuffer = readIoFileSync(file); - - const expectedBytes = Uint8Array.from([97, 98, 99, 100, 0]); - - assert_array_equals( - readBuffer, expectedBytes, - 'NativeIOFileSync.setLength() should append zeros when increasing' + - ' the file size.'); -}, 'NativeIOFileSync.setLength appends zeros to a file and ' + -'NativeIOFileSync.getLength reports its new length.'); diff --git a/tests/wpt/web-platform-tests/native-io/opaque_origin.https.window.js b/tests/wpt/web-platform-tests/native-io/opaque_origin.https.window.js deleted file mode 100644 index d3d8597c54c..00000000000 --- a/tests/wpt/web-platform-tests/native-io/opaque_origin.https.window.js +++ /dev/null @@ -1,71 +0,0 @@ -// META: title=NativeIO API: Interface is not exposed in opaque origins. -// META: global=window - -const kSandboxWindowUrl = 'resources/opaque-origin-sandbox.html'; - -function add_iframe(test, src, sandbox) { - const iframe = document.createElement('iframe'); - iframe.src = src; - if (sandbox !== undefined) { - iframe.sandbox = sandbox; - } - document.body.appendChild(iframe); - test.add_cleanup(() => { - iframe.remove(); - }); -} - -// Creates a data URI iframe that uses postMessage() to provide its parent -// with the test result. The iframe checks for the existence of -// |interface_name| on the window. -async function verify_does_not_exist_in_data_uri_iframe( - test, interface_name) { - const iframe_content = - ''; - - const data_uri = `data:text/html,${encodeURIComponent(iframe_content)}`; - add_iframe(test, data_uri); - - const event_watcher = new EventWatcher(test, self, 'message'); - const message_event = await event_watcher.wait_for('message') - - assert_false(message_event.data.is_interface_defined, - `Data URI iframes must not define '${interface_name}'.`); -} - -// |kSandboxWindowUrl| informs this window if storageFoundation is non-null. -async function verify_results_from_sandboxed_child_window(test) { - const event_watcher = new EventWatcher(test, self, 'message'); - - const message = await event_watcher.wait_for('message'); - assert_false( - message.data, 'Sandboxed iframes must not define storageFoundation.'); -} - -promise_test(async testCase => { - await verify_does_not_exist_in_data_uri_iframe(testCase, 'storageFoundation'); -}, 'storageFoundation must be undefined for data URI iframes.'); - -promise_test(async testCase => { - add_iframe(testCase, kSandboxWindowUrl, /*sandbox=*/ 'allow-scripts'); - await verify_results_from_sandboxed_child_window(testCase); -}, 'storageFoundation must be null in a sandboxed iframe.'); - - -promise_test( - async testCase => { - const child_window_url = kSandboxWindowUrl + - '?pipe=header(Content-Security-Policy, sandbox allow-scripts)'; - - const child_window = window.open(child_window_url); - testCase.add_cleanup(() => { - child_window.close(); - }); - - await verify_results_from_sandboxed_child_window(testCase); - }, - 'storageFoundation must be null in a sandboxed opened window.'); diff --git a/tests/wpt/web-platform-tests/native-io/open_async_failure_handling.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/open_async_failure_handling.tentative.https.any.js deleted file mode 100644 index de924e4dc06..00000000000 --- a/tests/wpt/web-platform-tests/native-io/open_async_failure_handling.tentative.https.any.js +++ /dev/null @@ -1,17 +0,0 @@ -// META: title=NativeIO API: Failures of open are properly handled. -// META: global=window,worker -// META: script=resources/support.js - -'use strict'; - -setup(async () => { - assert_implements(storageFoundation.open, 'storageFoundation.open is not' + - ' implemented.'); -}); - -promise_test(async testCase => { - for (let name of kBadNativeIoNames) { - await promise_rejects_js( - testCase, TypeError, storageFoundation.open(name)); - } -}, 'storageFoundation.open does not allow opening files with invalid names.'); diff --git a/tests/wpt/web-platform-tests/native-io/open_getAll_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/open_getAll_async_basic.tentative.https.any.js deleted file mode 100644 index 6cb7704003c..00000000000 --- a/tests/wpt/web-platform-tests/native-io/open_getAll_async_basic.tentative.https.any.js +++ /dev/null @@ -1,15 +0,0 @@ -// META: title=NativeIO API: File creation is reflected in listing. -// META: global=window,worker - -'use strict'; - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - testCase.add_cleanup(async () => { - await storageFoundation.delete('test_file'); - }); - await file.close(); - - const fileNames = await storageFoundation.getAll(); - assert_in_array('test_file', fileNames); -}, 'storageFoundation.getAll returns file created by storageFoundation.open'); diff --git a/tests/wpt/web-platform-tests/native-io/open_getAll_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/open_getAll_sync_basic.tentative.https.any.js deleted file mode 100644 index dd7d029fb0d..00000000000 --- a/tests/wpt/web-platform-tests/native-io/open_getAll_sync_basic.tentative.https.any.js +++ /dev/null @@ -1,16 +0,0 @@ -// META: title=Synchronous NativeIO API: File creation is reflected in listing. -// META: global=dedicatedworker - -'use strict'; - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - testCase.add_cleanup(() => { - storageFoundation.deleteSync('test_file'); - }); - file.close(); - - const fileNames = storageFoundation.getAllSync(); - assert_in_array('test_file', fileNames); -}, 'storageFoundation.getAllSync returns file created by' + - ' storageFoundation.openSync'); diff --git a/tests/wpt/web-platform-tests/native-io/open_sync_failure_handling.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/open_sync_failure_handling.tentative.https.any.js deleted file mode 100644 index cfef0f4db45..00000000000 --- a/tests/wpt/web-platform-tests/native-io/open_sync_failure_handling.tentative.https.any.js +++ /dev/null @@ -1,17 +0,0 @@ -// META: title=Synchronous NativeIO API: Failures of open are properly handled. -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - -setup(() => { - assert_implements(storageFoundation.openSync, 'storageFoundation.openSync' + - ' is not implemented.'); -}); - -test(testCase => { - for (let name of kBadNativeIoNames) { - assert_throws_js(TypeError, () => {storageFoundation.openSync(name)}); - } -}, 'storageFoundation.openSync does not allow opening files with invalid ' + - 'names.'); diff --git a/tests/wpt/web-platform-tests/native-io/read_write_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/read_write_async_basic.tentative.https.any.js deleted file mode 100644 index ef07dfca533..00000000000 --- a/tests/wpt/web-platform-tests/native-io/read_write_async_basic.tentative.https.any.js +++ /dev/null @@ -1,63 +0,0 @@ -// META: title=NativeIO API: Written bytes are read back. -// META: global=window,worker -// META: script=resources/support.js - -'use strict'; - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await storageFoundation.open('test_file'); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - }); - - const {buffer: writeBuffer, writtenBytes} = - await file.write(new Uint8Array([64, 65, 66, 67]), 0); - assert_equals( - writtenBytes, 4, - 'NativeIOFile.write() should resolve with the number of bytes written'); - - const {buffer: readBuffer, readBytes} = await file.read(new Uint8Array(4), 0); - assert_equals( - readBytes, 4, - 'NativeIOFile.read() should return the number of bytes read'); - - assert_array_equals( - readBuffer, writeBuffer, 'the bytes read should match the bytes written'); -}, 'NativeIOFile.read returns bytes written by NativeIOFile.write'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - const file = await createFile(testCase, 'test_file'); - - const inputBuffer = new Uint8Array(4); - const readPromise = file.read(inputBuffer, 0); - assert_equals( - inputBuffer.byteLength, 0, - 'NativeIOFile.read() should detach the input buffer immediately'); - - const readResult = await readPromise; - assert_equals( - readResult.buffer.byteLength, 4, - 'NativeIOFile.read() should return a buffer with the same byteLength as' + - 'the input buffer'); -}, 'NativeIOFile.read detaches the input buffer'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - const file = await createFile(testCase, 'test_file'); - - const inputBuffer = new Uint8Array(4); - const writePromise = file.write(inputBuffer, 0); - assert_equals( - inputBuffer.byteLength, 0, - 'NativeIOFile.write() should detach the input buffer immediately'); - - const writeResult = await writePromise; - assert_equals( - writeResult.buffer.byteLength, 4, - 'NativeIOFile.write() should return a buffer with the same byteLength' + - 'as the input buffer'); -}, 'NativeIOFile.write detaches the input buffer'); diff --git a/tests/wpt/web-platform-tests/native-io/read_write_async_buffer_offset.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/read_write_async_buffer_offset.tentative.https.any.js deleted file mode 100644 index a487771065f..00000000000 --- a/tests/wpt/web-platform-tests/native-io/read_write_async_buffer_offset.tentative.https.any.js +++ /dev/null @@ -1,179 +0,0 @@ -// META: title=NativeIO API: Read/write correctly offsets into the source buffer -// META: global=window,worker -// META: script=resources/support.js - -'use strict'; - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await storageFoundation.open('test_file'); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - }); - - const writeBufferData = new Uint8Array([64, 65, 66, 67, 68, 69, 70, 71]); - const writeBufferSource = new Uint8Array(writeBufferData.buffer, 3, 4); - assert_equals(writeBufferSource.byteOffset, 3, 'Test setup error'); - assert_equals(writeBufferSource.byteLength, 4, 'Test setup error'); - assert_equals(writeBufferSource.buffer.byteLength, 8, 'Test setup error'); - - const {buffer: writeBuffer, writtenBytes} = - await file.write(writeBufferSource, 0); - - assert_equals( - writtenBytes, 4, - 'NativeIOFile.write() should resolve with the number of bytes written'); - assert_equals( - writeBuffer.byteOffset, 3, - 'NativeIOFile.write() should produce the same view offset as its input'); - assert_equals( - writeBuffer.byteLength, 4, - 'NativeIOFile.write() should produce the same view size as its input'); - assert_equals( - writeBuffer.buffer.byteLength, 8, - 'NativeIOFile.write() should use the same buffer as its input'); - - const {buffer: readBuffer, readBytes} = await file.read(new Uint8Array(4), 0); - assert_equals( - readBytes, 4, - 'NativeIOFile.write() should write the entire view size'); - - assert_array_equals( - readBuffer, [67, 68, 69, 70], - 'NativeIOFile.write() should account for the buffer offset'); -}, 'NativeIOFile.write with a Uint8Array accounts for the buffer offset'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await storageFoundation.open('test_file'); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - }); - - const writeBufferData = new Uint16Array( - [0x4041, 0x4243, 0x4445, 0x4647, 0x4849, 0x4a4b, 0x4c4d, 0x4e4f]); - const writeBufferSource = new Uint16Array(writeBufferData.buffer, 6, 4); - assert_equals(writeBufferSource.byteOffset, 6, 'Test setup error'); - assert_equals(writeBufferSource.byteLength, 8, 'Test setup error'); - assert_equals(writeBufferSource.buffer.byteLength, 16, 'Test setup error'); - - const {buffer: writeBuffer, writtenBytes} = - await file.write(writeBufferSource, 0); - - assert_equals( - writtenBytes, 8, - 'NativeIOFile.write() should resolve with the number of bytes written'); - assert_equals( - writeBuffer.byteOffset, 6, - 'NativeIOFile.write() should produce the same view offset as its input'); - assert_equals( - writeBuffer.byteLength, 8, - 'NativeIOFile.write() should produce the same view size as its input'); - assert_equals( - writeBuffer.buffer.byteLength, 16, - 'NativeIOFile.write() should use the same buffer as its input'); - - const {buffer: readBuffer, readBytes} = - await file.read(new Uint16Array(4), 0); - assert_equals( - readBytes, 8, - 'NativeIOFile.write() should write the entire view size'); - - assert_array_equals( - readBuffer, [0x4647, 0x4849, 0x4a4b, 0x4c4d], - 'NativeIOFile.write() should account for the buffer offset'); -}, 'NativeIOFile.write with a Uint16Array accounts for the buffer offset'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await storageFoundation.open('test_file'); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - }); - - const {buffer: writeBuffer, writtenBytes} = - await file.write(new Uint8Array([64, 65, 66, 67]), 0); - assert_equals( - writtenBytes, 4, - 'NativeIOFile.write() should resolve with the number of bytes written'); - - const readBufferData = new Uint8Array(8); - const readBufferSource = new Uint8Array(readBufferData.buffer, 3, 4); - assert_equals(readBufferSource.byteOffset, 3, 'Test setup error'); - assert_equals(readBufferSource.byteLength, 4, 'Test setup error'); - assert_equals(readBufferSource.buffer.byteLength, 8, 'Test setup error'); - - const {buffer: readBuffer, readBytes} = await file.read(readBufferSource, 0); - assert_equals( - readBytes, 4, - 'NativeIOFile.read() should read the entire input view size'); - assert_equals( - readBuffer.byteOffset, 3, - 'NativeIOFile.read() should produce the same view offset as its input'); - assert_equals( - readBuffer.byteLength, 4, - 'NativeIOFile.read() should produce the same view size as its input'); - assert_equals( - readBuffer.buffer.byteLength, 8, - 'NativeIOFile.read() should use the same buffer as its input'); - - assert_array_equals( - readBuffer, writeBuffer, - 'NativeIOFile.read() should account for the buffer offset'); - - const readBufferFull = new Uint8Array(readBuffer.buffer); - assert_array_equals( - readBufferFull, [0, 0, 0, 64, 65, 66, 67, 0], - 'NativeIOFile.read() should leave the buffer outside the view untouched'); -}, 'NativeIOFile.read with a Uint8Array accounts for the buffer offset'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await storageFoundation.open('test_file'); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - }); - - const {buffer: writeBuffer, writtenBytes} = - await file.write(new Uint16Array([0x4041, 0x4243, 0x4445, 0x4647]), 0); - assert_equals( - writtenBytes, 8, - 'NativeIOFile.write() should resolve with the number of bytes written'); - - const readBufferData = new Uint16Array(8); - const readBufferSource = new Uint16Array(readBufferData.buffer, 6, 4); - assert_equals(readBufferSource.byteOffset, 6, 'Test setup error'); - assert_equals(readBufferSource.byteLength, 8, 'Test setup error'); - assert_equals(readBufferSource.buffer.byteLength, 16, 'Test setup error'); - - const {buffer: readBuffer, readBytes} = await file.read(readBufferSource, 0); - assert_equals( - readBytes, 8, - 'NativeIOFile.read() should read the entire input view size'); - assert_equals( - readBuffer.byteOffset, 6, - 'NativeIOFile.read() should produce the same view offset as its input'); - assert_equals( - readBuffer.byteLength, 8, - 'NativeIOFile.read() should produce the same view size as its input'); - assert_equals( - readBuffer.buffer.byteLength, 16, - 'NativeIOFile.read() should use the same buffer as its input'); - - assert_array_equals( - readBuffer, writeBuffer, - 'NativeIOFile.read() should account for the buffer offset'); - - const readBufferFull = new Uint16Array(readBuffer.buffer); - assert_array_equals( - readBufferFull, [0, 0, 0, 0x4041, 0x4243, 0x4445, 0x4647, 0], - 'NativeIOFile.read() should leave the buffer outside the view untouched'); -}, 'NativeIOFile.read with a Uint16Array accounts for the buffer offset'); diff --git a/tests/wpt/web-platform-tests/native-io/read_write_async_bufferlength.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/read_write_async_bufferlength.tentative.https.any.js deleted file mode 100644 index 7424d24e523..00000000000 --- a/tests/wpt/web-platform-tests/native-io/read_write_async_bufferlength.tentative.https.any.js +++ /dev/null @@ -1,34 +0,0 @@ -// META: title=NativeIO API: Read/Write correctly handle small buffer lengths. -// META: global=window,worker -// META: script=resources/support.js - -'use strict'; - - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - const file = await createFile(testCase, 'test_file'); - - for (let bufferLength = 0; bufferLength < 4; bufferLength++) { - let writeBuffer = new Uint8Array(bufferLength); - let writeResult = await file.write(writeBuffer, 0); - assert_equals( - writeResult.writtenBytes, bufferLength, - 'NativeIOFile.write() should return success if the buffer size is ' + - `${bufferLength}.`); - } -}, 'NativeIOFile.write succeeds when writing a small number of bytes'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - const file = await createFile(testCase, 'test_file'); - - for (let bufferLength = 0; bufferLength < 4; bufferLength++) { - const readBuffer = new Uint8Array(bufferLength); - const readResult = await file.read(readBuffer, 0); - assert_equals( - readResult.readBytes, bufferLength, - 'NativeIOFile.read() should return success if the buffer size is ' + - `${bufferLength}.`); - } -}, 'NativeIOFile.read succeeds when reading a small number of bytes'); diff --git a/tests/wpt/web-platform-tests/native-io/read_write_correct_arraybufferview_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/read_write_correct_arraybufferview_async_basic.tentative.https.any.js deleted file mode 100644 index 46bcc8d5bd8..00000000000 --- a/tests/wpt/web-platform-tests/native-io/read_write_correct_arraybufferview_async_basic.tentative.https.any.js +++ /dev/null @@ -1,88 +0,0 @@ -// META: title=NativeIO API: Transferred buffer is of the same type as input. -// META: global=window,worker -// META: script=resources/support.js - -'use strict'; - -const kViewTypes = [ - Int8Array, - Uint8Array, - Uint8ClampedArray, - Int16Array, - Uint16Array, - Int32Array, - Uint32Array, - Float32Array, - Float64Array, - BigInt64Array, - BigUint64Array, -]; - -kViewTypes.forEach(view_type => { - promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - const file = await createFile(testCase, 'test_file'); - - const {buffer} = await file.write(new view_type(4), 0); - - assert_true( - buffer instanceof view_type, - `NativeIOFile.write() should return a ${view_type.name}`); - assert_equals( - buffer.length, 4, - `NativeIOFile.write() should return a ${view_type.name} of the same ` + - `length as the input`); - - }, `NativeIOFile.write returns a ${view_type.name} when given a ` + - `${view_type.name}`); -}); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - const file = await createFile(testCase, 'test_file'); - - const {buffer} = await file.write(new DataView(new ArrayBuffer(4)), 0); - - assert_true( - buffer instanceof DataView, - 'NativeIOFile.write() should return a DataView'); - assert_equals( - buffer.byteLength, 4, - 'NativeIOFile.write() should return a DataView of the same ' + - 'byte length as the input'); - -}, 'NativeIOFile.write returns a DataView when given a DataView'); - -kViewTypes.forEach(view_type => { - promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - const file = await createFile(testCase, 'test_file'); - - const {buffer} = await file.read(new view_type(4), 0); - - assert_true( - buffer instanceof view_type, - `NativeIOFile.read() should return a ${view_type.name}`); - assert_equals( - buffer.length, 4, - `NativeIOFile.read() should return a ${view_type.name} of the same ` + - `length as the input`); - - }, `NativeIOFile.read returns a ${view_type.name} when given a ` + - `${view_type.name}`); -}); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - const file = await createFile(testCase, 'test_file'); - - const {buffer} = await file.read(new DataView(new ArrayBuffer(4)), 0); - - assert_true( - buffer instanceof DataView, - 'NativeIOFile.read() should return a DataView'); - assert_equals( - buffer.byteLength, 4, - 'NativeIOFile.read() should return a DataView of the same ' + - 'byte length as the input'); -}, 'NativeIOFile.read returns a DataView when given a DataView'); diff --git a/tests/wpt/web-platform-tests/native-io/read_write_correct_arraybufferview_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/read_write_correct_arraybufferview_sync_basic.tentative.https.any.js deleted file mode 100644 index 82c21ff016a..00000000000 --- a/tests/wpt/web-platform-tests/native-io/read_write_correct_arraybufferview_sync_basic.tentative.https.any.js +++ /dev/null @@ -1,90 +0,0 @@ -// META: title=NativeIO API: Transferred buffer is of the same type as input. -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - -const kViewTypes = [ - Int8Array, - Uint8Array, - Uint8ClampedArray, - Int16Array, - Uint16Array, - Int32Array, - Uint32Array, - Float32Array, - Float64Array, - BigInt64Array, - BigUint64Array, -]; - -kViewTypes.forEach(view_type => { - test(testCase => { - reserveAndCleanupCapacitySync(testCase); - const file = createFileSync(testCase, 'test_file'); - - const {buffer} = file.write(new view_type(4), 0); - - assert_true( - buffer instanceof view_type, - `NativeIOFileSync.write() should return a ${view_type.name}`); - assert_equals( - buffer.length, 4, - `NativeIOFileSync.write() should return a ${view_type.name} of the ` + - `same length as the input`); - - }, `NativeIOFileSync.write returns a ${view_type.name} when given a ` + - `${view_type.name}`); -}); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - const file = createFileSync(testCase, 'test_file'); - - const {buffer} = file.write(new DataView(new ArrayBuffer(4)), 0); - - assert_true( - buffer instanceof DataView, - 'NativeIOFileSync.write() should return a DataView'); - assert_equals( - buffer.byteLength, 4, - 'NativeIOFileSync.write() should return a DataView of the same ' + - 'byte length as the input'); - -}, 'NativeIOFileSync.write returns a DataView when given a DataView'); - -kViewTypes.forEach(view_type => { - test(testCase => { - reserveAndCleanupCapacitySync(testCase); - const file = createFileSync(testCase, 'test_file'); - - const {buffer} = file.read(new view_type(4), 0); - - assert_true( - buffer instanceof view_type, - `NativeIOFileSync.read() should return a ${view_type.name}`); - assert_equals( - buffer.length, 4, - `NativeIOFileSync.read() should return a ${view_type.name} of the ` + - `same length as the input`); - - }, `NativeIOFileSync.read returns a ${view_type.name} when given a ` + - `${view_type.name}`); -}); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - const file = createFileSync(testCase, 'test_file'); - - const {buffer} = file.read(new DataView(new ArrayBuffer(4)), 0); - - assert_true( - buffer instanceof DataView, - 'NativeIOFileSync.read() should return a DataView'); - assert_equals( - buffer.byteLength, 4, - 'NativeIOFileSync.read() should return a DataView of the same ' + - 'byte length as the input'); - -}, 'NativeIOFileSync.read returns a DataView when given a DataView ' + - 'buffer'); diff --git a/tests/wpt/web-platform-tests/native-io/read_write_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/read_write_sync_basic.tentative.https.any.js deleted file mode 100644 index d1db256ba30..00000000000 --- a/tests/wpt/web-platform-tests/native-io/read_write_sync_basic.tentative.https.any.js +++ /dev/null @@ -1,65 +0,0 @@ -// META: title=Synchronous NativeIO API: Written bytes are read back. -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = storageFoundation.openSync('test_file'); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - }); - - const {buffer: writeBuffer, writtenBytes} = file.write(new Uint8Array([64, 65, 66, 67]) , 0); - assert_equals( - writtenBytes, 4, - 'NativeIOFileSync.write() should resolve with the number of bytes written'); - - const {buffer: readBuffer, readBytes} = file.read(new Uint8Array(4), 0); - assert_equals( - readBytes, 4, - 'NativeIOFileSync.read() should return the number of bytes read'); - - assert_array_equals( - readBuffer, writeBuffer, 'the bytes read should match the bytes written'); -}, 'NativeIOFileSync.read returns bytes written by NativeIOFileSync.write'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - const file = createFileSync(testCase, 'test_file'); - - const inputBuffer = new Uint8Array(4); - const originalByteLength = inputBuffer.byteLength; - const readResult = file.read(inputBuffer, 0); - - assert_equals( - readResult.buffer.byteLength, originalByteLength, - 'NativeIOFileSync.read() should return a buffer with the same ' + - 'byteLength as the input buffer'); - - assert_equals( - inputBuffer.byteLength, 0, - 'NativeIOFileSync.read() should detach the input buffer'); -}, 'NativeIOFileSync.read detaches the input buffer'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - const file = createFileSync(testCase, 'test_file'); - - const inputBuffer = new Uint8Array(4); - const originalByteLength = inputBuffer.byteLength; - const writeResult = file.write(inputBuffer, 0); - - assert_equals( - writeResult.buffer.byteLength, originalByteLength, - 'NativeIOFileSync.write() should return a buffer with the same ' + - 'byteLength as the input buffer'); - - assert_equals( - inputBuffer.byteLength, 0, - 'NativeIOFileSync.write() should detach the input buffer'); -}, 'NativeIOFileSync.write detaches the input buffer'); diff --git a/tests/wpt/web-platform-tests/native-io/read_write_sync_buffer_offset.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/read_write_sync_buffer_offset.tentative.https.any.js deleted file mode 100644 index a4b651eaa2c..00000000000 --- a/tests/wpt/web-platform-tests/native-io/read_write_sync_buffer_offset.tentative.https.any.js +++ /dev/null @@ -1,178 +0,0 @@ -// META: title=NativeIO API: Read/write correctly offsets into the source buffer -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = storageFoundation.openSync('test_file'); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - }); - - const writeBufferData = new Uint8Array([64, 65, 66, 67, 68, 69, 70, 71]); - const writeBufferSource = new Uint8Array(writeBufferData.buffer, 3, 4); - assert_equals(writeBufferSource.byteOffset, 3, 'Test setup error'); - assert_equals(writeBufferSource.byteLength, 4, 'Test setup error'); - assert_equals(writeBufferSource.buffer.byteLength, 8, 'Test setup error'); - - const {buffer: writeBuffer, writtenBytes} = file.write(writeBufferSource, 0); - - assert_equals( - writtenBytes, 4, - 'NativeIOFileSync.write() should return the number of bytes written'); - assert_equals( - writeBuffer.byteOffset, 3, - 'NativeIOFileSync.write() should return the input view offset'); - assert_equals( - writeBuffer.byteLength, 4, - 'NativeIOFileSync.write() should return the input view size'); - assert_equals( - writeBuffer.buffer.byteLength, 8, - 'NativeIOFileSync.write() should use the same buffer as its input'); - - const {buffer: readBuffer, readBytes} = file.read(new Uint8Array(4), 0); - assert_equals( - readBytes, 4, - 'NativeIOFileSync.write() should write the entire view size'); - - assert_array_equals( - readBuffer, [67, 68, 69, 70], - 'NativeIOFileSync.write() should account for the buffer offset'); -}, 'NativeIOFileSync.write with a Uint8Array accounts for the buffer offset'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = storageFoundation.openSync('test_file'); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - }); - - const writeBufferData = new Uint16Array( - [0x4041, 0x4243, 0x4445, 0x4647, 0x4849, 0x4a4b, 0x4c4d, 0x4e4f]); - const writeBufferSource = new Uint16Array(writeBufferData.buffer, 6, 4); - assert_equals(writeBufferSource.byteOffset, 6, 'Test setup error'); - assert_equals(writeBufferSource.byteLength, 8, 'Test setup error'); - assert_equals(writeBufferSource.buffer.byteLength, 16, 'Test setup error'); - - const {buffer: writeBuffer, writtenBytes} = file.write(writeBufferSource, 0); - - assert_equals( - writtenBytes, 8, - 'NativeIOFileSync.write() should return the number of bytes written'); - assert_equals( - writeBuffer.byteOffset, 6, - 'NativeIOFileSync.write() should return the input view offset'); - assert_equals( - writeBuffer.byteLength, 8, - 'NativeIOFileSync.write() should return the input view size'); - assert_equals( - writeBuffer.buffer.byteLength, 16, - 'NativeIOFileSync.write() should use the same buffer as its input'); - - const {buffer: readBuffer, readBytes} = file.read(new Uint16Array(4), 0); - assert_equals( - readBytes, 8, - 'NativeIOFile.write() should write the entire view size'); - - assert_array_equals( - readBuffer, [0x4647, 0x4849, 0x4a4b, 0x4c4d], - 'NativeIOFileSync.write() should account for the buffer offset'); -}, 'NativeIOFileSync.write with a Uint16Array accounts for the buffer offset'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = storageFoundation.openSync('test_file'); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - }); - - const {buffer: writeBuffer, writtenBytes} = - file.write(new Uint8Array([64, 65, 66, 67]), 0); - assert_equals( - writtenBytes, 4, - 'NativeIOFileSync.write() should return the number of bytes written'); - - const readBufferData = new Uint8Array(8); - const readBufferSource = new Uint8Array(readBufferData.buffer, 3, 4); - assert_equals(readBufferSource.byteOffset, 3, 'Test setup error'); - assert_equals(readBufferSource.byteLength, 4, 'Test setup error'); - assert_equals(readBufferSource.buffer.byteLength, 8, 'Test setup error'); - - const {buffer: readBuffer, readBytes} = file.read(readBufferSource, 0); - assert_equals( - readBytes, 4, - 'NativeIOFileSync.read() should read the entire input view size'); - assert_equals( - readBuffer.byteOffset, 3, - 'NativeIOFileSync.read() should return the input view offset'); - assert_equals( - readBuffer.byteLength, 4, - 'NativeIOFileSync.read() should return the input view size'); - assert_equals( - readBuffer.buffer.byteLength, 8, - 'NativeIOFileSync.read() should use the same buffer as its input'); - - assert_array_equals( - readBuffer, writeBuffer, - 'NativeIOFileSync.read() should account for the buffer offset'); - - const readBufferFull = new Uint8Array(readBuffer.buffer); - assert_array_equals( - readBufferFull, [0, 0, 0, 64, 65, 66, 67, 0], - 'NativeIOFileSync.read() should leave the buffer outside the view ' + - 'untouched'); -}, 'NativeIOFileSync.read with a Uint8Array accounts for the buffer offset'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = storageFoundation.openSync('test_file'); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - }); - - const {buffer: writeBuffer, writtenBytes} = - file.write(new Uint16Array([0x4041, 0x4243, 0x4445, 0x4647]), 0); - assert_equals( - writtenBytes, 8, - 'NativeIOFileSync.write() should return the number of bytes written'); - - const readBufferData = new Uint16Array(8); - const readBufferSource = new Uint16Array(readBufferData.buffer, 6, 4); - assert_equals(readBufferSource.byteOffset, 6, 'Test setup error'); - assert_equals(readBufferSource.byteLength, 8, 'Test setup error'); - assert_equals(readBufferSource.buffer.byteLength, 16, 'Test setup error'); - - const {buffer: readBuffer, readBytes} = file.read(readBufferSource, 0); - assert_equals( - readBytes, 8, - 'NativeIOFileSync.read() should read the entire input view size'); - assert_equals( - readBuffer.byteOffset, 6, - 'NativeIOFileSync.read() should return the input view offset'); - assert_equals( - readBuffer.byteLength, 8, - 'NativeIOFileSync.read() should return the input view size'); - assert_equals( - readBuffer.buffer.byteLength, 16, - 'NativeIOFileSync.read() should use the same buffer as its input'); - - assert_array_equals( - readBuffer, writeBuffer, - 'NativeIOFileSync.read() should account for the buffer offset'); - - const readBufferFull = new Uint16Array(readBuffer.buffer); - assert_array_equals( - readBufferFull, [0, 0, 0, 0x4041, 0x4243, 0x4445, 0x4647, 0], - 'NativeIOFileSync.read() should leave the buffer outside the view ' + - 'untouched'); -}, 'NativeIOFileSync.read with a Uint16Array accounts for the buffer offset'); diff --git a/tests/wpt/web-platform-tests/native-io/read_write_sync_bufferlength.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/read_write_sync_bufferlength.tentative.https.any.js deleted file mode 100644 index 3f45f2702c3..00000000000 --- a/tests/wpt/web-platform-tests/native-io/read_write_sync_bufferlength.tentative.https.any.js +++ /dev/null @@ -1,34 +0,0 @@ -// META: title=Synchronous NativeIO API: Read/Write correctly handle small buffer lengths. -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - const file = createFileSync(testCase, 'test_file'); - - for (let bufferLength = 0; bufferLength < 4; bufferLength++) { - let writeBuffer = new Uint8Array(bufferLength); - let writeResult = file.write(writeBuffer, 0); - assert_equals( - writeResult.writtenBytes, bufferLength, - 'NativeIOFileSync.write() should return success if the buffer size' + - ` is ${bufferLength}.`); - } -}, 'NativeIOFileSync.write succeeds when writing small number of bytes'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - const file = createFileSync(testCase, 'test_file'); - - for (let bufferLength = 0; bufferLength < 4; bufferLength++) { - let readBuffer = new Uint8Array(bufferLength); - let readResult = file.read(readBuffer, 0); - assert_equals( - readResult.readBytes, bufferLength, - 'NativeIOFileSync.read() should return success if the buffer size' + - ` is ${bufferLength}.`); - } -}, 'NativeIOFileSync.read succeeds when reading small number of bytes'); diff --git a/tests/wpt/web-platform-tests/native-io/rename_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/rename_async_basic.tentative.https.any.js deleted file mode 100644 index 47c9ffc6b91..00000000000 --- a/tests/wpt/web-platform-tests/native-io/rename_async_basic.tentative.https.any.js +++ /dev/null @@ -1,23 +0,0 @@ -// META: title=NativeIO API: File renaming is reflected in listing. -// META: global=window,worker - -'use strict'; - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - await file.close(); - - const fileNamesBeforeRename = await storageFoundation.getAll(); - assert_in_array('test_file', fileNamesBeforeRename); - - await storageFoundation.rename('test_file', 'renamed_test_file'); - testCase.add_cleanup(async () => { - await storageFoundation.delete('test_file'); - await storageFoundation.delete('renamed_test_file'); - }); - - const fileNamesAfterRename = await storageFoundation.getAll(); - assert_false(fileNamesAfterRename.includes('test_file')); - assert_in_array('renamed_test_file', fileNamesAfterRename); -}, 'storageFoundation.getAll returns a file renamed by' + - ' storageFoundation.rename with its new name.'); diff --git a/tests/wpt/web-platform-tests/native-io/rename_async_failure_handling.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/rename_async_failure_handling.tentative.https.any.js deleted file mode 100644 index 59f6f83070e..00000000000 --- a/tests/wpt/web-platform-tests/native-io/rename_async_failure_handling.tentative.https.any.js +++ /dev/null @@ -1,155 +0,0 @@ -// META: title=NativeIO API: Failures of rename are properly handled. -// META: global=window,worker -// META: script=resources/support.js -// META: timeout=long - -'use strict'; - -setup(async () => { - assert_implements(storageFoundation.rename, 'storageFoundation.rename is not' + - ' implemented.'); -}); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file1 = await storageFoundation.open('test_file_1'); - const file2 = await storageFoundation.open('test_file_2'); - testCase.add_cleanup(async () => { - await file1.close(); - await file2.close(); - }); - - - const {buffer: writeBuffer1} = await file1.write(new Uint8Array([64, 65, 66, 67]), 0); - const {buffer: writeBuffer2} = await file2.write(new Uint8Array([96, 97, 98, 99]), 0); - - await file1.close(); - await file2.close(); - - await promise_rejects_dom( - testCase, 'NoModificationAllowedError', - storageFoundation.rename('test_file_1', 'test_file_2')); - - const fileNamesAfterRename = await storageFoundation.getAll(); - assert_in_array('test_file_1', fileNamesAfterRename); - assert_in_array('test_file_2', fileNamesAfterRename); - - // Make sure that a failed rename does not modify file contents. - const file1_after = await storageFoundation.open('test_file_1'); - const file2_after = await storageFoundation.open('test_file_2'); - - testCase.add_cleanup(async () => { - await file1_after.close(); - await file2_after.close(); - await storageFoundation.delete('test_file_1'); - await storageFoundation.delete('test_file_2'); - }); - - const {buffer: readBuffer1} = await file1_after.read(new Uint8Array(4), 0); - const {buffer: readBuffer2} = await file2_after.read(new Uint8Array(4), 0); - assert_array_equals( - readBuffer1, writeBuffer1, - 'the bytes read should match the bytes written'); - assert_array_equals( - readBuffer2, writeBuffer2, - 'the bytes read should match the bytes written'); -}, 'storageFoundation.rename does not overwrite an existing file.'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await storageFoundation.open('test_file'); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - }); - await promise_rejects_dom( - testCase, 'NoModificationAllowedError', - storageFoundation.rename('test_file', 'renamed_test_file')); - await file.close(); - - const fileNamesAfterRename = await storageFoundation.getAll(); - assert_false(fileNamesAfterRename.includes('renamed_test_file')); - assert_in_array('test_file', fileNamesAfterRename); -}, 'storageFoundation.rename does not allow renaming an open file.'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - for (let name of await storageFoundation.getAll()) { - await storageFoundation.delete(name); - } - }); - - const file = await storageFoundation.open('test_file'); - await file.close(); - for (let name of kBadNativeIoNames) { - await promise_rejects_js( - testCase, TypeError, storageFoundation.rename('test_file', name)); - await promise_rejects_js( - testCase, TypeError, storageFoundation.rename(name, 'test_file_2')); - } -}, 'storageFoundation.rename does not allow renaming from or to invalid names.'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const closed_file = await storageFoundation.open('closed_file'); - closed_file.close(); - const opened_file = await storageFoundation.open('opened_file'); - testCase.add_cleanup(async () => { - await closed_file.close(); - await opened_file.close(); - await storageFoundation.delete('closed_file'); - await storageFoundation.delete('opened_file'); - }); - - // First rename fails, as source is still open. - await promise_rejects_dom( - testCase, 'NoModificationAllowedError', - storageFoundation.rename('opened_file', 'closed_file')); - // First rename fails again, as source has not been unlocked. - await promise_rejects_dom( - testCase, 'NoModificationAllowedError', - storageFoundation.rename('opened_file', 'closed_file')); -}, 'Failed storageFoundation.rename does not unlock the source.'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const closed_file = await storageFoundation.open('closed_file'); - await closed_file.close(); - const opened_file = await storageFoundation.open('opened_file'); - testCase.add_cleanup(async () => { - await closed_file.close(); - await opened_file.close(); - await storageFoundation.delete('closed_file'); - await storageFoundation.delete('opened_file'); - }); - - // First rename fails, as destination is still open. - await promise_rejects_dom( - testCase, 'NoModificationAllowedError', - storageFoundation.rename('closed_file', 'opened_file')); - // First rename fails again, as destination has not been unlocked. - await promise_rejects_dom( - testCase, 'NoModificationAllowedError', - storageFoundation.rename('closed_file', 'opened_file')); -}, 'Failed storageFoundation.rename does not unlock the destination.'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - // Make sure that the file does not exist. - await storageFoundation.delete('does_not_exist'); - testCase.add_cleanup(async () => { - await storageFoundation.delete('new_does_not_exist'); - }); - await promise_rejects_dom( - testCase, 'NotFoundError', - storageFoundation.rename('does_not_exist', 'new_does_not_exist')); -}, 'Renaming a non-existing file fails with a NotFoundError.'); diff --git a/tests/wpt/web-platform-tests/native-io/rename_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/rename_sync_basic.tentative.https.any.js deleted file mode 100644 index e5183143c3b..00000000000 --- a/tests/wpt/web-platform-tests/native-io/rename_sync_basic.tentative.https.any.js +++ /dev/null @@ -1,24 +0,0 @@ -// META: title=Synchronous NativeIO API: File renaming is reflected in listing. -// META: global=dedicatedworker - -'use strict'; - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - file.close(); - - const fileNamesBeforeRename = storageFoundation.getAllSync(); - assert_in_array('test_file', fileNamesBeforeRename); - - storageFoundation.renameSync('test_file', 'renamed_test_file'); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - storageFoundation.deleteSync('renamed_test_file'); - }); - - const fileNamesAfterRename = storageFoundation.getAllSync(); - assert_equals(fileNamesAfterRename.indexOf('test_file'), -1); - assert_in_array('renamed_test_file', fileNamesAfterRename); -}, 'storageFoundation.getAllSync returns a file renamed' + - ' by storageFoundation.renameSync with its new name.'); diff --git a/tests/wpt/web-platform-tests/native-io/rename_sync_failure_handling.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/rename_sync_failure_handling.tentative.https.any.js deleted file mode 100644 index b113741981f..00000000000 --- a/tests/wpt/web-platform-tests/native-io/rename_sync_failure_handling.tentative.https.any.js +++ /dev/null @@ -1,155 +0,0 @@ -// META: title=Synchronous NativeIO API: Failures of rename are properly handled. -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - -setup(() => { - // Without this assertion, one test passes even if renameSync is not defined - assert_implements( - storageFoundation.renameSync, 'storageFoundation.renameSync is' + - ' not implemented.'); -}); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file1 = storageFoundation.openSync('test_file_1'); - const file2 = storageFoundation.openSync('test_file_2'); - testCase.add_cleanup(() => { - file1.close(); - file2.close(); - }); - - const {buffer: writeBuffer1} = file1.write(new Uint8Array([64, 65, 66, 67]), 0); - const {buffer: writeBuffer2} = file2.write(new Uint8Array([96, 97, 98, 99]), 0); - - file1.close(); - file2.close(); - - assert_throws_dom( - 'NoModificationAllowedError', - () => storageFoundation.renameSync('test_file_1', 'test_file_2')); - - const fileNamesAfterRename = storageFoundation.getAllSync(); - assert_in_array('test_file_1', fileNamesAfterRename); - assert_in_array('test_file_2', fileNamesAfterRename); - - // Make sure that a failed rename does not modify file contents. - const file1_after = storageFoundation.openSync('test_file_1'); - const file2_after = storageFoundation.openSync('test_file_2'); - - testCase.add_cleanup(() => { - file1_after.close(); - file2_after.close(); - storageFoundation.deleteSync('test_file_1'); - storageFoundation.deleteSync('test_file_2'); - }); - const {buffer: readBuffer1} = file1_after.read(new Uint8Array(4), 0); - assert_array_equals( - readBuffer1, writeBuffer1, - 'the bytes read should match the bytes written'); - const {buffer: readBuffer2} = file2_after.read(new Uint8Array(4), 0); - assert_array_equals( - readBuffer2, writeBuffer2, - 'the bytes read should match the bytes written'); -}, 'storageFoundation.renameSync does not overwrite an existing file.'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = storageFoundation.openSync('test_file'); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - }); - assert_throws_dom( - 'NoModificationAllowedError', - () => storageFoundation.renameSync('test_file', 'renamed_test_file')); - file.close(); - - const fileNamesAfterRename = storageFoundation.getAllSync(); - assert_equals(fileNamesAfterRename.indexOf('renamed_test_file'), -1); - assert_in_array('test_file', fileNamesAfterRename); -}, 'storageFoundation.renameSync allows renaming an open file.'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - for (let name of storageFoundation.getAllSync()) { - storageFoundation.deleteSync(name); - } - }); - - const file = storageFoundation.openSync('test_file'); - file.close(); - for (let name of kBadNativeIoNames) { - assert_throws_js(TypeError, () => storageFoundation.renameSync('test_file', - name)); - assert_throws_js(TypeError, () => storageFoundation.renameSync(name, - 'test_file_2')); - } -}, 'storageFoundation.renameSync does not allow renaming from or to invalid' + - ' names.'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const closed_file = storageFoundation.openSync('closed_file'); - closed_file.close(); - const opened_file = storageFoundation.openSync('opened_file'); - testCase.add_cleanup(() => { - closed_file.close(); - opened_file.close(); - storageFoundation.deleteSync('closed_file'); - storageFoundation.deleteSync('opened_file'); - }); - - // First rename fails, as source is still open. - assert_throws_dom( - 'NoModificationAllowedError', - () => storageFoundation.renameSync('opened_file', 'closed_file')); - // First rename fails again, as source has not been unlocked. - assert_throws_dom( - 'NoModificationAllowedError', - () => storageFoundation.renameSync('opened_file', 'closed_file')); -}, 'Failed storageFoundation.renameSync does not unlock the source.'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const closed_file = storageFoundation.openSync('closed_file'); - closed_file.close(); - const opened_file = storageFoundation.openSync('opened_file'); - testCase.add_cleanup(() => { - closed_file.close(); - opened_file.close(); - storageFoundation.deleteSync('closed_file'); - storageFoundation.deleteSync('opened_file'); - }); - - // First rename fails, as destination is still open. - assert_throws_dom( - 'NoModificationAllowedError', - () => storageFoundation.renameSync('closed_file', 'opened_file')); - // First rename fails again, as destination has not been unlocked. - assert_throws_dom( - 'NoModificationAllowedError', - () => storageFoundation.renameSync('closed_file', 'opened_file')); -}, 'Failed storageFoundation.renameSync does not unlock the destination.'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - // Make sure that the file does not exist. - storageFoundation.deleteSync('does_not_exist'); - testCase.add_cleanup(() => { - storageFoundation.deleteSync('new_name'); - }); - assert_throws_dom( - 'NotFoundError', - () => storageFoundation.renameSync('does_not_exist', 'new_name')); -}, 'Renaming a non-existing file fails with a NotFoundError.'); diff --git a/tests/wpt/web-platform-tests/native-io/resources/opaque-origin-sandbox.html b/tests/wpt/web-platform-tests/native-io/resources/opaque-origin-sandbox.html deleted file mode 100644 index b3490c3341a..00000000000 --- a/tests/wpt/web-platform-tests/native-io/resources/opaque-origin-sandbox.html +++ /dev/null @@ -1,18 +0,0 @@ - - diff --git a/tests/wpt/web-platform-tests/native-io/resources/support.js b/tests/wpt/web-platform-tests/native-io/resources/support.js deleted file mode 100644 index f7821067fbf..00000000000 --- a/tests/wpt/web-platform-tests/native-io/resources/support.js +++ /dev/null @@ -1,104 +0,0 @@ -// Names disallowed by NativeIO -const kBadNativeIoNames = [ - 'Uppercase', - 'has-dash', - 'has.dot', - 'has/slash', - 'x'.repeat(101), - '', -]; - -const kDefaultCapacity = 1024 * 1024; - -// Returns a handle to a newly created file that holds some data. -// -// The file will be closed and deleted when the test ends. -async function createFile(testCase, fileName, data = [64, 65, 66, 67]) { - const file = await storageFoundation.open(fileName); - - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete(fileName); - }); - - const buffer = Uint8Array.from(data); - - const {writtenBytes} = await file.write(buffer, 0); - assert_equals(writtenBytes, data.length, - 'NativeIOFile.write() should resolve with the number of bytes written'); - - return file; -} - -// Returns a handle to a newly created file that holds some data. -// -// The file will be closed and deleted when the test ends. -function createFileSync(testCase, fileName, data = [64, 65, 66, 67]) { - const file = storageFoundation.openSync(fileName); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync(fileName); - }); - - const buffer = Uint8Array.from(data); - const {writtenBytes} = file.write(buffer, 0); - assert_equals(writtenBytes, data.length, - 'NativeIOFileSync.write() should resolve with the number of bytes written'); - - return file; -} - -// Returns an Uint8Array with pseudorandom data. -// -// The PRNG should be sufficient to defeat compression schemes, but it is not -// cryptographically strong. -function createLargeArray(size, seed) { - const buffer = new Uint8Array(size); - - // 32-bit xorshift - the seed can't be zero - let state = 1000 + seed; - - for (let i = 0; i < size; ++i) { - state ^= state << 13; - state ^= state >> 17; - state ^= state << 5; - buffer[i] = state & 0xff; - } - - return buffer; -} - -// Attempts to read the entire file into a buffer. -async function readIoFile(file) { - const length = await file.getLength(); - const {buffer, readBytes} = await file.read(new Uint8Array(length), 0); - return buffer; -} - -// Attempts to read the entire file into a buffer. -function readIoFileSync(file) { - const length = file.getLength(); - const {buffer, readBytes} = file.read(new Uint8Array(length), 0); - return buffer; -} - -// Default capacity allocation for non-quota related tests. -async function reserveAndCleanupCapacity(testCase, - capacity = kDefaultCapacity) { - const grantedCapacity = await storageFoundation.requestCapacity(capacity); - testCase.add_cleanup(async () => { - let available_capacity = await storageFoundation.getRemainingCapacity(); - await storageFoundation.releaseCapacity(available_capacity); - }); - assert_greater_than_equal(grantedCapacity, capacity); -} - -// Default capacity allocation for non-quota related sync tests. -function reserveAndCleanupCapacitySync(testCase, capacity = kDefaultCapacity) { - const grantedCapacity = storageFoundation.requestCapacitySync(capacity); - testCase.add_cleanup(() => { - let available_capacity = storageFoundation.getRemainingCapacitySync(); - storageFoundation.releaseCapacitySync(available_capacity); - }); - assert_greater_than_equal(grantedCapacity, capacity); -} diff --git a/tests/wpt/web-platform-tests/native-io/setLength_bounds_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/setLength_bounds_async.tentative.https.any.js deleted file mode 100644 index 8882bf2562f..00000000000 --- a/tests/wpt/web-platform-tests/native-io/setLength_bounds_async.tentative.https.any.js +++ /dev/null @@ -1,24 +0,0 @@ -// META: title=NativeIO API: Out-of-bounds errors for setLength. -// META: global=window,worker -// META: script=resources/support.js - -'use strict'; - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, "file_length_zero"); - await file.setLength(0); - const lengthDecreased = await file.getLength(); - assert_equals(lengthDecreased, 0, - "NativeIOFile.setLength() should set the file length to 0."); -}, 'NativeIOFile.setLength does not throw an error when descreasing the ' + - 'file length to 0.'); - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, "file_length_negative"); - await promise_rejects_js(testCase, TypeError, - file.setLength(-1)); -}, 'NativeIOFile.setLength() throws when setting negative lengths.'); diff --git a/tests/wpt/web-platform-tests/native-io/setLength_bounds_sync.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/setLength_bounds_sync.tentative.https.any.js deleted file mode 100644 index 99b4452be64..00000000000 --- a/tests/wpt/web-platform-tests/native-io/setLength_bounds_sync.tentative.https.any.js +++ /dev/null @@ -1,28 +0,0 @@ -// META: title=Synchronous NativeIO API: Out-of-bounds errors for setLength. -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, "file_length_zero"); - file.setLength(0); - const lengthDecreased = file.getLength(); - assert_equals(lengthDecreased, 0, - "NativeIOFileSync.setLength() should set the file length to 0."); -}, 'NativeIOFileSync.setLength() does not throw an error when descreasing ' + - 'the file length to 0.'); - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, "file_length_negative"); - - // Without this assertion, the test passes even if setLength is not defined. - assert_implements(file.setLength, - "NativeIOFileSync.setLength is not implemented."); - - assert_throws_js(TypeError, () => file.setLength(-1)); -}, 'NativeIOFileSync.setLength() throws when setting negative lengths.'); diff --git a/tests/wpt/web-platform-tests/native-io/setLength_capacity_allocation_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/setLength_capacity_allocation_async.tentative.https.any.js deleted file mode 100644 index 7ed3984f02a..00000000000 --- a/tests/wpt/web-platform-tests/native-io/setLength_capacity_allocation_async.tentative.https.any.js +++ /dev/null @@ -1,54 +0,0 @@ -// META: title=NativeIO API: SetLength respects the allocated capacities. -// META: global=window,worker - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - }); - await promise_rejects_dom(testCase, 'QuotaExceededError', file.setLength(4)); -}, 'NativeIOFile.setLength() fails without any capacity request.'); - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - - const granted_capacity = await storageFoundation.requestCapacity(4); - assert_greater_than_equal(granted_capacity, 2); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - await storageFoundation.releaseCapacity(granted_capacity); - }); - - await file.setLength(granted_capacity - 1); -}, 'NativeIOFile.setLength() succeeds when given the granted capacity - 1'); - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - - const granted_capacity = await storageFoundation.requestCapacity(4); - assert_greater_than_equal(granted_capacity, 1); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - await storageFoundation.releaseCapacity(granted_capacity); - }); - - await file.setLength(granted_capacity); -}, 'NativeIOFile.setLength() succeeds when given the granted capacity'); - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - - const granted_capacity = await storageFoundation.requestCapacity(4); - assert_greater_than_equal(granted_capacity, 0); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - await storageFoundation.releaseCapacity(granted_capacity); - }); - - await promise_rejects_dom( - testCase, 'QuotaExceededError', file.setLength(granted_capacity + 1)); -}, 'NativeIOFile.setLength() fails when given the granted capacity + 1'); diff --git a/tests/wpt/web-platform-tests/native-io/setLength_capacity_allocation_sync.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/setLength_capacity_allocation_sync.tentative.https.any.js deleted file mode 100644 index f8cbb8de8db..00000000000 --- a/tests/wpt/web-platform-tests/native-io/setLength_capacity_allocation_sync.tentative.https.any.js +++ /dev/null @@ -1,54 +0,0 @@ -// META: title=NativeIO API: SetLength respects the allocated capacities. -// META: global=dedicatedworker - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - }); - assert_throws_dom('QuotaExceededError', () => {file.setLength(4)}); -}, 'NativeIOFileSync.setLength() fails without any capacity request.'); - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - - const granted_capacity = storageFoundation.requestCapacitySync(4); - assert_greater_than_equal(granted_capacity, 2); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - storageFoundation.releaseCapacitySync(granted_capacity); - }); - - file.setLength(granted_capacity - 1); -}, 'NativeIOFileSync.setLength() succeeds when given the granted capacity - 1'); - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - - const granted_capacity = storageFoundation.requestCapacitySync(4); - assert_greater_than_equal(granted_capacity, 1); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - storageFoundation.releaseCapacitySync(granted_capacity); - }); - - file.setLength(granted_capacity); -}, 'NativeIOFileSync.setLength() succeeds when given the granted capacity'); - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - - const granted_capacity = storageFoundation.requestCapacitySync(4); - assert_greater_than_equal(granted_capacity, 0); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - storageFoundation.releaseCapacitySync(granted_capacity); - }); - - assert_throws_dom('QuotaExceededError', - () => {file.setLength(granted_capacity + 1)}); -}, 'NativeIOFileSync.setLength() fails when given the granted capacity + 1'); diff --git a/tests/wpt/web-platform-tests/native-io/trustworthy_origin_failure.tentative.http.any.js b/tests/wpt/web-platform-tests/native-io/trustworthy_origin_failure.tentative.http.any.js deleted file mode 100644 index 42637160937..00000000000 --- a/tests/wpt/web-platform-tests/native-io/trustworthy_origin_failure.tentative.http.any.js +++ /dev/null @@ -1,9 +0,0 @@ -// META: title=NativeIO API: Interface is not exposed in untrustworthy origin. -// META: global=window,dedicatedworker - -'use strict'; - -test(testCase => { - var present = (typeof storageFoundation !== 'undefined'); - assert_false(present); -}, 'NativeIO should not be accessible from an untrustworthy origin'); diff --git a/tests/wpt/web-platform-tests/native-io/write_capacity_allocation_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/write_capacity_allocation_async.tentative.https.any.js deleted file mode 100644 index 91544fe7cf3..00000000000 --- a/tests/wpt/web-platform-tests/native-io/write_capacity_allocation_async.tentative.https.any.js +++ /dev/null @@ -1,65 +0,0 @@ -// META: title=NativeIO API: Write respects the allocated capacities. -// META: global=window,worker - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - }); - const writeBuffer = new Uint8Array(4); - writeBuffer.set([64, 65, 66, 67]); - await promise_rejects_dom( - testCase, 'QuotaExceededError', file.write(writeBuffer, 0)); -}, 'NativeIOFile.write() fails without any capacity request.'); - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - - const granted_capacity = await storageFoundation.requestCapacity(4); - assert_greater_than_equal(granted_capacity, 2); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - await storageFoundation.releaseCapacity(granted_capacity); - }); - const writeBuffer = new Uint8Array(granted_capacity - 1); - writeBuffer.set(Array(granted_capacity - 1).fill(64)); - - const {writtenBytes} = await file.write(writeBuffer, 0); - assert_equals(writtenBytes, granted_capacity - 1); -}, 'NativeIOFile.write() succeeds when given a buffer of length ' + - 'granted capacity - 1'); - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - - const granted_capacity = await storageFoundation.requestCapacity(4); - assert_greater_than_equal(granted_capacity, 2); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - }); - const writeBuffer = new Uint8Array(granted_capacity); - writeBuffer.set(Array(granted_capacity).fill(64)); - - const {writtenBytes} = await file.write(writeBuffer, 0); - assert_equals(writtenBytes, granted_capacity); -}, 'NativeIOFile.write() succeeds when given the granted capacity'); - -promise_test(async testCase => { - const file = await storageFoundation.open('test_file'); - - const granted_capacity = await storageFoundation.requestCapacity(4); - assert_greater_than_equal(granted_capacity, 2); - testCase.add_cleanup(async () => { - await file.close(); - await storageFoundation.delete('test_file'); - await storageFoundation.releaseCapacity(granted_capacity); - }); - const writeBuffer = new Uint8Array(granted_capacity + 1); - writeBuffer.set(Array(granted_capacity + 1).fill(64)); - - await promise_rejects_dom(testCase, - 'QuotaExceededError', file.write(writeBuffer, 0)); -}, 'NativeIOFile.write() fails when given the granted capacity + 1'); diff --git a/tests/wpt/web-platform-tests/native-io/write_capacity_allocation_sync.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/write_capacity_allocation_sync.tentative.https.any.js deleted file mode 100644 index b72b1f645da..00000000000 --- a/tests/wpt/web-platform-tests/native-io/write_capacity_allocation_sync.tentative.https.any.js +++ /dev/null @@ -1,59 +0,0 @@ -// META: title=NativeIO API: Write respects the allocated capacities. -// META: global=dedicatedworker - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - }); - const writeBuffer = Uint8Array.from([64, 65, 66, 67]); - assert_throws_dom('QuotaExceededError', () => {file.write(writeBuffer, 0)}); -}, 'NativeIOFileSync.write() fails without any capacity request.'); - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - - const granted_capacity = storageFoundation.requestCapacitySync(4); - assert_greater_than_equal(granted_capacity, 2); - - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - storageFoundation.releaseCapacitySync(granted_capacity); - }); - - const writeBuffer = new Uint8Array(granted_capacity - 1).fill(64); - file.write(writeBuffer, 0); -}, 'NativeIOFileSync.write() succeeds when given a buffer of length ' + - 'granted capacity - 1'); - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - - const granted_capacity = storageFoundation.requestCapacitySync(4); - assert_greater_than_equal(granted_capacity, 2); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - storageFoundation.releaseCapacitySync(granted_capacity); - }); - const writeBuffer = new Uint8Array(granted_capacity).fill(64); - - file.write(writeBuffer, 0); -}, 'NativeIOFileSync.write() succeeds when given the granted capacity'); - -test(testCase => { - const file = storageFoundation.openSync('test_file'); - - const granted_capacity = storageFoundation.requestCapacitySync(4); - assert_greater_than_equal(granted_capacity, 2); - testCase.add_cleanup(() => { - file.close(); - storageFoundation.deleteSync('test_file'); - storageFoundation.releaseCapacitySync(granted_capacity); - }); - const writeBuffer = new Uint8Array(granted_capacity + 1).fill(64); - - assert_throws_dom('QuotaExceededError', () => {file.write(writeBuffer, 0)}); -}, 'NativeIOFileSync.write() fails when given the granted capacity + 1'); diff --git a/tests/wpt/web-platform-tests/native-io/write_getLength_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/write_getLength_async_basic.tentative.https.any.js deleted file mode 100644 index 428d63ebd57..00000000000 --- a/tests/wpt/web-platform-tests/native-io/write_getLength_async_basic.tentative.https.any.js +++ /dev/null @@ -1,17 +0,0 @@ -// META: title=Synchronous NativeIO API: getLength reports written bytes. -// META: global=window,worker -// META: script=resources/support.js - -'use strict'; - -promise_test(async testCase => { - await reserveAndCleanupCapacity(testCase); - - const file = await createFile(testCase, 'test_file', [64, 65, 66, 67]); - - const length = await file.getLength(); - assert_equals(length, 4, - 'NativeIOFile.getLength() should return the number of' + - ' bytes in the file'); -}, 'NativeIOFile.getLength returns number of bytes written by' + - 'NativeIOFile.write'); diff --git a/tests/wpt/web-platform-tests/native-io/write_getLength_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/write_getLength_sync_basic.tentative.https.any.js deleted file mode 100644 index 09e97fe6fe9..00000000000 --- a/tests/wpt/web-platform-tests/native-io/write_getLength_sync_basic.tentative.https.any.js +++ /dev/null @@ -1,17 +0,0 @@ -// META: title=Synchronous NativeIO API: getLength reports written bytes. -// META: global=dedicatedworker -// META: script=resources/support.js - -'use strict'; - -test(testCase => { - reserveAndCleanupCapacitySync(testCase); - - const file = createFileSync(testCase, 'test_file', [64, 65, 66, 67]); - - const length = file.getLength(); - assert_equals(length, 4, - 'NativeIOFileSync.getLength() should return the number of' + - ' bytes in the file.'); -}, 'NativeIOFileSync.getLength returns the number bytes written by' + -' NativeIOFileSync.write'); diff --git a/tests/wpt/web-platform-tests/payment-handler/app-can-make-payment.js b/tests/wpt/web-platform-tests/payment-handler/app-can-make-payment.js index f55cf21208e..cd27bce02e0 100644 --- a/tests/wpt/web-platform-tests/payment-handler/app-can-make-payment.js +++ b/tests/wpt/web-platform-tests/payment-handler/app-can-make-payment.js @@ -1,89 +1,34 @@ +let responseType = 'canMakePayment-true'; +self.addEventListener('message', event => { + responseType = event.data.responseType; +}); + self.addEventListener('canmakepayment', event => { - if (event.methodData.length !== 1) { - const msg = 'Expected exactly one method data.'; + if (event.methodData) { + const msg = 'Expected no method data.'; event.respondWith(Promise.reject(new Error(msg))); return; } - const [method] = event.methodData; - if (!method || method.supportedMethods.length !== 1) { - const msg = 'Expected exactly one supported method name'; + if (event.modifiers) { + const msg = 'Expected no modifiers'; event.respondWith(Promise.reject(new Error(msg))); return; } - if (method.data.defaultParameter !== 'defaultValue') { - const msg = `Unexpected value for "defaultParameter": ${ - method.data.defaultParameter - }`; + if (event.topOrigin) { + const msg = `Unexpected topOrigin.`; event.respondWith(Promise.reject(new Error(msg))); return; } - if ('defaultUnsupportedParameter' in method.data) { - const msg = 'Unexpected "defaultUnsupportedParameter"'; + if (event.paymentRequestOrigin) { + const msg = `Unexpected iframe origin.`; event.respondWith(Promise.reject(new Error(msg))); return; } - if (event.modifiers.length !== 1) { - const msg = 'Expected exactly one modifier'; - event.respondWith(Promise.reject(new Error(msg))); - return; - } - - const [modifier] = event.modifiers; - - if (!modifier || modifier.supportedMethods.length !== 1) { - const msg = 'Expected exactly one supported method name in modifier'; - event.respondWith(Promise.reject(new Error(msg))); - return; - } - - for (const member of [ - 'additionalDisplayItems', - 'modifiedUnsupportedParameter', - 'total', - ]) { - if (member in modifier) { - const msg = `Unexpected member "${member}" in modifier`; - event.respondWith(Promise.reject(new Error(msg))); - return; - } - } - - const [methodName] = method.supportedMethods; - const [modifierMethodName] = modifier.supportedMethods; - if (modifierMethodName !== methodName) { - const msg = `Unexpected modifier method name: "${modifierMethodName}". Expected "${methodName}".`; - event.respondWith(Promise.reject(new Error(msg))); - return; - } - - if (modifier.data.modifiedParameter !== 'modifiedValue') { - const msg = `Unexpected value for 'modifiedParameter': ${ - modifier.data.modifiedParameter - }`; - event.respondWith(Promise.reject(new Error(msg))); - return; - } - - const methodAsURL = new URL(methodName); - if (event.topOrigin !== methodAsURL.origin) { - const msg = `Unexpected event.topOrigin: "${ - event.topOrigin - }". Expected "${methodAsURL.origin}".`; - event.respondWith(Promise.reject(new Error(msg))); - return; - } - - if (event.paymentRequestOrigin !== methodAsURL.origin) { - const msg = `Unexpected iframe origin ${event.paymentRequestOrigin}`; - event.respondWith(Promise.reject(new Error(msg))); - return; - } - - switch (methodAsURL.pathname.substr(1)) { + switch (responseType) { case 'canMakePayment-true': event.respondWith(true); break; diff --git a/tests/wpt/web-platform-tests/payment-handler/can-make-payment-event-constructor.https.serviceworker.js b/tests/wpt/web-platform-tests/payment-handler/can-make-payment-event-constructor.https.serviceworker.js index 01ce642d234..5b334d9c3ac 100644 --- a/tests/wpt/web-platform-tests/payment-handler/can-make-payment-event-constructor.https.serviceworker.js +++ b/tests/wpt/web-platform-tests/payment-handler/can-make-payment-event-constructor.https.serviceworker.js @@ -32,8 +32,10 @@ test(() => { modifiers: [], }); assert_false(ev.isTrusted, 'constructed in script, so not be trusted'); - assert_equals(ev.topOrigin, 'https://foo.com'); - assert_equals(ev.paymentRequestOrigin, 'https://bar.com'); + assert_equals(ev.topOrigin, undefined); + assert_equals(ev.paymentRequestOrigin, undefined); + assert_equals(ev.methodData, undefined); + assert_equals(ev.modifiers, undefined); }, 'CanMakePaymentEvent can be constructed with a CanMakePaymentEventInit, even if not trusted'); test(() => { diff --git a/tests/wpt/web-platform-tests/payment-handler/can-make-payment-event.https.html b/tests/wpt/web-platform-tests/payment-handler/can-make-payment-event.https.html index 28c001c654e..941c206e3b3 100644 --- a/tests/wpt/web-platform-tests/payment-handler/can-make-payment-event.https.html +++ b/tests/wpt/web-platform-tests/payment-handler/can-make-payment-event.https.html @@ -30,7 +30,7 @@ async function registerApp(methodName) { } function buildPaymentRequest(methodName) { - const unsupportedMethodName = methodName + '-unsupported'; + const unsupportedMethodName = methodName + '/unsupported'; return new PaymentRequest( [ { @@ -105,7 +105,7 @@ function buildPaymentRequest(methodName) { } promise_test(async t => { - const methodName = window.location.origin + '/canMakePayment-true'; + const methodName = window.location.origin; // Intentionally do not install the payment app. const request = buildPaymentRequest(methodName); assert_not_equals(request, undefined); @@ -129,8 +129,10 @@ promise_test(async t => { }, 'If a payment handler is not installed, then the payment method is not supported.'); promise_test(async t => { - const methodName = window.location.origin + '/canMakePayment-false'; + const methodName = window.location.origin; await registerApp(methodName); + navigator.serviceWorker.controller.postMessage( + {responseType: 'canMakePayment-false'}); const request = buildPaymentRequest(methodName); assert_not_equals(request, undefined); let paymentRequestCanMakePaymentResult; @@ -153,8 +155,10 @@ promise_test(async t => { }, 'If CanMakePaymentEvent.respondWith(false) is called, then the payment method is not supported.'); promise_test(async t => { - const methodName = window.location.origin + '/canMakePayment-promise-false'; + const methodName = window.location.origin; await registerApp(methodName); + navigator.serviceWorker.controller.postMessage( + {responseType: 'canMakePayment-promise-false'}); const request = buildPaymentRequest(methodName); assert_not_equals(request, undefined); let paymentRequestCanMakePaymentResult; @@ -177,8 +181,10 @@ promise_test(async t => { }, 'If CanMakePaymentEvent.respondWith(Promise.resolve(false)) is called, then the payment method is not supported.'); promise_test(async t => { - const methodName = window.location.origin + '/canMakePayment-true'; + const methodName = window.location.origin; await registerApp(methodName); + navigator.serviceWorker.controller.postMessage( + {responseType: 'canMakePayment-true'}); const request = buildPaymentRequest(methodName); assert_not_equals(request, undefined); let paymentRequestCanMakePaymentResult; @@ -203,8 +209,10 @@ promise_test(async t => { }, 'If CanMakePaymentEvent.respondWith(true) is called, then the payment method is supported.'); promise_test(async t => { - const methodName = window.location.origin + '/canMakePayment-promise-true'; + const methodName = window.location.origin; await registerApp(methodName); + navigator.serviceWorker.controller.postMessage( + {responseType: 'canMakePayment-promise-true'}); const request = buildPaymentRequest(methodName); assert_not_equals(request, undefined); let paymentRequestCanMakePaymentResult; @@ -229,8 +237,10 @@ promise_test(async t => { }, 'If CanMakePaymentEvent.respondWith(Promise.resolve(true)) is called, then the payment method is supported.'); promise_test(async t => { - const methodName = window.location.origin + '/canMakePayment-custom-error'; + const methodName = window.location.origin; await registerApp(methodName); + navigator.serviceWorker.controller.postMessage( + {responseType: 'canMakePayment-custom-error'}); const request = buildPaymentRequest(methodName); assert_not_equals(request, undefined); let paymentRequestCanMakePaymentResult; diff --git a/tests/wpt/web-platform-tests/resource-timing/object-not-found-after-cross-origin-redirect.html b/tests/wpt/web-platform-tests/resource-timing/object-not-found-after-cross-origin-redirect.html index c1a82d49708..4d5d121fe32 100644 --- a/tests/wpt/web-platform-tests/resource-timing/object-not-found-after-cross-origin-redirect.html +++ b/tests/wpt/web-platform-tests/resource-timing/object-not-found-after-cross-origin-redirect.html @@ -16,12 +16,12 @@ redirects. @@ -19,117 +20,138 @@ const status_codes = [ 500, 501, 502, 503, ]; -// Response status for same origin resources is exposed -const run_test = (loader, status) => { - let path = `/resource-timing/resources/status-code.py?status=${status}`; - const url = new URL(path, ORIGIN); - attribute_test( - loader, url, - entry => { - assert_equals(entry.responseStatus, status, - `response status for ${entry.name} should be ${status}`); - }); +const load_image_object = async path => { + return load.object(path, "image/png"); } -let resource_loaders = [ +const load_null_object = async path => { + return load.object(path, null); +} + +// Response status for same origin resources is exposed. +for(const loader of [ load.font, load.image, load.script, load.stylesheet, load.xhr_sync, load.xhr_async, - load.iframe -]; - -resource_loaders.forEach(loader => { - status_codes.forEach(status => run_test( - loader, status - )); -}); - - -// Response status is exposed for cors request for cross-origin resources -const run_test_cross_origin_allow_origin = (loader_with_attr,status) => { - let path = `/resource-timing/resources/status-code.py?status=${status}&allow_origin=${ORIGIN}`; - const url = new URL(path, REMOTE_ORIGIN); - loader_with_crossOrigin_attr = async url => { - return loader_with_attr(url, {"crossOrigin": "anonymous"}); - } - attribute_test( - loader_with_crossOrigin_attr, url, - entry => { + load.iframe, + load_image_object, + load_null_object +]) { + for(const status of status_codes) { + let path = (loader == load.font) ? '/fonts/pass.woff' : + '/resource-timing/resources/empty.js'; + path += `?pipe=status(${status})`; + attribute_test( + loader, new URL(path, ORIGIN), + entry => { assert_equals(entry.responseStatus, status, - `response status for ${entry.name} should be ${status}`); - }); + `response status for ${entry.name} should be ${status}`); + } + ); + } } -resource_loaders = [ +// Response status is exposed for CORS requests for cross-origin resources. +for(const loader of [ load.image_with_attrs, load.script_with_attrs, load.stylesheet_with_attrs -]; - -resource_loaders.forEach(loader => { - status_codes.forEach(status => run_test_cross_origin_allow_origin( - loader, status - )); -}); - +]) { + for(const status of status_codes) { + const path = `/resource-timing/resources/empty.js?pipe=status(${status})` + + `|header(access-control-allow-origin, ${ORIGIN})`; + loader_with_crossOrigin_attr = async url => { + return loader(url, {"crossOrigin": "anonymous"}); + } + attribute_test( + loader_with_crossOrigin_attr, new URL(path, REMOTE_ORIGIN), + entry => { + assert_equals(entry.responseStatus, status, + `response status for ${entry.name} should be ${status}`); + } + ); + } +} // Response status is 0 when a no-cors request is made for cross origin // fonts, images, scripts, stylesheets. // Response status is 0 when request's mode is "navigate" and response's // URL's origin is not same origin with request's origin. So response // status is not exposed for cross origin iframes. -const run_test_cross_origin = (loader, status) => { - let path = `/resource-timing/resources/status-code.py?status=${status}`; - const url = new URL(path, REMOTE_ORIGIN); - attribute_test( - loader, url, - entry => { - assert_equals(entry.responseStatus, 0, - `response status for ${entry.name} should be 0`); - }); -} - -resource_loaders = [ +for(const loader of [ load.font, load.image, load.script, load.stylesheet, - load.iframe -]; - -resource_loaders.forEach(loader => { - status_codes.forEach(status => run_test_cross_origin( - loader, status - )); -}); + load.iframe, + load_image_object, + load_null_object +]) { + for(const tao of [false, true]) { + for(const status of status_codes) { + let path = (loader == load.font) ? '/fonts/pass.woff' : + '/resource-timing/resources/empty.js'; + path += `?pipe=status(${status})`; + if (tao) { + path += `|header(timing-allow-origin, *)`; + } + attribute_test( + loader, new URL(path, REMOTE_ORIGIN), + entry => { + assert_equals(entry.responseStatus, 0, + `response status for ${entry.name} should be 0`); + } + ); + } + } +} // Response status for iframes is 0 when cross origin redirects are present // Same-Origin => Cross-Origin => Same-Origin => Same-Origin redirect chain -var destUrl = `${SAME_ORIGIN}/resource-timing/resources/multi_redirect.py?`; -destUrl += `page_origin=${SAME_ORIGIN}`; -destUrl += `&cross_origin=${REMOTE_ORIGIN}`; -destUrl += `&final_resource=/resource-timing/resources/status-code.py?status=200`; -attribute_test( - load.iframe, new URL(destUrl), - entry => { +for(const loader of [ + load.iframe, + load_null_object +]) { + for(const status of status_codes) { + const destUrl = + `${SAME_ORIGIN}/resource-timing/resources/multi_redirect.py` + + `?page_origin=${SAME_ORIGIN}` + + `&cross_origin=${REMOTE_ORIGIN}` + + `&final_resource=` + + `/resource-timing/resources/empty.js?pipe=status(${status})`; + attribute_test( + loader, new URL(destUrl), + entry => { assert_equals(entry.responseStatus, 0, - `response status should be 0 for iframes having cross origin redirects`); -}); - + `response status should be 0 for iframes having cross origin` + + ` redirects`); + } + ); + } +} // Response status for iframes is exposed for same origin redirects -var destUrl = `${SAME_ORIGIN}/resource-timing/resources/redirect-cors.py`; -destUrl += `?location=${SAME_ORIGIN}/resource-timing/resources/status-code.py?status=203`; -attribute_test( - load.iframe, new URL(destUrl), - entry => { - assert_equals(entry.responseStatus, 203, - `response status should be exposed for iframes having only same origin redirects`); -}); - +for(const loader of [ + load.iframe, + load_null_object +]) { + for(const status of status_codes) { + const destUrl = `${SAME_ORIGIN}/resource-timing/resources/redirect-cors.py` + + `?location=${SAME_ORIGIN}/resource-timing/resources/empty.js` + + `?pipe=status(${status})`; + attribute_test( + loader, new URL(destUrl), + entry => { + assert_equals(entry.responseStatus, status, + `response status should be exposed for iframes having only same` + + ` origin redirects`); + } + ); + } +}; - \ No newline at end of file + diff --git a/tests/wpt/web-platform-tests/resources/chromium/mock-pressure-service.js b/tests/wpt/web-platform-tests/resources/chromium/mock-pressure-service.js index 5ff191c0fc5..19eb1e9d470 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/mock-pressure-service.js +++ b/tests/wpt/web-platform-tests/resources/chromium/mock-pressure-service.js @@ -9,6 +9,10 @@ class MockPressureService { this.interceptor_.oninterfacerequest = e => { this.receiver_.$.bindHandle(e.handle); }; + this.receiver_.onConnectionError.addListener(() => { + this.stopPlatformCollector(); + this.observer_ = null; + }); this.reset(); this.mojomStateType_ = new Map([ ['nominal', PressureState.kNominal], ['fair', PressureState.kFair], diff --git a/tests/wpt/web-platform-tests/resources/idlharness.js b/tests/wpt/web-platform-tests/resources/idlharness.js index bda4a31fb0e..46aa11e5ca1 100644 --- a/tests/wpt/web-platform-tests/resources/idlharness.js +++ b/tests/wpt/web-platform-tests/resources/idlharness.js @@ -2668,6 +2668,7 @@ IdlInterface.prototype.test_member_stringifier = function(member) IdlInterface.prototype.test_members = function() { + var unexposed_members = new Set(); for (var i = 0; i < this.members.length; i++) { var member = this.members[i]; @@ -2676,15 +2677,18 @@ IdlInterface.prototype.test_members = function() } if (!exposed_in(exposure_set(member, this.exposureSet))) { - subsetTestByKey(this.name, test, function() { - // It's not exposed, so we shouldn't find it anywhere. - assert_false(member.name in this.get_interface_object(), - "The interface object must not have a property " + - format_value(member.name)); - assert_false(member.name in this.get_interface_object().prototype, - "The prototype object must not have a property " + - format_value(member.name)); - }.bind(this), this.name + " interface: member " + member.name); + if (!unexposed_members.has(member.name)) { + unexposed_members.add(member.name); + subsetTestByKey(this.name, test, function() { + // It's not exposed, so we shouldn't find it anywhere. + assert_false(member.name in this.get_interface_object(), + "The interface object must not have a property " + + format_value(member.name)); + assert_false(member.name in this.get_interface_object().prototype, + "The prototype object must not have a property " + + format_value(member.name)); + }.bind(this), this.name + " interface: member " + member.name); + } continue; } @@ -2855,17 +2859,23 @@ IdlInterface.prototype.test_interface_of = function(desc, obj, exception, expect return; } + var unexposed_properties = new Set(); for (var i = 0; i < this.members.length; i++) { var member = this.members[i]; if (member.untested) { continue; } - if (!exposed_in(exposure_set(member, this.exposureSet))) { - subsetTestByKey(this.name, test, function() { - assert_equals(exception, null, "Unexpected exception when evaluating object"); - assert_false(member.name in obj); - }.bind(this), this.name + " interface: " + desc + ' must not have property "' + member.name + '"'); + if (!exposed_in(exposure_set(member, this.exposureSet))) + { + if (!unexposed_properties.has(member.name)) + { + unexposed_properties.add(member.name); + subsetTestByKey(this.name, test, function() { + assert_equals(exception, null, "Unexpected exception when evaluating object"); + assert_false(member.name in obj); + }.bind(this), this.name + " interface: " + desc + ' must not have property "' + member.name + '"'); + } continue; } if (member.type == "attribute" && member.isUnforgeable) diff --git a/tests/wpt/web-platform-tests/screen-details/screen_enumeration_permission.https.window.js b/tests/wpt/web-platform-tests/screen-details/permission.https.window.js similarity index 100% rename from tests/wpt/web-platform-tests/screen-details/screen_enumeration_permission.https.window.js rename to tests/wpt/web-platform-tests/screen-details/permission.https.window.js diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-computed.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-computed.html index a77233aab90..9cabaab1fee 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-computed.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-computed.html @@ -62,8 +62,15 @@ test_computed_value('animation-timeline', 'scroll(vertical root)'); // https://drafts.csswg.org/scroll-animations-1/#view-notation test_computed_value('animation-timeline', 'view()'); test_computed_value('animation-timeline', 'view(block)', 'view()'); -test_computed_value('animation-timeline', 'view(inline)'); -test_computed_value('animation-timeline', 'view(horizontal)'); -test_computed_value('animation-timeline', 'view(vertical)'); +test_computed_value('animation-timeline', 'view(inline)', 'view(inline)'); +test_computed_value('animation-timeline', 'view(horizontal)', 'view(horizontal)'); +test_computed_value('animation-timeline', 'view(vertical)', 'view(vertical)'); +test_computed_value('animation-timeline', 'view(vertical 1px)'); +test_computed_value('animation-timeline', 'view(1px auto)'); +test_computed_value('animation-timeline', 'view(auto 1px)'); +test_computed_value('animation-timeline', 'view(vertical 1px auto)'); +test_computed_value('animation-timeline', 'view(1px vertical)', 'view(vertical 1px)'); +test_computed_value('animation-timeline', 'view(vertical auto)', 'view(vertical)'); +test_computed_value('animation-timeline', 'view(vertical auto auto)', 'view(vertical)'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-parsing.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-parsing.html index dc22778fa7a..1a30f11f851 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-parsing.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-parsing.html @@ -56,13 +56,31 @@ test_invalid_value('animation-timeline', 'scroll(abc)'); test_invalid_value('animation-timeline', 'scroll(vertical abc)'); test_invalid_value('animation-timeline', 'scroll("string")'); -// https://drafts.csswg.org/scroll-animations-1/#scroll-notation +// https://drafts.csswg.org/scroll-animations-1/#view-notation test_valid_value('animation-timeline', 'view()'); test_valid_value('animation-timeline', 'view(block)', 'view()'); test_valid_value('animation-timeline', 'view(inline)'); test_valid_value('animation-timeline', 'view(horizontal)'); test_valid_value('animation-timeline', 'view(vertical)'); +test_valid_value('animation-timeline', 'view(vertical 1px 2px)'); +test_valid_value('animation-timeline', 'view(vertical 1px)'); +test_valid_value('animation-timeline', 'view(vertical auto)', 'view(vertical)'); +test_valid_value('animation-timeline', 'view(vertical auto auto)', 'view(vertical)'); +test_valid_value('animation-timeline', 'view(vertical auto 1px)'); +test_valid_value('animation-timeline', 'view(1px 2px vertical)', 'view(vertical 1px 2px)'); +test_valid_value('animation-timeline', 'view(1px vertical)', 'view(vertical 1px)'); +test_valid_value('animation-timeline', 'view(auto horizontal)', 'view(horizontal)'); +test_valid_value('animation-timeline', 'view(1px 2px)'); +test_valid_value('animation-timeline', 'view(1px)'); +test_valid_value('animation-timeline', 'view(1px 1px)', 'view(1px)'); +test_valid_value('animation-timeline', 'view(1px auto)'); +test_valid_value('animation-timeline', 'view(auto calc(1% + 1px))'); +test_valid_value('animation-timeline', 'view(auto)', 'view()'); +test_valid_value('animation-timeline', 'view(auto auto)', 'view()'); +test_invalid_value('animation-timeline', 'view(vertical 1px 2px 3px)'); +test_invalid_value('animation-timeline', 'view(1px vertical 3px)'); +test_invalid_value('animation-timeline', 'view(1px 2px 3px)'); test_invalid_value('animation-timeline', 'view(abc block)'); test_invalid_value('animation-timeline', 'view(abc)'); test_invalid_value('animation-timeline', 'view(vertical abc)'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html new file mode 100644 index 00000000000..d93306819af --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html @@ -0,0 +1,263 @@ + +The animation-timeline: view() notation + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/server-timing/resources/blue_cors.png b/tests/wpt/web-platform-tests/server-timing/resources/blue_cors.png new file mode 100644 index 00000000000..4498dd258a2 Binary files /dev/null and b/tests/wpt/web-platform-tests/server-timing/resources/blue_cors.png differ diff --git a/tests/wpt/web-platform-tests/server-timing/resources/blue_cors.png.headers b/tests/wpt/web-platform-tests/server-timing/resources/blue_cors.png.headers new file mode 100644 index 00000000000..2977f0a52c5 --- /dev/null +++ b/tests/wpt/web-platform-tests/server-timing/resources/blue_cors.png.headers @@ -0,0 +1,2 @@ +Access-Control-Allow-Origin: * +Server-Timing: metric2; dur=2.1; desc=blue.png diff --git a/tests/wpt/web-platform-tests/server-timing/server_timing_headers_not_visible_in_fetch.https.html b/tests/wpt/web-platform-tests/server-timing/server_timing_headers_not_visible_in_fetch.https.html new file mode 100644 index 00000000000..3502f491d5a --- /dev/null +++ b/tests/wpt/web-platform-tests/server-timing/server_timing_headers_not_visible_in_fetch.https.html @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/select-url-permissions-policy-helper.html b/tests/wpt/web-platform-tests/shared-storage/resources/select-url-permissions-policy-helper.html new file mode 100644 index 00000000000..b70d763ad45 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/resources/select-url-permissions-policy-helper.html @@ -0,0 +1,18 @@ + + + + + + + diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/permissions-policy-helper.html b/tests/wpt/web-platform-tests/shared-storage/resources/shared-storage-permissions-policy-helper.html similarity index 100% rename from tests/wpt/web-platform-tests/shared-storage/resources/permissions-policy-helper.html rename to tests/wpt/web-platform-tests/shared-storage/resources/shared-storage-permissions-policy-helper.html diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/util.js b/tests/wpt/web-platform-tests/shared-storage/resources/util.js index 4dea9837646..838885a5657 100644 --- a/tests/wpt/web-platform-tests/shared-storage/resources/util.js +++ b/tests/wpt/web-platform-tests/shared-storage/resources/util.js @@ -1,5 +1,23 @@ 'use strict'; +async function IsSharedStorageSelectUrlAllowedByPermissionsPolicy() { + const errorMessage = 'The \"shared-storage-select-url\" Permissions Policy denied the usage of window.sharedStorage.selectURL().'; + let allowedByPermissionsPolicy = true; + try { + // Run selectURL() with without addModule() and this should always fail. + // Check the error message to distinguish between the permissions policy + // error and the missing addModule() error. + await sharedStorage.selectURL("operation", [{url: "1.html"}]); + assert_unreached("did not fail"); + } catch (e) { + if (e.message === errorMessage) { + allowedByPermissionsPolicy = false; + } + } + + return allowedByPermissionsPolicy; +} + // Execute all shared storage methods and capture their errors. Return true if // the permissions policy allows all of them; return false if the permissions // policy disallows all of them. Precondition: only these two outcomes are diff --git a/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-default.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-default.tentative.https.sub.html new file mode 100644 index 00000000000..67911388ec0 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-default.tentative.https.sub.html @@ -0,0 +1,29 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-none.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-none.tentative.https.sub.html new file mode 100644 index 00000000000..6820edb0843 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-none.tentative.https.sub.html @@ -0,0 +1,29 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-none.tentative.https.sub.html.headers b/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-none.tentative.https.sub.html.headers new file mode 100644 index 00000000000..fdd2e3780bf --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-none.tentative.https.sub.html.headers @@ -0,0 +1 @@ +Permissions-Policy: shared-storage-select-url=() diff --git a/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-self.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-self.tentative.https.sub.html new file mode 100644 index 00000000000..b79bc065c21 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-self.tentative.https.sub.html @@ -0,0 +1,29 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-self.tentative.https.sub.html.headers b/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-self.tentative.https.sub.html.headers new file mode 100644 index 00000000000..20d5451ba2c --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/select-url-permissions-policy-self.tentative.https.sub.html.headers @@ -0,0 +1 @@ +Permissions-Policy: shared-storage-select-url=(self) diff --git a/tests/wpt/web-platform-tests/shared-storage/permissions-policy-default.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-default.tentative.https.sub.html similarity index 91% rename from tests/wpt/web-platform-tests/shared-storage/permissions-policy-default.tentative.https.sub.html rename to tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-default.tentative.https.sub.html index f055ae0421f..5439df2a068 100644 --- a/tests/wpt/web-platform-tests/shared-storage/permissions-policy-default.tentative.https.sub.html +++ b/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-default.tentative.https.sub.html @@ -6,7 +6,7 @@ - - diff --git a/tests/wpt/web-platform-tests/speculation-rules/prerender/storage-foundation.https.html b/tests/wpt/web-platform-tests/speculation-rules/prerender/storage-foundation.https.html deleted file mode 100644 index 6be77bad8fd..00000000000 --- a/tests/wpt/web-platform-tests/speculation-rules/prerender/storage-foundation.https.html +++ /dev/null @@ -1,69 +0,0 @@ - -Same-origin prerendering can access Storage Foundation API - - - - - - - - diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml b/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml index 0d9f42d69b3..fd0fda9c991 100644 --- a/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml +++ b/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml @@ -218,6 +218,7 @@ tasks: browser: servo channel: nightly use: + - trigger-weekly - trigger-push do: - ${vars.browser}-${vars.channel}-${vars.suite}: diff --git a/tests/wpt/web-platform-tests/tools/wpt/android.py b/tests/wpt/web-platform-tests/tools/wpt/android.py index e3465573faf..366502cc6c2 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/android.py +++ b/tests/wpt/web-platform-tests/tools/wpt/android.py @@ -91,7 +91,7 @@ def install_android_packages(logger, sdk_path, no_prompt=False): raise OSError("Can't find sdkmanager at %s" % sdk_manager_path) packages = ["platform-tools", - "build-tools;33.0.0", + "build-tools;33.0.1", "platforms;android-33", "emulator"] diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py index 548d5bfdf95..da3b63ba5b4 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py @@ -2,6 +2,7 @@ import json import os +import signal import sys from collections import defaultdict from datetime import datetime, timedelta @@ -257,6 +258,7 @@ def run_test_iteration(test_status, test_loader, test_source_kwargs, test_source run_test_kwargs["restart_on_new_group"], recording=recording) as manager_group: try: + handle_interrupt_signals() manager_group.run(tests_to_run) except KeyboardInterrupt: logger.critical("Main thread got signal") @@ -274,6 +276,14 @@ def run_test_iteration(test_status, test_loader, test_source_kwargs, test_source return True +def handle_interrupt_signals(): + def termination_handler(_signum, _unused_frame): + raise KeyboardInterrupt() + if sys.platform == "win32": + signal.signal(signal.SIGBREAK, termination_handler) + else: + signal.signal(signal.SIGTERM, termination_handler) + def evaluate_runs(test_status, run_test_kwargs): """Evaluates the test counts after the given number of repeat runs has finished""" diff --git a/tests/wpt/web-platform-tests/url/resources/setters_tests.json b/tests/wpt/web-platform-tests/url/resources/setters_tests.json index b709ef5234a..cff93d83ba2 100644 --- a/tests/wpt/web-platform-tests/url/resources/setters_tests.json +++ b/tests/wpt/web-platform-tests/url/resources/setters_tests.json @@ -1603,7 +1603,7 @@ ], "pathname": [ { - "comment": "Cannot-be-a-base don’t have a path", + "comment": "Opaque paths cannot be set", "href": "mailto:me@example.net", "new_value": "/foo", "expected": { @@ -1611,6 +1611,22 @@ "pathname": "me@example.net" } }, + { + "href": "data:original", + "new_value": "new value", + "expected": { + "href": "data:original", + "pathname": "original" + } + }, + { + "href": "sc:original", + "new_value": "new value", + "expected": { + "href": "sc:original", + "pathname": "original" + } + }, { "comment": "Special URLs cannot have their paths erased", "href": "file:///some/path", @@ -1830,6 +1846,23 @@ "href": "non-spec:/p", "pathname": "/p" } + }, + { + "comment": "Non-special URLs with non-opaque paths percent-encode U+0020", + "href": "data:/nospace", + "new_value": "space ", + "expected": { + "href": "data:/space%20", + "pathname": "/space%20" + } + }, + { + "href": "sc:/nospace", + "new_value": "space ", + "expected": { + "href": "sc:/space%20", + "pathname": "/space%20" + } } ], "search": [ @@ -1914,6 +1947,42 @@ "href": "http://example.net/?%c3%89t%C3%A9", "search": "?%c3%89t%C3%A9" } + }, + { + "comment": "Drop trailing spaces from trailing opaque paths", + "href": "data:space ?query", + "new_value": "", + "expected": { + "href": "data:space", + "pathname": "space", + "search": "" + } + }, + { + "href": "sc:space ?query", + "new_value": "", + "expected": { + "href": "sc:space", + "pathname": "space", + "search": "" + } + }, + { + "comment": "Do not drop trailing spaces from non-trailing opaque paths", + "href": "data:space ?query#fragment", + "new_value": "", + "expected": { + "href": "data:space #fragment", + "search": "" + } + }, + { + "href": "sc:space ?query#fragment", + "new_value": "", + "expected": { + "href": "sc:space #fragment", + "search": "" + } } ], "hash": [ @@ -2048,6 +2117,42 @@ "href": "javascript:alert(1)#castle", "hash": "#castle" } + }, + { + "comment": "Drop trailing spaces from trailing opaque paths", + "href": "data:space #fragment", + "new_value": "", + "expected": { + "href": "data:space", + "pathname": "space", + "hash": "" + } + }, + { + "href": "sc:space #fragment", + "new_value": "", + "expected": { + "href": "sc:space", + "pathname": "space", + "hash": "" + } + }, + { + "comment": "Do not drop trailing spaces from non-trailing opaque paths", + "href": "data:space ?query#fragment", + "new_value": "", + "expected": { + "href": "data:space ?query", + "hash": "" + } + }, + { + "href": "sc:space ?query#fragment", + "new_value": "", + "expected": { + "href": "sc:space ?query", + "hash": "" + } } ] } diff --git a/tests/wpt/web-platform-tests/url/resources/urltestdata.json b/tests/wpt/web-platform-tests/url/resources/urltestdata.json index 5833adae584..fe7316fd2e8 100644 --- a/tests/wpt/web-platform-tests/url/resources/urltestdata.json +++ b/tests/wpt/web-platform-tests/url/resources/urltestdata.json @@ -8640,5 +8640,212 @@ "input": "http://💩.123/", "base": "about:blank", "failure": true + }, + "U+0000 and U+FFFF in various places", + { + "input": "https://\u0000y", + "base": "about:blank", + "failure": true + }, + { + "input": "https://x/\u0000y", + "base": "about:blank", + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/%00y", + "password": "", + "pathname": "/%00y", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "https://x/?\u0000y", + "base": "about:blank", + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/?%00y", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "?%00y", + "username": "" + }, + { + "input": "https://x/?#\u0000y", + "base": "about:blank", + "hash": "#%00y", + "host": "x", + "hostname": "x", + "href": "https://x/?#%00y", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "https://\uFFFFy", + "base": "about:blank", + "failure": true + }, + { + "input": "https://x/\uFFFFy", + "base": "about:blank", + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/%EF%BF%BFy", + "password": "", + "pathname": "/%EF%BF%BFy", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "https://x/?\uFFFFy", + "base": "about:blank", + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/?%EF%BF%BFy", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "?%EF%BF%BFy", + "username": "" + }, + { + "input": "https://x/?#\uFFFFy", + "base": "about:blank", + "hash": "#%EF%BF%BFy", + "host": "x", + "hostname": "x", + "href": "https://x/?#%EF%BF%BFy", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "non-special:\u0000y", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:%00y", + "password": "", + "pathname": "%00y", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/\u0000y", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/%00y", + "password": "", + "pathname": "x/%00y", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/?\u0000y", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/?%00y", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "?%00y", + "username": "" + }, + { + "input": "non-special:x/?#\u0000y", + "base": "about:blank", + "hash": "#%00y", + "host": "", + "hostname": "", + "href": "non-special:x/?#%00y", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:\uFFFFy", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:%EF%BF%BFy", + "password": "", + "pathname": "%EF%BF%BFy", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/\uFFFFy", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/%EF%BF%BFy", + "password": "", + "pathname": "x/%EF%BF%BFy", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/?\uFFFFy", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/?%EF%BF%BFy", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "?%EF%BF%BFy", + "username": "" + }, + { + "input": "non-special:x/?#\uFFFFy", + "base": "about:blank", + "hash": "#%EF%BF%BFy", + "host": "", + "hostname": "", + "href": "non-special:x/?#%EF%BF%BFy", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" } ] diff --git a/tests/wpt/web-platform-tests/url/urlsearchparams-delete.any.js b/tests/wpt/web-platform-tests/url/urlsearchparams-delete.any.js index 1aa9b313736..28ebbce5f13 100644 --- a/tests/wpt/web-platform-tests/url/urlsearchparams-delete.any.js +++ b/tests/wpt/web-platform-tests/url/urlsearchparams-delete.any.js @@ -43,3 +43,21 @@ test(function() { assert_equals(url.href, 'http://example.com/', 'url.href does not have ?'); assert_equals(url.search, '', 'url.search does not have ?'); }, 'Removing non-existent param removes ? from URL'); + +test(() => { + const url = new URL('data:space ?test'); + assert_true(url.searchParams.has('test')); + url.searchParams.delete('test'); + assert_false(url.searchParams.has('test')); + assert_equals(url.search, ''); + assert_equals(url.pathname, 'space'); + assert_equals(url.href, 'data:space'); +}, 'Changing the query of a URL with an opaque path can impact the path'); + +test(() => { + const url = new URL('data:space ?test#test'); + url.searchParams.delete('test'); + assert_equals(url.search, ''); + assert_equals(url.pathname, 'space '); + assert_equals(url.href, 'data:space #test'); +}, 'Changing the query of a URL with an opaque path can impact the path if the URL has no fragment'); diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/crashtests/copyFromChannel-bufferOffset-1.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/crashtests/copyFromChannel-bufferOffset-1.html new file mode 100644 index 00000000000..564317f7de8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/crashtests/copyFromChannel-bufferOffset-1.html @@ -0,0 +1,11 @@ + + + Test large bufferOffset in copyFromChannel() + + + diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/crashtests/copyToChannel-bufferOffset-1.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/crashtests/copyToChannel-bufferOffset-1.html new file mode 100644 index 00000000000..999925a9835 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/crashtests/copyToChannel-bufferOffset-1.html @@ -0,0 +1,10 @@ + + + Test large bufferOffset in copyToChannel() + + + diff --git a/tests/wpt/web-platform-tests/webcodecs/videoFrame-serialization.crossAgentCluster.html b/tests/wpt/web-platform-tests/webcodecs/videoFrame-serialization.crossAgentCluster.https.html similarity index 61% rename from tests/wpt/web-platform-tests/webcodecs/videoFrame-serialization.crossAgentCluster.html rename to tests/wpt/web-platform-tests/webcodecs/videoFrame-serialization.crossAgentCluster.https.html index c2ab29850e8..5822cb8415e 100644 --- a/tests/wpt/web-platform-tests/webcodecs/videoFrame-serialization.crossAgentCluster.html +++ b/tests/wpt/web-platform-tests/webcodecs/videoFrame-serialization.crossAgentCluster.https.html @@ -9,12 +9,20 @@ postMessage(e.data); }; + +
    + {iframe("

    ")}""") + + result = execute_async_script(session, f"arguments[0]({expression})") + reference = assert_success(result) + assert isinstance(reference, expected_type) + + result = execute_async_script(session, "arguments[1](arguments[0].constructor.name)", [reference]) + assert_success(result, expected_class) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py index 38b7c260161..a9d9e63feaf 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py @@ -1,7 +1,5 @@ import os -from webdriver.client import ShadowRoot - from tests.support.asserts import assert_same_element, assert_success from . import execute_async_script @@ -150,33 +148,3 @@ def test_node_list(session, inline): assert len(value) == 2 for expected, actual in zip(ps, value): assert_same_element(session, expected, actual) - - -def test_shadow_root(session, inline): - session.url = inline(""" - - - """) - custom_element = session.find.css("custom-checkbox-element", all=False) - expected = custom_element.shadow_root - response = execute_async_script(session, """ - let resolve = arguments[0]; - resolve(document.querySelector('custom-checkbox-element').shadowRoot); - """) - value = assert_success(response) - assert isinstance(value, ShadowRoot) - assert value.id == expected.id diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/cyclic.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/cyclic.py new file mode 100644 index 00000000000..ff536f3477c --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/cyclic.py @@ -0,0 +1,78 @@ +from tests.support.asserts import assert_error, assert_same_element, assert_success +from . import execute_async_script + + +def test_collection_self_reference(session): + response = execute_async_script(session, """ + let arr = []; + arr.push(arr); + arguments[0](arr); + """) + assert_error(response, "javascript error") + + +def test_element_self_reference(session, inline): + session.url = inline("

    ") + div = session.find.css("div", all=False) + + response = execute_async_script(session, """ + let div = document.querySelector("div"); + div.reference = div; + arguments[0](div); + """) + value = assert_success(response) + assert_same_element(session, value, div) + + +def test_object_self_reference(session): + response = execute_async_script(session, """ + let obj = {}; + obj.reference = obj; + arguments[0](obj); + """) + assert_error(response, "javascript error") + + +def test_collection_self_reference_in_object(session): + response = execute_async_script(session, """ + let arr = []; + arr.push(arr); + arguments[0]({'value': arr}); + """) + assert_error(response, "javascript error") + + +def test_object_self_reference_in_collection(session): + response = execute_async_script(session, """ + let obj = {}; + obj.reference = obj; + arguments[0]([obj]); + """) + assert_error(response, "javascript error") + + +def test_element_self_reference_in_collection(session, inline): + session.url = inline("
    ") + divs = session.find.css("div") + + response = execute_async_script(session, """ + let div = document.querySelector("div"); + div.reference = div; + arguments[0]([div]); + """) + value = assert_success(response) + for expected, actual in zip(divs, value): + assert_same_element(session, expected, actual) + + +def test_element_self_reference_in_object(session, inline): + session.url = inline("
    ") + div = session.find.css("div", all=False) + + response = execute_async_script(session, """ + let div = document.querySelector("div"); + div.reference = div; + arguments[0]({foo: div}); + """) + value = assert_success(response) + assert_same_element(session, div, value["foo"]) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/execute_async.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/execute_async.py index 697df72bb9c..2292aecce19 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/execute_async.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/execute_async.py @@ -34,11 +34,16 @@ def test_no_such_element_with_invalid_value(session): assert_error(result, "no such element") -def test_no_such_element_from_other_window_handle(session, inline): +@pytest.mark.parametrize("closed", [False, True], ids=["open", "closed"]) +def test_no_such_element_from_other_window_handle(session, inline, closed): session.url = inline("

    ") element = session.find.css("#parent", all=False) new_handle = session.new_window() + + if closed: + session.window.close() + session.window_handle = new_handle result = execute_async_script(session, """ @@ -47,48 +52,25 @@ def test_no_such_element_from_other_window_handle(session, inline): assert_error(result, "no such element") -def test_no_such_element_from_other_frame(session, iframe, inline): - session.url = inline(iframe("

    ")) +@pytest.mark.parametrize("closed", [False, True], ids=["open", "closed"]) +def test_no_such_element_from_other_frame(session, url, closed): + session.url = url("/webdriver/tests/support/html/subframe.html") - frame = session.find.css("iframe", all=False) + frame = session.find.css("#delete-frame", all=False) session.switch_frame(frame) - element = session.find.css("#parent", all=False) + button = session.find.css("#remove-parent", all=False) + if closed: + button.click() + session.switch_frame("parent") result = execute_async_script(session, """ arguments[1](true); - """, args=[element]) + """, args=[button]) assert_error(result, "no such element") -@pytest.mark.parametrize("as_frame", [False, True], ids=["top_context", "child_context"]) -def test_stale_element_reference_as_argument(session, stale_element, as_frame): - element = stale_element("

    ", "div", as_frame=as_frame) - - result = execute_async_script(session, "arguments[0](1);", args=[element]) - assert_error(result, "stale element reference") - - -@pytest.mark.parametrize("as_frame", [False, True], ids=["top_context", "child_context"]) -def test_stale_element_reference_as_returned_value(session, iframe, inline, as_frame): - if as_frame: - session.url = inline(iframe("
    ")) - frame = session.find.css("iframe", all=False) - session.switch_frame(frame) - else: - session.url = inline("
    ") - - element = session.find.css("div", all=False) - - result = execute_async_script(session, """ - const [elem, resolve] = arguments; - elem.remove(); - resolve(elem); - """, args=[element]) - assert_error(result, "stale element reference") - - @pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) def test_abort_by_user_prompt(session, dialog_type): response = execute_async_script( diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/node.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/node.py index a4b1baad500..1b204df33ec 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/node.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/node.py @@ -1,20 +1,26 @@ import pytest + from webdriver.client import Element, Frame, ShadowRoot, Window from tests.support.asserts import assert_error, assert_success from . import execute_async_script -@pytest.mark.parametrize("as_frame", [False, True], ids=["top_context", "child_context"]) -def test_stale_element_reference_as_argument(session, stale_element, as_frame): - element = stale_element("
    ", "div", as_frame=as_frame) - - result = execute_async_script(session, "arguments[0](1);", args=[element]) - assert_error(result, "stale element reference") +PAGE_DATA = """ +


    +

    Lorem
    +
    + +
    + +""" @pytest.mark.parametrize("as_frame", [False, True], ids=["top_context", "child_context"]) -def test_stale_element_reference_as_returned_value(session, iframe, inline, as_frame): +def test_stale_element_reference(session, iframe, inline, as_frame): if as_frame: session.url = inline(iframe("
    ")) frame = session.find.css("iframe", all=False) @@ -32,13 +38,13 @@ def test_stale_element_reference_as_returned_value(session, iframe, inline, as_f assert_error(result, "stale element reference") -@pytest.mark.parametrize("expression, type, name", [ - ("window.frames[0]", Frame, "Frame"), - ("document.getElementById('foo')", Element, "HTMLDivElement"), - ("document.getElementById('checkbox').shadowRoot", ShadowRoot, "ShadowRoot"), - ("window", Window, "Window") +@pytest.mark.parametrize("expression, expected_type", [ + ("window.frames[0]", Frame), + ("document.getElementById('foo')", Element), + ("document.getElementById('checkbox').shadowRoot", ShadowRoot), + ("window", Window), ], ids=["frame", "node", "shadow-root", "window"]) -def test_element_reference(session, iframe, inline, expression, type, name): +def test_element_reference(session, iframe, inline, expression, expected_type): session.url = inline(f""" + + +
    + {iframe("

    ")}""") + + result = execute_script(session, f"return {expression}") + reference = assert_success(result) + assert isinstance(reference, expected_type) + + result = execute_script(session, "return arguments[0].constructor.name", [reference]) + assert_success(result, expected_class) + diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/collections.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/collections.py index 60b7797d521..3a6c2470c97 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/collections.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/collections.py @@ -1,7 +1,5 @@ import os -from webdriver.client import ShadowRoot - from tests.support.asserts import assert_same_element, assert_success from . import execute_script @@ -128,31 +126,3 @@ def test_node_list(session, inline): assert len(value) == 2 for expected, actual in zip(ps, value): assert_same_element(session, expected, actual) - - -def test_shadow_root(session, inline): - session.url = inline(""" - - - """) - custom_element = session.find.css("custom-checkbox-element", all=False) - expected = custom_element.shadow_root - response = execute_script(session, - "return document.querySelector('custom-checkbox-element').shadowRoot") - value = assert_success(response) - assert isinstance(value, ShadowRoot) - assert value.id == expected.id diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/cyclic.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/cyclic.py index 3bcc73890c9..29db2f27e66 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/cyclic.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/cyclic.py @@ -2,7 +2,7 @@ from tests.support.asserts import assert_error, assert_same_element, assert_succ from . import execute_script -def test_array(session): +def test_collection_self_reference(session): response = execute_script(session, """ let arr = []; arr.push(arr); @@ -11,7 +11,20 @@ def test_array(session): assert_error(response, "javascript error") -def test_object(session): +def test_element_self_reference(session, inline): + session.url = inline("

    ") + div = session.find.css("div", all=False) + + response = execute_script(session, """ + let div = document.querySelector("div"); + div.reference = div; + return div; + """) + value = assert_success(response) + assert_same_element(session, value, div) + + +def test_object_self_reference(session): response = execute_script(session, """ let obj = {}; obj.reference = obj; @@ -20,16 +33,16 @@ def test_object(session): assert_error(response, "javascript error") -def test_array_in_object(session): +def test_collection_self_reference_in_object(session): response = execute_script(session, """ let arr = []; arr.push(arr); - return {'arrayValue': arr}; + return {'value': arr}; """) assert_error(response, "javascript error") -def test_object_in_array(session): +def test_object_self_reference_in_collection(session): response = execute_script(session, """ let obj = {}; obj.reference = obj; @@ -38,7 +51,7 @@ def test_object_in_array(session): assert_error(response, "javascript error") -def test_element_in_collection(session, inline): +def test_element_self_reference_in_collection(session, inline): session.url = inline("
    ") divs = session.find.css("div") @@ -52,7 +65,7 @@ def test_element_in_collection(session, inline): assert_same_element(session, expected, actual) -def test_element_in_object(session, inline): +def test_element_self_reference_in_object(session, inline): session.url = inline("
    ") div = session.find.css("div", all=False) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py index d1f1f137edf..8804daf59fc 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py @@ -32,57 +32,39 @@ def test_no_such_element_with_invalid_value(session): assert_error(result, "no such element") -def test_no_such_element_from_other_window_handle(session, inline): +@pytest.mark.parametrize("closed", [False, True], ids=["open", "closed"]) +def test_no_such_element_from_other_window_handle(session, inline, closed): session.url = inline("

    ") element = session.find.css("#parent", all=False) new_handle = session.new_window() + + if closed: + session.window.close() + session.window_handle = new_handle result = execute_script(session, "return true;", args=[element]) assert_error(result, "no such element") -def test_no_such_element_from_other_frame(session, iframe, inline): - session.url = inline(iframe("

    ")) +@pytest.mark.parametrize("closed", [False, True], ids=["open", "closed"]) +def test_no_such_element_from_other_frame(session, url, closed): + session.url = url("/webdriver/tests/support/html/subframe.html") - frame = session.find.css("iframe", all=False) + frame = session.find.css("#delete-frame", all=False) session.switch_frame(frame) - element = session.find.css("#parent", all=False) + button = session.find.css("#remove-parent", all=False) + if closed: + button.click() + session.switch_frame("parent") - result = execute_script(session, "return true;", args=[element]) + result = execute_script(session, "return true;", args=[button]) assert_error(result, "no such element") -@pytest.mark.parametrize("as_frame", [False, True], ids=["top_context", "child_context"]) -def test_stale_element_reference_as_argument(session, stale_element, as_frame): - element = stale_element("

    ", "div", as_frame=as_frame) - - result = execute_script(session, "return 1;", args=[element]) - assert_error(result, "stale element reference") - - -@pytest.mark.parametrize("as_frame", [False, True], ids=["top_context", "child_context"]) -def test_stale_element_reference_as_returned_value(session, iframe, inline, as_frame): - if as_frame: - session.url = inline(iframe("
    ")) - frame = session.find.css("iframe", all=False) - session.switch_frame(frame) - else: - session.url = inline("
    ") - - element = session.find.css("div", all=False) - - result = execute_script(session, """ - const elem = arguments[0]; - elem.remove(); - return elem; - """, args=[element]) - assert_error(result, "stale element reference") - - def test_opening_new_window_keeps_current_window_handle(session, inline): original_handle = session.window_handle original_handles = session.handles diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/node.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/node.py index cc430eb19aa..83061222b0f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/node.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/node.py @@ -1,20 +1,25 @@ import pytest -from webdriver.client import Element, Frame, ShadowRoot, Window +from webdriver.client import Element, Frame, ShadowRoot, Window from tests.support.asserts import assert_error, assert_success from . import execute_script -@pytest.mark.parametrize("as_frame", [False, True], ids=["top_context", "child_context"]) -def test_stale_element_reference_as_argument(session, stale_element, as_frame): - element = stale_element("
    ", "div", as_frame=as_frame) - - result = execute_script(session, "return 1;", args=[element]) - assert_error(result, "stale element reference") +PAGE_DATA = """ +


    +

    Lorem
    +
    + +
    + +""" @pytest.mark.parametrize("as_frame", [False, True], ids=["top_context", "child_context"]) -def test_stale_element_reference_as_returned_value(session, iframe, inline, as_frame): +def test_stale_element_reference(session, iframe, inline, as_frame): if as_frame: session.url = inline(iframe("
    ")) frame = session.find.css("iframe", all=False) @@ -32,13 +37,13 @@ def test_stale_element_reference_as_returned_value(session, iframe, inline, as_f assert_error(result, "stale element reference") -@pytest.mark.parametrize("expression, type, name", [ - ("window.frames[0]", Frame, "Frame"), - ("document.getElementById('foo')", Element, "HTMLDivElement"), - ("document.getElementById('checkbox').shadowRoot", ShadowRoot, "ShadowRoot"), - ("window", Window, "Window") +@pytest.mark.parametrize("expression, expected_type", [ + ("window.frames[0]", Frame), + ("document.getElementById('foo')", Element), + ("document.getElementById('checkbox').shadowRoot", ShadowRoot), + ("window", Window), ], ids=["frame", "node", "shadow-root", "window"]) -def test_element_reference(session, iframe, inline, expression, type, name): +def test_element_reference(session, iframe, inline, expression, expected_type): session.url = inline(f"""