diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini deleted file mode 100644 index f29da48a2a0..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-003.html] - [Miss float below something else] - 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 f8e7e539aae..4a1e8110f6f 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 @@ -2,6 +2,3 @@ [Hit test intersecting scaled box] expected: FAIL - [Hit test within unscaled box] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/css-ui/parsing/outline-offset-computed.html.ini b/tests/wpt/metadata-layout-2020/css/css-ui/parsing/outline-offset-computed.html.ini index 8cefcef6475..d4b87e29f2c 100644 --- a/tests/wpt/metadata-layout-2020/css/css-ui/parsing/outline-offset-computed.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-ui/parsing/outline-offset-computed.html.ini @@ -1,4 +1,7 @@ [outline-offset-computed.html] + [Property outline-offset value '2.5px'] + expected: FAIL + [Property outline-offset value '0.5em'] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini new file mode 100644 index 00000000000..e38782d8c85 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini @@ -0,0 +1,4 @@ +[elementFromPoint-001.html] + [CSSOM View - 5 - extensions to the Document interface] + 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 23c61ede1a1..c131078eace 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 @@ -17,6 +17,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/elementsFromPoint-invalid-cases.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini new file mode 100644 index 00000000000..e181af5397f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementsFromPoint-invalid-cases.html.ini @@ -0,0 +1,4 @@ +[elementsFromPoint-invalid-cases.html] + [The root element is the last element returned for otherwise empty queries within the viewport] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index b46b01e499c..a08d89ae8c0 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -315,18 +315,9 @@ [ -

- Note: This is a manual test because it writes/reads to the shared system - clipboard and thus cannot be run async with other tests that might interact - with the clipboard. -

diff --git a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-on-detaching-iframe-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-on-detaching-iframe.https.html similarity index 77% rename from tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-on-detaching-iframe-manual.https.html rename to tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-on-detaching-iframe.https.html index 4a3dbd7dc32..0ed1098bcad 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-on-detaching-iframe-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-on-detaching-iframe.https.html @@ -4,6 +4,8 @@ + + -

- Note: This is a manual test because it writes/reads to the shared system - clipboard and thus cannot be run async with other tests that might interact - with the clipboard. -

diff --git a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-read-on-detached-iframe-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-read-on-detached-iframe.https.html similarity index 74% rename from tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-read-on-detached-iframe-manual.https.html rename to tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-read-on-detached-iframe.https.html index af12ff8d880..1859c4bd11b 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-read-on-detached-iframe-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-read-on-detached-iframe.https.html @@ -4,6 +4,8 @@ + + -

- Note: This is a manual test because it writes/reads to the shared system - clipboard and thus cannot be run async with other tests that might interact - with the clipboard. -

diff --git a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/writeText-readText-on-detached-iframe-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/writeText-readText-on-detached-iframe.https.html similarity index 68% rename from tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/writeText-readText-on-detached-iframe-manual.https.html rename to tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/writeText-readText-on-detached-iframe.https.html index c2d8be1ace2..40854ccc7a3 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/writeText-readText-on-detached-iframe-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/writeText-readText-on-detached-iframe.https.html @@ -4,11 +4,16 @@ + + -

- Note: This is a manual test because it writes/reads to the shared system - clipboard and thus cannot be run async with other tests that might interact - with the clipboard. -

diff --git a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-read-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-read.https.html similarity index 84% rename from tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-read-manual.https.html rename to tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-read.https.html index 14488b1e716..1d170f2fa4a 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-read-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-read.https.html @@ -7,9 +7,14 @@ + + -

- Note: This is a manual test because it writes/reads to the shared system - clipboard and thus cannot be run async with other tests that might interact - with the clipboard. -

diff --git a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-readText-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-readText.https.html similarity index 78% rename from tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-readText-manual.https.html rename to tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-readText.https.html index c76df06a8b0..3fe05a53742 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-readText-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-readText.https.html @@ -6,9 +6,14 @@ + + -

- Note: This is a manual test because it writes/reads to the shared system - clipboard and thus cannot be run async with other tests that might interact - with the clipboard. -

diff --git a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-read-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-read.https.html similarity index 82% rename from tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-read-manual.https.html rename to tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-read.https.html index e74726ec5e7..6745d7cdb67 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-read-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-read.https.html @@ -6,9 +6,14 @@ + + -

- Note: This is a manual test because it writes/reads to the shared system - clipboard and thus cannot be run async with other tests that might interact - with the clipboard. -

diff --git a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-readText-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-readText.https.html similarity index 74% rename from tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-readText-manual.https.html rename to tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-readText.https.html index d2c43f0b6f2..f9fbdff879c 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-readText-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-readText.https.html @@ -4,9 +4,14 @@ + + -

- Note: This is a manual test because it writes/reads to the shared system - clipboard and thus cannot be run async with other tests that might interact - with the clipboard. -

diff --git a/tests/wpt/web-platform-tests/compression/compression-including-empty-chunk.tentative.any.js b/tests/wpt/web-platform-tests/compression/compression-including-empty-chunk.tentative.any.js index 61fe76959c9..916118ea893 100644 --- a/tests/wpt/web-platform-tests/compression/compression-including-empty-chunk.tentative.any.js +++ b/tests/wpt/web-platform-tests/compression/compression-including-empty-chunk.tentative.any.js @@ -1,5 +1,5 @@ // META: global=window,worker -// META: script=pako/pako_inflate.min.js +// META: script=third_party/pako/pako_inflate.min.js // META: timeout=long 'use strict'; diff --git a/tests/wpt/web-platform-tests/compression/compression-multiple-chunks.tentative.any.js b/tests/wpt/web-platform-tests/compression/compression-multiple-chunks.tentative.any.js index eeb83869512..db1ab92a2b4 100644 --- a/tests/wpt/web-platform-tests/compression/compression-multiple-chunks.tentative.any.js +++ b/tests/wpt/web-platform-tests/compression/compression-multiple-chunks.tentative.any.js @@ -1,5 +1,5 @@ // META: global=window,worker -// META: script=pako/pako_inflate.min.js +// META: script=third_party/pako/pako_inflate.min.js // META: timeout=long 'use strict'; diff --git a/tests/wpt/web-platform-tests/compression/compression-stream.tentative.any.js b/tests/wpt/web-platform-tests/compression/compression-stream.tentative.any.js index c63e377abbf..8c02a6d699a 100644 --- a/tests/wpt/web-platform-tests/compression/compression-stream.tentative.any.js +++ b/tests/wpt/web-platform-tests/compression/compression-stream.tentative.any.js @@ -1,5 +1,5 @@ // META: global=window,worker -// META: script=pako/pako_inflate.min.js +// META: script=third_party/pako/pako_inflate.min.js // META: timeout=long 'use strict'; diff --git a/tests/wpt/web-platform-tests/compression/pako/LICENSE b/tests/wpt/web-platform-tests/compression/third_party/pako/LICENSE similarity index 100% rename from tests/wpt/web-platform-tests/compression/pako/LICENSE rename to tests/wpt/web-platform-tests/compression/third_party/pako/LICENSE diff --git a/tests/wpt/web-platform-tests/compression/pako/README b/tests/wpt/web-platform-tests/compression/third_party/pako/README similarity index 100% rename from tests/wpt/web-platform-tests/compression/pako/README rename to tests/wpt/web-platform-tests/compression/third_party/pako/README diff --git a/tests/wpt/web-platform-tests/compression/pako/pako_inflate.min.js b/tests/wpt/web-platform-tests/compression/third_party/pako/pako_inflate.min.js similarity index 100% rename from tests/wpt/web-platform-tests/compression/pako/pako_inflate.min.js rename to tests/wpt/web-platform-tests/compression/third_party/pako/pako_inflate.min.js diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/line-pushed-by-floats-crash.html b/tests/wpt/web-platform-tests/css/CSS2/floats/line-pushed-by-floats-crash.html new file mode 100644 index 00000000000..ace28cc71c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/floats/line-pushed-by-floats-crash.html @@ -0,0 +1,10 @@ + + + +
+ +
+
+ + + diff --git a/tests/wpt/web-platform-tests/css/WOFF2/support/available-002a.xht b/tests/wpt/web-platform-tests/css/WOFF2/support/available-002a.xht index ff9f51083ff..e66aa54160f 100644 --- a/tests/wpt/web-platform-tests/css/WOFF2/support/available-002a.xht +++ b/tests/wpt/web-platform-tests/css/WOFF2/support/available-002a.xht @@ -13,7 +13,7 @@ @import url("test-fonts.css"); @font-face { font-family: "WOFF Test"; - src: url("support/available-002.woff2#1") format("woff2"); + src: url("available-002.woff2#1") format("woff2"); } body { font-size: 20px; diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html new file mode 100644 index 00000000000..146956c2959 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html @@ -0,0 +1,87 @@ + + +CSS Grid Layout Test: minimum contribution with percentages + + + + +
+
+
+
+
+
+ + + diff --git a/tests/wpt/web-platform-tests/css/css-ruby/parsing/ruby-merge-invalid.html b/tests/wpt/web-platform-tests/css/css-ruby/parsing/ruby-merge-invalid.html new file mode 100644 index 00000000000..b618bcb5da2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-ruby/parsing/ruby-merge-invalid.html @@ -0,0 +1,23 @@ + + + + +CSS Ruby Layout: parsing ruby-merge with invalid values + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-ruby/parsing/ruby-merge-valid.html b/tests/wpt/web-platform-tests/css/css-ruby/parsing/ruby-merge-valid.html new file mode 100644 index 00000000000..5694e87dff3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-ruby/parsing/ruby-merge-valid.html @@ -0,0 +1,19 @@ + + + + +CSS Ruby Layout: parsing ruby-merge with valid values + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-scroll-anchoring/focus-prioritized.html b/tests/wpt/web-platform-tests/css/css-scroll-anchoring/focus-prioritized.html new file mode 100644 index 00000000000..36e3c7644a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-anchoring/focus-prioritized.html @@ -0,0 +1,46 @@ + + +CSS Scroll Anchoring: prioritize focused element + + + + + + + + + +
+
+
+
+
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html index 3ba35217ce1..39da9f73492 100644 --- a/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html +++ b/tests/wpt/web-platform-tests/css/css-ui/parsing/outline-offset-computed.html @@ -17,6 +17,7 @@
Click me
- + + + + + +
Click me
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/contextmenu.html b/tests/wpt/web-platform-tests/event-timing/contextmenu.html new file mode 100644 index 00000000000..9aa05a3b163 --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/contextmenu.html @@ -0,0 +1,21 @@ + + + +Event Timing contextmenu. + + + + + + +
Menu + + + +
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/dblclick.html b/tests/wpt/web-platform-tests/event-timing/dblclick.html new file mode 100644 index 00000000000..d33fcfd30de --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/dblclick.html @@ -0,0 +1,18 @@ + + + +Event Timing dblclick. + + + + + + +
Outside target!
+
Click me
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/mousedown.html b/tests/wpt/web-platform-tests/event-timing/mousedown.html new file mode 100644 index 00000000000..e0f14f4c67d --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/mousedown.html @@ -0,0 +1,17 @@ + + + +Event Timing mousedown. + + + + + + +
Click me
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/mouseenter.html b/tests/wpt/web-platform-tests/event-timing/mouseenter.html new file mode 100644 index 00000000000..804d5743742 --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/mouseenter.html @@ -0,0 +1,18 @@ + + + +Event Timing mouseenter. + + + + + + +
Outside target!
+
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/mouseleave.html b/tests/wpt/web-platform-tests/event-timing/mouseleave.html new file mode 100644 index 00000000000..202cf73e2a6 --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/mouseleave.html @@ -0,0 +1,18 @@ + + + +Event Timing mouseleave. + + + + + + +
Outside target!
+
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/mouseout.html b/tests/wpt/web-platform-tests/event-timing/mouseout.html new file mode 100644 index 00000000000..dd321934b0b --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/mouseout.html @@ -0,0 +1,18 @@ + + + +Event Timing mouseout. + + + + + + +
Outside target!
+
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/mouseover.html b/tests/wpt/web-platform-tests/event-timing/mouseover.html new file mode 100644 index 00000000000..741ee2d7ecd --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/mouseover.html @@ -0,0 +1,18 @@ + + + +Event Timing mouseover. + + + + + + +
Outside target!
+
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/mouseup.html b/tests/wpt/web-platform-tests/event-timing/mouseup.html new file mode 100644 index 00000000000..653bef8fdb2 --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/mouseup.html @@ -0,0 +1,17 @@ + + + +Event Timing mouseup. + + + + + + +
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/pointerdown.html b/tests/wpt/web-platform-tests/event-timing/pointerdown.html new file mode 100644 index 00000000000..3d7dcbe8cac --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/pointerdown.html @@ -0,0 +1,17 @@ + + + +Event Timing pointerdown. + + + + + + +
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/pointerenter.html b/tests/wpt/web-platform-tests/event-timing/pointerenter.html new file mode 100644 index 00000000000..bae1c51d51c --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/pointerenter.html @@ -0,0 +1,18 @@ + + + +Event Timing pointerenter. + + + + + + +
Outside target!
+
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/pointerleave.html b/tests/wpt/web-platform-tests/event-timing/pointerleave.html new file mode 100644 index 00000000000..81e8f15ec0d --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/pointerleave.html @@ -0,0 +1,18 @@ + + + +Event Timing pointerleave. + + + + + + +
Outside target!
+
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/pointerout.html b/tests/wpt/web-platform-tests/event-timing/pointerout.html new file mode 100644 index 00000000000..b08f57699cc --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/pointerout.html @@ -0,0 +1,18 @@ + + + +Event Timing pointerout. + + + + + + +
Outside target!
+
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/pointerover.html b/tests/wpt/web-platform-tests/event-timing/pointerover.html new file mode 100644 index 00000000000..0e1712239c0 --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/pointerover.html @@ -0,0 +1,18 @@ + + + +Event Timing pointerover. + + + + + + +
Outside target!
+
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/pointerup.html b/tests/wpt/web-platform-tests/event-timing/pointerup.html new file mode 100644 index 00000000000..4324a5beb7a --- /dev/null +++ b/tests/wpt/web-platform-tests/event-timing/pointerup.html @@ -0,0 +1,17 @@ + + + +Event Timing pointerup. + + + + + + +
Target
+ + diff --git a/tests/wpt/web-platform-tests/event-timing/resources/event-timing-test-utils.js b/tests/wpt/web-platform-tests/event-timing/resources/event-timing-test-utils.js index 9f4a81714f7..e2a69b5c5b4 100644 --- a/tests/wpt/web-platform-tests/event-timing/resources/event-timing-test-utils.js +++ b/tests/wpt/web-platform-tests/event-timing/resources/event-timing-test-utils.js @@ -22,8 +22,8 @@ function mainThreadBusy(duration) { // to check that the event also happens to correspond to the first event. In this case, the // timings of the 'first-input' entry should be equal to those of this entry. |minDuration| // is used to compared against entry.duration. -function verifyEvent(entry, eventType, targetId, isFirst=false, minDuration=104) { - assert_true(entry.cancelable); +function verifyEvent(entry, eventType, targetId, isFirst=false, minDuration=104, notCancelable=false) { + assert_equals(entry.cancelable, !notCancelable, 'cancelable property'); assert_equals(entry.name, eventType); assert_equals(entry.entryType, 'event'); assert_greater_than_equal(entry.duration, minDuration, @@ -122,51 +122,119 @@ async function testDuration(t, id, numEntries, dur, fastDur, slowDur) { return Promise.all([observerPromise, clicksPromise]); } -function applyAction(actions, eventType, target) { +// Apply events that trigger an event of the given |eventType| to be dispatched to the |target|. Some +// of these assume that the target is not on the top left corner of the screen, which means that +// (0, 0) of the viewport is outside of the |target|. +function applyAction(eventType, target) { + const actions = new test_driver.Actions(); if (eventType === 'auxclick') { actions.pointerMove(0, 0, {origin: target}) .pointerDown({button: actions.ButtonType.MIDDLE}) .pointerUp({button: actions.ButtonType.MIDDLE}); + } else if (eventType === 'click' || eventType === 'mousedown' || eventType === 'mouseup' + || eventType === 'pointerdown' || eventType === 'pointerup' + || eventType === 'touchstart' || eventType === 'touchend') { + actions.pointerMove(0, 0, {origin: target}) + .pointerDown() + .pointerUp(); + } else if (eventType === 'contextmenu') { + actions.pointerMove(0, 0, {origin: target}) + .pointerDown({button: actions.ButtonType.RIGHT}) + .pointerUp({button: actions.ButtonType.RIGHT}); + } else if (eventType === 'dblclick') { + actions.pointerMove(0, 0, {origin: target}) + .pointerDown() + .pointerUp() + .pointerDown() + .pointerUp() + // Reset by clicking outside of the target. + .pointerMove(0, 0) + .pointerDown() + .pointerUp(); + } else if (eventType === 'mouseenter' || eventType === 'mouseover' + || eventType === 'pointerenter' || eventType === 'pointerover') { + // Move outside of the target and then back inside. + actions.pointerMove(0, 0) + .pointerMove(0, 0, {origin: target}); + } else if (eventType === 'mouseleave' || eventType === 'mouseout' + || eventType === 'pointerleave' || eventType === 'pointerout') { + actions.pointerMove(0, 0, {origin: target}) + .pointerMove(0, 0); } else { assert_unreached('The event type ' + eventType + ' is not supported.'); } + return actions.send(); +} + +function requiresListener(eventType) { + return ['mouseenter', 'mouseleave', 'pointerdown', 'pointerenter', 'pointerleave', 'pointerout', 'pointerover', 'pointerup'].includes(eventType); +} + +function notCancelable(eventType) { + return ['mouseenter', 'mouseleave', 'pointerenter', 'pointerleave'].includes(eventType); } // Tests the given |eventType| by creating events whose target are the element with id 'target'. -// The test assumes that such element already exists. -async function testEventType(t, eventType) { +// The test assumes that such element already exists. |looseCount| is set for events for which +// events would occur for other elements besides the target, so the counts will be larger. +async function testEventType(t, eventType, looseCount=false) { assert_implements(window.EventCounts, "Event Counts isn't supported"); assert_equals(performance.eventCounts.get(eventType), 0); const target = document.getElementById('target'); - const actions = new test_driver.Actions(); + if (requiresListener(eventType)) { + target.addEventListener(eventType, () =>{}); + } + assert_equals(performance.eventCounts.get(eventType), 0, 'No events yet.'); // Trigger two 'fast' events of the type. - applyAction(actions, eventType, target); - applyAction(actions, eventType, target); - await actions.send(); - assert_equals(performance.eventCounts.get('auxclick'), 2); + await applyAction(eventType, target); + await applyAction(eventType, target); + if (looseCount) { + assert_greater_than_equal(performance.eventCounts.get(eventType), 2, + `Should have at least 2 ${eventType} events`) + } else { + assert_equals(performance.eventCounts.get(eventType), 2, `Should have 2 ${eventType} events`); + } // The durationThreshold used by the observer. A slow events needs to be slower than that. const durationThreshold = 16; // Now add an event handler to cause a slow event. target.addEventListener(eventType, () => { mainThreadBusy(durationThreshold + 4); }); - return new Promise(async resolve => { + const observerPromise = new Promise(async resolve => { new PerformanceObserver(t.step_func(entryList => { let eventTypeEntries = entryList.getEntriesByName(eventType); if (eventTypeEntries.length === 0) return; - assert_equals(eventTypeEntries.length, 1); - verifyEvent(eventTypeEntries[0], + let entry = null; + if (!looseCount) { + entry = eventTypeEntries[0]; + assert_equals(eventTypeEntries.length, 1); + } else { + // The other events could also be considered slow. Find the one with the correct target. + eventTypeEntries.forEach(e => { + if (e.target === document.getElementById('target')) + entry = e; + }); + if (!entry) + return; + } + verifyEvent(entry, eventType, 'target', false /* isFirst */, - durationThreshold); - assert_equals(performance.eventCounts.get(eventType), 3); + durationThreshold, + notCancelable(eventType)); + if (looseCount) { + assert_greater_than_equal(performance.eventCounts.get(eventType), 3, + `Should have at least 3 ${eventType} events`) + } else { + assert_equals(performance.eventCounts.get(eventType), 3, `Should have 3 ${eventType} events`); + } resolve(); })).observe({type: 'event', durationThreshold: durationThreshold}); - // Cause a slow event. - applyAction(actions, eventType, target); - actions.send(); }); + // Cause a slow event. + let actionPromise = applyAction(eventType, target); + return Promise.all([actionPromise, observerPromise]); } \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html index 633f7e4f7e3..e84fce715f1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html @@ -10,7 +10,7 @@ function makeBlob() { return new Promise(function(resolve, reject) { var xhr = new XMLHttpRequest(); - xhr.open("GET", '/css/css-images/image-orientation/support/exif-orientation-3-lr.jpg'); + xhr.open("GET", '/css/css-images/image-orientation/support/exif-orientation-8-llo.jpg'); xhr.responseType = 'blob'; xhr.send(); xhr.onload = function() { @@ -22,7 +22,7 @@ window.onload = function() { var cfb = document.getElementById("canvasWithFileBitmap"); makeBlob().then(function(blob){createImageBitmap(blob).then(bitmap => { - cfb.getContext("2d").drawImage(bitmap, 0, 0); + cfb.getContext("2d").drawImage(bitmap, 0, 0, 150, 150 * bitmap.height / bitmap.width); window.requestAnimationFrame(() => { document.documentElement.removeAttribute("class"); }); @@ -32,6 +32,6 @@ - + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html index 260f96e5cac..47d1f8b431b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html @@ -19,7 +19,7 @@ - + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/reference/drawImage-from-blob-ref.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/reference/drawImage-from-blob-ref.html index d1d3554c70a..2bd60378354 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/reference/drawImage-from-blob-ref.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/reference/drawImage-from-blob-ref.html @@ -5,6 +5,6 @@ createImageBitmap and drawImage from a blob with image orientation: from-image, reference - + diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/reference/drawImage-with-src-rect-ref.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/reference/drawImage-with-src-rect-ref.html index d59dd2d9fd7..19ffcc39c96 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/reference/drawImage-with-src-rect-ref.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/reference/drawImage-with-src-rect-ref.html @@ -16,7 +16,7 @@ - + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/templates.yaml index be8039b03f9..6b02200362e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/templates.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates.yaml @@ -1,87 +1,6 @@ # Copyright (c) 2010 Philip Taylor # Released under the BSD license and W3C Test Suite License: see LICENSE.txt -framed: | - - Canvas test: %(name)s - - - %(fonts)s -

- %(name_wrapped)s -

-

[show output] - %(fonthack)s

Actual output:

- %(fallback)s - %(expected)s - - - %(images)s - -standalone: | - - Canvas test: %(name)s - - - - - %(fonts)s -

- < - [index] - > -

%(backrefs)s

-

%(desc)s

-
References: - -
- %(notes)s - %(fonthack)s

Actual output:

- %(fallback)s - %(expected)s - - - %(images)s - -minimal: | - - - Canvas test: %(name)s - - - - - %(fonts)s -

Pass

-

Fail

- - %(fonthack)s

These images should be identical:

- %(fallback)s - %(expected)s - - - %(images)s - w3c: | @@ -109,270 +28,3 @@ w3c: | }); %(scripts)s%(images)s - -mochitest: | - - %(mochi_name_fn)s - %(mochi_desc)s - - - %(fonts)s - -

Canvas test: %(mochi_name)s

- %(mochi_desc)s%(fonthack)s%(fallback)s - - %(mochi_images)s - -mochitest.isPixel: | - function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) { - var pixel = ctx.getImageData(x, y, 1, 1); - var pr = pixel.data[0], - pg = pixel.data[1], - pb = pixel.data[2], - pa = pixel.data[3]; - ok(r-d <= pr && pr <= r+d && - g-d <= pg && pg <= g+d && - b-d <= pb && pb <= b+d && - a-d <= pa && pa <= a+d, - "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d); - } - -mochitest.todo_isPixel: | - function todo_isPixel(ctx, x,y, r,g,b,a, pos, colour, d) { - var pixel = ctx.getImageData(x, y, 1, 1); - var pr = pixel.data[0], - pg = pixel.data[1], - pb = pixel.data[2], - pa = pixel.data[3]; - todo(r-d <= pr && pr <= r+d && - g-d <= pg && pg <= g+d && - b-d <= pb && pb <= b+d && - a-d <= pa && pa <= a+d, - "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d); - } - -mochitest.deferTest: | - function deferTest() { - _deferred = true; - } - -mochitest.wrapFunction: | - function wrapFunction(f) { - return function () { - f.apply(null, arguments); - SimpleTest.finish(); - } - } - -mochitest.exception: | - var _thrown_outer = false; - try { - - %s - } catch (e) { - _thrown_outer = true; - } - todo(!_thrown_outer, 'should not throw exception'); - -mochitest.Makefile: | - # - # ***** BEGIN LICENSE BLOCK ***** - # Version: MPL 1.1/GPL 2.0/LGPL 2.1 - # - # The contents of this file are subject to the Mozilla Public License Version - # 1.1 (the "License"); you may not use this file except in compliance with - # the License. You may obtain a copy of the License at - # http://www.mozilla.org/MPL/ - # - # Software distributed under the License is distributed on an "AS IS" basis, - # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - # for the specific language governing rights and limitations under the - # License. - # - # The Original Code is mozilla.org code. - # - # The Initial Developer of the Original Code is - # Mozilla Corporation. - # Portions created by the Initial Developer are Copyright (C) 2007 - # the Initial Developer. All Rights Reserved. - # - # Contributor(s): - # Philip Taylor - # - # Alternatively, the contents of this file may be used under the terms of - # either of the GNU General Public License Version 2 or later (the "GPL"), - # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - # in which case the provisions of the GPL or the LGPL are applicable instead - # of those above. If you wish to allow use of your version of this file only - # under the terms of either the GPL or the LGPL, and not to allow others to - # use your version of this file under the terms of the MPL, indicate your - # decision by deleting the provisions above and replace them with the notice - # and other provisions required by the GPL or the LGPL. If you do not delete - # the provisions above, a recipient may use your version of this file under - # the terms of any one of the MPL, the GPL or the LGPL. - # - # ***** END LICENSE BLOCK ***** - - DEPTH = ../../.. - topsrcdir = @top_srcdir@ - srcdir = @srcdir@ - VPATH = @srcdir@ - relativesrcdir = content/canvas/test - - include $(DEPTH)/config/autoconf.mk - include $(topsrcdir)/config/rules.mk - - -index.frame: | - - Canvas tests - %(category)s.* - -

