From a6c14dba0ba4ec229819aded9f47cffc75ee13b0 Mon Sep 17 00:00:00 2001 From: Uzlopak <5059100+Uzlopak@users.noreply.github.com> Date: Mon, 23 Sep 2024 00:17:30 +0000 Subject: [PATCH] chore: update WPT --- ...uest-constructor-init-body-override.any.js | 16 ++++++++++ .../wpt/interfaces/digital-credentials.idl | 10 ++----- .../wpt/interfaces/mediaqueries-5.idl | 30 +++++++++++++++++++ test/fixtures/wpt/interfaces/webauthn.idl | 2 +- test/fixtures/wpt/interfaces/webhid.idl | 10 +++---- test/fixtures/wpt/interfaces/webnn.idl | 2 +- test/fixtures/wpt/interfaces/webtransport.idl | 2 ++ test/fixtures/wpt/resources/testdriver.js | 7 ++--- 8 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 test/fixtures/wpt/interfaces/mediaqueries-5.idl diff --git a/test/fixtures/wpt/fetch/api/request/request-constructor-init-body-override.any.js b/test/fixtures/wpt/fetch/api/request/request-constructor-init-body-override.any.js index 27bb991871a..c2bbf86f304 100644 --- a/test/fixtures/wpt/fetch/api/request/request-constructor-init-body-override.any.js +++ b/test/fixtures/wpt/fetch/api/request/request-constructor-init-body-override.any.js @@ -18,4 +18,20 @@ promise_test(async function () { "req2", "The body of the second request should be overridden to 'req2'." ); + }, "Check that the body of a new request can be overridden when created from an existing Request object"); + +promise_test(async function () { + const req1 = new Request("https://example.com/", { + body: "req1", + method: "POST", + }); + + const req2 = new Request("https://example.com/", req1); + const bodyText = await req2.text(); + assert_equals( + bodyText, + "req1", + "The body of the second request should be the same as the first." + ); +}, "Check that the body of a new request can be duplicated from an existing Request object"); diff --git a/test/fixtures/wpt/interfaces/digital-credentials.idl b/test/fixtures/wpt/interfaces/digital-credentials.idl index a12ce5a2ba2..2207b25dd57 100644 --- a/test/fixtures/wpt/interfaces/digital-credentials.idl +++ b/test/fixtures/wpt/interfaces/digital-credentials.idl @@ -3,21 +3,17 @@ // (https://github.com/w3c/webref) // Source: Digital Credentials (https://wicg.github.io/digital-credentials/) -partial interface Navigator { - [SecureContext, SameObject] readonly attribute CredentialsContainer identity; -}; - partial dictionary CredentialRequestOptions { DigitalCredentialRequestOptions digital; }; dictionary DigitalCredentialRequestOptions { - sequence providers; + sequence requests; }; -dictionary DigitalCredentialsProvider { +dictionary DigitalCredentialsRequest { required DOMString protocol; - required object request; + required object data; }; [Exposed=Window, SecureContext] diff --git a/test/fixtures/wpt/interfaces/mediaqueries-5.idl b/test/fixtures/wpt/interfaces/mediaqueries-5.idl new file mode 100644 index 00000000000..52154c96725 --- /dev/null +++ b/test/fixtures/wpt/interfaces/mediaqueries-5.idl @@ -0,0 +1,30 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: Media Queries Level 5 (https://drafts.csswg.org/mediaqueries-5/) + +[Exposed=Window, SecureContext] +partial interface Navigator { + [SameObject] readonly attribute PreferenceManager preferences; +}; + +[Exposed=Window, SecureContext] +interface PreferenceManager { + readonly attribute PreferenceObject colorScheme; + readonly attribute PreferenceObject contrast; + readonly attribute PreferenceObject reducedMotion; + readonly attribute PreferenceObject reducedTransparency; + readonly attribute PreferenceObject reducedData; +}; + +[Exposed=Window, SecureContext] +interface PreferenceObject : EventTarget { + readonly attribute DOMString? override; + readonly attribute DOMString value; + readonly attribute FrozenArray validValues; + + undefined clearOverride(); + Promise requestOverride(DOMString? value); + + attribute EventHandler onchange; +}; diff --git a/test/fixtures/wpt/interfaces/webauthn.idl b/test/fixtures/wpt/interfaces/webauthn.idl index b4c0c2de603..2b855144650 100644 --- a/test/fixtures/wpt/interfaces/webauthn.idl +++ b/test/fixtures/wpt/interfaces/webauthn.idl @@ -302,7 +302,7 @@ enum ClientCapability { "signalUnknownCredential" }; -enum PublicKeyCredentialHints { +enum PublicKeyCredentialHint { "security-key", "client-device", "hybrid", diff --git a/test/fixtures/wpt/interfaces/webhid.idl b/test/fixtures/wpt/interfaces/webhid.idl index 03e72511d96..56e3161caed 100644 --- a/test/fixtures/wpt/interfaces/webhid.idl +++ b/test/fixtures/wpt/interfaces/webhid.idl @@ -7,12 +7,12 @@ [SameObject] readonly attribute HID hid; }; -[Exposed=ServiceWorker, SecureContext] +[Exposed=(DedicatedWorker,ServiceWorker), SecureContext] partial interface WorkerNavigator { [SameObject] readonly attribute HID hid; }; -[Exposed=(Window,ServiceWorker), SecureContext] +[Exposed=(DedicatedWorker,ServiceWorker,Window), SecureContext] interface HID : EventTarget { attribute EventHandler onconnect; attribute EventHandler ondisconnect; @@ -33,7 +33,7 @@ dictionary HIDDeviceFilter { unsigned short usage; }; -[Exposed=Window, SecureContext] +[Exposed=(DedicatedWorker,ServiceWorker,Window), SecureContext] interface HIDDevice : EventTarget { attribute EventHandler oninputreport; readonly attribute boolean opened; @@ -51,7 +51,7 @@ interface HIDDevice : EventTarget { Promise receiveFeatureReport([EnforceRange] octet reportId); }; -[Exposed=Window, SecureContext] +[Exposed=(DedicatedWorker,ServiceWorker,Window), SecureContext] interface HIDConnectionEvent : Event { constructor(DOMString type, HIDConnectionEventInit eventInitDict); [SameObject] readonly attribute HIDDevice device; @@ -61,7 +61,7 @@ dictionary HIDConnectionEventInit : EventInit { required HIDDevice device; }; -[Exposed=Window, SecureContext] +[Exposed=(DedicatedWorker,ServiceWorker,Window), SecureContext] interface HIDInputReportEvent : Event { constructor(DOMString type, HIDInputReportEventInit eventInitDict); [SameObject] readonly attribute HIDDevice device; diff --git a/test/fixtures/wpt/interfaces/webnn.idl b/test/fixtures/wpt/interfaces/webnn.idl index f8db7b0d542..9a71f73954c 100644 --- a/test/fixtures/wpt/interfaces/webnn.idl +++ b/test/fixtures/wpt/interfaces/webnn.idl @@ -90,7 +90,7 @@ enum MLOperandDataType { dictionary MLOperandDescriptor { required MLOperandDataType dataType; - sequence<[EnforceRange] unsigned long> dimensions = []; + sequence<[EnforceRange] unsigned long> shape = []; }; [SecureContext, Exposed=(Window, DedicatedWorker)] diff --git a/test/fixtures/wpt/interfaces/webtransport.idl b/test/fixtures/wpt/interfaces/webtransport.idl index 2136cad41e3..6e9d1036736 100644 --- a/test/fixtures/wpt/interfaces/webtransport.idl +++ b/test/fixtures/wpt/interfaces/webtransport.idl @@ -25,6 +25,7 @@ interface WebTransport { readonly attribute WebTransportCongestionControl congestionControl; [EnforceRange] attribute unsigned short? anticipatedConcurrentIncomingUnidirectionalStreams; [EnforceRange] attribute unsigned short? anticipatedConcurrentIncomingBidirectionalStreams; + readonly attribute DOMString protocol; readonly attribute Promise closed; readonly attribute Promise draining; @@ -64,6 +65,7 @@ dictionary WebTransportOptions { WebTransportCongestionControl congestionControl = "default"; [EnforceRange] unsigned short? anticipatedConcurrentIncomingUnidirectionalStreams = null; [EnforceRange] unsigned short? anticipatedConcurrentIncomingBidirectionalStreams = null; + sequence protocols = []; }; enum WebTransportCongestionControl { diff --git a/test/fixtures/wpt/resources/testdriver.js b/test/fixtures/wpt/resources/testdriver.js index b873b5c616a..d05be1d7df9 100644 --- a/test/fixtures/wpt/resources/testdriver.js +++ b/test/fixtures/wpt/resources/testdriver.js @@ -176,11 +176,10 @@ }, /** - * Triggers a user-initiated click + * Triggers a user-initiated mouse click. * - * If ``element`` isn't inside the - * viewport, it will be scrolled into view before the click - * occurs. + * If ``element`` isn't inside the viewport, it will be + * scrolled into view before the click occurs. * * If ``element`` is from a different browsing context, the * command will be run in that context.