diff --git a/tests/wpt/meta-legacy-layout/css/CSS2/ui/outline-color-030.xht.ini b/tests/wpt/meta-legacy-layout/css/CSS2/ui/outline-color-030.xht.ini deleted file mode 100644 index 2bac914b6df..00000000000 --- a/tests/wpt/meta-legacy-layout/css/CSS2/ui/outline-color-030.xht.ini +++ /dev/null @@ -1,3 +0,0 @@ -[outline-color-030.xht] - type: reftest - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-align/blocks/align-content-block-break-content-020.html.ini b/tests/wpt/meta-legacy-layout/css/css-align/blocks/align-content-block-break-content-020.html.ini deleted file mode 100644 index c19c67ff247..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-align/blocks/align-content-block-break-content-020.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[align-content-block-break-content-020.html] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-fonts/idlharness.html.ini b/tests/wpt/meta-legacy-layout/css/css-fonts/idlharness.html.ini index dcd9d3cd966..c85c0317295 100644 --- a/tests/wpt/meta-legacy-layout/css/css-fonts/idlharness.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-fonts/idlharness.html.ini @@ -127,3 +127,6 @@ [CSSFontFeatureValuesMap interface: maplike] expected: FAIL + + [CSSFontFeatureValuesRule interface: attribute historicalForms] + expected: FAIL diff --git a/tests/wpt/meta/css/css-transitions/transition-behaivor.html.ini b/tests/wpt/meta-legacy-layout/css/css-transitions/transition-behavior.html.ini similarity index 95% rename from tests/wpt/meta/css/css-transitions/transition-behaivor.html.ini rename to tests/wpt/meta-legacy-layout/css/css-transitions/transition-behavior.html.ini index be999af2dc0..4bbeadc1c56 100644 --- a/tests/wpt/meta/css/css-transitions/transition-behaivor.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-transitions/transition-behavior.html.ini @@ -1,4 +1,4 @@ -[transition-behaivor.html] +[transition-behavior.html] [transition-behavior:allow-discrete should animate discrete properties.] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-letter-spacing.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-letter-spacing.html.ini new file mode 100644 index 00000000000..bae4e1fb5d2 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-letter-spacing.html.ini @@ -0,0 +1,3 @@ +[calc-letter-spacing.html] + [testing letter-spacing: calc(100%)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html.ini new file mode 100644 index 00000000000..dad7beac230 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html.ini @@ -0,0 +1,336 @@ +[calc-size-height-interpolation.tentative.html] + [CSS Transitions: property from neutral to [calc-size(auto, size * 2)\] at (-0.25) should be [75px\]] + expected: FAIL + + [CSS Transitions: property from neutral to [calc-size(auto, size * 2)\] at (0) should be [100px\]] + expected: FAIL + + [CSS Transitions: property from neutral to [calc-size(auto, size * 2)\] at (0.25) should be [125px\]] + expected: FAIL + + [CSS Transitions: property from neutral to [calc-size(auto, size * 2)\] at (0.5) should be [150px\]] + expected: FAIL + + [CSS Transitions: property from neutral to [calc-size(auto, size * 2)\] at (0.75) should be [175px\]] + expected: FAIL + + [CSS Transitions: property from neutral to [calc-size(auto, size * 2)\] at (1) should be [200px\]] + expected: FAIL + + [CSS Transitions: property from neutral to [calc-size(auto, size * 2)\] at (1.25) should be [225px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from neutral to [calc-size(auto, size * 2)\] at (-0.25) should be [75px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from neutral to [calc-size(auto, size * 2)\] at (0) should be [100px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from neutral to [calc-size(auto, size * 2)\] at (0.25) should be [125px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from neutral to [calc-size(auto, size * 2)\] at (0.5) should be [150px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from neutral to [calc-size(auto, size * 2)\] at (0.75) should be [175px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from neutral to [calc-size(auto, size * 2)\] at (1) should be [200px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from neutral to [calc-size(auto, size * 2)\] at (1.25) should be [225px\]] + expected: FAIL + + [CSS Animations: property from neutral to [calc-size(auto, size * 2)\] at (-0.25) should be [75px\]] + expected: FAIL + + [CSS Animations: property from neutral to [calc-size(auto, size * 2)\] at (0) should be [100px\]] + expected: FAIL + + [CSS Animations: property from neutral to [calc-size(auto, size * 2)\] at (0.25) should be [125px\]] + expected: FAIL + + [CSS Animations: property from neutral to [calc-size(auto, size * 2)\] at (0.5) should be [150px\]] + expected: FAIL + + [CSS Animations: property from neutral to [calc-size(auto, size * 2)\] at (0.75) should be [175px\]] + expected: FAIL + + [CSS Animations: property from neutral to [calc-size(auto, size * 2)\] at (1) should be [200px\]] + expected: FAIL + + [CSS Animations: property from neutral to [calc-size(auto, size * 2)\] at (1.25) should be [225px\]] + expected: FAIL + + [Web Animations: property from neutral to [calc-size(auto, size * 2)\] at (-0.25) should be [75px\]] + expected: FAIL + + [Web Animations: property from neutral to [calc-size(auto, size * 2)\] at (0) should be [100px\]] + expected: FAIL + + [Web Animations: property from neutral to [calc-size(auto, size * 2)\] at (0.25) should be [125px\]] + expected: FAIL + + [Web Animations: property from neutral to [calc-size(auto, size * 2)\] at (0.5) should be [150px\]] + expected: FAIL + + [Web Animations: property from neutral to [calc-size(auto, size * 2)\] at (0.75) should be [175px\]] + expected: FAIL + + [Web Animations: property from neutral to [calc-size(auto, size * 2)\] at (1) should be [200px\]] + expected: FAIL + + [Web Animations: property from neutral to [calc-size(auto, size * 2)\] at (1.25) should be [225px\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0) should be [0\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0) should be [0\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0) should be [0\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0) should be [0\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0 * size)\] to [calc-size(min-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0) should be [0\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [CSS Transitions: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0) should be [0\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0) should be [0\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [CSS Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0) should be [0\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [Web Animations: property from [calc-size(min-content, 0px)\] to [calc-size(min-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [CSS Transitions: property from [0\] to [calc-size(max-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [CSS Transitions: property from [0\] to [calc-size(max-content, size)\] at (0) should be [0\]] + expected: FAIL + + [CSS Transitions: property from [0\] to [calc-size(max-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [CSS Transitions: property from [0\] to [calc-size(max-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [CSS Transitions: property from [0\] to [calc-size(max-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [CSS Transitions: property from [0\] to [calc-size(max-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [CSS Transitions: property from [0\] to [calc-size(max-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [0\] to [calc-size(max-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [0\] to [calc-size(max-content, size)\] at (0) should be [0\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [0\] to [calc-size(max-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [0\] to [calc-size(max-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [0\] to [calc-size(max-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [0\] to [calc-size(max-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [CSS Transitions with transition: all: property from [0\] to [calc-size(max-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [CSS Animations: property from [0\] to [calc-size(max-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [CSS Animations: property from [0\] to [calc-size(max-content, size)\] at (0) should be [0\]] + expected: FAIL + + [CSS Animations: property from [0\] to [calc-size(max-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [CSS Animations: property from [0\] to [calc-size(max-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [CSS Animations: property from [0\] to [calc-size(max-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [CSS Animations: property from [0\] to [calc-size(max-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [CSS Animations: property from [0\] to [calc-size(max-content, size)\] at (1.25) should be [125px\]] + expected: FAIL + + [Web Animations: property from [0\] to [calc-size(max-content, size)\] at (-0.25) should be [0\]] + expected: FAIL + + [Web Animations: property from [0\] to [calc-size(max-content, size)\] at (0) should be [0\]] + expected: FAIL + + [Web Animations: property from [0\] to [calc-size(max-content, size)\] at (0.25) should be [25px\]] + expected: FAIL + + [Web Animations: property from [0\] to [calc-size(max-content, size)\] at (0.5) should be [50px\]] + expected: FAIL + + [Web Animations: property from [0\] to [calc-size(max-content, size)\] at (0.75) should be [75px\]] + expected: FAIL + + [Web Animations: property from [0\] to [calc-size(max-content, size)\] at (1) should be [100px\]] + expected: FAIL + + [Web Animations: property from [0\] to [calc-size(max-content, size)\] at (1.25) should be [125px\]] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-height.tentative.html.ini b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-height.tentative.html.ini new file mode 100644 index 00000000000..ba84cd6c00b --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-values/calc-size/calc-size-height.tentative.html.ini @@ -0,0 +1,81 @@ +[calc-size-height.tentative.html] + [resolved height for height in auto height container: calc-size(any, 357px)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(any, 357px)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(any, 31%)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(any, 31%)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(31%, size)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(max-content, 31%)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(max-content, 31%)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(fit-content, 72px)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(fit-content, 72px)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(37px, 93px)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(37px, 93px)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(83px, size * 3)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(83px, size * 3)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(min-content, size / 2)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(min-content, size / 2)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(max-content, size * 1.2)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(max-content, size * 1.2)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(fit-content, size / 2 + 30px)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(fit-content, size / 2 + 30px)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(30px, 15em)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(30px, 15em)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(calc-size(any, 30px), 15em)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(calc-size(any, 30px), 15em)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(calc-size(2in, 30px), 15em)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(calc-size(2in, 30px), 15em)] + expected: FAIL + + [resolved height for height in auto height container: calc-size(calc-size(min-content, 30px), 15em)] + expected: FAIL + + [resolved height for height in definite height container: calc-size(calc-size(min-content, 30px), 15em)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index d52a3e77a70..314dca9c1f5 100644 --- a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -1,6 +1,3 @@ [MediaQueryList-addListener-removeListener.html] [listeners are called when diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js index 09a73509b8a..e5dbb0f43c8 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/abort-block-bfcache.window.js @@ -1,4 +1,5 @@ // META: title=Aborting a parser should block bfcache +// META: script=./test-helper.js // META: timeout=long @@ -14,8 +15,7 @@ async_test(t => { window.stop(); } else { const nrr = performance.getEntriesByType('navigation')[0].notRestoredReasons; - assert_equals(nrr.reasons[0].reason, "parser-aborted"); - assert_equals(nrr.reasons.length, 1); + assert_true(ReasonsInclude(nrr.reasons, "parser-aborted")); t.done(); } }, "aborting a parser should block bfcache."); diff --git a/tests/wpt/tests/performance-timeline/not-restored-reasons/test-helper.js b/tests/wpt/tests/performance-timeline/not-restored-reasons/test-helper.js index 97695cd0ace..826b0ccb2be 100644 --- a/tests/wpt/tests/performance-timeline/not-restored-reasons/test-helper.js +++ b/tests/wpt/tests/performance-timeline/not-restored-reasons/test-helper.js @@ -34,6 +34,15 @@ function assertReasonsStructEquals( } } +function ReasonsInclude(reasons, targetReason) { + for (const reason of reasons) { + if (reason.reason == targetReason) { + return true; + } + } + return false; +} + // Requires: // - /websockets/constants.sub.js in the test file and pass the domainPort // constant here. diff --git a/tests/wpt/tests/png/errors/support/invalid-unknown-ancillary.png b/tests/wpt/tests/png/errors/support/invalid-unknown-ancillary.png new file mode 100644 index 00000000000..21373a5a5af Binary files /dev/null and b/tests/wpt/tests/png/errors/support/invalid-unknown-ancillary.png differ diff --git a/tests/wpt/tests/png/errors/support/no-invalid-chunks.png b/tests/wpt/tests/png/errors/support/no-invalid-chunks.png new file mode 100644 index 00000000000..6605d479854 Binary files /dev/null and b/tests/wpt/tests/png/errors/support/no-invalid-chunks.png differ diff --git a/tests/wpt/tests/png/errors/unknown-ancillary-error-recovery-ref.html b/tests/wpt/tests/png/errors/unknown-ancillary-error-recovery-ref.html new file mode 100644 index 00000000000..cfa2cbb6f14 --- /dev/null +++ b/tests/wpt/tests/png/errors/unknown-ancillary-error-recovery-ref.html @@ -0,0 +1,17 @@ + + + +PNG Third Edition: Decoder error recovery, invalid ancillary + + + +

Test passes if you see a rainbow square, and not a red one.

+
+ + \ No newline at end of file diff --git a/tests/wpt/tests/png/errors/unknown-ancillary-error-recovery.html b/tests/wpt/tests/png/errors/unknown-ancillary-error-recovery.html new file mode 100644 index 00000000000..df37153fd76 --- /dev/null +++ b/tests/wpt/tests/png/errors/unknown-ancillary-error-recovery.html @@ -0,0 +1,21 @@ + + + +PNG Third Edition: Decoder error recovery, invalid ancillary + + + + + + + +

Test passes if you see a rainbow square, and not a red one.

+
+ + \ No newline at end of file diff --git a/tests/wpt/tests/private-aggregation/protected-audience-auction-report-buyers-debug-mode-surface.https.html b/tests/wpt/tests/private-aggregation/protected-audience-auction-report-buyers-debug-mode-surface.https.html new file mode 100644 index 00000000000..ddc2b6a3723 --- /dev/null +++ b/tests/wpt/tests/private-aggregation/protected-audience-auction-report-buyers-debug-mode-surface.https.html @@ -0,0 +1,158 @@ + + + + + + + + + + diff --git a/tests/wpt/tests/selection/crashtests/selection-modify-line-boundary-around-empty-details.html b/tests/wpt/tests/selection/crashtests/selection-modify-line-boundary-around-empty-details.html new file mode 100644 index 00000000000..815a819c336 --- /dev/null +++ b/tests/wpt/tests/selection/crashtests/selection-modify-line-boundary-around-empty-details.html @@ -0,0 +1,29 @@ + + + + + + + +
a
+ + + diff --git a/tests/wpt/tests/shadow-dom/focus/focus-scroll-under-delegatesFocus.html b/tests/wpt/tests/shadow-dom/focus/focus-scroll-under-delegatesFocus.html new file mode 100644 index 00000000000..ea5fc472b5a --- /dev/null +++ b/tests/wpt/tests/shadow-dom/focus/focus-scroll-under-delegatesFocus.html @@ -0,0 +1,37 @@ + + + + + + + + + +
+ + + anchor +
+

Heading

+
+ + diff --git a/tests/wpt/tests/shared-storage/append-exceed-former-entry-limit.tentative.https.html b/tests/wpt/tests/shared-storage/append-exceed-former-entry-limit.tentative.https.html new file mode 100644 index 00000000000..921b9d45733 --- /dev/null +++ b/tests/wpt/tests/shared-storage/append-exceed-former-entry-limit.tentative.https.html @@ -0,0 +1,52 @@ + + + + + + + + + + + diff --git a/tests/wpt/tests/shared-storage/cross-origin-create-worklet-credentials-include.tentative.https.sub.html b/tests/wpt/tests/shared-storage/cross-origin-create-worklet-credentials-include.tentative.https.sub.html new file mode 100644 index 00000000000..9c44d2a29f8 --- /dev/null +++ b/tests/wpt/tests/shared-storage/cross-origin-create-worklet-credentials-include.tentative.https.sub.html @@ -0,0 +1,39 @@ + + + + + + + + + + diff --git a/tests/wpt/tests/shared-storage/cross-origin-create-worklet-credentials-omit.tentative.https.sub.html b/tests/wpt/tests/shared-storage/cross-origin-create-worklet-credentials-omit.tentative.https.sub.html new file mode 100644 index 00000000000..ddda1809f2c --- /dev/null +++ b/tests/wpt/tests/shared-storage/cross-origin-create-worklet-credentials-omit.tentative.https.sub.html @@ -0,0 +1,38 @@ + + + + + + + + + + diff --git a/tests/wpt/tests/shared-storage/cross-origin-create-worklet-credentials-same-origin.tentative.https.sub.html b/tests/wpt/tests/shared-storage/cross-origin-create-worklet-credentials-same-origin.tentative.https.sub.html new file mode 100644 index 00000000000..99701d2b7d4 --- /dev/null +++ b/tests/wpt/tests/shared-storage/cross-origin-create-worklet-credentials-same-origin.tentative.https.sub.html @@ -0,0 +1,38 @@ + + + + + + + + + + diff --git a/tests/wpt/tests/shared-storage/cross-origin-create-worklet-failure-missing-access-control-allow-credentials.tentative.https.sub.html b/tests/wpt/tests/shared-storage/cross-origin-create-worklet-failure-missing-access-control-allow-credentials.tentative.https.sub.html new file mode 100644 index 00000000000..598fd8f405a --- /dev/null +++ b/tests/wpt/tests/shared-storage/cross-origin-create-worklet-failure-missing-access-control-allow-credentials.tentative.https.sub.html @@ -0,0 +1,29 @@ + + + + + + + + + + diff --git a/tests/wpt/tests/shared-storage/cross-origin-create-worklet-failure-missing-access-control-allow-origin.tentative.https.sub.html b/tests/wpt/tests/shared-storage/cross-origin-create-worklet-failure-missing-access-control-allow-origin.tentative.https.sub.html new file mode 100644 index 00000000000..4195d09fc06 --- /dev/null +++ b/tests/wpt/tests/shared-storage/cross-origin-create-worklet-failure-missing-access-control-allow-origin.tentative.https.sub.html @@ -0,0 +1,28 @@ + + + + + + + + + + diff --git a/tests/wpt/tests/shared-storage/resources/credentials-test-helper.py b/tests/wpt/tests/shared-storage/resources/credentials-test-helper.py index 81a988e3581..46fc0ea6fb2 100644 --- a/tests/wpt/tests/shared-storage/resources/credentials-test-helper.py +++ b/tests/wpt/tests/shared-storage/resources/credentials-test-helper.py @@ -13,6 +13,12 @@ def main(request, response): response.status = 200 response.headers.append(b"Content-Type", b"text/javascript") + if b"access_control_allow_credentials_header" in request.GET: + response.headers.append(b"Access-Control-Allow-Credentials", request.GET[b"access_control_allow_credentials_header"]) + + if b"access_control_allow_origin_header" in request.GET: + response.headers.append(b"Access-Control-Allow-Origin", request.GET[b"access_control_allow_origin_header"]) + if action == b"store-cookie": cookie = request.headers.get(b"Cookie", b"NO_COOKIE_HEADER") request.server.stash.put(token, cookie) diff --git a/tests/wpt/tests/shared-storage/resources/verify-length-module.js b/tests/wpt/tests/shared-storage/resources/verify-length-module.js new file mode 100644 index 00000000000..8ba10fbcb64 --- /dev/null +++ b/tests/wpt/tests/shared-storage/resources/verify-length-module.js @@ -0,0 +1,18 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +class VerifyLength { + async run(urls, data) { + if (data && data.hasOwnProperty('expectedLength')) { + const expectedLength = data['expectedLength']; + const actualLength = await sharedStorage.length(); + if (actualLength === expectedLength) { + return 1; + } + } + return -1; + } +} + +register('verify-length', VerifyLength); diff --git a/tests/wpt/tests/shared-storage/set-exceed-former-entry-limit.tentative.https.html b/tests/wpt/tests/shared-storage/set-exceed-former-entry-limit.tentative.https.html new file mode 100644 index 00000000000..b78abbf1efd --- /dev/null +++ b/tests/wpt/tests/shared-storage/set-exceed-former-entry-limit.tentative.https.html @@ -0,0 +1,52 @@ + + + + + + + + + + + diff --git a/tests/wpt/tests/speculation-rules/prerender/resources/utils.js b/tests/wpt/tests/speculation-rules/prerender/resources/utils.js index 940edcc0ca3..bc1bc5911eb 100644 --- a/tests/wpt/tests/speculation-rules/prerender/resources/utils.js +++ b/tests/wpt/tests/speculation-rules/prerender/resources/utils.js @@ -15,6 +15,7 @@ function startPrerendering(url, rule_extras = {}) { script.text = JSON.stringify( {prerender: [{source: 'list', urls: [url], ...rule_extras}]}); document.head.appendChild(script); + return script; } class PrerenderChannel extends EventTarget { diff --git a/tests/wpt/tests/svg/animations/stop-animation-01.html b/tests/wpt/tests/svg/animations/stop-animation-01.html new file mode 100644 index 00000000000..d240c51142a --- /dev/null +++ b/tests/wpt/tests/svg/animations/stop-animation-01.html @@ -0,0 +1,21 @@ + + +Animate a <stop> element + + + + + + + + + + + + diff --git a/tests/wpt/tests/svg/struct/scripted/svg-checkIntersection-002.svg b/tests/wpt/tests/svg/struct/scripted/svg-checkIntersection-002.svg new file mode 100644 index 00000000000..1ff1f7829f3 --- /dev/null +++ b/tests/wpt/tests/svg/struct/scripted/svg-checkIntersection-002.svg @@ -0,0 +1,40 @@ + + checkIntersection() + + + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/svg/struct/scripted/svg-getIntersectionList-002.svg b/tests/wpt/tests/svg/struct/scripted/svg-getIntersectionList-002.svg index c2c1f8e425a..dd309435690 100644 --- a/tests/wpt/tests/svg/struct/scripted/svg-getIntersectionList-002.svg +++ b/tests/wpt/tests/svg/struct/scripted/svg-getIntersectionList-002.svg @@ -10,7 +10,7 @@ r.x = 0; r.y = 0; r.width = 100; - r.height = 100; + r.height = 99.9; assert_equals(testSVG.getIntersectionList(r, testSVG).length, 1); }); diff --git a/tests/wpt/tests/svg/struct/scripted/svg-getIntersectionList-005.svg b/tests/wpt/tests/svg/struct/scripted/svg-getIntersectionList-005.svg new file mode 100644 index 00000000000..717c15eef52 --- /dev/null +++ b/tests/wpt/tests/svg/struct/scripted/svg-getIntersectionList-005.svg @@ -0,0 +1,22 @@ + + getIntersectionList() on element with intersecting bounding box + + + + + + + + + + diff --git a/tests/wpt/tests/svg/struct/scripted/svg-getIntersectionList-006.svg b/tests/wpt/tests/svg/struct/scripted/svg-getIntersectionList-006.svg new file mode 100644 index 00000000000..a7b94650137 --- /dev/null +++ b/tests/wpt/tests/svg/struct/scripted/svg-getIntersectionList-006.svg @@ -0,0 +1,29 @@ + + getIntersectionList() with <use> + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/tools/ci/requirements_tc.txt b/tests/wpt/tests/tools/ci/requirements_tc.txt index 81516466054..e1ae4dbf70e 100644 --- a/tests/wpt/tests/tools/ci/requirements_tc.txt +++ b/tests/wpt/tests/tools/ci/requirements_tc.txt @@ -1,4 +1,4 @@ pygithub==2.2.0 pyyaml==6.0.1 requests==2.31.0 -taskcluster==60.3.2 +taskcluster==60.4.1 diff --git a/tests/wpt/tests/tools/docker/Dockerfile b/tests/wpt/tests/tools/docker/Dockerfile index e1ff6b90205..a9162559ab8 100644 --- a/tests/wpt/tests/tools/docker/Dockerfile +++ b/tests/wpt/tests/tools/docker/Dockerfile @@ -20,7 +20,6 @@ RUN apt-get -qqy update \ glib-networking-services \ gstreamer1.0-plugins-bad \ gstreamer1.0-gl \ - libegl1-mesa-dev \ libosmesa6-dev \ libproxy1-plugin-webkit \ libvirt-daemon-system \ diff --git a/tests/wpt/tests/tools/requirements_tests.txt b/tests/wpt/tests/tools/requirements_tests.txt index 0604dceb0a0..6455286736d 100644 --- a/tests/wpt/tests/tools/requirements_tests.txt +++ b/tests/wpt/tests/tools/requirements_tests.txt @@ -2,5 +2,5 @@ httpx[http2]==0.24.1 json-e==4.5.3 jsonschema==4.17.3 pyyaml==6.0.1 -taskcluster==60.3.2 +taskcluster==60.4.1 mozterm==1.0.0 diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/network.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/network.py index 8bc51334d2d..4523f67e9c9 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/network.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/network.py @@ -106,7 +106,7 @@ URLPattern = Union[URLPatternPattern, URLPatternString] class Network(BidiModule): @command def add_intercept( - self, phases: List[str], url_patterns: Optional[List[URLPattern]] = None + self, phases: List[str], url_patterns: Optional[List[URLPattern]] = None, contexts: Optional[List[str]] = None ) -> Mapping[str, Any]: params: MutableMapping[str, Any] = { "phases": phases, @@ -115,6 +115,9 @@ class Network(BidiModule): if url_patterns is not None: params["urlPatterns"] = url_patterns + if contexts is not None: + params["contexts"] = contexts + return params @add_intercept.result diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py index 882306ea72b..14e8fa9434c 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py @@ -94,6 +94,20 @@ class Storage(BidiModule): params["partition"] = partition return params + @command + def delete_cookies( + self, + filter: Optional[CookieFilter] = None, + partition: Optional[PartitionDescriptor] = None, + ) -> Mapping[str, Any]: + params: MutableMapping[str, Any] = {} + + if filter is not None: + params["filter"] = filter + if partition is not None: + params["partition"] = partition + return params + @command def set_cookie( self, diff --git a/tests/wpt/tests/tools/wpt/android.py b/tests/wpt/tests/tools/wpt/android.py index 80c30c01039..15a4c413d5b 100644 --- a/tests/wpt/tests/tools/wpt/android.py +++ b/tests/wpt/tests/tools/wpt/android.py @@ -100,6 +100,8 @@ def install_fixed_emulator_version(logger, paths): emulator_path = os.path.join(paths["sdk"], "emulator") latest_emulator_path = os.path.join(paths["sdk"], "emulator_latest") + if os.path.exists(latest_emulator_path): + shutil.rmtree(latest_emulator_path) os.rename(emulator_path, latest_emulator_path) download_and_extract(url, paths["sdk"]) diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py index 3ce3b11d1f2..0e90c8a6e48 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py @@ -1,8 +1,9 @@ # mypy: allow-untyped-defs import os -import subprocess import re +import subprocess +import traceback from mozrunner import FennecEmulatorRunner, get_app_context @@ -349,7 +350,13 @@ class FirefoxAndroidBrowser(Browser): def check_crash(self, process, test): if not os.environ.get("MINIDUMP_STACKWALK", "") and self.stackwalk_binary: os.environ["MINIDUMP_STACKWALK"] = self.stackwalk_binary - return bool(self.runner.check_for_crashes(test_name=test)) + try: + return bool(self.runner.check_for_crashes(test_name=test)) + except Exception: + # We sometimes see failures trying to copy the minidump files + self.logger.warning(f"""Failed to complete crash check, assuming no crash: +{traceback.format_exc()}""") + return False class FirefoxAndroidWdSpecBrowser(FirefoxWdSpecBrowser): diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py index a5bf61d4053..0f640d77415 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py @@ -548,7 +548,9 @@ class MarionetteCoverageProtocolPart(CoverageProtocolPart): return script = """ - const {PerTestCoverageUtils} = ChromeUtils.import("chrome://remote/content/marionette/PerTestCoverageUtils.jsm"); + const {PerTestCoverageUtils} = ChromeUtils.importESModule( + "chrome://remote/content/marionette/PerTestCoverageUtils.sys.mjs" + ); return PerTestCoverageUtils.enabled; """ with self.marionette.using_context(self.marionette.CONTEXT_CHROME): @@ -558,7 +560,9 @@ class MarionetteCoverageProtocolPart(CoverageProtocolPart): script = """ var callback = arguments[arguments.length - 1]; - const {PerTestCoverageUtils} = ChromeUtils.import("chrome://remote/content/marionette/PerTestCoverageUtils.jsm"); + const {PerTestCoverageUtils} = ChromeUtils.importESModule( + "chrome://remote/content/marionette/PerTestCoverageUtils.sys.mjs" + ); PerTestCoverageUtils.beforeTest().then(callback, callback); """ with self.marionette.using_context(self.marionette.CONTEXT_CHROME): @@ -578,7 +582,9 @@ class MarionetteCoverageProtocolPart(CoverageProtocolPart): script = """ var callback = arguments[arguments.length - 1]; - const {PerTestCoverageUtils} = ChromeUtils.import("chrome://remote/content/marionette/PerTestCoverageUtils.jsm"); + const {PerTestCoverageUtils} = ChromeUtils.importESModule( + "chrome://remote/content/marionette/PerTestCoverageUtils.sys.mjs" + ); PerTestCoverageUtils.afterTest().then(callback, callback); """ with self.marionette.using_context(self.marionette.CONTEXT_CHROME): @@ -695,11 +701,9 @@ class MarionetteDebugProtocolPart(DebugProtocolPart): def load_devtools(self): with self.marionette.using_context(self.marionette.CONTEXT_CHROME): - # Once ESR is 107 is released, we can replace the ChromeUtils.import(DevToolsShim.jsm) - # with ChromeUtils.importESModule(DevToolsShim.sys.mjs) in this snippet: self.parent.base.execute_script(""" -const { DevToolsShim } = ChromeUtils.import( - "chrome://devtools-startup/content/DevToolsShim.jsm" +const { DevToolsShim } = ChromeUtils.importESModule( + "chrome://devtools-startup/content/DevToolsShim.sys.mjs" ); const callback = arguments[arguments.length - 1]; diff --git a/tests/wpt/tests/tools/wptserve/wptserve/server.py b/tests/wpt/tests/tools/wptserve/wptserve/server.py index 4167943ef83..8ce36201ee9 100644 --- a/tests/wpt/tests/tools/wptserve/wptserve/server.py +++ b/tests/wpt/tests/tools/wptserve/wptserve/server.py @@ -130,7 +130,9 @@ class RequestRewriter: class WebTestServer(http.server.ThreadingHTTPServer): allow_reuse_address = True - acceptable_errors = (errno.EPIPE, errno.ECONNABORTED) + # Older versions of Python might throw `OSError: [Errno 0] Error` + # instead of `SSLEOFError`. + acceptable_errors = (errno.EPIPE, errno.ECONNABORTED, 0) request_queue_size = 2000 # Ensure that we don't hang on shutdown waiting for requests @@ -237,10 +239,10 @@ class WebTestServer(http.server.ThreadingHTTPServer): error.args[0] in self.acceptable_errors) or (isinstance(error, IOError) and error.errno in self.acceptable_errors) or - # `SSLEOFError` may occur when a client (e.g., wptrunner's - # `TestEnvironment`) tests for connectivity but doesn't perform the - # handshake. - isinstance(error, ssl.SSLEOFError)): + # `SSLEOFError` and `SSLError` may occur when a client + # (e.g., wptrunner's `TestEnvironment`) tests for connectivity + # but doesn't perform the handshake. + isinstance(error, ssl.SSLEOFError) or isinstance(error, ssl.SSLError)): pass # remote hang up before the result is sent else: msg = traceback.format_exc() diff --git a/tests/wpt/tests/touch-events/mouseevents-after-touchend.tentative.html b/tests/wpt/tests/touch-events/mouseevents-after-touchend.tentative.html new file mode 100644 index 00000000000..3032fadf193 --- /dev/null +++ b/tests/wpt/tests/touch-events/mouseevents-after-touchend.tentative.html @@ -0,0 +1,280 @@ + + + + + + +Mouse events for compatibility after a tap + + + + + + + + +
+ diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audiodestinationnode-interface/.gitkeep b/tests/wpt/tests/webaudio/the-audio-api/the-audiodestinationnode-interface/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audiolistener-interface/.gitkeep b/tests/wpt/tests/webaudio/the-audio-api/the-audiolistener-interface/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audioprocessingevent-interface/.gitkeep b/tests/wpt/tests/webaudio/the-audio-api/the-audioprocessingevent-interface/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-unconnected-outputs.https.window.js b/tests/wpt/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-unconnected-outputs.https.window.js new file mode 100644 index 00000000000..16adddd3394 --- /dev/null +++ b/tests/wpt/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-unconnected-outputs.https.window.js @@ -0,0 +1,129 @@ +'use strict'; + +// This value is used to set the values in an AudioParam. +const TestValue = 0.5; + +// Prepare 4 outputs; 2 outputs will be unconnected for testing. +const WorkletNodeOptions = { + processorOptions: {testValue: TestValue}, + numberOfInputs: 0, + numberOfOutputs: 4 +}; + +// The code for the AWP definition in AudioWorkletGlobalScope. +const processorCode = () => { + + // This processor sends the `outputs` array to the main thread at the first + // process call - after filling its 2nd output with the test value. + class OutputTestProcessor extends AudioWorkletProcessor { + + constructor(options) { + super(options); + this.testValue = options.processorOptions.testValue; + } + + process(inputs, outputs) { + // Fill the second output of this process with the `testValue`. + const output = outputs[1]; + for (const channel of output) { + channel.fill(this.testValue); + } + + // Send the outputs array and stop rendering. + this.port.postMessage({outputs}); + return false; + } + } + + registerProcessor('output-test-processor', OutputTestProcessor); + + // This process has an AudioParam and sends the `params` array to the main + // thread at the first process call. + class ParamTestProcessor extends AudioWorkletProcessor { + static get parameterDescriptors() { + return [ + {name: 'testParam', defaultValue: 0.0} + ]; + } + + process(inputs, outputs, params) { + // Send the params array and stop rendering. + this.port.postMessage({paramValues: params.testParam}); + return false; + } + } + + registerProcessor('param-test-processor', ParamTestProcessor); +} + +const initializeAudioContext = async () => { + const context = new AudioContext(); + const moduleString = `(${processorCode.toString()})();`; + const blobUrl = window.URL.createObjectURL( + new Blob([moduleString], {type: 'text/javascript'})); + await context.audioWorklet.addModule(blobUrl); + context.suspend(); + return context; +}; + +// Test if unconnected outputs provides a non-zero length array for channels. +promise_test(async () => { + const context = await initializeAudioContext(); + const outputTester = new AudioWorkletNode( + context, 'output-test-processor', WorkletNodeOptions); + const testGain = new GainNode(context); + + // Connect the 2nd output of the tester to another node. Note that + // `testGain` is not connected to the destination. + outputTester.connect(testGain, 1); + + // Connect the 4th output of the tester to the destination node. + outputTester.connect(context.destination, 3); + + return new Promise(resolve => { + outputTester.port.onmessage = resolve; + context.resume(); + }).then(event => { + // The number of outputs should be 4, as specified above. + const outputs = event.data.outputs; + assert_equals(outputs.length, WorkletNodeOptions.numberOfOutputs); + for (const output of outputs) { + // Each output should have 1 channel of audio data per spec. + assert_equals(output.length, 1); + for (const channel of output) { + // Each channel should have a non-zero length array. + assert_true(channel.length > 0); + } + } + context.close(); + }); +}, 'Test if unconnected outputs provides a non-zero length array for channels'); + +// Test if outputs connected to AudioParam provides a non-zero length array for +// channels. +promise_test(async () => { + const context = await initializeAudioContext(); + const outputTester = new AudioWorkletNode( + context, 'output-test-processor', WorkletNodeOptions); + const paramTester = new AudioWorkletNode( + context, 'param-test-processor'); + + // Connect the 2nd output of the tester to another node's AudioParam. + outputTester.connect(paramTester.parameters.get('testParam'), 1); + + outputTester.connect(context.destination); + + return new Promise(resolve => { + paramTester.port.onmessage = resolve; + context.resume(); + }).then(event => { + // The resulting values from AudioParam should be a non-zero length array + // filled with `TestValue` above. + const actualValues = event.data.paramValues; + const expectedValues = (new Array(actualValues.length)).fill(TestValue); + assert_true(actualValues.length > 0); + assert_array_equals(actualValues, expectedValues); + context.close(); + }); +}, 'Test if outputs connected to AudioParam provides a non-zero length array ' + + 'for channels'); diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper.html b/tests/wpt/tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper.html index 8bfa009b181..5e6ed24e9ea 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper.html +++ b/tests/wpt/tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper.html @@ -8,7 +8,6 @@ - diff --git a/tests/wpt/tests/webrtc/RTCPeerConnection-createDataChannel.html b/tests/wpt/tests/webrtc/RTCPeerConnection-createDataChannel.html index cddbd02c7bf..373630ff772 100644 --- a/tests/wpt/tests/webrtc/RTCPeerConnection-createDataChannel.html +++ b/tests/wpt/tests/webrtc/RTCPeerConnection-createDataChannel.html @@ -707,6 +707,19 @@ for (const options of [{}, {negotiated: true, id: 0}]) { await createDataChannelPair(t, options, pc1); }, `addTrack, then creating ${mode}, should negotiate properly when max-bundle is used`); + promise_test(async t => { + const pc1 = new RTCPeerConnection(); + const pc2 = new RTCPeerConnection(); + const stream = await getNoiseStream({audio: true, video: true}); + stream.getTracks().forEach((track) => pc1.addTrack(track, stream)); + await createDataChannelPair(t, options, pc1, pc2); + + await pc1.setLocalDescription(); + await pc2.setRemoteDescription(pc1.localDescription); + await pc2.setLocalDescription(); + await pc1.setRemoteDescription(pc2.localDescription); + }, `Renegotiation with audio/video and ${mode} should work properly`); + /* This test is disabled until https://github.com/w3c/webrtc-pc/issues/2562 has been resolved; it presupposes that stopping the first transceiver diff --git a/tests/wpt/tests/webrtc/RTCRtpTransceiver-setCodecPreferences.html b/tests/wpt/tests/webrtc/RTCRtpTransceiver-setCodecPreferences.html index 30a0fa69c52..8142132a8c3 100644 --- a/tests/wpt/tests/webrtc/RTCRtpTransceiver-setCodecPreferences.html +++ b/tests/wpt/tests/webrtc/RTCRtpTransceiver-setCodecPreferences.html @@ -34,7 +34,7 @@ const pc = new RTCPeerConnection(); t.add_cleanup(() => pc.close()); const transceiver = pc.addTransceiver('audio'); - const capabilities = RTCRtpSender.getCapabilities('audio'); + const capabilities = RTCRtpReceiver.getCapabilities('audio'); const { codecs } = capabilities; if(codecs.length >= 2) { diff --git a/tests/wpt/tests/webrtc/historical.html b/tests/wpt/tests/webrtc/historical.html index ae7a29dec0c..e30a7bc7d35 100644 --- a/tests/wpt/tests/webrtc/historical.html +++ b/tests/wpt/tests/webrtc/historical.html @@ -2,6 +2,7 @@ Historical WebRTC features +
diff --git a/tests/wpt/tests/websockets/handlers/passive-close-abort_wsh.py b/tests/wpt/tests/websockets/handlers/passive-close-abort_wsh.py new file mode 100644 index 00000000000..ac3f67c8db1 --- /dev/null +++ b/tests/wpt/tests/websockets/handlers/passive-close-abort_wsh.py @@ -0,0 +1,24 @@ +# Copyright (c) 2024 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Wait for a Close frame from the client and then close the connection without +sending a Close frame in return. +""" + +from mod_pywebsocket.handshake import AbortedByUserException + + +def web_socket_do_extra_handshake(request): + pass + + +def web_socket_transfer_data(request): + while True: + if request.ws_stream.receive_message() is None: + return + + +def web_socket_passive_closing_handshake(request): + raise AbortedByUserException('abrupt close') diff --git a/tests/wpt/tests/websockets/handlers/remote-close_wsh.py b/tests/wpt/tests/websockets/handlers/remote-close_wsh.py new file mode 100644 index 00000000000..aadd99ea950 --- /dev/null +++ b/tests/wpt/tests/websockets/handlers/remote-close_wsh.py @@ -0,0 +1,44 @@ +# Copyright (c) 2024 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +""" +Perform a server-initiated close according to the parameters passed in the +query string. Supported parameters: + + * code=INT: The close code to send in the close frame. If omitted the Close + frame will have an empty body. + + * reason=TEXT: The reason to be sent in the close frame. Only sent if `code` is + set. + + * abrupt=1: Close the connection without sending a Close frame. + +Example: /remote-close?code=1000&reason=Done + +""" + +import urllib + +from mod_pywebsocket.handshake import AbortedByUserException + + +def web_socket_do_extra_handshake(request): + pass + + +def web_socket_transfer_data(request): + parts = urllib.parse.urlsplit(request.uri) + parameters = urllib.parse.parse_qs(parts.query) + if 'abrupt' in parameters: + # Send a ping frame to make sure this isn't misinterpreted as a + # handshake failure. + request.ws_stream.send_ping('ping') + # Rudely close the connection. + raise AbortedByUserException('Abort the connection') + code = None + reason = None + if 'code' in parameters: + code = int(parameters['code'][0]) + reason = parameters.get('reason', [''])[0] + request.ws_stream.close_connection(code, reason) diff --git a/tests/wpt/tests/websockets/stream/tentative/close.any.js b/tests/wpt/tests/websockets/stream/tentative/close.any.js index 098caf31c82..ad41dc6e2e9 100644 --- a/tests/wpt/tests/websockets/stream/tentative/close.any.js +++ b/tests/wpt/tests/websockets/stream/tentative/close.any.js @@ -1,6 +1,7 @@ // META: script=../../constants.sub.js // META: script=resources/url-constants.js // META: global=window,worker +// META: variant=?default // META: variant=?wss // META: variant=?wpt_flags=h2 @@ -108,6 +109,15 @@ promise_test(async () => { 'one second should have elapsed'); }, 'writer close() promise should not resolve until handshake completes'); +promise_test(async t => { + const wss = new WebSocketStream(`${BASEURL}/passive-close-abort`); + await wss.opened; + wss.close({closeCode: 4000, reason: 'because'}); + const error = await wss.closed.then(t.unreached_func('closed should reject'), e => e); + assert_equals(error.constructor, WebSocketError, 'error should be WebSocketError'); + assert_equals(error.closeCode, 1006, 'close code should be Abnormal Closure'); +}, 'incomplete closing handshake should be considered unclean close'); + const abortOrCancel = [ { method: 'abort', diff --git a/tests/wpt/tests/websockets/stream/tentative/remote-close.any.js b/tests/wpt/tests/websockets/stream/tentative/remote-close.any.js new file mode 100644 index 00000000000..b7fd321914a --- /dev/null +++ b/tests/wpt/tests/websockets/stream/tentative/remote-close.any.js @@ -0,0 +1,74 @@ +// META: script=../../constants.sub.js +// META: script=resources/url-constants.js +// META: global=window,worker +// META: variant=?default +// META: variant=?wss +// META: variant=?wpt_flags=h2 + +'use strict'; + +promise_test(async t => { + const wss = new WebSocketStream(`${BASEURL}/remote-close?code=1000`); + const { readable, writable } = await wss.opened; + const { closeCode, reason } = await wss.closed; + assert_equals(closeCode, 1000, 'code should be 1000'); + assert_equals(reason, '', 'reason should be empty'); + const { value, done } = await readable.getReader().read(); + assert_true(done, 'readable should be closed'); + await promise_rejects_dom(t, 'InvalidStateError', writable.getWriter().ready, + 'writable should be errored'); +}, 'clean close should be clean'); + +promise_test(async () => { + const wss = new WebSocketStream(`${BASEURL}/remote-close`); + const { closeCode, reason } = await wss.closed; + assert_equals(closeCode, 1005, 'code should be No Status Rcvd'); + assert_equals(reason, '', 'reason should be empty'); +}, 'close frame with no body should result in status code 1005'); + +promise_test(async () => { + const wss = new WebSocketStream(`${BASEURL}/remote-close?code=4000&reason=robot`); + const { closeCode, reason } = await wss.closed; + assert_equals(closeCode, 4000, 'code should be 4000'); + assert_equals(reason, 'robot', 'reason should be set'); +}, 'reason should be passed through'); + +promise_test(async () => { + const wss = new WebSocketStream(`${BASEURL}/remote-close?code=4000&` + + 'reason=%E3%83%AD%E3%83%9C%E3%83%83%E3%83%88'); + const { reason } = await wss.closed; + assert_equals(reason, 'ロボット', 'reason should be set'); +}, 'UTF-8 reason should work'); + +promise_test(async t => { + const wss = new WebSocketStream(`${BASEURL}/remote-close?code=4567`); + const { writable } = await wss.opened; + const veryLargeMessage = new Uint8Array(20 * 1024 * 1024); // 20MB. + const writePromise = writable.getWriter().write(veryLargeMessage); + const closedError = await wss.closed.then(t.unreached_func('closed should reject'), e => e); + assert_equals(closedError.constructor, WebSocketError, 'error should be WebSocketError'); + assert_equals(closedError.closeCode, 4567, 'closeCode should be set'); + promise_rejects_js(t, WebSocketError, writePromise, 'write() should reject'); +}, 'close with unwritten data should not be considered clean'); + +promise_test(async t => { + const wss = new WebSocketStream(`${BASEURL}/remote-close?code=4222&reason=remote`); + await wss.opened; + wss.close({closeCode: 4111, reason: 'local'}); + const { closeCode, reason } = await wss.closed; + assert_equals(closeCode, 4222, 'remote code should be used'); + assert_equals(reason, 'remote', 'remote reason should be used'); +}, 'remote code and reason should be used'); + +promise_test(async t => { + const wss = new WebSocketStream(`${BASEURL}/remote-close?abrupt=1`); + const { readable, writable } = await wss.opened; + const closedError = await wss.closed.then(t.unreached_func('closed should reject'), e => e); + assert_equals(closedError.constructor, WebSocketError, 'error should be a WebSocketError'); + assert_equals(closedError.name, 'WebSocketError', 'error name should be WebSocketError'); + assert_equals(closedError.closeCode, 1006, 'code should be Abnormal Closure'); + await promise_rejects_exactly(t, closedError, readable.getReader().read(), + 'readable should be errored with the same object'); + await promise_rejects_exactly(t, closedError, writable.getWriter().ready, + 'writable should be errored with the same object'); +}, 'abrupt close should give an error');