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 + + + + + + diff --git a/tests/wpt/tests/infrastructure/testdriver/actions/crossOriginChild.html b/tests/wpt/tests/infrastructure/testdriver/actions/support/actions.html similarity index 72% rename from tests/wpt/tests/infrastructure/testdriver/actions/crossOriginChild.html rename to 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 @@ 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 @@ - - - - - - -The quick brown fox jumps over the lazy dog - - - 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 @@ - - - - - - - - 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 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 providers; + required sequence 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 approved_clients; sequence login_hints; + sequence domain_hints; }; dictionary IdentityProviderAccountList { sequence 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? 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; - 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; +}; + [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; @@ -1944,6 +1953,13 @@ interface NavigationTransition { readonly attribute Promise finished; }; +[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); @@ -2044,6 +2060,16 @@ dictionary HashChangeEventInit : EventInit { USVString newURL = ""; }; +[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 promise; + readonly attribute object promise; readonly attribute any reason; }; dictionary PromiseRejectionEventInit : EventInit { - required Promise 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 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 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 @@ -75,6 +75,32 @@ interface SourceBufferList : EventTarget { getter SourceBuffer (unsigned long index); }; +[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 requestPermission(); + static Promise 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 interestGroupBuyers; Promise auctionSignals; + record requestedSize; Promise sellerSignals; Promise 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 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 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? 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 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 @@ -36,38 +36,29 @@ interface ML { MLContext createContextSync(GPUDevice gpuDevice); }; -[SecureContext, Exposed=(Window, DedicatedWorker)] -interface MLGraph {}; - -enum MLInputOperandLayout { - "nchw", - "nhwc" -}; - -enum MLOperandDataType { - "float32", - "float16", - "int32", - "uint32", - "int8", - "uint8" -}; - -dictionary MLOperandDescriptor { - // The operand data type. - required MLOperandDataType dataType; - - // The dimensions field is only required for tensor operands. - sequence dimensions; -}; - -[SecureContext, Exposed=(Window, DedicatedWorker)] -interface MLOperand {}; - [SecureContext, Exposed=(Window, DedicatedWorker)] interface MLActivation { }; +typedef (GPUBuffer or GPUTexture) MLGPUResource; + +typedef record 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 = {}); +}; + typedef record MLNamedArrayBufferViews; [SecureContext, Exposed=(Window, DedicatedWorker)] @@ -93,24 +84,8 @@ partial interface MLContext { MLCommandEncoder createCommandEncoder(); }; -typedef (GPUBuffer or GPUTexture) MLGPUResource; - -typedef record 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 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 build(MLNamedOperands outputs); @@ -144,6 +119,17 @@ interface MLGraphBuilder { MLGraph buildSync(MLNamedOperands outputs); }; +dictionary MLArgMinMaxOptions { + sequence 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 = {}); }; @@ -235,15 +225,28 @@ partial interface MLGraphBuilder { MLOperand pow(MLOperand a, MLOperand b); }; +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 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 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 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 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 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 generateKeyFrame(optional DOMString rid); Promise 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 transfer); }; +[Exposed=DedicatedWorker] +interface KeyFrameRequestEvent : Event { + constructor(DOMString type, optional DOMString rid); + readonly attribute DOMString? rid; +}; + partial interface RTCRtpSender { Promise generateKeyFrame(optional sequence 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 @@ + + + + + + + + +
+
+
+ + 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 @@ + + +Resized Image Is Not Reconsidered as LCP. + + + + + + + \ 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 @@ -133,6 +133,12 @@ "noiseSuppression should exist and it should be a boolean."); }, 'noiseSuppression is reported by getSettings() for getUserMedia() audio tracks'); + 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", 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 @@ + +PNG test: eXIf chunk + + + + + + +

eXIf chunk

+

test pixel values of a rotated PNG

+ +

Actual output:

+

FAIL (fallback content)

+ +
    + diff --git a/tests/wpt/tests/png/support/exif-orientation-bottom-right.png b/tests/wpt/tests/png/support/exif-orientation-bottom-right.png new file mode 100644 index 00000000000..261d5f4c120 Binary files /dev/null and b/tests/wpt/tests/png/support/exif-orientation-bottom-right.png differ 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 @@ - - Pointer Events properties tests - - - - - - - - - - + + + + + + + - - -

    Pointer Events no-hover pointer attributes test

    -

    -

    - Test Description: This test checks the properties of pointer events that do not support hover. -
      -
    1. Tap the black square.
    2. -
    3. Then move it off the black square so that it disappears.
    4. -
    5. When the red square appears tap on that as well.
    6. -
    + 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(); + } - Test passes if the proper behavior of the events is observed. -

    -
    - -
    -
    -

    The following pointer types were detected: .

    -

    Refresh the page to run the tests again with a different pointer type.

    -
    -
    - + 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(); + }); + }; + + +
    +
    + +
    + +
    + +
    + 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 @@ + + + + +
    world
    + + 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 @@ + + + + + + + + + +1 +
    + +
    + + 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 @@ + + + + + + + + + + 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`); 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 @@ + + + + + + + + + + + + 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 @@ + + <symbol> with a gradient inside + + + + + + + + + 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 @@ + + <use> with a display="none" symbol + + + + + + + + + + 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. -