diff --git a/test/fixtures/wpt/fetch/content-encoding/zstd/WEB_FEATURES.yml b/test/fixtures/wpt/fetch/content-encoding/zstd/WEB_FEATURES.yml new file mode 100644 index 00000000000..b5d970fdb14 --- /dev/null +++ b/test/fixtures/wpt/fetch/content-encoding/zstd/WEB_FEATURES.yml @@ -0,0 +1,3 @@ +features: +- name: zstd + files: "**" diff --git a/test/fixtures/wpt/fetch/private-network-access/README.md b/test/fixtures/wpt/fetch/private-network-access/README.md index a69aab48723..cbb5b85b74d 100644 --- a/test/fixtures/wpt/fetch/private-network-access/README.md +++ b/test/fixtures/wpt/fetch/private-network-access/README.md @@ -8,3 +8,6 @@ See also: * [The specification](https://wicg.github.io/private-network-access/) * [The repository](https://github.com/WICG/private-network-access/) * [Open issues](https://github.com/WICG/private-network-access/issues/) + +Private Network Access is deprecated and will eventually be replaced by [Local +Network Access](https://github.com/explainers-by-googlers/local-network-access). diff --git a/test/fixtures/wpt/interfaces/fedcm.idl b/test/fixtures/wpt/interfaces/fedcm.idl index f7038a6fee1..c26e2b14c73 100644 --- a/test/fixtures/wpt/interfaces/fedcm.idl +++ b/test/fixtures/wpt/interfaces/fedcm.idl @@ -12,6 +12,7 @@ interface IdentityCredential : Credential { static Promise disconnect(IdentityCredentialDisconnectOptions options); readonly attribute USVString? token; readonly attribute boolean isAutoSelected; + readonly attribute USVString configURL; }; dictionary DisconnectedAccount { @@ -78,6 +79,7 @@ dictionary IdentityProviderAPIConfig { required USVString login_url; USVString disconnect_endpoint; IdentityProviderBranding branding; + USVString account_label; }; dictionary IdentityProviderAccount { @@ -89,6 +91,7 @@ dictionary IdentityProviderAccount { sequence approved_clients; sequence login_hints; sequence domain_hints; + sequence label_hints; }; dictionary IdentityProviderAccountList { sequence accounts; diff --git a/test/fixtures/wpt/interfaces/webaudio.idl b/test/fixtures/wpt/interfaces/webaudio.idl index 3b351f4d9e9..286aeba4069 100644 --- a/test/fixtures/wpt/interfaces/webaudio.idl +++ b/test/fixtures/wpt/interfaces/webaudio.idl @@ -6,7 +6,8 @@ enum AudioContextState { "suspended", "running", - "closed" + "closed", + "interrupted" }; enum AudioContextRenderSizeCategory { diff --git a/test/fixtures/wpt/interfaces/webgpu.idl b/test/fixtures/wpt/interfaces/webgpu.idl index d91a6a710b1..de1f7c1e52b 100644 --- a/test/fixtures/wpt/interfaces/webgpu.idl +++ b/test/fixtures/wpt/interfaces/webgpu.idl @@ -64,6 +64,7 @@ interface GPUAdapterInfo { readonly attribute DOMString description; readonly attribute unsigned long subgroupMinSize; readonly attribute unsigned long subgroupMaxSize; + readonly attribute boolean isFallbackAdapter; }; interface mixin NavigatorGPU { @@ -96,7 +97,6 @@ interface GPUAdapter { [SameObject] readonly attribute GPUSupportedFeatures features; [SameObject] readonly attribute GPUSupportedLimits limits; [SameObject] readonly attribute GPUAdapterInfo info; - readonly attribute boolean isFallbackAdapter; Promise requestDevice(optional GPUDeviceDescriptor descriptor = {}); }; @@ -936,12 +936,16 @@ interface GPUCommandEncoder { GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor); GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {}); + undefined copyBufferToBuffer( + GPUBuffer source, + GPUBuffer destination, + optional GPUSize64 size); undefined copyBufferToBuffer( GPUBuffer source, GPUSize64 sourceOffset, GPUBuffer destination, GPUSize64 destinationOffset, - GPUSize64 size); + optional GPUSize64 size); undefined copyBufferToTexture( GPUTexelCopyBufferInfo source, diff --git a/test/fixtures/wpt/interfaces/webxr.idl b/test/fixtures/wpt/interfaces/webxr.idl index dea448d7440..1098000d6c2 100644 --- a/test/fixtures/wpt/interfaces/webxr.idl +++ b/test/fixtures/wpt/interfaces/webxr.idl @@ -70,6 +70,7 @@ enum XRVisibilityState { dictionary XRRenderStateInit { double depthNear; double depthFar; + boolean passthroughFullyObscured; double inlineVerticalFieldOfView; XRWebGLLayer? baseLayer; sequence? layers; @@ -78,6 +79,7 @@ dictionary XRRenderStateInit { [SecureContext, Exposed=Window] interface XRRenderState { readonly attribute double depthNear; readonly attribute double depthFar; + readonly attribute boolean? passthroughFullyObscured; readonly attribute double? inlineVerticalFieldOfView; readonly attribute XRWebGLLayer? baseLayer; }; diff --git a/test/fixtures/wpt/resources/testdriver.js b/test/fixtures/wpt/resources/testdriver.js index 05301bf5589..15f3a4b7cc7 100644 --- a/test/fixtures/wpt/resources/testdriver.js +++ b/test/fixtures/wpt/resources/testdriver.js @@ -1428,7 +1428,7 @@ * Causes a virtual pressure source to report a new reading. * * Matches the `Update virtual pressure source - * `_ + * `_ * WebDriver command. * * @param {String} source_type - A `virtual pressure source type @@ -1437,6 +1437,8 @@ * @param {String} sample - A `virtual pressure state * `_ * such as "critical". + * @param {number} estimate - Optional, A `virtual own contribution estimate` + * `_ * @param {WindowProxy} [context=null] - Browsing context in which to * run the call, or null for the * current browsing context. @@ -1447,8 +1449,8 @@ * virtual pressure source of the given type does not * exist). */ - update_virtual_pressure_source: function(source_type, sample, context=null) { - return window.test_driver_internal.update_virtual_pressure_source(source_type, sample, context); + update_virtual_pressure_source: function(source_type, sample, estimate, context=null) { + return window.test_driver_internal.update_virtual_pressure_source(source_type, sample, estimate, context); }, /** @@ -1472,6 +1474,29 @@ */ remove_virtual_pressure_source: function(source_type, context=null) { return window.test_driver_internal.remove_virtual_pressure_source(source_type, context); + }, + + /** + * Sets which hashes are considered k-anonymous for the Protected + * Audience interest group with specified `owner` and `name`. + * + * Matches the `Set Protected Audience K-Anonymity + * + * WebDriver command. + * + * @param {String} owner - Origin of the owner of the interest group + * to modify + * @param {String} name - Name of the interest group to modify + * @param {Array} hashes - An array of strings, each of which is a + * base64 ecoded hash to consider k-anonymous. + * + * @returns {Promise} Fulfilled after the k-anonymity status for the + * specified Protected Audience interest group has + * been updated. + * + */ + set_protected_audience_k_anonymity: function(owner, name, hashes, context = null) { + return window.test_driver_internal.set_protected_audience_k_anonymity(owner, name, hashes, context); } }; @@ -1723,12 +1748,16 @@ throw new Error("create_virtual_pressure_source() is not implemented by testdriver-vendor.js"); }, - async update_virtual_pressure_source(source_type, sample, context=null) { + async update_virtual_pressure_source(source_type, sample, estimate, context=null) { throw new Error("update_virtual_pressure_source() is not implemented by testdriver-vendor.js"); }, async remove_virtual_pressure_source(source_type, context=null) { throw new Error("remove_virtual_pressure_source() is not implemented by testdriver-vendor.js"); + }, + + async set_protected_audience_k_anonymity(owner, name, hashes, context=null) { + throw new Error("set_protected_audience_k_anonymity() is not implemented by testdriver-vendor.js"); } }; })(); diff --git a/test/fixtures/wpt/resources/testharness.js b/test/fixtures/wpt/resources/testharness.js index 5b5410c8b21..bd668be20f8 100644 --- a/test/fixtures/wpt/resources/testharness.js +++ b/test/fixtures/wpt/resources/testharness.js @@ -1330,6 +1330,15 @@ "0xffff": "uffff", }; + const formatEscapeMap = { + "\\": "\\\\", + '"': '\\"' + }; + for (const p in replacements) { + formatEscapeMap[String.fromCharCode(p)] = "\\" + replacements[p]; + } + const formatEscapePattern = new RegExp(`[${Object.keys(formatEscapeMap).map(k => k === "\\" ? "\\\\" : k).join("")}]`, "g"); + /** * Convert a value to a nice, human-readable string * @@ -1380,12 +1389,7 @@ switch (typeof val) { case "string": - val = val.replace(/\\/g, "\\\\"); - for (var p in replacements) { - var replace = "\\" + replacements[p]; - val = val.replace(RegExp(String.fromCharCode(p), "g"), replace); - } - return '"' + val.replace(/"/g, '\\"') + '"'; + return '"' + val.replace(formatEscapePattern, match => formatEscapeMap[match]) + '"'; case "boolean": case "undefined": return String(val); diff --git a/test/fixtures/wpt/xhr/resources/redirect.py b/test/fixtures/wpt/xhr/resources/redirect.py index 3839b635e02..e2786b45031 100644 --- a/test/fixtures/wpt/xhr/resources/redirect.py +++ b/test/fixtures/wpt/xhr/resources/redirect.py @@ -1,10 +1,15 @@ import time +from urllib.parse import parse_qs from wptserve.utils import isomorphic_encode def main(request, response): code = int(request.GET.first(b"code", 302)) location = request.GET.first(b"location", isomorphic_encode(request.url_parts.path + u"?followed")) + if location: + location = parse_qs(u"location=" + location.decode(u"UTF-8"))[u"location"][0] + if location.startswith(u"redirect.py"): + location += u"&code=" + str(code) if b"delay" in request.GET: delay = float(request.GET.first(b"delay")) diff --git a/test/fixtures/wpt/xhr/send-redirect.htm b/test/fixtures/wpt/xhr/send-redirect.htm index 7d73f0f64cc..de3899f5e5d 100644 --- a/test/fixtures/wpt/xhr/send-redirect.htm +++ b/test/fixtures/wpt/xhr/send-redirect.htm @@ -10,36 +10,73 @@
diff --git a/test/fixtures/wpt/xhr/setrequestheader-case-insensitive.htm b/test/fixtures/wpt/xhr/setrequestheader-case-insensitive.htm index 1aed30d1c2a..ce10482cad8 100644 --- a/test/fixtures/wpt/xhr/setrequestheader-case-insensitive.htm +++ b/test/fixtures/wpt/xhr/setrequestheader-case-insensitive.htm @@ -9,26 +9,28 @@