diff options
author | Servo WPT Sync <32481905+servo-wpt-sync@users.noreply.github.com> | 2024-01-13 23:22:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-14 04:22:04 +0000 |
commit | e7d2d23e1eb3aca4d69666ea21682188a9be1e35 (patch) | |
tree | 39255e432dcd4505af4875220d8f3ce2eea7254a | |
parent | efe4071a5b97f7b5bc460bf99c26823bbf0d918f (diff) | |
download | servo-e7d2d23e1eb3aca4d69666ea21682188a9be1e35.tar.gz servo-e7d2d23e1eb3aca4d69666ea21682188a9be1e35.zip |
Update web-platform-tests to revision b'5049a31d2a7eebd7bca08317e56664021a8bd36c' (#31085)
325 files changed, 10493 insertions, 1547 deletions
diff --git a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-relative-color.html.ini b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-relative-color.html.ini index f2843c40203..6ca549e0935 100644 --- a/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-relative-color.html.ini +++ b/tests/wpt/meta-legacy-layout/css/css-color/parsing/color-computed-relative-color.html.ini @@ -3268,3 +3268,51 @@ [Property color value 'LCH(from var(--accent) l c calc(h + 180))'] expected: FAIL + + [Property color value 'rgb(from rgb(100 110 120 / 0.8) calc(r + 1) calc(g + 1) calc(b + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'hsl(from hsl(20 30 40 / 0.8) calc(h + 1) calc(s + 1) calc(l + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'hwb(from hwb(20 30 40 / 0.8) calc(h + 1) calc(w + 1) calc(b + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'lab(from lab(50 5 10 / 0.8) calc(l + 1) calc(a + 1) calc(b + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'oklab(from oklab(0.5 .05 0.1 / 0.8) calc(l + 0.01) calc(a + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'lch(from lch(50 5 10 / 0.8) calc(l + 1) calc(c + 1) calc(h + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'oklch(from oklch(0.5 .05 0.1 / 0.8) calc(l + 0.01) calc(c + 0.01) calc(h + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(srgb 0.7 0.5 0.3 / 0.8) srgb calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(srgb-linear 0.7 0.5 0.3 / 0.8) srgb-linear calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(a98-rgb 0.7 0.5 0.3 / 0.8) a98-rgb calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(rec2020 0.7 0.5 0.3 / 0.8) rec2020 calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(prophoto-rgb 0.7 0.5 0.3 / 0.8) prophoto-rgb calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(display-p3 0.7 0.5 0.3 / 0.8) display-p3 calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(xyz 7 -20.5 100 / 0.8) xyz calc(x + 1) calc(y + 1) calc(z + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(xyz-d50 7 -20.5 100 / 0.8) xyz-d50 calc(x + 1) calc(y + 1) calc(z + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(xyz-d65 7 -20.5 100 / 0.8) xyz-d65 calc(x + 1) calc(y + 1) calc(z + 1) / calc(alpha + 0.01))'] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-fonts/font-size-adjust-reload.html.ini b/tests/wpt/meta-legacy-layout/css/css-fonts/font-size-adjust-reload.html.ini deleted file mode 100644 index bc77583f93e..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-fonts/font-size-adjust-reload.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[font-size-adjust-reload.html] - expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html.ini deleted file mode 100644 index bad56becd0b..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[text-spacing-trim-space-first-wrap-001.html?class=chws,vrl] - expected: FAIL - -[text-spacing-trim-space-first-wrap-001.html?class=halt,htb] - expected: FAIL - -[text-spacing-trim-space-first-wrap-001.html?class=chws,htb] - expected: FAIL - -[text-spacing-trim-space-first-wrap-001.html?class=halt,vrl] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini deleted file mode 100644 index 8c8ff980a52..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[text-spacing-trim-space-first-wrap-br-001.html?class=halt,htb] - expected: FAIL - -[text-spacing-trim-space-first-wrap-br-001.html?class=chws,vrl] - expected: FAIL - -[text-spacing-trim-space-first-wrap-br-001.html?class=halt,vrl] - expected: FAIL - -[text-spacing-trim-space-first-wrap-br-001.html?class=chws,htb] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-start-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-start-001.html.ini new file mode 100644 index 00000000000..ae7a9f4a4ad --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-start-001.html.ini @@ -0,0 +1,35 @@ +[text-spacing-trim-start-001.html?class=trim-start,halt,vrl] + expected: FAIL + +[text-spacing-trim-start-001.html?class=space-first,halt,vrl] + expected: FAIL + +[text-spacing-trim-start-001.html?class=halt,htb] + expected: FAIL + +[text-spacing-trim-start-001.html?class=trim-start,halt,htb] + expected: FAIL + +[text-spacing-trim-start-001.html?class=trim-start,chws,htb] + expected: FAIL + +[text-spacing-trim-start-001.html?class=space-first,chws,htb] + expected: FAIL + +[text-spacing-trim-start-001.html?class=trim-start,chws,vrl] + expected: FAIL + +[text-spacing-trim-start-001.html?class=halt,vrl] + expected: FAIL + +[text-spacing-trim-start-001.html?class=chws,htb] + expected: FAIL + +[text-spacing-trim-start-001.html?class=chws,vrl] + expected: FAIL + +[text-spacing-trim-start-001.html?class=space-first,halt,htb] + expected: FAIL + +[text-spacing-trim-start-001.html?class=space-first,chws,vrl] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-start-002.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-start-002.html.ini new file mode 100644 index 00000000000..ed633d0d0ae --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-start-002.html.ini @@ -0,0 +1,2 @@ +[text-spacing-trim-start-002.html] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html.ini b/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html.ini deleted file mode 100644 index e7f62a94cc1..00000000000 --- a/tests/wpt/meta-legacy-layout/css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[text-spacing-trim-wrap-br-001.html?class=chws,htb] - expected: FAIL - -[text-spacing-trim-wrap-br-001.html?class=halt,vrl] - expected: FAIL - -[text-spacing-trim-wrap-br-001.html?class=chws,vrl] - expected: FAIL - -[text-spacing-trim-wrap-br-001.html?class=halt,htb] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini index ee625a151a4..037d7e0f951 100644 --- a/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini @@ -4,6 +4,3 @@ [throws if handleEvent is thruthy and not callable] expected: FAIL - - [looks up handleEvent method on every event dispatch] - 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 <iframe> is resized] expected: FAIL - - [listeners are called correct number of times] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/getBoundingClientRect-zoom.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/getBoundingClientRect-zoom.html.ini new file mode 100644 index 00000000000..9e4fca20990 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/getBoundingClientRect-zoom.html.ini @@ -0,0 +1,9 @@ +[getBoundingClientRect-zoom.html] + [getBoundingClientRect for elements with css zoom 2] + expected: FAIL + + [getBoundingClientRect for elements with css zoom 3] + expected: FAIL + + [getBoundingClientRect for elements with css zoom 4] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/getClientRects-zoom.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/getClientRects-zoom.html.ini new file mode 100644 index 00000000000..54e56e8c577 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/getClientRects-zoom.html.ini @@ -0,0 +1,9 @@ +[getClientRects-zoom.html] + [getBoundingClientRect for elements with css zoom 2] + expected: FAIL + + [getBoundingClientRect for elements with css zoom 3] + expected: FAIL + + [getBoundingClientRect for elements with css zoom 4] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/offsetTopLeft-border-box.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/offsetTopLeft-border-box.html.ini new file mode 100644 index 00000000000..00753fab1d1 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/offsetTopLeft-border-box.html.ini @@ -0,0 +1,6 @@ +[offsetTopLeft-border-box.html] + [container: 0] + expected: FAIL + + [container: 1] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/css/cssom-view/scroll-zoom.html.ini b/tests/wpt/meta-legacy-layout/css/cssom-view/scroll-zoom.html.ini new file mode 100644 index 00000000000..db32ece8e06 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/css/cssom-view/scroll-zoom.html.ini @@ -0,0 +1,3 @@ +[scroll-zoom.html] + [scroll properties for elements with css zoom 1] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/dom/events/webkit-transition-end-event.html.ini b/tests/wpt/meta-legacy-layout/dom/events/webkit-transition-end-event.html.ini index eb8b8d11dff..b7fe8688a23 100644 --- a/tests/wpt/meta-legacy-layout/dom/events/webkit-transition-end-event.html.ini +++ b/tests/wpt/meta-legacy-layout/dom/events/webkit-transition-end-event.html.ini @@ -1,5 +1,4 @@ [webkit-transition-end-event.html] - expected: TIMEOUT [dispatchEvent of an transitionend event does not trigger a prefixed event handler or listener] expected: FAIL @@ -13,25 +12,16 @@ expected: FAIL [event types for prefixed and unprefixed transitionend event listeners should be named appropriately] - expected: NOTRUN + expected: FAIL [ontransitionend and onwebkittransitionend are not aliases] expected: FAIL [webkitTransitionEnd event listener should trigger for an animation] - expected: TIMEOUT + expected: FAIL [dispatchEvent of a webkitTransitionEnd event does trigger a prefixed event handler or listener] expected: FAIL [onwebkittransitionend event handler should not trigger if an unprefixed event handler also exists] expected: FAIL - - [webkitTransitionEnd event listener should not trigger if an unprefixed listener also exists] - expected: NOTRUN - - [webkitTransitionEnd event listener should not trigger if an unprefixed event handler also exists] - expected: NOTRUN - - [webkitTransitionEnd event listener is case sensitive] - expected: NOTRUN diff --git a/tests/wpt/meta-legacy-layout/dom/idlharness.window.js.ini b/tests/wpt/meta-legacy-layout/dom/idlharness.window.js.ini index 9e5556fd0ed..767c7e7b93d 100644 --- a/tests/wpt/meta-legacy-layout/dom/idlharness.window.js.ini +++ b/tests/wpt/meta-legacy-layout/dom/idlharness.window.js.ini @@ -908,6 +908,9 @@ [AbortSignal interface: calling any(sequence<AbortSignal>) on new AbortController().signal with too few arguments must throw TypeError] expected: FAIL + [ShadowRoot interface: attribute clonable] + expected: FAIL + [idlharness.window.html?include=Node] [idl_test setup] diff --git a/tests/wpt/meta-legacy-layout/dom/observable/tentative/observable-event-target.window.js.ini b/tests/wpt/meta-legacy-layout/dom/observable/tentative/observable-event-target.window.js.ini new file mode 100644 index 00000000000..64cfdcd7e58 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/dom/observable/tentative/observable-event-target.window.js.ini @@ -0,0 +1,6 @@ +[observable-event-target.window.html] + [EventTarget Observables can listen for events in the capturing or bubbling phase] + expected: FAIL + + [EventTarget Observables can be 'passive'] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.https.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.https.window.js.ini new file mode 100644 index 00000000000..4deb955ad92 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.https.window.js.ini @@ -0,0 +1,37 @@ +[location.tentative.https.window.html?include=from-private] + [private to local: failed preflight.] + expected: FAIL + + [private to local: success.] + expected: FAIL + + +[location.tentative.https.window.html?include=from-public] + [public to local: failed preflight.] + expected: FAIL + + [public to local: success.] + expected: FAIL + + [public to private: failed preflight.] + expected: FAIL + + [public to private: success.] + expected: FAIL + + +[location.tentative.https.window.html?include=from-treat-as-public] + [treat-as-public-address to local: failed preflight.] + expected: FAIL + + [treat-as-public-address to local: success.] + expected: FAIL + + [treat-as-public-address to private: failed preflight.] + expected: FAIL + + [treat-as-public-address to private: success.] + expected: FAIL + + +[location.tentative.https.window.html?include=from-local] diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.window.js.ini new file mode 100644 index 00000000000..db5e79a6043 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/fetch/private-network-access/location.tentative.window.js.ini @@ -0,0 +1,15 @@ +[location.tentative.window.html] + [private to local: failure.] + expected: FAIL + + [public to local: failure.] + expected: FAIL + + [public to private: failure.] + expected: FAIL + + [treat-as-public-address to local: failure.] + expected: FAIL + + [treat-as-public-address to private: failure.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.https.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.https.window.js.ini new file mode 100644 index 00000000000..1ce4ab5bc4e --- /dev/null +++ b/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.https.window.js.ini @@ -0,0 +1,36 @@ +[top-location.tentative.https.window.html?include=from-local] + +[top-location.tentative.https.window.html?include=from-public] + [public to local: failed preflight.] + expected: FAIL + + [public to local: success.] + expected: FAIL + + [public to private: failed preflight.] + expected: FAIL + + [public to private: success.] + expected: FAIL + + +[top-location.tentative.https.window.html?include=from-private] + [private to local: failed preflight.] + expected: FAIL + + [private to local: success.] + expected: FAIL + + +[top-location.tentative.https.window.html?include=from-treat-as-public] + [treat-as-public-address to local: failed preflight.] + expected: FAIL + + [treat-as-public-address to local: success.] + expected: FAIL + + [treat-as-public-address to private: failed preflight.] + expected: FAIL + + [treat-as-public-address to private: success.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.window.js.ini new file mode 100644 index 00000000000..0abfc3f7b03 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/fetch/private-network-access/top-location.tentative.window.js.ini @@ -0,0 +1,15 @@ +[top-location.tentative.window.html] + [private to local: failure.] + expected: FAIL + + [public to local: failure.] + expected: FAIL + + [public to private: failure.] + expected: FAIL + + [treat-as-public-address to local: failure.] + expected: FAIL + + [treat-as-public-address to private: failure.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/window-open-existing.tentative.https.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/window-open-existing.tentative.https.window.js.ini new file mode 100644 index 00000000000..885b1fa7fe5 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/fetch/private-network-access/window-open-existing.tentative.https.window.js.ini @@ -0,0 +1,66 @@ +[window-open-existing.tentative.https.window.html?include=from-treat-as-public] + [treat-as-public-address to local: failed preflight.] + expected: FAIL + + [treat-as-public-address to local: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to local: missing PNA header.] + expected: FAIL + + [treat-as-public-address to local: success.] + expected: FAIL + + [treat-as-public-address to private: failed preflight.] + expected: FAIL + + [treat-as-public-address to private: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to private: missing PNA header.] + expected: FAIL + + [treat-as-public-address to private: success.] + expected: FAIL + + +[window-open-existing.tentative.https.window.html?include=from-local] + +[window-open-existing.tentative.https.window.html?include=from-public] + [public to local: failed preflight.] + expected: FAIL + + [public to local: missing CORS headers.] + expected: FAIL + + [public to local: missing PNA header.] + expected: FAIL + + [public to local: success.] + expected: FAIL + + [public to private: failed preflight.] + expected: FAIL + + [public to private: missing CORS headers.] + expected: FAIL + + [public to private: missing PNA header.] + expected: FAIL + + [public to private: success.] + expected: FAIL + + +[window-open-existing.tentative.https.window.html?include=from-private] + [private to local: failed preflight.] + expected: FAIL + + [private to local: missing CORS headers.] + expected: FAIL + + [private to local: missing PNA header.] + expected: FAIL + + [private to local: success.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fetch/private-network-access/window-open-existing.tentative.window.js.ini b/tests/wpt/meta-legacy-layout/fetch/private-network-access/window-open-existing.tentative.window.js.ini new file mode 100644 index 00000000000..390af048834 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/fetch/private-network-access/window-open-existing.tentative.window.js.ini @@ -0,0 +1,15 @@ +[window-open-existing.tentative.window.html] + [private to local: failure.] + expected: FAIL + + [public to local: failure.] + expected: FAIL + + [public to private: failure.] + expected: FAIL + + [treat-as-public-address to local: failure.] + expected: FAIL + + [treat-as-public-address to private: failure.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/fullscreen/rendering/backdrop-inherit.html.ini b/tests/wpt/meta-legacy-layout/fullscreen/rendering/backdrop-inherit.html.ini new file mode 100644 index 00000000000..9de3b56d1e9 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/fullscreen/rendering/backdrop-inherit.html.ini @@ -0,0 +1,2 @@ +[backdrop-inherit.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini index 149bcb4ff8c..b8fd22e2b81 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini @@ -10,3 +10,6 @@ [load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank'] expected: FAIL + + [load & pageshow events do not fire on contentWindow of <iframe> element created with src=''] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini index 324db3d9b35..5aef7ce66ce 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini @@ -10,3 +10,6 @@ [load event does not fire on window.open('about:blank?foo')] expected: FAIL + + [load event does not fire on window.open('about:blank')] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini index 78240a2f463..f27acdd3b9d 100644 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini @@ -4,15 +4,3 @@ [Test javascript URL string return values in direct and indirect (target) frame contexts. 9] expected: FAIL - - [0041 set in href="" targeting a frame and clicked] - expected: FAIL - - [0080 00FF set in href="" targeting a frame and clicked] - expected: FAIL - - [0080 00FF 0100 set in href="" targeting a frame and clicked] - expected: FAIL - - [D83D DE0D set in href="" targeting a frame and clicked] - expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini index 4ecd6d9f753..4ecd6d9f753 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.js.ini diff --git a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini b/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini deleted file mode 100644 index 7dc346632a4..00000000000 --- a/tests/wpt/meta-legacy-layout/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini +++ /dev/null @@ -1,3 +0,0 @@ -[navigation-unload-same-origin.window.html] - [Same-origin navigation started from unload handler must be ignored] - expected: FAIL diff --git a/tests/wpt/meta/html/browsers/history/the-history-interface/traverse_the_history_2.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini index 5d17a8e9419..a03a8322165 100644 --- a/tests/wpt/meta/html/browsers/history/the-history-interface/traverse_the_history_2.html.ini +++ b/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini @@ -1,3 +1,3 @@ -[traverse_the_history_2.html] +[traverse_the_history_3.html] [Multiple history traversals, last would be aborted] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini new file mode 100644 index 00000000000..d6188c03424 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini @@ -0,0 +1,3 @@ +[traverse_the_history_4.html] + [Multiple history traversals, last would be aborted] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini b/tests/wpt/meta-legacy-layout/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini new file mode 100644 index 00000000000..4b4820d1729 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini @@ -0,0 +1,3 @@ +[creating_browsing_context_test_01.html] + [first argument: absolute url] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/dom/aria-attribute-reflection.html.ini b/tests/wpt/meta-legacy-layout/html/dom/aria-attribute-reflection.html.ini index 2a19e3e0c81..ba427c34c98 100644 --- a/tests/wpt/meta-legacy-layout/html/dom/aria-attribute-reflection.html.ini +++ b/tests/wpt/meta-legacy-layout/html/dom/aria-attribute-reflection.html.ini @@ -118,3 +118,9 @@ [aria-valuetext attribute reflects.] expected: FAIL + + [aria-braillelabel attribute reflects.] + expected: FAIL + + [aria-brailleroledescription attribute reflects.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/dom/elements/global-attributes/dir-assorted.window.js.ini b/tests/wpt/meta-legacy-layout/html/dom/elements/global-attributes/dir-assorted.window.js.ini index 4af5281ea87..6d541106aee 100644 --- a/tests/wpt/meta-legacy-layout/html/dom/elements/global-attributes/dir-assorted.window.js.ini +++ b/tests/wpt/meta-legacy-layout/html/dom/elements/global-attributes/dir-assorted.window.js.ini @@ -22,3 +22,75 @@ [text changes apply to dir=auto on further ancestor after removing dir=auto from closer ancestor] expected: FAIL + + [directionality of bdi elements: dir=ltr with LTR contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=ltr with LTR contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=ltr with RTL contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=ltr with RTL contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=ltr empty in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=ltr empty in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl with LTR contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl with LTR contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl with RTL contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl with RTL contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl empty in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl empty in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=auto with LTR contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=auto with LTR contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=auto with RTL contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=auto with RTL contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=auto empty in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=auto empty in rtl parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute with LTR contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute with LTR contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute with RTL contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute with RTL contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute empty in ltr parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute empty in rtl parent] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini b/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini index 9b2c31da14c..de7524f79ab 100644 --- a/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta-legacy-layout/html/dom/idlharness.https.html.ini @@ -410,9 +410,6 @@ [CanvasRenderingContext2D interface: operation getContextAttributes()] expected: FAIL - [PromiseRejectionEvent interface: attribute promise] - expected: FAIL - [SharedWorker interface: existence and properties of interface prototype object's @@unscopables property] expected: FAIL @@ -1967,6 +1964,84 @@ [Element interface: operation setHTMLUnsafe(DOMString)] expected: FAIL + [ElementInternals interface: attribute states] + expected: FAIL + + [CustomStateSet interface: existence and properties of interface object] + expected: FAIL + + [CustomStateSet interface object length] + expected: FAIL + + [CustomStateSet interface object name] + expected: FAIL + + [CustomStateSet interface: existence and properties of interface prototype object] + expected: FAIL + + [CustomStateSet interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [CustomStateSet interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [CustomStateSet interface: setlike<DOMString>] + expected: FAIL + + [Navigation interface: attribute activation] + expected: FAIL + + [NavigationActivation interface: existence and properties of interface object] + expected: FAIL + + [NavigationActivation interface object length] + expected: FAIL + + [NavigationActivation interface object name] + expected: FAIL + + [NavigationActivation interface: existence and properties of interface prototype object] + expected: FAIL + + [NavigationActivation interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [NavigationActivation interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [NavigationActivation interface: attribute from] + expected: FAIL + + [NavigationActivation interface: attribute entry] + expected: FAIL + + [NavigationActivation interface: attribute navigationType] + expected: FAIL + + [PageRevealEvent interface: existence and properties of interface object] + expected: FAIL + + [PageRevealEvent interface object length] + expected: FAIL + + [PageRevealEvent interface object name] + expected: FAIL + + [PageRevealEvent interface: existence and properties of interface prototype object] + expected: FAIL + + [PageRevealEvent interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [PageRevealEvent interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [PageRevealEvent interface: attribute viewTransition] + expected: FAIL + + [SVGSVGElement interface: attribute onpagereveal] + expected: FAIL + [idlharness.https.html?include=(Document|Window)] [Document interface: documentWithHandlers must inherit property "queryCommandEnabled(DOMString)" with the proper type] @@ -2623,6 +2698,12 @@ [Document interface: calling parseHTMLUnsafe(DOMString) on documentWithHandlers with too few arguments must throw TypeError] expected: FAIL + [Window interface: attribute onpagereveal] + expected: FAIL + + [Window interface: window must inherit property "onpagereveal" with the proper type] + expected: FAIL + [idlharness.https.html?include=HTML.*] [HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "align" with the proper type] @@ -4961,3 +5042,15 @@ [HTMLSelectElement interface: document.createElement("select") must inherit property "showPicker()" with the proper type] expected: FAIL + + [HTMLBodyElement interface: attribute onpagereveal] + expected: FAIL + + [HTMLBodyElement interface: document.createElement("body") must inherit property "onpagereveal" with the proper type] + expected: FAIL + + [HTMLFrameSetElement interface: attribute onpagereveal] + expected: FAIL + + [HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onpagereveal" with the proper type] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/dom/idlharness.worker.js.ini b/tests/wpt/meta-legacy-layout/html/dom/idlharness.worker.js.ini index 30aa826ee53..aaeb3cb9577 100644 --- a/tests/wpt/meta-legacy-layout/html/dom/idlharness.worker.js.ini +++ b/tests/wpt/meta-legacy-layout/html/dom/idlharness.worker.js.ini @@ -140,9 +140,6 @@ [DedicatedWorkerGlobalScope interface: self must inherit property "cancelAnimationFrame(unsigned long)" with the proper type] expected: FAIL - [PromiseRejectionEvent interface: attribute promise] - expected: FAIL - [SharedWorker interface: existence and properties of interface prototype object's @@unscopables property] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html.ini b/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html.ini index 9e6f4115b8c..0cfee719c4e 100644 --- a/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html.ini +++ b/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty.html.ini @@ -1,6 +1,7 @@ [document-with-fragment-empty.html] + expected: TIMEOUT [Autofocus elements in iframed documents with empty fragments should work.] expected: FAIL [Autofocus elements in top-level browsing context's documents with empty fragments should work.] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index d169bd2e9fa..8acae84e1e4 100644 --- a/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/meta-legacy-layout/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,4 +1,5 @@ [supported-elements.html] + expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL @@ -9,7 +10,7 @@ expected: FAIL [Area element should support autofocus] - expected: FAIL + expected: TIMEOUT [Host element with delegatesFocus should support autofocus] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini index 76e34322dca..6bec7a732b8 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,5 +1,4 @@ [iframe_sandbox_popups_nonescaping-2.html] type: testharness - expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index ff6467094b8..d5fd800f09d 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,3 +1,4 @@ [iframe_sandbox_popups_nonescaping-3.html] + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini deleted file mode 100644 index 7682a4830bf..00000000000 --- a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[reparent-form-during-planned-navigation-task.html] - expected: TIMEOUT - [reparent-form-during-planned-navigation-task] - expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/text-plain.window.js.ini b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/text-plain.window.js.ini index 3fb79e99bd7..91ad54bd932 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/text-plain.window.js.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/text-plain.window.js.ini @@ -95,9 +95,6 @@ [text/plain: single quote in value (normal form)] expected: FAIL - [text/plain: single quote in value (formdata event)] - expected: FAIL - [text/plain: single quote in filename (normal form)] expected: FAIL @@ -170,9 +167,6 @@ [text/plain: \\n in value (normal form)] expected: FAIL - [text/plain: Basic File test (formdata event)] - expected: FAIL - [text/plain: 0x00 in filename (formdata event)] expected: FAIL @@ -181,3 +175,6 @@ [text/plain: \\r\\n in name (formdata event)] expected: FAIL + + [text/plain: single quote in name (normal form)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini index 1ee60c7c306..e5d591f4ceb 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini @@ -181,3 +181,6 @@ [application/x-www-form-urlencoded: single quote in name (formdata event)] expected: FAIL + + [application/x-www-form-urlencoded: Basic File test (formdata event)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini index cc18f512574..071b4378add 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini @@ -11,6 +11,3 @@ [Check that rel=noopener with target=_parent does a normal load] expected: FAIL - - [Check that rel=noopener with target=_self does a normal load] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/semantics/popovers/popover-types-with-hints.tentative.html.ini b/tests/wpt/meta-legacy-layout/html/semantics/popovers/popover-types-with-hints.tentative.html.ini index 9f9abc2e2b3..581966ec1be 100644 --- a/tests/wpt/meta-legacy-layout/html/semantics/popovers/popover-types-with-hints.tentative.html.ini +++ b/tests/wpt/meta-legacy-layout/html/semantics/popovers/popover-types-with-hints.tentative.html.ini @@ -25,3 +25,9 @@ [If a popover=auto is shown, it should hide any open popover=hint, including if the popover=hint is an ancestral popover of the popover=auto. (You can't nest a popover=auto inside a popover=hint)] expected: FAIL + + [You can nest hint popovers] + expected: FAIL + + [If you: a) show a popover=auto (call it D), then b) show a non-descendent popover=hint of D (call it T), then c) hide D, then T should be hidden. (Non-nested popover=hint gets hidden when unrelated popover=autos are hidden)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/syntax/parsing/DOMContentLoaded-defer.html.ini b/tests/wpt/meta-legacy-layout/html/syntax/parsing/DOMContentLoaded-defer.html.ini deleted file mode 100644 index b8bdf33cb65..00000000000 --- a/tests/wpt/meta-legacy-layout/html/syntax/parsing/DOMContentLoaded-defer.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[DOMContentLoaded-defer.html] - [The end: DOMContentLoaded and defer scripts] - expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index e55f8f2ce3c..7d4c3a1b06d 100644 --- a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -5,4 +5,4 @@ expected: TIMEOUT [The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini index 8652a34d6c2..d53e777878e 100644 --- a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini +++ b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini @@ -146,3 +146,21 @@ [not shadowed beforetoggle (window)] expected: FAIL + + [shadowed pagereveal (document.body)] + expected: FAIL + + [shadowed pagereveal removal (document.body)] + expected: FAIL + + [shadowed pagereveal (document.createElement("body"))] + expected: FAIL + + [shadowed pagereveal removal (document.createElement("body"))] + expected: FAIL + + [shadowed pagereveal (window)] + expected: FAIL + + [shadowed pagereveal removal (window)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini index c00f9f0a377..e43e5549ed3 100644 --- a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini +++ b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini @@ -142,3 +142,21 @@ [not shadowed beforetoggle (window)] expected: FAIL + + [shadowed pagereveal (document.body)] + expected: FAIL + + [shadowed pagereveal removal (document.body)] + expected: FAIL + + [shadowed pagereveal (document.createElement("frameset"))] + expected: FAIL + + [shadowed pagereveal removal (document.createElement("frameset"))] + expected: FAIL + + [shadowed pagereveal (window)] + expected: FAIL + + [shadowed pagereveal removal (window)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini index fe670236729..ea730d5c049 100644 --- a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini +++ b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini @@ -85,3 +85,15 @@ [beforetoggle is unaffected on a windowless frameset] expected: FAIL + + [Return null when getting the pagereveal event handler of a windowless body] + expected: FAIL + + [Ignore setting of pagereveal window event handlers on windowless body] + expected: FAIL + + [Return null when getting the pagereveal event handler of a windowless frameset] + expected: FAIL + + [Ignore setting of pagereveal window event handlers on windowless frameset] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini index dbe1def99e3..7237f5792de 100644 --- a/tests/wpt/meta-legacy-layout/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini +++ b/tests/wpt/meta-legacy-layout/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini @@ -1,9 +1,10 @@ [promise-job-entry-different-function-realm.html] + expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: FAIL + expected: TIMEOUT [Thenable resolution] expected: FAIL @@ -12,4 +13,4 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.html.ini b/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.html.ini index 918016b21b8..12581463c49 100644 --- a/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.html.ini +++ b/tests/wpt/meta-legacy-layout/resource-timing/test_resource_timing.html.ini @@ -69,3 +69,5 @@ [PerformanceEntry has correct protocol attribute (xmlhttprequest)] expected: FAIL + [PerformanceEntry has correct name, initiatorType, startTime, and duration (img)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html.ini b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html.ini index f499807276c..dbc7431d234 100644 --- a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html.ini +++ b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html.ini @@ -1,4 +1,5 @@ [audiobuffer-copy-channel.html] + expected: CRASH [# AUDIT TASK RUNNER FINISHED: 2 out of 5 tasks were failed.] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini index 5cd220f3292..dc36e5952ea 100644 --- a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini +++ b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini @@ -949,3 +949,9 @@ [X SNR (-105.16635012965943 dB) is not greater than or equal to 65.737. Got -105.16635012965943.] expected: FAIL + + [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[15073\]\t-4.2321335599992511e+26\t6.4605611562728882e-1\t4.2321335599992511e+26\t6.5507213036596007e+26\t3.8985999999999999e-3\n\t[15074\]\t2.5936898589134216e-1\t5.9696805477142334e-1\t3.3759906888008118e-1\t5.6552283858697683e-1\t3.8985999999999999e-3\n\tMax AbsError of 4.2321335599992511e+26 at index of 15073.\n\tMax RelError of 6.5507213036596007e+26 at index of 15073.\n] + expected: FAIL + + [X SNR (-489.0971013549079 dB) is not greater than or equal to 65.737. Got -489.0971013549079.] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/webgl/idlharness.any.js.ini b/tests/wpt/meta-legacy-layout/webgl/idlharness.any.js.ini index b429262aa81..4063e1c6d5d 100644 --- a/tests/wpt/meta-legacy-layout/webgl/idlharness.any.js.ini +++ b/tests/wpt/meta-legacy-layout/webgl/idlharness.any.js.ini @@ -3899,6 +3899,24 @@ [WebGL2RenderingContext interface: operation getBufferSubData(GLenum, GLintptr, ArrayBufferView, optional unsigned long long, optional GLuint)] expected: FAIL + [WebGLRenderingContext interface: constant RGBA8 on interface object] + expected: FAIL + + [WebGLRenderingContext interface: constant RGBA8 on interface prototype object] + expected: FAIL + + [WebGLRenderingContext interface: attribute drawingBufferFormat] + expected: FAIL + + [WebGLRenderingContext interface: operation drawingBufferStorage(GLenum, unsigned long, unsigned long)] + expected: FAIL + + [WebGL2RenderingContext interface: attribute drawingBufferFormat] + expected: FAIL + + [WebGL2RenderingContext interface: operation drawingBufferStorage(GLenum, unsigned long, unsigned long)] + expected: FAIL + [idlharness.any.worker.html] [WebGL2RenderingContext interface: constant ONE_MINUS_SRC_COLOR on interface object] @@ -10185,3 +10203,21 @@ [WebGL2RenderingContext interface: operation getBufferSubData(GLenum, GLintptr, ArrayBufferView, optional unsigned long long, optional GLuint)] expected: FAIL + + [WebGLRenderingContext interface: constant RGBA8 on interface object] + expected: FAIL + + [WebGLRenderingContext interface: constant RGBA8 on interface prototype object] + expected: FAIL + + [WebGLRenderingContext interface: attribute drawingBufferFormat] + expected: FAIL + + [WebGLRenderingContext interface: operation drawingBufferStorage(GLenum, unsigned long, unsigned long)] + expected: FAIL + + [WebGL2RenderingContext interface: attribute drawingBufferFormat] + expected: FAIL + + [WebGL2RenderingContext interface: operation drawingBufferStorage(GLenum, unsigned long, unsigned long)] + expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/webmessaging/with-ports/017.html.ini b/tests/wpt/meta-legacy-layout/webmessaging/without-ports/017.html.ini index c7946fc91b4..c7946fc91b4 100644 --- a/tests/wpt/meta-legacy-layout/webmessaging/with-ports/017.html.ini +++ b/tests/wpt/meta-legacy-layout/webmessaging/without-ports/017.html.ini diff --git a/tests/wpt/meta-legacy-layout/workers/baseurl/alpha/import-in-moduleworker.html.ini b/tests/wpt/meta-legacy-layout/workers/baseurl/alpha/import-in-moduleworker.html.ini index 987e8a93681..36d21059338 100644 --- a/tests/wpt/meta-legacy-layout/workers/baseurl/alpha/import-in-moduleworker.html.ini +++ b/tests/wpt/meta-legacy-layout/workers/baseurl/alpha/import-in-moduleworker.html.ini @@ -1,4 +1,3 @@ [import-in-moduleworker.html] - expected: ERROR [Base URL in module dedicated workers: import] expected: FAIL diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index 072df46e6d7..254dd83ae76 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -63,6 +63,13 @@ {} ] ], + "aria-owned-with-role-change.html": [ + "c5b2130969c018dce682e2d1a404570f5c26f4e9", + [ + null, + {} + ] + ], "aria-owns-destroyed-by-content-replacement.html": [ "b64ebaa6024f50f68249204d21b60b1a2109179b", [ @@ -98,6 +105,13 @@ {} ] ], + "aria-owns-with-role-change.html": [ + "13e1eaff6dd097c06d6275ebc9fe6646850454bf", + [ + null, + {} + ] + ], "bdo-table-cell.html": [ "ae12541f8d8cb97248a7a7f3a3683f753aa96377", [ @@ -5453,6 +5467,13 @@ {} ] ], + "insertimage-with-replacing-selection-in-picture-element.html": [ + "aaae4c7c9fd1ca95ca3b0e71dbed32bd2e660ccf", + [ + null, + {} + ] + ], "insertlinebreak-around-comment-node.html": [ "dc2d5e2bd4b43b382034e78dfea317d69fbf5738", [ @@ -5810,6 +5831,13 @@ {} ] ], + "set-output-value-to-empty-while-deleting-its-content.html": [ + "6ddf89205f78a26a55df73d85fcb5759b2a5efb8", + [ + null, + {} + ] + ], "textarea-will-be-blurred-by-focus-event-listener.html": [ "bcb145c309901ce49369ae539fc338f1efb35656", [ @@ -7369,6 +7397,15 @@ ] ] }, + "resize-observer": { + "multiple-observers-with-mutation-crash.html": [ + "c844854e5cfd316a381f86251acff020994f3f7a", + [ + null, + {} + ] + ] + }, "scroll-animations": { "crashtests": { "invalid-animation-range.html": [ @@ -7435,6 +7472,13 @@ {} ] ], + "selection-modify-per-word-in-table-header-group.html": [ + "66a57381eda5db2c3bba532cad9f9ef8423072f3", + [ + null, + {} + ] + ], "table.html": [ "36eb803a5cbbe6b397ebb76659d1da7a8ae5d881", [ @@ -161147,6 +161191,32 @@ {} ] ], + "contain-paint-dynamic-002.html": [ + "0096e83d5bfc18d31503c2ae3cef432918f4bb9a", + [ + null, + [ + [ + "/css/css-contain/contain-paint-dynamic-002-ref.html", + "==" + ] + ], + {} + ] + ], + "contain-paint-dynamic-003.html": [ + "e7fcbac0e6ac45ee15a49aa2bb68a5800696648b", + [ + null, + [ + [ + "/css/css-contain/contain-paint-dynamic-003-ref.html", + "==" + ] + ], + {} + ] + ], "contain-paint-formatting-context-float-001.html": [ "95242072b100ca3f27203f2f9c6748e4dd7c89b4", [ @@ -164133,6 +164203,45 @@ {} ] ], + "content-visibility-paint-containment-001.html": [ + "b18a9cb1e92eb81706473d4b09b3368ea1efa09b", + [ + null, + [ + [ + "/css/css-contain/content-visibility/content-visibility-paint-containment-001-ref.html", + "==" + ] + ], + {} + ] + ], + "content-visibility-paint-containment-002.html": [ + "bfe6d13b39492f8a971662bab452cbfc8fc0e232", + [ + null, + [ + [ + "/css/css-contain/content-visibility/content-visibility-paint-containment-002-ref.html", + "==" + ] + ], + {} + ] + ], + "content-visibility-paint-containment-003.html": [ + "0a4de9c4e55cb85241b3aff06e6929d165426f72", + [ + null, + [ + [ + "/css/css-contain/content-visibility/content-visibility-paint-containment-003-ref.html", + "==" + ] + ], + {} + ] + ], "content-visibility-resize-observer-no-error.html": [ "f323e606039e72a696d2de75eb0d43c7f9cab095", [ @@ -196777,6 +196886,132 @@ } ] ], + "custom-highlight-container-metrics-001.html": [ + "1e22dcc9924f89356ccc9f42533029485aa4d70c", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-container-metrics-001-ref.html", + "==" + ] + ], + {} + ] + ], + "custom-highlight-container-metrics-002.html": [ + "0a805cf7ea4714694286396c8e5a4b52c73266a1", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-container-metrics-002-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 60 + ], + [ + 0, + 25 + ] + ] + ] + ] + } + ] + ], + "custom-highlight-container-metrics-003.html": [ + "189db49bd3e7c73f2a1affa3a18cb5d3e811afdb", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-container-metrics-003-ref.html", + "==" + ] + ], + {} + ] + ], + "custom-highlight-container-metrics-004.html": [ + "158f4ee12c91436cda7946d5574cd37ddf308876", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-container-metrics-004-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 60 + ], + [ + 0, + 25 + ] + ] + ] + ] + } + ] + ], + "custom-highlight-container-metrics-005.html": [ + "d7be78d1fdb8f3e6748c14171bb0d2ad143bf028", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-container-metrics-003-ref.html", + "==" + ] + ], + {} + ] + ], + "custom-highlight-container-metrics-006.html": [ + "4bcae073b5dffba017ad5a52a6021a96c18a0efa", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-container-metrics-002-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 60 + ], + [ + 0, + 25 + ] + ] + ] + ] + } + ] + ], "custom-highlight-font-metrics-001.html": [ "755409c6b18d1585e3ba10896c3e7ee5537a05ea", [ @@ -196922,6 +197157,64 @@ } ] ], + "custom-highlight-logical-metrics-001.html": [ + "0bca0ea6394a0a903e56cfb6c622ffd98f89735d", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-logical-metrics-001-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 30 + ], + [ + 0, + 10 + ] + ] + ] + ] + } + ] + ], + "custom-highlight-logical-metrics-002.html": [ + "9e8acc054db2ad9f96a2f8230eacc9e301a1903c", + [ + null, + [ + [ + "/css/css-highlight-api/painting/custom-highlight-logical-metrics-002-ref.html", + "==" + ] + ], + { + "fuzzy": [ + [ + null, + [ + [ + 0, + 30 + ], + [ + 0, + 10 + ] + ] + ] + ] + } + ] + ], "custom-highlight-painting-001.html": [ "82b61ec6de07c4d45796785f3e7b559e64a6deab", [ @@ -219443,7 +219736,7 @@ ] ], "conditional-rules.html": [ - "55ecc1f9e49bca5524ef95ca6775b625971ec7a1", + "ec6f781960b17e46bbfc73478296b1fc05fbb0b3", [ null, [ @@ -251491,215 +251784,179 @@ {} ] ], - "text-spacing-trim-space-first-wrap-001.html": [ - "ebbea0e52b09c21be870ffd2dea48d2b70d4cb88", + "text-spacing-trim-start-001.html": [ + "3d481df1da2f6bcf7c56abbfc05c0f218f1d48d4", [ - "css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html?class=chws,htb", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=chws,htb", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001-ref.html?class=chws,htb", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=chws,htb", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html?class=chws,vrl", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=chws,vrl", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001-ref.html?class=chws,vrl", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=chws,vrl", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html?class=halt,htb", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=halt,htb", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001-ref.html?class=halt,htb", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=halt,htb", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html?class=halt,vrl", - [ - [ - "/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001-ref.html?class=halt,vrl", - "==" - ] - ], - {} - ] - ], - "text-spacing-trim-space-first-wrap-br-001.html": [ - "acbfaa3ddcba0a1029676eb39dc9e8d45e2ad495", - [ - "css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html?class=chws,htb", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=halt,vrl", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=chws,htb", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=halt,vrl", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html?class=chws,vrl", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=space-first,chws,htb", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=chws,vrl", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=space-first,chws,htb", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html?class=halt,htb", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=space-first,chws,vrl", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=halt,htb", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=space-first,chws,vrl", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html?class=halt,vrl", - [ - [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=halt,vrl", - "==" - ] - ], - {} - ] - ], - "text-spacing-trim-trim-all-001.html": [ - "ca2b1ccd038c847c6a7a13a5b0d8bf7f2cb7edcc", - [ - "css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001.html?class=chws,htb", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=space-first,halt,htb", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001-ref.html?class=chws,htb", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=space-first,halt,htb", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001.html?class=chws,vrl", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=space-first,halt,vrl", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001-ref.html?class=chws,vrl", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=space-first,halt,vrl", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001.html?class=halt,htb", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=trim-start,chws,htb", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001-ref.html?class=halt,htb", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=trim-start,chws,htb", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001.html?class=halt,vrl", - [ - [ - "/css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001-ref.html?class=halt,vrl", - "==" - ] - ], - {} - ] - ], - "text-spacing-trim-wrap-001.html": [ - "76af819d79cd53831be4670b401d16158ff6efb5", - [ - "css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html?class=chws,htb", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=trim-start,chws,vrl", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=chws,htb", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=trim-start,chws,vrl", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html?class=chws,vrl", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=trim-start,halt,htb", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=chws,vrl", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=trim-start,halt,htb", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html?class=halt,htb", + "css/css-text/text-spacing-trim/text-spacing-trim-start-001.html?class=trim-start,halt,vrl", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=halt,htb", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html?class=trim-start,halt,vrl", "==" ] ], {} - ], + ] + ], + "text-spacing-trim-start-002.html": [ + "0d8b19272660b9973fa7ed1bf903f657ab342ba5", [ - "css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html?class=halt,vrl", + null, [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=halt,vrl", + "/css/css-text/text-spacing-trim/text-spacing-trim-start-002-ref.html", "==" ] ], {} ] ], - "text-spacing-trim-wrap-br-001.html": [ - "017443976f876546bd58d9c98c039bb3f6168874", + "text-spacing-trim-trim-all-001.html": [ + "ca2b1ccd038c847c6a7a13a5b0d8bf7f2cb7edcc", [ - "css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html?class=chws,htb", + "css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001.html?class=chws,htb", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=chws,htb", + "/css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001-ref.html?class=chws,htb", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html?class=chws,vrl", + "css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001.html?class=chws,vrl", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=chws,vrl", + "/css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001-ref.html?class=chws,vrl", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html?class=halt,htb", + "css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001.html?class=halt,htb", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=halt,htb", + "/css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001-ref.html?class=halt,htb", "==" ] ], {} ], [ - "css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html?class=halt,vrl", + "css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001.html?class=halt,vrl", [ [ - "/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html?class=halt,vrl", + "/css/css-text/text-spacing-trim/text-spacing-trim-trim-all-001-ref.html?class=halt,vrl", "==" ] ], @@ -257301,7 +257558,7 @@ ] ], "trailing-space-rtl-001.html": [ - "8bc6cc75cbeaf8b6a091b2aadd5eead52d3b1bfd", + "0550f7279fcea337f7065f8f4bd52c67a5a96f5b", [ null, [ @@ -320870,12 +321127,25 @@ "fullscreen": { "rendering": { "backdrop-iframe.html": [ - "710d1b48f182d0fcb577298c72bbf6a7f7329dbf", + "dbdf9c841a4685160987ed5df0ba5e632b754669", + [ + null, + [ + [ + "/fullscreen/rendering/backdrop-green-ref.html", + "==" + ] + ], + {} + ] + ], + "backdrop-inherit.html": [ + "3a38dc4c815269bcba1fb570c1b0ee1a06ff8b2e", [ null, [ [ - "/fullscreen/rendering/backdrop-iframe-ref.html", + "/fullscreen/rendering/backdrop-green-ref.html", "==" ] ], @@ -331292,7 +331562,7 @@ ] ], "selectlist-option-arbitrary-content-not-displayed.tentative.html": [ - "66b87ec33b9cc279b67c7d7ed9d1d1f617af5611", + "e7cacdba2711e2f4e3d187704abc43e2adcbd8ea", [ null, [ @@ -332799,7 +333069,7 @@ }, "the-bdi-element": { "bdi-auto-dir-default.html": [ - "e658500a4ebf02ef92b416a060d5c7335d640ca2", + "3a9d90c76b33795c0760796762400ca9662f7db5", [ null, [ @@ -341753,6 +342023,19 @@ {} ] ], + "gradient-in-symbol.svg": [ + "be0f4ff895315f4382863ba37d376fd29aa42184", + [ + null, + [ + [ + "/svg/struct/reftests/reference/green-100x100.svg", + "==" + ] + ], + {} + ] + ], "nested-svg-through-display-contents.svg": [ "1be64d5242f9f65f53cd079df270c8a2232b741b", [ @@ -342051,6 +342334,19 @@ ], {} ] + ], + "use-symbol-display-none.svg": [ + "7cb2720d7e869d6871297aebfd3fb7eb13bc4960", + [ + null, + [ + [ + "/svg/struct/reftests/reference/green-100x100.svg", + "==" + ] + ], + {} + ] ] } }, @@ -346525,7 +346821,7 @@ ], "derive_bits_keys": { "cfrg_curves_bits.js": [ - "4e12ca0eb711fae5168eb1a17db756588ef4eab6", + "ef6905e574c1581d0e5397ba9d5f955acec41b2c", [] ], "cfrg_curves_bits_fixtures.js": [ @@ -346537,7 +346833,7 @@ [] ], "ecdh_bits.js": [ - "e52ffc6bfdb6f6d4655cfa14b835adbebd088a2a", + "cb9747a529fd53530df926ddc99759e5a9126ee9", [] ], "ecdh_keys.js": [ @@ -346545,7 +346841,7 @@ [] ], "hkdf.js": [ - "2bb58533473eb9997151b43d342b7ef9ec06701d", + "3903da5cddff941c9ff82b19b0967ba41f0737f5", [] ], "hkdf_vectors.js": [ @@ -346553,7 +346849,7 @@ [] ], "pbkdf2.js": [ - "0403f382e1479c7c5018e91aba2ceb31b89998dc", + "4e4ae79d800a402b7a0933b752da9a5fb151bc2f", [] ], "pbkdf2_vectors.js": [ @@ -369772,6 +370068,10 @@ "15053e055d6fb085556aea01507edf21f14f347a", [] ], + "src-trailing-dot.sub.any.js.sub.headers": [ + "4a8ad9c0f5438fc9e917eafacb6c5dbaf5edd60b", + [] + ], "support": { "304-response.py": [ "f9756555f79ee350f9b86de5b5b221c056265e09", @@ -370080,7 +370380,7 @@ } }, "nonce-hiding": { - "dangling-html-or-body.html.headers": [ + "dangling-html-or-body.tentative.html.headers": [ "67d4c81e589d487b25bdb73a89f8ba1c49a0c431", [] ], @@ -393960,6 +394260,14 @@ "8861d19f888aa155ffdb6c3bbdd8a81e04ccaf8b", [] ], + "contain-paint-dynamic-002-ref.html": [ + "58473c86492bf4ce0c53b46f03c989a96a9e5b49", + [] + ], + "contain-paint-dynamic-003-ref.html": [ + "b30f32d9c3d4a1ab037e6ca5cea92c958f340637", + [] + ], "contain-paint-formatting-context-float-001-ref.html": [ "ceff7f4569e1a7e6b0b36b9f9b3f50317b320bad", [] @@ -394306,7 +394614,7 @@ [] ], "content-visibility-095-ref.html": [ - "844ca37eb6c05fa6b419227a55af8553bb61918c", + "3e7d8cd92b328e3f6335be320336420603e7c08d", [] ], "content-visibility-animation-and-scroll-ref.html": [ @@ -394345,6 +394653,18 @@ "258cdfacab67cd5cc0bc4a468474f8b039517b10", [] ], + "content-visibility-paint-containment-001-ref.html": [ + "1e8e96df13f8525bd964538d9f453adf3ff80cb0", + [] + ], + "content-visibility-paint-containment-002-ref.html": [ + "e71e9c0c9f8d321699710d2bf65eb00f38de404c", + [] + ], + "content-visibility-paint-containment-003-ref.html": [ + "43f3a2ed480b61e0eda0f3c60709acd4e4a720d1", + [] + ], "content-visibility-resize-observer-no-error-ref.html": [ "228eebfaa6b6018dc60db090971f2f8176614a27", [] @@ -407393,7 +407713,7 @@ ] }, "stretch-grid-item-button-overflow-ref.html": [ - "900c794af10e750ce98b50dd5d15016d963f471e", + "a798dffe958bda179c300e0ddc570eb39799702b", [] ], "stretch-grid-item-checkbox-input-ref.html": [ @@ -407689,6 +408009,22 @@ "5e9ef64579800a922d225ab9ca458555fe067dcc", [] ], + "custom-highlight-container-metrics-001-ref.html": [ + "92751144a267b7f7b041a5adf0bcdb54703f2f2b", + [] + ], + "custom-highlight-container-metrics-002-ref.html": [ + "98ccfa5b11c7dcb8c83beca3f863742792bb30af", + [] + ], + "custom-highlight-container-metrics-003-ref.html": [ + "d3d75333f8a09a61286f2981d999b01e3f486b85", + [] + ], + "custom-highlight-container-metrics-004-ref.html": [ + "98ccfa5b11c7dcb8c83beca3f863742792bb30af", + [] + ], "custom-highlight-font-metrics-001-ref.html": [ "76b7317caabe5bedf10a98bef5cade11a4f6458e", [] @@ -407709,6 +408045,14 @@ "bbfc952116f2f2c86009d8ce6d301d635d71f6e8", [] ], + "custom-highlight-logical-metrics-001-ref.html": [ + "09bc7fac5e5d5bfe067b4cc6f5c19d932be64acd", + [] + ], + "custom-highlight-logical-metrics-002-ref.html": [ + "eaed1580f9f76beccece89e9bcd3d489440b4e63", + [] + ], "custom-highlight-painting-001-ref.html": [ "b058789f6de04c017dec9a37d8955485dcd6b7e9", [] @@ -418977,16 +419321,16 @@ "d33e3b62edd31029751ac32bcbdb6178df90d563", [] ], - "text-spacing-trim-space-first-wrap-001-ref.html": [ - "5295bdc34fff440fc3c75c6d1a1600390f601573", + "text-spacing-trim-start-001-ref.html": [ + "aef81fbbc0d3d0be562bd2cd4388c4be16bbf128", [] ], - "text-spacing-trim-trim-all-001-ref.html": [ - "d541fcc5f810629f4eb8d0d97bc6f0b6db8adba3", + "text-spacing-trim-start-002-ref.html": [ + "fd4ca6d6913dcea4ea8b2d6c1b1cf6381a40773d", [] ], - "text-spacing-trim-wrap-001-ref.html": [ - "b03890c59ca77ffcb4a20bc749c92221b234951e", + "text-spacing-trim-trim-all-001-ref.html": [ + "d541fcc5f810629f4eb8d0d97bc6f0b6db8adba3", [] ] }, @@ -419663,7 +420007,7 @@ [] ], "trailing-space-rtl-001-ref.html": [ - "f3f25235911e7a317377a57d66d68318aaf2eaf6", + "25094d539d8609bf5c7bea575f41e5248bf91720", [] ], "white-space-applies-to-text-001-ref.html": [ @@ -428164,7 +428508,7 @@ [] ], "scroll-behavior.js": [ - "0a0968e025bd8604c0765352d3a2e8b3cc1233aa", + "b22ebf8c21f7216507988bb85df4cf4e09ec7698", [] ], "square-purple.png": [ @@ -430931,7 +431275,7 @@ [] ], "chrome.md": [ - "aca93ea2e590c6dbfe6f56618364fbb42cba636e", + "a3ccd95768fdbc160af99bc647f1023a3dbc5ddc", [] ], "chrome_android.md": [ @@ -430951,7 +431295,7 @@ [] ], "from-local-system.md": [ - "f40f8e5ece9b0bc677e49ad6bb269e118c0f1eed", + "89533ee210440279675cf653292298e04dcdabe3", [] ], "from-web.md": [ @@ -434016,15 +434360,15 @@ [] ], "default-enabled-features-allow-all.https.html.headers": [ - "d39cf98dd5c71f5777e73544886fccf9f664a01d", + "c3d2f1fcfb6b9ab435c06a6d201be37f67bf6d3f", [] ], "default-enabled-features-allow-none.https.html.headers": [ - "5d534499d74aa101116b8473b325a00d561466f1", + "2aa0b2f5ae26f82d55a1bf700968875bab057755", [] ], "default-enabled-features-allow-self.https.html.headers": [ - "8bfa33eb8a3965f96ea5ad38237f59cb058b2319", + "76ab816ec048067dca577e8b25b062bec60cfca5", [] ], "default-enabled-features-attribution-disabled.https.html.headers": [ @@ -434076,6 +434420,10 @@ "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", [] ], + "automatic-beacon-helper.js": [ + "d0a4133e84c93344058a94527a35a6fb42a62eb8", + [] + ], "automatic-beacon-store.py": [ "ba1b73201bcce6287c0a7d5489ff5968ca12ad99", [] @@ -434669,7 +435017,7 @@ [] ], "resize-lock-inner-input.html": [ - "cb17789b45055c280ff3a5f6be515a39758e34cc", + "5513f89d393ceb3efb2055e4ceec0976be6f799f", [] ], "resize-lock-inner-input.html.headers": [ @@ -436111,6 +436459,10 @@ "5ee533e1820d737f6cbfb8cc4f5b7a134706c3fd", [] ], + "open-to-existing-window.html": [ + "6460024bc80c1709bf9d805f7f51413de0c251f2", + [] + ], "openee.html": [ "8f0a859cb3256c0535738f4e3c445c41532cf82b", [] @@ -436148,7 +436500,11 @@ [] ], "support.sub.js": [ - "69d8f50f18fe71e780eb1e61b92b4c136b717191", + "308e86b08ac2b6fd638e533f7538ed641fca1ccd", + [] + ], + "update-location.html": [ + "a0f2b43856abc4518ecd37b8d2c4aa59ee3aa48d", [] ], "worker-blob-fetcher.html": [ @@ -436354,7 +436710,7 @@ [] ], "worklet-helpers.js": [ - "dd3b9a7dd518a0dd2d6b1d9b63315f427562f35a", + "2147a026aec6818cb3204971037d8cebd14e9d30", [] ] } @@ -437818,7 +438174,7 @@ } }, "rendering": { - "backdrop-iframe-ref.html": [ + "backdrop-green-ref.html": [ "3126fe194261f7ce7f6039885e4ec73e7a997468", [] ], @@ -455405,14 +455761,16 @@ }, "testdriver": { "actions": { - "crossOriginChild.html": [ - "48e37e233e14f690e6464257a22f70528edf720d", - [] - ], "iframeChild.html": [ "a46c54a7b7b51fec65d335ad54fc8fb4ca4c2050", [] ], + "support": { + "actions.html": [ + "767368b3ab46847683b2260d6086e37939901bc5", + [] + ] + }, "touchEvents.js": [ "c1213b6693bd8a43da07e57c9c6bab11e0a64184", [] @@ -455461,10 +455819,6 @@ "get_named_cookie.sub.https.html.headers": [ "3dc39a56736614f1d864bda185f368e3adba7419", [] - ], - "interacted_window.html": [ - "708cb9a84b5a28e4a3e586b9f05264907c2efb9c", - [] ] }, "webdriver": { @@ -455570,7 +455924,7 @@ [] ], "FedCM.idl": [ - "9b18d951f83985bd3415d8aa2a1cf9636e1d981c", + "a42a2f7f6a6146c2664da7b944e4b16ea65fbb9a", [] ], "FileAPI.idl": [ @@ -455725,6 +456079,10 @@ "d8c5aa69a87293e6f40d5e471ff29f990d285c4c", [] ], + "anonymous-iframe.idl": [ + "11d19e320a804d41bfbc5d752085b761673a0df7", + [] + ], "attribution-reporting-api.idl": [ "ed4497b56ff5b7cafe3ae43ae1fcba1638f4b29c", [] @@ -455922,7 +456280,7 @@ [] ], "css-transitions.idl": [ - "0f00b2c014c1ceb370b917353dc18f9fd2013bea", + "d4ff45e486239c7b35afb0fae97d6c1c539c2416", [] ], "css-typed-om.idl": [ @@ -455930,7 +456288,7 @@ [] ], "css-view-transitions-2.idl": [ - "fe1f0e30e7d1fb471b6630dce4dc7fd6d04e846f", + "7435605cdaf6b0583e3682002130f0020894303a", [] ], "css-view-transitions.idl": [ @@ -455945,10 +456303,6 @@ "94cd1912b9123f1c30dcc82566005f101b19f840", [] ], - "custom-state-pseudo-class.idl": [ - "342f1ede0b030a85271a5db71b3773d1531aee48", - [] - ], "datacue.idl": [ "f84d6e9b5f1dd4a13dbe406c7cec1ce86e160ba9", [] @@ -455974,7 +456328,7 @@ [] ], "dom.idl": [ - "929fa8d03b34dfe570968d824ad0b625ed558033", + "cf2d4e4adc58319842b0e7873c012cf4a8777f39", [] ], "edit-context.idl": [ @@ -456082,7 +456436,7 @@ [] ], "html.idl": [ - "b7501feea91d5d428061ec7a8acfc33402d2eb23", + "434d0cc0ab1d0456583190224605912275cf2634", [] ], "idle-detection.idl": [ @@ -456150,7 +456504,7 @@ [] ], "longtasks.idl": [ - "064d1072d2d76bd3a80333788102d8f835b48a4e", + "71ab2ddc67ccda6f18e56fa65c83cc74203bae9a", [] ], "magnetometer.idl": [ @@ -456178,7 +456532,7 @@ [] ], "media-source.idl": [ - "adaac2ca9b22475cf3148476da25c2f14b412e33", + "7a86a7a43c8fe9ac92922609495db637568dae75", [] ], "mediacapture-automation.idl": [ @@ -456238,7 +456592,7 @@ [] ], "orientation-event.idl": [ - "965e833fd21966b587c253521c3188f9db611186", + "ffacfe576f2340922176710930f710466b36bc09", [] ], "orientation-sensor.idl": [ @@ -456418,7 +456772,7 @@ [] ], "serial.idl": [ - "e624c3c1a60f8d76d821c4a8628b6c1cdb9167db", + "37986b7ac2f29a2a42de78819e7da06fd58ad707", [] ], "server-timing.idl": [ @@ -456446,7 +456800,7 @@ [] ], "storage-buckets.idl": [ - "79f6c947d16a60d58c5b438476b6ba1c144ed6a9", + "581ba8e0bb3b3871a737988f4b7fb1abb784bef1", [] ], "storage.idl": [ @@ -456482,7 +456836,7 @@ [] ], "turtledove.idl": [ - "4700a98038c552c9eff400e5e1228f08c4243e02", + "f5813b5d03d6f7fc35c37c6bbb3bdc4f81aba556", [] ], "ua-client-hints.idl": [ @@ -456490,7 +456844,7 @@ [] ], "uievents.idl": [ - "fef90d48410b343483493a6be6b734a7c972583e", + "b34ca2e77535d98814fdd58c2b24d3f16b9c85f0", [] ], "url.idl": [ @@ -456498,7 +456852,7 @@ [] ], "urlpattern.idl": [ - "788486bb62731aa0d42c504c0a1b77f9a8d16f96", + "ca9fb979d229392f936600fd179b4660717c9f33", [] ], "user-timing.idl": [ @@ -456522,7 +456876,7 @@ [] ], "wai-aria.idl": [ - "3434bf7c2d345112448ab90edadb073cff02c32d", + "13e3b0f8b1976330788059ab61b263ba2f7a7ebd", [] ], "wasm-js-api.idl": [ @@ -456574,7 +456928,7 @@ [] ], "webauthn.idl": [ - "e28355eb78d3829207848a76facfea170eb66998", + "e56d61314af4a03ca1a98c3a822c33e8d6722fab", [] ], "webcodecs-aac-codec-registration.idl": [ @@ -456618,15 +456972,15 @@ [] ], "webgl1.idl": [ - "b61f031ab28248a73891a60640912acad5b7d0ac", + "4552610c0d58222b34a345b21baf72ece278eb48", [] ], "webgl2.idl": [ - "9cb639932e82fc45ab626ec00f8f28831c66eb13", + "25c2b4dad28e1417dcde632fd67cc677a35c6055", [] ], "webgpu.idl": [ - "373d51dff13ee61b22cd36dd6dba132810ef621b", + "15074009cf65b4fbb79f995900565d6af94cec86", [] ], "webhid.idl": [ @@ -456634,7 +456988,7 @@ [] ], "webidl.idl": [ - "4d0dfaa106275fe94b5202d19c34c7bbcf9a10b5", + "dff46c557cb4c608ba2c1ead01fb025fbcb1ff8c", [] ], "webmidi.idl": [ @@ -456642,11 +456996,11 @@ [] ], "webnn.idl": [ - "2a9d0e639fbbad2668cf5a09b7ab387e3ecd99b7", + "ef57f3bb9134c00dca9c48ab4899e82293bc4035", [] ], "webrtc-encoded-transform.idl": [ - "3b169b066dc635fdd5c970ba4e938723f4561de8", + "8a756702c7eaddda600a1e2848f6e62d0413d24b", [] ], "webrtc-ice.idl": [ @@ -456662,7 +457016,7 @@ [] ], "webrtc-stats.idl": [ - "8e65578b6ee1e3d566e052836be7d76f81d7230e", + "0b2e956a2078b52420a2f528beae1969fa2d1b38", [] ], "webrtc-svc.idl": [ @@ -456678,7 +457032,7 @@ [] ], "webtransport.idl": [ - "86178a4906b7a7951b34529d2d64648580af87c1", + "281c096d21d6849c38d4eaef62dbe082bd748536", [] ], "webusb.idl": [ @@ -457396,7 +457750,7 @@ [] ], "utils.js": [ - "574af6d6b8c716ba066f49014adabe4b6e1a537a", + "aa537d39a780d9d402aebc49c43c2ed733ef343b", [] ] } @@ -461132,6 +461486,10 @@ "8fa0ce2123c4f876a71b1ca80e04931614f3b87f", [] ], + "exif-orientation-bottom-right.png": [ + "261d5f4c120d5bec05faab969b6476aa6f512989", + [] + ], "trns-high-bits-set.png": [ "4e309a89a8a27a9f7afb6eee6a4a604a3ef7c249", [] @@ -468690,7 +469048,7 @@ [] ], "utils.js": [ - "56ab603fdffb962062f75bace5f1cef45bf54f6b", + "940edcc0ca359e3ececefac7498acf66af898c67", [] ], "wake-lock.https.html": [ @@ -468903,7 +469261,7 @@ [] ], "storage-access-beyond-cookies-iframe.sub.html": [ - "364e5d70e1ec95f06223afc4be6d0c165e6af0fb", + "3f486cc59a9ad5f4897f3a1c4e2ead51327d7da5", [] ] } @@ -470369,7 +470727,7 @@ [] ], "requirements_build.txt": [ - "e0443762c3c1721d3545ad7384544a54e71a8e55", + "34baec00a5ee8be081ed6a7253e05bed3a3bc9cf", [] ], "requirements_macos_color_profile.txt": [ @@ -480455,7 +480813,7 @@ [] ], "client.py": [ - "a9637c9cfa4223ed18a673ef7b661b7be1a8d261", + "8f891ffafd60d2a01565fb513d087a27c0346c95", [] ], "error.py": [ @@ -480464,7 +480822,7 @@ ], "modules": { "__init__.py": [ - "acbe117902e4647434e71d1de8da2d28f7675e1e", + "6f63e85bcd06b8a2ded0c14136d8dddce55e0535", [] ], "_module.py": [ @@ -480484,16 +480842,20 @@ [] ], "network.py": [ - "073aa637c977fca55e3a4ef92cbb8032a59133a5", + "f0a2a5b8026ca476ac52e838924800e1e84cfa48", [] ], "script.py": [ - "f128b0d089c28bef46ce571a17e10d02b4fce8bd", + "737426a5d54641eae811844b84ad128426d25ef0", [] ], "session.py": [ "fe1c0385105a13fda3087117779a1e8b83c8d07a", [] + ], + "storage.py": [ + "c13b196d26a6f5fbe8924b829bce6553ba771f4c", + [] ] }, "transport.py": [ @@ -480947,7 +481309,7 @@ [] ], "base.py": [ - "7abb1660bae88841967e974c6934e4406bf5cee1", + "7119c0b019dbcc114b15db230521f19a8bb0855a", [] ], "executorchrome.py": [ @@ -480963,7 +481325,7 @@ [] ], "executormarionette.py": [ - "4ca15042cbb813f0ce207fac71fe01098759a9e9", + "21be5e852bf62ada36a1c22717fbb2a252ef8ce1", [] ], "executorselenium.py": [ @@ -480979,7 +481341,7 @@ [] ], "executorwebdriver.py": [ - "10b4e4def87aa80a1afafc0384e947415faea26d", + "05a26bc162f3850369d5ff611e397b7d1f9a9da1", [] ], "executorwktr.py": [ @@ -481021,7 +481383,7 @@ [] ], "testharness_webdriver_resume.js": [ - "36d086c9747a56ca7122c899cfcb46d00dd60b15", + "4e7b63090eecde5dce354055836b88f5f2ac3f14", [] ], "window-loaded.js": [ @@ -481106,7 +481468,7 @@ [] ], "testdriver-extra.js": [ - "74d5bae677cac843d26f755c9034c5ed3ba7fdd1", + "af25bf4111c6adfcccd15cde58c50b395f8e6f0a", [] ], "testdriver-vendor.js": [ @@ -481142,7 +481504,7 @@ [] ], "testrunner.py": [ - "888731e4aeb9646ea1b0294568f04bb6354f7005", + "63f856d1c6433575ef8c9156c8f83c0c586402a4", [] ], "tests": { @@ -484549,7 +484911,7 @@ }, "network": { "__init__.py": [ - "c6b8e32885947ccf41b7bfa1b4621b1b529dd532", + "154606592c970635d8f2d48f148c3316b1a62a8b", [] ], "add_intercept": { @@ -484604,6 +484966,12 @@ [] ] }, + "fetch_error": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, "provide_response": { "__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", @@ -484762,6 +485130,22 @@ [] ] } + }, + "storage": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "conftest.py": [ + "31b2c3f3e6bec2032e21b88ae33ed5995eb3cb74", + [] + ], + "set_cookie": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + } } }, "classic": { @@ -485226,7 +485610,7 @@ [] ], "fixtures_bidi.py": [ - "c073997215e7a6ab2ef142400db82c5fe367ffb2", + "f4c4c19c3bbe7fda9e9c9d7523d1498881ab0e47", [] ], "fixtures_http.py": [ @@ -485234,7 +485618,7 @@ [] ], "helpers.py": [ - "0a8e1dc1a4f1d15873db3bc6663bcd1a64ebef40", + "9870643b3d95e6e09396f514b901aebd08c5c551", [] ], "html": { @@ -485903,7 +486287,7 @@ }, "simulcast": { "simulcast.js": [ - "1886531023d6a98c99c517a3ef0f4421714e92f1", + "e0b90d8ac37bff19aed1c208bc84e2b649861d38", [] ] }, @@ -513375,6 +513759,13 @@ {} ] ], + "dataTransfer-clearData.html": [ + "6db7fa44e23ffde9585bc46682cedf5954159b46", + [ + null, + {} + ] + ], "detached-iframe": { "clipboard-on-detached-iframe.https.html": [ "5eb58e3213e33a0cf7150acbfaac8125bd0f61e5", @@ -519662,6 +520053,53 @@ null, {} ] + ], + "src-trailing-dot.sub.any.js": [ + "f2b45a6957c6c41bb8e1a8924db01ca6db4cd3ad", + [ + "content-security-policy/generic/src-trailing-dot.sub.any.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ] + ] + } + ], + [ + "content-security-policy/generic/src-trailing-dot.sub.any.serviceworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ] + ] + } + ], + [ + "content-security-policy/generic/src-trailing-dot.sub.any.sharedworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ] + ] + } + ], + [ + "content-security-policy/generic/src-trailing-dot.sub.any.worker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ] + ] + } + ] ] }, "img-src": { @@ -520369,7 +520807,7 @@ ] }, "nonce-hiding": { - "dangling-html-or-body.html": [ + "dangling-html-or-body.tentative.html": [ "4ba65e05b885cbc780fab7f1650689016f257ac2", [ null, @@ -524908,7 +525346,7 @@ ] ], "fedcm-manifest-not-in-list.https.html": [ - "8d85d9eb36783af221d030b95e73b397ba1a1b10", + "087af384b153afb5204cb0f3dc575bed57055335", [ null, { @@ -530891,7 +531329,7 @@ ] ], "color-computed-relative-color.html": [ - "deb1159da45192823ad6402faa79d7703e9ed64a", + "fd4de95370511115d19ee5694a302d620e5fea4f", [ null, {} @@ -530968,7 +531406,7 @@ ] ], "color-invalid-relative-color.html": [ - "9746d6ed20c94dc6ca379e9db9cc9a7aba07a3dc", + "2cb3a252917251efeb4fb4018498849fe385c401", [ null, {} @@ -531292,6 +531730,13 @@ {} ] ], + "contain-layout-dynamic-001.html": [ + "428d2b9d4d9c4866891288f6caef1f7962cb0d80", + [ + null, + {} + ] + ], "contain-paint-049.html": [ "49cdc9beca09c9dbf66607342ba8936c6a817225", [ @@ -531299,6 +531744,20 @@ {} ] ], + "contain-paint-dynamic-001.html": [ + "899b5643c1a00358ee4b908b0e1ba813f4407783", + [ + null, + {} + ] + ], + "contain-size-dynamic-001.html": [ + "f670d301c563e9317a0558a66609159c65b474eb", + [ + null, + {} + ] + ], "contain-size-grid-003.html": [ "44b736b1d6b62ec5c4fc0e6fb3314095df6a27f4", [ @@ -531327,6 +531786,13 @@ {} ] ], + "contain-style-dynamic-001.html": [ + "dfd4032ac55729bff8b781a86ad17a2d1168ac02", + [ + null, + {} + ] + ], "container-queries": { "animation-container-size.html": [ "fefb721cbc9a49296e76fb6194a6702b5211816d", @@ -531945,7 +532411,14 @@ ] ], "pseudo-elements-008.html": [ - "1d722a46b659ec8d11dc1ace9bf19d6e65be3f33", + "859deb2206e02d835e90c5e93e3a4c16fa5877bd", + [ + null, + {} + ] + ], + "pseudo-elements-013.html": [ + "870b589115324769d6e3bcc2988f507c8ff28c88", [ null, {} @@ -532115,7 +532588,7 @@ }, "content-visibility": { "animation-display-lock.html": [ - "0a03768fc358dfc8169f1c91e6ac4935ea5cd6cb", + "279ffd002ed21a90b2525978e9c0b328375b69a1", [ null, {} @@ -532461,6 +532934,34 @@ {} ] ], + "content-visibility-layout-containment-001.html": [ + "852e064a5e33be71538508f098787f331d68cd35", + [ + null, + {} + ] + ], + "content-visibility-layout-paint-containment-001.html": [ + "788139e17eb04e036c562cd3e55298cdc8da5c30", + [ + null, + {} + ] + ], + "content-visibility-size-containment-001.html": [ + "3b4a7c55a43e8ca4c6caea6e66b6e936a6c52f00", + [ + null, + {} + ] + ], + "content-visibility-style-containment-001.html": [ + "d976d89b73362713695f0321adaea8b8b8f21cda", + [ + null, + {} + ] + ], "content-visibility-svg-path.html": [ "a91f5817fdd9e2eb1993d727183921126e61e605", [ @@ -532624,7 +533125,7 @@ ], "parsing": { "content-computed.html": [ - "60044e89e7eeb12fa173c62ab296c7aeaa53c227", + "61c1ec563532503dc4deb07342c5d2c991b5aa95", [ null, {} @@ -560158,6 +560659,13 @@ {} ] ], + "client-props-zoom.html": [ + "fb4c95cada42696f29b00c35b9cce67b19aa05e2", + [ + null, + {} + ] + ], "cssom-getBoundingClientRect-001.html": [ "7d96540adfe95205a770c232473e0c1268e609e2", [ @@ -560466,6 +560974,13 @@ {} ] ], + "getBoundingClientRect-zoom.html": [ + "18f44de534fd5b9987606c0dbde4fb55d2ba6c2f", + [ + null, + {} + ] + ], "getClientRects-br-htb-ltr.html": [ "e952d61b677164c3b5d49799c80063174120307f", [ @@ -560522,6 +561037,13 @@ {} ] ], + "getClientRects-zoom.html": [ + "d4c249eadb0445b668213acf01892899a149529b", + [ + null, + {} + ] + ], "historical.html": [ "bf82eac1157aea5fa256861ef04f8da15e6ae89e", [ @@ -560611,7 +561133,7 @@ ] ], "offsetTop-offsetLeft-with-zoom.html": [ - "2d74a9f116bc68b141969dbda8cf18c744a6a779", + "a60a18a4313b5c9ffd7f8d6c8d42a46062152cf4", [ null, {} @@ -560851,6 +561373,13 @@ {} ] ], + "scroll-zoom.html": [ + "1fe4a8acc4ab10633ecb65001d24dbef132289ed", + [ + null, + {} + ] + ], "scrollIntoView-align-scrollport-covering-child.html": [ "b8ea73cc1fbd2b39fcd4b91a4b4edcf7f0e4730d", [ @@ -568707,6 +569236,13 @@ "dom/observable/tentative/observable-event-target.any.worker.html", {} ] + ], + "observable-event-target.window.js": [ + "77a137a3622e8dbbfb4c3f177f512c0cd509b509", + [ + "dom/observable/tentative/observable-event-target.window.html", + {} + ] ] } }, @@ -588256,7 +588792,7 @@ ] ], "automatic-beacon-anchor-click-handler.https.html": [ - "c3161fd5c315a652a8f83285c89f6c8c19851a91", + "8ee1cb517fc51ab1869d1c1c6a967d38f5de6010", [ null, { @@ -588265,7 +588801,7 @@ ] ], "automatic-beacon-click-handler.https.html": [ - "0fe3fbb93356da7e70f5f63f4565829a99c11e1f", + "31392fdb99dfa9c317f308784f4de34fa0d30c0d", [ null, { @@ -588274,7 +588810,7 @@ ] ], "automatic-beacon-component-ad.https.html": [ - "132b1234df1b0d36568cd1d9e1298f7244132f5b", + "1b1ef2798ad3042b6954dc4377db25ce08e5fd5a", [ null, { @@ -588283,7 +588819,7 @@ ] ], "automatic-beacon-cross-origin-false.https.html": [ - "ccd8634973425aa7fee7e189fcf37335c3a37bb3", + "24440e4b675848ae73589546fef6e756690accd2", [ null, { @@ -588292,7 +588828,7 @@ ] ], "automatic-beacon-cross-origin-navigation.https.html": [ - "5a191174cfee6868f238864ddb6736c13a6acaf9", + "c476e80443deabfc67c5a068724985e3125263c0", [ null, { @@ -588301,7 +588837,7 @@ ] ], "automatic-beacon-cross-origin-no-data.https.html": [ - "1b5710035d91df6d9ce85c1d8f490eeea2474611", + "dd00721dd8ca17b7fe04995872d1fe715aa34c47", [ null, { @@ -588310,7 +588846,7 @@ ] ], "automatic-beacon-cross-origin-no-opt-in.https.html": [ - "6d43a73bc7c7e3bbe1f3bafc425160b788724fc7", + "fa19d17f890b3182460bac6dfbc7dfcfce147b91", [ null, { @@ -588319,7 +588855,7 @@ ] ], "automatic-beacon-no-destination.https.html": [ - "c3fa3d657fa31da0774751ef37f5a690d0abbd35", + "696c17f765ee9143c016e247be843de3fbf4efe7", [ null, { @@ -588328,7 +588864,7 @@ ] ], "automatic-beacon-no-opt-in.https.html": [ - "5a815a81389fb93e657bb6f429442303d6e29448", + "177a7c6a512080e669cc22aa245025e14053335f", [ null, { @@ -588337,7 +588873,7 @@ ] ], "automatic-beacon-shared-storage.https.html": [ - "093e55bca908285f8c5651e0798085b43c5e9a84", + "4ee1d0d01bfe4cc2015d5bc690e82f0937d23eec", [ null, { @@ -588346,7 +588882,7 @@ ] ], "automatic-beacon-two-events-clear.https.html": [ - "f59fda5fca9b22eb9ef9e31955a436d1b6e13ae5", + "f759c0620b8945a3aa783233d65abc2a84bb95e3", [ null, { @@ -588355,7 +588891,7 @@ ] ], "automatic-beacon-two-events-persist.https.html": [ - "4da4f89e6e5c175f78dcc28c9de21db257f59d2d", + "906a7a0d9f5a35e4351c4a63362a891fe17ecd98", [ null, { @@ -588364,7 +588900,7 @@ ] ], "automatic-beacon-unfenced-top.https.html": [ - "945e80921d8e1d7f4496a91fde695e7eae7b59fe", + "342e13321fee27fbe3e4a6cde4c75db51d472294", [ null, { @@ -588597,28 +589133,35 @@ ] ], "default-enabled-features-allow-all.https.html": [ - "00044a4c85664956e3ce2ab10856390b3315cdd9", + "5d38d7a71050541d7717d0893e91857735529830", [ null, {} ] ], "default-enabled-features-allow-none.https.html": [ - "d44cb5bca77d59d194bba1116003b137cb594307", + "1c7d0579eb8e9f659c84a30e01953bcf660016ba", [ null, {} ] ], "default-enabled-features-allow-self.https.html": [ - "c212a6f44c307cbc0b91dd21fdadcdd162e35acd", + "3724a4795eead17be1c2448fed5e68a2b6267fac", + [ + null, + {} + ] + ], + "default-enabled-features-allow-unspecified.https.html": [ + "69e9a157cf70cceb232a818bb30f9d62fe111a2b", [ null, {} ] ], "default-enabled-features-attribute-allow.https.html": [ - "3c3831f0157de1235bead0c2c6f69170b1dc26da", + "d1e857cf29302c9d8b24a56579e6b465b3df9c60", [ null, {} @@ -588666,6 +589209,13 @@ {} ] ], + "disable-untrusted-network.https.html": [ + "726728e4899413d1a1aefe9fab73f54c1014ed79", + [ + null, + {} + ] + ], "disallowed-navigation-to-blob.https.html": [ "3722609410745847a34b91555f3cd8e5b402d0bf", [ @@ -589050,7 +589600,7 @@ ] ], "navigator-keyboard-layout-map.https.html": [ - "03fbc062e14057fb6e04096ef3692e2ac319d525", + "28cdbc848e22918ba273ea8b2e757d52f2d7a6f3", [ null, {} @@ -589227,8 +589777,15 @@ {} ] ], + "report-event-sandboxed-iframe.https.html": [ + "7298f39e6945255de783362396fc89f9754b6ef0", + [ + null, + {} + ] + ], "resize-lock-input.https.html": [ - "261c9a737eff4b85723214b7f4735b8fe9423a65", + "9cee650f1a85fb04d4f730adbce3df7527da8c98", [ null, { @@ -602230,6 +602787,212 @@ } ] ], + "location.tentative.https.window.js": [ + "2d839e060d48adce03e35c37e333317341e34874", + [ + "fetch/private-network-access/location.tentative.https.window.html?include=from-local", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/private-network-access/location.tentative.https.window.html?include=from-private", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/private-network-access/location.tentative.https.window.html?include=from-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/private-network-access/location.tentative.https.window.html?include=from-treat-as-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ] + ], + "location.tentative.window.js": [ + "180c2a4658ecfc5f645e0504bcc1d7750dad0d02", + [ + "fetch/private-network-access/location.tentative.window.html", + { + "script_metadata": [ + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "mixed-content-fetch.tentative.https.window.js": [ "dbae5193b5cb02e3b0eba3531483aac372ba8700", [ @@ -602549,6 +603312,212 @@ } ] ], + "top-location.tentative.https.window.js": [ + "c22b76385ff3dab5526ab96bcd3d77d1c44b7ed5", + [ + "fetch/private-network-access/top-location.tentative.https.window.html?include=from-local", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/private-network-access/top-location.tentative.https.window.html?include=from-private", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/private-network-access/top-location.tentative.https.window.html?include=from-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/private-network-access/top-location.tentative.https.window.html?include=from-treat-as-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ] + ], + "top-location.tentative.window.js": [ + "a759852393b6e1a6543cf188409eb445b0053f21", + [ + "fetch/private-network-access/top-location.tentative.window.html", + { + "script_metadata": [ + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "websocket.tentative.https.window.js": [ "0731896098bcefa614ebdf28765a04766b5e6cda", [ @@ -602577,6 +603546,212 @@ } ] ], + "window-open-existing.tentative.https.window.js": [ + "6a2a624fc8032d03b626109ee7f825f7acf5874c", + [ + "fetch/private-network-access/window-open-existing.tentative.https.window.html?include=from-local", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/private-network-access/window-open-existing.tentative.https.window.html?include=from-private", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/private-network-access/window-open-existing.tentative.https.window.html?include=from-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/private-network-access/window-open-existing.tentative.https.window.html?include=from-treat-as-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-private" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ] + ], + "window-open-existing.tentative.window.js": [ + "5a6cd4c5cfd20c931a37c4f98524a4a59c0d07c9", + [ + "fetch/private-network-access/window-open-existing.tentative.window.html", + { + "script_metadata": [ + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "window-open.tentative.https.window.js": [ "6793d1f3b4d9218975c7b08e165a729c00960df9", [ @@ -604582,7 +605757,7 @@ ] ], "component-auction.https.window.js": [ - "83980541f39798fab385a28af528ca616698ea08", + "63771d42b86d361634bf2408d48caf1538c64278", [ "fledge/tentative/component-auction.https.window.html?1-5", { @@ -604617,14 +605792,18 @@ ], [ "variant", - "?11-last" + "?11-15" + ], + [ + "variant", + "?16-last" ] ], "timeout": "long" } ], [ - "fledge/tentative/component-auction.https.window.html?11-last", + "fledge/tentative/component-auction.https.window.html?11-15", { "script_metadata": [ [ @@ -604657,7 +605836,55 @@ ], [ "variant", - "?11-last" + "?11-15" + ], + [ + "variant", + "?16-last" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/component-auction.https.window.html?16-last", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-last" ] ], "timeout": "long" @@ -604697,7 +605924,11 @@ ], [ "variant", - "?11-last" + "?11-15" + ], + [ + "variant", + "?16-last" ] ], "timeout": "long" @@ -605463,9 +606694,9 @@ ] ], "direct-from-seller-signals.https.window.js": [ - "0ae1efd8d3780efe9ff1a0886e6f79d4c17c2558", + "339bc32ee564320d155f43e1a555847da7ec125b", [ - "fledge/tentative/direct-from-seller-signals.https.window.html?1-5", + "fledge/tentative/direct-from-seller-signals.https.window.html?1-4", { "script_metadata": [ [ @@ -605490,30 +606721,42 @@ ], [ "variant", - "?1-5" + "?1-4" ], [ "variant", - "?6-10" + "?5-8" ], [ "variant", - "?11-15" + "?9-12" ], [ "variant", - "?16-20" + "?13-16" + ], + [ + "variant", + "?17-20" + ], + [ + "variant", + "?21-24" + ], + [ + "variant", + "?25-28" ], [ "variant", - "?21-last" + "?29-last" ] ], "timeout": "long" } ], [ - "fledge/tentative/direct-from-seller-signals.https.window.html?11-15", + "fledge/tentative/direct-from-seller-signals.https.window.html?13-16", { "script_metadata": [ [ @@ -605538,30 +606781,42 @@ ], [ "variant", - "?1-5" + "?1-4" ], [ "variant", - "?6-10" + "?5-8" ], [ "variant", - "?11-15" + "?9-12" ], [ "variant", - "?16-20" + "?13-16" + ], + [ + "variant", + "?17-20" ], [ "variant", - "?21-last" + "?21-24" + ], + [ + "variant", + "?25-28" + ], + [ + "variant", + "?29-last" ] ], "timeout": "long" } ], [ - "fledge/tentative/direct-from-seller-signals.https.window.html?16-20", + "fledge/tentative/direct-from-seller-signals.https.window.html?17-20", { "script_metadata": [ [ @@ -605586,30 +606841,42 @@ ], [ "variant", - "?1-5" + "?1-4" ], [ "variant", - "?6-10" + "?5-8" ], [ "variant", - "?11-15" + "?9-12" ], [ "variant", - "?16-20" + "?13-16" + ], + [ + "variant", + "?17-20" + ], + [ + "variant", + "?21-24" + ], + [ + "variant", + "?25-28" ], [ "variant", - "?21-last" + "?29-last" ] ], "timeout": "long" } ], [ - "fledge/tentative/direct-from-seller-signals.https.window.html?21-last", + "fledge/tentative/direct-from-seller-signals.https.window.html?21-24", { "script_metadata": [ [ @@ -605634,30 +606901,42 @@ ], [ "variant", - "?1-5" + "?1-4" ], [ "variant", - "?6-10" + "?5-8" ], [ "variant", - "?11-15" + "?9-12" ], [ "variant", - "?16-20" + "?13-16" + ], + [ + "variant", + "?17-20" + ], + [ + "variant", + "?21-24" ], [ "variant", - "?21-last" + "?25-28" + ], + [ + "variant", + "?29-last" ] ], "timeout": "long" } ], [ - "fledge/tentative/direct-from-seller-signals.https.window.html?6-10", + "fledge/tentative/direct-from-seller-signals.https.window.html?25-28", { "script_metadata": [ [ @@ -605682,23 +606961,215 @@ ], [ "variant", - "?1-5" + "?1-4" ], [ "variant", - "?6-10" + "?5-8" ], [ "variant", - "?11-15" + "?9-12" ], [ "variant", - "?16-20" + "?13-16" + ], + [ + "variant", + "?17-20" + ], + [ + "variant", + "?21-24" + ], + [ + "variant", + "?25-28" + ], + [ + "variant", + "?29-last" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/direct-from-seller-signals.https.window.html?29-last", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-4" + ], + [ + "variant", + "?5-8" + ], + [ + "variant", + "?9-12" + ], + [ + "variant", + "?13-16" + ], + [ + "variant", + "?17-20" + ], + [ + "variant", + "?21-24" + ], + [ + "variant", + "?25-28" ], [ "variant", - "?21-last" + "?29-last" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/direct-from-seller-signals.https.window.html?5-8", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-4" + ], + [ + "variant", + "?5-8" + ], + [ + "variant", + "?9-12" + ], + [ + "variant", + "?13-16" + ], + [ + "variant", + "?17-20" + ], + [ + "variant", + "?21-24" + ], + [ + "variant", + "?25-28" + ], + [ + "variant", + "?29-last" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/direct-from-seller-signals.https.window.html?9-12", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-4" + ], + [ + "variant", + "?5-8" + ], + [ + "variant", + "?9-12" + ], + [ + "variant", + "?13-16" + ], + [ + "variant", + "?17-20" + ], + [ + "variant", + "?21-24" + ], + [ + "variant", + "?25-28" + ], + [ + "variant", + "?29-last" ] ], "timeout": "long" @@ -605754,7 +607225,7 @@ ] ], "interest-group-passed-to-generate-bid.https.window.js": [ - "cf46855a3d1d879a2a1d64c7252ef7aaf8d7786f", + "11a63c1aa59bda716a0ab8caf05bc870f5d13bf5", [ "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?1-5", { @@ -605793,7 +607264,19 @@ ], [ "variant", - "?16-last" + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-last" ] ], "timeout": "long" @@ -605837,14 +607320,26 @@ ], [ "variant", - "?16-last" + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-last" ] ], "timeout": "long" } ], [ - "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?16-last", + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?16-20", { "script_metadata": [ [ @@ -605881,7 +607376,187 @@ ], [ "variant", - "?16-last" + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-last" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?21-25", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-last" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?26-30", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-last" + ] + ], + "timeout": "long" + } + ], + [ + "fledge/tentative/interest-group-passed-to-generate-bid.https.window.html?31-last", + { + "script_metadata": [ + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/fledge-util.sub.js" + ], + [ + "script", + "/common/subset-tests.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?1-5" + ], + [ + "variant", + "?6-10" + ], + [ + "variant", + "?11-15" + ], + [ + "variant", + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-last" ] ], "timeout": "long" @@ -605925,7 +607600,19 @@ ], [ "variant", - "?16-last" + "?16-20" + ], + [ + "variant", + "?21-25" + ], + [ + "variant", + "?26-30" + ], + [ + "variant", + "?31-last" ] ], "timeout": "long" @@ -645649,7 +647336,7 @@ }, "dom": { "aria-attribute-reflection.html": [ - "8970938ac92162ecaeb0608d8bc42905fb2818f7", + "fa5e9ad5c78fc634323d0b539c531dfe8b1d77e7", [ null, {} @@ -646160,7 +647847,7 @@ ] ], "dir-assorted.window.js": [ - "038b3f78d4d373286da051a6240493d0dce12112", + "0d4e4b82d9b9531087ed631fd38d9eb6ab6215e0", [ "html/dom/elements/global-attributes/dir-assorted.window.html", {} @@ -659915,6 +661602,16 @@ } ] ], + "popover-light-dismiss-hint.tentative.html": [ + "f07363115fba687ef97308fe515abf1c373497ab", + [ + null, + { + "testdriver": true, + "timeout": "long" + } + ] + ], "popover-light-dismiss-on-scroll.html": [ "382addadef1e046db9c1814c7e5104727525b616", [ @@ -659933,7 +661630,7 @@ ] ], "popover-light-dismiss.html": [ - "4a57276bce3cbb1c6bcb287d268af38e4ee19752", + "0c51693aa120a7d7cb244721055ec3c418ce6365", [ null, { @@ -659958,6 +661655,15 @@ } ] ], + "popover-open-in-beforetoggle.html": [ + "1e22b73c686edbb5a879510c1b9e681fafbcb7b5", + [ + null, + { + "testdriver": true + } + ] + ], "popover-overlay.html": [ "a607844aee4f59e2a8b96528bbfa380688a1bb34", [ @@ -660043,7 +661749,7 @@ ] ], "popover-types-with-hints.tentative.html": [ - "7a73efb50fc8e54926ffb4eb78c79f75413b1273", + "07f0e26fce71b922385d804e5ce5d56ac3af95b3", [ null, {} @@ -671783,7 +673489,7 @@ ] ], "crossOrigin.sub.html": [ - "38b3610af655a10f580c7f1fdb4621e4354deb82", + "3f6f3a77f3a67a1c5f96b9117363582bda66f3cf", [ null, { @@ -671927,6 +673633,15 @@ } ] ], + "popup.html": [ + "62140d63814fe3f0c9a78415412e3e0393929f3c", + [ + null, + { + "testdriver": true + } + ] + ], "textEditCommands.html": [ "0bc533ecb035288d3094832b5641a538cd97c983", [ @@ -672117,13 +673832,6 @@ } ] ], - "test_win_open_with_interaction.html": [ - "055b17ab19ec08b3fb8e43ec743eff8c1325962a", - [ - null, - {} - ] - ], "virtual_authenticator.html": [ "04c14719d41f2b8143ab348269d35b3f90cbc457", [ @@ -673102,6 +674810,13 @@ ] ] }, + "visibility-hidden.html": [ + "588a42e6ab82eeb5090905926018999b7c67db10", + [ + null, + {} + ] + ], "zero-area-element-hidden.html": [ "be57ac698314d1e2a93e0584065f2c90811418d8", [ @@ -674395,6 +676110,13 @@ {} ] ], + "resized-image-not-reconsidered.html": [ + "6e195b89f9ef5dfbfc126e3fe7170d00dc93376f", + [ + null, + {} + ] + ], "same-origin-redirects.html": [ "b5cf9da2d120d4e03852954057fc7171fad9901f", [ @@ -675902,7 +677624,7 @@ ] ], "loaf-event-blocking-duration.html": [ - "daa5f64c39e3aa186b0ff26cb74847fa26dcfe10", + "ed31244a1d6dc1e186e89e11453e620aadf124f4", [ null, { @@ -675921,7 +677643,7 @@ ] ], "loaf-first-ui-event.html": [ - "807c9cfe017444bda4e67b0bef645c21bf5fc538", + "7e32010189023859a5a078e2faf88a0a329cd743", [ null, { @@ -675967,7 +677689,7 @@ ] ], "loaf-pause-duration.html": [ - "6894164fbfdf866edab63d8d0421ebc153180999", + "a4181239d47327557c7a1b56fa896ed1cc2d3ceb", [ null, { @@ -675994,7 +677716,7 @@ ] ], "loaf-script-block.html": [ - "1bfad63c82e1b0193c445fcb389c85641343b9a7", + "759b31f9a1a991830ae0ce9a0296483ccb3bb555", [ null, { @@ -676003,7 +677725,7 @@ ] ], "loaf-script-nested-callback.html": [ - "c1eb4adc89c21e2662f850f6b9811dca0728faac", + "8d1304fc802921b203996b5c6e7ada2ea85681ac", [ null, { @@ -676012,7 +677734,7 @@ ] ], "loaf-script-window-attribution.html": [ - "9602cdadd4b3b0e2c08f3ffe81b814042a6807a6", + "0b8f45bed02b2c88d0679410709dd37696724658", [ null, { @@ -676030,7 +677752,7 @@ ] ], "loaf-source-location.html": [ - "41979105e5801eb18dc64eb22332d35ac1ef96c0", + "cdd4bb4bbc9ec7f5f1a4b985aa005253c1d00726", [ null, { @@ -676039,7 +677761,7 @@ ] ], "loaf-stream-source-location.html": [ - "3b6b2b31608a915a28eff99f97114b678e341124", + "79fb418f829b70970d643d217eaa91d0fb34b693", [ null, { @@ -676082,7 +677804,7 @@ ] ], "loaf-ui-event-render-start.html": [ - "f8bcf340a422ad418d8ef457bc0ccc8d6609f057", + "01d50d47e98ab33fce9b0e3596216bef3d184cbd", [ null, { @@ -679061,6 +680783,28 @@ null, {} ] + ], + "idlharness.any.js": [ + "d7975ab90fa7dc793b7289294cca5ec191522523", + [ + "mediacapture-insertable-streams/idlharness.any.worker.html", + { + "script_metadata": [ + [ + "global", + "dedicatedworker" + ], + [ + "script", + "/resources/WebIDLParser.js" + ], + [ + "script", + "/resources/idlharness.js" + ] + ] + } + ] ] }, "mediacapture-record": { @@ -679273,7 +681017,7 @@ ] ], "GUM-non-applicable-constraint.https.html": [ - "3e9481bfa445cfb77556bfe4b63c74faeb9298b8", + "e9fd6665dcface83218869a0a0fd1284c12f924f", [ null, { @@ -679384,7 +681128,7 @@ ] ], "MediaDevices-getSupportedConstraints.https.html": [ - "453184a16919a63ea72068538bca4f7c038957cf", + "7d374b5336ea5c12d1bf6c6d65c1766ebd2b9347", [ null, {} @@ -679551,7 +681295,7 @@ ] ], "MediaStreamTrack-getCapabilities.https.html": [ - "b67a8d51561a3d2c33047780014d890c1c2682a4", + "7d600c0e1b97c905cbeb172d0aae0a33ed961c9e", [ null, { @@ -679560,7 +681304,7 @@ ] ], "MediaStreamTrack-getSettings.https.html": [ - "1bda4c748ac5a0c0711cc231710c18ed5afa7c25", + "3bae50c346dd3c83d15f37eca598b58838250c46", [ null, { @@ -689148,6 +690892,13 @@ {} ] ], + "exif-chunk.html": [ + "1cb0e2755e21703fde9a87648c4a843b5b65815a", + [ + null, + {} + ] + ], "trns-chunk.html": [ "3a24753382b20b4a1d5803ee64c730427dd62c54", [ @@ -689478,7 +691229,7 @@ ] ], "pointerevent_attributes_nohover_pointers.html": [ - "d501ae0afd45612f5bad13d08cdd7cb2646a38d9", + "3441417c46a72be5291dab16d450679a41ff4541", [ null, { @@ -716597,6 +718348,13 @@ {} ] ], + "implicit-source.https.html": [ + "b0b166798466f272234dd4e597941b5ffff07ff6", + [ + null, + {} + ] + ], "initiators-a-element.sub.https.html": [ "9cfedb20efa5eb1cf192a3256834b3316fbe743f", [ @@ -716613,7 +718371,7 @@ ] ], "initiators-iframe-location-href.sub.https.html": [ - "9a795b7404a55587201c46dd3bc5f12209284e94", + "0c195ee454f03b60432e2a5f3a02d6a0d748cb4f", [ "speculation-rules/prefetch/initiators-iframe-location-href.sub.https.html?cross-site", { @@ -717476,6 +719234,15 @@ } ] ], + "prerender-while-prerender.html": [ + "e04fafbfa8d78f8a855bfcd9c5d3c5e93b3a1881", + [ + null, + { + "timeout": "long" + } + ] + ], "referrer-policy-from-rules.html": [ "7e3b65fe6127c9ecd6f5448d0d31be8962ff8db2", [ @@ -742168,7 +743935,7 @@ ] ], "sample-accurate-scheduling.html": [ - "5fafd024eef9b476f4d97b2ebaa2190a4ca520d5", + "fd244e8a5f62c9910d17058c0edc8c1cb8cf8880", [ null, {} @@ -742888,7 +744655,7 @@ ] ], "audioworkletprocessor-process-frozen-array.https.html": [ - "33627204a6f538eba77bd8346952404814e4affa", + "ce0cfa40b691d859d372c9e6da7ff54fe64bbbe1", [ null, {} @@ -744148,7 +745915,7 @@ ] ], "public-key-credential-to-json.https.window.js": [ - "8ef25132197dda690d7ad36f63307f4a4f8ef7f1", + "2f805d3ab7a888c98ee27f867732b5c95cfcbb01", [ "webauthn/public-key-credential-to-json.https.window.html", { @@ -754153,7 +755920,7 @@ ] ], "RTCPeerConnection-GC.https.html": [ - "cd9c33224ef22a414b9958d7051b784748535085", + "156a2e1f093c144ee03a2bdc71ef3e7f10d29710", [ null, { @@ -801177,6 +802944,15 @@ ] ] }, + "fetch_error": { + "fetch_error.py": [ + "35e78d8d02eba377eb97affab0dba2cb8d47269d", + [ + null, + {} + ] + ] + }, "provide_response": { "invalid.py": [ "eec118a692df3a27d89236d7e2862dd2aca9f35d", @@ -801260,8 +803036,15 @@ {} ] ], + "contexts.py": [ + "97d00669d17136d9c724fef4dade0214ac584c49", + [ + null, + {} + ] + ], "invalid.py": [ - "54440ff67804b693afd3bae40f0f347e4131f7c7", + "58f1ba02e5fc10ab82ab90e616f7ce3801dc060d", [ null, {} @@ -801332,13 +803115,6 @@ {} ] ], - "invalid_tentative.py": [ - "2726178e471dac4212ff8d167221cc55ca81a50f", - [ - null, - {} - ] - ], "primitive_values.py": [ "d7cdd78b9c1062c714c1a8c87c707f56c2867466", [ @@ -801402,6 +803178,13 @@ {} ] ], + "target.py": [ + "d6550d67d5e7e696c41f6d16836822a0cc8e9a0d", + [ + null, + {} + ] + ], "this.py": [ "2893bb037ac18476a8da70f4f9fdc6c6f053bad9", [ @@ -801448,15 +803231,8 @@ {} ] ], - "invalid_tentative.py": [ - "5078166dfde6fda787e6faacf432f81610df0443", - [ - null, - {} - ] - ], "target.py": [ - "bce956d06bedcd760f613808502030cc5effb514", + "f01dcb3b717d9f3ed2586f019da09758e17c999a", [ null, {} @@ -801506,13 +803282,6 @@ {} ] ], - "invalid_tentative.py": [ - "e98a697c80aa07c278a47edb6a30f06d104d9b22", - [ - null, - {} - ] - ], "primitive_values.py": [ "6ca053c0365030f37c0b4c576793b463415dadec", [ @@ -801555,6 +803324,13 @@ {} ] ], + "target.py": [ + "e67a5dd81f7cc06f14dd68e1160bdae419d7c49b", + [ + null, + {} + ] + ], "user_activation.py": [ "cc1f27985e3ef2501e036313d510e6e63ff421c6", [ @@ -801716,6 +803492,17 @@ ] ] } + }, + "storage": { + "set_cookie": { + "set_cookie.py": [ + "7e4f3dbb9b0826d312b57b235432d8e99701b17d", + [ + null, + {} + ] + ] + } } }, "classic": { @@ -802771,10 +804558,12 @@ ] ], "default_values.py": [ - "678d7a8e881ccc0b00c24539165bb38d2521bd40", + "ac544c1338cce015d5360d22e097a9c591661327", [ null, - {} + { + "timeout": "long" + } ] ], "invalid_capabilities.py": [ diff --git a/tests/wpt/meta/css/css-color/parsing/color-computed-relative-color.html.ini b/tests/wpt/meta/css/css-color/parsing/color-computed-relative-color.html.ini index f2843c40203..6ca549e0935 100644 --- a/tests/wpt/meta/css/css-color/parsing/color-computed-relative-color.html.ini +++ b/tests/wpt/meta/css/css-color/parsing/color-computed-relative-color.html.ini @@ -3268,3 +3268,51 @@ [Property color value 'LCH(from var(--accent) l c calc(h + 180))'] expected: FAIL + + [Property color value 'rgb(from rgb(100 110 120 / 0.8) calc(r + 1) calc(g + 1) calc(b + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'hsl(from hsl(20 30 40 / 0.8) calc(h + 1) calc(s + 1) calc(l + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'hwb(from hwb(20 30 40 / 0.8) calc(h + 1) calc(w + 1) calc(b + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'lab(from lab(50 5 10 / 0.8) calc(l + 1) calc(a + 1) calc(b + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'oklab(from oklab(0.5 .05 0.1 / 0.8) calc(l + 0.01) calc(a + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'lch(from lch(50 5 10 / 0.8) calc(l + 1) calc(c + 1) calc(h + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'oklch(from oklch(0.5 .05 0.1 / 0.8) calc(l + 0.01) calc(c + 0.01) calc(h + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(srgb 0.7 0.5 0.3 / 0.8) srgb calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(srgb-linear 0.7 0.5 0.3 / 0.8) srgb-linear calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(a98-rgb 0.7 0.5 0.3 / 0.8) a98-rgb calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(rec2020 0.7 0.5 0.3 / 0.8) rec2020 calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(prophoto-rgb 0.7 0.5 0.3 / 0.8) prophoto-rgb calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(display-p3 0.7 0.5 0.3 / 0.8) display-p3 calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(xyz 7 -20.5 100 / 0.8) xyz calc(x + 1) calc(y + 1) calc(z + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(xyz-d50 7 -20.5 100 / 0.8) xyz-d50 calc(x + 1) calc(y + 1) calc(z + 1) / calc(alpha + 0.01))'] + expected: FAIL + + [Property color value 'color(from color(xyz-d65 7 -20.5 100 / 0.8) xyz-d65 calc(x + 1) calc(y + 1) calc(z + 1) / calc(alpha + 0.01))'] + expected: FAIL diff --git a/tests/wpt/meta/css/css-fonts/variations/at-font-face-font-matching.html.ini b/tests/wpt/meta/css/css-fonts/variations/at-font-face-font-matching.html.ini index 00fd6dba908..ec6ff4fc03e 100644 --- a/tests/wpt/meta/css/css-fonts/variations/at-font-face-font-matching.html.ini +++ b/tests/wpt/meta/css/css-fonts/variations/at-font-face-font-matching.html.ini @@ -53,9 +53,6 @@ [Matching font-style: 'oblique 21deg' should prefer 'oblique 21deg' over 'oblique 30deg 60deg'] expected: FAIL - [Matching font-stretch: '110%' should prefer '105%' over '100%'] - expected: FAIL - [Matching font-weight: '400' should prefer '400' over '450 460'] expected: FAIL @@ -77,9 +74,6 @@ [Matching font-weight: '430' should prefer '500' over '400 425'] expected: FAIL - [Matching font-weight: '400' should prefer '351 398' over '501 550'] - expected: FAIL - [Matching font-style: 'normal' should prefer 'oblique 10deg 40deg' over 'oblique 20deg 30deg'] expected: FAIL @@ -146,9 +140,6 @@ [Matching font-weight: '430' should prefer '501 550' over '502 560'] expected: FAIL - [Matching font-weight: '500' should prefer '400' over '350 399'] - expected: FAIL - [Matching font-weight: '501' should prefer '502 510' over '503 520'] expected: FAIL @@ -164,12 +155,6 @@ [Matching font-style: 'oblique 0deg' should prefer 'oblique 40deg 50deg' over 'italic'] expected: FAIL - [Matching font-style: 'oblique -10deg' should prefer 'oblique -50deg -40deg' over 'italic'] - expected: FAIL - - [Matching font-style: 'oblique -20deg' should prefer 'oblique -20deg' over 'oblique -60deg -40deg'] - expected: FAIL - [Matching font-style: 'oblique -20deg' should prefer 'oblique -60deg -40deg' over 'oblique -10deg'] expected: FAIL @@ -182,9 +167,6 @@ [Matching font-stretch: '110%' should prefer '110% 120%' over '115% 116%'] expected: FAIL - [Matching font-style: 'normal' should prefer 'oblique 20deg 30deg' over 'oblique -50deg -20deg'] - expected: FAIL - [Matching font-style: 'oblique 20deg' should prefer 'oblique 10deg' over 'italic'] expected: FAIL @@ -194,18 +176,12 @@ [Matching font-weight: '400' should prefer '500' over '350 399'] expected: FAIL - [Matching font-weight: '500' should prefer '500' over '450 460'] - expected: FAIL - [Matching font-weight: '399' should prefer '200 300' over '400'] expected: FAIL [Matching font-style: 'italic' should prefer 'oblique 5deg 10deg' over 'oblique 5deg'] expected: FAIL - [Matching font-style: 'oblique 10deg' should prefer 'oblique 10deg' over 'oblique 5deg'] - expected: FAIL - [Matching font-style: 'oblique 0deg' should prefer 'italic' over 'oblique -50deg -20deg'] expected: FAIL @@ -263,9 +239,6 @@ [Matching font-weight: '399' should prefer '400' over '450 460'] expected: FAIL - [Matching font-stretch: '100%' should prefer '100%' over '110% 120%'] - expected: FAIL - [Matching font-stretch: '110%' should prefer '115% 116%' over '105%'] expected: FAIL @@ -281,9 +254,6 @@ [Matching font-style: 'oblique -21deg' should prefer 'oblique -21deg' over 'oblique -60deg -40deg'] expected: FAIL - [Matching font-style: 'italic' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'] - expected: FAIL - [Matching font-style: 'oblique 20deg' should prefer 'oblique 20deg' over 'oblique 30deg 60deg'] expected: FAIL @@ -301,3 +271,27 @@ [Matching font-style: 'oblique -20deg' should prefer 'oblique -10deg' over 'italic'] expected: FAIL + + [Matching font-weight: '430' should prefer '420 440' over '450 460'] + expected: FAIL + + [Matching font-weight: '430' should prefer '350 399' over '340 398'] + expected: FAIL + + [Matching font-stretch: '90%' should prefer '60% 70%' over '110% 140%'] + expected: FAIL + + [Matching font-style: 'italic' should prefer 'normal' over 'oblique 0deg'] + expected: FAIL + + [Matching font-style: 'oblique 20deg' should prefer 'oblique 40deg 50deg' over 'oblique 10deg'] + expected: FAIL + + [Matching font-style: 'oblique 21deg' should prefer 'oblique 40deg 50deg' over 'oblique 20deg'] + expected: FAIL + + [Matching font-style: 'oblique 0deg' should prefer 'oblique 5deg' over 'oblique 15deg 20deg'] + expected: FAIL + + [Matching font-style: 'oblique -20deg' should prefer 'oblique 0deg' over 'oblique 30deg 60deg'] + expected: FAIL diff --git a/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini b/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini deleted file mode 100644 index 9695422ff7d..00000000000 --- a/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[text-spacing-trim-space-first-wrap-br-001.html?class=halt,htb] - expected: FAIL - -[text-spacing-trim-space-first-wrap-br-001.html?class=chws,htb] - expected: FAIL - -[text-spacing-trim-space-first-wrap-br-001.html?class=halt,vrl] - expected: FAIL - -[text-spacing-trim-space-first-wrap-br-001.html?class=chws,vrl] - expected: FAIL diff --git a/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-start-002.html.ini b/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-start-002.html.ini new file mode 100644 index 00000000000..ed633d0d0ae --- /dev/null +++ b/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-start-002.html.ini @@ -0,0 +1,2 @@ +[text-spacing-trim-start-002.html] + expected: FAIL diff --git a/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html.ini b/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html.ini deleted file mode 100644 index 171fe62dd0c..00000000000 --- a/tests/wpt/meta/css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[text-spacing-trim-wrap-br-001.html?class=chws,htb] - expected: FAIL - -[text-spacing-trim-wrap-br-001.html?class=halt,vrl] - expected: FAIL - -[text-spacing-trim-wrap-br-001.html?class=halt,htb] - expected: FAIL - -[text-spacing-trim-wrap-br-001.html?class=chws,vrl] - expected: FAIL diff --git a/tests/wpt/meta/css/css-transforms/transform-input-018.html.ini b/tests/wpt/meta/css/css-transforms/transform-input-018.html.ini new file mode 100644 index 00000000000..f425dbe5f4a --- /dev/null +++ b/tests/wpt/meta/css/css-transforms/transform-input-018.html.ini @@ -0,0 +1,2 @@ +[transform-input-018.html] + expected: FAIL diff --git a/tests/wpt/meta/css/cssom-view/getBoundingClientRect-zoom.html.ini b/tests/wpt/meta/css/cssom-view/getBoundingClientRect-zoom.html.ini new file mode 100644 index 00000000000..9e4fca20990 --- /dev/null +++ b/tests/wpt/meta/css/cssom-view/getBoundingClientRect-zoom.html.ini @@ -0,0 +1,9 @@ +[getBoundingClientRect-zoom.html] + [getBoundingClientRect for elements with css zoom 2] + expected: FAIL + + [getBoundingClientRect for elements with css zoom 3] + expected: FAIL + + [getBoundingClientRect for elements with css zoom 4] + expected: FAIL diff --git a/tests/wpt/meta/css/cssom-view/getClientRects-zoom.html.ini b/tests/wpt/meta/css/cssom-view/getClientRects-zoom.html.ini new file mode 100644 index 00000000000..15a80711aa8 --- /dev/null +++ b/tests/wpt/meta/css/cssom-view/getClientRects-zoom.html.ini @@ -0,0 +1,12 @@ +[getClientRects-zoom.html] + [getBoundingClientRect for elements with css zoom 1] + expected: FAIL + + [getBoundingClientRect for elements with css zoom 2] + expected: FAIL + + [getBoundingClientRect for elements with css zoom 3] + expected: FAIL + + [getBoundingClientRect for elements with css zoom 4] + expected: FAIL diff --git a/tests/wpt/meta/css/cssom-view/scroll-zoom.html.ini b/tests/wpt/meta/css/cssom-view/scroll-zoom.html.ini new file mode 100644 index 00000000000..db32ece8e06 --- /dev/null +++ b/tests/wpt/meta/css/cssom-view/scroll-zoom.html.ini @@ -0,0 +1,3 @@ +[scroll-zoom.html] + [scroll properties for elements with css zoom 1] + expected: FAIL diff --git a/tests/wpt/meta/dom/events/webkit-transition-end-event.html.ini b/tests/wpt/meta/dom/events/webkit-transition-end-event.html.ini index eb8b8d11dff..b7fe8688a23 100644 --- a/tests/wpt/meta/dom/events/webkit-transition-end-event.html.ini +++ b/tests/wpt/meta/dom/events/webkit-transition-end-event.html.ini @@ -1,5 +1,4 @@ [webkit-transition-end-event.html] - expected: TIMEOUT [dispatchEvent of an transitionend event does not trigger a prefixed event handler or listener] expected: FAIL @@ -13,25 +12,16 @@ expected: FAIL [event types for prefixed and unprefixed transitionend event listeners should be named appropriately] - expected: NOTRUN + expected: FAIL [ontransitionend and onwebkittransitionend are not aliases] expected: FAIL [webkitTransitionEnd event listener should trigger for an animation] - expected: TIMEOUT + expected: FAIL [dispatchEvent of a webkitTransitionEnd event does trigger a prefixed event handler or listener] expected: FAIL [onwebkittransitionend event handler should not trigger if an unprefixed event handler also exists] expected: FAIL - - [webkitTransitionEnd event listener should not trigger if an unprefixed listener also exists] - expected: NOTRUN - - [webkitTransitionEnd event listener should not trigger if an unprefixed event handler also exists] - expected: NOTRUN - - [webkitTransitionEnd event listener is case sensitive] - expected: NOTRUN diff --git a/tests/wpt/meta/dom/idlharness.window.js.ini b/tests/wpt/meta/dom/idlharness.window.js.ini index 02b23dadce3..bd59f2f66a3 100644 --- a/tests/wpt/meta/dom/idlharness.window.js.ini +++ b/tests/wpt/meta/dom/idlharness.window.js.ini @@ -786,3 +786,6 @@ [AbortSignal interface: calling any(sequence<AbortSignal>) on new AbortController().signal with too few arguments must throw TypeError] expected: FAIL + + [ShadowRoot interface: attribute clonable] + expected: FAIL diff --git a/tests/wpt/meta/dom/observable/tentative/observable-event-target.window.js.ini b/tests/wpt/meta/dom/observable/tentative/observable-event-target.window.js.ini new file mode 100644 index 00000000000..64cfdcd7e58 --- /dev/null +++ b/tests/wpt/meta/dom/observable/tentative/observable-event-target.window.js.ini @@ -0,0 +1,6 @@ +[observable-event-target.window.html] + [EventTarget Observables can listen for events in the capturing or bubbling phase] + expected: FAIL + + [EventTarget Observables can be 'passive'] + expected: FAIL diff --git a/tests/wpt/meta/fetch/metadata/generated/css-images.sub.tentative.html.ini b/tests/wpt/meta/fetch/metadata/generated/css-images.sub.tentative.html.ini index 7b4cf2c5ae7..4b5c3e26586 100644 --- a/tests/wpt/meta/fetch/metadata/generated/css-images.sub.tentative.html.ini +++ b/tests/wpt/meta/fetch/metadata/generated/css-images.sub.tentative.html.ini @@ -185,6 +185,3 @@ [border-image sec-fetch-site - HTTPS downgrade (header not sent)] expected: FAIL - - [background-image sec-fetch-site - HTTPS downgrade (header not sent)] - expected: TIMEOUT diff --git a/tests/wpt/meta/fetch/metadata/generated/element-img-environment-change.sub.html.ini b/tests/wpt/meta/fetch/metadata/generated/element-img-environment-change.sub.html.ini index 410ec4c1d39..4648085f98d 100644 --- a/tests/wpt/meta/fetch/metadata/generated/element-img-environment-change.sub.html.ini +++ b/tests/wpt/meta/fetch/metadata/generated/element-img-environment-change.sub.html.ini @@ -41,3 +41,6 @@ [sec-fetch-site - HTTPS downgrade-upgrade, no attributes] expected: NOTRUN + + [sec-fetch-site - Not sent to non-trustworthy same-origin destination, no attributes] + expected: FAIL diff --git a/tests/wpt/meta/fetch/private-network-access/location.tentative.https.window.js.ini b/tests/wpt/meta/fetch/private-network-access/location.tentative.https.window.js.ini new file mode 100644 index 00000000000..bcbf60fdf3d --- /dev/null +++ b/tests/wpt/meta/fetch/private-network-access/location.tentative.https.window.js.ini @@ -0,0 +1,36 @@ +[location.tentative.https.window.html?include=from-private] + [private to local: failed preflight.] + expected: FAIL + + [private to local: success.] + expected: FAIL + + +[location.tentative.https.window.html?include=from-local] + +[location.tentative.https.window.html?include=from-public] + [public to local: failed preflight.] + expected: FAIL + + [public to local: success.] + expected: FAIL + + [public to private: failed preflight.] + expected: FAIL + + [public to private: success.] + expected: FAIL + + +[location.tentative.https.window.html?include=from-treat-as-public] + [treat-as-public-address to local: failed preflight.] + expected: FAIL + + [treat-as-public-address to local: success.] + expected: FAIL + + [treat-as-public-address to private: failed preflight.] + expected: FAIL + + [treat-as-public-address to private: success.] + expected: FAIL diff --git a/tests/wpt/meta/fetch/private-network-access/location.tentative.window.js.ini b/tests/wpt/meta/fetch/private-network-access/location.tentative.window.js.ini new file mode 100644 index 00000000000..db5e79a6043 --- /dev/null +++ b/tests/wpt/meta/fetch/private-network-access/location.tentative.window.js.ini @@ -0,0 +1,15 @@ +[location.tentative.window.html] + [private to local: failure.] + expected: FAIL + + [public to local: failure.] + expected: FAIL + + [public to private: failure.] + expected: FAIL + + [treat-as-public-address to local: failure.] + expected: FAIL + + [treat-as-public-address to private: failure.] + expected: FAIL diff --git a/tests/wpt/meta/fetch/private-network-access/top-location.tentative.https.window.js.ini b/tests/wpt/meta/fetch/private-network-access/top-location.tentative.https.window.js.ini new file mode 100644 index 00000000000..f14d2bd8475 --- /dev/null +++ b/tests/wpt/meta/fetch/private-network-access/top-location.tentative.https.window.js.ini @@ -0,0 +1,36 @@ +[top-location.tentative.https.window.html?include=from-treat-as-public] + [treat-as-public-address to local: failed preflight.] + expected: FAIL + + [treat-as-public-address to local: success.] + expected: FAIL + + [treat-as-public-address to private: failed preflight.] + expected: FAIL + + [treat-as-public-address to private: success.] + expected: FAIL + + +[top-location.tentative.https.window.html?include=from-local] + +[top-location.tentative.https.window.html?include=from-public] + [public to local: failed preflight.] + expected: FAIL + + [public to local: success.] + expected: FAIL + + [public to private: failed preflight.] + expected: FAIL + + [public to private: success.] + expected: FAIL + + +[top-location.tentative.https.window.html?include=from-private] + [private to local: failed preflight.] + expected: FAIL + + [private to local: success.] + expected: FAIL diff --git a/tests/wpt/meta/fetch/private-network-access/top-location.tentative.window.js.ini b/tests/wpt/meta/fetch/private-network-access/top-location.tentative.window.js.ini new file mode 100644 index 00000000000..0abfc3f7b03 --- /dev/null +++ b/tests/wpt/meta/fetch/private-network-access/top-location.tentative.window.js.ini @@ -0,0 +1,15 @@ +[top-location.tentative.window.html] + [private to local: failure.] + expected: FAIL + + [public to local: failure.] + expected: FAIL + + [public to private: failure.] + expected: FAIL + + [treat-as-public-address to local: failure.] + expected: FAIL + + [treat-as-public-address to private: failure.] + expected: FAIL diff --git a/tests/wpt/meta/fetch/private-network-access/window-open-existing.tentative.https.window.js.ini b/tests/wpt/meta/fetch/private-network-access/window-open-existing.tentative.https.window.js.ini new file mode 100644 index 00000000000..ad5a61ccc47 --- /dev/null +++ b/tests/wpt/meta/fetch/private-network-access/window-open-existing.tentative.https.window.js.ini @@ -0,0 +1,66 @@ +[window-open-existing.tentative.https.window.html?include=from-treat-as-public] + [treat-as-public-address to local: failed preflight.] + expected: FAIL + + [treat-as-public-address to local: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to local: missing PNA header.] + expected: FAIL + + [treat-as-public-address to local: success.] + expected: FAIL + + [treat-as-public-address to private: failed preflight.] + expected: FAIL + + [treat-as-public-address to private: missing CORS headers.] + expected: FAIL + + [treat-as-public-address to private: missing PNA header.] + expected: FAIL + + [treat-as-public-address to private: success.] + expected: FAIL + + +[window-open-existing.tentative.https.window.html?include=from-public] + [public to local: failed preflight.] + expected: FAIL + + [public to local: missing CORS headers.] + expected: FAIL + + [public to local: missing PNA header.] + expected: FAIL + + [public to local: success.] + expected: FAIL + + [public to private: failed preflight.] + expected: FAIL + + [public to private: missing CORS headers.] + expected: FAIL + + [public to private: missing PNA header.] + expected: FAIL + + [public to private: success.] + expected: FAIL + + +[window-open-existing.tentative.https.window.html?include=from-local] + +[window-open-existing.tentative.https.window.html?include=from-private] + [private to local: failed preflight.] + expected: FAIL + + [private to local: missing CORS headers.] + expected: FAIL + + [private to local: missing PNA header.] + expected: FAIL + + [private to local: success.] + expected: FAIL diff --git a/tests/wpt/meta/fetch/private-network-access/window-open-existing.tentative.window.js.ini b/tests/wpt/meta/fetch/private-network-access/window-open-existing.tentative.window.js.ini new file mode 100644 index 00000000000..390af048834 --- /dev/null +++ b/tests/wpt/meta/fetch/private-network-access/window-open-existing.tentative.window.js.ini @@ -0,0 +1,15 @@ +[window-open-existing.tentative.window.html] + [private to local: failure.] + expected: FAIL + + [public to local: failure.] + expected: FAIL + + [public to private: failure.] + expected: FAIL + + [treat-as-public-address to local: failure.] + expected: FAIL + + [treat-as-public-address to private: failure.] + expected: FAIL diff --git a/tests/wpt/meta/fullscreen/rendering/backdrop-inherit.html.ini b/tests/wpt/meta/fullscreen/rendering/backdrop-inherit.html.ini new file mode 100644 index 00000000000..9de3b56d1e9 --- /dev/null +++ b/tests/wpt/meta/fullscreen/rendering/backdrop-inherit.html.ini @@ -0,0 +1,2 @@ +[backdrop-inherit.html] + expected: TIMEOUT diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/about-srcdoc-navigation-blocked.window.js.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/about-srcdoc-navigation-blocked.window.js.ini index 4f8ca6048f2..ea9cbb0b4de 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/about-srcdoc-navigation-blocked.window.js.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/about-srcdoc-navigation-blocked.window.js.ini @@ -1,4 +1,5 @@ [about-srcdoc-navigation-blocked.window.html] + expected: TIMEOUT [Navigations to about:srcdoc via window.location must be blocked] expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini index 51fd557bd7f..149bcb4ff8c 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini @@ -7,3 +7,6 @@ [load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank#foo'] expected: FAIL + + [load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank'] + expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini index 324db3d9b35..5aef7ce66ce 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html.ini @@ -10,3 +10,6 @@ [load event does not fire on window.open('about:blank?foo')] expected: FAIL + + [load event does not fire on window.open('about:blank')] + expected: FAIL diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini index 5a245d61359..bcda478adb1 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini @@ -1,6 +1,10 @@ [javascript-url-referrer.window.html] + expected: TIMEOUT [unsafe-url referrer policy used to create the starting page] expected: FAIL [origin referrer policy used to create the starting page] expected: FAIL + + [no-referrer referrer policy used to create the starting page] + expected: TIMEOUT diff --git a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini index 27889a98fb5..24d2f8ac554 100644 --- a/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini +++ b/tests/wpt/meta/html/browsers/browsing-the-web/navigating-across-documents/navigate-to-unparseable-url.html.ini @@ -1,6 +1,3 @@ [navigate-to-unparseable-url.html] [location.href setter throws a SyntaxError DOMException for unparseable URLs] expected: FAIL - - [<a> tag navigate fails for unparseable URLs] - expected: FAIL diff --git a/tests/wpt/meta/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini b/tests/wpt/meta/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini new file mode 100644 index 00000000000..a03a8322165 --- /dev/null +++ b/tests/wpt/meta/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini @@ -0,0 +1,3 @@ +[traverse_the_history_3.html] + [Multiple history traversals, last would be aborted] + expected: FAIL diff --git a/tests/wpt/meta/html/dom/aria-attribute-reflection.html.ini b/tests/wpt/meta/html/dom/aria-attribute-reflection.html.ini index 2a19e3e0c81..ba427c34c98 100644 --- a/tests/wpt/meta/html/dom/aria-attribute-reflection.html.ini +++ b/tests/wpt/meta/html/dom/aria-attribute-reflection.html.ini @@ -118,3 +118,9 @@ [aria-valuetext attribute reflects.] expected: FAIL + + [aria-braillelabel attribute reflects.] + expected: FAIL + + [aria-brailleroledescription attribute reflects.] + expected: FAIL diff --git a/tests/wpt/meta/html/dom/elements/global-attributes/dir-assorted.window.js.ini b/tests/wpt/meta/html/dom/elements/global-attributes/dir-assorted.window.js.ini index 4af5281ea87..6d541106aee 100644 --- a/tests/wpt/meta/html/dom/elements/global-attributes/dir-assorted.window.js.ini +++ b/tests/wpt/meta/html/dom/elements/global-attributes/dir-assorted.window.js.ini @@ -22,3 +22,75 @@ [text changes apply to dir=auto on further ancestor after removing dir=auto from closer ancestor] expected: FAIL + + [directionality of bdi elements: dir=ltr with LTR contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=ltr with LTR contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=ltr with RTL contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=ltr with RTL contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=ltr empty in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=ltr empty in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl with LTR contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl with LTR contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl with RTL contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl with RTL contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl empty in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=rtl empty in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=auto with LTR contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=auto with LTR contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=auto with RTL contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=auto with RTL contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: dir=auto empty in ltr parent] + expected: FAIL + + [directionality of bdi elements: dir=auto empty in rtl parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute with LTR contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute with LTR contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute with RTL contents in ltr parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute with RTL contents in rtl parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute empty in ltr parent] + expected: FAIL + + [directionality of bdi elements: no dir attribute empty in rtl parent] + expected: FAIL diff --git a/tests/wpt/meta/html/dom/idlharness.https.html.ini b/tests/wpt/meta/html/dom/idlharness.https.html.ini index 26246934ec4..3c7048902d9 100644 --- a/tests/wpt/meta/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta/html/dom/idlharness.https.html.ini @@ -1043,9 +1043,6 @@ [CanvasRenderingContext2D interface: calling scrollPathIntoView(Path2D) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError] expected: FAIL - [PromiseRejectionEvent interface: attribute promise] - expected: FAIL - [SharedWorker interface: existence and properties of interface prototype object's @@unscopables property] expected: FAIL @@ -1853,6 +1850,84 @@ [Element interface: operation setHTMLUnsafe(DOMString)] expected: FAIL + [ElementInternals interface: attribute states] + expected: FAIL + + [CustomStateSet interface: existence and properties of interface object] + expected: FAIL + + [CustomStateSet interface object length] + expected: FAIL + + [CustomStateSet interface object name] + expected: FAIL + + [CustomStateSet interface: existence and properties of interface prototype object] + expected: FAIL + + [CustomStateSet interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [CustomStateSet interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [CustomStateSet interface: setlike<DOMString>] + expected: FAIL + + [Navigation interface: attribute activation] + expected: FAIL + + [NavigationActivation interface: existence and properties of interface object] + expected: FAIL + + [NavigationActivation interface object length] + expected: FAIL + + [NavigationActivation interface object name] + expected: FAIL + + [NavigationActivation interface: existence and properties of interface prototype object] + expected: FAIL + + [NavigationActivation interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [NavigationActivation interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [NavigationActivation interface: attribute from] + expected: FAIL + + [NavigationActivation interface: attribute entry] + expected: FAIL + + [NavigationActivation interface: attribute navigationType] + expected: FAIL + + [PageRevealEvent interface: existence and properties of interface object] + expected: FAIL + + [PageRevealEvent interface object length] + expected: FAIL + + [PageRevealEvent interface object name] + expected: FAIL + + [PageRevealEvent interface: existence and properties of interface prototype object] + expected: FAIL + + [PageRevealEvent interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [PageRevealEvent interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [PageRevealEvent interface: attribute viewTransition] + expected: FAIL + + [SVGSVGElement interface: attribute onpagereveal] + expected: FAIL + [idlharness.https.html?include=(Document|Window)] [Document interface: documentWithHandlers must inherit property "queryCommandEnabled(DOMString)" with the proper type] @@ -2476,6 +2551,12 @@ [Document interface: calling parseHTMLUnsafe(DOMString) on documentWithHandlers with too few arguments must throw TypeError] expected: FAIL + [Window interface: attribute onpagereveal] + expected: FAIL + + [Window interface: window must inherit property "onpagereveal" with the proper type] + expected: FAIL + [idlharness.https.html?include=HTML.*] [HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "align" with the proper type] @@ -4679,3 +4760,15 @@ [HTMLSelectElement interface: document.createElement("select") must inherit property "showPicker()" with the proper type] expected: FAIL + + [HTMLBodyElement interface: attribute onpagereveal] + expected: FAIL + + [HTMLBodyElement interface: document.createElement("body") must inherit property "onpagereveal" with the proper type] + expected: FAIL + + [HTMLFrameSetElement interface: attribute onpagereveal] + expected: FAIL + + [HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onpagereveal" with the proper type] + expected: FAIL diff --git a/tests/wpt/meta/html/dom/idlharness.worker.js.ini b/tests/wpt/meta/html/dom/idlharness.worker.js.ini index 3663e0ffd9e..6436e807907 100644 --- a/tests/wpt/meta/html/dom/idlharness.worker.js.ini +++ b/tests/wpt/meta/html/dom/idlharness.worker.js.ini @@ -143,9 +143,6 @@ [DedicatedWorkerGlobalScope interface: self must inherit property "cancelAnimationFrame(unsigned long)" with the proper type] expected: FAIL - [PromiseRejectionEvent interface: attribute promise] - expected: FAIL - [SharedWorker interface: existence and properties of interface prototype object's @@unscopables property] expected: FAIL diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini index 4034793cc72..c6f1e5d7d84 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,3 +1,4 @@ [iframe_sandbox_popups_nonescaping-2.html] + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index ff6467094b8..d5fd800f09d 100644 --- a/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/meta/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,3 +1,4 @@ [iframe_sandbox_popups_nonescaping-3.html] + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/meta/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini b/tests/wpt/meta/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini index a4c4052c148..44ea234c7c4 100644 --- a/tests/wpt/meta/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini +++ b/tests/wpt/meta/html/semantics/forms/form-submission-0/urlencoded2.window.js.ini @@ -8,9 +8,6 @@ [application/x-www-form-urlencoded: Basic File test (formdata event)] expected: FAIL - [application/x-www-form-urlencoded: 0x00 in value (formdata event)] - expected: FAIL - [application/x-www-form-urlencoded: 0x00 in filename (normal form)] expected: FAIL diff --git a/tests/wpt/meta/html/semantics/popovers/popover-types-with-hints.tentative.html.ini b/tests/wpt/meta/html/semantics/popovers/popover-types-with-hints.tentative.html.ini index 5120c4022a8..7386e03d9ea 100644 --- a/tests/wpt/meta/html/semantics/popovers/popover-types-with-hints.tentative.html.ini +++ b/tests/wpt/meta/html/semantics/popovers/popover-types-with-hints.tentative.html.ini @@ -19,3 +19,9 @@ [If you: a) show a popover=auto (call it D), then b) show a non-descendent popover=hint of D (call it T), then c) hide D, then T should be left showing. (Non-nested popover=hint can stay open when unrelated popover=autos are hidden)] expected: FAIL + + [You can nest hint popovers] + expected: FAIL + + [If you: a) show a popover=auto (call it D), then b) show a non-descendent popover=hint of D (call it T), then c) hide D, then T should be hidden. (Non-nested popover=hint gets hidden when unrelated popover=autos are hidden)] + expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/dynamic-markup-insertion/document-write/module-tla-delayed.html.ini b/tests/wpt/meta/html/webappapis/dynamic-markup-insertion/document-write/module-tla-delayed.html.ini deleted file mode 100644 index f9a4f08cd70..00000000000 --- a/tests/wpt/meta/html/webappapis/dynamic-markup-insertion/document-write/module-tla-delayed.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[module-tla-delayed.html] - [document.write in an imported module] - expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/meta/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index 1053fb90051..6206f8c0210 100644 --- a/tests/wpt/meta/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/meta/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -2,6 +2,3 @@ expected: TIMEOUT [The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] expected: TIMEOUT - - [The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] - expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini index e1909af3d2f..6e05df1dd38 100644 --- a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini +++ b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini @@ -133,3 +133,21 @@ [not shadowed beforetoggle (window)] expected: FAIL + + [shadowed pagereveal (document.body)] + expected: FAIL + + [shadowed pagereveal removal (document.body)] + expected: FAIL + + [shadowed pagereveal (document.createElement("body"))] + expected: FAIL + + [shadowed pagereveal removal (document.createElement("body"))] + expected: FAIL + + [shadowed pagereveal (window)] + expected: FAIL + + [shadowed pagereveal removal (window)] + expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini index 4bb3869ad9d..de223df7026 100644 --- a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini +++ b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini @@ -133,3 +133,21 @@ [not shadowed beforetoggle (window)] expected: FAIL + + [shadowed pagereveal (document.body)] + expected: FAIL + + [shadowed pagereveal removal (document.body)] + expected: FAIL + + [shadowed pagereveal (document.createElement("frameset"))] + expected: FAIL + + [shadowed pagereveal removal (document.createElement("frameset"))] + expected: FAIL + + [shadowed pagereveal (window)] + expected: FAIL + + [shadowed pagereveal removal (window)] + expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini index 04f99b6b367..f36de5a563e 100644 --- a/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini +++ b/tests/wpt/meta/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html.ini @@ -76,3 +76,15 @@ [beforetoggle is unaffected on a windowless frameset] expected: FAIL + + [Return null when getting the pagereveal event handler of a windowless body] + expected: FAIL + + [Ignore setting of pagereveal window event handlers on windowless body] + expected: FAIL + + [Return null when getting the pagereveal event handler of a windowless frameset] + expected: FAIL + + [Ignore setting of pagereveal window event handlers on windowless frameset] + expected: FAIL diff --git a/tests/wpt/meta/resource-timing/nested-context-navigations-iframe.html.ini b/tests/wpt/meta/resource-timing/nested-context-navigations-iframe.html.ini index 23c4be4506a..9df96f72c08 100644 --- a/tests/wpt/meta/resource-timing/nested-context-navigations-iframe.html.ini +++ b/tests/wpt/meta/resource-timing/nested-context-navigations-iframe.html.ini @@ -1,25 +1,10 @@ [nested-context-navigations-iframe.html] expected: TIMEOUT [Test that iframe refreshes are not observable by the parent] - expected: NOTRUN + expected: TIMEOUT [Test that crossorigin iframe refreshes are not observable by the parent] expected: NOTRUN [Test that cross-site iframe refreshes are not observable by the parent] expected: NOTRUN - - [Test that crossorigin iframe navigations are not observable by the parent, even after history navigations by the parent] - expected: TIMEOUT - - [Test that cross-site iframe navigations are not observable by the parent, even after history navigations by the parent] - expected: NOTRUN - - [Test that iframe navigations are not observable by the parent] - expected: NOTRUN - - [Test that crossorigin iframe navigations are not observable by the parent] - expected: NOTRUN - - [Test that cross-site iframe navigations are not observable by the parent] - expected: NOTRUN diff --git a/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html.ini b/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html.ini index 70cc5a7792f..65ff173a196 100644 --- a/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html.ini +++ b/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html.ini @@ -1,4 +1,5 @@ [audiobuffer-copy-channel.html] + expected: CRASH [Executing "copyFrom-exceptions"] expected: FAIL diff --git a/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini b/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini index 8ea9c7c2fc5..df741b972b5 100644 --- a/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini +++ b/tests/wpt/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini @@ -706,3 +706,9 @@ [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[15073\]\t-1.7331029795529246e-29\t6.4605611562728882e-1\t6.4605611562728882e-1\t1.0000000000000000e+0\t3.8985999999999999e-3\n\t[15074\]\t2.5936898589134216e-1\t5.9696805477142334e-1\t3.3759906888008118e-1\t5.6552283858697683e-1\t3.8985999999999999e-3\n\tMax AbsError of 6.4605611562728882e-1 at index of 15073.\n\tMax RelError of 1.0000000000000000e+0 at index of 15073.\n] expected: FAIL + + [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[15073\]\t-1.8572521661338070e+36\t6.4605611562728882e-1\t1.8572521661338070e+36\t2.8747536339478902e+36\t3.8985999999999999e-3\n\t[15074\]\t2.5936898589134216e-1\t5.9696805477142334e-1\t3.3759906888008118e-1\t5.6552283858697683e-1\t3.8985999999999999e-3\n\tMax AbsError of 1.8572521661338070e+36 at index of 15073.\n\tMax RelError of 2.8747536339478902e+36 at index of 15073.\n] + expected: FAIL + + [X SNR (-681.943331526826 dB) is not greater than or equal to 65.737. Got -681.943331526826.] + expected: FAIL diff --git a/tests/wpt/meta/webgl/idlharness.any.js.ini b/tests/wpt/meta/webgl/idlharness.any.js.ini index 51c3f3177a7..eb3394b109a 100644 --- a/tests/wpt/meta/webgl/idlharness.any.js.ini +++ b/tests/wpt/meta/webgl/idlharness.any.js.ini @@ -3887,6 +3887,24 @@ [WebGL2RenderingContext interface: operation getBufferSubData(GLenum, GLintptr, ArrayBufferView, optional unsigned long long, optional GLuint)] expected: FAIL + [WebGLRenderingContext interface: constant RGBA8 on interface object] + expected: FAIL + + [WebGLRenderingContext interface: constant RGBA8 on interface prototype object] + expected: FAIL + + [WebGLRenderingContext interface: attribute drawingBufferFormat] + expected: FAIL + + [WebGLRenderingContext interface: operation drawingBufferStorage(GLenum, unsigned long, unsigned long)] + expected: FAIL + + [WebGL2RenderingContext interface: attribute drawingBufferFormat] + expected: FAIL + + [WebGL2RenderingContext interface: operation drawingBufferStorage(GLenum, unsigned long, unsigned long)] + expected: FAIL + [idlharness.any.worker.html] [WebGLRenderingContext includes WebGLRenderingContextOverloads: member names are unique] @@ -10155,3 +10173,21 @@ [WebGL2RenderingContext interface: operation getBufferSubData(GLenum, GLintptr, ArrayBufferView, optional unsigned long long, optional GLuint)] expected: FAIL + + [WebGLRenderingContext interface: constant RGBA8 on interface object] + expected: FAIL + + [WebGLRenderingContext interface: constant RGBA8 on interface prototype object] + expected: FAIL + + [WebGLRenderingContext interface: attribute drawingBufferFormat] + expected: FAIL + + [WebGLRenderingContext interface: operation drawingBufferStorage(GLenum, unsigned long, unsigned long)] + expected: FAIL + + [WebGL2RenderingContext interface: attribute drawingBufferFormat] + expected: FAIL + + [WebGL2RenderingContext interface: operation drawingBufferStorage(GLenum, unsigned long, unsigned long)] + expected: FAIL diff --git a/tests/wpt/meta/webmessaging/with-ports/017.html.ini b/tests/wpt/meta/webmessaging/with-ports/017.html.ini new file mode 100644 index 00000000000..c7946fc91b4 --- /dev/null +++ b/tests/wpt/meta/webmessaging/with-ports/017.html.ini @@ -0,0 +1,4 @@ +[017.html] + expected: TIMEOUT + [origin of the script that invoked the method, about:blank] + expected: TIMEOUT diff --git a/tests/wpt/meta/webmessaging/without-ports/018.html.ini b/tests/wpt/meta/webmessaging/without-ports/018.html.ini deleted file mode 100644 index b7b36c1d3a4..00000000000 --- a/tests/wpt/meta/webmessaging/without-ports/018.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[018.html] - expected: TIMEOUT - [origin of the script that invoked the method, javascript:] - expected: TIMEOUT diff --git a/tests/wpt/meta/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini b/tests/wpt/meta/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini deleted file mode 100644 index aa6c9e5b826..00000000000 --- a/tests/wpt/meta/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html] - expected: TIMEOUT - [StorageKey: test 3P about:blank window opened from a 3P iframe] - expected: TIMEOUT diff --git a/tests/wpt/meta/workers/baseurl/alpha/import-in-moduleworker.html.ini b/tests/wpt/meta/workers/baseurl/alpha/import-in-moduleworker.html.ini index 987e8a93681..36d21059338 100644 --- a/tests/wpt/meta/workers/baseurl/alpha/import-in-moduleworker.html.ini +++ b/tests/wpt/meta/workers/baseurl/alpha/import-in-moduleworker.html.ini @@ -1,4 +1,3 @@ [import-in-moduleworker.html] - expected: ERROR [Base URL in module dedicated workers: import] expected: FAIL diff --git a/tests/wpt/meta/workers/semantics/run-a-worker/003.html.ini b/tests/wpt/meta/workers/semantics/run-a-worker/003.html.ini index 89e55870b76..365a9046674 100644 --- a/tests/wpt/meta/workers/semantics/run-a-worker/003.html.ini +++ b/tests/wpt/meta/workers/semantics/run-a-worker/003.html.ini @@ -1,3 +1,4 @@ [003.html] + expected: ERROR [shared] expected: FAIL diff --git a/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/cfrg_curves_bits.js b/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/cfrg_curves_bits.js index 4e12ca0eb71..ef6905e574c 100644 --- a/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/cfrg_curves_bits.js +++ b/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/cfrg_curves_bits.js @@ -60,6 +60,15 @@ function define_tests() { }, algorithmName + " mixed case parameters"); // Null length + // "Null" is not valid per the current spec + // - https://github.com/w3c/webcrypto/issues/322 + // - https://github.com/w3c/webcrypto/issues/329 + // + // Proposal for a spec change: + // - https://github.com/w3c/webcrypto/pull/345 + // + // This test case may be replaced by these new tests: + // - https://github.com/web-platform-tests/wpt/pull/43400 promise_test(function(test) { return subtle.deriveBits({name: algorithmName, public: publicKeys[algorithmName]}, privateKeys[algorithmName], null) .then(function(derivation) { diff --git a/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.js b/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.js index e52ffc6bfdb..cb9747a529f 100644 --- a/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.js +++ b/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.js @@ -56,6 +56,15 @@ function define_tests() { }, namedCurve + " mixed case parameters"); // Null length + // "Null" is not valid per the current spec + // - https://github.com/w3c/webcrypto/issues/322 + // - https://github.com/w3c/webcrypto/issues/329 + // + // Proposal for a spec change: + // - https://github.com/w3c/webcrypto/pull/345 + // + // This test case may be replaced by these new tests: + // - https://github.com/web-platform-tests/wpt/pull/43400 promise_test(function(test) { return subtle.deriveBits({name: "ECDH", public: publicKeys[namedCurve]}, privateKeys[namedCurve], null) .then(function(derivation) { diff --git a/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/hkdf.js b/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/hkdf.js index 2bb58533473..3903da5cddf 100644 --- a/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/hkdf.js +++ b/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/hkdf.js @@ -140,6 +140,15 @@ function define_tests() { }, testName + " with missing info"); // length null (OperationError) + // "Null" is not valid per the current spec + // - https://github.com/w3c/webcrypto/issues/322 + // - https://github.com/w3c/webcrypto/issues/329 + // + // Proposal for a spec change: + // - https://github.com/w3c/webcrypto/pull/345 + // + // This test case may be replaced by these new tests: + // - https://github.com/web-platform-tests/wpt/pull/43400 subsetTest(promise_test, function(test) { return subtle.deriveBits(algorithm, baseKeys[derivedKeySize], null) .then(function(derivation) { diff --git a/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/pbkdf2.js b/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/pbkdf2.js index 0403f382e14..4e4ae79d800 100644 --- a/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/pbkdf2.js +++ b/tests/wpt/tests/WebCryptoAPI/derive_bits_keys/pbkdf2.js @@ -105,6 +105,15 @@ function define_tests() { // Test various error conditions for deriveBits below: // length null (OperationError) + // "Null" is not valid per the current spec + // - https://github.com/w3c/webcrypto/issues/322 + // - https://github.com/w3c/webcrypto/issues/329 + // + // Proposal for a spec change: + // - https://github.com/w3c/webcrypto/pull/345 + // + // This test case may be replaced by these new tests: + // - https://github.com/web-platform-tests/wpt/pull/43400 subsetTest(promise_test, function(test) { return subtle.deriveBits({name: "PBKDF2", salt: salts[saltSize], hash: hashName, iterations: parseInt(iterations)}, baseKeys[passwordSize], null) .then(function(derivation) { diff --git a/tests/wpt/tests/accessibility/crashtests/aria-owned-with-role-change.html b/tests/wpt/tests/accessibility/crashtests/aria-owned-with-role-change.html new file mode 100644 index 00000000000..c5b2130969c --- /dev/null +++ b/tests/wpt/tests/accessibility/crashtests/aria-owned-with-role-change.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html class="test-wait"> +<!-- Test that setting the role an an aria-owns child does not crash. --> +<script> +document.addEventListener("DOMContentLoaded", () => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + document.getElementById('paragraph1').role = 'tab'; + requestAnimationFrame(() => { + requestAnimationFrame(() => { + document.documentElement.className = ''; + }); + }); + }); + }); +}); +</script> +</head> +<body> +<main> + <fieldset id='owner' aria-owns="paragraph1"> + <div> + <p id="paragraph1"> + <mark> + Child + </mark> + </p> + </div> + </fieldset> +</main> + +</body> +</html> diff --git a/tests/wpt/tests/accessibility/crashtests/aria-owns-with-role-change.html b/tests/wpt/tests/accessibility/crashtests/aria-owns-with-role-change.html new file mode 100644 index 00000000000..13e1eaff6dd --- /dev/null +++ b/tests/wpt/tests/accessibility/crashtests/aria-owns-with-role-change.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html class="test-wait"> +<!-- Test that setting the role an an aria-owns element does not crash. --> +<script> +document.addEventListener("DOMContentLoaded", () => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + document.getElementById('owner').role = 'tab'; + requestAnimationFrame(() => { + requestAnimationFrame(() => { + document.documentElement.className = ''; + }); + }); + }); + }); +}); +</script> +</head> +<body> +<main> + <fieldset id='owner' aria-owns="paragraph1"> + <div> + <p id="paragraph1"> + <mark> + Child + </mark> + </p> + </div> + </fieldset> +</main> + +</body> +</html> diff --git a/tests/wpt/tests/clipboard-apis/dataTransfer-clearData.html b/tests/wpt/tests/clipboard-apis/dataTransfer-clearData.html new file mode 100644 index 00000000000..6db7fa44e23 --- /dev/null +++ b/tests/wpt/tests/clipboard-apis/dataTransfer-clearData.html @@ -0,0 +1,59 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<p id="description"></p> +<div id="console"></div> +<script> +const dataTransfer = new DataTransfer(); +const filename = "1.png"; +const filename2 = "2.png"; + +test(() => { + const file = new File(["🕺💃"], filename, { + type: "image/png" + }); + + const file2 = new File(["🕺💃"], filename2, { + type: "image/png" + }); + + dataTransfer.items.add(file); + dataTransfer.items.add(file2); + assert_equals(dataTransfer.items.length, 2); + assert_equals(dataTransfer.types.length, 1); + + dataTransfer.setData("text/plain", "hi"); + assert_equals(dataTransfer.items.length, 3); + assert_equals(dataTransfer.types.length, 2); + + dataTransfer.items.add("hi 2", "text/html"); + dataTransfer.items.add("new octet item", "application/octet-stream"); + + assert_equals(dataTransfer.items.length, 5); + assert_equals(dataTransfer.types.length, 4); + + dataTransfer.clearData("text/html"); + assert_equals(dataTransfer.items.length, 4); + assert_equals(dataTransfer.types.length, 3); + + dataTransfer.clearData(); + assert_equals(dataTransfer.items.length, 2); + assert_equals(dataTransfer.files.length, 2); + assert_equals(dataTransfer.types.length, 1); + assert_equals(dataTransfer.types[0], "Files"); + assert_equals(dataTransfer.files[0].name, filename); + assert_equals(dataTransfer.files[1].name, filename2); + + dataTransfer.items.add("hi", "text/plain"); + assert_equals(dataTransfer.items.length, 3); + assert_equals(dataTransfer.files.length, 2); + assert_equals(dataTransfer.types.length, 2); + + dataTransfer.items.clear(); + assert_equals(dataTransfer.items.length, 0); + assert_equals(dataTransfer.files.length, 0); + assert_equals(dataTransfer.types.length, 0); +}, 'Clear data from dataTransfer'); +</script> +</body> +</html>
\ No newline at end of file diff --git a/tests/wpt/tests/content-security-policy/generic/src-trailing-dot.sub.any.js b/tests/wpt/tests/content-security-policy/generic/src-trailing-dot.sub.any.js new file mode 100644 index 00000000000..f2b45a6957c --- /dev/null +++ b/tests/wpt/tests/content-security-policy/generic/src-trailing-dot.sub.any.js @@ -0,0 +1,6 @@ +// META: global=window,worker + +promise_test(t => { + return fetch("{{location[scheme]}}://{{host}}.:{{location[port]}}" + + "/content-security-policy/support/resource.py"); +}, "Fetch from host with trailing dot should be allowed by CSP."); diff --git a/tests/wpt/tests/content-security-policy/generic/src-trailing-dot.sub.any.js.sub.headers b/tests/wpt/tests/content-security-policy/generic/src-trailing-dot.sub.any.js.sub.headers new file mode 100644 index 00000000000..4a8ad9c0f54 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/generic/src-trailing-dot.sub.any.js.sub.headers @@ -0,0 +1 @@ +Content-Security-Policy: connect-src {{location[scheme]}}://{{host}}.:{{location[port]}}
\ No newline at end of file diff --git a/tests/wpt/tests/content-security-policy/nonce-hiding/dangling-html-or-body.html b/tests/wpt/tests/content-security-policy/nonce-hiding/dangling-html-or-body.tentative.html index 4ba65e05b88..4ba65e05b88 100644 --- a/tests/wpt/tests/content-security-policy/nonce-hiding/dangling-html-or-body.html +++ b/tests/wpt/tests/content-security-policy/nonce-hiding/dangling-html-or-body.tentative.html diff --git a/tests/wpt/tests/content-security-policy/nonce-hiding/dangling-html-or-body.html.headers b/tests/wpt/tests/content-security-policy/nonce-hiding/dangling-html-or-body.tentative.html.headers index 67d4c81e589..67d4c81e589 100644 --- a/tests/wpt/tests/content-security-policy/nonce-hiding/dangling-html-or-body.html.headers +++ b/tests/wpt/tests/content-security-policy/nonce-hiding/dangling-html-or-body.tentative.html.headers diff --git a/tests/wpt/tests/credential-management/fedcm-manifest-not-in-list.https.html b/tests/wpt/tests/credential-management/fedcm-manifest-not-in-list.https.html index 8d85d9eb367..087af384b15 100644 --- a/tests/wpt/tests/credential-management/fedcm-manifest-not-in-list.https.html +++ b/tests/wpt/tests/credential-management/fedcm-manifest-not-in-list.https.html @@ -7,12 +7,12 @@ <script src="/resources/testdriver-vendor.js"></script> <script type="module"> -import {request_options_with_mediation_required, +import {alt_request_options_with_mediation_required, fedcm_test, fedcm_get_and_select_first_account} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - let test_options = request_options_with_mediation_required('manifest-not-in-list.json'); + let test_options = alt_request_options_with_mediation_required('manifest-not-in-list.json'); const cred = fedcm_get_and_select_first_account(t, test_options); return promise_rejects_dom(t, 'NetworkError', cred); }, 'Test that the promise is rejected if the manifest is not in the manifest list'); diff --git a/tests/wpt/tests/css/css-color/parsing/color-computed-relative-color.html b/tests/wpt/tests/css/css-color/parsing/color-computed-relative-color.html index deb1159da45..fd4de953705 100644 --- a/tests/wpt/tests/css/css-color/parsing/color-computed-relative-color.html +++ b/tests/wpt/tests/css/css-color/parsing/color-computed-relative-color.html @@ -103,6 +103,7 @@ fuzzy_test_computed_color(`rgb(from rebeccapurple r calc(g * .5 + g * .5) 10)`, `color(srgb 0.4 0.2 0.0392)`); fuzzy_test_computed_color(`rgb(from rebeccapurple r calc(b * .5 - g * .5) 10)`, `color(srgb 0.4 0.2 0.0392)`); fuzzy_test_computed_color(`rgb(from rgb(20%, 40%, 60%, 80%) calc(r) calc(g) calc(b) / calc(alpha))`, `color(srgb 0.2 0.4 0.6 / 0.8)`); + fuzzy_test_computed_color(`rgb(from rgb(100 110 120 / 0.8) calc(r + 1) calc(g + 1) calc(b + 1) / calc(alpha + 0.01))`, `color(srgb 0.396 0.435 0.474 / 0.81)`); // rgb(101 111 121) // Testing with 'none'. Missing components are resolved to zero during color space conversion. // https://drafts.csswg.org/css-color-4/#missing @@ -172,6 +173,7 @@ // Testing with calc(). fuzzy_test_computed_color(`hsl(from rebeccapurple calc(h) calc(s) calc(l))`, `color(srgb 0.4 0.2 0.6)`); fuzzy_test_computed_color(`hsl(from rgb(20%, 40%, 60%, 80%) calc(h) calc(s) calc(l) / calc(alpha))`, `color(srgb 0.2 0.4 0.6 / 0.8)`); + fuzzy_test_computed_color(`hsl(from hsl(20 30 40 / 0.8) calc(h + 1) calc(s + 1) calc(l + 1) / calc(alpha + 0.01))`, `color(srgb 0.54 0.37 0.28 / 0.81)`); // hsl(21 31 41) // Testing with 'none'. Missing components are resolved to zero during color space conversion. // https://drafts.csswg.org/css-color-4/#missing @@ -242,6 +244,7 @@ // Testing with calc(). fuzzy_test_computed_color(`hwb(from rebeccapurple calc(h) calc(w) calc(b))`, `color(srgb 0.4 0.2 0.6)`); fuzzy_test_computed_color(`hwb(from rgb(20%, 40%, 60%, 80%) calc(h) calc(w) calc(b) / calc(alpha))`, `color(srgb 0.2 0.4 0.6 / 0.8)`); + fuzzy_test_computed_color(`hwb(from hwb(20 30 40 / 0.8) calc(h + 1) calc(w + 1) calc(b + 1) / calc(alpha + 0.01))`, `color(srgb 0.59 0.41 0.31 / 0.81)`); // hwb(21 31 41) // Testing with 'none'. Missing components are resolved to zero during color space conversion. // https://drafts.csswg.org/css-color-4/#missing @@ -308,6 +311,7 @@ // Testing with calc(). fuzzy_test_computed_color(`lab(from lab(25 20 50) calc(l) calc(a) calc(b))`, `lab(25 20 50)`); fuzzy_test_computed_color(`lab(from lab(25 20 50 / 40%) calc(l) calc(a) calc(b) / calc(alpha))`, `lab(25 20 50 / 0.4)`); + fuzzy_test_computed_color(`lab(from lab(50 5 10 / 0.8) calc(l + 1) calc(a + 1) calc(b + 1) / calc(alpha + 0.01))`, `lab(51 6 11 / 0.81)`); // Testing with 'none'. fuzzy_test_computed_color(`lab(from lab(25 20 50) none none none)`, `lab(none none none)`); @@ -371,6 +375,7 @@ // Testing with calc(). fuzzy_test_computed_color(`oklab(from oklab(0.25 0.2 0.5) calc(l) calc(a) calc(b))`, `oklab(0.25 0.2 0.5)`); fuzzy_test_computed_color(`oklab(from oklab(0.25 0.2 0.5 / 40%) calc(l) calc(a) calc(b) / calc(alpha))`, `oklab(0.25 0.2 0.5 / 0.4)`); + fuzzy_test_computed_color(`oklab(from oklab(0.5 .05 0.1 / 0.8) calc(l + 0.01) calc(a + 0.01) calc(b + 0.01) / calc(alpha + 0.01))`, `oklab(0.51 .06 0.11 / 0.81)`); // Testing with 'none'. fuzzy_test_computed_color(`oklab(from oklab(0.25 0.2 0.5) none none none)`, `oklab(none none none)`); @@ -442,6 +447,7 @@ // Testing with calc(). fuzzy_test_computed_color(`lch(from lch(0.7 45 30) calc(l) calc(c) calc(h))`, `lch(0.7 45 30)`); fuzzy_test_computed_color(`lch(from lch(0.7 45 30 / 40%) calc(l) calc(c) calc(h) / calc(alpha))`, `lch(0.7 45 30 / 0.4)`); + fuzzy_test_computed_color(`lch(from lch(50 5 10 / 0.8) calc(l + 1) calc(c + 1) calc(h + 1) / calc(alpha + 0.01))`, `lch(51 6 11 / 0.81)`); // Testing with 'none'. fuzzy_test_computed_color(`lch(from lch(0.7 45 30) none none none)`, `lch(none none none)`); @@ -514,6 +520,7 @@ // Testing with calc(). fuzzy_test_computed_color(`oklch(from oklch(0.7 0.45 30) calc(l) calc(c) calc(h))`, `oklch(0.7 0.45 30)`); fuzzy_test_computed_color(`oklch(from oklch(0.7 0.45 30 / 40%) calc(l) calc(c) calc(h) / calc(alpha))`, `oklch(0.7 0.45 30 / 0.4)`); + fuzzy_test_computed_color(`oklch(from oklch(0.5 .05 0.1 / 0.8) calc(l + 0.01) calc(c + 0.01) calc(h + 0.01) / calc(alpha + 0.01))`, `oklch(0.51 .06 0.11 / 0.81)`); // Testing with 'none'. fuzzy_test_computed_color(`oklch(from oklch(0.7 0.45 30) none none none)`, `oklch(none none none)`); @@ -598,8 +605,9 @@ fuzzy_test_computed_color(`color(from color(${colorSpace} -0.7 -0.5 -0.3 / -40%) ${colorSpace} r g b / alpha)`, `color(${colorSpace} -0.7 -0.5 -0.3 / 0)`); // Testing with calc(). - fuzzy_test_computed_color(`color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} calc(r) calc(g) calc(b))`, `color(${colorSpace} 0.7 0.5 0.3)`); - fuzzy_test_computed_color(`color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} calc(r) calc(g) calc(b) / calc(alpha))`, `color(${colorSpace} 0.7 0.5 0.3 / 0.4)`); + fuzzy_test_computed_color(`color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} calc(r) calc(g) calc(b))`, `color(${colorSpace} 0.7 0.5 0.3)`); + fuzzy_test_computed_color(`color(from color(${colorSpace} 0.7 0.5 0.3 / 40%) ${colorSpace} calc(r) calc(g) calc(b) / calc(alpha))`, `color(${colorSpace} 0.7 0.5 0.3 / 0.4)`); + fuzzy_test_computed_color(`color(from color(${colorSpace} 0.7 0.5 0.3 / 0.8) ${colorSpace} calc(r + 0.01) calc(g + 0.01) calc(b + 0.01) / calc(alpha + 0.01))`, `color(${colorSpace} 0.71 0.51 0.31 / 0.81)`); // Testing with 'none'. fuzzy_test_computed_color(`color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} none none none)`, `color(${colorSpace} none none none)`); @@ -658,8 +666,9 @@ fuzzy_test_computed_color(`color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} x x x / x)`, `color(${resultColorSpace} 7 7 7)`); // Testing with calc(). - fuzzy_test_computed_color(`color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} calc(x) calc(y) calc(z))`, `color(${resultColorSpace} 7 -20.5 100)`); - fuzzy_test_computed_color(`color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} calc(x) calc(y) calc(z) / calc(alpha))`, `color(${resultColorSpace} 7 -20.5 100 / 0.4)`); + fuzzy_test_computed_color(`color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} calc(x) calc(y) calc(z))`, `color(${resultColorSpace} 7 -20.5 100)`); + fuzzy_test_computed_color(`color(from color(${colorSpace} 7 -20.5 100 / 40%) ${colorSpace} calc(x) calc(y) calc(z) / calc(alpha))`, `color(${resultColorSpace} 7 -20.5 100 / 0.4)`); + fuzzy_test_computed_color(`color(from color(${colorSpace} 7 -20.5 100 / 0.8) ${colorSpace} calc(x + 1) calc(y + 1) calc(z + 1) / calc(alpha + 0.01))`, `color(${resultColorSpace} 8 -19.5 101 / 0.81)`); // Testing with 'none'. fuzzy_test_computed_color(`color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} none none none)`, `color(${resultColorSpace} none none none)`); diff --git a/tests/wpt/tests/css/css-color/parsing/color-invalid-relative-color.html b/tests/wpt/tests/css/css-color/parsing/color-invalid-relative-color.html index 9746d6ed20c..2cb3a252917 100644 --- a/tests/wpt/tests/css/css-color/parsing/color-invalid-relative-color.html +++ b/tests/wpt/tests/css/css-color/parsing/color-invalid-relative-color.html @@ -32,6 +32,9 @@ test_invalid_value(`color`, `rgba(from rebeccapurple r g b)`); test_invalid_value(`color`, `rgba(from rgb(10%, 20%, 30%, 40%) r g b / alpha)`); + // Testing with calc(). + test_invalid_value(`color`, `rgb(from rebeccapurple calc(r + 1%) g b)`); + // hsl(from ...) @@ -48,6 +51,10 @@ test_invalid_value(`color`, `hsla(from rebeccapurple h s l)`); test_invalid_value(`color`, `hsla(from rgb(10%, 20%, 30%, 40%) h s l / alpha)`); + // Testing with calc(). + test_invalid_value(`color`, `hsl(from rebeccapurple calc(h + 1deg) s l)`); + test_invalid_value(`color`, `hsl(from rebeccapurple calc(h + 1%) s l)`); + // hwb(from ...) // Testing invalid values. @@ -59,6 +66,10 @@ test_invalid_value(`color`, `hwb(from rebeccapurple x w b)`); test_invalid_value(`color`, `hwb(from rebeccapurple h g b)`); + // Testing with calc(). + test_invalid_value(`color`, `hwb(from rebeccapurple calc(h + 1deg) w b)`); + test_invalid_value(`color`, `hwb(from rebeccapurple calc(h + 1%) w b)`); + for (const colorSpace of [ "lab", "oklab" ]) { // Testing invalid values. test_invalid_value(`color`, `${colorSpace}(from ${colorSpace}(.25 20 50) l 10deg 10)`); @@ -72,6 +83,9 @@ test_invalid_value(`color`, `${colorSpace}(from ${colorSpace}(.25 20 50) lightness a b)`); test_invalid_value(`color`, `${colorSpace}(from ${colorSpace}(.25 20 50) x a b)`); test_invalid_value(`color`, `${colorSpace}(from ${colorSpace}(.25 20 50) h g b)`); + + // Testing with calc(). + test_invalid_value(`color`, `${colorSpace}(from ${colorSpace}(.25 20 50) l calc(a + 1%) b)`); } for (const colorSpace of [ "lch", "oklch" ]) { @@ -87,6 +101,10 @@ test_invalid_value(`color`, `${colorSpace}(from ${colorSpace}(.70 45 30) lightness c h)`); test_invalid_value(`color`, `${colorSpace}(from ${colorSpace}(.70 45 30) x c h)`); test_invalid_value(`color`, `${colorSpace}(from ${colorSpace}(.70 45 30) l g b)`); + + // Testing with calc(). + test_invalid_value(`color`, `${colorSpace}(from ${colorSpace}(.70 45 30) l c calc(h + 1%))`); + test_invalid_value(`color`, `${colorSpace}(from ${colorSpace}(.70 45 30) l c calc(h + 1deg))`); } for (const colorSpace of [ "srgb", "srgb-linear", "a98-rgb", "rec2020", "prophoto-rgb", "display-p3" ]) { @@ -100,6 +118,10 @@ test_invalid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} red g b)`); test_invalid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} x g b)`); test_invalid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} l g b)`); + test_invalid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} x y z)`); + + // Testing with calc(). + test_invalid_value(`color`, `color(from color(${colorSpace} 0.7 0.5 0.3) ${colorSpace} calc(r + 1%) g b)`); } for (const colorSpace of [ "xyz", "xyz-d50", "xyz-d65" ]) { @@ -113,6 +135,10 @@ test_invalid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} red y)`); test_invalid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} r y z)`); test_invalid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} l y z)`); + test_invalid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} r g b)`); + + // Testing with calc(). + test_invalid_value(`color`, `color(from color(${colorSpace} 7 -20.5 100) ${colorSpace} calc(x + 1%) y z)`); } </script> </body> diff --git a/tests/wpt/tests/css/css-contain/contain-layout-dynamic-001.html b/tests/wpt/tests/css/css-contain/contain-layout-dynamic-001.html new file mode 100644 index 00000000000..428d2b9d4d9 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-layout-dynamic-001.html @@ -0,0 +1,228 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Dynamic change to layout containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<meta name="assert" content="Verify layout containment is properly updated after dynamic change to the contain property."> +<style> + /* Selectors for contain */ + #none .wrapper { + contain: none; + } + #layout .wrapper { + contain: layout; + } + #none_to_layout .wrapper { + contain: none; + } + #layout_to_none .wrapper { + contain: layout; + } + + /* Selectors for testing absolute/fixed positioned elements */ + #top_spacer { + height: 100px; + background: lightgray; + } + .absolute_pos { + position: absolute; + top: 42px; + } + .fixed_pos { + position: fixed; + top: 42px; + } + + /* Selectors for testing baseline */ + .flex { + display: inline-flex; + align-items: baseline; + } + + /* Selectors for testing IFC (floats) */ + .floatleft { + float: left; + } + .clearleft { + clear: left; + } + + /* Selectors for testing IFC (margin collapsing) */ + .blockmargin { + margin: 25px 0; + } + .wrapper.blockmargin { + background: lightgray; + } + + .rect { + background: black; + width: 50px; + height: 100px; + } +</style> +<body> + <div id="log"></div> + + <div id="top_spacer"></div> + + <div id="none"> + <div class="wrapper"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + <div class="flex"> + <div class="rect"></div> + <div class="wrapper rect">X</div> + </div> + <div> + <div class="floatleft rect"></div> + <div class="wrapper"> + <div class="clearleft rect"></div> + </div> + </div> + <div> + <div class="wrapper blockmargin"> + <div class="rect blockmargin"></div> + </div> + </div> + </div> + + <div id="layout"> + <div class="wrapper"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + <div class="flex"> + <div class="rect"></div> + <div class="wrapper rect">X</div> + </div> + <div> + <div class="floatleft rect"></div> + <div class="wrapper"> + <div class="clearleft rect"></div> + </div> + </div> + <div> + <div class="wrapper blockmargin"> + <div class="rect blockmargin"></div> + </div> + </div> + </div> + + <div id="none_to_layout"> + <div class="wrapper"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + <div class="flex"> + <div class="rect"></div> + <div class="wrapper rect">X</div> + </div> + <div> + <div class="floatleft rect"></div> + <div class="wrapper"> + <div class="clearleft rect"></div> + </div> + </div> + <div> + <div class="wrapper blockmargin"> + <div class="rect blockmargin"></div> + </div> + </div> + </div> + + <div id="layout_to_none"> + <div class="wrapper"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + <div class="flex"> + <div class="rect"></div> + <div class="wrapper rect">X</div> + </div> + <div> + <div class="floatleft rect"></div> + <div class="wrapper"> + <div class="clearleft rect"></div> + </div> + </div> + <div> + <div class="wrapper blockmargin"> + <div class="rect blockmargin"></div> + </div> + </div> + </div> + + <script> + function verifyLayoutContainment(id, applied) { + let container = document.getElementById(id); + let wrappers = container.getElementsByClassName("wrapper"); + + // To verify the containment box establishes an absolute positioning + // containing block and a fixed positioning containing block, we test + // positions of absolutely/fixed positioned children (a bit below the + // containment box rather than a bit below the top of the viewport). + let containingBlockTop = wrappers[0].getBoundingClientRect().top; + let absTop = container.getElementsByClassName("absolute_pos")[0] + .getBoundingClientRect().top; + assert_equals(absTop > containingBlockTop, applied, "absolute positioning containing block"); + let fixedTop = container.getElementsByClassName("fixed_pos")[0] + .getBoundingClientRect().top; + assert_equals(fixedTop > containingBlockTop, applied, "fixed positioning containing block"); + + // To verify the containment box suppresses baseline, we verify that + // the two items in the flex container are properly aligned. + let item1 = wrappers[1]; + let item2 = item1.previousElementSibling; + let aligned = Math.abs(item1.getBoundingClientRect().top - item2.getBoundingClientRect().top) <= 1; + assert_equals(aligned, applied, "vertical baseline suppressed"); + + // To verify the containment box establishes an independent formatting + // context, we test position the clear: left div with respect to the + // float: left div. + let floatLeft = wrappers[2].previousElementSibling; + let clearLeft = wrappers[2].firstElementChild; + let clearNextToFloat = Math.abs(floatLeft.getBoundingClientRect().top - clearLeft.getBoundingClientRect().top) <= 1; + assert_equals(clearNextToFloat, applied, "independent formatting context (floats)"); + + // In addition, we verify that the margin inside the containment box + // are not collapsed. + let IFCWithMargin = wrappers[3]; + let childWithMargin = IFCWithMargin.firstElementChild; + let marginCollapsed = Math.abs(IFCWithMargin.getBoundingClientRect().height - childWithMargin.getBoundingClientRect().height) <= 1; + assert_equals(!marginCollapsed, applied, "independent formatting context (margins collapsing)"); + } + + function setContain(id, value) { + let container = document.getElementById(id); + Array.from(container.getElementsByClassName("wrapper")) + .forEach(element => element.style.contain = value); + } + + promise_test(async () => { + await document.fonts.ready; + verifyLayoutContainment("none", /* applied=*/false); + }, "contain: none"); + + promise_test(async () => { + await document.fonts.ready; + verifyLayoutContainment("layout", /* applied=*/true); + }, "contain: layout"); + + promise_test(async () => { + await document.fonts.ready; + setContain("none_to_layout", "layout"); + verifyLayoutContainment("none_to_layout", /* applied=*/true) + }, "switching contain from none to layout"); + + promise_test(async () => { + await document.fonts.ready; + setContain("layout_to_none", "none"); + verifyLayoutContainment("layout_to_none", /* applied=*/false); + }, "switching contain from layout to none"); + </script> +</body> diff --git a/tests/wpt/tests/css/css-contain/contain-paint-dynamic-001.html b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-001.html new file mode 100644 index 00000000000..899b5643c1a --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-001.html @@ -0,0 +1,199 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Dynamic change to paint containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<meta name="assert" content="Verify paint containment is properly updated after dynamic change to the contain property."> +<style> + /* Selectors for contain */ + #none .wrapper { + contain: none; + } + #paint .wrapper { + contain: paint; + } + #none_to_paint .wrapper { + contain: none; + } + #paint_to_none .wrapper { + contain: paint; + } + + /* Selectors for testing absolute/fixed positioned elements */ + #top_spacer { + height: 100px; + background: lightgray; + } + .absolute_pos { + position: absolute; + top: 42px; + } + .fixed_pos { + position: fixed; + top: 42px; + } + + /* Selectors for testing IFC (floats) */ + .floatleft { + float: left; + } + .clearleft { + clear: left; + } + + /* Selectors for testing IFC (margin collapsing) */ + .blockmargin { + margin: 25px 0; + } + .wrapper.blockmargin { + background: lightgray; + } + + .rect { + background: black; + width: 50px; + height: 100px; + } +</style> +<body> + <div id="log"></div> + + <div id="top_spacer"></div> + + <div id="none"> + <div class="wrapper"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + <div> + <div class="floatleft rect"></div> + <div class="wrapper"> + <div class="clearleft rect"></div> + </div> + </div> + <div> + <div class="wrapper blockmargin"> + <div class="rect blockmargin"></div> + </div> + </div> + </div> + + <div id="paint"> + <div class="wrapper"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + <div> + <div class="floatleft rect"></div> + <div class="wrapper"> + <div class="clearleft rect"></div> + </div> + </div> + <div> + <div class="wrapper blockmargin"> + <div class="rect blockmargin"></div> + </div> + </div> + </div> + + <div id="none_to_paint"> + <div class="wrapper"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + <div> + <div class="floatleft rect"></div> + <div class="wrapper"> + <div class="clearleft rect"></div> + </div> + </div> + <div> + <div class="wrapper blockmargin"> + <div class="rect blockmargin"></div> + </div> + </div> + </div> + + <div id="paint_to_none"> + <div class="wrapper"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + <div> + <div class="floatleft rect"></div> + <div class="wrapper"> + <div class="clearleft rect"></div> + </div> + </div> + <div> + <div class="wrapper blockmargin"> + <div class="rect blockmargin"></div> + </div> + </div> + </div> + + <script> + function verifyPaintContainment(id, applied) { + let container = document.getElementById(id); + let wrappers = container.getElementsByClassName("wrapper"); + + // To verify the containment box establishes an absolute positioning + // containing block and a fixed positioning containing block, we test + // positions of absolutely/fixed positioned children (a bit below the + // containment box rather than a bit below the top of the viewport). + let containingBlockTop = wrappers[0].getBoundingClientRect().top; + let absTop = container.getElementsByClassName("absolute_pos")[0] + .getBoundingClientRect().top; + assert_equals(absTop > containingBlockTop, applied, "absolute positioning containing block"); + let fixedTop = container.getElementsByClassName("fixed_pos")[0] + .getBoundingClientRect().top; + assert_equals(fixedTop > containingBlockTop, applied, "fixed positioning containing block"); + + // To verify the containment box establishes an independent formatting + // context, we test position the clear: left div with respect to the + // float: left div. + let floatLeft = wrappers[1].previousElementSibling; + let clearLeft = wrappers[1].firstElementChild; + let clearNextToFloat = Math.abs(floatLeft.getBoundingClientRect().top - clearLeft.getBoundingClientRect().top) <= 1; + assert_equals(clearNextToFloat, applied, "independent formatting context"); + + // In addition, we verify that the margin inside the containment box + // are not collapsed. + let IFCWithMargin = wrappers[2]; + let childWithMargin = IFCWithMargin.firstElementChild; + let marginCollapsed = Math.abs(IFCWithMargin.getBoundingClientRect().height - childWithMargin.getBoundingClientRect().height) <= 1; + assert_equals(!marginCollapsed, applied, "independent formatting context (margins collapsing)"); + } + + function setContain(id, value) { + let container = document.getElementById(id); + Array.from(container.getElementsByClassName("wrapper")) + .forEach(element => element.style.contain = value); + } + + promise_test(async () => { + await document.fonts.ready; + verifyPaintContainment("none", /* applied=*/false); + }, "contain: none"); + + promise_test(async () => { + await document.fonts.ready; + verifyPaintContainment("paint", /* applied=*/true); + }, "contain: paint"); + + promise_test(async () => { + await document.fonts.ready; + setContain("none_to_paint", "paint"); + verifyPaintContainment("none_to_paint", /* applied=*/true) + }, "switching contain from none to paint"); + + promise_test(async () => { + await document.fonts.ready; + setContain("paint_to_none", "none"); + verifyPaintContainment("paint_to_none", /* applied=*/false); + }, "switching contain from paint to none"); + </script> +</body> diff --git a/tests/wpt/tests/css/css-contain/contain-paint-dynamic-002-ref.html b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-002-ref.html new file mode 100644 index 00000000000..58473c86492 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-002-ref.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>Dynamic change to paint containment (reference)</title> + +<style> + #container { + width: 100px; + height: 100px; + background: green; + contain: paint; + } + #overflowing { + width: 400px; + height: 100px; + } + .square { + display: inline-block; + width: 50px; + height: 50px; + margin: 5px; + } + .red { + background: red; + } +</style> + +<body> + <p>PASS if you see a green square and no red.</p> + <div id="container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="red square"></div></div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-paint-dynamic-002.html b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-002.html new file mode 100644 index 00000000000..0096e83d5bf --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-002.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>Dynamic change to paint containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<meta name="assert" content="Verify paint containment is properly updated after dynamic change to the contain property."> +<link rel="match" href="contain-paint-dynamic-002-ref.html"> + +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> + +<style> + #container { + width: 100px; + height: 100px; + background: green; + } + #overflowing { + width: 400px; + height: 100px; + } + .square { + display: inline-block; + width: 50px; + height: 50px; + margin: 5px; + } + .red { + background: red; + } +</style> + +<body> + <p>PASS if you see a green square and no red.</p> + <div id="container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="red square"></div></div> + </div> + <script> + window.addEventListener("TestRendered", async () => { + container.style.contain = "paint"; + await waitForAtLeastOneFrame(); + takeScreenshot(); + }); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-paint-dynamic-003-ref.html b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-003-ref.html new file mode 100644 index 00000000000..b30f32d9c3d --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-003-ref.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>Dynamic change to paint containment (reference)</title> + +<style> + #container { + width: 100px; + height: 100px; + background: green; + contain: none; + } + #overflowing { + width: 400px; + height: 100px; + } + .square { + display: inline-block; + width: 50px; + height: 50px; + margin: 5px; + } + .green { + background: green; + } +</style> + +<body> + <p>PASS if you see <em>two</em> green squares.</p> + <div id="container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="red square"></div></div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-paint-dynamic-003.html b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-003.html new file mode 100644 index 00000000000..e7fcbac0e6a --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-paint-dynamic-003.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>Dynamic change to paint containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<meta name="assert" content="Verify paint containment is properly updated after dynamic change to the contain property."> +<link rel="match" href="contain-paint-dynamic-003-ref.html"> + +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> + +<style> + #container { + width: 100px; + height: 100px; + background: green; + contain: paint; + } + #overflowing { + width: 400px; + height: 100px; + } + .square { + display: inline-block; + width: 50px; + height: 50px; + margin: 5px; + } + .green { + background: green; + } +</style> + +<body> + <p>PASS if you see <em>two</em> green squares.</p> + <div id="container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="red square"></div></div> + </div> + <script> + window.addEventListener("TestRendered", async () => { + container.style.contain = "none"; + await waitForAtLeastOneFrame(); + takeScreenshot(); + }); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/contain-size-dynamic-001.html b/tests/wpt/tests/css/css-contain/contain-size-dynamic-001.html new file mode 100644 index 00000000000..f670d301c56 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-size-dynamic-001.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Dynamic change to size containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<meta name="assert" content="Verify size containment is properly updated after dynamic change to the contain property."> +<style> + /* Selectors for contain */ + #none .wrapper { + containt: none; + } + #size .wrapper { + contain: size; + } + #none_to_size .wrapper { + containt: none; + } + #size_to_none .wrapper { + contain: size; + } + + /* Selectors for testing sizing as empty */ + .wrapper { + display: inline-block; + } + .box { + display: inline-block; + width: 50px; + height: 5px; + background: black; + } +</style> +<body> + <div id="log"></div> + + <div id="none"> + <div class="wrapper"><div class="box"></div></div> + </div> + + <div id="size"> + <div class="wrapper"><div class="box"></div></div> + </div> + + <div id="none_to_size"> + <div class="wrapper"><div class="box"></div></div> + </div> + + <div id="size_to_none"> + <div class="wrapper"><div class="box"></div></div> + </div> + + <script> + function verifySizeContainment(id, applied) { + // To verify size containment applies, we test whether it is sized as + // if empty i.e. the size of its inner box is ignored. + let container = document.getElementById(id); + let wrapper = container.getElementsByClassName("wrapper")[0]; + let wrapperBox = wrapper.getBoundingClientRect(); + assert_equals(wrapperBox.width == 0, applied, "width is zero"); + assert_equals(wrapperBox.height == 0, applied, "height is zero"); + } + + function setContain(id, value) { + let container = document.getElementById(id); + let wrapper = container.getElementsByClassName("wrapper")[0]; + wrapper.style.contain = value; + } + + promise_test(async () => { + verifySizeContainment("none", /*applied=*/false); + }, "contain: none"); + + promise_test(async () => { + verifySizeContainment("size", /*applied=*/true); + }, "contain: size"); + + promise_test(async () => { + setContain("none_to_size", "size"); + verifySizeContainment("none_to_size", /*applied=*/true); + }, "switching contain from none to size"); + + promise_test(async () => { + setContain("size_to_none", "none"); + verifySizeContainment("size_to_none", /*applied=*/false); + }, "switching contain from size to none"); + </script> +</body> diff --git a/tests/wpt/tests/css/css-contain/contain-style-dynamic-001.html b/tests/wpt/tests/css/css-contain/contain-style-dynamic-001.html new file mode 100644 index 00000000000..dfd4032ac55 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/contain-style-dynamic-001.html @@ -0,0 +1,280 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Dynamic change to style containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<meta name="assert" content="Verify style containment is properly updated after dynamic change to the contain property."> +<style> + /* Selectors for contain */ + #none .wrapper { + contain: none; + } + #style .wrapper { + contain: style; + } + #none_to_style .wrapper { + contain: none; + } + #style_to_none .wrapper { + contain: style; + } + + /* Selectors for testing counters */ + .set_counter_to_9 { + counter-set: testcounter 9; + } + .increment_counter { + counter-increment: testcounter; + } + .set_counter_to_10 { + counter-set: testcounter 10; + } + span.print_counter::after { + font: 25px/1 Ahem; + content: counters(testcounter, "."); + } + + /* Selectors for testing quotes */ + .open_quote::after { + content: open-quote; + } + .close_quote::after { + content: close-quote; + } + .no_open_quote::after { + content: no-open-quote; + } + .no_close_quote::after { + content: no-close-quote; + } + span.print_quotes::before, span.print_quotes::after { + font: 25px/1 Ahem; + quotes: "A" "" "BB" "" "CCC" "" "DDDD" "" "EEEEE" "" "FFFFF" "" "GGGGGG" "" "HHHHHHH" "" "IIIIIIII" "" "JJJJJJJJJ" ""; + } + span.print_quotes::before { + content: open-quote; + } + span.print_quotes::after { + content: no-close-quote; + } +</style> +<body> + <div id="log"></div> + + <div id="none"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="wrapper"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="wrapper"> + <span class="set_counter_to_10"></span> + </div> + <span><span class="print_counter"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="open_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="close_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="no_open_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="no_close_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + </div> + + <div id="style"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="wrapper"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="wrapper"> + <span class="set_counter_to_10"></span> + </div> + <span><span class="print_counter"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="open_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="close_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="no_open_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="no_close_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + </div> + + <div id="none_to_style"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="wrapper"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="wrapper"> + <span class="set_counter_to_10"></span> + </div> + <span><span class="print_counter"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="open_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="close_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="no_open_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="no_close_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + </div> + + <div id="style_to_none"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="wrapper"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="wrapper"> + <span class="set_counter_to_10"></span> + </div> + <span><span class="print_counter"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="open_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="close_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="no_open_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + + <span><span class="print_quotes"></span></span> + <div class="wrapper"> + <span class="no_close_quote"></span> + </div> + <span><span class="print_quotes"></span></span> + </div> + + <script> + function verifyStyleContainment(id, applied) { + let container = document.getElementById(id); + + // To verify style containment for counters and quotes, we check whether + // the properties in the wrapper affect the string length of generated + // content. + function haveSameStringLength(box1, box2) { + const ahemFontSizePx = 25; + return Math.abs(box2.width - box1.width) < ahemFontSizePx / 2; + } + let counter_box = + Array.from(container.getElementsByClassName("print_counter")) + .map(e => e.parentNode.getBoundingClientRect()); + let quote_box = + Array.from(container.getElementsByClassName("print_quotes")) + .map(e => e.parentNode.getBoundingClientRect()); + assert_equals(haveSameStringLength(counter_box[0], counter_box[1]), applied, "increment-counter"); + assert_equals(haveSameStringLength(counter_box[2], counter_box[3]), applied, "set-counter"); + assert_equals(haveSameStringLength(quote_box[0], quote_box[1]), applied, "open-quote"); + assert_equals(haveSameStringLength(quote_box[2], quote_box[3]), applied, "close-quote"); + assert_equals(haveSameStringLength(quote_box[4], quote_box[5]), applied, "no-open-quote"); + assert_equals(haveSameStringLength(quote_box[6], quote_box[7]), applied, "no-close-quote"); + } + + function setContain(id, value) { + let container = document.getElementById(id); + Array.from(container.getElementsByClassName("wrapper")) + .forEach(element => element.style.contain = value); + } + + promise_test(async () => { + await document.fonts.ready; + verifyStyleContainment("none", /*applied=*/ false); + }, "contain: none"); + + promise_test(async () => { + await document.fonts.ready; + verifyStyleContainment("style", /*applied=*/ true); + }, "contain: style"); + + promise_test(async () => { + await document.fonts.ready; + setContain("none_to_style", "style"); + verifyStyleContainment("none_to_style", /*applied=*/ true); + }, "switching contain from none to style"); + + promise_test(async () => { + await document.fonts.ready; + setContain("style_to_none", "none"); + verifyStyleContainment("style_to_none", /*applied=*/ false); + }, "switching contain from style to none"); + </script> +</body> diff --git a/tests/wpt/tests/css/css-contain/container-queries/pseudo-elements-008.html b/tests/wpt/tests/css/css-contain/container-queries/pseudo-elements-008.html index 1d722a46b65..859deb2206e 100644 --- a/tests/wpt/tests/css/css-contain/container-queries/pseudo-elements-008.html +++ b/tests/wpt/tests/css/css-contain/container-queries/pseudo-elements-008.html @@ -12,6 +12,10 @@ #target::marker { font-size: 10cqw; } #target::first-line { font-size: 10cqw; } #target::first-letter { font-size: 10cqw; } + #target::highlight(foo) { + text-decoration-line: underline; + text-decoration-thickness: 10cqw; + } #outer::first-line { font-size: 10cqw; } #outer::first-letter { font-size: 10cqw; } dialog::backdrop { font-size: 10cqw; } @@ -45,6 +49,9 @@ assert_equals(getComputedStyle(target, "::first-letter").fontSize, "20px"); }, "Originating element container for ::first-letter"); test(() => { + assert_equals(getComputedStyle(target, "::highlight(foo)").textDecorationThickness, "20px"); + }, `Originating element container for ::highlight`); + test(() => { assert_equals(getComputedStyle(outer, "::first-line").fontSize, "30px"); }, "Originating element container for outer ::first-line"); test(() => { diff --git a/tests/wpt/tests/css/css-contain/container-queries/pseudo-elements-013.html b/tests/wpt/tests/css/css-contain/container-queries/pseudo-elements-013.html new file mode 100644 index 00000000000..870b5891153 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/container-queries/pseudo-elements-013.html @@ -0,0 +1,42 @@ +<!doctype html> +<title>@container: originating element container for highlight pseudo elements</title> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-queries"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/cq-testcommon.js"></script> +<style> + #target { container-type: inline-size; } + #target::highlight(foo) { + text-decoration-line: underline; + text-decoration-thickness: 0px; + } + @container (width >= 300px) { + #target::highlight(foo) { + text-decoration-line: underline; + text-decoration-thickness: 10cqw; + } + #target::highlight(bar) { + text-decoration-line: underline; + text-decoration-thickness: 10cqw; + } + } +</style> +<div id="outer" style="width: 200px"> + <div id="target"></div> +</div> +<script> + setup(() => assert_implements_container_queries()); + + test(() => { + assert_equals(getComputedStyle(target, "::highlight(foo)").textDecorationThickness, "0px"); + }, `Initial text-decoration-thickness for highlight pseudo`); + + outer.style.width = "300px"; + + test(() => { + assert_equals(getComputedStyle(target, "::highlight(foo)").textDecorationThickness, "30px"); + }, `text-decoration-thickness for highlight pseudo depending on container`); + test(() => { + assert_equals(getComputedStyle(target, "::highlight(bar)").textDecorationThickness, "30px"); + }, `text-decoration-thickness for highlight pseudo depending on container only defined in a query`); +</script> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/animation-display-lock.html b/tests/wpt/tests/css/css-contain/content-visibility/animation-display-lock.html index 0a03768fc35..279ffd002ed 100644 --- a/tests/wpt/tests/css/css-contain/content-visibility/animation-display-lock.html +++ b/tests/wpt/tests/css/css-contain/content-visibility/animation-display-lock.html @@ -175,7 +175,7 @@ promise_test(async t => { animation.currentTime = 1999; await animation.ready; - await waitForEvent(animation, 'finish'); + await waitForAnimationFrames(2); assert_true(animationFinishEvent, 'Animation event not blocked on display locked subtree if ' + diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-095-ref.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-095-ref.html index 844ca37eb6c..3e7d8cd92b3 100644 --- a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-095-ref.html +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-095-ref.html @@ -9,6 +9,7 @@ width: 150px; height: 150px; background: lightblue; + contain: content; } #positioned { position: absolute; diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-layout-containment-001.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-layout-containment-001.html new file mode 100644 index 00000000000..852e064a5e3 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-layout-containment-001.html @@ -0,0 +1,185 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>content-visibility and layout containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/rendering-utils.js"></script> +<meta name="assert" content="content-visibility: auto and elements skipping their content change the used value of the contain property to turn on layout containment."> +<style> + /* Selectors for content-visibility */ + #spacer_for_far_to_viewport { + height: 300vh; + } + .content_visibility { + /* Dynamic modification of content-visibility may change whether style + containment is applied, which in turn may cause drastic invalidations + (e.g. rebuilding counters). Make the test more robust by forcing + style containment to always apply. */ + contain: style; + } + #visible .content_visibility { + content-visibility: visible; + } + #hidden .content_visibility { + content-visibility: hidden; + } + #auto_far .content_visibility { + content-visibility: auto; + } + #auto_close .content_visibility { + content-visibility: auto; + } + #visible_to_hidden .content_visibility { + content-visibility: visible; + } + #hidden_to_visible .content_visibility { + content-visibility: hidden; + } + #visible_to_auto .content_visibility { + content-visibility: visible; + } + #auto_to_visible .content_visibility { + content-visibility: auto; + } + + /* Selectors for testing baseline */ + .flex { + display: inline-flex; + align-items: baseline; + } + .rect { + background: black; + width: 50px; + height: 100px; + } +</style> +<body> + <div id="log"></div> + + <div id="visible"> + <div class="flex"> + <div class="rect"></div> + <div class="content_visibility rect">X</div> + </div> + </div> + + <div id="hidden"> + <div class="flex"> + <div class="rect"></div> + <div class="content_visibility rect">X</div> + </div> + </div> + + <div id="auto_close"> + <div class="flex"> + <div class="rect"></div> + <div class="content_visibility rect">X</div> + </div> + </div> + + <div id="visible_to_hidden"> + <div class="flex"> + <div class="rect"></div> + <div class="content_visibility rect">X</div> + </div> + </div> + + <div id="hidden_to_visible"> + <div class="flex"> + <div class="rect"></div> + <div class="content_visibility rect">X</div> + </div> + </div> + + <div id="visible_to_auto"> + <div class="flex"> + <div class="rect"></div> + <div class="content_visibility rect">X</div> + </div> + </div> + + <div id="auto_to_visible"> + <div class="flex"> + <div class="rect"></div> + <div class="content_visibility rect">X</div> + </div> + </div> + + <div id="spacer_for_far_to_viewport"></div> + + <div id="auto_far"> + <div class="flex"> + <div class="rect"></div> + <div class="content_visibility rect">X</div> + </div> + </div> + + <script> + function layoutContainmentApplied(id) { + let container = document.getElementById(id); + let content_visibility = container.getElementsByClassName("content_visibility")[0]; + + // To verify layout containment, we test baseline suppression. + // See contain-layout-dynamic-001.html for more details. + let item1 = content_visibility; + let item2 = item1.previousElementSibling; + return Math.abs(item1.getBoundingClientRect().top - item2.getBoundingClientRect().top) <= 1; + } + + function setContentVisibility(id, value) { + let container = document.getElementById(id); + let content_visibility = container.getElementsByClassName("content_visibility")[0]; + content_visibility.style.contentVisibility = value; + } + + promise_test(async () => { + await document.fonts.ready; + assert_false(layoutContainmentApplied("visible")); + }, "content-visibility: visible"); + + promise_test(async () => { + await document.fonts.ready; + assert_true(layoutContainmentApplied("hidden")); + }, "content-visibility: hidden"); + + promise_test(async () => { + await document.fonts.ready; + await waitForAtLeastOneFrame(); + assert_true(layoutContainmentApplied("auto_far")); + }, "content-visibility: auto (far from viewport)"); + + promise_test(async () => { + await document.fonts.ready; + await waitForAtLeastOneFrame(); + assert_true(layoutContainmentApplied("auto_close")); + }, "content-visibility: auto (close from viewport)"); + + promise_test(async () => { + await document.fonts.ready; + setContentVisibility("visible_to_hidden", "hidden"); + assert_true(layoutContainmentApplied("visible_to_hidden")); + }, "switching content-visibility from visible to hidden"); + + promise_test(async () => { + await document.fonts.ready; + setContentVisibility("hidden_to_visible", "visible"); + assert_false(layoutContainmentApplied("hidden_to_visible")); + }, "switching content-visibility from hidden to visible"); + + promise_test(async () => { + await document.fonts.ready; + setContentVisibility("visible_to_auto", "auto"); + await waitForAtLeastOneFrame(); + assert_true(layoutContainmentApplied("visible_to_auto")); + }, "switching content-visibility from visible to auto"); + + promise_test(async () => { + await document.fonts.ready; + setContentVisibility("auto_to_visible", "visible"); + assert_false(layoutContainmentApplied("auto_to_visible")); + }, "switching content-visibility from auto to visible"); + </script> +</body> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-layout-paint-containment-001.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-layout-paint-containment-001.html new file mode 100644 index 00000000000..788139e17eb --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-layout-paint-containment-001.html @@ -0,0 +1,179 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>content-visibility and layout/paint containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/rendering-utils.js"></script> +<meta name="assert" content="content-visibility: auto and elements skipping their content change the used value of the contain property to turn on layout/paint containment, affecting absolute/fixed positioned descendants."> +<style> + /* Selectors for content-visibility */ + #spacer_for_far_to_viewport { + height: 300vh; + } + .content_visibility { + /* Dynamic modification of content-visibility may change whether style + containment is applied, which in turn may cause drastic invalidations + (e.g. rebuilding counters). Make the test more robust by forcing + style containment to always apply. */ + contain: style; + } + #visible { + content-visibility: visible; + } + #hidden { + content-visibility: hidden; + } + #auto_far { + content-visibility: auto; + } + #auto_close { + content-visibility: auto; + } + #visible_to_hidden { + content-visibility: visible; + } + #hidden_to_visible { + content-visibility: hidden; + } + #visible_to_auto { + content-visibility: visible; + } + #auto_to_visible { + content-visibility: auto; + } + + /* Selectors for testing absolute/fixed positioning container blocks */ + #top_spacer { + height: 100px; + background: lightgray; + } + .absolute_pos { + position: absolute; + top: 42px; + } + .fixed_pos { + position: fixed; + top: 42px; + } +</style> +<body> + <div id="log"></div> + + <div id="top_spacer"></div> + + <div id="visible" class="content_visibility"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + + <div id="hidden" class="content_visibility"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + + <div id="auto_close" class="content_visibility"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + + <div id="visible_to_hidden" class="content_visibility"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + + <div id="hidden_to_visible" class="content_visibility"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + + <div id="visible_to_auto" class="content_visibility"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + + <div id="auto_to_visible" class="content_visibility"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + + <div id="spacer_for_far_to_viewport"></div> + + <div id="auto_far" class="content_visibility"> + <div class="absolute_pos"></div> + <div class="fixed_pos"></div> + </div> + + <script> + function verifyContainmentFromAbsoluteFixedPositioning(id, applied) { + // content-visibility: auto and elements skipping their content change + // apply paint/layout containment, making them an absolute/fixed + // positioning container blocks. + // See contain-paint-dynamic-001.html / contain-layout-dynamic-001.html. + + let container = document.getElementById(id); + let containerTop = container.getBoundingClientRect().top; + + let abs_top = container.getElementsByClassName("absolute_pos")[0] + .getBoundingClientRect().top; + assert_equals(abs_top > containerTop, applied, "absolute positioning containing block"); + + let fixed_top = container.getElementsByClassName("fixed_pos")[0] + .getBoundingClientRect().top; + assert_equals(fixed_top > containerTop, applied, "fixed positioning containing block"); + } + + function setContentVisibility(id, value) { + let container = document.getElementById(id); + container.style.contentVisibility = value; + } + + promise_test(async () => { + verifyContainmentFromAbsoluteFixedPositioning("visible", + /*applied=*/false); + }, "content-visibility: visible"); + + promise_test(async () => { + verifyContainmentFromAbsoluteFixedPositioning("hidden", + /*applied=*/true); + }, "content-visibility: hidden"); + + promise_test(async () => { + await waitForAtLeastOneFrame(); + verifyContainmentFromAbsoluteFixedPositioning("auto_far", + /*applied=*/true); + }, "content-visibility: auto (far from viewport)"); + + promise_test(async () => { + await waitForAtLeastOneFrame(); + verifyContainmentFromAbsoluteFixedPositioning("auto_close", + /*applied=*/true); + }, "content-visibility: auto (close from viewport)"); + + promise_test(async () => { + setContentVisibility("visible_to_hidden", "hidden"); + verifyContainmentFromAbsoluteFixedPositioning("visible_to_hidden", + /*applied=*/true); + }, "switching content-visibility from visible to hidden"); + + promise_test(async () => { + setContentVisibility("hidden_to_visible", "visible"); + verifyContainmentFromAbsoluteFixedPositioning("hidden_to_visible", + /*applied=*/false); + }, "switching content-visibility from hidden to visible"); + + promise_test(async () => { + setContentVisibility("visible_to_auto", "auto"); + await waitForAtLeastOneFrame(); + verifyContainmentFromAbsoluteFixedPositioning("visible_to_auto", + /*applied=*/true); + }, "switching content-visibility from visible to auto"); + + promise_test(async () => { + setContentVisibility("auto_to_visible", "visible"); + verifyContainmentFromAbsoluteFixedPositioning("auto_to_visible", + /*applied=*/false); + }, "switching content-visibility from auto to visible"); + </script> +</body> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-001-ref.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-001-ref.html new file mode 100644 index 00000000000..1e8e96df13f --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-001-ref.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>content-visibility and paint containment (reference)</title> + +<style> + .container { + width: 100px; + height: 100px; + background: green; + } + .hidden { + contain: layout paint style; + } + .visible { + contain: none; + } + #overflowing { + width: 400px; + height: 100px; + } + .square { + display: inline-block; + width: 50px; + height: 50px; + margin: 5px; + } + .red { + background: red; + } + .green { + background: green; + } +</style> + +<body> + <p>PASS if you see a green square and no red.</p> + <div class="hidden container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="red square"></div></div> + </div> + <p>PASS if you see <em>two</em> green squares.</p> + <div class="visible container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="green square"></div></div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-001.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-001.html new file mode 100644 index 00000000000..b18a9cb1e92 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-001.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>content-visibility and paint containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<meta name="assert" content="Verify paint containment is implied by content-visibility."> +<link rel="match" href="content-visibility-paint-containment-001-ref.html"> + +<style> + .container { + width: 100px; + height: 100px; + background: green; + } + .hidden { + content-visibility: hidden; + } + .visible { + content-visibility: visible; + } + #overflowing { + width: 400px; + height: 100px; + } + .square { + display: inline-block; + width: 50px; + height: 50px; + margin: 5px; + } + .red { + background: red; + } + .green { + background: green; + } +</style> + +<body> + <p>PASS if you see a green square and no red.</p> + <div class="hidden container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="red square"></div></div> + </div> + <p>PASS if you see <em>two</em> green squares.</p> + <div class="visible container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="green square"></div></div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-002-ref.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-002-ref.html new file mode 100644 index 00000000000..e71e9c0c9f8 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-002-ref.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>content-visibility and paint containment (reference)</title> + +<style> + #container { + width: 100px; + height: 100px; + background: green; + content-visibility: hidden; + contain: style; + } + #overflowing { + width: 400px; + height: 100px; + } + .square { + display: inline-block; + width: 50px; + height: 50px; + margin: 5px; + } + .red { + background: red; + } +</style> + +<body> + <p>PASS if you see a green square and no red.</p> + <div id="container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="red square"></div></div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-002.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-002.html new file mode 100644 index 00000000000..bfe6d13b394 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-002.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>content-visibility and paint containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<meta name="assert" content="Verify paint containment is properly updated after dynamic change to the content-visibility property."> +<link rel="match" href="content-visibility-paint-containment-002-ref.html"> + +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> + +<style> + #container { + width: 100px; + height: 100px; + background: green; + content-visibility: visible; + /* Dynamic modification of content-visibility may change whether style + containment is applied, which in turn may cause drastic invalidations + (e.g. rebuilding counters). Make the test more robust by forcing + style containment to always apply. */ + contain: style; + } + #overflowing { + width: 400px; + height: 100px; + } + .square { + display: inline-block; + width: 50px; + height: 50px; + margin: 5px; + } + .red { + background: red; + } +</style> + +<body> + <p>PASS if you see a green square and no red.</p> + <div id="container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="red square"></div></div> + </div> + <script> + window.addEventListener("TestRendered", async () => { + container.style.contentVisibility = "hidden"; + await waitForAtLeastOneFrame(); + takeScreenshot(); + }); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-003-ref.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-003-ref.html new file mode 100644 index 00000000000..43f3a2ed480 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-003-ref.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>Dynamic change to paint containment (reference)</title> + +<style> + #container { + width: 100px; + height: 100px; + background: green; + content-visibility: visible; + contain: style; + } + #overflowing { + width: 400px; + height: 100px; + } + .square { + display: inline-block; + width: 50px; + height: 50px; + margin: 5px; + } + .green { + background: green; + } +</style> + +<body> + <p>PASS if you see <em>two</em> green squares.</p> + <div id="container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="green square"></div></div> + </div> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-003.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-003.html new file mode 100644 index 00000000000..0a4de9c4e55 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-paint-containment-003.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>content-visibility and paint containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#contain-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<meta name="assert" content="Verify paint containment is properly updated after dynamic change to the content-visibility property."> +<link rel="match" href="content-visibility-paint-containment-003-ref.html"> + +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> + +<style> + #container { + width: 100px; + height: 100px; + background: green; + content-visibility: hidden; + /* Dynamic modification of content-visibility may change whether style + containment is applied, which in turn may cause drastic invalidations + (e.g. rebuilding counters). Make the test more robust by forcing + style containment to always apply. */ + contain: style; + } + #overflowing { + width: 400px; + height: 100px; + } + .square { + display: inline-block; + width: 50px; + height: 50px; + margin: 5px; + } + .green { + background: green; + } +</style> + +<body> + <p>PASS if you see <em>two</em> green squares.</p> + <div id="container"> + <div id="overflowing"><div class="square"></div><div class="square"></div><div class="green square"></div></div> + </div> + <script> + window.addEventListener("TestRendered", async () => { + container.style.contentVisibility = "visible"; + await waitForAtLeastOneFrame(); + takeScreenshot(); + }); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-size-containment-001.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-size-containment-001.html new file mode 100644 index 00000000000..3b4a7c55a43 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-size-containment-001.html @@ -0,0 +1,264 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>content-visibility and size containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/rendering-utils.js"></script> +<meta name="assert" content="elements skipping their content change the used value of the contain property to turn on size containment."> +<style> + /* Selectors for content-visibility */ + #spacer_for_far_to_viewport { + height: 300vh; + } + .content_visibility { + /* Dynamic modification of content-visibility may change whether style + containment is applied, which in turn may cause drastic invalidations + (e.g. rebuilding counters). Make the test more robust by forcing + style containment to always apply. */ + contain: style; + } + #visible .content_visibility { + content-visibility: visible; + } + #hidden .content_visibility { + content-visibility: hidden; + } + #auto_far .content_visibility { + content-visibility: auto; + } + #auto_close .content_visibility { + content-visibility: auto; + } + #visible_to_hidden .content_visibility { + content-visibility: visible; + } + #hidden_to_visible .content_visibility { + content-visibility: hidden; + } + #visible_to_auto_far .content_visibility { + content-visibility: visible; + } + #auto_far_to_visible .content_visibility { + content-visibility: auto; + } + #hidden_to_auto_close .content_visibility { + content-visibility: hidden; + } + #auto_close_to_hidden .content_visibility { + content-visibility: auto; + } + #auto_dynamic_relevancy .content_visibility { + content-visibility: auto; + } + + /* Selectors for testing sizing as empty */ + .content_visibility { + display: inline-block; + } + .box { + display: inline-block; + width: 50px; + height: 5px; + background: black; + } +</style> +<body> + <div id="log"></div> + + <div id="visible"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="hidden"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="auto_close"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="visible_to_hidden"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="hidden_to_visible"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="hidden_to_auto"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="auto_to_hidden"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="hidden_to_auto_close"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="auto_close_to_hidden"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="spacer_for_far_to_viewport"></div> + + <div id="auto_far"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="visible_to_auto_far"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + <div id="auto_far_to_visible"> + <div class="content_visibility"><div class="box"></div></div> + </div> + + + <div id="auto_dynamic_relevancy"> + <div tabindex="1"></div> + <div class="content_visibility" tabindex="2"><div class="box"></div></div> + </div> + + <script> + function sizeContainmentApplied(id) { + // To verify size containment, we test the width is zero. + // See contain-size-dynamic-001.html for more details. + let container = document.getElementById(id); + let content_visibility = container.getElementsByClassName("content_visibility")[0]; + return content_visibility.getBoundingClientRect().width == 0; + } + + function setContentVisibility(id, value) { + let container = document.getElementById(id); + let content_visibility = container.getElementsByClassName("content_visibility")[0]; + content_visibility.style.contentVisibility = value; + } + + promise_test(async () => { + assert_false(sizeContainmentApplied("visible")); + }, "content-visibility: visible"); + + promise_test(async () => { + assert_true(sizeContainmentApplied("hidden")); + }, "content-visibility: hidden"); + + promise_test(async () => { + await waitForAtLeastOneFrame(); + assert_true(sizeContainmentApplied("auto_far")); + }, "content-visibility: auto (far from viewport)"); + + promise_test(async () => { + await waitForAtLeastOneFrame(); + assert_false(sizeContainmentApplied("auto_close")); + }, "content-visibility: auto (close from viewport)"); + + promise_test(async () => { + setContentVisibility("visible_to_hidden", "hidden"); + assert_true(sizeContainmentApplied("visible_to_hidden")); + }, "switching content-visibility from visible to hidden"); + + promise_test(async () => { + setContentVisibility("hidden_to_visible", "visible"); + assert_false(sizeContainmentApplied("hidden_to_visible")); + }, "switching content-visibility from hidden to visible"); + + promise_test(async () => { + setContentVisibility("auto_far_to_visible", "visible"); + assert_false(sizeContainmentApplied("auto_far_to_visible")); + }, "switching content-visibility from auto (far from viewport) to visible"); + + promise_test(async () => { + setContentVisibility("visible_to_auto_far", "auto"); + await waitForAtLeastOneFrame(); + assert_true(sizeContainmentApplied("visible_to_auto_far")); + }, "switching content-visibility from visible to auto (far from viewport)"); + + promise_test(async () => { + setContentVisibility("auto_close_to_hidden", "hidden"); + assert_true(sizeContainmentApplied("auto_close_to_hidden")); + }, "switching content-visibility from auto (close from viewport) to hidden"); + + promise_test(async () => { + setContentVisibility("hidden_to_auto_close", "auto"); + await waitForAtLeastOneFrame(); + assert_false(sizeContainmentApplied("hidden_to_auto_close")); + }, "switching content-visibility from hidden to auto (close from viewport)"); + + + let contentVisibilityAuto = + document.getElementById("auto_dynamic_relevancy"). + getElementsByClassName("content_visibility")[0]; + + function clearRelevancyReasons() { + // Scrolling auto_dynamic_relevancy far from the viewport, unfocus it + // and unselect it. Also temporarily set its content-visibility to + // 'hidden' before scrolling to give more chance for browsers to + // re-apply size containment, especially if they fail the corresponding + // tests "going back to initial state" below. + setContentVisibility("auto_dynamic_relevancy", "hidden"); + window.scrollTo(0, 0); + document.getElementById("auto_dynamic_relevancy") + .firstElementChild.focus({preventScroll: true}); + window.getSelection().empty(); + setContentVisibility("auto_dynamic_relevancy", "auto"); + } + + promise_test(async (t) => { + t.add_cleanup(clearRelevancyReasons); + + await waitForAtLeastOneFrame(); + assert_true(sizeContainmentApplied("auto_dynamic_relevancy"), + "size containment applied when initially far to the viewport"); + + contentVisibilityAuto.scrollIntoView(); + await waitForAtLeastOneFrame(); + assert_false(sizeContainmentApplied("auto_dynamic_relevancy"), + "size containment applied when changing from far to close to the viewport"); + + window.scrollTo(0, 0); + assert_true(sizeContainmentApplied("auto_dynamic_relevancy"), + "size containment applied when changing back from close to far to the viewport"); + }, "content-visibility: auto, changing proximity to the viewport"); + + promise_test(async (t) => { + t.add_cleanup(clearRelevancyReasons); + + await waitForAtLeastOneFrame(); + assert_true(sizeContainmentApplied("auto_dynamic_relevancy"), + "size containment applied when initially unfocused"); + + contentVisibilityAuto.focus({preventScroll: true}); + await waitForAtLeastOneFrame(); + assert_false(sizeContainmentApplied("auto_dynamic_relevancy"), + "size containment applied after focusing"); + + document.getElementById("auto_dynamic_relevancy") + .firstElementChild.focus({preventScroll: true}); + assert_true(sizeContainmentApplied("auto_dynamic_relevancy"), + "size containment applied after unfocusing back"); + }, "content-visibility: auto, after being focused/unfocused"); + + promise_test(async (t) => { + t.add_cleanup(clearRelevancyReasons); + + await waitForAtLeastOneFrame(); + assert_true(sizeContainmentApplied("auto_dynamic_relevancy"), + "size containment applied when initially unselected"); + + window.getSelection().selectAllChildren(contentVisibilityAuto); + await waitForAtLeastOneFrame(); + assert_false(sizeContainmentApplied("auto_dynamic_relevancy"), + "size containment applied when after selecting"); + + window.getSelection().empty(); + await waitForAtLeastOneFrame(); + assert_true(sizeContainmentApplied("auto_dynamic_relevancy"), + "size containment applied when unselecting back"); + }, "content-visibility: auto, after being selected/unselected"); + + </script> +</body> diff --git a/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-style-containment-001.html b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-style-containment-001.html new file mode 100644 index 00000000000..d976d89b733 --- /dev/null +++ b/tests/wpt/tests/css/css-contain/content-visibility/content-visibility-style-containment-001.html @@ -0,0 +1,202 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>content-visibility and style containment</title> +<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1765615"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/rendering-utils.js"></script> +<meta name="assert" content="content-visibility: auto and elements skipping their content change the used value of the contain property to turn on style containment."> +<style> + /* Selectors for content-visibility */ + #spacer_for_far_to_viewport { + height: 300vh; + } + #visible .content_visibility { + content-visibility: visible; + } + #hidden .content_visibility { + content-visibility: hidden; + } + #auto_far .content_visibility { + content-visibility: auto; + } + #auto_close .content_visibility { + content-visibility: auto; + } + #visible_to_hidden .content_visibility { + content-visibility: visible; + } + #hidden_to_visible .content_visibility { + content-visibility: hidden; + } + #visible_to_auto .content_visibility { + content-visibility: visible; + } + #auto_to_visible .content_visibility { + content-visibility: auto; + } + + /* Selectors for testing counters */ + .set_counter_to_9 { + counter-set: testcounter 9; + } + .increment_counter { + counter-increment: testcounter; + } + span.print_counter::after { + font: 25px/1 Ahem; + content: counters(testcounter, "."); + } + +</style> +<body> + <div id="log"></div> + + <div id="visible"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="content_visibility"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + </div> + + <div id="hidden"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="content_visibility"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + </div> + + <div id="auto_close"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="content_visibility"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + </div> + + <div id="visible_to_hidden"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="content_visibility"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + </div> + + <div id="hidden_to_visible"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="content_visibility"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + </div> + + <div id="visible_to_auto"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="content_visibility"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + </div> + + <div id="auto_to_visible"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="content_visibility"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + </div> + + <div id="spacer_for_far_to_viewport"></div> + + <div id="auto_far"> + <div class="set_counter_to_9"></div> + <span><span class="print_counter"></span></span> + <div class="content_visibility"> + <span class="increment_counter"></span> + </div> + <span><span class="print_counter"></span></span> + </div> + + <script> + function styleContainmentApplied(id) { + let container = document.getElementById(id); + + let printed_counters = container.getElementsByClassName("print_counter"); + + // To verify style containment, we test the string length of generated + // content for counters. + // See contain-style-dynamic-001.html for more details. + function haveSameStringLength(box1, box2) { + const ahemFontSizePx = 25; + return Math.abs(box2.width - box1.width) < ahemFontSizePx / 2; + } + let beforeBox = printed_counters[0].parentNode.getBoundingClientRect(); + let afterBox = printed_counters[1].parentNode.getBoundingClientRect(); + return haveSameStringLength(beforeBox, afterBox); + } + + function setContentVisibility(id, value) { + let container = document.getElementById(id); + let content_visibility = container.getElementsByClassName("content_visibility")[0]; + content_visibility.style.contentVisibility = value; + } + + promise_test(async () => { + await document.fonts.ready; + assert_false(styleContainmentApplied("visible")); + }, "content-visibility: visible"); + + promise_test(async () => { + await document.fonts.ready; + assert_true(styleContainmentApplied("hidden")); + }, "content-visibility: hidden"); + + promise_test(async () => { + await document.fonts.ready; + await waitForAtLeastOneFrame(); + assert_true(styleContainmentApplied("auto_far")); + }, "content-visibility: auto (far from viewport)"); + + promise_test(async () => { + await document.fonts.ready; + await waitForAtLeastOneFrame(); + assert_true(styleContainmentApplied("auto_close")); + }, "content-visibility: auto (close from viewport)"); + + promise_test(async () => { + await document.fonts.ready; + setContentVisibility("visible_to_hidden", "hidden"); + assert_true(styleContainmentApplied("visible_to_hidden")); + }, "switching content-visibility from visible to hidden"); + + promise_test(async () => { + await document.fonts.ready; + setContentVisibility("hidden_to_visible", "visible"); + assert_false(styleContainmentApplied("hidden_to_visible")); + }, "switching content-visibility from hidden to visible"); + + promise_test(async () => { + await document.fonts.ready; + setContentVisibility("visible_to_auto", "auto"); + await waitForAtLeastOneFrame(); + assert_true(styleContainmentApplied("visible_to_auto")); + }, "switching content-visibility from visible to auto"); + + promise_test(async () => { + await document.fonts.ready; + setContentVisibility("auto_to_visible", "visible"); + assert_false(styleContainmentApplied("auto_to_visible")); + }, "switching content-visibility from auto to visible"); + </script> +</body> diff --git a/tests/wpt/tests/css/css-content/parsing/content-computed.html b/tests/wpt/tests/css/css-content/parsing/content-computed.html index 60044e89e7e..61c1ec56353 100644 --- a/tests/wpt/tests/css/css-content/parsing/content-computed.html +++ b/tests/wpt/tests/css/css-content/parsing/content-computed.html @@ -10,7 +10,11 @@ <script src="/css/support/computed-testcommon.js"></script> </head> <body> -<div id="target"></div> +<!-- Note: we have to make this element 'display:none' so that it doesn't + trigger actual image loads from remote web servers when we set its + 'content' property to e.g. https://www.example.com/picture.svg via the + scripted tests below. --> +<div id="target" style="display:none"></div> <script> function test_computed_value_combinations(property, specified, computed) { test_computed_value(property, specified, computed); diff --git a/tests/wpt/tests/css/css-grid/stretch-grid-item-button-overflow-ref.html b/tests/wpt/tests/css/css-grid/stretch-grid-item-button-overflow-ref.html index 900c794af10..a798dffe958 100644 --- a/tests/wpt/tests/css/css-grid/stretch-grid-item-button-overflow-ref.html +++ b/tests/wpt/tests/css/css-grid/stretch-grid-item-button-overflow-ref.html @@ -28,6 +28,14 @@ body,html { color:black; background:white; font:16px/1 monospace; padding:0; mar box-sizing: border-box; } +.os { + /* Note: overflow:scroll does add scrollbars to the testcase's + empty buttons in some UAs, so we need to include this style + in the reference case to create a proper reference rendering + that's robust in the face of UAs that do/don't support + scrollable buttons. */ + overflow: scroll; +} .m { margin: 17px 3px 5px 7px; } x { display:block; width:110px; height:5px; background:grey; } diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-001-ref.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-001-ref.html new file mode 100644 index 00000000000..92751144a26 --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-001-ref.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test Reference</title> +<head> + <style> + div { + width: 200px; + height: 100px; + } + #h1 { + text-underline-offset: 1svw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 2svh; + } + </style> +</head> +<body> + <div id="h1">With container size</div> +</body>
\ No newline at end of file diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-001.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-001.html new file mode 100644 index 00000000000..1e22dcc9924 --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-001.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Highlights using container sizes</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> +<link rel="match" href="custom-highlight-container-metrics-001-ref.html"> +<meta name="assert" value="lengths depending on containers take the correct values in a universal highlight with no container"> +<head> + <style> + div { + width: 200px; + height: 100px; + } + ::highlight(highlight1) { + text-underline-offset: 1cqw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 2cqh; + } +</style> +</head> +<body> + <div id="h1">With container size</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + CSS.highlights.set("highlight1", new Highlight(r1)); + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-002-ref.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-002-ref.html new file mode 100644 index 00000000000..98ccfa5b11c --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-002-ref.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test Reference</title> +<head> + <style> + .wrapper { + width: 200px; + height: 100px; + text-underline-offset: 4px; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4px; + } + #h2 { + text-underline-offset: 2svw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4svh; + } + </style> +</head> +<body> + <div class="wrapper">With container size</div> + <div id="h2">Without container size</div> +</body>
\ No newline at end of file diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-002.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-002.html new file mode 100644 index 00000000000..0a805cf7ea4 --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-002.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Highlights using container sizes</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> +<link rel="match" href="custom-highlight-container-metrics-002-ref.html"> +<meta name="assert" value="lengths depending on containers take the correct values inside and outside a container"> +<meta name="fuzzy" content="0-60;0-25"> +<head> + <style> + .wrapper { + container: wrapper / size; + width: 200px; + height: 100px; + } + ::highlight(highlight1) { + text-underline-offset: 2cqw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4cqh; + } +</style> +</head> +<body> + <div class="wrapper"> + <div id="h1">With container size</div> + </div> + <div id="h2">Without container size</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + let r2 = new Range(); + r2.setStart(h2, 0); + r2.setEnd(h2, 1); + CSS.highlights.set("highlight1", new Highlight(r1, r2)); + </script> +</body> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-003-ref.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-003-ref.html new file mode 100644 index 00000000000..d3d75333f8a --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-003-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test Reference</title> +<head> + <style> + .wrapper { + width: 200px; + height: 100px; + text-underline-offset: 4px; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4px; + } + </style> +</head> +<body> + <div class="wrapper">With container size</div> + <div>Should be no highlight</div> +</body> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-003.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-003.html new file mode 100644 index 00000000000..189db49bd3e --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-003.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Highlights using container sizes</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> +<link rel="match" href="custom-highlight-container-metrics-003-ref.html"> +<meta name="assert" value="lengths depending on containers take the correct values and a highlight defined inside the container renders only within the container"> +<head> + <style> + .wrapper { + container: wrapper / size; + width: 200px; + height: 100px; + } + @container (width > 100px) { + ::highlight(highlight1) { + text-underline-offset: 2cqw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4cqh; + } + } + </style> +</head> +<body> + <div class="wrapper"> + <div id="h1">With container size</div> + </div> + <div id="h2">Should be no highlight</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + let r2 = new Range(); + r2.setStart(h2, 0); + r2.setEnd(h2, 1); + CSS.highlights.set("highlight1", new Highlight(r1, r2)); + </script> +</body> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-004-ref.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-004-ref.html new file mode 100644 index 00000000000..98ccfa5b11c --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-004-ref.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test Reference</title> +<head> + <style> + .wrapper { + width: 200px; + height: 100px; + text-underline-offset: 4px; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4px; + } + #h2 { + text-underline-offset: 2svw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4svh; + } + </style> +</head> +<body> + <div class="wrapper">With container size</div> + <div id="h2">Without container size</div> +</body>
\ No newline at end of file diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-004.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-004.html new file mode 100644 index 00000000000..158f4ee12c9 --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-004.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Highlights using container sizes</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> +<link rel="match" href="custom-highlight-container-metrics-004-ref.html"> +<meta name="assert" value="lengths depending on containers take the correct values inside and outside a container"> +<meta name="fuzzy" content="0-60;0-25"> +<head> + <style> + .wrapper { + container: wrapper / size; + width: 200px; + height: 100px; + } + ::highlight(highlight1) { + text-underline-offset: 2cqw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4cqh; + } +</style> +</head> +<body> + <div class="wrapper"> + <div> + <div id="h1">With container size</div> + </div> + </div> + <div id="h2">Without container size</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + let r2 = new Range(); + r2.setStart(h2, 0); + r2.setEnd(h2, 1); + CSS.highlights.set("highlight1", new Highlight(r1, r2)); + </script> +</body> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-005.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-005.html new file mode 100644 index 00000000000..d7be78d1fdb --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-005.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Highlights using container sizes</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> +<link rel="match" href="custom-highlight-container-metrics-003-ref.html"> +<meta name="assert" value="a highlight on a container itself renders at the correct size"> +<head> + <style> + .wrapper { + container: wrapper / size; + width: 200px; + height: 100px; + } + @container (width > 100px) { + .wrapper::highlight(highlight1) { + text-underline-offset: 2cqw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4cqh; + } + } + </style> +</head> +<body> + <div id="h1" class="wrapper">With container size</div> + <div id="h2">Should be no highlight</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + let r2 = new Range(); + r2.setStart(h2, 0); + r2.setEnd(h2, 1); + CSS.highlights.set("highlight1", new Highlight(r1, r2)); + </script> +</body> +</html> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-006.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-006.html new file mode 100644 index 00000000000..4bcae073b5d --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-container-metrics-006.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Highlights using container sizes</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths"> +<link rel="match" href="custom-highlight-container-metrics-002-ref.html"> +<meta name="assert" value="lengths depending on containers take the correct values inside and outside a container"> +<meta name="fuzzy" content="0-60;0-25"> +<head> + <style> + .wrapper { + container: wrapper / size; + width: 200px; + height: 100px; + } + ::highlight(highlight1) { + text-underline-offset: 2cqw; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 4cqh; + } +</style> +</head> +<body> + <div id="h1" class="wrapper">With container size</div> + <div id="h2">Without container size</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + let r2 = new Range(); + r2.setStart(h2, 0); + r2.setEnd(h2, 1); + CSS.highlights.set("highlight1", new Highlight(r1, r2)); + </script> +</body> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-001-ref.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-001-ref.html new file mode 100644 index 00000000000..09bc7fac5e5 --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-001-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test Reference</title> +<head> + <style> + div { + width: 200px; + height: 100px; + line-height: 3em; + text-underline-offset: 1svb; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 1svi; + } +</style> +</head> +<body> + <div>With viewport size</div> +</body> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-001.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-001.html new file mode 100644 index 00000000000..0bca0ea6394 --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-001.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Length relative to the logical direction</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="match" href="custom-highlight-logical-metrics-001-ref.html"> +<meta name="assert" value="lengths depending on viewports take the correct values with vertical text"> +<meta name="fuzzy" content="0-30;0-10"> +<head> + <style> + div { + width: 200px; + height: 100px; + line-height: 3em; + } + ::highlight(highlight1) { + text-underline-offset: 1svb; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 1svi; + } +</style> +</head> +<body> + <div id="h1">With viewport size</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + CSS.highlights.set("highlight1", new Highlight(r1)); + </script> +</body> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-002-ref.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-002-ref.html new file mode 100644 index 00000000000..eaed1580f9f --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-002-ref.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test Reference</title> +<head> + <style> + div { + width: 100px; + height: 200px; + writing-mode: vertical-lr; + line-height: 3em; + text-underline-offset: 1svb; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 1svi; + } +</style> +</head> +<body> + <div id="h1">With viewport size</div> +</body> diff --git a/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-002.html b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-002.html new file mode 100644 index 00000000000..9e8acc054db --- /dev/null +++ b/tests/wpt/tests/css/css-highlight-api/painting/custom-highlight-logical-metrics-002.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<meta charset="UTF-8"> +<title>CSS Highlight API Test: Length relative to the logical direction</title> +<link rel="help" href="https://drafts.csswg.org/css-highlight-api-1/"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-styling"> +<link rel="match" href="custom-highlight-logical-metrics-002-ref.html"> +<meta name="assert" value="lengths depending on viewports and logical direction with vertical text"> +<meta name="fuzzy" content="0-30;0-10"> +<head> + <style> + div { + width: 100px; + height: 200px; + writing-mode: vertical-lr; + line-height: 3em; + } + ::highlight(highlight1) { + text-underline-offset: 1svb; + text-decoration-line: underline; + text-decoration-color: green; + text-decoration-thickness: 1svi; + } +</style> +</head> +<body> + <div id="h1">With viewport size</div> + <script> + let r1 = new Range(); + r1.setStart(h1, 0); + r1.setEnd(h1, 1); + CSS.highlights.set("highlight1", new Highlight(r1)); + </script> +</body> diff --git a/tests/wpt/tests/css/css-nesting/conditional-rules.html b/tests/wpt/tests/css/css-nesting/conditional-rules.html index 55ecc1f9e49..ec6f781960b 100644 --- a/tests/wpt/tests/css/css-nesting/conditional-rules.html +++ b/tests/wpt/tests/css/css-nesting/conditional-rules.html @@ -42,7 +42,7 @@ } .test-12 { - @scope (.test-12) { + @scope (&) { :scope { background-color: green; } diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001-ref.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001-ref.html deleted file mode 100644 index 5295bdc34ff..00000000000 --- a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001-ref.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="support/variant-class.js"></script> -<style> -@font-face { - font-family: halt-font; - src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); -} -#container { - font-family: halt-font; - font-size: 20px; - inline-size: 4em; -} -.vrl { - writing-mode: vertical-rl; -} -halt { - font-feature-settings: 'halt' 1, 'vhal' 1; -} -</style> -<div id="container"> - <div>(国国国<halt>(</halt>国国国<halt>(</halt>国</div> - <div>国国国国<halt>(</halt></div> - <div lang="zh-hans">国国国国<halt>“</halt></div> -</div> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html deleted file mode 100644 index ebbea0e52b0..00000000000 --- a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-001.html +++ /dev/null @@ -1,36 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-spacing-trim-property"> -<link rel="match" href="text-spacing-trim-space-first-wrap-001-ref.html"> -<meta name="variant" content="?class=halt,htb"> -<meta name="variant" content="?class=chws,htb"> -<meta name="variant" content="?class=halt,vrl"> -<meta name="variant" content="?class=chws,vrl"> -<script src="support/variant-class.js"></script> -<style> -@font-face { - font-family: halt-font; - src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); -} -@font-face { - font-family: chws-font; - src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-chws.otf'); -} -#container { - font-family: halt-font; - font-size: 20px; - inline-size: 4em; - text-spacing-trim: space-first; -} -.chws #container { - font-family: chws-font; -} -.vrl { - writing-mode: vertical-rl; -} -</style> -<div id="container"> - <div>(国国国(国国国(国</div> - <div>国国国国(</div> - <div lang="zh-hans">国国国国“</div> -</div> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html new file mode 100644 index 00000000000..aef81fbbc0d --- /dev/null +++ b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001-ref.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<script src="support/variant-class.js"></script> +<style> +@font-face { + font-family: halt-font; + src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); +} +#container { + font-family: halt-font; + font-size: 20px; + inline-size: 4em; +} +.vrl { + writing-mode: vertical-rl; +} +halt { + font-feature-settings: 'halt' 1, 'vhal' 1; +} +.trim-start { + ps, ls { font-feature-settings: 'halt' 1, 'vhal' 1; } +} +.space-first { + ls { font-feature-settings: 'halt' 1, 'vhal' 1; } +} +</style> +<div id="container"> + <div><ps>(</ps>国国国<ls>(</ls>国国国<ls>(</ls>国</div> + <div>国国国国<ls>(</ls></div> + <div lang="zh-hans">国国国国<ls>“</ls></div> + + <div><ps>(</ps>国国国<br><ps>(</ps>国国国<br><ps>(</ps>国</div> + <div>国国国国<br><ps>(</ps></div> + <div lang="zh-hans">国国国国<br><ps>“</ps></div> +</div> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001.html index acbfaa3ddcb..3d481df1da2 100644 --- a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-space-first-wrap-br-001.html +++ b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-001.html @@ -1,11 +1,19 @@ <!DOCTYPE html> <meta charset="utf-8"> <link rel="help" href="https://drafts.csswg.org/css-text-4/#text-spacing-trim-property"> -<link rel="match" href="text-spacing-trim-wrap-001-ref.html"> +<link rel="match" href="text-spacing-trim-start-001-ref.html"> <meta name="variant" content="?class=halt,htb"> <meta name="variant" content="?class=chws,htb"> <meta name="variant" content="?class=halt,vrl"> <meta name="variant" content="?class=chws,vrl"> +<meta name="variant" content="?class=space-first,halt,htb"> +<meta name="variant" content="?class=space-first,chws,htb"> +<meta name="variant" content="?class=space-first,halt,vrl"> +<meta name="variant" content="?class=space-first,chws,vrl"> +<meta name="variant" content="?class=trim-start,halt,htb"> +<meta name="variant" content="?class=trim-start,chws,htb"> +<meta name="variant" content="?class=trim-start,halt,vrl"> +<meta name="variant" content="?class=trim-start,chws,vrl"> <script src="support/variant-class.js"></script> <style> @font-face { @@ -20,7 +28,6 @@ font-family: halt-font; font-size: 20px; inline-size: 4em; - text-spacing-trim: space-first; } .chws #container { font-family: chws-font; @@ -28,8 +35,18 @@ .vrl { writing-mode: vertical-rl; } +.trim-start { + text-spacing-trim: trim-start; +} +.space-first { + text-spacing-trim: space-first; +} </style> <div id="container"> + <div>(国国国(国国国(国</div> + <div>国国国国(</div> + <div lang="zh-hans">国国国国“</div> + <div>(国国国<br>(国国国<br>(国</div> <div>国国国国<br>(</div> <div lang="zh-hans">国国国国<br>“</div> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-002-ref.html index b03890c59ca..fd4ca6d6913 100644 --- a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001-ref.html +++ b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-002-ref.html @@ -1,6 +1,5 @@ <!DOCTYPE html> <meta charset="utf-8"> -<script src="support/variant-class.js"></script> <style> @font-face { font-family: halt-font; @@ -9,17 +8,16 @@ #container { font-family: halt-font; font-size: 20px; - inline-size: 4em; -} -.vrl { - writing-mode: vertical-rl; + text-spacing-trim: trim-start; } halt { font-feature-settings: 'halt' 1, 'vhal' 1; } </style> <div id="container"> - <div>(国国国(国国国(国</div> - <div>国国国国(</div> - <div lang="zh-hans">国国国国“</div> + <div> + <halt>(</halt>国国国<br> + <halt>(</halt>国国国<br> + <halt>(</halt>国国国 + </div> </div> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-002.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-002.html new file mode 100644 index 00000000000..0d8b1927266 --- /dev/null +++ b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-start-002.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-spacing-trim-property"> +<link rel="match" href="text-spacing-trim-start-002-ref.html"> +<style> +@font-face { + font-family: halt-font; + src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); +} +#container { + font-family: halt-font; + font-size: 20px; + inline-size: 3.6em; + text-spacing-trim: trim-start; +} +</style> +<div id="container"> + <!-- + The available width is set to fit 3.5 full-width characters, but not 4. + 4 characters can fit only if the first open parenthesis is set half-width. + --> + <div>(国国国(国国国<br>(国国国</div> +</div> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html deleted file mode 100644 index 76af819d79c..00000000000 --- a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-wrap-001.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-spacing-trim-property"> -<link rel="match" href="text-spacing-trim-wrap-001-ref.html"> -<meta name="variant" content="?class=halt,htb"> -<meta name="variant" content="?class=chws,htb"> -<meta name="variant" content="?class=halt,vrl"> -<meta name="variant" content="?class=chws,vrl"> -<script src="support/variant-class.js"></script> -<style> -@font-face { - font-family: halt-font; - src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); -} -@font-face { - font-family: chws-font; - src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-chws.otf'); -} -#container { - font-family: halt-font; - font-size: 20px; - inline-size: 4em; -} -.chws #container { - font-family: chws-font; -} -.vrl { - writing-mode: vertical-rl; -} -</style> -<div id="container"> - <div>(国国国(国国国(国</div> - <div>国国国国(</div> - <div lang="zh-hans">国国国国“</div> -</div> diff --git a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html b/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html deleted file mode 100644 index 017443976f8..00000000000 --- a/tests/wpt/tests/css/css-text/text-spacing-trim/text-spacing-trim-wrap-br-001.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-spacing-trim-property"> -<link rel="match" href="text-spacing-trim-wrap-001-ref.html"> -<meta name="variant" content="?class=halt,htb"> -<meta name="variant" content="?class=chws,htb"> -<meta name="variant" content="?class=halt,vrl"> -<meta name="variant" content="?class=chws,vrl"> -<script src="support/variant-class.js"></script> -<style> -@font-face { - font-family: halt-font; - src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf'); -} -@font-face { - font-family: chws-font; - src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-chws.otf'); -} -#container { - font-family: halt-font; - font-size: 20px; - inline-size: 4em; -} -.chws #container { - font-family: chws-font; -} -.vrl { - writing-mode: vertical-rl; -} -</style> -<div id="container"> - <div>(国国国<br>(国国国<br>(国</div> - <div>国国国国<br>(</div> - <div lang="zh-hans">国国国国<br>“</div> -</div> diff --git a/tests/wpt/tests/css/css-text/white-space/reference/trailing-space-rtl-001-ref.html b/tests/wpt/tests/css/css-text/white-space/reference/trailing-space-rtl-001-ref.html index f3f25235911..25094d539d8 100644 --- a/tests/wpt/tests/css/css-text/white-space/reference/trailing-space-rtl-001-ref.html +++ b/tests/wpt/tests/css/css-text/white-space/reference/trailing-space-rtl-001-ref.html @@ -1,4 +1,5 @@ <!DOCTYPE html> +<meta charset="UTF-8"> <style> body { direction: rtl; diff --git a/tests/wpt/tests/css/css-text/white-space/trailing-space-rtl-001.html b/tests/wpt/tests/css/css-text/white-space/trailing-space-rtl-001.html index 8bc6cc75cbe..0550f7279fc 100644 --- a/tests/wpt/tests/css/css-text/white-space/trailing-space-rtl-001.html +++ b/tests/wpt/tests/css/css-text/white-space/trailing-space-rtl-001.html @@ -1,4 +1,5 @@ <!DOCTYPE html> +<meta charset="UTF-8"> <title>CSS Test: Preserved trailing spaces in RTL</title> <link rel="match" href="reference/trailing-space-rtl-001-ref.html"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> diff --git a/tests/wpt/tests/css/cssom-view/client-props-zoom.html b/tests/wpt/tests/css/cssom-view/client-props-zoom.html new file mode 100644 index 00000000000..fb4c95cada4 --- /dev/null +++ b/tests/wpt/tests/css/cssom-view/client-props-zoom.html @@ -0,0 +1,54 @@ +<!DOCTYPE html> +<title>Client properties for elements with css zoom</title> +<link rel="author" title="Yotam Hacohen" href="mailto:yotha@chromium.org"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://drafts.csswg.org/css-viewport/">" +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + <head> + <style> + div { + width: 64px; + height: 64px; + background-color: blue + } + div.x4_zoom { + zoom: 4.0; + } + </style> + </head> + <body> + + <div id="no_zoom"></div> + <div class="x4_zoom" id="element_with_zoom"></div> + + <div class="x4_zoom"> + <div id="direct_child_of_element_with_zoom"></div> + <div> + <div id="indirect_child_of_element_with_zoom"></div> + </div> + <div class="x4_zoom", id="both_child_and_parent_has_zoom"></div> + </div> + + + <script> + setup(() => { + window.noZoom = document.getElementById("no_zoom"); + }); + function compareObjectToDivWithNoZoom(object){ + assert_equals(object.clientTop, noZoom.clientTop, 'clientTop'); + assert_equals(object.clientLeft, noZoom.clientLeft, 'clientLeft'); + assert_equals(object.clientWidth, noZoom.clientWidth, 'clientWidth'); + assert_equals(object.clientHeight ,noZoom.clientHeight, 'clientHeight'); + } + test(function() { + assert_true(!!noZoom, "no zoom target exists"); + }); + test(function() { + compareObjectToDivWithNoZoom(document.getElementById("element_with_zoom")); + compareObjectToDivWithNoZoom(document.getElementById("direct_child_of_element_with_zoom")); + compareObjectToDivWithNoZoom(document.getElementById("indirect_child_of_element_with_zoom")); + compareObjectToDivWithNoZoom(document.getElementById("both_child_and_parent_has_zoom")); + }); + </script> + </body>
\ No newline at end of file diff --git a/tests/wpt/tests/css/cssom-view/getBoundingClientRect-zoom.html b/tests/wpt/tests/css/cssom-view/getBoundingClientRect-zoom.html new file mode 100644 index 00000000000..18f44de534f --- /dev/null +++ b/tests/wpt/tests/css/cssom-view/getBoundingClientRect-zoom.html @@ -0,0 +1,81 @@ +<!DOCTYPE html> +<title>getBoundingClientRect for elements with css zoom</title> +<link rel="author" title="Yotam Hacohen" href="mailto:yotha@chromium.org"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://drafts.csswg.org/css-viewport/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + <head> + <style> + div { + width: 64px; + height: 64px; + background-color: blue + } + div.x4_zoom { + zoom: 4.0; + background-color: blueviolet; + } + div.x2_zoom { + background-color: chartreuse; + zoom: 2.0; + } + + div.transform { + transform: scale(2); + transform-origin: top left; + } + + + </style> + </head> + <body> + <div id="no_zoom"></div> + <div class="x4_zoom" id="with_zoom"> + </div> + <div class="x2_zoom"> + <div class="x4_zoom" id="nested_zoom"></div> + </div> + <div id="transform_and_zoom" class="x4_zoom transform"></div> + <script> + setup(() => { + window.noZoom = document.getElementById("no_zoom"); + window.withZoom = document.getElementById("with_zoom"); + window.nestedZoom = document.getElementById("nested_zoom"); + window.transformAndZoom = document.getElementById("transform_and_zoom"); + }); + test(function() { + assert_true(!!noZoom, "no zoom target exists"); + assert_true(!!withZoom, "zoom target exists"); + }); + test(function() { + let noZoomRect = noZoom.getBoundingClientRect(); + assert_equals(noZoomRect.left, 8, 'no zoom left'); + assert_equals(noZoomRect.top, 8, 'no zoom top'); + assert_equals(noZoomRect.width, 64, 'no zoom width'); + assert_equals(noZoomRect.height, 64, 'no zoom height'); + }); + test(function() { + let ZoomRect = withZoom.getBoundingClientRect(); + assert_equals(ZoomRect.left, 8, 'x4 zoom left'); + assert_equals(ZoomRect.top, 8 + 64, 'x4 zoom top'); + assert_equals(ZoomRect.width, 256, 'x4 zoom width'); + assert_equals(ZoomRect.height, 256, 'x4 zoom height'); + }); + test(function() { + let nestedZoomRect = nestedZoom.getBoundingClientRect(); + assert_equals(nestedZoomRect.left, 8, 'nested zoom left'); + assert_equals(nestedZoomRect.top, 8 + 64 + 256, 'nested zoom top'); + assert_equals(nestedZoomRect.width, 512, 'nested zoom width'); + assert_equals(nestedZoomRect.height, 512, 'nested zoom height'); + }); + test(function() { + let transformAndZoomRect = transformAndZoom.getBoundingClientRect(); + assert_equals(transformAndZoomRect.left, 8, 'transform and zoom left'); + assert_equals(transformAndZoomRect.top, 8 + 64 + 256 + 128, 'transform and zoom top'); + assert_equals(transformAndZoomRect.width, 512, 'transform and zoom width'); + assert_equals(transformAndZoomRect.height, 512, 'transform and zoom height'); + }); + </script> + </body> +`
\ No newline at end of file diff --git a/tests/wpt/tests/css/cssom-view/getClientRects-zoom.html b/tests/wpt/tests/css/cssom-view/getClientRects-zoom.html new file mode 100644 index 00000000000..d4c249eadb0 --- /dev/null +++ b/tests/wpt/tests/css/cssom-view/getClientRects-zoom.html @@ -0,0 +1,81 @@ +<!DOCTYPE html> +<title>getBoundingClientRect for elements with css zoom</title> +<link rel="author" title="Yotam Hacohen" href="mailto:yotha@chromium.org"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://drafts.csswg.org/css-viewport/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + <head> + <style> + div { + width: 64px; + height: 64px; + background-color: blue + } + div.x4_zoom { + zoom: 4.0; + background-color: blueviolet; + } + div.x2_zoom { + background-color: chartreuse; + zoom: 2.0; + } + + div.transform { + transform: scale(2); + transform-origin: top left; + } + + + </style> + </head> + <body> + <div id="no_zoom"></div> + <div class="x4_zoom" id="with_zoom"> + </div> + <div class="x2_zoom"> + <div class="x4_zoom" id="nested_zoom"></div> + </div> + <div id="transform_and_zoom" class="x4_zoom transform"></div> + <script> + setup(() => { + window.noZoom = document.getElementById("no_zoom"); + window.withZoom = document.getElementById("with_zoom"); + window.nestedZoom = document.getElementById("nested_zoom"); + window.transformAndZoom = document.getElementById("transform_and_zoom"); + }); + test(function() { + assert_true(!!noZoom, "no zoom target exists"); + assert_true(!!withZoom, "zoom target exists"); + }); + test(function() { + let noZoomRect = noZoom.getClientRects()[0]; + assert_equals(noZoomRect.left, 8, 'no zoom left'); + assert_equals(noZoomRect.top, 8, 'no zoom top'); + assert_equals(noZoomRect.width, 64, 'no zoom width'); + assert_equals(noZoomRect.height, 64, 'no zoom height'); + }); + test(function() { + let ZoomRect = withZoom.getClientRects()[0]; + assert_equals(ZoomRect.left, 8, 'x4 zoom left'); + assert_equals(ZoomRect.top, 8 + 64, 'x4 zoom top'); + assert_equals(ZoomRect.width, 256, 'x4 zoom width'); + assert_equals(ZoomRect.height, 256, 'x4 zoom height'); + }); + test(function() { + let nestedZoomRect = nestedZoom.getClientRects()[0]; + assert_equals(nestedZoomRect.left, 8, 'nested zoom left'); + assert_equals(nestedZoomRect.top, 8 + 64 + 256, 'nested zoom top'); + assert_equals(nestedZoomRect.width, 512, 'nested zoom width'); + assert_equals(nestedZoomRect.height, 512, 'nested zoom height'); + }); + test(function() { + let transformAndZoomRect = transformAndZoom.getClientRects()[0]; + assert_equals(transformAndZoomRect.left, 8, 'transform and zoom left'); + assert_equals(transformAndZoomRect.top, 8 + 64 + 256 + 128, 'transform and zoom top'); + assert_equals(transformAndZoomRect.width, 512, 'transform and zoom width'); + assert_equals(transformAndZoomRect.height, 512, 'transform and zoom height'); + }); + </script> + </body> +`
\ No newline at end of file diff --git a/tests/wpt/tests/css/cssom-view/offsetTop-offsetLeft-with-zoom.html b/tests/wpt/tests/css/cssom-view/offsetTop-offsetLeft-with-zoom.html index 2d74a9f116b..a60a18a4313 100644 --- a/tests/wpt/tests/css/cssom-view/offsetTop-offsetLeft-with-zoom.html +++ b/tests/wpt/tests/css/cssom-view/offsetTop-offsetLeft-with-zoom.html @@ -60,14 +60,14 @@ <div id="zoomed_three" class="square three"></div> </div> -<div class = outer_div style="margin: 30px;"> +<div class ="outer_div" style="margin: 30px;" id="outer_div"> <div id="zoomed_middle" style="margin: 10px; zoom:2"> <div class="square" id="unzoomed_inner"></div> </div> </div> <div class = outer_div style="margin: 30px;"> <div id="unzoomed_middle"> - <div class="square" id="zoomed_inner" style="zoom:2"></div> + <div class="square" id="zoomed_inner" style="zoom:2; width: 100px; height: 100px; border: 1px solid black;"></div> </div> </div> @@ -91,5 +91,11 @@ test(() => { assert_equals(zoomed_inner.offsetTop, 0, 'zoomed_inner.offsetTop'); assert_equals(zoomed_inner.offsetLeft, 1, 'zoomed_inner.offsetLeft'); + // check that offset is equal between elements when one of them has css zoom + assert_equals(unzoomed_one.offsetWidth, zoomed_one.offsetWidth, "offsetWidth"); + assert_equals(unzoomed_one.offsetHeight, zoomed_one.offsetHeight, "offsetHeight"); + assert_equals(zoomed_inner.offsetWidth, outer_div.offsetWidth, "offsetWidth for nested element"); + assert_equals(zoomed_inner.offsetHeight, outer_div.offsetHeight, "offsetHeight for nested element"); + }, 'Verifies that offsetTop and offsetLeft find the right OffsetParent and return values excluding the target zoom'); </script> diff --git a/tests/wpt/tests/css/cssom-view/scroll-zoom.html b/tests/wpt/tests/css/cssom-view/scroll-zoom.html new file mode 100644 index 00000000000..1fe4a8acc4a --- /dev/null +++ b/tests/wpt/tests/css/cssom-view/scroll-zoom.html @@ -0,0 +1,63 @@ +<!DOCTYPE html> +<title>scroll properties for elements with css zoom</title> +<link rel="author" title="Yotam Hacohen" href="mailto:yotha@chromium.org"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-scroll"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + <head> + <style> + .container { + height: 100px; + width: 100px; + overflow: scroll; + } + .content { + height: 250px; + width: 250px; + background-image: linear-gradient(red, yellow); + } + #x4_zoom_container { + zoom: 4; + } + </style> + </head> + <body> + <div class="container" id="no_zoom_container"> + <div class="content"></div> + </div> + <div class="container" id="x4_zoom_container"> + <div class="content"></div> + </div> + <div class="container" id="container_with_zoomed_content"> + <div class="content" style="zoom: 2;"></div> + </div> + <div style="zoom: 2;"> + <div class="container" id="scroller_in_zoomed_element"> + <div class="content"></div> + </div> + </div> + <script> + setup(() => { + window.noZoom = document.getElementById("no_zoom_container"); + window.withZoom = document.getElementById("x4_zoom_container"); + window.scrollerWithZoomContent = document.getElementById("container_with_zoomed_content"); + window.scrollerInZoomedElement = document.getElementById("scroller_in_zoomed_element"); + }); + test(function() { + assert_true(!!noZoom, "no zoom target exists"); + assert_true(!!withZoom, "zoom target exists"); + }); + test(function() { + // We remove zoom effects for scroll height and scroll width so values + // should be same for elements with and without zoom + // However scroll values should be changed by zoom on content + assert_equals(noZoom.scrollHeight, withZoom.scrollHeight, 'scrollHeight'); + assert_equals(noZoom.scrollWidth, withZoom.scrollWidth, 'scrollWidth'); + assert_equals(noZoom.scrollHeight*2, scrollerWithZoomContent.scrollHeight, 'scroll height for zoomed content'); + assert_equals(noZoom.scrollWidth*2, scrollerWithZoomContent.scrollWidth, 'scroll width for zoomed content'); + assert_equals(noZoom.scrollHeight, scrollerInZoomedElement.scrollHeight, 'scroll height for scroller in zoomed element'); + assert_equals(noZoom.scrollWidth, scrollerInZoomedElement.scrollWidth, 'scroll width for scroller in zoomed element'); + }); + </script> + </body>
\ No newline at end of file diff --git a/tests/wpt/tests/css/cssom-view/support/scroll-behavior.js b/tests/wpt/tests/css/cssom-view/support/scroll-behavior.js index 0a0968e025b..b22ebf8c21f 100644 --- a/tests/wpt/tests/css/cssom-view/support/scroll-behavior.js +++ b/tests/wpt/tests/css/cssom-view/support/scroll-behavior.js @@ -1,3 +1,5 @@ +// TODO(crbug.com/888443): It would be better to listen to the scrollend event +// instead of polling the scroll position. function observeScrolling(elements, callback) { if (!Array.isArray(elements)) elements = [elements]; @@ -9,9 +11,12 @@ function observeScrolling(elements, callback) { lastTop.set(element, element.scrollTop); }); function tick(frames) { - // We requestAnimationFrame either for 500 frames or until 20 frames with - // no change have been observed. - if (frames >= 500 || frames - lastChangedFrame > 20) { + // We requestAnimationFrame either for 5000 frames or until 20 frames with + // no change have been observed. (In Chromium, frames may run as frequently + // as once per millisecond when threaded compositing is disabled. The limit + // of 5000 frames is chosen to be high enough to reasonably ensure any + // scroll animation will run to completion.) + if (frames >= 5000 || frames - lastChangedFrame > 20) { callback(true); } else { var scrollHappened = elements.some((element) => { diff --git a/tests/wpt/tests/docs/running-tests/chrome.md b/tests/wpt/tests/docs/running-tests/chrome.md index aca93ea2e59..a3ccd95768f 100644 --- a/tests/wpt/tests/docs/running-tests/chrome.md +++ b/tests/wpt/tests/docs/running-tests/chrome.md @@ -27,6 +27,9 @@ If you want to enable a specific [runtime enabled feature][1], use ./wpt run --binary-arg=--enable-blink-features=AsyncClipboard chrome clipboard-apis/ ``` +To use a custom chromedriver build, build the `chromedriver` target in your chromium checkout, +and then pass `--webdriver-binary /path/to/non-default/chromedriver` to `wpt run`. + [A detailed explanation is available](chrome-chromium-installation-detection.html) for more information on how wpt detects and installs the components for Chrome and Chromium. diff --git a/tests/wpt/tests/docs/running-tests/from-local-system.md b/tests/wpt/tests/docs/running-tests/from-local-system.md index f40f8e5ece9..89533ee2104 100644 --- a/tests/wpt/tests/docs/running-tests/from-local-system.md +++ b/tests/wpt/tests/docs/running-tests/from-local-system.md @@ -2,6 +2,15 @@ The tests are designed to be run from your local computer. +# Install WPT + +If you haven't already, clone the web-platform-tests repository: + +```bash +git clone https://github.com/web-platform-tests/wpt.git +cd wpt +``` + ## System Setup Running the tests requires `python` and `pip` as well as updating the @@ -180,7 +189,9 @@ a single process (the default), so there may be more noise in the test results. ### Output formats By default, `./wpt run` outputs test results and a summary in a human readable -format. For debugging, `--log-mach` can give more verbose output. For example: +format. For debugging, `--log-mach` can give more verbose output. (In particular, +it will show the console output from the browser and driver; +by default, those are not shown) For example: ./wpt run --log-mach=- --log-mach-level=info firefox dom/ diff --git a/tests/wpt/tests/dom/observable/tentative/observable-event-target.window.js b/tests/wpt/tests/dom/observable/tentative/observable-event-target.window.js new file mode 100644 index 00000000000..77a137a3622 --- /dev/null +++ b/tests/wpt/tests/dom/observable/tentative/observable-event-target.window.js @@ -0,0 +1,39 @@ +test(() => { + // See https://dom.spec.whatwg.org/#dom-event-eventphase. + const CAPTURING_PHASE = 1; + const BUBBLING_PHASE = 3; + + // First, create a div underneath the `<body>` element. It will be the + // dispatch target for synthetic click events. + const target = + document.querySelector('body').appendChild(document.createElement('div')); + + const body = document.querySelector('body'); + const captureObservable = body.on('click', {capture: true}); + const bubbleObservable = body.on('click', {capture: false}); + + const results = []; + captureObservable.subscribe(e => results.push(e.eventPhase)); + bubbleObservable.subscribe(e => results.push(e.eventPhase)); + + target.dispatchEvent(new MouseEvent('click', {bubbles: true})); + + assert_array_equals(results, [CAPTURING_PHASE, BUBBLING_PHASE]); +}, "EventTarget Observables can listen for events in the capturing or bubbling phase"); + +test(() => { + const target = new EventTarget(); + + const observable = target.on('event', {passive: true}); + observable.subscribe(event => { + assert_false(event.defaultPrevented); + // Should do nothing, since `observable` is "passive". + event.preventDefault(); + assert_false(event.defaultPrevented); + }); + + // Create a cancelable event which ordinarily would be able to have its + // "default" prevented. + const event = new Event('event', {cancelable: true}); + target.dispatchEvent(event); +}, "EventTarget Observables can be 'passive'"); diff --git a/tests/wpt/tests/editing/crashtests/insertimage-with-replacing-selection-in-picture-element.html b/tests/wpt/tests/editing/crashtests/insertimage-with-replacing-selection-in-picture-element.html new file mode 100644 index 00000000000..aaae4c7c9fd --- /dev/null +++ b/tests/wpt/tests/editing/crashtests/insertimage-with-replacing-selection-in-picture-element.html @@ -0,0 +1,47 @@ +<!doctype html> +<html class="test-wait"> +<head> +<meta charset="utf-8"> +<style> +@keyframes keyframes0 {} +picture { + animation: keyframes0 300ms alternate,alternate paused; +} +ruby { + animation: keyframes0 step-start -1.5s normal backwards paused; +} +</style> +<script> +document.addEventListener("DOMContentLoaded", () => { + find("AAA") + const header = document.querySelector("header"); + addEventListener("animationend", () => { + const imgsrc = + "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABh0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjIyt5EXfQAAAU5JREFUeF7t07ENACAMxMDA/jsDBTtcY6TUlmx+zcx510MGNuKG/QYKgL9CAQqADWB8CygANoDxLaAA2ADGt4ACYAMY3wIKgA1gfAsoADaA8S2gANgAxreAAmADGN8CCoANYHwLKAA2gPEtoADYAMa3gAJgAxjfAgqADWB8CygANoDxLaAA2ADGt4ACYAMY3wIKgA1gfAsoADaA8S2gANgAxreAAmADGN8CCoANYHwLKAA2gPEtoADYAMa3gAJgAxjfAgqADWB8CygANoDxLaAA2ADGt4ACYAMY3wIKgA1gfAsoADaA8S2gANgAxreAAmADGN8CCoANYHwLKAA2gPEtoADYAMa3gAJgAxjfAgqADWB8CygANoDxLaAA2ADGt4ACYAMY3wIKgA1gfAsoADaA8S2gANgAxreAAmADGN8CCoANYHwLKAA2gPEtAAe4i54BvwLfXFAAAAAASUVORK5CYII="; + function doIt() { + getSelection().extend(header, 0); + document.querySelector("figure").insertAdjacentElement("beforeend", header); + document.execCommand("insertImage", false, imgsrc); + } + doIt(); + doIt(); + doIt(); + document.documentElement.removeAttribute("class"); + }, {once: true}); + document.designMode = "on"; +}, {once:true}); +</script> +</head> +<body> +<picture autocapitalize="sentences"> +<figure> +<figcaption> +</figure> +<ruby contenteditable="true"> +AAA +<header> +</header> +</ruby> +</picture> +</body> +</html> diff --git a/tests/wpt/tests/editing/crashtests/set-output-value-to-empty-while-deleting-its-content.html b/tests/wpt/tests/editing/crashtests/set-output-value-to-empty-while-deleting-its-content.html new file mode 100644 index 00000000000..6ddf89205f7 --- /dev/null +++ b/tests/wpt/tests/editing/crashtests/set-output-value-to-empty-while-deleting-its-content.html @@ -0,0 +1,33 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<script> +document.addEventListener("DOMContentLoaded", () => { + document.designMode = "on"; + window.find("AA"); + document.addEventListener( + "selectionchange", + onSelectionChangeOrDOMNodeInserted, + {once: true} + ); + document.querySelector("output").addEventListener( + "DOMNodeInserted", + onSelectionChangeOrDOMNodeInserted + ); + document.execCommand("forwarddelete"); +}); + +function onSelectionChangeOrDOMNodeInserted() { + document.execCommand("delete"); + document.querySelector("output").value = ""; +} +</script> +</head> +<body> +<output> +<ruby></ruby> +<div> +AAA +</div></output></body> +</html> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-anchor-click-handler.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-anchor-click-handler.https.html index c3161fd5c31..8ee1cb517fc 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-anchor-click-handler.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-anchor-click-handler.https.html @@ -9,6 +9,7 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -18,10 +19,13 @@ promise_test(async(t) => { {generator_api: 'fledge', automatic_beacon: true, origin: get_host_info().HTTPS_REMOTE_ORIGIN}); const new_url = new URL("resources/dummy.html", location.href); - const beacon_data = "This is the second test's beacon data!"; - const beacon_type = "reserved.top_navigation_commit"; + let beacon_event = { + eventType: "reserved.top_navigation_commit", + eventData: "This is the second test's beacon data!", + destination: ["buyer"], + } - await fencedframe.execute((new_url, beacon_data, beacon_type) => { + await fencedframe.execute((new_url, beacon_event) => { let a = document.createElement('a'); a.textContent = "Click me!"; a.href = new_url; @@ -36,16 +40,11 @@ promise_test(async(t) => { // before the navigation happens. This test checks to make sure that the // data makes it to the correct place by the time the navigation commits. a.onclick = () => { - let beacon_event = { - eventType: beacon_type, - eventData: beacon_data, - destination: ["buyer"], - } window.fence.setReportEventDataForAutomaticBeacons(beacon_event); }; document.body.appendChild(a); - }, [new_url, beacon_data, beacon_type]); + }, [new_url, beacon_event]); // This will trigger the beacon data storing + navigation. await actions.pointerMove(0, 0, {origin: fencedframe.element}) @@ -53,9 +52,7 @@ promise_test(async(t) => { .pointerUp() .send(); - const beacon_initiator_origin = - await nextAutomaticBeacon(beacon_type, beacon_data); - assert_equals(beacon_initiator_origin, get_host_info().HTTPS_ORIGIN); + await verifyBeaconData(beacon_event.eventType, beacon_event.eventData); // Leaving this fenced frame around for subsequent tests can lead to // flakiness. diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-click-handler.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-click-handler.https.html index 0fe3fbb9335..31392fdb99d 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-click-handler.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-click-handler.https.html @@ -9,6 +9,7 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -17,12 +18,8 @@ promise_test(async(t) => { const fencedframe = await attachFencedFrameContext( {generator_api: 'fledge', automatic_beacon: true, origin: get_host_info().HTTPS_REMOTE_ORIGIN}); - const new_url = new URL("resources/dummy.html", location.href); - const start_beacon_data = "This is the start beacon data!"; - const commit_beacon_data = "This is the commit beacon data!"; - await fencedframe.execute( - (new_url, start_beacon_data, commit_beacon_data) => { + await fencedframe.execute(() => { // This tests that old automatic beacon data is overwritten in subsequent // calls to setReportEventDataForAutomaticBeacons(). let start_beacon_event_old = { @@ -31,34 +28,29 @@ promise_test(async(t) => { destination: ["buyer"], } window.fence.setReportEventDataForAutomaticBeacons(start_beacon_event_old); - addEventListener("click", (event) => { - let start_beacon_event = { - eventType: "reserved.top_navigation_start", - eventData: start_beacon_data, - destination: ["buyer"], - } - window.fence.setReportEventDataForAutomaticBeacons(start_beacon_event); - let commit_beacon_event = { - eventType: "reserved.top_navigation_commit", - eventData: commit_beacon_data, - destination: ["buyer"], - } - window.fence.setReportEventDataForAutomaticBeacons(commit_beacon_event); - window.open(new_url, "_blank"); - }); - }, [new_url, start_beacon_data, commit_beacon_data]); + }); + const start_event = { + eventType: "reserved.top_navigation_start", + eventData: "This is the start data", + destination: ["buyer"], + } + const commit_event = { + eventType: "reserved.top_navigation_commit", + eventData: "This is the commit data", + destination: ["buyer"], + } + // This will only set the automatic beacon data when the fenced frame is + // clicked. + await setupAutomaticBeacon(fencedframe, [start_event, commit_event], + NavigationTrigger.Click); await actions.pointerMove(0, 0, {origin: fencedframe.element}) .pointerDown() .pointerUp() .send(); - const beacon_1_initiator_origin = await nextAutomaticBeacon( - "reserved.top_navigation_start", start_beacon_data); - assert_equals(beacon_1_initiator_origin, get_host_info().HTTPS_ORIGIN); - const beacon_2_initiator_origin = await nextAutomaticBeacon( - "reserved.top_navigation_commit", commit_beacon_data); - assert_equals(beacon_2_initiator_origin, get_host_info().HTTPS_ORIGIN); + await verifyBeaconData(start_event.eventType, start_event.eventData); + await verifyBeaconData(commit_event.eventType, commit_event.eventData); // Leaving this fenced frame around for subsequent tests can lead to // flakiness. diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-component-ad.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-component-ad.https.html index 132b1234df1..1b1ef2798ad 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-component-ad.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-component-ad.https.html @@ -8,6 +8,8 @@ <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -21,16 +23,14 @@ promise_test(async(t) => { headers: [["Allow-Fenced-Frame-Automatic-Beacons", "true"]] }); const new_url = new URL("resources/close.html", location.href); - const beacon_type = "reserved.top_navigation_start"; - const beacon_data = "this is the beacon data"; + const beacon_event = { + eventType: "reserved.top_navigation_start", + eventData: "this is the beacon data", + destination: ["buyer"], + crossOriginExposed: true, + } - await fencedframe.execute(async (new_url, beacon_type, beacon_data) => { - let beacon_event = { - eventType: beacon_type, - eventData: "this is the beacon data", - destination: ["buyer"], - crossOriginExposed: true, - } + await fencedframe.execute(async (new_url, beacon_event) => { window.fence.setReportEventDataForAutomaticBeacons(beacon_event); // Add an ad component that will perform the top-level navigation. @@ -41,7 +41,7 @@ promise_test(async(t) => { window.open(new_url); }); }, [new_url]); - }, [new_url, beacon_type]); + }, [new_url, beacon_event]); await actions.pointerMove(0, 0, {origin: fencedframe.element}) .pointerDown() @@ -49,9 +49,7 @@ promise_test(async(t) => { .send(); // The component frame should not use the data set in its parent. - const expected_beacon_data = "<No data>"; - const received_beacon_data = await nextAutomaticBeacon( - beacon_type, expected_beacon_data); + await verifyBeaconData(beacon_event.eventType, "<No data>"); }, 'Automatic beacon in an ad component should send without data with a ' + 'header opt-in.'); </script> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-false.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-false.https.html index ccd86349734..24440e4b675 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-false.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-false.https.html @@ -9,6 +9,8 @@ <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -18,38 +20,22 @@ promise_test(async(t) => { generator_api: 'fledge', automatic_beacon: true, }); - const new_url = new URL("resources/close.html", location.href); - const beacon_type = "reserved.top_navigation_start"; + const beacon_event = { + eventType: "reserved.top_navigation_start", + eventData: "this is the beacon data", + destination: ["buyer"], + crossOriginExposed: false, + } - await fencedframe.execute(async (new_url, beacon_type) => { - let beacon_event = { - eventType: beacon_type, - eventData: "this is the beacon data", - destination: ["buyer"], - crossOriginExposed: false, - } - window.fence.setReportEventDataForAutomaticBeacons(beacon_event); - - // Add a cross-origin iframe that will perform the top-level navigation. - const iframe = await attachIFrameContext({ - origin: get_host_info().HTTPS_REMOTE_ORIGIN, - headers: [["Allow-Fenced-Frame-Automatic-Beacons", "true"]], - }); - await iframe.execute(async (new_url) => { - addEventListener("click", (event) => { - window.open(new_url); - }); - }, [new_url]); - }, [new_url, beacon_type]); + await setupAutomaticBeacon(fencedframe, [beacon_event], + "resources/close.html", NavigationTrigger.CrossOriginClick); await actions.pointerMove(0, 0, {origin: fencedframe.element}) .pointerDown() .pointerUp() .send(); - const expected_beacon_data = "<No data>"; - const received_beacon_data = await nextAutomaticBeacon( - "reserved.top_navigation_start", expected_beacon_data); + await verifyBeaconData(beacon_event.eventType, "<No data>"); }, 'Automatic beacon in a cross-origin subframe should send without data ' + 'when crossOrigin=false.'); </script> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-navigation.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-navigation.https.html index 5a191174cfe..c476e80443d 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-navigation.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-navigation.https.html @@ -8,6 +8,8 @@ <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -17,30 +19,16 @@ promise_test(async(t) => { generator_api: 'fledge', automatic_beacon: true }); - const new_url = new URL("resources/close.html", location.href); - const beacon_data = "this is the beacon data"; - const beacon_type = "reserved.top_navigation_start"; - await fencedframe.execute(async (new_url, beacon_data, beacon_type) => { - let beacon_event = { - eventType: beacon_type, - eventData: beacon_data, - destination: ["buyer"], - crossOriginExposed: true, - } - window.fence.setReportEventDataForAutomaticBeacons(beacon_event); + let beacon_event = { + eventType: "reserved.top_navigation_start", + eventData: "this is the beacon data", + destination: ["buyer"], + crossOriginExposed: true, + } - // Add a cross-origin iframe that will perform the top-level navigation. - const iframe = await attachIFrameContext({ - origin: get_host_info().HTTPS_REMOTE_ORIGIN, - headers: [["Allow-Fenced-Frame-Automatic-Beacons", "true"]] - }); - await iframe.execute(async (new_url) => { - addEventListener("click", (event) => { - window.open(new_url, "_blank"); - }); - }, [new_url]); - }, [new_url, beacon_data, beacon_type]); + await setupAutomaticBeacon(fencedframe, [beacon_event], + "resources/close.html", NavigationTrigger.CrossOriginClick); await actions.pointerMove(0, 0, {origin: fencedframe.element}) .pointerDown() @@ -48,7 +36,7 @@ promise_test(async(t) => { .send(); const received_beacon_data = - await nextAutomaticBeacon(beacon_type, beacon_data); + await nextAutomaticBeacon(beacon_event.eventType, beacon_event.eventData); }, 'Automatic beacon in a cross-origin subframe'); </script> </body> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-no-data.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-no-data.https.html index 1b5710035d9..dd00721dd8c 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-no-data.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-no-data.https.html @@ -8,6 +8,8 @@ <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -38,13 +40,8 @@ promise_test(async(t) => { .pointerUp() .send(); - const expected_beacon_data = "<No data>"; - const received_beacon_data = - await nextAutomaticBeacon( - "reserved.top_navigation_start", expected_beacon_data); - const received_beacon_data_commit = - await nextAutomaticBeacon( - "reserved.top_navigation_commit", expected_beacon_data); + await verifyBeaconData("reserved.top_navigation_start", "<No data>"); + await verifyBeaconData("reserved.top_navigation_commit", "<No data>"); }, 'Automatic beacon in a cross-origin subframe with no beacon data set'); </script> </body> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-no-opt-in.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-no-opt-in.https.html index 6d43a73bc7c..fa19d17f890 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-no-opt-in.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-cross-origin-no-opt-in.https.html @@ -8,6 +8,8 @@ <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -17,41 +19,26 @@ promise_test(async(t) => { generator_api: 'fledge', automatic_beacon: true }); - const new_url = new URL("resources/close.html", location.href); - const beacon_data = "this is the beacon data"; - const beacon_type = "reserved.top_navigation_start"; - await fencedframe.execute(async (new_url, beacon_data, beacon_type) => { - let beacon_event = { - eventType: beacon_type, - eventData: beacon_data, - destination: ["buyer"], - crossOriginExposed: true, - } - window.fence.setReportEventDataForAutomaticBeacons(beacon_event); - - // Add a cross-origin iframe that will perform the top-level navigation. - // Do not set the 'Allow-Fenced-Frame-Automatic-Beacons' header to true. - const iframe = await attachIFrameContext({ - origin: get_host_info().HTTPS_REMOTE_ORIGIN, - headers: [["Allow-Fenced-Frame-Automatic-Beacons", "false"]] - }); - await iframe.execute(async (new_url) => { - addEventListener("click", (event) => { - window.open(new_url, "_blank"); - }); - }, [new_url]); - }, [new_url, beacon_data, beacon_type]); + let beacon_event = { + eventType: "reserved.top_navigation_start", + eventData: "this is the beacon data", + destination: ["buyer"], + crossOriginExposed: true, + } + // Add a cross-origin iframe that will perform the top-level navigation. + // Do not set the 'Allow-Fenced-Frame-Automatic-Beacons' header to true. + await setupAutomaticBeacon(fencedframe, [beacon_event], + "resources/close.html", NavigationTrigger.CrossOriginClickNoOptIn, + "_blank"); await actions.pointerMove(0, 0, {origin: fencedframe.element}) .pointerDown() .pointerUp() .send(); - const timeout = new Promise(resolve => t.step_timeout(resolve, 1000)); - const result = await Promise.race( - [nextAutomaticBeacon(beacon_type, beacon_data), timeout]); - assert_true(typeof result === "undefined"); + await verifyBeaconData(beacon_event.eventType, beacon_event.eventData, false, + t); }, 'Automatic beacon in a cross-origin subframe with no opt-in header should ' + 'not send.'); </script> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-no-destination.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-no-destination.https.html index c3fa3d657fa..696c17f765e 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-no-destination.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-no-destination.https.html @@ -9,6 +9,7 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -19,24 +20,13 @@ promise_test(async (t) => { automatic_beacon: true, origin: get_host_info().HTTPS_REMOTE_ORIGIN }); - const new_url = new URL("resources/dummy.html", location.href); - const beacon_data = "This is the beacon data!"; - const beacon_type = "reserved.top_navigation_commit"; - await fencedframe.execute( - (new_url, beacon_data, beacon_type) => { - addEventListener("click", (event) => { - let beacon_event = { - eventType: beacon_type, - eventData: beacon_data, - destination: ["component-seller"], - }; - window.fence.setReportEventDataForAutomaticBeacons(beacon_event); - window.open(new_url, "_blank"); - }); - }, - [new_url, beacon_data, beacon_type] - ); + let beacon_event = { + eventType: "reserved.top_navigation_commit", + eventData: "This is the beacon data!", + destination: ["component-seller"], + }; + await setupAutomaticBeacon(fencedframe, [beacon_event]); await actions .pointerMove(0, 0, { origin: fencedframe.element }) @@ -47,10 +37,7 @@ promise_test(async (t) => { // An automatic beacon should be sent out, but no data should be sent as part // of the beacon because the "buyer" destination was not specified in // setReportEventDataForAutomaticBeacons(). - const expected_data = "<No data>"; - const beacon_initiator_origin = - await nextAutomaticBeacon(beacon_type, expected_data); - assert_equals(beacon_initiator_origin, get_host_info().HTTPS_ORIGIN); + await verifyBeaconData(beacon_event.eventType, "<No data>"); }, "Set and trigger an automatic beacon with no destination specified"); </script> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-no-opt-in.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-no-opt-in.https.html index 5a815a81389..177a7c6a512 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-no-opt-in.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-no-opt-in.https.html @@ -8,6 +8,8 @@ <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -38,11 +40,8 @@ promise_test(async (t) => { .pointerDown() .pointerUp() .send(); - const timeout = new Promise(resolve => t.step_timeout(resolve, 1000)); - const result = await Promise.race( - [nextAutomaticBeacon("reserved.top_navigation_start", "<No data>"), - timeout]); - assert_true(typeof result === "undefined"); + await verifyBeaconData("reserved.top_navigation_start", "<No data>", false, + t); }, "Automatic beacons will not send if the document does not opt in."); </script> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-shared-storage.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-shared-storage.https.html index 093e55bca90..4ee1d0d01bf 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-shared-storage.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-shared-storage.https.html @@ -10,6 +10,7 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -18,40 +19,26 @@ promise_test(async(t) => { const fencedframe = await attachFencedFrameContext( {generator_api: 'sharedstorage', origin: get_host_info().HTTPS_REMOTE_ORIGIN}); - const new_url = new URL("resources/dummy.html", location.href); - const start_beacon_data = "This is the start beacon data!"; - const commit_beacon_data = "This is the commit beacon data!"; - await fencedframe.execute((new_url, start_beacon_data, - commit_beacon_data) => { - addEventListener("click", (event) => { - let start_beacon_event = { - eventType: "reserved.top_navigation_start", - eventData: start_beacon_data, - destination: ["shared-storage-select-url"], - } - window.fence.setReportEventDataForAutomaticBeacons(start_beacon_event); - let commit_beacon_event = { - eventType: "reserved.top_navigation_commit", - eventData: commit_beacon_data, - destination: ["shared-storage-select-url"], - } - window.fence.setReportEventDataForAutomaticBeacons(commit_beacon_event); - window.open(new_url, "_blank"); - }); - }, [new_url, start_beacon_data, commit_beacon_data]); + let start_event = { + eventType: "reserved.top_navigation_start", + eventData: "This is the start beacon data!", + destination: ["shared-storage-select-url"], + } + let commit_event = { + eventType: "reserved.top_navigation_commit", + eventData: "This is the commit beacon data!", + destination: ["shared-storage-select-url"], + } + await setupAutomaticBeacon(fencedframe, [start_event, commit_event]); await actions.pointerMove(0, 0, {origin: fencedframe.element}) .pointerDown() .pointerUp() .send(); - const beacon_1_initiator_origin = await nextAutomaticBeacon( - "reserved.top_navigation_start", start_beacon_data); - assert_equals(beacon_1_initiator_origin, get_host_info().HTTPS_ORIGIN); - const beacon_2_initiator_origin = await nextAutomaticBeacon( - "reserved.top_navigation_commit", commit_beacon_data); - assert_equals(beacon_2_initiator_origin, get_host_info().HTTPS_ORIGIN); + await verifyBeaconData(start_event.eventType, start_event.eventData); + await verifyBeaconData(commit_event.eventType, commit_event.eventData); }, 'Set and trigger an automatic beacon in a click handler for SharedStorage'); </script> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-two-events-clear.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-two-events-clear.https.html index f59fda5fca9..f759c0620b8 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-two-events-clear.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-two-events-clear.https.html @@ -9,6 +9,7 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -17,22 +18,15 @@ promise_test(async(t) => { const fencedframe = await attachFencedFrameContext( {generator_api: 'fledge', automatic_beacon: true, origin: get_host_info().HTTPS_REMOTE_ORIGIN}); - const new_url = new URL("resources/dummy.html", location.href); - const beacon_data = "This is the beacon data!"; - const beacon_type = "reserved.top_navigation_commit"; - await fencedframe.execute((new_url, beacon_data, beacon_type) => { - let beacon_event = { - eventType: beacon_type, - eventData: beacon_data, - destination: ["buyer"], - once: true, - } - window.fence.setReportEventDataForAutomaticBeacons(beacon_event); - addEventListener("click", (event) => { - window.open(new_url, "_blank"); - }); - }, [new_url, beacon_data, beacon_type]); + let beacon_event = { + eventType: "reserved.top_navigation_commit", + eventData: "This is the beacon data!", + destination: ["buyer"], + once: true, + } + await setupAutomaticBeacon(fencedframe, [beacon_event], + "resources/dummy.html", NavigationTrigger.ClickOnce); // The first click should trigger the automatic beacon and clear the beacon // data. @@ -40,9 +34,7 @@ promise_test(async(t) => { .pointerDown() .pointerUp() .send(); - const beacon_initiator_origin = - await nextAutomaticBeacon(beacon_type, beacon_data); - assert_equals(beacon_initiator_origin, get_host_info().HTTPS_ORIGIN); + await verifyBeaconData(beacon_event.eventType, beacon_event.eventData); // The second click should not have any associated automatic beacon info, so // no beacon should be sent. @@ -52,10 +44,8 @@ promise_test(async(t) => { .pointerDown() .pointerUp() .send(); - const timeout = new Promise(resolve => t.step_timeout(resolve, 1000)); - const result = await Promise.race( - [nextAutomaticBeacon(beacon_type, beacon_data), timeout]); - assert_true(typeof result === "undefined"); + await verifyBeaconData(beacon_event.eventType, beacon_event.eventData, false, + t); }, 'Set expiring automatic beacon but trigger two events in a click handler'); </script> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-two-events-persist.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-two-events-persist.https.html index 4da4f89e6e5..906a7a0d9f5 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-two-events-persist.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-two-events-persist.https.html @@ -9,6 +9,7 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -17,22 +18,14 @@ promise_test(async(t) => { const fencedframe = await attachFencedFrameContext( {generator_api: 'fledge', automatic_beacon: true, origin: get_host_info().HTTPS_REMOTE_ORIGIN}); - const new_url = new URL("resources/dummy.html", location.href); - const beacon_data = "This is the beacon data!"; - const beacon_type = "reserved.top_navigation_commit"; + // `once` defaults to false. + let beacon_event = { + eventType: "reserved.top_navigation_commit", + eventData: "This is the beacon data!", + destination: ["buyer"], + } - await fencedframe.execute((new_url, beacon_data, beacon_type) => { - // `once` defaults to false. - let beacon_event = { - eventType: beacon_type, - eventData: beacon_data, - destination: ["buyer"], - } - window.fence.setReportEventDataForAutomaticBeacons(beacon_event); - addEventListener("click", (event) => { - window.open(new_url, "_blank"); - }); - }, [new_url, beacon_data, beacon_type]); + await setupAutomaticBeacon(fencedframe, [beacon_event]); // The first click should trigger the automatic beacon, but the beacon data // should not be cleared out. @@ -40,9 +33,7 @@ promise_test(async(t) => { .pointerDown() .pointerUp() .send(); - const beacon_1_initiator_origin = - await nextAutomaticBeacon(beacon_type, beacon_data); - assert_equals(beacon_1_initiator_origin, get_host_info().HTTPS_ORIGIN); + await verifyBeaconData(beacon_event.eventType, beacon_event.eventData); // The second click should still have associated automatic beacon data, and a // beacon should be sent. @@ -50,9 +41,7 @@ promise_test(async(t) => { .pointerDown() .pointerUp() .send(); - const beacon_2_initiator_origin = - await nextAutomaticBeacon(beacon_type, beacon_data); - assert_equals(beacon_2_initiator_origin, get_host_info().HTTPS_ORIGIN); + await verifyBeaconData(beacon_event.eventType, beacon_event.eventData); }, 'Set persisting automatic beacon but trigger two events in a click handler'); </script> diff --git a/tests/wpt/tests/fenced-frame/automatic-beacon-unfenced-top.https.html b/tests/wpt/tests/fenced-frame/automatic-beacon-unfenced-top.https.html index 945e80921d8..342e13321fe 100644 --- a/tests/wpt/tests/fenced-frame/automatic-beacon-unfenced-top.https.html +++ b/tests/wpt/tests/fenced-frame/automatic-beacon-unfenced-top.https.html @@ -9,6 +9,7 @@ <script src="/resources/testdriver-actions.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script src="/common/get-host-info.sub.js"></script> +<script src="resources/automatic-beacon-helper.js"></script> <body> <script> @@ -27,22 +28,16 @@ async function init() { const fencedframe = await attachFencedFrameContext( {generator_api: 'fledge', automatic_beacon: true, origin: get_host_info().HTTPS_REMOTE_ORIGIN}); - const new_url = new URL("resources/automatic-beacon-unfenced-page.html", - location.href); - await fencedframe.execute((new_url) => { - const beacon_data = "This is the beacon data!"; - let beacon_event = { - eventType: "reserved.top_navigation_commit", - eventData: beacon_data, - destination: ["buyer"], - randomField: "blah", - } - window.fence.setReportEventDataForAutomaticBeacons(beacon_event); - addEventListener("click", (event) => { - window.open(new_url, "_unfencedTop"); - }); - }, [new_url]); + const beacon_event = { + eventType: "reserved.top_navigation_commit", + eventData: "This is the beacon data!", + destination: ["buyer"], + randomField: "blah", + } + await setupAutomaticBeacon(fencedframe, [beacon_event], + "resources/automatic-beacon-unfenced-page.html", NavigationTrigger.Click, + "_unfencedTop"); await actions.setContext(window) .pointerMove(0, 0, {origin: fencedframe.element}) diff --git a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-all.https.html b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-all.https.html index 00044a4c856..5d38d7a7105 100644 --- a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-all.https.html +++ b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-all.https.html @@ -48,6 +48,27 @@ promise_test(async(t) => { }, 'A fenced frame that navigates itself to a cross origin page that allows feature policies ' + 'can still access the feature policies'); +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({ + origin: get_host_info().REMOTE_ORIGIN}); + + await fencedframe.execute(async () => { + assert_true( + document.featurePolicy.allowsFeature('shared-storage'), + "Shared storage should be allowed in the fenced frame."); + assert_true( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private aggregation should be allowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should be disallowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('sync-xhr'), + "USB access should be disallowed in the fenced frame."); + }, []); +}, 'Cross-origin fenced frames default feature policies follow inheritance' + + ' rules.'); + </script> </body> </html> diff --git a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-all.https.html.headers b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-all.https.html.headers index d39cf98dd5c..c3d2f1fcfb6 100644 --- a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-all.https.html.headers +++ b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-all.https.html.headers @@ -1 +1 @@ -Permissions-Policy: attribution-reporting=(*), shared-storage=(*)
\ No newline at end of file +Permissions-Policy: attribution-reporting=(*), private-aggregation=(*), shared-storage=(*)
\ No newline at end of file diff --git a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-none.https.html b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-none.https.html index d44cb5bca77..1c7d0579eb8 100644 --- a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-none.https.html +++ b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-none.https.html @@ -20,6 +20,27 @@ promise_test(async(t) => { await runDefaultEnabledFeaturesTest(t, false, get_host_info().REMOTE_ORIGIN); }, 'Cross-origin fenced frame does not load when feature policies are none'); +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({ + origin: get_host_info().REMOTE_ORIGIN}); + + await fencedframe.execute(async () => { + assert_false( + document.featurePolicy.allowsFeature('shared-storage'), + "Shared storage should be disallowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private aggregation should be disallowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should be disallowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('sync-xhr'), + "USB access should be disallowed in the fenced frame."); + }, []); +}, 'Flexible permissions fenced frames can have permissions restricted from ' + + 'parent.'); + </script> </body> </html> diff --git a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-none.https.html.headers b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-none.https.html.headers index 5d534499d74..2aa0b2f5ae2 100644 --- a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-none.https.html.headers +++ b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-none.https.html.headers @@ -1 +1 @@ -Permissions-Policy: attribution-reporting=(), shared-storage=()
\ No newline at end of file +Permissions-Policy: attribution-reporting=(), shared-storage=(), private-aggregation=()
\ No newline at end of file diff --git a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-self.https.html b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-self.https.html index c212a6f44c3..3724a4795ee 100644 --- a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-self.https.html +++ b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-self.https.html @@ -14,7 +14,7 @@ promise_test(async(t) => { await runDefaultEnabledFeaturesTest(t, false, get_host_info().ORIGIN); await runDefaultEnabledFeaturesTest(t, false, get_host_info().ORIGIN, generator_api="sharedstorage"); -}, 'Same-origin fenced frame does not when feature policies are self'); +}, 'Same-origin fenced frame does not load when feature policies are self'); promise_test(async(t) => { await runDefaultEnabledFeaturesTest(t, false, get_host_info().REMOTE_ORIGIN); @@ -27,17 +27,40 @@ promise_test(async(t) => { origin: get_host_info().ORIGIN}); await fencedframe.execute(async () => { + assert_true( + document.featurePolicy.allowsFeature('shared-storage'), + "Shared storage should be allowed in the fenced frame."); + assert_true( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private aggregation should be allowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should be disallowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('sync-xhr'), + "USB access should be disallowed in the fenced frame."); + }, []); +}, 'Fenced frames default feature policies should inherit from parent.'); + +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({ + origin: get_host_info().REMOTE_ORIGIN}); + + await fencedframe.execute(async () => { assert_false( document.featurePolicy.allowsFeature('shared-storage'), "Shared storage should be disallowed in the fenced frame."); assert_false( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private aggregation should be disallowed in the fenced frame."); + assert_false( document.featurePolicy.allowsFeature('attribution-reporting'), "Attribution reporting should be disallowed in the fenced frame."); assert_false( document.featurePolicy.allowsFeature('sync-xhr'), "USB access should be disallowed in the fenced frame."); }, []); -}, 'Fenced frames default feature policies are set to not allow anything.'); +}, 'Cross-origin fenced frames default feature policies follow inheritance rules.'); </script> </body> diff --git a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-self.https.html.headers b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-self.https.html.headers index 8bfa33eb8a3..76ab816ec04 100644 --- a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-self.https.html.headers +++ b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-self.https.html.headers @@ -1 +1 @@ -Permissions-Policy: attribution-reporting=(self), shared-storage=(self)
\ No newline at end of file +Permissions-Policy: attribution-reporting=(self), private-aggregation=(self), shared-storage=(self)
\ No newline at end of file diff --git a/tests/wpt/tests/fenced-frame/default-enabled-features-allow-unspecified.https.html b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-unspecified.https.html new file mode 100644 index 00000000000..69e9a157cf7 --- /dev/null +++ b/tests/wpt/tests/fenced-frame/default-enabled-features-allow-unspecified.https.html @@ -0,0 +1,59 @@ +<!DOCTYPE html> +<title>Test permission policies with no permissions specified</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/default-enabled-features-helper.js"></script> + +<body> +<script> +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({ + origin: get_host_info().ORIGIN}); + + await fencedframe.execute(async () => { + assert_true( + document.featurePolicy.allowsFeature('shared-storage'), + "Shared storage should be allowed in the fenced frame."); + assert_true( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private aggregation should be allowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should be disallowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('sync-xhr'), + "USB access should be disallowed in the fenced frame."); + }, []); +}, 'Fenced frames should inherit features from parent if nothing specified.'); + +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({ + origin: get_host_info().REMOTE_ORIGIN, + attributes: [["allow", + "shared-storage *; attribution-reporting *; " + + "private-aggregation 'none'"]]}); + + await fencedframe.execute(async () => { + assert_true( + document.featurePolicy.allowsFeature('shared-storage'), + "Shared storage should be allowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private aggregation should be disallowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should be disallowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('sync-xhr'), + "USB access should be disallowed in the fenced frame."); + }, []); +}, 'Fenced frames default feature policies should inherit when using `allow` ' + + 'but should be able to further restrict the policies.'); + +</script> +</body> +</html> diff --git a/tests/wpt/tests/fenced-frame/default-enabled-features-attribute-allow.https.html b/tests/wpt/tests/fenced-frame/default-enabled-features-attribute-allow.https.html index 3c3831f0157..d1e857cf293 100644 --- a/tests/wpt/tests/fenced-frame/default-enabled-features-attribute-allow.https.html +++ b/tests/wpt/tests/fenced-frame/default-enabled-features-attribute-allow.https.html @@ -42,7 +42,30 @@ promise_test(async(t) => { assert_false(document.featurePolicy.allowsFeature('attribution-reporting'), "Attribution reporting should NOT be allowed in the fenced frame."); }, []); -}, 'Delivered policies can further restrict permissions of a fenced frame'); +}, 'Delivered policies can further restrict permissions of a fixed ' + + 'permissions fenced frame'); + +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({ + headers: [["Permissions-Policy", "shared-storage=()"]], + origin: get_host_info().ORIGIN}); + + await fencedframe.execute(async () => { + assert_false( + document.featurePolicy.allowsFeature('shared-storage'), + "Shared storage should not be allowed in the fenced frame."); + assert_true( + document.featurePolicy.allowsFeature('private-aggregation'), + "Private aggregation should be allowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('attribution-reporting'), + "Attribution reporting should be disallowed in the fenced frame."); + assert_false( + document.featurePolicy.allowsFeature('sync-xhr'), + "USB access should be disallowed in the fenced frame."); + }, []); +}, 'Delivered policies can further restrict permissions of a non-opaque ' + + 'fenced frame'); </script> </body> diff --git a/tests/wpt/tests/fenced-frame/disable-untrusted-network.https.html b/tests/wpt/tests/fenced-frame/disable-untrusted-network.https.html new file mode 100644 index 00000000000..726728e4899 --- /dev/null +++ b/tests/wpt/tests/fenced-frame/disable-untrusted-network.https.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<title>Test window.fence.disableUntrustedNetwork availability.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext(); + await fencedframe.execute(async () => { + const cross_origin_fenced_frame = await attachFencedFrameContext({ + origin: get_host_info().HTTPS_REMOTE_ORIGIN}); + await cross_origin_fenced_frame.execute(async () => { + const promise = window.fence.disableUntrustedNetwork(); + assert_true(typeof promise.then != 'undefined'); + await promise; + }); + + const same_origin_iframe = await attachIFrameContext(); + await same_origin_iframe.execute(async () => { + const promise = window.fence.disableUntrustedNetwork(); + assert_true(typeof promise.then != 'undefined'); + await promise; + }); + + const cross_origin_iframe = await attachIFrameContext({ + origin: get_host_info().HTTPS_REMOTE_ORIGIN}); + await cross_origin_iframe.execute(async () => { + try { + const promise = window.fence.disableUntrustedNetwork(); + await promise; + assert_unreached( + 'disableUntrustedNetwork should fail when not same-origin to the ' + + 'mapped url.'); + } catch (e) { + assert_equals(e.name, 'TypeError'); + } + }); + + const promise = window.fence.disableUntrustedNetwork(); + assert_true(typeof promise.then != 'undefined'); + await promise; + }); +}, 'window.fence.disableUntrustedNetwork availability'); +</script> +</body> diff --git a/tests/wpt/tests/fenced-frame/navigator-keyboard-layout-map.https.html b/tests/wpt/tests/fenced-frame/navigator-keyboard-layout-map.https.html index 03fbc062e14..28cdbc848e2 100644 --- a/tests/wpt/tests/fenced-frame/navigator-keyboard-layout-map.https.html +++ b/tests/wpt/tests/fenced-frame/navigator-keyboard-layout-map.https.html @@ -17,9 +17,23 @@ promise_test(async () => { const actual_result = await nextValueFromServer(keyboard_layout_key); assert_equals(actual_result, "rejected", - "The fenced frame is not allowed to fetch keyboard map."); + "The non-opaque fenced frame is not allowed to fetch keyboard map."); -}, "keyboard.getLayoutMap()"); +}, "keyboard.getLayoutMap() from non-opaque fenced frame"); + +promise_test(async () => { + const keyboard_layout_key = token(); + + const urn = await generateURNFromFledge( + "resources/navigator-keyboard-layout-map-inner.html", + [keyboard_layout_key]); + attachFencedFrame(urn); + const actual_result = await nextValueFromServer(keyboard_layout_key); + + assert_equals(actual_result, "rejected", + "The opaque fenced frame is not allowed to fetch keyboard map."); + +}, "keyboard.getLayoutMap() from opaque fenced frame"); </script> </body> diff --git a/tests/wpt/tests/fenced-frame/report-event-sandboxed-iframe.https.html b/tests/wpt/tests/fenced-frame/report-event-sandboxed-iframe.https.html new file mode 100644 index 00000000000..7298f39e694 --- /dev/null +++ b/tests/wpt/tests/fenced-frame/report-event-sandboxed-iframe.https.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<title>Test that window.fence.reportEvent does not crash in sandboxed iframes</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async(t) => { + const fencedframe = await attachFencedFrameContext({generator_api: 'fledge'}); + await fencedframe.execute(async () => { + const iframe = await attachIFrameContext(); + await iframe.execute(() => { + let event = {}; + event.eventType = "click"; + event.eventData = "dummy"; + event.destination = ["buyer"]; + window.fence.reportEvent(event); + }); + + const sandbox_iframe = await attachIFrameContext({attributes: [['sandbox', 'allow-scripts']]}); + await sandbox_iframe.execute(() => { + let event = {}; + event.eventType = "click"; + event.eventData = "dummy"; + event.destination = ["buyer"]; + window.fence.reportEvent(event); + }); + }); +}, 'window.fence.reportEvent in sandboxed (effectively cross-origin) iframe'); +</script> +</body> diff --git a/tests/wpt/tests/fenced-frame/resize-lock-input.https.html b/tests/wpt/tests/fenced-frame/resize-lock-input.https.html index 261c9a737ef..9cee650f1a8 100644 --- a/tests/wpt/tests/fenced-frame/resize-lock-input.https.html +++ b/tests/wpt/tests/fenced-frame/resize-lock-input.https.html @@ -14,6 +14,7 @@ promise_test(async t => { const resize_lock_inner_page_is_ready_key = token(); const resize_lock_resize_is_done_key = token(); + const resize_lock_frame_requested_after_resize_key = token(); const resize_lock_report_click_location_key = token(); const resize_lock_report_click_location_key_after_resize = token(); const resize_lock_report_click_location_key_after_resize_2 = token(); @@ -22,6 +23,7 @@ "resources/resize-lock-inner-input.html", [resize_lock_inner_page_is_ready_key, resize_lock_resize_is_done_key, + resize_lock_frame_requested_after_resize_key, resize_lock_report_click_location_key, resize_lock_report_click_location_key_after_resize, resize_lock_report_click_location_key_after_resize_2])); @@ -39,7 +41,7 @@ let result = await nextValueFromServer(resize_lock_report_click_location_key); - assert_equals(result, "0,0", "fenced frame event before resize"); + assert_equals(result, "0,0", "fenced frame event before resize 1"); // The frame should be frozen at 300x150. Resize to create a 2x scale // and a horizontal offset of 50px. @@ -47,6 +49,7 @@ frame.height = "300"; writeValueToServer(resize_lock_resize_is_done_key, "outer_page_attempted_resize"); + await nextValueFromServer(resize_lock_frame_requested_after_resize_key); // The hit-test data is replicated in the browser and updated // asynchronously. Wait to ensure the update has finished. @@ -78,7 +81,7 @@ .pointerUp({sourceName: "finger1"}) .send(); result = await nextValueFromServer(resize_lock_report_click_location_key_after_resize); - assert_equals(result, "0,0", "fenced frame event before resize"); + assert_equals(result, "0,0", "fenced frame event before resize 2"); // Send an event where the bottom left of the scaled frame should // render. @@ -90,7 +93,7 @@ .pointerUp({sourceName: "finger1"}) .send(); result = await nextValueFromServer(resize_lock_report_click_location_key_after_resize_2); - assert_equals(result, "300,150", "fenced frame event before resize"); + assert_equals(result, "300,150", "fenced frame event before resize 3"); }, 1000); }, "Test Resize Lock"); </script> diff --git a/tests/wpt/tests/fenced-frame/resources/automatic-beacon-helper.js b/tests/wpt/tests/fenced-frame/resources/automatic-beacon-helper.js new file mode 100644 index 00000000000..d0a4133e84c --- /dev/null +++ b/tests/wpt/tests/fenced-frame/resources/automatic-beacon-helper.js @@ -0,0 +1,104 @@ +// This is a helper file used for the automatic-beacon-*.https.html tests. +// To use this, make sure you import these scripts: +// <script src="/resources/testharness.js"></script> +// <script src="/resources/testharnessreport.js"></script> +// <script src="/common/utils.js"></script> +// <script src="/common/dispatcher/dispatcher.js"></script> +// <script src="resources/utils.js"></script> +// <script src="/resources/testdriver.js"></script> +// <script src="/resources/testdriver-actions.js"></script> +// <script src="/resources/testdriver-vendor.js"></script> +// <script src="/common/get-host-info.sub.js"></script> + +const NavigationTrigger = { + Click: 0, + ClickOnce: 1, + CrossOriginClick: 2, + CrossOriginClickNoOptIn: 3 +}; + +// Registers an automatic beacon in a given remote context frame, and registers +// the navigation handler for the frame that will trigger the beacon. +// remote_context: The context for the fenced frame or URN iframe. +// beacon_events: An array of FenceEvents to register with the frame. +// navigation_url: The URL the frame will navigate to. +// navigation_trigger: How the navigation will be performed. Either through a +// click, a click with a `once` event, a click in a +// cross-origin subframe, or a click in a cross-origin +// subframe with no opt-in header. +// target: the target of the navigation. Either '_blank' or +// '_unfencedTop'. +async function setupAutomaticBeacon( + remote_context, beacon_events, navigation_url = 'resources/dummy.html', + navigation_trigger = NavigationTrigger.Click, target = '_blank') { + const full_url = new URL(navigation_url, location.href); + await remote_context.execute( + async ( + NavigationTrigger, beacon_events, navigation_trigger, full_url, + target) => { + switch (navigation_trigger) { + case NavigationTrigger.Click: + addEventListener('click', (event) => { + beacon_events.forEach((beacon_event) => { + window.fence.setReportEventDataForAutomaticBeacons( + beacon_event); + }); + window.open(full_url, target); + }); + break; + case NavigationTrigger.ClickOnce: + beacon_events.forEach((beacon_event) => { + window.fence.setReportEventDataForAutomaticBeacons(beacon_event); + }); + addEventListener('click', (event) => { + window.open(full_url, target); + }); + break; + case NavigationTrigger.CrossOriginClick: + case NavigationTrigger.CrossOriginClickNoOptIn: + beacon_events.forEach((beacon_event) => { + window.fence.setReportEventDataForAutomaticBeacons(beacon_event); + }); + // Add a cross-origin iframe that will perform the top-level + // navigation. Do not set the 'Allow-Fenced-Frame-Automatic-Beacons' + // header to true. + const iframe = await attachIFrameContext({ + origin: get_host_info().HTTPS_REMOTE_ORIGIN, + headers: [[ + 'Allow-Fenced-Frame-Automatic-Beacons', + navigation_trigger == NavigationTrigger.CrossOriginClick ? + 'true' : + 'false' + ]] + }); + await iframe.execute(async (full_url, target) => { + addEventListener('click', (event) => { + window.open(full_url, target); + }); + }, [full_url, target]); + break; + } + }, + [NavigationTrigger, beacon_events, navigation_trigger, full_url, target]); +} + +// Checks if an automatic beacon of type `event_type` with contents `event_data` +// was sent out or not. +// event_type: The automatic beacon type to check. +// event_data: The automatic beacon data to check. +// expected_success: Whether we expect the automatic beacon to be sent. +// t: The WPT's test object. Only required if +// expected_success = false. +async function verifyBeaconData( + event_type, event_data, expected_success = true, t) { + if (expected_success) { + const beacon_initiator_origin = + await nextAutomaticBeacon(event_type, event_data); + assert_equals(beacon_initiator_origin, get_host_info().HTTPS_ORIGIN); + } else { + const timeout = new Promise(r => t.step_timeout(r, 1000)); + const result = await Promise.race( + [nextAutomaticBeacon(event_type, event_data), timeout]); + assert_true(typeof result === 'undefined'); + } +} diff --git a/tests/wpt/tests/fenced-frame/resources/resize-lock-inner-input.html b/tests/wpt/tests/fenced-frame/resources/resize-lock-inner-input.html index cb17789b450..5513f89d393 100644 --- a/tests/wpt/tests/fenced-frame/resources/resize-lock-inner-input.html +++ b/tests/wpt/tests/fenced-frame/resources/resize-lock-inner-input.html @@ -15,6 +15,7 @@ async function init() { const [resize_lock_inner_page_is_ready_key, resize_lock_resize_is_done_key, + resize_lock_frame_requested_after_resize_key, resize_lock_report_click_location_key, resize_lock_report_click_location_key_after_resize, resize_lock_report_click_location_key_after_resize_2] = parseKeylist(); @@ -25,6 +26,8 @@ if (eventCount == 1) { writeValueToServer(resize_lock_report_click_location_key, point); await nextValueFromServer(resize_lock_resize_is_done_key) + await new Promise(resolve => requestAnimationFrame(resolve)); + writeValueToServer(resize_lock_frame_requested_after_resize_key, "ready"); } else if (eventCount == 2) { writeValueToServer( resize_lock_report_click_location_key_after_resize, point); diff --git a/tests/wpt/tests/fetch/private-network-access/location.tentative.https.window.js b/tests/wpt/tests/fetch/private-network-access/location.tentative.https.window.js new file mode 100644 index 00000000000..2d839e060d4 --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/location.tentative.https.window.js @@ -0,0 +1,191 @@ +// META: script=/common/subset-tests-by-key.js +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=resources/support.sub.js +// META: timeout=long +// META: variant=?include=from-local +// META: variant=?include=from-private +// META: variant=?include=from-public +// META: variant=?include=from-treat-as-public +// +// These tests verify that secure contexts can navigate to less-public address +// spaces via updating window.location iff the target server responds +// affirmatively to preflight requests. + +setup(() => { + assert_true(window.isSecureContext); +}); + +// Source: secure local context. +// +// All fetches unaffected by Private Network Access. + +subsetTestByKey("from-local", promise_test_parallel, t => locationTest(t, { + source: { server: Server.HTTPS_LOCAL }, + target: { server: Server.HTTPS_LOCAL }, + expected: NavigationTestResult.SUCCESS, +}), "local to local: no preflight required."); + +subsetTestByKey("from-local", promise_test_parallel, t => locationTest(t, { + source: { server: Server.HTTPS_LOCAL }, + target: { server: Server.HTTPS_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "local to private: no preflight required."); + +subsetTestByKey("from-local", promise_test_parallel, t => locationTest(t, { + source: { server: Server.HTTPS_LOCAL }, + target: { server: Server.HTTPS_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "local to public: no preflight required."); + +// Generates tests of preflight behavior for a single (source, target) pair. +// +// Scenarios: +// +// - preflight response has non-2xx HTTP code +// - preflight response is missing CORS headers +// - preflight response is missing the PNA-specific `Access-Control` header +// - success +// +function makePreflightTests({ + key, + sourceName, + sourceServer, + sourceTreatAsPublic, + targetName, + targetServer, +}) { + const prefix = + `${sourceName} to ${targetName}: `; + + const source = { + server: sourceServer, + treatAsPublic: sourceTreatAsPublic, + }; + + promise_test_parallel(t => locationTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.failure() }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "failed preflight."); + + promise_test_parallel(t => locationTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.noCorsHeader(token()) }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "missing CORS headers."); + + promise_test_parallel(t => locationTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.noPnaHeader(token()) }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "missing PNA header."); + + promise_test_parallel(t => locationTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.navigation(token()) }, + }, + expected: NavigationTestResult.SUCCESS, + }), prefix + "success."); +} + +// Source: private secure context. +// +// Navigating to the local address space require a successful preflight response +// carrying a PNA-specific header. + +subsetTestByKey('from-private', makePreflightTests, { + sourceServer: Server.HTTPS_PRIVATE, + sourceName: 'private', + targetServer: Server.HTTPS_LOCAL, + targetName: 'local', +}); + +subsetTestByKey("from-private", promise_test_parallel, t => locationTest(t, { + source: { server: Server.HTTPS_PRIVATE }, + target: { server: Server.HTTPS_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "private to private: no preflight required."); + +subsetTestByKey("from-private", promise_test_parallel, t => locationTest(t, { + source: { server: Server.HTTPS_PRIVATE }, + target: { server: Server.HTTPS_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "private to public: no preflight required."); + +// Source: public secure context. +// +// Navigating to the local and private address spaces require a successful +// preflight response carrying a PNA-specific header. + +subsetTestByKey('from-public', makePreflightTests, { + sourceServer: Server.HTTPS_PUBLIC, + sourceName: "public", + targetServer: Server.HTTPS_LOCAL, + targetName: "local", +}); + +subsetTestByKey('from-public', makePreflightTests, { + sourceServer: Server.HTTPS_PUBLIC, + sourceName: "public", + targetServer: Server.HTTPS_PRIVATE, + targetName: "private", +}); + +subsetTestByKey("from-public", promise_test_parallel, t => locationTest(t, { + source: { server: Server.HTTPS_PUBLIC }, + target: { server: Server.HTTPS_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "public to public: no preflight required."); + +// The following tests verify that `CSP: treat-as-public-address` makes +// documents behave as if they had been served from a public IP address. + +subsetTestByKey('from-treat-as-public', makePreflightTests, { + sourceServer: Server.HTTPS_LOCAL, + sourceTreatAsPublic: true, + sourceName: "treat-as-public-address", + targetServer: Server.OTHER_HTTPS_LOCAL, + targetName: "local", +}); + +subsetTestByKey("from-treat-as-public", promise_test_parallel, + t => locationTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: {server: Server.HTTPS_LOCAL}, + expected: NavigationTestResult.SUCCESS, + }), + 'treat-as-public-address to local (same-origin): no preflight required.'); + +subsetTestByKey('from-treat-as-public', makePreflightTests, { + sourceServer: Server.HTTPS_LOCAL, + sourceTreatAsPublic: true, + sourceName: 'treat-as-public-address', + targetServer: Server.HTTPS_PRIVATE, + targetName: 'private', +}); + +subsetTestByKey("from-treat-as-public", promise_test_parallel, + t => locationTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: {server: Server.HTTPS_PUBLIC}, + expected: NavigationTestResult.SUCCESS, + }), + 'treat-as-public-address to public: no preflight required.'); diff --git a/tests/wpt/tests/fetch/private-network-access/location.tentative.window.js b/tests/wpt/tests/fetch/private-network-access/location.tentative.window.js new file mode 100644 index 00000000000..180c2a4658e --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/location.tentative.window.js @@ -0,0 +1,95 @@ +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=resources/support.sub.js +// META: timeout=long +// +// Spec: https://wicg.github.io/private-network-access/ +// +// These tests verify that non-secure contexts cannot navigate to less-public +// address spaces via window.location. + +setup(() => { + // Making sure we are in a non secure context, as expected. + assert_false(window.isSecureContext); +}); + +promise_test_parallel(t => locationTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.SUCCESS, +}), "local to local: no preflight required."); + +promise_test_parallel(t => locationTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "local to private: no preflight required."); + +promise_test_parallel(t => locationTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "local to public: no preflight required."); + +promise_test_parallel(t => locationTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "private to local: failure."); + +promise_test_parallel(t => locationTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "private to private: no preflight required."); + +promise_test_parallel(t => locationTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "private to public: no preflight required."); + +promise_test_parallel(t => locationTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "public to local: failure."); + +promise_test_parallel(t => locationTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.FAILURE, +}), "public to private: failure."); + +promise_test_parallel(t => locationTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "public to public: no preflight required."); + +promise_test_parallel(t => locationTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "treat-as-public-address to local: failure."); + +promise_test_parallel(t => locationTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.FAILURE, +}), "treat-as-public-address to private: failure."); + +promise_test_parallel(t => locationTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "treat-as-public-address to public: no preflight required."); diff --git a/tests/wpt/tests/fetch/private-network-access/resources/open-to-existing-window.html b/tests/wpt/tests/fetch/private-network-access/resources/open-to-existing-window.html new file mode 100644 index 00000000000..6460024bc80 --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/resources/open-to-existing-window.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Opener to an existing window</title> +<body></body> +<script> + window.onmessage = (event) => { + window.onmessage = (event) => parent.postMessage(event.data, "*"); + const { url, token } = event.data; + window.open('', token); + window.open(url, token); + }; +</script> diff --git a/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js b/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js index 69d8f50f18f..308e86b08ac 100644 --- a/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js +++ b/tests/wpt/tests/fetch/private-network-access/resources/support.sub.js @@ -506,6 +506,34 @@ async function windowOpenTest(t, { source, target, expected }) { assert_equals(result, expected); } +async function windowOpenExistingTest(t, { source, target, expected }) { + const targetUrl = preflightUrl(target); + targetUrl.searchParams.set("file", "openee.html"); + targetUrl.searchParams.set( + "file-if-no-preflight-received", + "no-preflight-received.html", + ); + + const sourceUrl = resolveUrl( + 'resources/open-to-existing-window.html', sourceResolveOptions(source)); + sourceUrl.searchParams.set("url", targetUrl); + sourceUrl.searchParams.set("token", token()); + + const iframe = await appendIframe(t, document, sourceUrl); + const reply = futureMessage({ source: iframe.contentWindow }); + + iframe.contentWindow.postMessage({ url: targetUrl.href }, "*"); + + const result = await Promise.race([ + reply, + new Promise((resolve) => { + t.step_timeout(() => resolve("timeout"), 10000 /* ms */); + }), + ]); + + assert_equals(result, expected); +} + async function anchorTest(t, { source, target, expected }) { const targetUrl = preflightUrl(target); targetUrl.searchParams.set("file", "openee.html"); @@ -635,6 +663,51 @@ const iframeGrandparentTest = ({ assert_equals(result, expected); }, name); +async function locationTest(t, { source, target, expected }) { + const targetUuid = token(); + const targetUrl = preflightUrl(target); + targetUrl.searchParams.set("file", "executor.html"); + targetUrl.searchParams.set("executor-uuid", targetUuid); + + const sourceUrl = resolveUrl( + 'resources/update-location.html', sourceResolveOptions(source)); + sourceUrl.searchParams.set("url", targetUrl.href); + window.open(sourceUrl); + + const targetContext = new RemoteContext(targetUuid); + const result = await Promise.race([ + targetContext.execute_script(() => 'success', []), + new Promise((resolve) => { + t.step_timeout(() => resolve('timeout'), 10000 /* ms */); + }), + ]); + assert_equals(result, expected); +} + +async function topLocationTest(t, { source, target, expected }) { + const targetUuid = token(); + const targetUrl = preflightUrl(target); + targetUrl.searchParams.set("file", "executor.html"); + targetUrl.searchParams.set("executor-uuid", targetUuid); + + const sourceUrl = resolveUrl( + 'resources/update-location.html', sourceResolveOptions(source)); + sourceUrl.searchParams.set("url", targetUrl.href); + + const topUrl = resolveUrl('resources/iframer.html'); + topUrl.searchParams.set("url", sourceUrl); + window.open(topUrl); + + const targetContext = new RemoteContext(targetUuid); + const result = await Promise.race([ + targetContext.execute_script(() => 'success', []), + new Promise((resolve) => { + t.step_timeout(() => resolve('timeout'), 10000 /* ms */); + }), + ]); + assert_equals(result, expected); +} + const WebsocketTestResult = { SUCCESS: "open", diff --git a/tests/wpt/tests/fetch/private-network-access/resources/update-location.html b/tests/wpt/tests/fetch/private-network-access/resources/update-location.html new file mode 100644 index 00000000000..a0f2b43856a --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/resources/update-location.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Update Location</title> +<body></body> +<script> + const url = new URL(window.location).searchParams.get("url"); + top.location.href = url; +</script> diff --git a/tests/wpt/tests/fetch/private-network-access/top-location.tentative.https.window.js b/tests/wpt/tests/fetch/private-network-access/top-location.tentative.https.window.js new file mode 100644 index 00000000000..c22b76385ff --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/top-location.tentative.https.window.js @@ -0,0 +1,191 @@ +// META: script=/common/subset-tests-by-key.js +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=resources/support.sub.js +// META: timeout=long +// META: variant=?include=from-local +// META: variant=?include=from-private +// META: variant=?include=from-public +// META: variant=?include=from-treat-as-public +// +// These tests verify that iframes in secure contexts can navigate its top +// window to less-public address spaces via updating window.location iff the +// target server responds affirmatively to preflight requests. + +setup(() => { + assert_true(window.isSecureContext); +}); + +// Source: secure local context. +// +// All fetches unaffected by Private Network Access. + +subsetTestByKey("from-local", promise_test_parallel, t => topLocationTest(t, { + source: { server: Server.HTTPS_LOCAL }, + target: { server: Server.HTTPS_LOCAL }, + expected: NavigationTestResult.SUCCESS, +}), "local to local: no preflight required."); + +subsetTestByKey("from-local", promise_test_parallel, t => topLocationTest(t, { + source: { server: Server.HTTPS_LOCAL }, + target: { server: Server.HTTPS_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "local to private: no preflight required."); + +subsetTestByKey("from-local", promise_test_parallel, t => topLocationTest(t, { + source: { server: Server.HTTPS_LOCAL }, + target: { server: Server.HTTPS_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "local to public: no preflight required."); + +// Generates tests of preflight behavior for a single (source, target) pair. +// +// Scenarios: +// +// - preflight response has non-2xx HTTP code +// - preflight response is missing CORS headers +// - preflight response is missing the PNA-specific `Access-Control` header +// - success +// +function makePreflightTests({ + key, + sourceName, + sourceServer, + sourceTreatAsPublic, + targetName, + targetServer, +}) { + const prefix = + `${sourceName} to ${targetName}: `; + + const source = { + server: sourceServer, + treatAsPublic: sourceTreatAsPublic, + }; + + promise_test_parallel(t => topLocationTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.failure() }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "failed preflight."); + + promise_test_parallel(t => topLocationTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.noCorsHeader(token()) }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "missing CORS headers."); + + promise_test_parallel(t => topLocationTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.noPnaHeader(token()) }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "missing PNA header."); + + promise_test_parallel(t => topLocationTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.navigation(token()) }, + }, + expected: NavigationTestResult.SUCCESS, + }), prefix + "success."); +} + +// Source: private secure context. +// +// Navigating to the local address space require a successful preflight response +// carrying a PNA-specific header. + +subsetTestByKey('from-private', makePreflightTests, { + sourceServer: Server.HTTPS_PRIVATE, + sourceName: 'private', + targetServer: Server.HTTPS_LOCAL, + targetName: 'local', +}); + +subsetTestByKey("from-private", promise_test_parallel, t => topLocationTest(t, { + source: { server: Server.HTTPS_PRIVATE }, + target: { server: Server.HTTPS_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "private to private: no preflight required."); + +subsetTestByKey("from-private", promise_test_parallel, t => topLocationTest(t, { + source: { server: Server.HTTPS_PRIVATE }, + target: { server: Server.HTTPS_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "private to public: no preflight required."); + +// Source: public secure context. +// +// Navigating to the local and private address spaces require a successful +// preflight response carrying a PNA-specific header. + +subsetTestByKey('from-public', makePreflightTests, { + sourceServer: Server.HTTPS_PUBLIC, + sourceName: "public", + targetServer: Server.HTTPS_LOCAL, + targetName: "local", +}); + +subsetTestByKey('from-public', makePreflightTests, { + sourceServer: Server.HTTPS_PUBLIC, + sourceName: "public", + targetServer: Server.HTTPS_PRIVATE, + targetName: "private", +}); + +subsetTestByKey("from-public", promise_test_parallel, t => topLocationTest(t, { + source: { server: Server.HTTPS_PUBLIC }, + target: { server: Server.HTTPS_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "public to public: no preflight required."); + +// The following tests verify that `CSP: treat-as-public-address` makes +// documents behave as if they had been served from a public IP address. + +subsetTestByKey('from-treat-as-public', makePreflightTests, { + sourceServer: Server.HTTPS_LOCAL, + sourceTreatAsPublic: true, + sourceName: "treat-as-public-address", + targetServer: Server.OTHER_HTTPS_LOCAL, + targetName: "local", +}); + +subsetTestByKey("from-treat-as-public", promise_test_parallel, + t => topLocationTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: {server: Server.HTTPS_LOCAL}, + expected: NavigationTestResult.SUCCESS, + }), + 'treat-as-public-address to local (same-origin): no preflight required.'); + +subsetTestByKey('from-treat-as-public', makePreflightTests, { + sourceServer: Server.HTTPS_LOCAL, + sourceTreatAsPublic: true, + sourceName: 'treat-as-public-address', + targetServer: Server.HTTPS_PRIVATE, + targetName: 'private', +}); + +subsetTestByKey("from-treat-as-public", promise_test_parallel, + t => topLocationTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: {server: Server.HTTPS_PUBLIC}, + expected: NavigationTestResult.SUCCESS, + }), + 'treat-as-public-address to public: no preflight required.'); diff --git a/tests/wpt/tests/fetch/private-network-access/top-location.tentative.window.js b/tests/wpt/tests/fetch/private-network-access/top-location.tentative.window.js new file mode 100644 index 00000000000..a759852393b --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/top-location.tentative.window.js @@ -0,0 +1,95 @@ +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=resources/support.sub.js +// META: timeout=long +// +// Spec: https://wicg.github.io/private-network-access/ +// +// These tests verify that iframes in non-secure contexts cannot navigate its +// top window to less-public address spaces via window.location. + +setup(() => { + // Making sure we are in a non secure context, as expected. + assert_false(window.isSecureContext); +}); + +promise_test_parallel(t => topLocationTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.SUCCESS, +}), "local to local: no preflight required."); + +promise_test_parallel(t => topLocationTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "local to private: no preflight required."); + +promise_test_parallel(t => topLocationTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "local to public: no preflight required."); + +promise_test_parallel(t => topLocationTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "private to local: failure."); + +promise_test_parallel(t => topLocationTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "private to private: no preflight required."); + +promise_test_parallel(t => topLocationTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "private to public: no preflight required."); + +promise_test_parallel(t => topLocationTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "public to local: failure."); + +promise_test_parallel(t => topLocationTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.FAILURE, +}), "public to private: failure."); + +promise_test_parallel(t => topLocationTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "public to public: no preflight required."); + +promise_test_parallel(t => topLocationTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "treat-as-public-address to local: failure."); + +promise_test_parallel(t => topLocationTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.FAILURE, +}), "treat-as-public-address to private: failure."); + +promise_test_parallel(t => topLocationTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "treat-as-public-address to public: no preflight required."); diff --git a/tests/wpt/tests/fetch/private-network-access/window-open-existing.tentative.https.window.js b/tests/wpt/tests/fetch/private-network-access/window-open-existing.tentative.https.window.js new file mode 100644 index 00000000000..6a2a624fc80 --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/window-open-existing.tentative.https.window.js @@ -0,0 +1,209 @@ +// META: script=/common/subset-tests-by-key.js +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=resources/support.sub.js +// META: timeout=long +// META: variant=?include=from-local +// META: variant=?include=from-private +// META: variant=?include=from-public +// META: variant=?include=from-treat-as-public +// +// These tests verify that secure contexts can navigate to less-public address +// spaces via window.open to an existing window iff the target server responds +// affirmatively to preflight requests. + +setup(() => { + assert_true(window.isSecureContext); +}); + +// Source: secure local context. +// +// All fetches unaffected by Private Network Access. + +subsetTestByKey( + 'from-local', promise_test_parallel, + t => windowOpenExistingTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: {server: Server.HTTPS_LOCAL}, + expected: NavigationTestResult.SUCCESS, + }), + 'local to local: no preflight required.'); + +subsetTestByKey( + 'from-local', promise_test_parallel, + t => windowOpenExistingTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: {server: Server.HTTPS_PRIVATE}, + expected: NavigationTestResult.SUCCESS, + }), + 'local to private: no preflight required.'); + +subsetTestByKey( + 'from-local', promise_test_parallel, + t => windowOpenExistingTest(t, { + source: {server: Server.HTTPS_LOCAL}, + target: {server: Server.HTTPS_PUBLIC}, + expected: NavigationTestResult.SUCCESS, + }), + 'local to public: no preflight required.'); + +// Generates tests of preflight behavior for a single (source, target) pair. +// +// Scenarios: +// +// - preflight response has non-2xx HTTP code +// - preflight response is missing CORS headers +// - preflight response is missing the PNA-specific `Access-Control` header +// - success +// +function makePreflightTests({ + key, + sourceName, + sourceServer, + sourceTreatAsPublic, + targetName, + targetServer, +}) { + const prefix = + `${sourceName} to ${targetName}: `; + + const source = { + server: sourceServer, + treatAsPublic: sourceTreatAsPublic, + }; + + promise_test_parallel(t => windowOpenExistingTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.failure() }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "failed preflight."); + + promise_test_parallel(t => windowOpenExistingTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.noCorsHeader(token()) }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "missing CORS headers."); + + promise_test_parallel(t => windowOpenExistingTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.noPnaHeader(token()) }, + }, + expected: NavigationTestResult.FAILURE, + }), prefix + "missing PNA header."); + + promise_test_parallel(t => windowOpenExistingTest(t, { + source, + target: { + server: targetServer, + behavior: { preflight: PreflightBehavior.navigation(token()) }, + }, + expected: NavigationTestResult.SUCCESS, + }), prefix + "success."); +} + +// Source: private secure context. +// +// Navigating to the local address space require a successful preflight response +// carrying a PNA-specific header. + +subsetTestByKey('from-private', makePreflightTests, { + sourceServer: Server.HTTPS_PRIVATE, + sourceName: 'private', + targetServer: Server.HTTPS_LOCAL, + targetName: 'local', +}); + +subsetTestByKey( + 'from-private', promise_test_parallel, + t => windowOpenExistingTest(t, { + source: {server: Server.HTTPS_PRIVATE}, + target: {server: Server.HTTPS_PRIVATE}, + expected: NavigationTestResult.SUCCESS, + }), + 'private to private: no preflight required.'); + +subsetTestByKey( + 'from-private', promise_test_parallel, + t => windowOpenExistingTest(t, { + source: {server: Server.HTTPS_PRIVATE}, + target: {server: Server.HTTPS_PUBLIC}, + expected: NavigationTestResult.SUCCESS, + }), + 'private to public: no preflight required.'); + +// Source: public secure context. +// +// Navigating to the local and private address spaces require a successful +// preflight response carrying a PNA-specific header. + +subsetTestByKey('from-public', makePreflightTests, { + sourceServer: Server.HTTPS_PUBLIC, + sourceName: "public", + targetServer: Server.HTTPS_LOCAL, + targetName: "local", +}); + +subsetTestByKey('from-public', makePreflightTests, { + sourceServer: Server.HTTPS_PUBLIC, + sourceName: "public", + targetServer: Server.HTTPS_PRIVATE, + targetName: "private", +}); + +subsetTestByKey( + 'from-public', promise_test_parallel, + t => windowOpenExistingTest(t, { + source: {server: Server.HTTPS_PUBLIC}, + target: {server: Server.HTTPS_PUBLIC}, + expected: NavigationTestResult.SUCCESS, + }), + 'public to public: no preflight required.'); + +// The following tests verify that `CSP: treat-as-public-address` makes +// documents behave as if they had been served from a public IP address. + +subsetTestByKey('from-treat-as-public', makePreflightTests, { + sourceServer: Server.HTTPS_LOCAL, + sourceTreatAsPublic: true, + sourceName: "treat-as-public-address", + targetServer: Server.OTHER_HTTPS_LOCAL, + targetName: "local", +}); + +subsetTestByKey("from-treat-as-public", promise_test_parallel, + t => windowOpenExistingTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: {server: Server.HTTPS_LOCAL}, + expected: NavigationTestResult.SUCCESS, + }), + 'treat-as-public-address to local (same-origin): no preflight required.'); + +subsetTestByKey('from-treat-as-public', makePreflightTests, { + sourceServer: Server.HTTPS_LOCAL, + sourceTreatAsPublic: true, + sourceName: 'treat-as-public-address', + targetServer: Server.HTTPS_PRIVATE, + targetName: 'private', +}); + +subsetTestByKey("from-treat-as-public", promise_test_parallel, + t => windowOpenExistingTest(t, { + source: { + server: Server.HTTPS_LOCAL, + treatAsPublic: true, + }, + target: {server: Server.HTTPS_PUBLIC}, + expected: NavigationTestResult.SUCCESS, + }), + 'treat-as-public-address to public: no preflight required.'); diff --git a/tests/wpt/tests/fetch/private-network-access/window-open-existing.tentative.window.js b/tests/wpt/tests/fetch/private-network-access/window-open-existing.tentative.window.js new file mode 100644 index 00000000000..5a6cd4c5cfd --- /dev/null +++ b/tests/wpt/tests/fetch/private-network-access/window-open-existing.tentative.window.js @@ -0,0 +1,95 @@ +// META: script=/common/dispatcher/dispatcher.js +// META: script=/common/utils.js +// META: script=resources/support.sub.js +// META: timeout=long +// +// Spec: https://wicg.github.io/private-network-access/ +// +// These tests verify that non-secure contexts cannot navigate to less-public +// address spaces via window.open to an existing window. + +setup(() => { + // Making sure we are in a non secure context, as expected. + assert_false(window.isSecureContext); +}); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.SUCCESS, +}), "local to local: no preflight required."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "local to private: no preflight required."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { server: Server.HTTP_LOCAL }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "local to public: no preflight required."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "private to local: failure."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.SUCCESS, +}), "private to private: no preflight required."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { server: Server.HTTP_PRIVATE }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "private to public: no preflight required."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "public to local: failure."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.FAILURE, +}), "public to private: failure."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { server: Server.HTTP_PUBLIC }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "public to public: no preflight required."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_LOCAL }, + expected: NavigationTestResult.FAILURE, +}), "treat-as-public-address to local: failure."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_PRIVATE }, + expected: NavigationTestResult.FAILURE, +}), "treat-as-public-address to private: failure."); + +promise_test_parallel(t => windowOpenExistingTest(t, { + source: { + server: Server.HTTP_LOCAL, + treatAsPublic: true, + }, + target: { server: Server.HTTP_PUBLIC }, + expected: NavigationTestResult.SUCCESS, +}), "treat-as-public-address to public: no preflight required."); diff --git a/tests/wpt/tests/fledge/tentative/component-auction.https.window.js b/tests/wpt/tests/fledge/tentative/component-auction.https.window.js index 83980541f39..63771d42b86 100644 --- a/tests/wpt/tests/fledge/tentative/component-auction.https.window.js +++ b/tests/wpt/tests/fledge/tentative/component-auction.https.window.js @@ -5,7 +5,8 @@ // META: timeout=long // META: variant=?1-5 // META: variant=?6-10 -// META: variant=?11-last +// META: variant=?11-15 +// META: variant=?16-last "use strict"; @@ -139,8 +140,8 @@ subsetTest(promise_test, async test => { let topLevelSeller = OTHER_ORIGIN3; let bidderReportURL = createBidderReportURL(uuid); - let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/1); - let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/2); + let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/"component"); + let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/"top"); // Note that generateBid() and reportWin() receive slightly different // "browserSignals" fields - only reportWin() gets "interestGroupOwner", so @@ -233,8 +234,8 @@ subsetTest(promise_test, async test => { const uuid = generateUuid(test); let bidderReportURL = createBidderReportURL(uuid); - let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/1); - let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/2); + let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/"component"); + let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/"top"); await joinInterestGroup( test, uuid, @@ -284,8 +285,8 @@ subsetTest(promise_test, async test => { const uuid = generateUuid(test); let bidderReportURL = createBidderReportURL(uuid); - let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/1); - let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/2); + let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/"component"); + let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/"top"); await joinInterestGroup( test, uuid, @@ -336,8 +337,8 @@ subsetTest(promise_test, async test => { const uuid = generateUuid(test); let bidderReportURL = createBidderReportURL(uuid); - let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/1); - let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/2); + let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/"component"); + let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/"top"); await joinInterestGroup( test, uuid, @@ -388,8 +389,8 @@ subsetTest(promise_test, async test => { const uuid = generateUuid(test); let bidderReportURL = createBidderReportURL(uuid); - let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/1); - let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/2); + let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/"component"); + let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/"top"); await joinInterestGroup( test, uuid, @@ -435,3 +436,284 @@ subsetTest(promise_test, async test => { uuid, [bidderReportURL, componentSellerReportURL, topLevelSellerReportURL]); }, 'Top-level auction cannot modify bid.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + + let bidderReportURL = createBidderReportURL(uuid); + let componentSellerReportURL = createSellerReportURL(uuid, /*id=*/"component"); + let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/"top"); + + await joinInterestGroup( + test, uuid, + { biddingLogicURL: createBiddingScriptURL( + { allowComponentAuction: true, + reportWin: + `if (browserSignals.desirability !== undefined) + throw "Unexpected desirability: " + browserSignals.desirability; + sendReportTo("${bidderReportURL}");`})}); + + let auctionConfig = createComponentAuctionConfig(uuid); + + auctionConfig.componentAuctions[0].decisionLogicURL = + createDecisionScriptURL( + uuid, + { scoreAd: + `return {desirability: 3, allowComponentAuction: true};`, + reportResult: + `if (browserSignals.desirability !== 3) + throw "Unexpected component desirability: " + browserSignals.desirability; + sendReportTo("${componentSellerReportURL}");` }); + + auctionConfig.decisionLogicURL = + createDecisionScriptURL( + uuid, + { scoreAd: + `return {desirability: 4, allowComponentAuction: true};`, + reportResult: + `if (browserSignals.desirability !== 4) + throw "Unexpected component desirability: " + browserSignals.desirability; + sendReportTo("${topLevelSellerReportURL}");` }); + + await runBasicFledgeAuctionAndNavigate(test, uuid, auctionConfig); + await waitForObservedRequests( + uuid, + [bidderReportURL, componentSellerReportURL, topLevelSellerReportURL]); +}, 'Component auction desirability.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + + // An auction with two components, each of which has a distinct bidder origin, + // so the bidder in the second component is OTHER_ORIGIN1). The bidder in the + // first component auction bids more and is given the highest of all + // desirability scores in the auction by its component seller, but the + // top-level seller prefers bidder 2. + let bidder1ReportURL = createBidderReportURL(uuid, /*id=*/1); + let bidder2ReportURL = createBidderReportURL(uuid, /*id=*/2); + let componentSeller1ReportURL = createSellerReportURL(uuid, /*id=*/"component1"); + let componentSeller2ReportURL = createSellerReportURL(uuid, /*id=*/"component2"); + let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/"top"); + + await Promise.all([ + joinInterestGroup( + test, uuid, + { biddingLogicURL: createBiddingScriptURL( + { bid: 10, + allowComponentAuction: true, + reportWin: + `sendReportTo("${bidder1ReportURL}");`})}), + joinCrossOriginInterestGroup(test, uuid, OTHER_ORIGIN1, + { biddingLogicURL: createBiddingScriptURL( + { origin: OTHER_ORIGIN1, + bid: 2, + allowComponentAuction: true, + reportWin: + `if (browserSignals.bid !== 2) + throw "Unexpected bid: " + browserSignals.bid; + sendReportTo("${bidder2ReportURL}");`})}) + ]); + + let auctionConfig = createComponentAuctionConfig(uuid); + + auctionConfig.componentAuctions[0].decisionLogicURL = + createDecisionScriptURL( + uuid, + { scoreAd: + `return {desirability: 10, allowComponentAuction: true};`, + reportResult: + `sendReportTo("${componentSeller1ReportURL}");` }); + + auctionConfig.componentAuctions[1] = { + ...auctionConfig.componentAuctions[0], + interestGroupBuyers: [OTHER_ORIGIN1], + decisionLogicURL: createDecisionScriptURL( + uuid, + { scoreAd: + `return {desirability: 1, allowComponentAuction: true};`, + reportResult: + `if (browserSignals.desirability !== 1) + throw "Unexpected component desirability: " + browserSignals.desirability; + sendReportTo("${componentSeller2ReportURL}");` }) + } + + auctionConfig.decisionLogicURL = + createDecisionScriptURL( + uuid, + { scoreAd: + `return {desirability: 11 - bid, allowComponentAuction: true};`, + reportResult: + `if (browserSignals.desirability !== 9) + throw "Unexpected component desirability: " + browserSignals.desirability; + sendReportTo("${topLevelSellerReportURL}");` }); + + await runBasicFledgeAuctionAndNavigate(test, uuid, auctionConfig); + await waitForObservedRequests( + uuid, + [bidder2ReportURL, componentSeller2ReportURL, topLevelSellerReportURL]); +}, 'Component auction desirability two sellers, two bidders.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + + let renderURL1 = createRenderURL(uuid); + let renderURL2 = createRenderURL(uuid, /*script=*/';'); + + // The same bidder uses different ads, bids, and reporting URLs for different + // component sellers. + let bidderReportURL1 = createBidderReportURL(uuid, /*id=*/1); + let bidderReportURL2 = createBidderReportURL(uuid, /*id=*/2); + let componentSeller1ReportURL = createSellerReportURL(uuid, /*id=*/"component1"); + let componentSeller2ReportURL = createSellerReportURL(uuid, /*id=*/"component2"); + let topLevelSellerReportURL = createSellerReportURL(uuid, /*id=*/"top"); + + await joinInterestGroup( + test, uuid, + { ads: [{ renderURL: renderURL1 }, { renderURL: renderURL2 }], + biddingLogicURL: createBiddingScriptURL( + { allowComponentAuction: true, + generateBid: + // "auctionSignals" contains the bid and the report URL, to + // make the same bidder behave differently in the two + // auctions. + 'return auctionSignals;', + reportWin: + `if (browserSignals.renderURL !== "${renderURL2}") + throw "Wrong winner: " + browserSignals.renderURL; + sendReportTo(auctionSignals.reportURL);`})}); + + let auctionConfig = createComponentAuctionConfig(uuid); + + auctionConfig.componentAuctions[0].decisionLogicURL = + createDecisionScriptURL( + uuid, + { scoreAd: + `return {desirability: 10, allowComponentAuction: true};`, + reportResult: + `sendReportTo("${componentSeller1ReportURL}");` }); + // "auctionSignals" contains the bid and the report URL, to + // make the same bidder behave differently in the two + // auctions. + auctionConfig.componentAuctions[0].auctionSignals = { + bid: 10, + allowComponentAuction: true, + render: renderURL1, + reportURL: bidderReportURL1 + }; + + auctionConfig.componentAuctions[1] = { + ...auctionConfig.componentAuctions[0], + auctionSignals: { + bid: 2, + allowComponentAuction: true, + render: renderURL2, + reportURL: bidderReportURL2 + }, + decisionLogicURL: createDecisionScriptURL( + uuid, + { scoreAd: + `return {desirability: 1, allowComponentAuction: true};`, + reportResult: + `if (browserSignals.desirability !== 1) + throw "Unexpected component desirability: " + browserSignals.desirability; + if (browserSignals.renderURL !== "${renderURL2}") + throw "Wrong winner: " + browserSignals.renderURL; + sendReportTo("${componentSeller2ReportURL}");` }) + } + + auctionConfig.decisionLogicURL = + createDecisionScriptURL( + uuid, + { scoreAd: + `return {desirability: 11 - bid, allowComponentAuction: true};`, + reportResult: + `if (browserSignals.desirability !== 9) + throw "Unexpected component desirability: " + browserSignals.desirability; + if (browserSignals.renderURL !== "${renderURL2}") + throw "Wrong winner: " + browserSignals.renderURL; + sendReportTo("${topLevelSellerReportURL}");` }); + + await runBasicFledgeAuctionAndNavigate(test, uuid, auctionConfig); + await waitForObservedRequests( + uuid, + [bidderReportURL2, componentSeller2ReportURL, topLevelSellerReportURL]); +}, 'Component auction desirability and renderURL two sellers, one bidder.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + + // The renderURLs / report URLs for the first/second iterations of the auction. + let renderURL1 = createRenderURL(uuid); + let renderURL2 = createRenderURL(uuid, /*script=*/';'); + let bidderReportURL1 = createBidderReportURL(uuid, /*id=*/1); + let bidderReportURL2 = createBidderReportURL(uuid, /*id=*/2); + let seller1ReportURL = createSellerReportURL(uuid, /*id=*/1); + let seller2ReportURL = createSellerReportURL(uuid, /*id=*/2); + + await joinInterestGroup( + test, uuid, + { ads: [{ renderURL: renderURL1 }, { renderURL: renderURL2 }], + biddingLogicURL: createBiddingScriptURL( + { allowComponentAuction: true, + generateBid: + `// If this is the first recorded win, use "renderURL1" + if (browserSignals.bidCount === 0 && + browserSignals.prevWinsMs.length === 0) { + return {bid: 2, allowComponentAuction: true, render: "${renderURL1}"}; + } + + // Otherwise, check that a single bid and win were reported, despite the + // bidder bidding twice in the first auction, once for each component + // auction. + if (browserSignals.bidCount === 1 && + browserSignals.prevWinsMs.length === 1 && + typeof browserSignals.prevWinsMs[0][0] === "number" && + browserSignals.prevWinsMs[0][1].renderURL === "${renderURL1}") { + return {bid: 1, allowComponentAuction: true, render: "${renderURL2}"}; + } + throw "Unexpected biddingSignals: " + JSON.stringify(browserSignals);`, + reportWin: + `if (browserSignals.renderURL === "${renderURL1}") + sendReportTo("${bidderReportURL1}"); + if (browserSignals.renderURL === "${renderURL2}") + sendReportTo("${bidderReportURL2}");`})}); + + // Auction has two component auctions with different sellers but the same + // single bidder. The first component auction only accepts bids with + // "renderURL1", the second only accepts bids with "renderURL2". + let auctionConfig = createComponentAuctionConfig(uuid); + auctionConfig.componentAuctions[0].decisionLogicURL = + createDecisionScriptURL( + uuid, + { scoreAd: `if (browserSignals.renderURL != '${renderURL1}') + throw 'Wrong ad';`, + reportResult: `sendReportTo('${seller1ReportURL}');`} + ); + + auctionConfig.componentAuctions[1] = { + seller: OTHER_ORIGIN1, + interestGroupBuyers: [window.location.origin], + decisionLogicURL: createDecisionScriptURL( + uuid, + { origin: OTHER_ORIGIN1, + scoreAd: `if (browserSignals.renderURL != '${renderURL2}') + throw 'Wrong ad';`, + reportResult: `sendReportTo('${seller2ReportURL}');`} + ) + }; + + // In the first auction, the bidder should use "renderURL1", which the first + // component auction allows. `prevWinsMs` and `numBids` should be updated. + await runBasicFledgeAuctionAndNavigate(test, uuid, auctionConfig); + await waitForObservedRequests( + uuid, + [bidderReportURL1, seller1ReportURL]); + + // In the second auction, the bidder should use "renderURL2", which the second + // component auction allows. `prevWinsMs` and `numBids` should reflect the updated + // value. + await runBasicFledgeAuctionAndNavigate(test, uuid, auctionConfig); + await waitForObservedRequests( + uuid, + [bidderReportURL1, seller1ReportURL, bidderReportURL2, seller2ReportURL]); +}, `Component auction prevWinsMs and numBids updating in one component seller's auction, read in another's.`); diff --git a/tests/wpt/tests/fledge/tentative/direct-from-seller-signals.https.window.js b/tests/wpt/tests/fledge/tentative/direct-from-seller-signals.https.window.js index 0ae1efd8d37..339bc32ee56 100644 --- a/tests/wpt/tests/fledge/tentative/direct-from-seller-signals.https.window.js +++ b/tests/wpt/tests/fledge/tentative/direct-from-seller-signals.https.window.js @@ -3,15 +3,17 @@ // META: script=resources/fledge-util.sub.js // META: script=/common/subset-tests.js // META: timeout=long -// META: variant=?1-5 -// META: variant=?6-10 -// META: variant=?11-15 -// META: variant=?16-20 -// META: variant=?21-last +// META: variant=?1-4 +// META: variant=?5-8 +// META: variant=?9-12 +// META: variant=?13-16 +// META: variant=?17-20 +// META: variant=?21-24 +// META: variant=?25-28 +// META: variant=?29-last "use strict;" -// Subset 1 - 5 subsetTest(promise_test, async test => { const uuid = generateUuid(test); await fetchDirectFromSellerSignals({ 'Buyer-Origin': window.location.origin }); @@ -96,7 +98,6 @@ subsetTest(promise_test, async test => { ); }, 'Test directFromSellerSignals with sellerSignals, auctionSignals and perBuyerSignals.'); -// Subset 6 - 10 subsetTest(promise_test, async test => { const uuid = generateUuid(test); await fetchDirectFromSellerSignals({ 'Buyer-Origin': window.location.origin }); @@ -224,7 +225,6 @@ subsetTest(promise_test, async test => { ); }, 'Test directFromSellerSignals with mismatched perBuyerSignals.'); -// Subset 11 - 15 subsetTest(promise_test, async test => { const uuid = generateUuid(test); await fetchDirectFromSellerSignals({ 'Buyer-Origin': '*' }); @@ -304,7 +304,6 @@ subsetTest(promise_test, async test => { ); }, 'Test directFromSellerSignals with HTTP error.'); -// Subset 16 - 20 subsetTest(promise_test, async test => { const uuid = generateUuid(test); await fetchDirectFromSellerSignals({ 'Negative-Test-Option': 'No Ad-Auction-Signals Header' }); @@ -397,7 +396,6 @@ subsetTest(promise_test, async test => { ); }, 'Test directFromSellerSignals different interest group owner origin from top frame.'); -// Subset 21 - last subsetTest(promise_test, async test => { const uuid = generateUuid(test); let iframe = await createIframe(test, OTHER_ORIGIN1, "join-ad-interest-group; run-ad-auction"); diff --git a/tests/wpt/tests/fledge/tentative/interest-group-passed-to-generate-bid.https.window.js b/tests/wpt/tests/fledge/tentative/interest-group-passed-to-generate-bid.https.window.js index cf46855a3d1..11a63c1aa59 100644 --- a/tests/wpt/tests/fledge/tentative/interest-group-passed-to-generate-bid.https.window.js +++ b/tests/wpt/tests/fledge/tentative/interest-group-passed-to-generate-bid.https.window.js @@ -6,7 +6,10 @@ // META: variant=?1-5 // META: variant=?6-10 // META: variant=?11-15 -// META: variant=?16-last +// META: variant=?16-20 +// META: variant=?21-25 +// META: variant=?26-30 +// META: variant=?31-last "use strict;" @@ -19,12 +22,13 @@ const makeTest = ({ name, // InterestGroup field name. fieldName, - // InterestGroup field value, both expected in worklets and acution in the - // auction. If undefined, value will not be set in interestGroup, and will - // be expected to also not be set in the interestGroup passed to generateBid(). + // InterestGroup field value, both expected in worklets and the value used + // when joining the interest group. If undefined, value will not be set in + // interestGroup, and will be expected to also not be set in the + // interestGroup passed to generateBid(). fieldValue, // Additional values to use in the InterestGroup passed to joinInterestGroup(). - // If it contains a value for the key specified in `fieldName`, that takes + // If it contains a value for the key specified in `fieldName`, takes // precedent over `fieldValue`. interestGroupOverrides = {} }) => { @@ -83,6 +87,118 @@ makeTest({ }); makeTest({ + name: 'InterestGroup.name.', + fieldName: 'name', + fieldValue: 'Jim' +}); + +makeTest({ + name: 'InterestGroup.name with unicode characters.', + fieldName: 'name', + fieldValue: '\u2665' +}); + +makeTest({ + name: 'InterestGroup.lifetimeMs should not be passed in.', + fieldName: 'lifetimeMs', + fieldValue: undefined, + interestGroupOverrides: { lifetimeMs: "120000" } +}); + +makeTest({ + name: 'InterestGroup.priority should not be passed in, since it can be changed by auctions.', + fieldName: 'priority', + fieldValue: undefined, + interestGroupOverrides: { priority: 500 } +}); + +makeTest({ + name: 'InterestGroup.priorityVector undefined.', + fieldName: 'priorityVector', + fieldValue: undefined +}); + +makeTest({ + name: 'InterestGroup.priorityVector empty.', + fieldName: 'priorityVector', + fieldValue: {} +}); + +makeTest({ + name: 'InterestGroup.priorityVector.', + fieldName: 'priorityVector', + fieldValue: { 'a': -1, 'b': 2 } +}); + +makeTest({ + name: 'InterestGroup.prioritySignalsOverrides should not be passed in, since it can be changed by auctions.', + fieldName: 'prioritySignalsOverrides', + fieldValue: undefined, + interestGroupOverrides: { prioritySignalsOverrides: { 'a': 1, 'b': 2 } } +}); + +// TODO(mmenke): These next 4 violate spec. Fix the code, and update the tests. +makeTest({ + name: 'InterestGroup.enableBiddingSignalsPrioritization not set.', + fieldName: 'enableBiddingSignalsPrioritization', + fieldValue: false, + interestGroupOverrides: { enableBiddingSignalsPrioritization: undefined } +}); + +makeTest({ + name: 'InterestGroup.enableBiddingSignalsPrioritization unrecognized.', + fieldName: 'enableBiddingSignalsPrioritization', + // Non-empty strings are treated as true by Javascript. This test is serves + // to make sure that the 'foo' isn't preserved. + fieldValue: true, + interestGroupOverrides: { enableBiddingSignalsPrioritization: 'foo' } +}); + +makeTest({ + name: 'InterestGroup.enableBiddingSignalsPrioritization false.', + fieldName: 'enableBiddingSignalsPrioritization', + fieldValue: false +}); + +makeTest({ + name: 'InterestGroup.enableBiddingSignalsPrioritization true.', + fieldName: 'enableBiddingSignalsPrioritization', + fieldValue: true +}); + +makeTest({ + name: 'InterestGroup.executionMode not present.', + fieldName: 'executionMode', + fieldValue: 'compatibility', + interestGroupOverrides: { executionMode: undefined } +}); + +makeTest({ + name: 'InterestGroup.executionMode compatibility.', + fieldName: 'executionMode', + fieldValue: 'compatibility' +}); + +makeTest({ + name: 'InterestGroup.executionMode frozen-context.', + fieldName: 'executionMode', + fieldValue: 'frozen-context' +}); + +makeTest({ + name: 'InterestGroup.executionMode group-by-origin.', + fieldName: 'executionMode', + fieldValue: 'group-by-origin' +}); + +makeTest({ + name: 'InterestGroup.executionMode has non-standard string.', + fieldName: 'executionMode', + fieldValue: 'compatibility', + interestGroupOverrides: { executionMode: 'foo' } +}); + +makeTest({ name: 'InterestGroup.trustedBiddingSignalsURL not set.', fieldName: 'trustedBiddingSignalsURL', fieldValue: undefined @@ -113,18 +229,6 @@ makeTest({ }); makeTest({ - name: 'InterestGroup.name.', - fieldName: 'name', - fieldValue: 'Jim' -}); - -makeTest({ - name: 'InterestGroup.name with unicode characters.', - fieldName: 'name', - fieldValue: '\u2665' -}); - -makeTest({ name: 'InterestGroup.trustedBiddingSignalsKeys.', fieldName: 'trustedBiddingSignalsKeys', fieldValue: ['a', ' b ', 'c', '1', '%20', '3', '\u2665'] @@ -170,6 +274,30 @@ makeTest({ }); makeTest({ + name: 'InterestGroup.userBiddingSignals not set.', + fieldName: 'userBiddingSignals', + fieldValue: undefined +}); + +makeTest({ + name: 'InterestGroup.userBiddingSignals is integer.', + fieldName: 'userBiddingSignals', + fieldValue: 15 +}); + +makeTest({ + name: 'InterestGroup.userBiddingSignals is array.', + fieldName: 'userBiddingSignals', + fieldValue: [1, {a: 'b'}, 'c'] +}); + +makeTest({ + name: 'InterestGroup.userBiddingSignals is object.', + fieldName: 'userBiddingSignals', + fieldValue: {a:1, b:32.5, c:['d', 'e']} +}); + +makeTest({ name: 'InterestGroup.nonStandardField.', fieldName: 'nonStandardField', fieldValue: undefined, diff --git a/tests/wpt/tests/fledge/tentative/resources/worklet-helpers.js b/tests/wpt/tests/fledge/tentative/resources/worklet-helpers.js index dd3b9a7dd51..2147a026aec 100644 --- a/tests/wpt/tests/fledge/tentative/resources/worklet-helpers.js +++ b/tests/wpt/tests/fledge/tentative/resources/worklet-helpers.js @@ -13,7 +13,7 @@ function deepEquals(a, b) { let aKeys = Object.keys(a); if (aKeys.length != Object.keys(b).length) return false; - for (key in aKeys) { + for (let key of aKeys) { if (a.hasOwnProperty(key) != b.hasOwnProperty(key) || !deepEquals(a[key], b[key])) { return false; diff --git a/tests/wpt/tests/fullscreen/rendering/backdrop-iframe-ref.html b/tests/wpt/tests/fullscreen/rendering/backdrop-green-ref.html index 3126fe19426..3126fe19426 100644 --- a/tests/wpt/tests/fullscreen/rendering/backdrop-iframe-ref.html +++ b/tests/wpt/tests/fullscreen/rendering/backdrop-green-ref.html diff --git a/tests/wpt/tests/fullscreen/rendering/backdrop-iframe.html b/tests/wpt/tests/fullscreen/rendering/backdrop-iframe.html index 710d1b48f18..dbdf9c841a4 100644 --- a/tests/wpt/tests/fullscreen/rendering/backdrop-iframe.html +++ b/tests/wpt/tests/fullscreen/rendering/backdrop-iframe.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <html class=reftest-wait> <title>::backdrop for a fullscreen iframe element</title> -<link rel=match href="backdrop-iframe-ref.html"> +<link rel=match href="backdrop-green-ref.html"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/6939"> <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-vendor.js"></script> diff --git a/tests/wpt/tests/fullscreen/rendering/backdrop-inherit.html b/tests/wpt/tests/fullscreen/rendering/backdrop-inherit.html new file mode 100644 index 00000000000..3a38dc4c815 --- /dev/null +++ b/tests/wpt/tests/fullscreen/rendering/backdrop-inherit.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<title>::backdrop inherits style from the fullscreen element</title> +<link rel=match href="backdrop-green-ref.html"> +<link rel=help href="https://github.com/whatwg/fullscreen/issues/124"> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<style> +body { + --bg: red; +} +div { + --bg: green; +} +div::backdrop { + background: var(--bg); +} +</style> +<div></div> +<script> +document.addEventListener('fullscreenchange', () => { + document.documentElement.classList.remove('reftest-wait'); +}); +test_driver.bless('fullscreen', () => { + document.querySelector('div').requestFullscreen(); +}); +</script> diff --git a/tests/wpt/tests/html/dom/aria-attribute-reflection.html b/tests/wpt/tests/html/dom/aria-attribute-reflection.html index 8970938ac92..fa5e9ad5c78 100644 --- a/tests/wpt/tests/html/dom/aria-attribute-reflection.html +++ b/tests/wpt/tests/html/dom/aria-attribute-reflection.html @@ -462,4 +462,26 @@ test(function(t) { testNullable(element, "ariaValueText", "aria-valuetext"); }, "aria-valuetext attribute reflects."); </script> + +<div id="braillelabel" aria-braillelabel="x"></div> +<script> +test(function(t) { + var element = document.getElementById("braillelabel"); + assert_equals(element.ariaBrailleLabel, "x"); + element.ariaBrailleLabel = "y"; + assert_equals(element.getAttribute("aria-braillelabel"), "y"); + testNullable(element, "ariaBrailleLabel", "aria-braillelabel"); +}, "aria-braillelabel attribute reflects."); +</script> + +<div id="brailleroledescription" aria-brailleroledescription="x"></div> +<script> +test(function(t) { + var element = document.getElementById("brailleroledescription"); + assert_equals(element.ariaBrailleRoleDescription, "x"); + element.ariaBrailleRoleDescription = "y"; + assert_equals(element.getAttribute("aria-brailleroledescription"), "y"); + testNullable(element, "ariaBrailleRoleDescription", "aria-brailleroledescription"); +}, "aria-brailleroledescription attribute reflects."); +</script> </html> diff --git a/tests/wpt/tests/html/dom/elements/global-attributes/dir-assorted.window.js b/tests/wpt/tests/html/dom/elements/global-attributes/dir-assorted.window.js index 038b3f78d4d..0d4e4b82d9b 100644 --- a/tests/wpt/tests/html/dom/elements/global-attributes/dir-assorted.window.js +++ b/tests/wpt/tests/html/dom/elements/global-attributes/dir-assorted.window.js @@ -80,3 +80,36 @@ test(() => { assert_false(e1.matches(":dir(ltr)"), "parent is RTL after changing text in child"); assert_false(e2.matches(":dir(ltr)"), "child is RTL after changing text in child"); }, "text changes apply to dir=auto on further ancestor after removing dir=auto from closer ancestor"); + +for (const bdi_test of [ + { markup: "<bdi dir=ltr>A</bdi>", expected: "ltr", desc: "dir=ltr with LTR contents" }, + { markup: "<bdi dir=ltr>\u05d0</bdi>", expected: "ltr", desc: "dir=ltr with RTL contents" }, + { markup: "<bdi dir=ltr></bdi>", expected: "ltr", desc: "dir=ltr empty" }, + { markup: "<bdi dir=rtl>A</bdi>", expected: "rtl", desc: "dir=rtl with LTR contents" }, + { markup: "<bdi dir=rtl>\u05d0</bdi>", expected: "rtl", desc: "dir=rtl with RTL contents" }, + { markup: "<bdi dir=rtl></bdi>", expected: "rtl", desc: "dir=rtl empty" }, + { markup: "<bdi dir=auto>A</bdi>", expected: "ltr", desc: "dir=auto with LTR contents" }, + { markup: "<bdi dir=auto>\u05d0</bdi>", expected: "rtl", desc: "dir=auto with RTL contents" }, + { markup: "<bdi dir=auto></bdi>", expected: "parent", desc: "dir=auto empty" }, + { markup: "<bdi>A</bdi>", expected: "ltr", desc: "no dir attribute with LTR contents" }, + { markup: "<bdi>\u05d0</bdi>", expected: "rtl", desc: "no dir attribute with RTL contents" }, + { markup: "<bdi></bdi>", expected: "parent", desc: "no dir attribute empty" }, +]) { + for (const parent_dir of [ "ltr", "rtl" ]) { + test(() => { + const parent_element = document.createElement("div"); + parent_element.dir = parent_dir; + document.body.appendChild(parent_element); + parent_element.innerHTML = bdi_test.markup; + const bdi_element = parent_element.querySelector("bdi"); + let expected = bdi_test.expected; + if (expected == "parent") { + expected = parent_dir; + } + const not_expected = (expected == "ltr") ? "rtl" : "ltr"; + assert_true(bdi_element.matches(`:dir(${expected})`)); + assert_false(bdi_element.matches(`:dir(${not_expected})`)); + parent_element.remove(); + }, `directionality of bdi elements: ${bdi_test.desc} in ${parent_dir} parent`); + } +} diff --git a/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-option-arbitrary-content-not-displayed.tentative.html b/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-option-arbitrary-content-not-displayed.tentative.html index 66b87ec33b9..e7cacdba271 100644 --- a/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-option-arbitrary-content-not-displayed.tentative.html +++ b/tests/wpt/tests/html/semantics/forms/the-selectlist-element/selectlist-option-arbitrary-content-not-displayed.tentative.html @@ -3,9 +3,6 @@ <title>HTMLSelectListElement Test: option arbitrary content not displayed</title> <link rel="author" title="Ionel Popescu" href="mailto:iopopesc@microsoft.com"> <link rel=match href="selectlist-option-arbitrary-content-not-displayed-ref.tentative.html"> -<script src="/resources/testdriver.js"></script> -<script src="/resources/testdriver-actions.js"></script> -<script src="/resources/testdriver-vendor.js"></script> <option> option with image not displayed diff --git a/tests/wpt/tests/html/semantics/popovers/popover-light-dismiss-hint.tentative.html b/tests/wpt/tests/html/semantics/popovers/popover-light-dismiss-hint.tentative.html new file mode 100644 index 00000000000..f07363115fb --- /dev/null +++ b/tests/wpt/tests/html/semantics/popovers/popover-light-dismiss-hint.tentative.html @@ -0,0 +1,107 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>Popover light dismiss behavior for hints</title> +<meta name="timeout" content="long"> +<link rel="author" href="mailto:masonf@chromium.org"> +<link rel=help href="https://open-ui.org/components/popover-hint.research.explainer"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/popover-utils.js"></script> + +<div id=outside></div> +<div popover id=auto1>auto 1 + <div popover id=auto2>auto 2 + <div popover=hint id=innerhint1>inner hint 1 + <div popover=hint id=innerhint2>inner hint 2 + <div popover id=invalidauto1>Improperly nested auto 1</div> + </div> + </div> + </div> +</div> +<div popover=hint id=hint1>hint 1 + <div popover=hint id=hint2>hint 2 + <div popover id=invalidauto2>Improperly nested auto 2</div> + </div> +</div> +<div popover=manual id=manual1>Manual</div> + +<style> + [popover] {right:auto;bottom:auto;} + #auto1 {left:100px; top:100px;} + #auto2 {left:100px; top:200px;} + #innerhint1 {left:100px; top:300px;} + #innerhint2 {left:100px; top:400px;} + #invalidauto1 {left:100px; top:500px;} + #hint1 {left:200px; top:100px;} + #hint2 {left:200px; top:200px;} + #invalidauto1 {left:200px; top:400px;} + #manual1 {left:300px; top:100px;} + #outside {width:25px;height:25px} +</style> + +<script> + const popovers = [ + document.querySelector('#auto1'), + document.querySelector('#auto2'), + document.querySelector('#innerhint1'), + document.querySelector('#innerhint2'), + document.querySelector('#hint1'), + document.querySelector('#hint2'), + document.querySelector('#manual1'), + ]; + function assertState(expectedState,description) { + description = description || 'Error'; + const n = popovers.length; + assert_equals(expectedState.length,n,'Invalid'); + for(let i=0;i<n;++i) { + assert_equals(popovers[i].matches(':popover-open'),expectedState[i],`${description}, index ${i} (${popovers[i].id})`); + } + } + function openall(t) { + // All popovers can be open at once, if shown in order: + popovers.forEach((p) => p.hidePopover()); + popovers.forEach((p) => p.showPopover()); + assertState(Array(popovers.length).fill(true),'All popovers should be able to be open at once'); + t.add_cleanup(() => popovers.forEach((p) => p.hidePopover())); + } + function nvals(n,val) { + return new Array(n).fill(val); + } + for(let i=0;i<(popovers.length-1);++i) { + promise_test(async (t) => { + openall(t); + await clickOn(popovers[i]); + let expectedState = [...nvals(i+1,true),...nvals(popovers.length-i-2,false),true]; + assertState(expectedState); + },`Mixed auto/hint light dismiss behavior, click on ${popovers[i].id}`); + } + + promise_test(async (t) => { + openall(t); + await clickOn(outside); + assertState([false,false,false,false,false,false,true]); + },'Clicking outside closes all'); + + promise_test(async (t) => { + openall(t); + invalidauto1.showPopover(); + assertState([true,true,false,false,false,false,true],'auto inside hint ignores the hints and gets nested within auto2'); + assert_true(invalidauto1.matches(':popover-open'),'the inner nested auto should be open'); + invalidauto1.hidePopover(); + assertState([true,true,false,false,false,false,true]); + assert_false(invalidauto1.matches(':popover-open')); + },'Auto cannot be nested inside hint (invalidauto1)'); + + promise_test(async (t) => { + openall(t); + invalidauto2.showPopover(); + assertState([false,false,false,false,false,false,true],'auto inside hint works as an independent (non-nested) auto'); + assert_true(invalidauto2.matches(':popover-open'),'the inner nested auto should be open'); + invalidauto2.hidePopover(); + assertState([false,false,false,false,false,false,true]); + assert_false(invalidauto2.matches(':popover-open')); + },'Auto cannot be nested inside hint (invalidauto2)'); +</script> diff --git a/tests/wpt/tests/html/semantics/popovers/popover-light-dismiss.html b/tests/wpt/tests/html/semantics/popovers/popover-light-dismiss.html index 4a57276bce3..0c51693aa12 100644 --- a/tests/wpt/tests/html/semantics/popovers/popover-light-dismiss.html +++ b/tests/wpt/tests/html/semantics/popovers/popover-light-dismiss.html @@ -449,52 +449,6 @@ promise_test(async () => { },'Ensure circular/convoluted ancestral relationships are functional, with a direct showPopover()'); </script> -<div popover id=p10>Popover</div> -<div popover=hint id=p11>Hint</div> -<div popover=manual id=p12>Manual</div> -<style> - #p10 {top:100px;} - #p11 {top:200px;} - #p12 {top:300px;} -</style> -<script> -if (popoverHintSupported()) { - promise_test(async () => { - const auto = document.querySelector('#p10'); - const hint = document.querySelector('#p11'); - const manual = document.querySelector('#p12'); - // All three can be open at once, if shown in this order: - auto.showPopover(); - hint.showPopover(); - manual.showPopover(); - assert_true(auto.matches(':popover-open')); - assert_true(hint.matches(':popover-open')); - assert_true(manual.matches(':popover-open')); - // Clicking the hint will close the auto, but not the manual. - await clickOn(hint); - assert_false(auto.matches(':popover-open'),'auto should be hidden'); - assert_true(hint.matches(':popover-open'),'hint should stay open'); - assert_true(manual.matches(':popover-open'),'manual does not light dismiss'); - // Clicking outside should close the hint, but not the manual: - await clickOn(outside); - assert_false(auto.matches(':popover-open')); - assert_false(hint.matches(':popover-open'),'hint should close'); - assert_true(manual.matches(':popover-open'),'manual does not light dismiss'); - manual.hidePopover(); - assert_false(manual.matches(':popover-open')); - auto.showPopover(); - hint.showPopover(); - assert_true(auto.matches(':popover-open')); - assert_true(hint.matches(':popover-open')); - // Clicking on the auto should close the hint: - await clickOn(auto); - assert_true(auto.matches(':popover-open'),'auto should stay open'); - assert_false(hint.matches(':popover-open'),'hint should light dismiss'); - auto.hidePopover(); - assert_false(auto.matches(':popover-open')); - },'Light dismiss of mixed popover types including hints'); -} -</script> <div popover id=p13>Popover 1 <div popover id=p14>Popover 2 <div popover id=p15>Popover 3</div> diff --git a/tests/wpt/tests/html/semantics/popovers/popover-open-in-beforetoggle.html b/tests/wpt/tests/html/semantics/popovers/popover-open-in-beforetoggle.html new file mode 100644 index 00000000000..1e22b73c686 --- /dev/null +++ b/tests/wpt/tests/html/semantics/popovers/popover-open-in-beforetoggle.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>Popover beforetoggle event opening new popovers</title> +<link rel="author" href="mailto:masonf@chromium.org"> +<link rel=help href="https://html.spec.whatwg.org/multipage/indices.html#event-beforetoggle"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/popover-utils.js"></script> + +<div popover id=p1>Popover 1 + <div popover id=p2>Popover 2 + <div popover id=p3>Popover 3</div> + </div> +</div> +<div id=outside>Outside</div> +<dialog id=dialog>Dialog</dialog> + +<script> + function getSignal(t) { + const controller = new AbortController(); + t.add_cleanup(() => controller.abort()); + return controller.signal; + } + + test((t) => { + p1.showPopover(); + p1.addEventListener('beforetoggle',() => p2.showPopover(),{signal: getSignal(t)}); + p1.hidePopover(); // Potential crash here + assert_false(p1.matches(':popover-open')); + assert_false(p2.matches(':popover-open')); + },'Open popover from closing beforetoggle event'); + + test((t) => { + p1.showPopover(); + p1.addEventListener('beforetoggle',() => p2.showPopover(),{signal: getSignal(t)}); + p2.addEventListener('beforetoggle',() => p3.showPopover(),{signal: getSignal(t)}); + p1.hidePopover(); // Potential crash here + assert_false(p1.matches(':popover-open')); + assert_false(p2.matches(':popover-open')); + assert_false(p3.matches(':popover-open')); + },'Open double-nested popovers from closing beforetoggle event'); + + test(t => { + p1.showPopover(); + p1.addEventListener('beforetoggle',() => p2.showPopover(),{signal: getSignal(t)}); + p2.addEventListener('beforetoggle',() => p3.showPopover(),{signal: getSignal(t)}); + dialog.showModal(); // Potential crash here + assert_false(p1.matches(':popover-open')); + assert_false(p2.matches(':popover-open')); + assert_false(p3.matches(':popover-open')); + dialog.close(); + },'Open double-nested popovers from closing beforetoggle event, dialog open'); + + promise_test(async t => { + p1.showPopover(); + p1.addEventListener('beforetoggle',() => p2.showPopover(),{signal: getSignal(t)}); + p2.addEventListener('beforetoggle',() => p3.showPopover(),{signal: getSignal(t)}); + await clickOn(outside); // Potential crash here + assert_false(p1.matches(':popover-open')); + assert_false(p2.matches(':popover-open')); + assert_false(p3.matches(':popover-open')); + },'Open double-nested popovers from closing beforetoggle event, light dismiss'); +</script> diff --git a/tests/wpt/tests/html/semantics/popovers/popover-types-with-hints.tentative.html b/tests/wpt/tests/html/semantics/popovers/popover-types-with-hints.tentative.html index 7a73efb50fc..07f0e26fce7 100644 --- a/tests/wpt/tests/html/semantics/popovers/popover-types-with-hints.tentative.html +++ b/tests/wpt/tests/html/semantics/popovers/popover-types-with-hints.tentative.html @@ -5,6 +5,22 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script> + function getPopovers() { + return Array.from(document.currentScript.parentElement.querySelectorAll('[popover]')); + } + function assertState(expectedState,description) { + description = description || 'Error'; + const popovers = getPopovers(); + const n = popovers.length; + assert_equals(expectedState.length,n,'Invalid expected state length'); + for(let i=0;i<n;++i) { + const html = '<' + popovers[i].outerHTML.split('<')[1] + '</div>'; + assert_equals(popovers[i].matches(':popover-open'),expectedState[i],`${description}, index ${i} (${html})`); + } + } +</script> + <div> <div popover>Popover</div> <div popover=hint>Hint</div> @@ -12,55 +28,49 @@ <div popover=manual>Async</div> <script> { - const auto = document.currentScript.parentElement.querySelector('[popover=""]'); - const hint = document.currentScript.parentElement.querySelector('[popover=hint]'); - const manual = document.currentScript.parentElement.querySelectorAll('[popover=manual]')[0]; - const manual2 = document.currentScript.parentElement.querySelectorAll('[popover=manual]')[1]; - function assert_state_1(autoOpen,hintOpen,manualOpen,manual2Open) { - assert_equals(auto.matches(':popover-open'),autoOpen,'auto open state is incorrect'); - assert_equals(hint.matches(':popover-open'),hintOpen,'hint open state is incorrect'); - assert_equals(manual.matches(':popover-open'),manualOpen,'manual open state is incorrect'); - assert_equals(manual2.matches(':popover-open'),manual2Open,'manual2 open state is incorrect'); - } + const auto = getPopovers()[0]; + const hint = getPopovers()[1]; + const manual = getPopovers()[2]; + const manual2 = getPopovers()[3]; test(() => { - assert_state_1(false,false,false,false); + assertState([false,false,false,false]); auto.showPopover(); - assert_state_1(true,false,false,false); + assertState([true,false,false,false]); hint.showPopover(); - assert_state_1(true,true,false,false); + assertState([true,true,false,false]); manual.showPopover(); - assert_state_1(true,true,true,false); + assertState([true,true,true,false]); manual2.showPopover(); - assert_state_1(true,true,true,true); + assertState([true,true,true,true]); hint.hidePopover(); - assert_state_1(true,false,true,true); + assertState([true,false,true,true]); auto.hidePopover(); - assert_state_1(false,false,true,true); + assertState([false,false,true,true]); auto.showPopover(); hint.showPopover(); - assert_state_1(true,true,true,true); - auto.hidePopover(); // Non-nested tooltips can stay open when unrelated popovers are hidden. - assert_state_1(false,true,true,true); + assertState([true,true,true,true]); + auto.hidePopover(); + assertState([false,false,true,true]); hint.hidePopover(); manual.hidePopover(); - assert_state_1(false,false,false,true); + assertState([false,false,false,true]); manual2.hidePopover(); - assert_state_1(false,false,false,false); + assertState([false,false,false,false]); },'manuals do not close popovers'); test(() => { - assert_state_1(false,false,false,false); + assertState([false,false,false,false]); hint.showPopover(); manual.showPopover(); manual2.showPopover(); - assert_state_1(false,true,true,true); + assertState([false,true,true,true]); auto.showPopover(); - assert_state_1(true,false,true,true); + assertState([true,false,true,true]); auto.hidePopover(); - assert_state_1(false,false,true,true); + assertState([false,false,true,true]); manual.hidePopover(); manual2.hidePopover(); - assert_state_1(false,false,false,false); + assertState([false,false,false,false]); },'autos close hints but not manuals'); } </script> @@ -76,26 +86,20 @@ <div popover=hint anchor=anchorid>Hint anchored to popover</div> <script> { - const popover1 = document.currentScript.parentElement.querySelectorAll('[popover=""]')[0]; - const popover2 = document.currentScript.parentElement.querySelectorAll('[popover=""]')[1]; - const popover3 = document.currentScript.parentElement.querySelectorAll('[popover=""]')[2]; - const hint = document.currentScript.parentElement.querySelector('[popover=hint]'); - function assert_state_2(popover1Open,popover2Open,popover3Open,hintOpen) { - assert_equals(popover1.matches(':popover-open'),popover1Open,'popover1 open state is incorrect'); - assert_equals(popover2.matches(':popover-open'),popover2Open,'popover2 open state is incorrect'); - assert_equals(popover3.matches(':popover-open'),popover3Open,'popover3 open state is incorrect'); - assert_equals(hint.matches(':popover-open'),hintOpen,'hint open state is incorrect'); - } + const popover1 = getPopovers()[0]; + const popover2 = getPopovers()[1]; + const popover3 = getPopovers()[2]; + const hint = getPopovers()[3]; test(() => { - assert_state_2(false,false,false,false); + assertState([false,false,false,false]); popover1.showPopover(); popover2.showPopover(); popover3.showPopover(); - assert_state_2(true,true,true,false); + assertState([true,true,true,false]); hint.showPopover(); // Because hint is nested in popover2, popover3 should be hidden - assert_state_2(true,true,false,true); + assertState([true,true,false,true]); popover1.hidePopover(); // Should close the hint, which is anchored to popover2 - assert_state_2(false,false,false,false); + assertState([false,false,false,false]); },'hint is not closed by pre-existing auto'); } </script> @@ -107,16 +111,15 @@ </div> <script> test(() => { - const hint1 = document.currentScript.parentElement.querySelectorAll('[popover=hint]')[0]; - const hint2 = document.currentScript.parentElement.querySelectorAll('[popover=hint]')[1]; + const hint1 = getPopovers()[0]; + const hint2 = getPopovers()[1]; hint1.showPopover(); - assert_true(hint1.matches(':popover-open')); - assert_false(hint2.matches(':popover-open')); + assertState([true,false]); hint2.showPopover(); - assert_false(hint1.matches(':popover-open')); - assert_true(hint2.matches(':popover-open')); - hint2.hidePopover(); - },'If a popover=hint is shown, it should hide any other open popover=hint popovers, including ancestral popovers. (You can\'t nest popover=hint)'); + assertState([true,true]); + hint1.hidePopover(); + assertState([false,false]); + },'You can nest hint popovers'); </script> </div> @@ -126,15 +129,14 @@ </div> <script> test(() => { - const hint = document.currentScript.parentElement.querySelector('[popover=hint]'); - const auto = document.currentScript.parentElement.querySelector('[popover=""]'); + const hint = getPopovers()[0]; + const auto = getPopovers()[1]; hint.showPopover(); - assert_true(hint.matches(':popover-open')); - assert_false(auto.matches(':popover-open')); + assertState([true,false]); auto.showPopover(); - assert_false(hint.matches(':popover-open')); - assert_true(auto.matches(':popover-open')); + assertState([false,true]); auto.hidePopover(); + assertState([false,false]); },'If a popover=auto is shown, it should hide any open popover=hint, including if the popover=hint is an ancestral popover of the popover=auto. (You can\'t nest a popover=auto inside a popover=hint)'); </script> </div> @@ -146,20 +148,16 @@ </div> <script> test(() => { - const auto = document.currentScript.parentElement.querySelectorAll('[popover=""]')[0]; - const auto2 = document.currentScript.parentElement.querySelectorAll('[popover=""]')[1]; - const hint = document.currentScript.parentElement.querySelector('[popover=hint]'); + const auto = getPopovers()[0]; + const auto2 = getPopovers()[1]; + const hint = getPopovers()[2]; auto.showPopover(); auto2.showPopover(); - assert_true(auto.matches(':popover-open')); - assert_true(auto2.matches(':popover-open')); + assertState([true,true,false]); hint.showPopover(); // This should hide auto2, since it is nested in auto1. - assert_true(auto.matches(':popover-open')); - assert_false(auto2.matches(':popover-open')); - assert_true(hint.matches(':popover-open')); + assertState([true,false,true]); auto.hidePopover(); // Should hide both auto and hint. - assert_false(auto.matches(':popover-open')); - assert_false(hint.matches(':popover-open')); + assertState([false,false,false]); },'If you: a) show a popover=auto (call it D), then b) show a descendent popover=hint of D (call it T), then c) hide D, then T should be hidden. (A popover=hint can be nested inside a popover=auto)'); </script> </div> @@ -169,16 +167,13 @@ <div popover=hint>Non-Nested hint</div> <script> test(() => { - const auto = document.currentScript.parentElement.querySelector('[popover=""]'); - const hint = document.currentScript.parentElement.querySelector('[popover=hint]'); + const auto = getPopovers()[0] + const hint = getPopovers()[1]; auto.showPopover(); hint.showPopover(); - assert_true(auto.matches(':popover-open')); - assert_true(hint.matches(':popover-open')); + assertState([true,true]); auto.hidePopover(); - assert_false(auto.matches(':popover-open')); - assert_true(hint.matches(':popover-open')); - hint.hidePopover(); - },'If you: a) show a popover=auto (call it D), then b) show a non-descendent popover=hint of D (call it T), then c) hide D, then T should be left showing. (Non-nested popover=hint can stay open when unrelated popover=autos are hidden)'); + assertState([false,false]); + },'If you: a) show a popover=auto (call it D), then b) show a non-descendent popover=hint of D (call it T), then c) hide D, then T should be hidden. (Non-nested popover=hint gets hidden when unrelated popover=autos are hidden)'); </script> </div> diff --git a/tests/wpt/tests/html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default.html b/tests/wpt/tests/html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default.html index e658500a4eb..3a9d90c76b3 100644 --- a/tests/wpt/tests/html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default.html +++ b/tests/wpt/tests/html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default.html @@ -30,13 +30,13 @@ ‭ - The LRO (left-to-right override) formatting character. ‬ - The PDF (pop directional formatting) formatting character; closes LRO. In each DIV of the test: - - the first BDI, having no characters with strong direction, should be LTR by default; + - the first BDI, having no characters with strong direction, should inherit the parent direction; - the second BDI, having an LTR character first, should be LTR by default; - the third BDI, having an RTL character first, should be RTL by default. </div> <div class="test"> <div dir="ltr"><bdi>[:)]</bdi>, <bdi>[+- a ב]</bdi>, <bdi>[1 ג d]</bdi>...</div> - <div dir="rtl"><bdi>[:)]</bdi>, <bdi>[+- a ב]</bdi>, <bdi>[1 ג d]</bdi>...</div> + <div dir="rtl"><bdi>[(:]</bdi>, <bdi>[+- a ב]</bdi>, <bdi>[1 ג d]</bdi>...</div> </div> <div class="ref"> <div dir="ltr">‭[:)], [+- a ב], [d ג 1]...‬</div> diff --git a/tests/wpt/tests/infrastructure/testdriver/actions/crossOrigin.sub.html b/tests/wpt/tests/infrastructure/testdriver/actions/crossOrigin.sub.html index 38b3610af65..3f6f3a77f3a 100644 --- a/tests/wpt/tests/infrastructure/testdriver/actions/crossOrigin.sub.html +++ b/tests/wpt/tests/infrastructure/testdriver/actions/crossOrigin.sub.html @@ -6,7 +6,8 @@ <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-vendor.js"></script> -<iframe src="https://{{host}}:{{ports[https][1]}}/infrastructure/testdriver/actions/crossOriginChild.html"></iframe> +<iframe + src="https://{{host}}:{{ports[https][1]}}/infrastructure/testdriver/actions/support/actions.html?parent"></iframe> <script> setup({single_test: true}); diff --git a/tests/wpt/tests/infrastructure/testdriver/actions/popup.html b/tests/wpt/tests/infrastructure/testdriver/actions/popup.html new file mode 100644 index 00000000000..62140d63814 --- /dev/null +++ b/tests/wpt/tests/infrastructure/testdriver/actions/popup.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Actions in popup</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> + +<script> + promise_test((t) => new Promise((resolve, reject) => { + addEventListener("message", (msg) => { + if (msg.data === "PASS") { + resolve(); + } else if (msg.data === "FAIL") { + reject("actions failed"); + } + }); + addEventListener("click", (event) => { + reject("Test window received click meant for the popup"); + }); + + let popup = window.open("support/actions.html?popup", "_blank"); + t.add_cleanup(() => popup.close()); + }), "Actions go to the popup and not the test window"); +</script> diff --git a/tests/wpt/tests/infrastructure/testdriver/actions/crossOriginChild.html b/tests/wpt/tests/infrastructure/testdriver/actions/support/actions.html index 48e37e233e1..767368b3ab4 100644 --- a/tests/wpt/tests/infrastructure/testdriver/actions/crossOriginChild.html +++ b/tests/wpt/tests/infrastructure/testdriver/actions/support/actions.html @@ -7,7 +7,9 @@ <script> let input = document.getElementsByTagName("input")[0]; addEventListener("load", async () => { - test_driver.set_test_context(parent); + let searchParams = new URLSearchParams(location.search); + let testContext = searchParams.has("parent") ? parent : opener; + test_driver.set_test_context(testContext); await new test_driver.Actions() .pointerMove(0, 0, {origin: input}) .pointerDown() @@ -24,9 +26,9 @@ addEventListener("load", async () => { .keyUp("S") .send(); if (input.value === "PASS") { - test_driver.message_test("PASS", "*") + test_driver.message_test("PASS", "*"); } else { - test_driver.message_test("FAIL", "*") + test_driver.message_test("FAIL", "*"); } }); </script> diff --git a/tests/wpt/tests/infrastructure/testdriver/interacted_window.html b/tests/wpt/tests/infrastructure/testdriver/interacted_window.html deleted file mode 100644 index 708cb9a84b5..00000000000 --- a/tests/wpt/tests/infrastructure/testdriver/interacted_window.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE HTML> -<script src="/resources/testdriver.js"></script> -<script src="/resources/testdriver-vendor.js"></script> -<script src="/resources/testdriver-actions.js"></script> - -<body> -The quick brown fox jumps over the lazy dog - -<script> - document.addEventListener("pointermove", function(event){ - opener.pointerMoveInInteractedWindow(); - }); - - document.addEventListener("click", function(event){ - opener.clickInInteractedWindow(); - }); - - async function interact() { - test_driver.set_test_context(opener); - await new test_driver.Actions() - .pointerMove(0, 0, {target:document.body}) - .pointerDown() - .pointerUp() - .send(); - } - - onload = async function(){ - interact(); - } -</script> -</body> diff --git a/tests/wpt/tests/infrastructure/testdriver/test_win_open_with_interaction.html b/tests/wpt/tests/infrastructure/testdriver/test_win_open_with_interaction.html deleted file mode 100644 index 055b17ab19e..00000000000 --- a/tests/wpt/tests/infrastructure/testdriver/test_win_open_with_interaction.html +++ /dev/null @@ -1,39 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<body> -<script> - - promise_test(async (t)=> new Promise((resolve, reject) => { - let pointerMovementInOpenedWindow = false; - let clickInOpenedWindow = false; - let pointerMovementInTestWindow = false; - let clickInTestWindow = false; - window.pointerMoveInInteractedWindow = function() { - pointerMovementInOpenedWindow = true; - } - window.clickInInteractedWindow = function() { - clickInOpenedWindow = true; - t.step(()=> { - assert_true(pointerMovementInOpenedWindow); - resolve(); - }); - } - document.addEventListener("pointermove", function(event){ - pointerMovementInTestWindow = true; - }); - document.addEventListener("click", function(event){ - clickInTestWindow = true; - t.step(()=> { - assert_true(pointerMovementInTestWindow); - reject("Interaction events fired in the test window!"); - }); - }); - - let w = window.open("interacted_window.html", '_blank'); - t.add_cleanup(() => w.close()); - }), "Tests pointer move/click in a window opened with `window.open.`"); -</script> -</body> diff --git a/tests/wpt/tests/interfaces/FedCM.idl b/tests/wpt/tests/interfaces/FedCM.idl index 9b18d951f83..a42a2f7f6a6 100644 --- a/tests/wpt/tests/interfaces/FedCM.idl +++ b/tests/wpt/tests/interfaces/FedCM.idl @@ -18,11 +18,20 @@ partial interface Navigator { [SecureContext] readonly attribute NavigatorLogin login; }; +dictionary IdentityCredentialDisconnectOptions : IdentityProviderConfig { + required USVString accountHint; +}; + [Exposed=Window, SecureContext] interface IdentityCredential : Credential { + static Promise<undefined> disconnect(optional IdentityCredentialDisconnectOptions options = {}); readonly attribute USVString? token; }; +dictionary DisconnectedAccount { + required USVString account_id; +}; + partial dictionary CredentialRequestOptions { IdentityCredentialRequestOptions identity; }; @@ -35,15 +44,19 @@ enum IdentityCredentialRequestOptionsContext { }; dictionary IdentityCredentialRequestOptions { - required sequence<IdentityProviderConfig> providers; + required sequence<IdentityProviderRequestOptions> providers; IdentityCredentialRequestOptionsContext context = "signin"; }; dictionary IdentityProviderConfig { required USVString configURL; required USVString clientId; +}; + +dictionary IdentityProviderRequestOptions : IdentityProviderConfig { USVString nonce; DOMString loginHint; + DOMString domainHint; }; dictionary IdentityProviderWellKnown { @@ -67,6 +80,7 @@ dictionary IdentityProviderAPIConfig { required USVString client_metadata_endpoint; required USVString id_assertion_endpoint; required USVString login_url; + USVString disconnect_endpoint; IdentityProviderBranding branding; }; @@ -78,6 +92,7 @@ dictionary IdentityProviderAccount { USVString picture; sequence<USVString> approved_clients; sequence<DOMString> login_hints; + sequence<DOMString> domain_hints; }; dictionary IdentityProviderAccountList { sequence<IdentityProviderAccount> accounts; diff --git a/tests/wpt/tests/interfaces/anonymous-iframe.idl b/tests/wpt/tests/interfaces/anonymous-iframe.idl new file mode 100644 index 00000000000..11d19e320a8 --- /dev/null +++ b/tests/wpt/tests/interfaces/anonymous-iframe.idl @@ -0,0 +1,12 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: Iframe credentialless (https://wicg.github.io/anonymous-iframe/) + +partial interface HTMLIFrameElement { + attribute boolean credentialless; +}; + +partial interface Window { + readonly attribute boolean credentialless; +}; diff --git a/tests/wpt/tests/interfaces/css-transitions.idl b/tests/wpt/tests/interfaces/css-transitions.idl index 0f00b2c014c..d4ff45e4862 100644 --- a/tests/wpt/tests/interfaces/css-transitions.idl +++ b/tests/wpt/tests/interfaces/css-transitions.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: CSS Transitions (https://drafts.csswg.org/css-transitions-1/) +// Source: CSS Transitions Level 1 (https://drafts.csswg.org/css-transitions-1/) [Exposed=Window] interface TransitionEvent : Event { diff --git a/tests/wpt/tests/interfaces/css-view-transitions-2.idl b/tests/wpt/tests/interfaces/css-view-transitions-2.idl index fe1f0e30e7d..7435605cdaf 100644 --- a/tests/wpt/tests/interfaces/css-view-transitions-2.idl +++ b/tests/wpt/tests/interfaces/css-view-transitions-2.idl @@ -3,11 +3,6 @@ // (https://github.com/w3c/webref) // Source: CSS View Transitions Module Level 2 (https://drafts.csswg.org/css-view-transitions-2/) -[Exposed=Window] -interface PageRevealEvent : Event { - readonly attribute ViewTransition? viewTransition; -}; - dictionary StartViewTransitionOptions { UpdateCallback? update = null; sequence<DOMString>? type = null; diff --git a/tests/wpt/tests/interfaces/custom-state-pseudo-class.idl b/tests/wpt/tests/interfaces/custom-state-pseudo-class.idl deleted file mode 100644 index 342f1ede0b0..00000000000 --- a/tests/wpt/tests/interfaces/custom-state-pseudo-class.idl +++ /dev/null @@ -1,14 +0,0 @@ -// GENERATED CONTENT - DO NOT EDIT -// Content was automatically extracted by Reffy into webref -// (https://github.com/w3c/webref) -// Source: Custom State Pseudo Class (https://wicg.github.io/custom-state-pseudo-class/) - -partial interface ElementInternals { - readonly attribute CustomStateSet states; -}; - -[Exposed=Window] -interface CustomStateSet { - setlike<DOMString>; - undefined add(DOMString value); -}; diff --git a/tests/wpt/tests/interfaces/dom.idl b/tests/wpt/tests/interfaces/dom.idl index 929fa8d03b3..cf2d4e4adc5 100644 --- a/tests/wpt/tests/interfaces/dom.idl +++ b/tests/wpt/tests/interfaces/dom.idl @@ -339,6 +339,7 @@ interface ShadowRoot : DocumentFragment { readonly attribute ShadowRootMode mode; readonly attribute boolean delegatesFocus; readonly attribute SlotAssignmentMode slotAssignment; + readonly attribute boolean clonable; readonly attribute Element host; attribute EventHandler onslotchange; }; diff --git a/tests/wpt/tests/interfaces/html.idl b/tests/wpt/tests/interfaces/html.idl index b7501feea91..434d0cc0ab1 100644 --- a/tests/wpt/tests/interfaces/html.idl +++ b/tests/wpt/tests/interfaces/html.idl @@ -1633,6 +1633,9 @@ interface ElementInternals { boolean reportValidity(); readonly attribute NodeList labels; + + // Custom state pseudo-class + [SameObject] readonly attribute CustomStateSet states; }; // Accessibility semantics @@ -1651,6 +1654,11 @@ dictionary ValidityStateFlags { boolean customError = false; }; +[Exposed=Window] +interface CustomStateSet { + setlike<DOMString>; +}; + [Exposed=(Window)] interface VisibilityStateEntry : PerformanceEntry { readonly attribute DOMString name; // shadows inherited name @@ -1872,6 +1880,7 @@ interface Navigation : EventTarget { readonly attribute NavigationHistoryEntry? currentEntry; undefined updateCurrentEntry(NavigationUpdateCurrentEntryOptions options); readonly attribute NavigationTransition? transition; + readonly attribute NavigationActivation? activation; readonly attribute boolean canGoBack; readonly attribute boolean canGoForward; @@ -1945,6 +1954,13 @@ interface NavigationTransition { }; [Exposed=Window] +interface NavigationActivation { + readonly attribute NavigationHistoryEntry? from; + readonly attribute NavigationHistoryEntry entry; + readonly attribute NavigationType navigationType; +}; + +[Exposed=Window] interface NavigateEvent : Event { constructor(DOMString type, NavigateEventInit eventInitDict); @@ -2045,6 +2061,16 @@ dictionary HashChangeEventInit : EventInit { }; [Exposed=Window] +interface PageRevealEvent : Event { + constructor(DOMString type, optional PageRevealEventInit eventInitDict = {}); + readonly attribute ViewTransition? viewTransition; +}; + +dictionary PageRevealEventInit : EventInit { + ViewTransition? viewTransition = null; +}; + +[Exposed=Window] interface PageTransitionEvent : Event { constructor(DOMString type, optional PageTransitionEventInit eventInitDict = {}); @@ -2083,12 +2109,12 @@ dictionary ErrorEventInit : EventInit { interface PromiseRejectionEvent : Event { constructor(DOMString type, PromiseRejectionEventInit eventInitDict); - readonly attribute Promise<any> promise; + readonly attribute object promise; readonly attribute any reason; }; dictionary PromiseRejectionEventInit : EventInit { - required Promise<any> promise; + required object promise; any reason; }; @@ -2193,6 +2219,7 @@ interface mixin WindowEventHandlers { attribute EventHandler onoffline; attribute EventHandler ononline; attribute EventHandler onpagehide; + attribute EventHandler onpagereveal; attribute EventHandler onpageshow; attribute EventHandler onpopstate; attribute EventHandler onrejectionhandled; @@ -2249,11 +2276,11 @@ enum DOMParserSupportedType { }; partial interface Element { - undefined setHTMLUnsafe(DOMString html); + [CEReactions] undefined setHTMLUnsafe(DOMString html); }; partial interface ShadowRoot { - undefined setHTMLUnsafe(DOMString html); + [CEReactions] undefined setHTMLUnsafe(DOMString html); }; [Exposed=Window] diff --git a/tests/wpt/tests/interfaces/longtasks.idl b/tests/wpt/tests/interfaces/longtasks.idl index 064d1072d2d..71ab2ddc67c 100644 --- a/tests/wpt/tests/interfaces/longtasks.idl +++ b/tests/wpt/tests/interfaces/longtasks.idl @@ -5,12 +5,24 @@ [Exposed=Window] interface PerformanceLongTaskTiming : PerformanceEntry { + /* Overloading PerformanceEntry */ + readonly attribute DOMHighResTimeStamp startTime; + readonly attribute DOMHighResTimeStamp duration; + readonly attribute DOMString name; + readonly attribute DOMString entryType; + readonly attribute FrozenArray<TaskAttributionTiming> attribution; [Default] object toJSON(); }; [Exposed=Window] interface TaskAttributionTiming : PerformanceEntry { + /* Overloading PerformanceEntry */ + readonly attribute DOMHighResTimeStamp startTime; + readonly attribute DOMHighResTimeStamp duration; + readonly attribute DOMString name; + readonly attribute DOMString entryType; + readonly attribute DOMString containerType; readonly attribute DOMString containerSrc; readonly attribute DOMString containerId; @@ -20,9 +32,39 @@ interface TaskAttributionTiming : PerformanceEntry { [Exposed=Window] interface PerformanceLongAnimationFrameTiming : PerformanceEntry { + /* Overloading PerformanceEntry */ + readonly attribute DOMHighResTimeStamp startTime; + readonly attribute DOMHighResTimeStamp duration; + readonly attribute DOMString name; + readonly attribute DOMString entryType; + readonly attribute DOMHighResTimeStamp renderStart; readonly attribute DOMHighResTimeStamp styleAndLayoutStart; readonly attribute DOMHighResTimeStamp blockingDuration; + readonly attribute DOMHighResTimeStamp firstUIEventTimestamp; + [SameObject] readonly attribute FrozenArray<PerformanceScriptTiming> scripts; + [Default] object toJSON(); +}; + +enum ScriptTimingType { + "classic-script", + "module-script", + "event-listener", + "user-callback", + "resolve-promise", + "reject-promise" +}; + +[Exposed=Window] +interface PerformanceScriptTiming : PerformanceEntry { + /* Overloading PerformanceEntry */ + readonly attribute DOMHighResTimeStamp startTime; + readonly attribute DOMHighResTimeStamp duration; + readonly attribute DOMString name; + readonly attribute DOMString entryType; + readonly attribute ScriptTimingType type; + readonly attribute DOMHighResTimeStamp executionStart; + readonly attribute DOMString sourceLocation; [Default] object toJSON(); }; diff --git a/tests/wpt/tests/interfaces/media-source.idl b/tests/wpt/tests/interfaces/media-source.idl index adaac2ca9b2..7a86a7a43c8 100644 --- a/tests/wpt/tests/interfaces/media-source.idl +++ b/tests/wpt/tests/interfaces/media-source.idl @@ -76,6 +76,32 @@ interface SourceBufferList : EventTarget { }; [Exposed=(Window,DedicatedWorker)] +interface ManagedMediaSource : MediaSource { + constructor(); + readonly attribute boolean streaming; + attribute EventHandler onstartstreaming; + attribute EventHandler onendstreaming; +}; + +[Exposed=(Window,DedicatedWorker)] +interface BufferedChangeEvent : Event { + constructor(DOMString type, optional BufferedChangeEventInit eventInitDict = {}); + + [SameObject] readonly attribute TimeRanges addedRanges; + [SameObject] readonly attribute TimeRanges removedRanges; +}; + +dictionary BufferedChangeEventInit : EventInit { + TimeRanges addedRanges; + TimeRanges removedRanges; +}; + +[Exposed=(Window,DedicatedWorker)] +interface ManagedSourceBuffer : SourceBuffer { + attribute EventHandler onbufferedchange; +}; + +[Exposed=(Window,DedicatedWorker)] partial interface AudioTrack { readonly attribute SourceBuffer? sourceBuffer; }; diff --git a/tests/wpt/tests/interfaces/orientation-event.idl b/tests/wpt/tests/interfaces/orientation-event.idl index 965e833fd21..ffacfe576f2 100644 --- a/tests/wpt/tests/interfaces/orientation-event.idl +++ b/tests/wpt/tests/interfaces/orientation-event.idl @@ -15,7 +15,7 @@ interface DeviceOrientationEvent : Event { readonly attribute double? gamma; readonly attribute boolean absolute; - static Promise<PermissionState> requestPermission(); + static Promise<PermissionState> requestPermission(optional boolean absolute = false); }; dictionary DeviceOrientationEventInit : EventInit { diff --git a/tests/wpt/tests/interfaces/serial.idl b/tests/wpt/tests/interfaces/serial.idl index e624c3c1a60..37986b7ac2f 100644 --- a/tests/wpt/tests/interfaces/serial.idl +++ b/tests/wpt/tests/interfaces/serial.idl @@ -36,6 +36,7 @@ dictionary SerialPortFilter { interface SerialPort : EventTarget { attribute EventHandler onconnect; attribute EventHandler ondisconnect; + readonly attribute boolean connected; readonly attribute ReadableStream readable; readonly attribute WritableStream writable; diff --git a/tests/wpt/tests/interfaces/storage-buckets.idl b/tests/wpt/tests/interfaces/storage-buckets.idl index 79f6c947d16..581ba8e0bb3 100644 --- a/tests/wpt/tests/interfaces/storage-buckets.idl +++ b/tests/wpt/tests/interfaces/storage-buckets.idl @@ -20,8 +20,8 @@ interface StorageBucketManager { dictionary StorageBucketOptions { boolean persisted = false; - unsigned long long? quota; - DOMHighResTimeStamp? expires; + unsigned long long quota; + DOMHighResTimeStamp expires; }; [Exposed=(Window,Worker), diff --git a/tests/wpt/tests/interfaces/turtledove.idl b/tests/wpt/tests/interfaces/turtledove.idl index 4700a98038c..f5813b5d03d 100644 --- a/tests/wpt/tests/interfaces/turtledove.idl +++ b/tests/wpt/tests/interfaces/turtledove.idl @@ -69,6 +69,7 @@ dictionary AuctionAdConfig { USVString trustedScoringSignalsURL; sequence<USVString> interestGroupBuyers; Promise<any> auctionSignals; + record<DOMString, DOMString> requestedSize; Promise<any> sellerSignals; Promise<DOMString> directFromSellerSignalsHeaderAdSlot; unsigned long long sellerTimeout; @@ -150,6 +151,10 @@ partial dictionary RequestInit { boolean adAuctionHeaders; }; +partial interface HTMLIFrameElement { + [CEReactions] attribute boolean adAuctionHeaders; +}; + dictionary PreviousWin { required long long timeDelta; required DOMString adJSON; diff --git a/tests/wpt/tests/interfaces/uievents.idl b/tests/wpt/tests/interfaces/uievents.idl index fef90d48410..b34ca2e7753 100644 --- a/tests/wpt/tests/interfaces/uievents.idl +++ b/tests/wpt/tests/interfaces/uievents.idl @@ -101,7 +101,7 @@ dictionary WheelEventInit : MouseEventInit { [Exposed=Window] interface InputEvent : UIEvent { constructor(DOMString type, optional InputEventInit eventInitDict = {}); - readonly attribute DOMString? data; + readonly attribute USVString? data; readonly attribute boolean isComposing; readonly attribute DOMString inputType; }; @@ -147,7 +147,7 @@ dictionary KeyboardEventInit : EventModifierInit { [Exposed=Window] interface CompositionEvent : UIEvent { constructor(DOMString type, optional CompositionEventInit eventInitDict = {}); - readonly attribute DOMString data; + readonly attribute USVString data; }; dictionary CompositionEventInit : UIEventInit { diff --git a/tests/wpt/tests/interfaces/urlpattern.idl b/tests/wpt/tests/interfaces/urlpattern.idl index 788486bb627..ca9fb979d22 100644 --- a/tests/wpt/tests/interfaces/urlpattern.idl +++ b/tests/wpt/tests/interfaces/urlpattern.idl @@ -22,6 +22,8 @@ interface URLPattern { readonly attribute USVString pathname; readonly attribute USVString search; readonly attribute USVString hash; + + readonly attribute boolean hasRegExpGroups; }; dictionary URLPatternInit { @@ -57,3 +59,5 @@ dictionary URLPatternComponentResult { USVString input; record<USVString, (USVString or undefined)> groups; }; + +typedef (USVString or URLPatternInit or URLPattern) URLPatternCompatible; diff --git a/tests/wpt/tests/interfaces/wai-aria.idl b/tests/wpt/tests/interfaces/wai-aria.idl index 3434bf7c2d3..13e3b0f8b19 100644 --- a/tests/wpt/tests/interfaces/wai-aria.idl +++ b/tests/wpt/tests/interfaces/wai-aria.idl @@ -8,6 +8,8 @@ interface mixin ARIAMixin { [CEReactions] attribute Element? ariaActiveDescendantElement; [CEReactions] attribute DOMString? ariaAtomic; [CEReactions] attribute DOMString? ariaAutoComplete; + [CEReactions] attribute DOMString? ariaBrailleLabel; + [CEReactions] attribute DOMString? ariaBrailleRoleDescription; [CEReactions] attribute DOMString? ariaBusy; [CEReactions] attribute DOMString? ariaChecked; [CEReactions] attribute DOMString? ariaColCount; diff --git a/tests/wpt/tests/interfaces/webauthn.idl b/tests/wpt/tests/interfaces/webauthn.idl index e28355eb78d..e56d61314af 100644 --- a/tests/wpt/tests/interfaces/webauthn.idl +++ b/tests/wpt/tests/interfaces/webauthn.idl @@ -32,7 +32,7 @@ dictionary AuthenticatorAttestationResponseJSON { required Base64URLString authenticatorData; required sequence<DOMString> transports; // The publicKey field will be missing if pubKeyCredParams was used to - // negotiate a public-key algorithm that the user agent doesn’t + // negotiate a public-key algorithm that the user agent doesn't // understand. (See section “Easily accessing credential data” for a // list of which algorithms user agents must support.) If using such an // algorithm then the public key must be parsed directly from diff --git a/tests/wpt/tests/interfaces/webgl1.idl b/tests/wpt/tests/interfaces/webgl1.idl index b61f031ab28..4552610c0d5 100644 --- a/tests/wpt/tests/interfaces/webgl1.idl +++ b/tests/wpt/tests/interfaces/webgl1.idl @@ -467,6 +467,7 @@ interface mixin WebGLRenderingContextBase const GLenum RGBA4 = 0x8056; const GLenum RGB5_A1 = 0x8057; + const GLenum RGBA8 = 0x8058; const GLenum RGB565 = 0x8D62; const GLenum DEPTH_COMPONENT16 = 0x81A5; const GLenum STENCIL_INDEX8 = 0x8D48; @@ -516,6 +517,7 @@ interface mixin WebGLRenderingContextBase readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas; readonly attribute GLsizei drawingBufferWidth; readonly attribute GLsizei drawingBufferHeight; + readonly attribute GLenum drawingBufferFormat; attribute PredefinedColorSpace drawingBufferColorSpace; attribute PredefinedColorSpace unpackColorSpace; @@ -525,6 +527,8 @@ interface mixin WebGLRenderingContextBase sequence<DOMString>? getSupportedExtensions(); object? getExtension(DOMString name); + undefined drawingBufferStorage(GLenum sizedFormat, unsigned long width, unsigned long height); + undefined activeTexture(GLenum texture); undefined attachShader(WebGLProgram program, WebGLShader shader); undefined bindAttribLocation(WebGLProgram program, GLuint index, DOMString name); diff --git a/tests/wpt/tests/interfaces/webgl2.idl b/tests/wpt/tests/interfaces/webgl2.idl index 9cb639932e8..25c2b4dad28 100644 --- a/tests/wpt/tests/interfaces/webgl2.idl +++ b/tests/wpt/tests/interfaces/webgl2.idl @@ -42,7 +42,6 @@ interface mixin WebGL2RenderingContextBase const GLenum STENCIL = 0x1802; const GLenum RED = 0x1903; const GLenum RGB8 = 0x8051; - const GLenum RGBA8 = 0x8058; const GLenum RGB10_A2 = 0x8059; const GLenum TEXTURE_BINDING_3D = 0x806A; const GLenum UNPACK_SKIP_IMAGES = 0x806D; diff --git a/tests/wpt/tests/interfaces/webgpu.idl b/tests/wpt/tests/interfaces/webgpu.idl index 373d51dff13..15074009cf6 100644 --- a/tests/wpt/tests/interfaces/webgpu.idl +++ b/tests/wpt/tests/interfaces/webgpu.idl @@ -640,7 +640,7 @@ dictionary GPUProgrammableStage { record<USVString, GPUPipelineConstantValue> constants; }; -typedef double GPUPipelineConstantValue; // May represent WGSL’s bool, f32, i32, u32, and f16 if enabled. +typedef double GPUPipelineConstantValue; // May represent WGSL's bool, f32, i32, u32, and f16 if enabled. [Exposed=(Window, DedicatedWorker), SecureContext] interface GPUComputePipeline { diff --git a/tests/wpt/tests/interfaces/webidl.idl b/tests/wpt/tests/interfaces/webidl.idl index 4d0dfaa1062..dff46c557cb 100644 --- a/tests/wpt/tests/interfaces/webidl.idl +++ b/tests/wpt/tests/interfaces/webidl.idl @@ -12,7 +12,7 @@ typedef (ArrayBufferView or ArrayBuffer) BufferSource; typedef (ArrayBuffer or SharedArrayBuffer or [AllowShared] ArrayBufferView) AllowSharedBufferSource; [Exposed=*, Serializable] -interface DOMException { // but see below note about ECMAScript binding +interface DOMException { // but see below note about JavaScript binding constructor(optional DOMString message = "", optional DOMString name = "Error"); readonly attribute DOMString name; readonly attribute DOMString message; diff --git a/tests/wpt/tests/interfaces/webnn.idl b/tests/wpt/tests/interfaces/webnn.idl index 2a9d0e639fb..ef57f3bb913 100644 --- a/tests/wpt/tests/interfaces/webnn.idl +++ b/tests/wpt/tests/interfaces/webnn.idl @@ -37,35 +37,26 @@ interface ML { }; [SecureContext, Exposed=(Window, DedicatedWorker)] -interface MLGraph {}; - -enum MLInputOperandLayout { - "nchw", - "nhwc" +interface MLActivation { }; -enum MLOperandDataType { - "float32", - "float16", - "int32", - "uint32", - "int8", - "uint8" -}; +typedef (GPUBuffer or GPUTexture) MLGPUResource; -dictionary MLOperandDescriptor { - // The operand data type. - required MLOperandDataType dataType; +typedef record<DOMString, MLGPUResource> MLNamedGPUResources; - // The dimensions field is only required for tensor operands. - sequence<unsigned long> dimensions; +[SecureContext, Exposed=(Window, DedicatedWorker)] +interface MLCommandEncoder {}; + +partial interface MLCommandEncoder { + undefined initializeGraph(MLGraph graph); }; -[SecureContext, Exposed=(Window, DedicatedWorker)] -interface MLOperand {}; +partial interface MLCommandEncoder { + undefined dispatch(MLGraph graph, MLNamedGPUResources inputs, MLNamedGPUResources outputs); +}; -[SecureContext, Exposed=(Window, DedicatedWorker)] -interface MLActivation { +partial interface MLCommandEncoder { + GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {}); }; typedef record<DOMString, ArrayBufferView> MLNamedArrayBufferViews; @@ -93,24 +84,8 @@ partial interface MLContext { MLCommandEncoder createCommandEncoder(); }; -typedef (GPUBuffer or GPUTexture) MLGPUResource; - -typedef record<DOMString, MLGPUResource> MLNamedGPUResources; - [SecureContext, Exposed=(Window, DedicatedWorker)] -interface MLCommandEncoder {}; - -partial interface MLCommandEncoder { - undefined initializeGraph(MLGraph graph); -}; - -partial interface MLCommandEncoder { - undefined dispatch(MLGraph graph, MLNamedGPUResources inputs, MLNamedGPUResources outputs); -}; - -partial interface MLCommandEncoder { - GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {}); -}; +interface MLGraph {}; typedef record<DOMString, MLOperand> MLNamedOperands; @@ -134,7 +109,7 @@ interface MLGraphBuilder { MLOperand constant(MLOperandDescriptor descriptor, MLBufferView bufferView); // Create a single-value operand from the specified number of the specified type. - MLOperand constant(double value, optional MLOperandDataType dataType = "float32"); + MLOperand constant(double value, optional MLOperandDataType type = "float32"); // Compile the graph up to the specified output operands asynchronously. Promise<MLGraph> build(MLNamedOperands outputs); @@ -144,6 +119,17 @@ interface MLGraphBuilder { MLGraph buildSync(MLNamedOperands outputs); }; +dictionary MLArgMinMaxOptions { + sequence<unsigned long> axes = null; + boolean keepDimensions = false; + boolean selectLastIndex = false; +}; + +partial interface MLGraphBuilder { + MLOperand argMin(MLOperand input, optional MLArgMinMaxOptions options = {}); + MLOperand argMax(MLOperand input, optional MLArgMinMaxOptions options = {}); +}; + dictionary MLBatchNormalizationOptions { MLOperand scale; MLOperand bias; @@ -157,13 +143,17 @@ partial interface MLGraphBuilder { optional MLBatchNormalizationOptions options = {}); }; +partial interface MLGraphBuilder { + MLOperand cast(MLOperand input, MLOperandDataType type); +}; + dictionary MLClampOptions { float minValue; float maxValue; }; partial interface MLGraphBuilder { - MLOperand clamp(MLOperand operand, optional MLClampOptions options = {}); + MLOperand clamp(MLOperand input, optional MLClampOptions options = {}); MLActivation clamp(optional MLClampOptions options = {}); }; @@ -236,14 +226,27 @@ partial interface MLGraphBuilder { }; partial interface MLGraphBuilder { + MLOperand equal(MLOperand a, MLOperand b); + MLOperand greater(MLOperand a, MLOperand b); + MLOperand greaterOrEqual(MLOperand a, MLOperand b); + MLOperand lesser(MLOperand a, MLOperand b); + MLOperand lesserOrEqual(MLOperand a, MLOperand b); + MLOperand not(MLOperand a); +}; + +partial interface MLGraphBuilder { MLOperand abs(MLOperand input); MLOperand ceil(MLOperand input); MLOperand cos(MLOperand input); + MLOperand erf(MLOperand input); MLOperand exp(MLOperand input); MLOperand floor(MLOperand input); + MLOperand identity(MLOperand input); MLOperand log(MLOperand input); MLOperand neg(MLOperand input); + MLOperand reciprocal(MLOperand input); MLOperand sin(MLOperand input); + MLOperand sqrt(MLOperand input); MLOperand tan(MLOperand input); }; @@ -256,6 +259,18 @@ partial interface MLGraphBuilder { MLActivation elu(optional MLEluOptions options = {}); }; +partial interface MLGraphBuilder { + MLOperand expand(MLOperand input, sequence<unsigned long> newShape); +}; + +dictionary MLGatherOptions { + unsigned long axis = 0; +}; + +partial interface MLGraphBuilder { + MLOperand gather(MLOperand input, MLOperand indices, optional MLGatherOptions options = {}); +}; + dictionary MLGemmOptions { MLOperand c; float alpha = 1.0; @@ -337,6 +352,17 @@ partial interface MLGraphBuilder { optional MLInstanceNormalizationOptions options = {}); }; +dictionary MLLayerNormalizationOptions { + MLOperand scale; + MLOperand bias; + sequence<unsigned long> axes; + float epsilon = 1e-5; +}; + +partial interface MLGraphBuilder { + MLOperand layerNormalization(MLOperand input, optional MLLayerNormalizationOptions options = {}); +}; + dictionary MLLeakyReluOptions { float alpha = 0.01; }; @@ -523,14 +549,6 @@ partial interface MLGraphBuilder { optional MLSplitOptions options = {}); }; -dictionary MLSqueezeOptions { - sequence<unsigned long> axes; -}; - -partial interface MLGraphBuilder { - MLOperand squeeze(MLOperand input, optional MLSqueezeOptions options = {}); -}; - partial interface MLGraphBuilder { MLOperand tanh(MLOperand input); MLActivation tanh(); @@ -543,3 +561,51 @@ dictionary MLTransposeOptions { partial interface MLGraphBuilder { MLOperand transpose(MLOperand input, optional MLTransposeOptions options = {}); }; + +dictionary MLTriangularOptions { + boolean upper = true; + long diagonal = 0; +}; + +partial interface MLGraphBuilder { + MLOperand triangular(MLOperand input, optional MLTriangularOptions options = {}); +}; + +partial interface MLGraphBuilder { + MLOperand where(MLOperand condition, MLOperand input, MLOperand other); +}; + +[SecureContext, Exposed=(Window, DedicatedWorker)] +interface MLOperand {}; + +partial interface MLOperand { + MLOperandDataType dataType(); +}; + +partial interface MLOperand { + sequence<unsigned long> shape(); +}; + +enum MLInputOperandLayout { + "nchw", + "nhwc" +}; + +enum MLOperandDataType { + "float32", + "float16", + "int32", + "uint32", + "int64", + "uint64", + "int8", + "uint8" +}; + +dictionary MLOperandDescriptor { + // The operand type. + required MLOperandDataType dataType; + + // The dimensions field is only required for tensor operands. + sequence<unsigned long> dimensions; +}; diff --git a/tests/wpt/tests/interfaces/webrtc-encoded-transform.idl b/tests/wpt/tests/interfaces/webrtc-encoded-transform.idl index 3b169b066dc..8a756702c7e 100644 --- a/tests/wpt/tests/interfaces/webrtc-encoded-transform.idl +++ b/tests/wpt/tests/interfaces/webrtc-encoded-transform.idl @@ -112,12 +112,16 @@ partial interface DedicatedWorkerGlobalScope { }; [Exposed=DedicatedWorker] -interface RTCRtpScriptTransformer { +interface RTCRtpScriptTransformer : EventTarget { + // Attributes and methods related to the transformer source readonly attribute ReadableStream readable; - readonly attribute WritableStream writable; - readonly attribute any options; Promise<unsigned long long> generateKeyFrame(optional DOMString rid); Promise<undefined> sendKeyFrameRequest(); + // Attributes and methods related to the transformer sink + readonly attribute WritableStream writable; + attribute EventHandler onkeyframerequest; + // Attributes for configuring the Javascript code + readonly attribute any options; }; [Exposed=Window] @@ -125,6 +129,12 @@ interface RTCRtpScriptTransform { constructor(Worker worker, optional any options, optional sequence<object> transfer); }; +[Exposed=DedicatedWorker] +interface KeyFrameRequestEvent : Event { + constructor(DOMString type, optional DOMString rid); + readonly attribute DOMString? rid; +}; + partial interface RTCRtpSender { Promise<undefined> generateKeyFrame(optional sequence <DOMString> rids); }; diff --git a/tests/wpt/tests/interfaces/webrtc-stats.idl b/tests/wpt/tests/interfaces/webrtc-stats.idl index 8e65578b6ee..0b2e956a207 100644 --- a/tests/wpt/tests/interfaces/webrtc-stats.idl +++ b/tests/wpt/tests/interfaces/webrtc-stats.idl @@ -171,10 +171,6 @@ dictionary RTCAudioSourceStats : RTCMediaSourceStats { double totalSamplesDuration; double echoReturnLoss; double echoReturnLossEnhancement; - double droppedSamplesDuration; - unsigned long droppedSamplesEvents; - double totalCaptureDelay; - unsigned long long totalSamplesCaptured; }; dictionary RTCVideoSourceStats : RTCMediaSourceStats { diff --git a/tests/wpt/tests/interfaces/webtransport.idl b/tests/wpt/tests/interfaces/webtransport.idl index 86178a4906b..281c096d21d 100644 --- a/tests/wpt/tests/interfaces/webtransport.idl +++ b/tests/wpt/tests/interfaces/webtransport.idl @@ -39,6 +39,8 @@ interface WebTransport { /* a ReadableStream of WebTransportReceiveStream objects */ readonly attribute ReadableStream incomingUnidirectionalStreams; WebTransportSendGroup createSendGroup(); + + static readonly attribute boolean supportsReliableOnly; }; enum WebTransportReliabilityMode { diff --git a/tests/wpt/tests/intersection-observer/visibility-hidden.html b/tests/wpt/tests/intersection-observer/visibility-hidden.html new file mode 100644 index 00000000000..588a42e6ab8 --- /dev/null +++ b/tests/wpt/tests/intersection-observer/visibility-hidden.html @@ -0,0 +1,59 @@ +<!DOCTYPE html> +<meta name="viewport" content="width=device-width,initial-scale=1"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="./resources/intersection-observer-test-utils.js"></script> + +<style> +body { + margin: 0; +} +pre, #log { + position: absolute; + top: 0; + left: 200px; +} +.spacer { + height: calc(100vh + 100px); +} +#target { + width: 100px; + height: 100px; + visibility: hidden; +} +</style> + +<div class="spacer"></div> +<div id="target"></div> +<div class="spacer"></div> + +<script> +var vw = document.documentElement.clientWidth; +var vh = document.documentElement.clientHeight; +var entries = []; + +runTestCycle(function() { + target = document.getElementById("target"); + assert_true(!!target, "target exists"); + var observer = new IntersectionObserver(function(changes) { + entries = entries.concat(changes) + }); + observer.observe(target); + entries = entries.concat(observer.takeRecords()); + assert_equals(entries.length, 0, "No initial notifications."); + runTestCycle(step0, "First rAF."); +}, "IntersectionObserver observing a visibility:hidden element."); + +function step0() { + document.scrollingElement.scrollTop = 300; + runTestCycle(step1, "document.scrollingElement.scrollTop = 300"); + // The numbers in brackets are target client rect; intersection rect; + // and root bounds. + checkLastEntry(entries, 0, [0, 100, vh + 100, vh + 200, 0, 0, 0, 0, 0, vw, 0, vh, false]); +} + +function step1() { + document.scrollingElement.scrollTop = 0; + checkLastEntry(entries, 1, [0, 100, vh - 200, vh - 100, 0, 100, vh - 200, vh - 100, 0, vw, 0, vh, true]); +} +</script> diff --git a/tests/wpt/tests/largest-contentful-paint/resized-image-not-reconsidered.html b/tests/wpt/tests/largest-contentful-paint/resized-image-not-reconsidered.html new file mode 100644 index 00000000000..6e195b89f9e --- /dev/null +++ b/tests/wpt/tests/largest-contentful-paint/resized-image-not-reconsidered.html @@ -0,0 +1,45 @@ +<!DOCTYPE HTML> +<meta charset=utf-8> +<title>Resized Image Is Not Reconsidered as LCP.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> + <img src='/images/lcp-256x256.png' id='image_id' height="100" width="50" /> + <script> + let image_id = 'image_id'; + + // Create a promise that resolves when an LCP is observed. + const lcp_observation_promise = image_src => { + return new Promise(resolve => { + new PerformanceObserver((entryList) => { + let lcpEntries = entryList.getEntries().filter(e => e.id == image_id); + + if (lcpEntries) { + resolve(lcpEntries); + } + }).observe({ type: 'largest-contentful-paint', buffered: true }); + }); + } + + promise_test(async t => { + const lcpEntriesInitial = await lcp_observation_promise(); + assert_equals(lcpEntriesInitial.length, 1); + + // Resize image. + document.getElementById('image_id').height = 150; + + // Wait for a repaint. + const lcpEntriesAfterImageResizing = + await new Promise(resolve => { + t.step_timeout(window.requestAnimationFrame(async () => { + resolve(await lcp_observation_promise()); + }), 100); + }); + + // No additional LCP entry is emitted after the image is resized to be larger. + assert_equals(lcpEntriesAfterImageResizing.length, 1); + assert_true(lcpEntriesInitial[0] === lcpEntriesAfterImageResizing[0]); + }, "Resized image should not be reconsidered as LCP"); + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-event-blocking-duration.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-event-blocking-duration.html index daa5f64c39e..ed31244a1d6 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-event-blocking-duration.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-event-blocking-duration.html @@ -22,7 +22,7 @@ promise_test(async t => { document.body.append(button); t.add_cleanup(() => button.remove()); await test_driver.click(button); - }, (script) => script.name === "BUTTON.onclick", t); + }, (script) => script.invoker === "BUTTON.onclick", t); assert_greater_than(entry.duration, 50); assert_greater_than_equal(entry.blockingDuration, 300); }, "LoAF generated by events should generate correct blockingDuration"); diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-first-ui-event.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-first-ui-event.html index 807c9cfe017..7e320101890 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-first-ui-event.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-first-ui-event.html @@ -25,7 +25,7 @@ promise_test(async t => { })); const entryPromise = expect_long_frame_with_script(() => { test_driver.click(button); - }, s => s.name === "BUTTON.onclick", t); + }, s => s.invoker === "BUTTON.onclick", t); await new Promise(resolve => t.step_timeout(resolve, 0)); const event = await eventPromise; const [entry] = await entryPromise; @@ -52,7 +52,7 @@ promise_test(async t => { await actions.send(); await eventPromise; }, (script, entry) => - script.name === "BUTTON.onpointermove" && + script.invoker === "BUTTON.onpointermove" && entry.firstUIEventTimestamp === expectedTimestamp, t); }, "LoAF should expose firstUIEventTimestamp for pointermove events"); @@ -73,7 +73,7 @@ promise_test(async t => { const entryPromise = expect_long_frame_with_script(() => { test_driver.click(button); test_driver.click(button); - }, s => s.name === "BUTTON.onclick", t); + }, s => s.invoker === "BUTTON.onclick", t); const [event, [entry]] = await Promise.all([eventPromise, entryPromise]); assert_equals(entry.firstUIEventTimestamp, firstUIEventTimestamp); }, "firstUIEventTimestamp doesn't have to come from a long script"); diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-pause-duration.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-pause-duration.html index 6894164fbfd..a4181239d47 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-pause-duration.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-pause-duration.html @@ -19,7 +19,7 @@ promise_test(async t => { sync_xhr.open("GET", `/xhr/resources/delay.py?ms=${pause_duration}`, /*async=*/false); sync_xhr.send(); }, 0), script => ( - script.name === "TimerHandler:setTimeout" && + script.invoker === "TimerHandler:setTimeout" && script.duration >= very_long_frame_duration), t); assert_true("pauseDuration" in script); assert_greater_than(script.pauseDuration, pause_duration); diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-script-block.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-script-block.html index 1bfad63c82e..759b31f9a1a 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-script-block.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-script-block.html @@ -15,7 +15,7 @@ promise_test(async t => { await new Promise(resolve => { new PerformanceObserver((list, observer) => { if (list.getEntries().find(loaf => loaf.scripts.some(script => - script.name === new URL("resources/busy.js?from-parser", location.href).href))) { + script.invoker === new URL("resources/busy.js?from-parser", location.href).href))) { observer.disconnect(); resolve(); } diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-script-nested-callback.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-script-nested-callback.html index c1eb4adc89c..8d1304fc802 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-script-nested-callback.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-script-nested-callback.html @@ -20,7 +20,7 @@ promise_test(async t => { t.add_cleanup(() => script_element.remove()); document.body.appendChild(script_element); }, script => - script.name === new URL("resources/loaf-after-callback.js", location.href).href, + script.invoker === new URL("resources/loaf-after-callback.js", location.href).href, t); assert_greater_than_equal(script.duration, very_long_frame_duration); }, "a callback inside a script block should not mask LoAFs that come afterwards") @@ -33,7 +33,7 @@ promise_test(async t => { t.add_cleanup(() => script_element.remove()); document.body.appendChild(script_element); }, script => - script.name === new URL("resources/loaf-in-microtask-after-callback.js", location.href).href, + script.invoker === new URL("resources/loaf-in-microtask-after-callback.js", location.href).href, t); assert_greater_than_equal(script.duration, very_long_frame_duration); }, "a callback inside a script block should not mask LoAFs in a microtask") diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-script-window-attribution.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-script-window-attribution.html index 9602cdadd4b..0b8f45bed02 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-script-window-attribution.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-script-window-attribution.html @@ -51,7 +51,7 @@ promise_test(async t => { const [entry, script] = await expect_long_frame_with_script( () => requestAnimationFrame(busy_wait), () => true, t); const in_iframe = iframe.contentWindow.performance.getEntriesByType("long-animation-frame").some( - e => e.scripts.some(script_in_iframe => script_in_iframe.name === script.name) + e => e.scripts.some(script_in_iframe => script_in_iframe.invoker === script.invoker) ); assert_false(in_iframe, "IFrame should not receive the LoAF entry"); diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location.html index 41979105e58..cdd4bb4bbc9 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-source-location.html @@ -18,7 +18,7 @@ promise_test(async t => { requestAnimationFrame(function non_bound_function() { busy_wait(); }); - }, script => script.name === "FrameRequestCallback", t); + }, script => script.invoker === "FrameRequestCallback", t); assert_true(script.sourceLocation?.startsWith("non_bound_function")); assert_regexp_match(script.sourceLocation, source_location_regex); }, "Source location should be extracted from non-bound functions"); @@ -29,7 +29,7 @@ promise_test(async t => { requestAnimationFrame((function my_bound_function() { busy_wait(); }).bind(object)); - }, script => script.name === "FrameRequestCallback", t); + }, script => script.invoker === "FrameRequestCallback", t); assert_true(script.sourceLocation?.startsWith("my_bound_function")); assert_regexp_match(script.sourceLocation, source_location_regex); }, "Source location should be extracted from bound functions"); @@ -39,7 +39,7 @@ promise_test(async t => { t.step_timeout(function my_timeout() { busy_wait(); }); - }, script => script.name === "TimerHandler:setTimeout" && script.sourceLocation, t ); + }, script => script.invoker === "TimerHandler:setTimeout" && script.sourceLocation, t ); assert_true(script.sourceLocation.includes("testharness.js")); assert_regexp_match(script.sourceLocation, source_location_regex); }, "Source location should be extracted for setTimeout"); @@ -50,7 +50,7 @@ promise_test(async t => { const scriptElement = document.createElement("script"); scriptElement.src = scriptLocation; document.body.appendChild(scriptElement); - }, script => script.name === "Window.fetch.then", t); + }, script => script.invoker === "Window.fetch.then", t); assert_true(script.sourceLocation?.includes("promise-generates-loaf.js")); }, "Source location should be extracted for promises"); diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-stream-source-location.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-stream-source-location.html index 3b6b2b31608..79fb418f829 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-stream-source-location.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-stream-source-location.html @@ -19,7 +19,7 @@ promise_test(async t => { const scriptElement = document.createElement("script"); scriptElement.src = scriptLocation; document.body.appendChild(scriptElement); - }, script => script.name === "StreamPromise.resolve.then", t); + }, script => script.invoker === "StreamPromise.resolve.then", t); assert_true(script.sourceLocation?.includes("stream-promise-generates-loaf.js")); }, "Source location should be extracted for stream promises"); diff --git a/tests/wpt/tests/long-animation-frame/tentative/loaf-ui-event-render-start.html b/tests/wpt/tests/long-animation-frame/tentative/loaf-ui-event-render-start.html index f8bcf340a42..01d50d47e98 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/loaf-ui-event-render-start.html +++ b/tests/wpt/tests/long-animation-frame/tentative/loaf-ui-event-render-start.html @@ -29,7 +29,7 @@ promise_test(async t => { .pointerUp() .send(); - const scriptPredicate = s => s.name === "BODY.onpointermove"; + const scriptPredicate = s => s.invoker === "BODY.onpointermove"; const loaf = await new Promise(resolve => new PerformanceObserver(entries => { diff --git a/tests/wpt/tests/long-animation-frame/tentative/resources/utils.js b/tests/wpt/tests/long-animation-frame/tentative/resources/utils.js index 574af6d6b8c..aa537d39a78 100644 --- a/tests/wpt/tests/long-animation-frame/tentative/resources/utils.js +++ b/tests/wpt/tests/long-animation-frame/tentative/resources/utils.js @@ -93,13 +93,13 @@ async function prepare_exec_popup(t, origin) { t.add_cleanup(() => popup.close()); return [new RemoteContext(uuid), popup]; } -function test_loaf_script(cb, name, type, label) { +function test_loaf_script(cb, invoker, invokerType, label) { promise_test(async t => { let [entry, script] = []; [entry, script] = await expect_long_frame_with_script(cb, script => ( - script.type === type && - script.name.startsWith(name) && + script.invokerType === invokerType && + script.invoker.startsWith(invoker) && script.duration >= very_long_frame_duration), t); assert_true(!!entry, "Entry detected"); @@ -110,22 +110,22 @@ function test_loaf_script(cb, name, type, label) { assert_equals(script.window, window); assert_equals(script.forcedStyleAndLayoutDuration, 0); assert_equals(script.windowAttribution, "self"); -}, `LoAF script: ${name} ${type},${label ? ` ${label}` : ''}`); +}, `LoAF script: ${invoker} ${invokerType},${label ? ` ${label}` : ''}`); } -function test_self_user_callback(cb, name, label) { - test_loaf_script(cb, name, "user-callback", label); +function test_self_user_callback(cb, invoker, label) { + test_loaf_script(cb, invoker, "user-callback", label); } -function test_self_event_listener(cb, name) { - test_loaf_script(cb, name, "event-listener"); +function test_self_event_listener(cb, invoker) { + test_loaf_script(cb, invoker, "event-listener"); } -function test_promise_script(cb, resolve_or_reject, name, label) { - test_loaf_script(cb, name, `${resolve_or_reject}-promise`, label); +function test_promise_script(cb, resolve_or_reject, invoker, label) { + test_loaf_script(cb, invoker, `${resolve_or_reject}-promise`, label); } -function test_self_script_block(cb, name, type) { - test_loaf_script(cb, name, type); +function test_self_script_block(cb, invoker, type) { + test_loaf_script(cb, invoker, type); } diff --git a/tests/wpt/tests/mediacapture-insertable-streams/idlharness.any.js b/tests/wpt/tests/mediacapture-insertable-streams/idlharness.any.js new file mode 100644 index 00000000000..d7975ab90fa --- /dev/null +++ b/tests/wpt/tests/mediacapture-insertable-streams/idlharness.any.js @@ -0,0 +1,13 @@ +// META: global=dedicatedworker +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +idl_test( + ['mediacapture-transform'], + ['dom', 'html'], + idl_array => { + idl_array.add_objects({ + VideoTrackGenerator: ['new VideoTrackGenerator()'], + }); + } +); diff --git a/tests/wpt/tests/mediacapture-streams/GUM-non-applicable-constraint.https.html b/tests/wpt/tests/mediacapture-streams/GUM-non-applicable-constraint.https.html index 3e9481bfa44..e9fd6665dcf 100644 --- a/tests/wpt/tests/mediacapture-streams/GUM-non-applicable-constraint.https.html +++ b/tests/wpt/tests/mediacapture-streams/GUM-non-applicable-constraint.https.html @@ -37,6 +37,7 @@ let audio_only_valid_constraints = { echoCancellation: {ideal: true}, autoGainControl: {ideal: true}, noiseSuppression: {ideal: true}, + voiceIsolation: {ideal: true}, latency: {min: 0}, channelCount: {min: 0} } @@ -48,6 +49,7 @@ let audio_only_invalid_constraints = { echoCancellation: {exact: true}, autoGainControl: {exact: true}, noiseSuppression: {exact: true}, + voiceIsolation: {exact: true}, latency: {max: 0}, channelCount: {max: 0} } diff --git a/tests/wpt/tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html b/tests/wpt/tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html index 453184a1691..7d374b5336e 100644 --- a/tests/wpt/tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html +++ b/tests/wpt/tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html @@ -32,6 +32,7 @@ test(() => { "echoCancellation", "autoGainControl", "noiseSuppression", + "voiceIsolation", "latency", "channelCount", "deviceId", diff --git a/tests/wpt/tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html b/tests/wpt/tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html index b67a8d51561..7d600c0e1b9 100644 --- a/tests/wpt/tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html +++ b/tests/wpt/tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html @@ -13,6 +13,7 @@ const audioProperties = [ {name: "echoCancellation", type: "boolean"}, {name: "autoGainControl", type: "boolean"}, {name: "noiseSuppression", type: "boolean"}, + {name: "voiceIsolation", type: "boolean"}, {name: "latency", type: "number"}, {name: "channelCount", type: "number"}, {name: "deviceId", type: "string"}, diff --git a/tests/wpt/tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html b/tests/wpt/tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html index 1bda4c748ac..3bae50c346d 100644 --- a/tests/wpt/tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html +++ b/tests/wpt/tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html @@ -135,6 +135,12 @@ promise_test(async t => { const settings = await createTrackAndGetSettings(t, "audio"); + assert_equals(typeof(settings.voiceIsolation), "boolean", + "voiceIsolation should exist and it should be a boolean."); + }, 'voiceIsolation is reported by getSettings() for getUserMedia() audio tracks'); + + promise_test(async t => { + const settings = await createTrackAndGetSettings(t, "audio"); assert_equals(typeof(settings.latency), "number", "latency should exist and it should be a number."); assert_greater_than_equal(settings.latency,0); diff --git a/tests/wpt/tests/png/exif-chunk.html b/tests/wpt/tests/png/exif-chunk.html new file mode 100644 index 00000000000..1cb0e2755e2 --- /dev/null +++ b/tests/wpt/tests/png/exif-chunk.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<title>PNG test: eXIf chunk</title> +<link rel="help" href="https://w3c.github.io/PNG-spec/#eXIf"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/html/canvas/resources/canvas-tests.js"></script> +<body> + +<h1>eXIf chunk</h1> +<p class="desc">test pixel values of a rotated PNG</p> + +<p class="output">Actual output:</p> +<canvas id="c" class="output" width="200" height="200"><p class="fallback">FAIL (fallback content)</p></canvas> + +<ul id="d"></ul> +<script> +var t = async_test("test pixel values of a rotated PNG"); +const img = new Image(); +img.onload = () => { + _addTest(function(canvas, ctx) { + ctx.drawImage(img, 0, 0); + + var pixel = ctx.getImageData(5, 5, 1, 1).data; + + // The image data stores a 100x100 red block above a 100x100 green block. + // By rotating the image, we can put the green block on top. + const pixel_expected = [0, 255, 0, 255]; + const epsilon = 2; + + _assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length"); + assert_approx_equals(pixel[0], pixel_expected[0], epsilon); + assert_approx_equals(pixel[1], pixel_expected[1], epsilon); + assert_approx_equals(pixel[2], pixel_expected[2], epsilon); + assert_approx_equals(pixel[3], pixel_expected[3], epsilon); + }); +}; +img.src = "support/exif-orientation-bottom-right.png"; +</script> diff --git a/tests/wpt/tests/png/support/exif-orientation-bottom-right.png b/tests/wpt/tests/png/support/exif-orientation-bottom-right.png Binary files differnew file mode 100644 index 00000000000..261d5f4c120 --- /dev/null +++ b/tests/wpt/tests/png/support/exif-orientation-bottom-right.png diff --git a/tests/wpt/tests/pointerevents/pointerevent_attributes_nohover_pointers.html b/tests/wpt/tests/pointerevents/pointerevent_attributes_nohover_pointers.html index d501ae0afd4..3441417c46a 100644 --- a/tests/wpt/tests/pointerevents/pointerevent_attributes_nohover_pointers.html +++ b/tests/wpt/tests/pointerevents/pointerevent_attributes_nohover_pointers.html @@ -1,134 +1,200 @@ <!doctype html> <html> - <head> - <title>Pointer Events properties tests</title> - <meta name="viewport" content="width=device-width"> - <link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="/resources/testdriver.js"></script> - <script src="/resources/testdriver-actions.js"></script> - <script src="/resources/testdriver-vendor.js"></script> - <!-- Additional helper script for common checks across event types --> - <script type="text/javascript" src="pointerevent_support.js"></script> - <script> - var detected_pointertypes = {}; - var detected_eventTypes = {}; - var eventList = ['pointerover', 'pointerenter', 'pointerdown', 'pointerup', 'pointerout', 'pointerleave']; - // TODO(mustaq@chromium.org): missing touch pointermove coverage! - var expectedPointerId = NaN; - - function resetTestState() { - detected_eventTypes = {}; - document.getElementById("square1").style.visibility = 'visible'; - document.getElementById('innerFrame').contentDocument.getElementById("square2").style.visibility = 'hidden'; - } - function checkPointerEventAttributes(event, targetBoundingClientRect, testNamePrefix) { - if (detected_eventTypes[event.type]) - return; - var expectedEventType = eventList[Object.keys(detected_eventTypes).length]; - detected_eventTypes[event.type] = true; - var pointerTestName = (testNamePrefix ? testNamePrefix + ' ' : '') - + expectedPointerType + ' ' + expectedEventType; - - detected_pointertypes[event.pointerType] = true; - - test(function() { - assert_equals(event.type, expectedEventType); - }, pointerTestName + ".type should be " + expectedEventType); - - // Test button and buttons - test(function() { - assert_equals(event.button, 0); - }, pointerTestName + ".button attribute is 0 on touch-down."); - - if (event.type == 'pointerdown' || event.type == 'pointerover' || event.type == 'pointerenter') { - test(function() { - assert_equals(event.buttons, 1); - }, pointerTestName + ".buttons attribute is 1 on touch-down."); - } else { - test(function() { - assert_equals(event.buttons, 0); - }, pointerTestName + ".buttons is 0 on touch-release."); - } - - // Test clientX and clientY - test(function () { - assert_true(event.clientX >= targetBoundingClientRect.left && event.clientX < targetBoundingClientRect.right && event.clientY >= targetBoundingClientRect.top && event.clientY < targetBoundingClientRect.bottom); - }, pointerTestName + ".clientX and .clientY attributes are correct."); - - check_PointerEvent(event, testNamePrefix); - - // Test isPrimary - test(function () { - assert_equals(event.isPrimary, true); - }, pointerTestName + ".isPrimary attribute is true."); - - // Test pointerId value - if (isNaN(expectedPointerId)) { - expectedPointerId = event.pointerId; - } else { - test(function () { - assert_equals(event.pointerId, expectedPointerId); - }, pointerTestName + ".pointerId should be the same as previous pointer events for this active pointer."); - } - } - - async function run() { - var test_pointerEvent = setup_pointerevent_test("pointerevent attributes", ['touch']); - var square1 = document.getElementById("square1"); - var rectSquare1 = square1.getBoundingClientRect(); - var innerFrame = document.getElementById('innerFrame'); - var square2 = innerFrame.contentDocument.getElementById('square2'); - var rectSquare2 = square2.getBoundingClientRect(); - - eventList.forEach(function(eventName) { - on_event(square1, eventName, function (event) { - if (square1.style.visibility == 'hidden') - return; - checkPointerEventAttributes(event, rectSquare1, ""); - if (Object.keys(detected_eventTypes).length == eventList.length) { - square1.style.visibility = 'hidden'; - detected_eventTypes = {}; - square2.style.visibility = 'visible'; - expectedPointerId = NaN; - } - }); - on_event(square2, eventName, function (event) { - checkPointerEventAttributes(event, rectSquare2, "Inner frame "); - if (Object.keys(detected_eventTypes).length == eventList.length) { - square2.style.visibility = 'hidden'; - test_pointerEvent.done(); - } - }); - }); - - // Inject touch inputs. - await clickInTarget("touch", square1); - await clickInTarget("touch", square2); - } - </script> - </head> - <body onload="run()"> - <h1>Pointer Events no-hover pointer attributes test</h1> - <h2 id="pointerTypeDescription"></h2> - <h4> - Test Description: This test checks the properties of pointer events that do not support hover. - <ol> - <li>Tap the black square.</li> - <li>Then move it off the black square so that it disappears.</li> - <li>When the red square appears tap on that as well.</li> - </ol> - - Test passes if the proper behavior of the events is observed. - </h4> - <div id="square1" class="square"></div> - <iframe id="innerFrame" src="resources/pointerevent_attributes_hoverable_pointers-iframe.html"></iframe> - <div class="spacer"></div> - <div id="complete-notice"> - <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p> - <p>Refresh the page to run the tests again with a different pointer type.</p> - </div> - <div id="log"></div> - </body> +<head> + <title>Pointer Events properties tests</title> + <meta name="viewport" content="width=device-width"> + <link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> + <style> + html { + touch-action: none; + } + + div { + padding: 0; + } + + #square1 { + background-color: green; + border: 1px solid black; + height: 50px; + width: 50px; + margin-bottom: 3px; + display: inline-block; + } + + #innerFrame { + position: relative; + margin-bottom: 3px; + margin-left: 0; + top: 0; + left: 0; + } + </style> +</head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<!-- Additional helper script for common checks across event types --> +<script type="text/javascript" src="pointerevent_support.js"></script> +<script> + + window.onload = async () => { + const event_list = [ + 'pointerover', + 'pointerenter', + 'pointerdown', + 'pointerup', + 'pointerout', + 'pointerleave', + 'pointermove' + ]; + + function checkPointerEventAttributes(testPrefix, event, expectations) { + const pointerTestName = + `${testPrefix} touch.${expectations.type}`; + + test(function() { + assert_equals(event.type, expectations.type); + }, `${pointerTestName}.type should be ${expectations.type}`); + + test(function() { + assert_equals(event.button, expectations.button); + }, `${pointerTestName}.button should be ${expectations.button}`); + + test(function() { + assert_equals(event.buttons, expectations.buttons); + }, `${pointerTestName}.buttons should be ${expectations.buttons}`); + + // Bounding rect of the event target must contain (clienX, clientY). + const boundingRect = event.target.getBoundingClientRect(); + test(function() { + assert_true( + boundingRect.left <= event.clientX && + boundingRect.right >= event.clientX); + }, `${pointerTestName}.clientX is within the expected range`); + test(function() { + assert_true( + boundingRect.top <= event.clientY && + boundingRect.bottom >= event.clientY); + }, `${pointerTestName}.clientY is within the expected range`); + + check_PointerEvent(event, testPrefix); + + // Test isPrimary + test(function () { + assert_equals(event.isPrimary, true); + }, `${pointerTestName}: isPrimary attribute is true.`); + } + + function injectScrub(element) { + return new test_driver.Actions() + .addPointer('pointer1', 'touch') + .pointerMove(0, -20, {origin: element}) + .pointerDown() + .addTick() + .addTick() + .pointerMove(0, 20, {origin: element}) + .addTick() + .addTick() + .pointerUp() + .send(); + } + + async function tapDone() { + const done_button = document.getElementById('done'); + const pointerupPromise = getEvent('pointerup', done_button); + const actionPromise = new test_driver.Actions() + .addPointer('pointer1', 'touch') + .pointerMove(0, 0, {origin: done_button}) + .pointerDown() + .addTick() + .addTick() + .pointerUp() + .send(); + return actionPromise.then(pointerupPromise); + } + + const test_fixture = async_test("All events handled"); + const listeners = {}; + const attachListener = (testPrefix, target, type, expectations, + elements) => { + expectations.type = type; + const pointer_ids = {}; + const key = `${testPrefix} ${type}`; + const listener = (event) => { + if (pointer_ids[testPrefix] == undefined) { + pointer_ids[testPrefix] == event.pointerId; + } else { + test(() => { + assert_equals(event.pointerId, pointer_ids[testPrefix]); + }, `${testPrefix} touch.pointerId matches expectation`); + } + // Don't let the browser handle the event to help guard against + // potential memory leaks. + event.preventDefault(); + checkPointerEventAttributes(testPrefix, event, expectations); + target.removeEventListener(type, listener); + delete listeners[key]; + }; + target.addEventListener(type, listener); + listeners[key] = listener; + }; + + const square1 = document.getElementById("square1"); + const innerFrame = document.getElementById('innerFrame'); + const square2 = innerFrame.contentDocument.getElementById('square2'); + const expectations = { + pointerover: { button: 0, buttons: 1 }, + pointerenter: { button: 0, buttons: 1 }, + pointerdown: { button: 0, buttons: 1 }, + pointermove: { button: -1, buttons: 1 }, + pointerup: { button: 0, buttons: 0 }, + pointerout: { button: 0, buttons: 0 }, + pointerleave: { button: 0, buttons: 0 }, + }; + event_list.forEach(type => { + attachListener('', square1, type, expectations[type]); + attachListener('inner frame', square2, type, expectations[type]); + }); + await injectScrub(square1); + await injectScrub(square2); + await tapDone(); + + test_fixture.step(() => { + assert_equals( + Object.keys(listeners).length, 0, + `Missing tests for ${Object.keys(listeners).join(', ')}`); + test_fixture.done(); + }); + }; +</script> +<body> + <div id="square1"></div> + <div> + <iframe id="innerFrame" srcdoc=' + <style> + html { + touch-action: none; + } + #square2 { + background-color: green; + border: 1px solid black; + height: 50px; + width: 50px; + display: inline-block; + } + </style> + <body> + <div id="square2"></div> + </body> + '></iframe> + </div> + <!-- Used to detect a sentinel event. Once triggered, all other events must + have been processed. --> + <div> + <button id="done">done</button> + </div> +</body> </html> diff --git a/tests/wpt/tests/resize-observer/multiple-observers-with-mutation-crash.html b/tests/wpt/tests/resize-observer/multiple-observers-with-mutation-crash.html new file mode 100644 index 00000000000..c844854e5cf --- /dev/null +++ b/tests/wpt/tests/resize-observer/multiple-observers-with-mutation-crash.html @@ -0,0 +1,49 @@ +<!doctype html> +<html class="test-wait"> +<!-- + This test is for crbug.com/1368458 which is a crash where we expected + up-to-date style&layout when delivering resize observations. We would crash + if a resize observer in one frame caused a modification in the presence of a + resize observer in another frame. +--> +<iframe id="iframe" style="border: none;" srcdoc=" + <!doctype html> + <style>body { margin: 0; }</style> + <div id='inner_element'>hello</div> + <script> + const resizeObserver = new ResizeObserver((entries) => { + const size = entries[0].borderBoxSize[0].inlineSize; + const event = new CustomEvent('onIframeResizeObserved', {detail: size}); + parent.document.dispatchEvent(event); + }); + resizeObserver.observe(inner_element); + </script> +"></iframe> +<div id="outer_element" style="width: 200px;">world</div> + +<script> + const onInnerElementInitialResize = (event) => { + // `inner_element` should result in an initial observation of width 300px. + window.document.removeEventListener( + 'onIframeResizeObserved', onInnerElementInitialResize, false); + + const resizeObserver = new ResizeObserver((entries) => { + // `outer_element` should result in an initial observation of width 200px. + + // Modify styles so that inner_element is resized. + iframe.contentDocument.body.style.width = "200px"; + }); + resizeObserver.observe(outer_element); + + const onInnerElementSecondResize = (event) => { + // `inner_element` should result in a second observation of width 100px. + + // Finish the test. + document.documentElement.classList.remove('test-wait'); + }; + window.document.addEventListener( + 'onIframeResizeObserved', onInnerElementSecondResize, false); + }; + window.document.addEventListener( + 'onIframeResizeObserved', onInnerElementInitialResize, false); +</script> diff --git a/tests/wpt/tests/selection/crashtests/selection-modify-per-word-in-table-header-group.html b/tests/wpt/tests/selection/crashtests/selection-modify-per-word-in-table-header-group.html new file mode 100644 index 00000000000..66a57381eda --- /dev/null +++ b/tests/wpt/tests/selection/crashtests/selection-modify-per-word-in-table-header-group.html @@ -0,0 +1,27 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<style> +dialog { + display: table-header-group; + translate: -1px 0px 0px; + position: sticky; +} +</style> +<script> +addEventListener("DOMContentLoaded", () => { + window.find("1"); + getSelection().modify("move", "left", "word"); +}, {once: true}); +</script> +</head> +<body> +<dialog> +<span style="position: fixed">1</span> +<table dir="rtl"></table> +<video> +</video> +</dialog> +</body> +</html> diff --git a/tests/wpt/tests/speculation-rules/prefetch/implicit-source.https.html b/tests/wpt/tests/speculation-rules/prefetch/implicit-source.https.html new file mode 100644 index 00000000000..b0b16679846 --- /dev/null +++ b/tests/wpt/tests/speculation-rules/prefetch/implicit-source.https.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/common/utils.js"></script> +<script src="../resources/utils.js"></script> +<script src="resources/utils.sub.js"></script> +<body> +<script> + setup(() => assertSpeculationRulesIsSupported()); + + promise_test(async t => { + let urls = getPrefetchUrlList(2); + + let a = document.createElement('a'); + a.className = 'prefetch-me'; + a.href = urls[1]; + a.textContent = 'prefetch me!'; + document.body.appendChild(a); + t.add_cleanup(() => a.remove()); + + insertSpeculationRules({prefetch: [ + {urls: [urls[0]]}, + {where: {selector_matches: '.prefetch-me'}, eagerness: 'immediate'}, + ]}); + + await new Promise(resolve => t.step_timeout(resolve, 2000)); + + let wasPrefetched = urls.map(isUrlPrefetched); + assert_true(!!(await wasPrefetched[0]), 'implicit list rule should have worked'); + assert_true(!!(await wasPrefetched[1]), 'implicit document rule should have worked'); + }, 'rules should be accepted without an explicit source'); +</script> +</body> diff --git a/tests/wpt/tests/speculation-rules/prefetch/initiators-iframe-location-href.sub.https.html b/tests/wpt/tests/speculation-rules/prefetch/initiators-iframe-location-href.sub.https.html index 9a795b7404a..0c195ee454f 100644 --- a/tests/wpt/tests/speculation-rules/prefetch/initiators-iframe-location-href.sub.https.html +++ b/tests/wpt/tests/speculation-rules/prefetch/initiators-iframe-location-href.sub.https.html @@ -16,6 +16,11 @@ // In https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate, // `sourceDocument` (instead of `navigable`'s active document) should be // used as the referring document for prefetch. + // + // Nonetheless, a prefetch in a top-level window is not suitable to use in an iframe. + // In particular, browsers partition storage and cache by top-level site. + // If a browser does start allowing these in narrower cases where the partition + // would nonetheless be the same, this test might need tweaking. promise_test(async t => { const win = await spawnWindow(t, { protocol: 'https' }); @@ -46,6 +51,6 @@ nextUrl.toString(), "expected navigation to reach destination URL"); - assert_prefetched(await win.getRequestHeaders()); + assert_not_prefetched(await win.getRequestHeaders()); }, `location.href across iframe`); </script> diff --git a/tests/wpt/tests/speculation-rules/prerender/prerender-while-prerender.html b/tests/wpt/tests/speculation-rules/prerender/prerender-while-prerender.html new file mode 100644 index 00000000000..e04fafbfa8d --- /dev/null +++ b/tests/wpt/tests/speculation-rules/prerender/prerender-while-prerender.html @@ -0,0 +1,58 @@ +<!DOCTYPE html> +<meta name="timeout" content="long"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js"></script> +<script src="../resources/utils.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +setup(() => assertSpeculationRulesIsSupported()); + +promise_test(async t => { + const rcHelper = new RemoteContextHelper(); + const referrerRC = await rcHelper.addWindow(undefined, { features: 'noopener' }); + const outerPrerenderedRC = await addPrerenderRC(referrerRC); + + // Double-check we're set up correctly. + assert_equals(await outerPrerenderedRC.executeScript(() => document.prerendering), true); + + const innerPrerenderRC = await addPrerenderRC(outerPrerenderedRC); + + // Do not `await`. Since (per spec) prerendering is not allowed inside + // a prerender, there is not actually a real `RemoteContextHelper` + // representing the inner prerender at this time, since there is no + // prerender running. Instead, the `RemoteContextHelper` it is waiting + // for something to appear at its URL, which will happen later. At + // that time, the script will run. But `await`ing the script now would + // just block, since it will not run until that later point. + const scriptResultInInner = innerPrerenderRC.executeScript(() => document.prerendering); + + // When the outer prerender is activated, inside the `prerenderingchange` + // event, attempt to activate the inner prerender. In reality, this will just + // perform a normal navigation to `innerPrerenderRC.url`. + await outerPrerenderedRC.executeScript(innerPrerenderRCURL => { + document.addEventListener("prerenderingchange", () => { + // executeScriptToNavigate is normally an implementation detail of the + // RemoteContextHelper framework, used by, e.g., `rch.navigateTo()`. + // However, because we're setting up an event listener to navigate later, + // we can't call `rch.navigateTo()`, and so need to call it directly. + executeScriptToNavigate(innerPrerenderRCURL => { + location.href = innerPrerenderRCURL; + }, [innerPrerenderRCURL]); + }); + }, [innerPrerenderRC.url]); + + // Now that everything is set up, activate the outer prerender. + await activatePrerenderRC(referrerRC, outerPrerenderedRC); + + // Testing that this is false means two things: + // - The inner prerender attempt did not happen; we did a normal navigation + // instead. + // - Nothing crashed or got confused. + assert_equals(await scriptResultInInner, false); +}, "Prerendering inside a prerender doesn't work, and navigating inside prerenderingchange is fine"); +</script> diff --git a/tests/wpt/tests/speculation-rules/prerender/resources/utils.js b/tests/wpt/tests/speculation-rules/prerender/resources/utils.js index 56ab603fdff..940edcc0ca3 100644 --- a/tests/wpt/tests/speculation-rules/prerender/resources/utils.js +++ b/tests/wpt/tests/speculation-rules/prerender/resources/utils.js @@ -111,7 +111,7 @@ async function writeValueToServer(key, value) { function loadInitiatorPage(rule_extras = {}) { // Used to communicate with the prerendering page. const prerenderChannel = new PrerenderChannel('prerender-channel'); - window.addEventListener('unload', () => { + window.addEventListener('pagehide', () => { prerenderChannel.close(); }); diff --git a/tests/wpt/tests/storage-access-api/resources/storage-access-beyond-cookies-iframe.sub.html b/tests/wpt/tests/storage-access-api/resources/storage-access-beyond-cookies-iframe.sub.html index 364e5d70e1e..3f486cc59a9 100644 --- a/tests/wpt/tests/storage-access-api/resources/storage-access-beyond-cookies-iframe.sub.html +++ b/tests/wpt/tests/storage-access-api/resources/storage-access-beyond-cookies-iframe.sub.html @@ -18,12 +18,24 @@ if (!!handle.sessionStorage.getItem("test")) { message = "Cross-site first-party Session Storage should be empty"; } + handle.sessionStorage.setItem("test2", id); + if (window.sessionStorage.getItem("test2") == id) { + message = "Handle bound partitioned instead of unpartitioned Session Storage"; + } + handle.sessionStorage.clear(); + window.sessionStorage.clear(); break; } case "localStorage": { if (!!handle.localStorage.getItem("test")) { message = "Cross-site first-party Local Storage should be empty"; } + handle.localStorage.setItem("test2", id); + if (window.localStorage.getItem("test2") == id) { + message = "Handle bound partitioned instead of unpartitioned Local Storage"; + } + handle.localStorage.clear(); + window.localStorage.clear(); break; } case "indexedDB": { diff --git a/tests/wpt/tests/svg/struct/reftests/gradient-in-symbol.svg b/tests/wpt/tests/svg/struct/reftests/gradient-in-symbol.svg new file mode 100644 index 00000000000..be0f4ff8953 --- /dev/null +++ b/tests/wpt/tests/svg/struct/reftests/gradient-in-symbol.svg @@ -0,0 +1,11 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title><symbol> with a gradient inside</title> + <h:link rel="help" href="https://www.w3.org/TR/SVG2/struct.html#SymbolElement"/> + <h:link rel="match" href="reference/green-100x100.svg"/> + <rect fill="url(#a)" width="100" height="100"/> + <symbol> + <linearGradient id="a"> + <stop offset="5%" stop-color="green" /> + </linearGradient> + </symbol> +</svg> diff --git a/tests/wpt/tests/svg/struct/reftests/use-symbol-display-none.svg b/tests/wpt/tests/svg/struct/reftests/use-symbol-display-none.svg new file mode 100644 index 00000000000..7cb2720d7e8 --- /dev/null +++ b/tests/wpt/tests/svg/struct/reftests/use-symbol-display-none.svg @@ -0,0 +1,12 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title><use> with a display="none" symbol</title> + <h:link rel="help" href="https://svgwg.org/svg2-draft/struct.html#UseElementHrefAttribute"/> + <h:link rel="match" href="reference/green-100x100.svg"/> + <defs> + <symbol id="a" display="none"> + <rect width="100" height="100" fill="red"/> + </symbol> + </defs> + <rect width="100" height="100" fill="green"/> + <use href="#a"></use> +</svg> diff --git a/tests/wpt/tests/tools/ci/requirements_build.txt b/tests/wpt/tests/tools/ci/requirements_build.txt index e0443762c3c..34baec00a5e 100644 --- a/tests/wpt/tests/tools/ci/requirements_build.txt +++ b/tests/wpt/tests/tools/ci/requirements_build.txt @@ -1,5 +1,5 @@ cairocffi==1.6.1 -fonttools==4.39.4 +fonttools==4.47.2 genshi==0.7.7 jinja2==3.1.2 pyyaml==6.0.1 diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py index a9637c9cfa4..8f891ffafd6 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/client.py @@ -96,6 +96,7 @@ class BidiSession: self.network = modules.Network(self) self.script = modules.Script(self) self.session = modules.Session(self) + self.storage = modules.Storage(self) @property def event_loop(self): diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/__init__.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/__init__.py index acbe117902e..6f63e85bcd0 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/__init__.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/__init__.py @@ -6,3 +6,4 @@ from .input import Input from .network import Network from .script import Script from .session import Session +from .storage import Storage 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 073aa637c97..f0a2a5b8026 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/network.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/network.py @@ -8,6 +8,20 @@ class AuthCredentials(Dict[str, Any]): dict.__init__(self, type="password", username=username, password=password) +class NetworkBase64Value(Dict[str, Any]): + def __init__(self, value: str): + dict.__init__(self, type="base64", value=value) + + +class NetworkStringValue(Dict[str, Any]): + def __init__(self, value: str): + dict.__init__(self, type="string", value=value) + + +NetworkBytesValue = Union[NetworkStringValue, NetworkBase64Value] + + + class URLPatternPattern(Dict[str, Any]): def __init__( self, diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/script.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/script.py index f128b0d089c..737426a5d54 100644 --- a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/script.py +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/script.py @@ -96,6 +96,7 @@ class Script(BidiModule): self, function_declaration: str, arguments: Optional[List[Mapping[str, Any]]] = None, + contexts: Optional[List[str]] = None, sandbox: Optional[str] = None ) -> Mapping[str, Any]: params: MutableMapping[str, Any] = { @@ -104,6 +105,8 @@ class Script(BidiModule): if arguments is not None: params["arguments"] = arguments + if contexts is not None: + params["contexts"] = contexts if sandbox is not None: params["sandbox"] = sandbox diff --git a/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py new file mode 100644 index 00000000000..c13b196d26a --- /dev/null +++ b/tests/wpt/tests/tools/webdriver/webdriver/bidi/modules/storage.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, Mapping, MutableMapping, Optional, Union + +from ._module import BidiModule, command + +from webdriver.bidi.modules.network import NetworkBytesValue + + +class BrowsingContextPartitionDescriptor(Dict[str, Any]): + def __init__(self, context: str): + dict.__init__(self, type="context", context=context) + + +class StorageKeyPartitionDescriptor(Dict[str, Any]): + def __init__(self, user_context: Optional[str] = None, source_origin: Optional[str] = None): + dict.__init__(self, type="storageKey") + if user_context is not None: + self["userContext"] = user_context + if source_origin is not None: + self["sourceOrigin"] = source_origin + + +class PartialCookie(Dict[str, Any]): + def __init__( + self, + name: str, + value: NetworkBytesValue, + domain: str, + path: Optional[str] = None, + http_only: Optional[bool] = None, + secure: Optional[bool] = None, + same_site: Optional[str] = None, + expiry: Optional[int] = None, + ): + dict.__init__(self, name=name, value=value, domain=domain) + if path is not None: + self["path"] = path + if http_only is not None: + self["httpOnly"] = http_only + if secure is not None: + self["secure"] = secure + if same_site is not None: + self["sameSite"] = same_site + if expiry is not None: + self["expiry"] = expiry + + +PartitionDescriptor = Union[StorageKeyPartitionDescriptor, BrowsingContextPartitionDescriptor] + + +class Storage(BidiModule): + + # TODO: extend with `filter`. + @command + def get_cookies(self, partition: Optional[PartitionDescriptor] = None) -> Mapping[str, Any]: + params = {} + if partition is not None: + params["partition"] = partition + return params + + @command + def set_cookie(self, cookie: PartialCookie, partition: Optional[PartitionDescriptor] = None) -> \ + Mapping[str, Any]: + params: MutableMapping[str, Any] = { + 'cookie': cookie, + } + if partition is not None: + params["partition"] = partition + return params diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py index 7abb1660bae..7119c0b019d 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/base.py @@ -89,8 +89,7 @@ class TestharnessResultConverter: def __call__(self, test, result, extra=None): """Convert a JSON result into a (TestResult, [SubtestResult]) tuple""" result_url, status, message, stack, subtest_results = result - assert result_url == test.url, ("Got results from %s, expected %s" % - (result_url, test.url)) + assert result_url == test.url, (f"Got results from {result_url}, expected {test.url}") harness_result = test.result_cls(self.harness_codes[status], message, extra=extra, stack=stack) return (harness_result, [test.subtest_result_cls(st_name, self.test_codes[st_status], st_message, st_stack) diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py index 4ca15042cbb..21be5e852bf 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executormarionette.py @@ -88,9 +88,10 @@ class MarionetteBaseProtocolPart(BaseProtocolPart): def setup(self): self.marionette = self.parent.marionette - def execute_script(self, script, asynchronous=False): + def execute_script(self, script, asynchronous=False, args=None): method = self.marionette.execute_async_script if asynchronous else self.marionette.execute_script - return method(script, new_sandbox=False, sandbox=None) + script_args = args if args is not None else [] + return method(script, script_args=script_args, new_sandbox=False, sandbox=None) def set_timeout(self, timeout): """Set the Marionette script timeout. @@ -986,8 +987,6 @@ class MarionetteTestharnessExecutor(TestharnessExecutor): if self.protocol.coverage.is_enabled: self.protocol.coverage.reset() - format_map = {"url": strip_server(url)} - protocol.base.execute_script("window.open('about:blank', '%s', 'noopener')" % self.window_id) test_window = protocol.testharness.get_test_window(self.window_id, parent_window, timeout=10 * self.timeout_multiplier) @@ -1001,7 +1000,7 @@ class MarionetteTestharnessExecutor(TestharnessExecutor): protocol.marionette.navigate(url) while True: result = protocol.base.execute_script( - self.script_resume % format_map, asynchronous=True) + self.script_resume, args=[strip_server(url)], asynchronous=True) if result is None: # This can happen if we get an content process crash return None diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index 10b4e4def87..05a26bc162f 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -52,9 +52,9 @@ class WebDriverBaseProtocolPart(BaseProtocolPart): def setup(self): self.webdriver = self.parent.webdriver - def execute_script(self, script, asynchronous=False): + def execute_script(self, script, asynchronous=False, args=None): method = self.webdriver.execute_async_script if asynchronous else self.webdriver.execute_script - return method(script) + return method(script, args=args) def set_timeout(self, timeout): try: @@ -589,8 +589,6 @@ class WebDriverTestharnessExecutor(TestharnessExecutor): return (test.result_cls(*data), []) def do_testharness(self, protocol, url, timeout): - format_map = {"url": strip_server(url)} - # The previous test may not have closed its old windows (if something # went wrong or if cleanup_after_test was False), so clean up here. parent_window = protocol.testharness.close_old_windows() @@ -610,7 +608,7 @@ class WebDriverTestharnessExecutor(TestharnessExecutor): while True: result = protocol.base.execute_script( - self.script_resume % format_map, asynchronous=True) + self.script_resume, asynchronous=True, args=[strip_server(url)]) # As of 2019-03-29, WebDriver does not define expected behavior for # cases where the browser crashes during script execution: diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js index 36d086c9747..4e7b63090ee 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js @@ -1,5 +1,5 @@ // We have to set the url here to ensure we get the same escaping as in the harness // and also to handle the case where the test changes the fragment -window.__wptrunner_url = "%(url)s"; +window.__wptrunner_url = arguments[0]; window.__wptrunner_testdriver_callback = arguments[arguments.length - 1]; window.__wptrunner_process_next_event(); diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js index 74d5bae677c..af25bf4111c 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/testdriver-extra.js @@ -1,7 +1,6 @@ "use strict"; (function() { - const is_test_context = window.__wptrunner_message_queue !== undefined; const pending = new Map(); let result = null; @@ -15,7 +14,7 @@ return; } - if (is_test_context && data.type === "testdriver-command") { + if (is_test_context() && data.type === "testdriver-command") { const command = data.message; const ctx_id = command.cmd_id; delete command.cmd_id; @@ -37,12 +36,16 @@ pending.delete(cmd_id); const resolver = data.status === "success" ? on_success : on_failure; resolver(data); - if (is_test_context) { + if (is_test_context()) { window.__wptrunner_process_next_event(); } } }); + function is_test_context() { + return window.__wptrunner_message_queue !== undefined; + } + // Code copied from /common/utils.js function rand_int(bits) { if (bits < 1 || bits > 53) { @@ -67,7 +70,7 @@ } function get_window_id(win) { - if (win == window && is_test_context) { + if (win == window && is_test_context()) { return null; } if (!win.__wptrunner_id) { @@ -130,7 +133,7 @@ if (action_msg.context) { action_msg.context = get_window_id(action_msg.context); } - if (is_test_context) { + if (is_test_context()) { cmd_id = window.__wptrunner_message_queue.push(action_msg); } else { if (testharness_context === null) { diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/testrunner.py b/tests/wpt/tests/tools/wptrunner/wptrunner/testrunner.py index 888731e4aeb..63f856d1c64 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/testrunner.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/testrunner.py @@ -434,7 +434,7 @@ class TestRunnerManager(threading.Thread): f"and {len(skipped_tests) - 1} others" ) for test in skipped_tests[1:]: - self.logger.debug(f"Test left in the queue: {test[0].id!r}") + self.logger.debug(f"Test left in the queue: {test.id!r}") force_stop = (not isinstance(self.state, RunnerManagerState.stop) or self.state.force_stop) diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sample-accurate-scheduling.html b/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sample-accurate-scheduling.html index 5fafd024eef..fd244e8a5f6 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sample-accurate-scheduling.html +++ b/tests/wpt/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sample-accurate-scheduling.html @@ -12,7 +12,6 @@ We use an impulse so we can tell exactly where the rendering is happening. <script src="/resources/testharnessreport.js"></script> <script src="/webaudio/resources/audit-util.js"></script> <script src="/webaudio/resources/audit.js"></script> - <script src="/webaudio/resources/buffer-loader.js"></script> </head> <body> <script id="layout-test-code"> diff --git a/tests/wpt/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-process-frozen-array.https.html b/tests/wpt/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-process-frozen-array.https.html index 33627204a6f..ce0cfa40b69 100644 --- a/tests/wpt/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-process-frozen-array.https.html +++ b/tests/wpt/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletprocessor-process-frozen-array.https.html @@ -43,7 +43,10 @@ if (actual.done) task.done(); }; - sourceNode.connect(workletNode); + // To have valid ArrayBuffers for both input and output, we need + // both connections. + // See: https://github.com/WebAudio/web-audio-api/issues/2566 + sourceNode.connect(workletNode).connect(context.destination); sourceNode.start(); }); diff --git a/tests/wpt/tests/webauthn/public-key-credential-to-json.https.window.js b/tests/wpt/tests/webauthn/public-key-credential-to-json.https.window.js index 8ef25132197..2f805d3ab7a 100644 --- a/tests/wpt/tests/webauthn/public-key-credential-to-json.https.window.js +++ b/tests/wpt/tests/webauthn/public-key-credential-to-json.https.window.js @@ -97,6 +97,9 @@ function authenticatorResponseToJson(response) { (isAttestation ? [ 'clientDataJSON', 'attestationObject', + {name: 'getAuthenticatorData', target: 'authenticatorData'}, + {name: 'getPublicKey', target: 'publicKey'}, + {name: 'getPublicKeyAlgorithm', target: 'publicKeyAlgorithm'}, {name: 'getTransports', target: 'transports'} ] : ['clientDataJSON', 'authenticatorData', 'signature', 'userHandle']); diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/network/__init__.py index c6b8e328859..154606592c9 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/network/__init__.py +++ b/tests/wpt/tests/webdriver/tests/bidi/network/__init__.py @@ -172,6 +172,34 @@ def assert_before_request_sent_event( ) +def assert_fetch_error_event( + event, + context=None, + errorText=None, + intercepts=None, + is_blocked=None, + navigation=None, + redirect_count=None, + expected_request=None, +): + # Assert errorText + assert isinstance(event["errorText"], str) + + if errorText is not None: + assert event["errorText"] == errorText + + # Assert base parameters + assert_base_parameters( + event, + context=context, + intercepts=intercepts, + is_blocked=is_blocked, + navigation=navigation, + redirect_count=redirect_count, + expected_request=expected_request, + ) + + def assert_response_data(response_data, expected_response): recursive_compare( { @@ -281,6 +309,7 @@ PAGE_EMPTY_IMAGE = "/webdriver/tests/bidi/network/support/empty.png" PAGE_EMPTY_SCRIPT = "/webdriver/tests/bidi/network/support/empty.js" PAGE_EMPTY_SVG = "/webdriver/tests/bidi/network/support/empty.svg" PAGE_EMPTY_TEXT = "/webdriver/tests/bidi/network/support/empty.txt" +PAGE_INVALID_URL = "https://not_a_valid_url/" PAGE_OTHER_TEXT = "/webdriver/tests/bidi/network/support/other.txt" PAGE_REDIRECT_HTTP_EQUIV = ( "/webdriver/tests/bidi/network/support/redirect_http_equiv.html" @@ -289,5 +318,6 @@ PAGE_REDIRECTED_HTML = "/webdriver/tests/bidi/network/support/redirected.html" AUTH_REQUIRED_EVENT = "network.authRequired" BEFORE_REQUEST_SENT_EVENT = "network.beforeRequestSent" +FETCH_ERROR_EVENT = "network.fetchError" RESPONSE_COMPLETED_EVENT = "network.responseCompleted" RESPONSE_STARTED_EVENT = "network.responseStarted" diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/fetch_error/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/network/fetch_error/__init__.py new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/network/fetch_error/__init__.py diff --git a/tests/wpt/tests/webdriver/tests/bidi/network/fetch_error/fetch_error.py b/tests/wpt/tests/webdriver/tests/bidi/network/fetch_error/fetch_error.py new file mode 100644 index 00000000000..35e78d8d02e --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/network/fetch_error/fetch_error.py @@ -0,0 +1,269 @@ +import asyncio + +import pytest + +from webdriver.bidi.modules.script import ContextTarget + +from tests.support.sync import AsyncPoll + +from .. import ( + assert_fetch_error_event, + assert_response_event, + FETCH_ERROR_EVENT, + PAGE_EMPTY_HTML, + RESPONSE_COMPLETED_EVENT, + PAGE_INVALID_URL, +) + + +@pytest.mark.asyncio +async def test_subscribe_status( + bidi_session, + subscribe_events, + top_context, + wait_for_event, + wait_for_future_safe, + url, + fetch, +): + await subscribe_events(events=[FETCH_ERROR_EVENT]) + + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=url(PAGE_EMPTY_HTML), + wait="complete", + ) + + # Track all received network.beforeRequestSent events in the events array + events = [] + + async def on_event(method, data): + events.append(data) + + remove_listener = bidi_session.add_event_listener(FETCH_ERROR_EVENT, on_event) + + on_fetch_error = wait_for_event(FETCH_ERROR_EVENT) + asyncio.ensure_future(fetch(PAGE_INVALID_URL)) + await wait_for_future_safe(on_fetch_error) + + assert len(events) == 1 + expected_request = {"method": "GET", "url": PAGE_INVALID_URL} + assert_fetch_error_event( + events[0], + expected_request=expected_request, + redirect_count=0, + ) + + await bidi_session.session.unsubscribe(events=[FETCH_ERROR_EVENT]) + + # Fetch the invalid url again, with an additional parameter to bypass the + # cache and check no new event is received. + asyncio.ensure_future(fetch(PAGE_INVALID_URL)) + await asyncio.sleep(0.5) + assert len(events) == 1 + + remove_listener() + + +@pytest.mark.asyncio +async def test_iframe_load( + bidi_session, + top_context, + setup_network_test, + inline, +): + network_events = await setup_network_test(events=[FETCH_ERROR_EVENT]) + events = network_events[FETCH_ERROR_EVENT] + + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=inline(f"<iframe src='{PAGE_INVALID_URL}'></iframe>"), + ) + + wait = AsyncPoll(bidi_session, timeout=2) + await wait.until(lambda _: len(events) >= 1) + + contexts = await bidi_session.browsing_context.get_tree(root=top_context["context"]) + frame_context = contexts[0]["children"][0] + + assert len(events) == 1 + assert_fetch_error_event( + events[0], + expected_request={"url": PAGE_INVALID_URL}, + context=frame_context["context"], + ) + + +@pytest.mark.asyncio +async def test_navigation_id( + bidi_session, + top_context, + wait_for_event, + url, + fetch, + setup_network_test, + wait_for_future_safe, +): + await setup_network_test(events=[FETCH_ERROR_EVENT]) + + on_fetch_error = wait_for_event(FETCH_ERROR_EVENT) + asyncio.ensure_future(fetch(PAGE_INVALID_URL)) + fetch_error_event = await wait_for_future_safe(on_fetch_error) + + expected_request = {"method": "GET", "url": PAGE_INVALID_URL} + assert_fetch_error_event( + fetch_error_event, + expected_request=expected_request, + ) + # Check that requests not related to a navigation have no navigation id. + assert fetch_error_event["navigation"] is None + + on_fetch_error = wait_for_event(FETCH_ERROR_EVENT) + result = await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=PAGE_INVALID_URL, + ) + fetch_error_event = await wait_for_future_safe(on_fetch_error) + + expected_request = {"method": "GET", "url": PAGE_INVALID_URL} + assert_fetch_error_event( + fetch_error_event, + expected_request=expected_request, + navigation=result["navigation"], + ) + assert fetch_error_event["navigation"] == result["navigation"] + + +@pytest.mark.parametrize( + "method, has_preflight", + [ + ("GET", False), + ("HEAD", False), + ("POST", False), + ("OPTIONS", False), + ("DELETE", True), + ("PATCH", True), + ("PUT", True), + ], +) +@pytest.mark.asyncio +async def test_request_method( + wait_for_event, + wait_for_future_safe, + fetch, + setup_network_test, + method, + has_preflight, +): + network_events = await setup_network_test(events=[FETCH_ERROR_EVENT]) + events = network_events[FETCH_ERROR_EVENT] + + on_fetch_error = wait_for_event(FETCH_ERROR_EVENT) + asyncio.ensure_future(fetch(PAGE_INVALID_URL, method=method)) + await wait_for_future_safe(on_fetch_error) + + assert len(events) == 1 + + # Requests which might update the server will fail on the CORS preflight + # request which uses the OPTIONS method. + if has_preflight: + method = "OPTIONS" + + expected_request = {"method": method, "url": PAGE_INVALID_URL} + assert_fetch_error_event( + events[0], + expected_request=expected_request, + redirect_count=0, + ) + + +@pytest.mark.asyncio +async def test_redirect_fetch( + bidi_session, wait_for_event, url, fetch, setup_network_test +): + redirect_url = url( + f"/webdriver/tests/support/http_handlers/redirect.py?location={PAGE_INVALID_URL}" + ) + + await setup_network_test( + events=[ + FETCH_ERROR_EVENT, + RESPONSE_COMPLETED_EVENT, + ] + ) + + on_fetch_error = wait_for_event(FETCH_ERROR_EVENT) + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + asyncio.ensure_future(fetch(redirect_url)) + + # Wait until we receive two events, one for the initial request and one for + # the redirection. + wait = AsyncPoll(bidi_session, timeout=2) + fetch_error_event = await on_fetch_error + response_completed_event = await on_response_completed + + expected_request = {"method": "GET", "url": redirect_url} + assert_response_event( + response_completed_event, + expected_request=expected_request, + redirect_count=0, + ) + expected_request = {"method": "GET", "url": PAGE_INVALID_URL} + assert_fetch_error_event( + fetch_error_event, expected_request=expected_request, redirect_count=1 + ) + + # Check that both requests share the same requestId + assert ( + fetch_error_event["request"]["request"] + == response_completed_event["request"]["request"] + ) + + +@pytest.mark.asyncio +async def test_redirect_navigation( + bidi_session, top_context, wait_for_event, url, setup_network_test +): + redirect_url = url( + f"/webdriver/tests/support/http_handlers/redirect.py?location={PAGE_INVALID_URL}" + ) + + await setup_network_test( + events=[ + FETCH_ERROR_EVENT, + RESPONSE_COMPLETED_EVENT, + ] + ) + + on_fetch_error = wait_for_event(FETCH_ERROR_EVENT) + on_response_completed = wait_for_event(RESPONSE_COMPLETED_EVENT) + + result = await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=redirect_url, + ) + + wait = AsyncPoll(bidi_session, timeout=2) + fetch_error_event = await on_fetch_error + response_completed_event = await on_response_completed + + expected_request = {"method": "GET", "url": redirect_url} + assert_response_event( + response_completed_event, + expected_request=expected_request, + navigation=result["navigation"], + redirect_count=0, + ) + expected_request = {"method": "GET", "url": PAGE_INVALID_URL} + assert_fetch_error_event( + fetch_error_event, + expected_request=expected_request, + navigation=result["navigation"], + redirect_count=1, + ) + + # Check that all events share the same requestId + assert ( + fetch_error_event["request"]["request"] + == response_completed_event["request"]["request"] + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/add_preload_script/contexts.py b/tests/wpt/tests/webdriver/tests/bidi/script/add_preload_script/contexts.py new file mode 100644 index 00000000000..97d00669d17 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/script/add_preload_script/contexts.py @@ -0,0 +1,111 @@ +import pytest + +from webdriver.bidi.modules.script import ContextTarget + + +@pytest.mark.asyncio +@pytest.mark.parametrize("domain", ["", "alt"], ids=["same_origin", "cross_origin"]) +async def test_top_context_with_iframes( + bidi_session, add_preload_script, new_tab, + inline, iframe, domain): + + iframe_content = f"<div>{domain}</div>" + url = inline(f"{iframe(iframe_content, domain=domain)}") + + await add_preload_script( + function_declaration="() => { window.bar='foo'; }", + contexts=[new_tab["context"]]) + + await bidi_session.browsing_context.navigate( + context=new_tab["context"], + url=url, + wait="complete", + ) + + # Check that preload script applied the changes to the context + result = await bidi_session.script.evaluate( + expression="window.bar", + target=ContextTarget(new_tab["context"]), + await_promise=True, + ) + assert result == {"type": "string", "value": "foo"} + + contexts = await bidi_session.browsing_context.get_tree( + root=new_tab["context"]) + + assert len(contexts[0]["children"]) == 1 + frame_context = contexts[0]["children"][0] + + # Check that preload script applied the changes to the iframe + result = await bidi_session.script.evaluate( + expression="window.bar", + target=ContextTarget(frame_context["context"]), + await_promise=True, + ) + assert result == {"type": "string", "value": "foo"} + + +@pytest.mark.asyncio +@pytest.mark.parametrize("type_hint", ["tab", "window"]) +async def test_page_script_context_isolation(bidi_session, add_preload_script, + top_context, type_hint, + test_page): + await add_preload_script(function_declaration="() => { window.baz = 42; }", + contexts=[top_context['context']]) + + new_context = await bidi_session.browsing_context.create( + type_hint=type_hint) + + # Navigate both contexts to ensure preload script is triggered + await bidi_session.browsing_context.navigate( + context=top_context['context'], + url=test_page, + wait="complete", + ) + await bidi_session.browsing_context.navigate( + context=new_context["context"], + url=test_page, + wait="complete", + ) + + # Check that preload script applied the changes to the context + result = await bidi_session.script.evaluate( + expression="window.baz", + target=ContextTarget(top_context["context"]), + await_promise=True, + ) + assert result == {"type": "number", "value": 42} + + # Check that preload script did *not* apply the changes to the other context + result = await bidi_session.script.evaluate( + expression="window.baz", + target=ContextTarget(new_context["context"]), + await_promise=True, + ) + assert result == {type: "undefined"} + + +@pytest.mark.asyncio +async def test_identical_contexts( + bidi_session, add_preload_script, new_tab, + inline): + + url = inline(f"<div>test</div>") + + await add_preload_script( + function_declaration="() => { window.foo = window.foo ? window.foo + 1 : 1; }", + contexts=[new_tab["context"], new_tab["context"]]) + + await bidi_session.browsing_context.navigate( + context=new_tab["context"], + url=url, + wait="complete", + ) + + # Check that preload script applied the changes to the context only once + result = await bidi_session.script.evaluate( + expression="window.foo", + target=ContextTarget(new_tab["context"]), + await_promise=True, + ) + assert result == {"type": "number", "value": "1"} diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/add_preload_script/invalid.py b/tests/wpt/tests/webdriver/tests/bidi/script/add_preload_script/invalid.py index 54440ff6780..58f1ba02e5f 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/add_preload_script/invalid.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/add_preload_script/invalid.py @@ -71,7 +71,8 @@ async def test_params_arguments_channel_ownership_invalid_value(bidi_session): with pytest.raises(error.InvalidArgumentException): await bidi_session.script.add_preload_script( function_declaration="() => {}", - arguments=[{"type": "channel", "value": {"ownership": "_UNKNOWN_"}}], + arguments=[{"type": "channel", "value": { + "ownership": "_UNKNOWN_"}}], ) @@ -186,6 +187,61 @@ async def test_params_arguments_channel_include_shadow_tree_invalid_value(bidi_s ) +@pytest.mark.parametrize("contexts", [False, 42, '_UNKNOWN_', {}]) +async def test_params_contexts_invalid_type(bidi_session, contexts): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + contexts=contexts + ), + + +async def test_params_contexts_empty_list(bidi_session): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + contexts=[] + ), + + +@pytest.mark.parametrize("value", [None, False, 42, {}, []]) +async def test_params_contexts_context_invalid_type(bidi_session, value): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + contexts=[value] + ), + + +@pytest.mark.parametrize("value", ["", "somestring"]) +async def test_params_contexts_context_invalid_value(bidi_session, value): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + contexts=[value] + ), + + +async def test_params_contexts_context_non_top_level(bidi_session, new_tab, test_page_same_origin_frame): + await bidi_session.browsing_context.navigate( + context=new_tab["context"], + url=test_page_same_origin_frame, + wait="complete", + ) + + contexts = await bidi_session.browsing_context.get_tree(root=new_tab["context"]) + + assert len(contexts) == 1 + assert len(contexts[0]["children"]) == 1 + child_info = contexts[0]["children"][0] + + with pytest.raises(error.InvalidArgumentException): + await bidi_session.script.add_preload_script( + function_declaration="() => {}", + contexts=[child_info['context']] + ), + + @pytest.mark.parametrize("sandbox", [False, 42, {}, []]) async def test_params_sandbox_invalid_type(bidi_session, sandbox): with pytest.raises(error.InvalidArgumentException): diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/call_function/invalid_tentative.py b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/invalid_tentative.py deleted file mode 100644 index 2726178e471..00000000000 --- a/tests/wpt/tests/webdriver/tests/bidi/script/call_function/invalid_tentative.py +++ /dev/null @@ -1,38 +0,0 @@ -import pytest -import webdriver.bidi.error as error - -from webdriver.bidi.modules.script import ContextTarget - -pytestmark = pytest.mark.asyncio - - -# The following tests are marked as tentative until -# https://github.com/w3c/webdriver-bidi/issues/274 is resolved. -async def test_params_target_invalid_value(bidi_session, top_context): - result = await bidi_session.script.call_function( - raw_result=True, - function_declaration="() => 1 + 2", - target=ContextTarget(top_context["context"]), - await_promise=True, - ) - - with pytest.raises(error.InvalidArgumentException): - await bidi_session.script.call_function( - function_declaration="() => 1 + 2", - target={"context": top_context["context"], "realm": result["realm"]}, - await_promise=True, - ) - - with pytest.raises(error.InvalidArgumentException): - await bidi_session.script.call_function( - function_declaration="() => 1 + 2", - target={"sandbox": "foo", "realm": result["realm"]}, - await_promise=True, - ) - - with pytest.raises(error.InvalidArgumentException): - await bidi_session.script.call_function( - function_declaration="() => 1 + 2", - target={"sandbox": "bar"}, - await_promise=True, - ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/call_function/target.py b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/target.py new file mode 100644 index 00000000000..d6550d67d5e --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/script/call_function/target.py @@ -0,0 +1,33 @@ +import pytest + +from webdriver.bidi.modules.script import ( + ContextTarget, +) + +from ... import recursive_compare + +pytestmark = pytest.mark.asyncio + + +async def test_target_context_and_realm(bidi_session, top_context, new_tab): + result = await bidi_session.script.call_function( + raw_result=True, + function_declaration="() => { window.foo = 3; }", + target=ContextTarget(top_context["context"]), + await_promise=True, + ) + realm = result["realm"] + + # Make sure that realm argument is ignored and + # script is executed in the right context. + result = await bidi_session.script.call_function( + raw_result=True, + function_declaration="() => window.foo", + target={"context": new_tab["context"], "realm": realm}, + await_promise=True, + ) + + assert realm != result["realm"] + recursive_compare( + {"realm": result["realm"], "result": {"type": "undefined"}}, result + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/disown/invalid_tentative.py b/tests/wpt/tests/webdriver/tests/bidi/script/disown/invalid_tentative.py deleted file mode 100644 index 5078166dfde..00000000000 --- a/tests/wpt/tests/webdriver/tests/bidi/script/disown/invalid_tentative.py +++ /dev/null @@ -1,38 +0,0 @@ -import pytest -import webdriver.bidi.error as error - -from webdriver.bidi.modules.script import ContextTarget - -pytestmark = pytest.mark.asyncio - - -# The following tests are marked as tentative until -# https://github.com/w3c/webdriver-bidi/issues/274 is resolved. -async def test_params_target_invalid_value(bidi_session, top_context): - result = await bidi_session.script.call_function( - raw_result=True, - function_declaration="() => 1 + 2", - target=ContextTarget(top_context["context"]), - await_promise=True, - ) - - with pytest.raises(error.InvalidArgumentException): - await bidi_session.script.disown( - handles=[], - target={ - "context": top_context["context"], - "realm": result["realm"] - }, - ) - - with pytest.raises(error.InvalidArgumentException): - await bidi_session.script.disown( - handles=[], - target={"sandbox": "foo", "realm": result["realm"]}, - ) - - with pytest.raises(error.InvalidArgumentException): - await bidi_session.script.disown( - handles=[], - target={"sandbox": "bar"}, - ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/disown/target.py b/tests/wpt/tests/webdriver/tests/bidi/script/disown/target.py index bce956d06be..f01dcb3b717 100644 --- a/tests/wpt/tests/webdriver/tests/bidi/script/disown/target.py +++ b/tests/wpt/tests/webdriver/tests/bidi/script/disown/target.py @@ -93,3 +93,44 @@ async def test_sandbox(bidi_session, top_context, call_function): with pytest.raises(error.NoSuchHandleException): await call_function("arg => arg.a", [remote_value], sandbox="basic_sandbox") + + +async def test_context_and_realm(bidi_session, top_context, new_tab, call_function): + # Create a remote value outside of any sandbox. + result_in_default_realm = await bidi_session.script.evaluate( + raw_result=True, + expression="({a:'without sandbox'})", + await_promise=False, + result_ownership="root", + target=ContextTarget(new_tab["context"]), + ) + remote_value = result_in_default_realm["result"] + + # Create a remote value from a sandbox. + result_in_sandbox = await bidi_session.script.evaluate( + raw_result=True, + expression="({a:'with sandbox'})", + await_promise=False, + result_ownership="root", + target=ContextTarget(top_context["context"], "basic_sandbox"), + ) + sandbox_value = result_in_sandbox["result"] + + # Make sure that realm argument is ignored and the value is disowned + # in the default realm of another context. + await bidi_session.script.disown( + handles=[remote_value["handle"]], + target={ + "context": new_tab["context"], + "realm": result_in_default_realm["realm"] + } + ) + + with pytest.raises(error.NoSuchHandleException): + await call_function("arg => arg.a", [remote_value], None, new_tab["context"]) + + # Check that the sandbox remote value is still working. + result = await call_function( + "arg => arg.a", [sandbox_value], sandbox="basic_sandbox" + ) + assert result == {"type": "string", "value": "with sandbox"} diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/invalid_tentative.py b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/invalid_tentative.py deleted file mode 100644 index e98a697c80a..00000000000 --- a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/invalid_tentative.py +++ /dev/null @@ -1,38 +0,0 @@ -import pytest -import webdriver.bidi.error as error - -from webdriver.bidi.modules.script import ContextTarget - -pytestmark = pytest.mark.asyncio - - -# The following tests are marked as tentative until -# https://github.com/w3c/webdriver-bidi/issues/274 is resolved. -async def test_params_target_invalid_value(bidi_session, top_context): - result = await bidi_session.script.evaluate( - raw_result=True, - expression="1 + 2", - target=ContextTarget(top_context["context"]), - await_promise=True, - ) - - with pytest.raises(error.InvalidArgumentException): - await bidi_session.script.evaluate( - expression="1 + 2", - target={"context": top_context["context"], "realm": result["realm"]}, - await_promise=True, - ) - - with pytest.raises(error.InvalidArgumentException): - await bidi_session.script.evaluate( - expression="1 + 2", - target={"sandbox": "foo", "realm": result["realm"]}, - await_promise=True, - ) - - with pytest.raises(error.InvalidArgumentException): - await bidi_session.script.call_function( - function_declaration="1 + 2", - target={"sandbox": "bar"}, - await_promise=True, - ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/target.py b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/target.py new file mode 100644 index 00000000000..e67a5dd81f7 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/script/evaluate/target.py @@ -0,0 +1,33 @@ +import pytest + +from webdriver.bidi.modules.script import ( + ContextTarget, +) + +from ... import recursive_compare + +pytestmark = pytest.mark.asyncio + + +async def test_target_context_and_realm(bidi_session, top_context, new_tab): + result = await bidi_session.script.evaluate( + raw_result=True, + expression="window.foo = 3", + target=ContextTarget(top_context["context"]), + await_promise=True, + ) + realm = result["realm"] + + # Make sure that realm argument is ignored and + # script is executed in the right context. + result = await bidi_session.script.evaluate( + raw_result=True, + expression="window.foo", + target={"context": new_tab["context"], "realm": realm}, + await_promise=True, + ) + + assert realm != result["realm"] + recursive_compare( + {"realm": result["realm"], "result": {"type": "undefined"}}, result + ) diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/__init__.py diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/conftest.py b/tests/wpt/tests/webdriver/tests/bidi/storage/conftest.py new file mode 100644 index 00000000000..31b2c3f3e6b --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/conftest.py @@ -0,0 +1,19 @@ +import pytest + +from urllib.parse import urlunsplit + + +@pytest.fixture +def origin(server_config, domain_value): + def origin(protocol="https", domain="", subdomain=""): + return urlunsplit((protocol, domain_value(domain, subdomain), "", "", "")) + + return origin + + +@pytest.fixture +def domain_value(server_config): + def domain_value(domain="", subdomain=""): + return server_config["domains"][domain][subdomain] + + return domain_value diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/__init__.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/__init__.py new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/__init__.py diff --git a/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/set_cookie.py b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/set_cookie.py new file mode 100644 index 00000000000..7e4f3dbb9b0 --- /dev/null +++ b/tests/wpt/tests/webdriver/tests/bidi/storage/set_cookie/set_cookie.py @@ -0,0 +1,60 @@ +import pytest +from webdriver.bidi.modules.network import NetworkStringValue +from webdriver.bidi.modules.storage import PartialCookie, BrowsingContextPartitionDescriptor + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "protocol", + [ + "http", + "https", + ], +) +async def test_set_cookie_protocol(bidi_session, top_context, inline, origin, domain_value, protocol): + # Navigate to a page with a required protocol. + await bidi_session.browsing_context.navigate( + context=top_context["context"], url=(inline("<div>foo</div>", protocol=protocol)), wait="complete" + ) + + source_origin = origin(protocol) + partition = BrowsingContextPartitionDescriptor(top_context["context"]) + + set_cookie_result = await bidi_session.storage.set_cookie( + cookie=PartialCookie( + name='foo', + value=NetworkStringValue('bar'), + domain=domain_value(), + secure=True + ), + partition=partition) + + assert set_cookie_result == { + 'partitionKey': { + 'sourceOrigin': source_origin + }, + } + + # Assert the cookie is actually set. + actual_cookies = await bidi_session.storage.get_cookies(partition=partition) + assert actual_cookies == { + 'cookies': [ + { + 'domain': domain_value(), + 'httpOnly': False, + 'name': 'foo', + 'path': '/', + 'sameSite': 'none', + 'secure': True, + 'size': 6, + 'value': { + 'type': 'string', + 'value': 'bar', + }, + }, + ], + 'partitionKey': { + 'sourceOrigin': source_origin, + }, + } diff --git a/tests/wpt/tests/webdriver/tests/classic/new_session/default_values.py b/tests/wpt/tests/webdriver/tests/classic/new_session/default_values.py index 678d7a8e881..ac544c1338c 100644 --- a/tests/wpt/tests/webdriver/tests/classic/new_session/default_values.py +++ b/tests/wpt/tests/webdriver/tests/classic/new_session/default_values.py @@ -1,3 +1,4 @@ +# META: timeout=long from tests.support.asserts import assert_error, assert_success diff --git a/tests/wpt/tests/webdriver/tests/support/fixtures_bidi.py b/tests/wpt/tests/webdriver/tests/support/fixtures_bidi.py index c073997215e..f4c4c19c3bb 100644 --- a/tests/wpt/tests/webdriver/tests/support/fixtures_bidi.py +++ b/tests/wpt/tests/webdriver/tests/support/fixtures_bidi.py @@ -20,10 +20,11 @@ from webdriver.error import TimeoutException async def add_preload_script(bidi_session): preload_scripts_ids = [] - async def add_preload_script(function_declaration, arguments=None, sandbox=None): + async def add_preload_script(function_declaration, arguments=None, contexts=None, sandbox=None): script = await bidi_session.script.add_preload_script( function_declaration=function_declaration, arguments=arguments, + contexts=contexts, sandbox=sandbox, ) preload_scripts_ids.append(script) diff --git a/tests/wpt/tests/webdriver/tests/support/helpers.py b/tests/wpt/tests/webdriver/tests/support/helpers.py index 0a8e1dc1a4f..9870643b3d9 100644 --- a/tests/wpt/tests/webdriver/tests/support/helpers.py +++ b/tests/wpt/tests/webdriver/tests/support/helpers.py @@ -57,9 +57,15 @@ def cleanup_session(session): or fullscreened state. """ if session.capabilities.get("setWindowRect"): - # Only resize if needed to workaround a bug for Chrome: + # Only restore if needed to workaround a bug for Chrome: # https://bugs.chromium.org/p/chromedriver/issues/detail?id=4642#c4 - if session.window.size != defaults.WINDOW_SIZE: + if ( + session.capabilities.get("browserName") != "chrome" or + session.window.size != defaults.WINDOW_SIZE + or document_hidden(session) + or is_fullscreen(session) + or is_maximized(session) + ): session.window.size = defaults.WINDOW_SIZE @ignore_exceptions diff --git a/tests/wpt/tests/webrtc/RTCPeerConnection-GC.https.html b/tests/wpt/tests/webrtc/RTCPeerConnection-GC.https.html index cd9c33224ef..156a2e1f093 100644 --- a/tests/wpt/tests/webrtc/RTCPeerConnection-GC.https.html +++ b/tests/wpt/tests/webrtc/RTCPeerConnection-GC.https.html @@ -40,15 +40,11 @@ promise_test(async t => { const start = performance.now(); const width = destVideo.videoWidth; const height = destVideo.videoHeight; - const resizeEvent = new Promise(r => destVideo.onresize = r); while (destVideo.videoWidth == width && destVideo.videoHeight == height) { if (performance.now() - start > 5000) { throw new Error("Timeout waiting for video size change"); } - await Promise.race([ - resizeEvent, - new Promise(r => t.step_timeout(r, 50)), - ]); + await new Promise(r => t.step_timeout(r, 50)); } }; diff --git a/tests/wpt/tests/webrtc/simulcast/simulcast.js b/tests/wpt/tests/webrtc/simulcast/simulcast.js index 1886531023d..e0b90d8ac37 100644 --- a/tests/wpt/tests/webrtc/simulcast/simulcast.js +++ b/tests/wpt/tests/webrtc/simulcast/simulcast.js @@ -24,7 +24,7 @@ function ridToMid(description, rids) { // Skip mid extension; we are replacing it with the rid extmap rtpParameters.headerExtensions = rtpParameters.headerExtensions.filter( - ext => ext.uri != 'urn:ietf:params:rtp-hdrext:sdes:mid' + ext => ext.uri !== 'urn:ietf:params:rtp-hdrext:sdes:mid' ); for (const ext of rtpParameters.headerExtensions) { @@ -45,7 +45,8 @@ function ridToMid(description, rids) { let sdp = SDPUtils.writeSessionBoilerplate() + SDPUtils.writeDtlsParameters(dtls, setupValue) + SDPUtils.writeIceParameters(ice) + - 'a=group:BUNDLE ' + rids.join(' ') + '\r\n'; + 'a=group:BUNDLE ' + rids.join(' ') + '\r\n' + + 'a=msid-semantic: WMS *\r\n'; const baseRtpDescription = SDPUtils.writeRtpDescription(mline.kind, rtpParameters); for (const rid of rids) { sdp += baseRtpDescription + @@ -107,7 +108,8 @@ function midToRid(description, localDescription, rids) { let sdp = SDPUtils.writeSessionBoilerplate() + SDPUtils.writeDtlsParameters(dtls, setupValue) + SDPUtils.writeIceParameters(ice) + - 'a=group:BUNDLE ' + localMid + '\r\n'; + 'a=group:BUNDLE ' + localMid + '\r\n' + + 'a=msid-semantic: WMS *\r\n'; sdp += SDPUtils.writeRtpDescription(mline.kind, rtpParameters); // Although we are converting mids to rids, we still need a mid. // The first one will be consistent with trickle ICE candidates. |