[index] -

%(backrefs)s.*

-

- -# FF trunk doesn't do onload in object, so use iframe instead -#index.frame.item: |- -# (object fallback) -index.frame.item: |- - - -index.w3c.frame: | - - Canvas tests - %(category)s.* - -

[index] -

%(backrefs)s.*

-

- -index.w3c.frame.item: |- - - -index: | - - Canvas tests - index - - - -

<canvas> tests

- -

Developed by Philip Taylor. - Last updated %(updated)s. - -

Based on the HTML - Draft Standard — 22 February 2010. See also the annotated specification. - -

See test results for some browsers. - (Generated semi-automatically via the report generator.) - -

You may want to download the source - code/data (e.g. to create an offline copy of the tests). - -

Test cases

- -

For each test, a green background indicates success, red indicates - failure, blue indicates a need to manually confirm the output is as - expected. - -

The versions in the report generator are the most visually minimalist. - The category links below show the actual and expected renderings, and any - error messages. The individual test pages have links to relevant parts of - the specification and extra notes. - -

There may be many inaccuracies: tests that do not notice when part of - the output is incorrect; tests that are too intolerant of acceptable - renderings differences, or make other unreasonable assumptions; tests that - were written for an outdated version of the specification, and tests that - are just wrong. Also a number of features are not tested, most notably text - rendering. Please contact me (email, IRC, etc) if you find any - problems. - -index.w3c: | - - Canvas tests - index - - -

<canvas> tests

- -index.category.item: | -
  • %s.*

    %d test%s expand

    - -index.w3c.category.item: | -
  • %s.*

    %d test%s

    - -reportgen: | - - Canvas tests - report generator - - -

    This is mainly for my own use, so it is not designed to be user-friendly. - If anyone else wants to use it for some reason, just wait - until "tests not yet loaded" and "tests not yet completed" get down to zero, then click the - pass/fail button for any test it shows where it cannot work out the answer (or use the - y/n keys to choose for the magenta-highlighted case), then use the - buttons at the bottom to collect all the results. -

    -

    -

    -

    - - - -


    -

    -

    -


    - - -
    Test name - Test case - Pass? - Fail? - Notes - -
    -
    -
    -
    -
    -
    - (Submissions will tend to be ignored unless there - is a good reason why they won't be, so don't use this form unless there is such a reason.) -
    - -results: | - - Canvas tests - results - - - - -
    Test diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/coep-frame-javascript.https.html b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/coep-frame-javascript.https.html index d3e090bd7f7..089019dc2e2 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/coep-frame-javascript.https.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/coep-frame-javascript.https.html @@ -18,7 +18,7 @@ async_test(t => { frame.src = "resources/coep-frame.html"; frame.onload = t.step_func(() => { frame.onload = null; - frame.src = `javascript:'${createScript(window.origin, get_host_info().HTTPS_NOTSAMESITE_ORIGIN)}'`; + frame.src = `javascript:${encodeURIComponent(createScript(window.origin, get_host_info().HTTPS_NOTSAMESITE_ORIGIN))}`; }); document.body.append(frame); }, "Cross-Origin-Embedder-Policy frame and javascript: URLs"); diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/data.https.html b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/data.https.html index c34f1336c8b..13c0cce1858 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/data.https.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/data.https.html @@ -14,7 +14,7 @@ async_test(t => { })); const frame = document.createElement("iframe"); t.add_cleanup(() => frame.remove()); - frame.src = `data:text/html,${createScript("null", window.origin)}`; + frame.src = `data:text/html, diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/javascript.https.html b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/javascript.https.html index 9fe85db76f5..60edf00312d 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/javascript.https.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/javascript.https.html @@ -15,7 +15,7 @@ async_test(t => { })); const frame = document.createElement("iframe"); t.add_cleanup(() => frame.remove()); - frame.src = `javascript:'${createScript(window.origin, get_host_info().HTTPS_NOTSAMESITE_ORIGIN)}'`; + frame.src = `javascript:${encodeURIComponent(createScript(window.origin, get_host_info().HTTPS_NOTSAMESITE_ORIGIN))}`; document.body.append(frame); }, "Cross-Origin-Embedder-Policy and javascript: URLs"); diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/reporting-navigation.https.html b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/reporting-navigation.https.html new file mode 100644 index 00000000000..503e52110bd --- /dev/null +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/reporting-navigation.https.html @@ -0,0 +1,77 @@ + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/blob-url-factory.html b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/blob-url-factory.html index 7d90aacd8bb..d2039064a8d 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/blob-url-factory.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/blob-url-factory.html @@ -5,7 +5,7 @@ const query = new URLSearchParams(window.location.search); const id = query.get("id"); const variant = query.get("variant"); const parent = (variant === "subframe") ? "parent.parent" : "parent"; -const blob = new Blob([createScript(window.origin, query.get("crossOrigin"), parent, id)], { type: "text/html" }); +const blob = new Blob([` diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https.html b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https.html index c317f6bdf9b..eb74bab3e5c 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/coep-blob-popup.https.html @@ -9,7 +9,7 @@ promise_test(t => { const origins = get_host_info(); const id = `tut mir leid ${type}`; - const blob = new Blob([createScript(origins.ORIGIN, origins.HTTPS_REMOTE_ORIGIN, "channel", id)], {type: "text/html"}); + const blob = new Blob([` + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/readwrite-readonly.html b/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/readwrite-readonly.html index d9bbadbe617..fc112f3ceb3 100644 --- a/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/readwrite-readonly.html +++ b/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/readwrite-readonly.html @@ -51,17 +51,28 @@ testSelectorIdsMatch("#set1 :read-write", ["input1"], "The :read-write pseudo-class must match input elements to which the readonly attribute applies, and that are mutable"); - testSelectorIdsMatch("#set1 :read-only", ["input2"], "The :read-only pseudo-class must not match input elements to which the readonly attribute applies, and that are mutable"); + testSelectorIdsMatch("#set1 :read-only", ["input2", "input3", "input4", "input5"], "The :read-only pseudo-class must not match input elements to which the readonly attribute applies, and that are mutable"); document.getElementById("input1").setAttribute("readonly", "readonly"); testSelectorIdsMatch("#set1 :read-write", [], "The :read-write pseudo-class must not match input elements after the readonly attribute has been added"); - testSelectorIdsMatch("#set1 :read-only", ["input1", "input2"], "The :read-only pseudo-class must match input elements after the readonly attribute has been added"); + testSelectorIdsMatch("#set1 :read-only", ["input1", "input2", "input3", "input4", "input5"], "The :read-only pseudo-class must match input elements after the readonly attribute has been added"); document.getElementById("input1").removeAttribute("readonly"); testSelectorIdsMatch("#set1 :read-write", ["input1"], "The :read-write pseudo-class must not match input elements after the readonly attribute has been removed"); - testSelectorIdsMatch("#set1 :read-only", ["input2"], "The :read-only pseudo-class must match input elements after the readonly attribute has been removed"); + testSelectorIdsMatch("#set1 :read-only", ["input2", "input3", "input4", "input5"], "The :read-only pseudo-class must match input elements after the readonly attribute has been removed"); + + document.getElementById("input1").disabled = true; + testSelectorIdsMatch("#set1 :read-write", [], "The :read-write pseudo-class must not match input elements after the disabled attribute has been added"); + + testSelectorIdsMatch("#set1 :read-only", ["input1", "input2", "input3", "input4", "input5"], "The :read-only pseudo-class must match input elements after the disabled attribute has been added"); + + document.getElementById("input1").disabled = false; + + testSelectorIdsMatch("#set1 :read-write", ["input1"], "The :read-write pseudo-class must match input elements after the disabled attribute has been removed"); + + testSelectorIdsMatch("#set1 :read-only", ["input2", "input3", "input4", "input5"], "The :read-only pseudo-class must not match input elements after the disabled attribute has been removed"); testSelectorIdsMatch("#set2 :read-write", ["textarea1"], "The :read-write pseudo-class must match textarea elements that do not have a readonly attribute, and that are not disabled"); diff --git a/tests/wpt/web-platform-tests/interfaces/web-share.idl b/tests/wpt/web-platform-tests/interfaces/web-share.idl index a29107f0598..c29a29d0b4e 100644 --- a/tests/wpt/web-platform-tests/interfaces/web-share.idl +++ b/tests/wpt/web-platform-tests/interfaces/web-share.idl @@ -8,6 +8,7 @@ partial interface Navigator { }; dictionary ShareData { + FrozenArray files; USVString title; USVString text; USVString url; diff --git a/tests/wpt/web-platform-tests/interfaces/webauthn.idl b/tests/wpt/web-platform-tests/interfaces/webauthn.idl index 73c96c87b91..a1d46a37cf4 100644 --- a/tests/wpt/web-platform-tests/interfaces/webauthn.idl +++ b/tests/wpt/web-platform-tests/interfaces/webauthn.idl @@ -31,6 +31,9 @@ interface AuthenticatorResponse { interface AuthenticatorAttestationResponse : AuthenticatorResponse { [SameObject] readonly attribute ArrayBuffer attestationObject; sequence getTransports(); + ArrayBuffer getAuthenticatorData(); + ArrayBuffer? getPublicKey(); + COSEAlgorithmIdentifier getPublicKeyAlgorithm(); }; [SecureContext, Exposed=Window] diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc.idl b/tests/wpt/web-platform-tests/interfaces/webrtc.idl index 852ec06209e..efb21f4a0cc 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc.idl @@ -85,11 +85,11 @@ interface RTCPeerConnection : EventTarget { constructor(optional RTCConfiguration configuration = {}); Promise createOffer(optional RTCOfferOptions options = {}); Promise createAnswer(optional RTCAnswerOptions options = {}); - Promise setLocalDescription(optional RTCSessionDescriptionInit description = {}); + Promise setLocalDescription(optional RTCLocalSessionDescriptionInit description = {}); readonly attribute RTCSessionDescription? localDescription; readonly attribute RTCSessionDescription? currentLocalDescription; readonly attribute RTCSessionDescription? pendingLocalDescription; - Promise setRemoteDescription(optional RTCSessionDescriptionInit description = {}); + Promise setRemoteDescription(RTCSessionDescriptionInit description); readonly attribute RTCSessionDescription? remoteDescription; readonly attribute RTCSessionDescription? currentRemoteDescription; readonly attribute RTCSessionDescription? pendingRemoteDescription; @@ -119,12 +119,12 @@ interface RTCPeerConnection : EventTarget { Promise createOffer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback, optional RTCOfferOptions options = {}); - Promise setLocalDescription(optional RTCSessionDescriptionInit description = {}, + Promise setLocalDescription(optional RTCLocalSessionDescriptionInit description = {}, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback); Promise createAnswer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback); - Promise setRemoteDescription(optional RTCSessionDescriptionInit description = {}, + Promise setRemoteDescription(RTCSessionDescriptionInit description, VoidFunction successCallback, RTCPeerConnectionErrorCallback failureCallback); Promise addIceCandidate(RTCIceCandidateInit candidate, @@ -150,13 +150,18 @@ enum RTCSdpType { [Exposed=Window] interface RTCSessionDescription { - constructor(optional RTCSessionDescriptionInit descriptionInitDict = {}); + constructor(RTCSessionDescriptionInit descriptionInitDict); readonly attribute RTCSdpType type; readonly attribute DOMString sdp; [Default] object toJSON(); }; dictionary RTCSessionDescriptionInit { + required RTCSdpType type; + DOMString sdp = ""; +}; + +dictionary RTCLocalSessionDescriptionInit { RTCSdpType type; DOMString sdp = ""; }; diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-form-minus-plus-ref.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-form-minus-plus-ref.html index f8303337304..b46b307dbe3 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-form-minus-plus-ref.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-form-minus-plus-ref.html @@ -8,39 +8,39 @@ - _x_ - _x_ - _x_ - _x_ - _x_ - _x_ + _x_ + _x_ + _x_ + _x_ + _x_ + _x_
    - _+x_ - _+x_ - _+x_ - _+x_ - _+x_ - _+x_ + _+x_ + _+x_ + _+x_ + _+x_ + _+x_ + _+x_
    - _±x_ - _±x_ - _±x_ - _±x_ - _±x_ - _±x_ + _±x_ + _±x_ + _±x_ + _±x_ + _±x_ + _±x_
    - _x_ - _x_ - _x_ - _x_ - _x_ - _x_ + _x_ + _x_ + _x_ + _x_ + _x_ + _x_
    diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-form-ref.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-form-ref.html index d48bd48a6e4..608ad4bbade 100644 --- a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-form-ref.html +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-form-ref.html @@ -8,11 +8,11 @@ __ - __ + __ __ - __ + __ __ __ diff --git a/tests/wpt/web-platform-tests/scroll-animations/element-based-offset-clamp.html b/tests/wpt/web-platform-tests/scroll-animations/element-based-offset-clamp.html new file mode 100644 index 00000000000..514eba09c78 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/element-based-offset-clamp.html @@ -0,0 +1,214 @@ + + +Test clamping logic of element-based scroll offset for scroll timeline. + + + + + + +
    + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/idlharness-sw.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/idlharness-sw.https.html index 33fd35b3adb..5209cc6702e 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/idlharness-sw.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/idlharness-sw.https.html @@ -1,5 +1,6 @@ Service Worker Global Scope Interfaces + diff --git a/tests/wpt/web-platform-tests/tools/lint/lint.py b/tests/wpt/web-platform-tests/tools/lint/lint.py index 74b3c8cf930..6a5359bfb8a 100644 --- a/tests/wpt/web-platform-tests/tools/lint/lint.py +++ b/tests/wpt/web-platform-tests/tools/lint/lint.py @@ -323,6 +323,41 @@ def check_css_globally_unique(repo_root, paths): return errors +def check_unique_testharness_basenames(repo_root, paths): + # type: (str, List[str]) -> List[rules.Error] + """ + Checks that all testharness files have unique basename paths. + + The 'basename path' refers to the entire path excluding the extension. For + example, 'foo/bar/baz.html' and 'foo/bar/baz.xhtml' have the same basename + path, but 'foo/bar/baz.html' and 'foo/qux/baz.html' do not. + + Testharness files with identical basenames have caused issues in downstream + infrastructure (see https://github.com/web-platform-tests/wpt/issues/7570), + and may cause confusion in general. + + :param repo_root: the repository root + :param paths: list of all paths + :returns: a list of errors found in ``paths`` + """ + + errors = [] + file_dict = defaultdict(list) + for path in paths: + source_file = SourceFile(repo_root, path, "/") + if source_file.type != "testharness": + continue + file_name, file_extension = os.path.splitext(path) + file_dict[file_name].append(file_extension) + for k, v in file_dict.items(): + if len(v) == 1: + continue + context = (', '.join(v),) + for extension in v: + errors.append(rules.DuplicateBasenamePath.error(k + extension, context)) + return errors + + def parse_ignorelist(f): # type: (IO[bytes]) -> Tuple[Ignorelist, Set[Text]] """ @@ -930,7 +965,7 @@ def lint(repo_root, paths, output_format, ignore_glob=str()): path_lints = [check_file_type, check_path_length, check_worker_collision, check_ahem_copy, check_gitignore_file] -all_paths_lints = [check_css_globally_unique] +all_paths_lints = [check_css_globally_unique, check_unique_testharness_basenames] file_lints = [check_regexp_line, check_parsed, check_python_ast, check_script_metadata, check_ahem_system_font] diff --git a/tests/wpt/web-platform-tests/tools/lint/rules.py b/tests/wpt/web-platform-tests/tools/lint/rules.py index 6fbdc1c360d..695f6cd4e53 100644 --- a/tests/wpt/web-platform-tests/tools/lint/rules.py +++ b/tests/wpt/web-platform-tests/tools/lint/rules.py @@ -322,6 +322,15 @@ class TestharnessInOtherType(Rule): description = "testharness.js included in a %s test" +class DuplicateBasenamePath(Rule): + name = "DUPLICATE-BASENAME-PATH" + description = collapse(""" + File has identical basename path (path excluding extension) as + other file(s) (found extensions: %s) + """) + to_fix = "rename files so they have unique basename paths" + + class Regexp(six.with_metaclass(abc.ABCMeta)): @abc.abstractproperty def pattern(self): diff --git a/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/a.html b/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/a.html new file mode 100644 index 00000000000..f412593b045 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/a.html @@ -0,0 +1,4 @@ + + + + diff --git a/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/a.js b/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/a.js new file mode 100644 index 00000000000..a855dab6a77 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/a.js @@ -0,0 +1,6 @@ +// This is a dummy JavaScript file, meant to indicate a 'support' file of +// sorts that may be included by some test. + +function helloWorld() { + return 'Hello, world!'; +} diff --git a/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/a.xhtml b/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/a.xhtml new file mode 100644 index 00000000000..c8b4cc2e522 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/a.xhtml @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/b.html b/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/b.html new file mode 100644 index 00000000000..f412593b045 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir1/b.html @@ -0,0 +1,4 @@ + + + + diff --git a/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir2/a.xhtml b/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir2/a.xhtml new file mode 100644 index 00000000000..c8b4cc2e522 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/lint/tests/dummy/tests/dir2/a.xhtml @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py b/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py index 43da2f9ff21..10d9728b405 100644 --- a/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py +++ b/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py @@ -398,6 +398,65 @@ def test_check_css_globally_unique_ignored_dir(caplog): assert caplog.text == "" +def test_check_unique_testharness_basename_same_basename(caplog): + # Precondition: There are testharness files with conflicting basename paths. + assert os.path.exists(os.path.join(_dummy_repo, 'tests', 'dir1', 'a.html')) + assert os.path.exists(os.path.join(_dummy_repo, 'tests', 'dir1', 'a.xhtml')) + + with _mock_lint("check_path") as mocked_check_path: + with _mock_lint("check_file_contents") as mocked_check_file_contents: + rv = lint(_dummy_repo, ["tests/dir1/a.html", "tests/dir1/a.xhtml"], "normal") + # There will be one failure for each file. + assert rv == 2 + assert mocked_check_path.call_count == 2 + assert mocked_check_file_contents.call_count == 2 + assert "DUPLICATE-BASENAME-PATH" in caplog.text + + +def test_check_unique_testharness_basename_different_name(caplog): + # Precondition: There are two testharness files in the same directory with + # different names. + assert os.path.exists(os.path.join(_dummy_repo, 'tests', 'dir1', 'a.html')) + assert os.path.exists(os.path.join(_dummy_repo, 'tests', 'dir1', 'b.html')) + + with _mock_lint("check_path") as mocked_check_path: + with _mock_lint("check_file_contents") as mocked_check_file_contents: + rv = lint(_dummy_repo, ["tests/dir1/a.html", "tests/dir1/b.html"], "normal") + assert rv == 0 + assert mocked_check_path.call_count == 2 + assert mocked_check_file_contents.call_count == 2 + assert caplog.text == "" + + +def test_check_unique_testharness_basename_different_dir(caplog): + # Precondition: There are two testharness files in different directories + # with the same basename. + assert os.path.exists(os.path.join(_dummy_repo, 'tests', 'dir1', 'a.html')) + assert os.path.exists(os.path.join(_dummy_repo, 'tests', 'dir2', 'a.xhtml')) + + with _mock_lint("check_path") as mocked_check_path: + with _mock_lint("check_file_contents") as mocked_check_file_contents: + rv = lint(_dummy_repo, ["tests/dir1/a.html", "tests/dir2/a.xhtml"], "normal") + assert rv == 0 + assert mocked_check_path.call_count == 2 + assert mocked_check_file_contents.call_count == 2 + assert caplog.text == "" + + +def test_check_unique_testharness_basename_not_testharness(caplog): + # Precondition: There are non-testharness files with conflicting basename paths. + assert os.path.exists(os.path.join(_dummy_repo, 'tests', 'dir1', 'a.html')) + assert os.path.exists(os.path.join(_dummy_repo, 'tests', 'dir1', 'a.js')) + + with _mock_lint("check_path") as mocked_check_path: + with _mock_lint("check_file_contents") as mocked_check_file_contents: + rv = lint(_dummy_repo, ["tests/dir1/a.html", "tests/dir1/a.js"], "normal") + assert rv == 0 + assert mocked_check_path.call_count == 2 + assert mocked_check_file_contents.call_count == 2 + assert caplog.text == "" + + def test_ignore_glob(caplog): # Lint two files in the ref/ directory, and pass in ignore_glob to omit one # of them. diff --git a/tests/wpt/web-platform-tests/url/resources/urltestdata.json b/tests/wpt/web-platform-tests/url/resources/urltestdata.json index dd40eaa5a9f..1ed95583c12 100644 --- a/tests/wpt/web-platform-tests/url/resources/urltestdata.json +++ b/tests/wpt/web-platform-tests/url/resources/urltestdata.json @@ -4481,21 +4481,6 @@ "search": "", "hash": "" }, - { - "input": "sc://\u001F!\"$&'()*+,-.;<=>^_`{|}~/", - "base": "about:blank", - "href": "sc://%1F!\"$&'()*+,-.;<=>^_`{|}~/", - "origin": "null", - "protocol": "sc:", - "username": "", - "password": "", - "host": "%1F!\"$&'()*+,-.;<=>^_`{|}~", - "hostname": "%1F!\"$&'()*+,-.;<=>^_`{|}~", - "port": "", - "pathname": "/", - "search": "", - "hash": "" - }, { "input": "sc://\u0000/", "base": "about:blank", @@ -4649,6 +4634,68 @@ "search": "", "hash": "" }, + "Forbidden host code points", + { + "input": "http://ab", + "base": "about:blank", + "failure": true + }, + { + "input": "http://a^b", + "base": "about:blank", + "failure": true + }, + { + "input": "non-special://ab", + "base": "about:blank", + "failure": true + }, + { + "input": "non-special://a^b", + "base": "about:blank", + "failure": true + }, + "Allowed host code points", + { + "input": "http://\u001F!\"$&'()*+,-.;=_`{|}~/", + "base": "about:blank", + "href": "http://\u001F!\"$&'()*+,-.;=_`{|}~/", + "origin": "http://\u001F!\"$&'()*+,-.;=_`{|}~", + "protocol": "http:", + "username": "", + "password": "", + "host": "\u001F!\"$&'()*+,-.;=_`{|}~", + "hostname": "\u001F!\"$&'()*+,-.;=_`{|}~", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "sc://\u001F!\"$&'()*+,-.;=_`{|}~/", + "base": "about:blank", + "href": "sc://%1F!\"$&'()*+,-.;=_`{|}~/", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "%1F!\"$&'()*+,-.;=_`{|}~", + "hostname": "%1F!\"$&'()*+,-.;=_`{|}~", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, "# Hosts and percent-encoding", { "input": "ftp://example.com%80/", diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/getAnimations.html b/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/getAnimations.html index 37465540d26..fd8719299db 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/getAnimations.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/Animatable/getAnimations.html @@ -302,7 +302,12 @@ promise_test(async t => { const animA = div.animate({ opacity: 1 }, { duration: 1, fill: 'forwards' }); const animB = div.animate({ opacity: 1 }, { duration: 1, fill: 'forwards' }); await animA.finished; - + // It is not guaranteed that the mircrotask PerformCheckpoint() happens before + // the animation finish promised got resolved, because the microtask + // checkpoint could also be triggered from other source such as the event_loop + // Thus we wait for one animation frame to make sure the finished animation is + // properly removed. + await waitForNextFrame(1); assert_array_equals(div.getAnimations(), [animB]); }, 'Does not return an animation that has been removed'); diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_tripleclick.py b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_tripleclick.py new file mode 100644 index 00000000000..28eaf29f737 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_tripleclick.py @@ -0,0 +1,34 @@ +from tests.perform_actions.support.refine import filter_dict, get_events +from tests.support.asserts import assert_move_to_coordinates +from tests.support.inline import inline + +lots_of_text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor "\ + "incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud "\ + " exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." + + +def test_tripleclick_at_coordinates(session, mouse_chain): + """ + This test does a triple click on a coordinate. On desktop platforms + this will select a paragraph. On mobile this will not have the same + desired outcome as taps are handled differently on mobile. + """ + session.url = inline("""
    + {} +
    """.format(lots_of_text)) + div = session.find.css("div", all=False) + div_rect = div.rect + div_centre = { + "x": div_rect["x"] + div_rect["width"]/2, + "y": div_rect["y"] + div_rect["height"]/2 + } + mouse_chain \ + .pointer_move(div_centre["x"], div_centre["y"]) \ + .click() \ + .click() \ + .click() \ + .perform() + + actual_text = session.execute_script("return document.getSelection().toString();") + + assert lots_of_text == actual_text diff --git a/tests/wpt/web-platform-tests/webrtc-priority/RTCPeerConnection-ondatachannel.html b/tests/wpt/web-platform-tests/webrtc-priority/RTCPeerConnection-ondatachannel.html new file mode 100644 index 00000000000..b153c3adac5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc-priority/RTCPeerConnection-ondatachannel.html @@ -0,0 +1,66 @@ + + +RTCPeerConnection.prototype.ondatachannel + + + + diff --git a/tests/wpt/web-platform-tests/webrtc-priority/RTCRtpParameters-encodings.html b/tests/wpt/web-platform-tests/webrtc-priority/RTCRtpParameters-encodings.html new file mode 100644 index 00000000000..37c1b919b41 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc-priority/RTCRtpParameters-encodings.html @@ -0,0 +1,44 @@ + + +RTCRtpParameters encodings + + + + + diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-addTransceiver.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-addTransceiver.https.html index bc537c26867..68a2623391b 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-addTransceiver.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-addTransceiver.https.html @@ -363,7 +363,6 @@ sendEncodings: [{ dtx: 'enabled', active: false, - priority: 'low', ptime: 5, maxBitrate: 8, maxFramerate: 25, diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js index 29145c8b927..679cb85b12a 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js @@ -811,6 +811,18 @@ function findTransceiverForSender(pc, sender) { return null; } +function preferCodec(transceiver, mimeType, sdpFmtpLine) { + const {codecs} = RTCRtpSender.getCapabilities(transceiver.receiver.track.kind); + // sdpFmtpLine is optional, pick the first partial match if not given. + const selectedCodecIndex = codecs.findIndex(c => { + return c.mimeType === mimeType && (c.sdpFmtpLine === sdpFmtpLine || !sdpFmtpLine); + }); + const selectedCodec = codecs[selectedCodecIndex]; + codecs.slice(selectedCodecIndex, 1); + codecs.unshift(selectedCodec); + return transceiver.setCodecPreferences(codecs); +} + // Contains a set of values and will yell at you if you try to add a value twice. class UniqueSet extends Set { constructor(items) { diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-ondatachannel.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-ondatachannel.html index 2fd33ca5411..8ba98414cbb 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-ondatachannel.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-ondatachannel.html @@ -224,7 +224,6 @@ promise_test(async (t) => { readonly attribute USVString protocol; readonly attribute boolean negotiated; readonly attribute unsigned short? id; - readonly attribute RTCPriorityType priority; readonly attribute RTCDataChannelState readyState; ... }; @@ -240,8 +239,6 @@ promise_test(async (t) => { [[MaxRetransmits]], [[DataChannelProtocol]], and [[DataChannelId]] internal slots to the corresponding values in configuration. 5. Initialize channel's [[Negotiated]] internal slot to false. - 6. Initialize channel's [[DataChannelPriority]] internal slot based on the integer priority - value in configuration, [...] 7. Set channel's [[ReadyState]] slot to connecting. 8. Fire a datachannel event named datachannel with channel at the RTCPeerConnection object. @@ -259,7 +256,6 @@ promise_test(async (t) => { ordered: false, maxRetransmits: 1, protocol: 'custom', - priority: 'high' }); assert_equals(dc1.label, 'test'); @@ -268,7 +264,6 @@ promise_test(async (t) => { assert_equals(dc1.maxRetransmits, 1); assert_equals(dc1.protocol, 'custom'); assert_equals(dc1.negotiated, false); - assert_equals(dc1.priority, 'high'); pc2.ondatachannel = t.step_func((event) => { const dc2 = event.channel; @@ -282,7 +277,6 @@ promise_test(async (t) => { assert_equals(dc2.protocol, 'custom'); assert_equals(dc2.negotiated, false); assert_equals(dc2.id, dc1.id); - assert_equals(dc2.priority, 'high'); resolver.resolve(); }); @@ -309,7 +303,6 @@ promise_test(async (t) => { assert_equals(dc1.maxRetransmits, null); assert_equals(dc1.protocol, ''); assert_equals(dc1.negotiated, false); - assert_equals(dc1.priority, 'low'); pc2.ondatachannel = t.step_func((event) => { const dc2 = event.channel; @@ -323,7 +316,6 @@ promise_test(async (t) => { assert_equals(dc2.protocol, ''); assert_equals(dc2.negotiated, false); assert_equals(dc2.id, dc1.id); - assert_equals(dc2.priority, 'low'); resolver.resolve(); }); diff --git a/tests/wpt/web-platform-tests/webrtc/RTCRtpParameters-encodings.html b/tests/wpt/web-platform-tests/webrtc/RTCRtpParameters-encodings.html index 00e80885cff..539b2692806 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCRtpParameters-encodings.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCRtpParameters-encodings.html @@ -45,8 +45,6 @@ dictionary RTCRtpEncodingParameters { boolean active; - RTCPriorityType priority; - RTCPriorityType networkPriority; unsigned long maxBitrate; [readonly] @@ -55,13 +53,6 @@ double scaleResolutionDownBy; }; - enum RTCPriorityType { - "very-low", - "low", - "medium", - "high" - }; - getParameters - encodings is set to the value of the [[send encodings]] internal slot. */ @@ -128,8 +119,6 @@ const { sender } = pc.addTransceiver('video', { sendEncodings: [{ active: false, - priority: 'low', - networkPriority: 'low', maxBitrate: 8, maxFramerate: 25, rid: 'foo' @@ -142,8 +131,6 @@ const encoding = getFirstEncoding(param); assert_equals(encoding.active, false); - assert_equals(encoding.priority, 'low'); - assert_equals(encoding.networkPriority, 'low'); assert_equals(encoding.maxBitrate, 8); assert_not_own_property(encoding, "rid", "rid should be removed with a single encoding"); @@ -259,12 +246,6 @@ test_modified_encoding('audio', 'active', false, true, 'setParameters() with modified encoding.active should succeed'); - test_modified_encoding('audio', 'priority', 'very-low', 'high', - 'setParameters() with modified encoding.priority should succeed'); - - test_modified_encoding('audio', 'networkPriority', 'very-low', 'high', - 'setParameters() with modified encoding.networkPriority should succeed'); - test_modified_encoding('audio', 'maxBitrate', 10000, 20000, 'setParameters() with modified encoding.maxBitrate should succeed'); diff --git a/tests/wpt/web-platform-tests/webrtc/simulcast/h264.https.html b/tests/wpt/web-platform-tests/webrtc/simulcast/h264.https.html new file mode 100644 index 00000000000..89e18bcd51c --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/simulcast/h264.https.html @@ -0,0 +1,23 @@ + + +RTCPeerConnection Simulcast Tests + + + + + + + diff --git a/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js b/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js index d8911f443e7..af804c03e86 100644 --- a/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js +++ b/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js @@ -76,7 +76,7 @@ function swapRidAndMidExtensionsInSimulcastAnswer(answer, localDescription, rids return sdp; } -async function negotiateSimulcastAndWaitForVideo(t, rids, pc1, pc2) { +async function negotiateSimulcastAndWaitForVideo(t, rids, pc1, pc2, codec) { exchangeIceCandidates(pc1, pc2); const metadataToBeLoaded = []; @@ -96,10 +96,13 @@ async function negotiateSimulcastAndWaitForVideo(t, rids, pc1, pc2) { // Use getUserMedia as getNoiseStream does not have enough entropy to ramp-up. const stream = await navigator.mediaDevices.getUserMedia({video: {width: 1280, height: 720}}); t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); - pc1.addTransceiver(stream.getVideoTracks()[0], { + const transceiver = pc1.addTransceiver(stream.getVideoTracks()[0], { streams: [stream], sendEncodings: rids.map(rid => {rid}), }); + if (codec) { + preferCodec(transceiver, codec.mimeType, codec.sdpFmtpLine); + } const offer = await pc1.createOffer(); await pc1.setLocalDescription(offer), diff --git a/tests/wpt/web-platform-tests/webrtc/simulcast/vp8.https.html b/tests/wpt/web-platform-tests/webrtc/simulcast/vp8.https.html new file mode 100644 index 00000000000..e3567e61c21 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/simulcast/vp8.https.html @@ -0,0 +1,23 @@ + + +RTCPeerConnection Simulcast Tests + + + + + + +