Skip to content

Commit d0776e8

Browse files
chore: update WPT (#4067)
Co-authored-by: Uzlopak <[email protected]>
1 parent a180465 commit d0776e8

38 files changed

+463
-143
lines changed

Diff for: test/fixtures/wpt/common/redirect.py

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ def main(request, response):
44
The request should typically have two query parameters:
55
status - The status to use for the redirection. Defaults to 302.
66
location - The resource to redirect to.
7+
8+
This utility optionally supports CORS (iff the `enable-cors` query param is
9+
present).
710
"""
811
status = 302
912
if b"status" in request.GET:
@@ -17,3 +20,10 @@ def main(request, response):
1720
location = request.GET.first(b"location")
1821

1922
response.headers.set(b"Location", location)
23+
24+
if request.GET.get(b"enable-cors") is not None:
25+
origin = request.headers.get(b"Origin")
26+
if origin:
27+
response.headers.set(b"Content-Type", b"text/plain")
28+
response.headers.set(b"Access-Control-Allow-Origin", origin)
29+
response.headers.set(b"Access-Control-Allow-Credentials", 'true')
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// META: script=../../../service-workers/service-worker/resources/test-helpers.sub.js
2+
3+
promise_test(async t => {
4+
const frame = await with_iframe('./resources/hello.html.br');
5+
assert_equals(frame.contentDocument.body.textContent, 'Hello world');
6+
}, `Naigation to br encoded page`);
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Content-type: text/html
2+
Content-Encoding: br
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// META: script=../../../service-workers/service-worker/resources/test-helpers.sub.js
2+
3+
promise_test(async t => {
4+
const frame = await with_iframe('./resources/hello.html.gz');
5+
assert_equals(frame.contentDocument.body.textContent, 'Hello world');
6+
}, `Naigation to gzip encoded page`);
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Content-type: text/html
2+
Content-Encoding: gzip
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Content-type: text/html
2+
Content-Encoding: zstd
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// META: script=../../../service-workers/service-worker/resources/test-helpers.sub.js
2+
3+
promise_test(async t => {
4+
const frame = await with_iframe('./resources/hello.html.zst');
5+
assert_equals(frame.contentDocument.body.textContent, 'Hello world');
6+
}, `Naigation to zstd encoded page`);

Diff for: test/fixtures/wpt/interfaces/DOM-Parsing.idl

-10
This file was deleted.

Diff for: test/fixtures/wpt/interfaces/SVG.idl

-4
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,6 @@ interface SVGAnimatedPreserveAspectRatio {
418418
[SameObject] readonly attribute SVGPreserveAspectRatio animVal;
419419
};
420420

421-
[Exposed=Window]
422-
interface SVGPathElement : SVGGeometryElement {
423-
};
424-
425421
[Exposed=Window]
426422
interface SVGRectElement : SVGGeometryElement {
427423
[SameObject] readonly attribute SVGAnimatedLength x;

Diff for: test/fixtures/wpt/interfaces/css-mixins.idl

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@
44
// Source: CSS Functions and Mixins Module (https://drafts.csswg.org/css-mixins-1/)
55

66
[Exposed=Window]
7-
interface CSSFunctionRule : CSSGroupingRule { };
7+
interface CSSFunctionRule : CSSGroupingRule {
8+
readonly attribute CSSOMString name;
9+
sequence<FunctionParameter> getParameters();
10+
readonly attribute CSSOMString returnType;
11+
};
12+
13+
dictionary FunctionParameter {
14+
required CSSOMString name;
15+
required CSSOMString type;
16+
CSSOMString? defaultValue;
17+
};
818

919
[Exposed=Window]
1020
interface CSSFunctionDescriptors : CSSStyleDeclaration {

Diff for: test/fixtures/wpt/interfaces/dom.idl

+2
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ interface mixin ParentNode {
124124
[CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
125125
[CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);
126126

127+
[CEReactions] undefined moveBefore(Node node, Node? child);
128+
127129
Element? querySelector(DOMString selectors);
128130
[NewObject] NodeList querySelectorAll(DOMString selectors);
129131
};

Diff for: test/fixtures/wpt/interfaces/html.idl

+8
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,7 @@ interface mixin CanvasPathDrawingStyles {
14831483

14841484
interface mixin CanvasTextDrawingStyles {
14851485
// text
1486+
attribute DOMString lang; // (default: "inherit")
14861487
attribute DOMString font; // (default 10px sans-serif)
14871488
attribute CanvasTextAlign textAlign; // (default: "start")
14881489
attribute CanvasTextBaseline textBaseline; // (default: "alphabetic")
@@ -2368,6 +2369,13 @@ partial interface Range {
23682369
[CEReactions, NewObject] DocumentFragment createContextualFragment((TrustedHTML or DOMString) string);
23692370
};
23702371

2372+
[Exposed=Window]
2373+
interface XMLSerializer {
2374+
constructor();
2375+
2376+
DOMString serializeToString(Node root);
2377+
};
2378+
23712379
[Exposed=Window]
23722380
interface Navigator {
23732381
// objects implementing this interface also implement the interfaces given below

Diff for: test/fixtures/wpt/interfaces/ppa.idl

+8-9
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ partial interface Navigator {
1010
enum PrivateAttributionProtocol { "dap-12-histogram", "tee-00" };
1111

1212
dictionary PrivateAttributionAggregationService {
13-
required DOMString url;
1413
required DOMString protocol;
1514
};
1615

1716
[SecureContext, Exposed=Window]
1817
interface PrivateAttributionAggregationServices {
19-
readonly setlike<PrivateAttributionAggregationService>;
18+
readonly maplike<USVString, PrivateAttributionAggregationService>;
2019
};
2120

2221
[SecureContext, Exposed=Window]
@@ -27,7 +26,7 @@ interface PrivateAttribution {
2726
dictionary PrivateAttributionImpressionOptions {
2827
required unsigned long histogramIndex;
2928
unsigned long filterData = 0;
30-
required DOMString conversionSite;
29+
required USVString conversionSite;
3130
unsigned long lifetimeDays = 30;
3231
};
3332

@@ -37,19 +36,19 @@ partial interface PrivateAttribution {
3736
};
3837

3938
dictionary PrivateAttributionConversionOptions {
40-
required DOMString aggregationService;
39+
required USVString aggregationService;
4140
double epsilon = 1.0;
4241

4342
required unsigned long histogramSize;
4443

44+
unsigned long lookbackDays;
45+
unsigned long filterData;
46+
sequence<USVString> impressionSites = [];
47+
sequence<USVString> intermediarySites = [];
48+
4549
PrivateAttributionLogic logic = "last-touch";
4650
unsigned long value = 1;
4751
unsigned long maxValue = 1;
48-
49-
unsigned long lookbackDays;
50-
unsigned long filterData;
51-
sequence<DOMString> impressionSites = [];
52-
sequence<DOMString> intermediarySites = [];
5352
};
5453

5554
dictionary PrivateAttributionConversionResult {

Diff for: test/fixtures/wpt/interfaces/private-aggregation-api.idl

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
SecureContext]
88
interface PrivateAggregation {
99
undefined contributeToHistogram(PAHistogramContribution contribution);
10+
undefined contributeToHistogramOnEvent(DOMString event,
11+
record<DOMString, any> contribution);
1012
undefined enableDebugMode(optional PADebugModeOptions options = {});
1113
};
1214

Diff for: test/fixtures/wpt/interfaces/sanitizer-api.tentative.idl

-61
This file was deleted.

Diff for: test/fixtures/wpt/interfaces/shared-storage.idl

+1-3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ dictionary SharedStorageSetMethodOptions : SharedStorageModifierMethodOptions {
7171

7272
[Exposed=(Window,SharedStorageWorklet)]
7373
interface SharedStorage {
74+
Promise<DOMString> get(DOMString key);
7475
Promise<any> set(DOMString key,
7576
DOMString value,
7677
optional SharedStorageSetMethodOptions options = {});
@@ -97,9 +98,6 @@ interface SharedStorage {
9798
[Exposed=Window]
9899
readonly attribute SharedStorageWorklet worklet;
99100

100-
[Exposed=SharedStorageWorklet]
101-
Promise<DOMString> get(DOMString key);
102-
103101
[Exposed=SharedStorageWorklet]
104102
Promise<unsigned long> length();
105103

Diff for: test/fixtures/wpt/interfaces/svg-paths.idl

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// GENERATED CONTENT - DO NOT EDIT
2+
// Content was automatically extracted by Reffy into webref
3+
// (https://github.com/w3c/webref)
4+
// Source: SVG Paths (https://svgwg.org/specs/paths/)
5+
6+
[LegacyNoInterfaceObject, Exposed=Window]
7+
interface SVGPathSegment {
8+
attribute DOMString type;
9+
attribute FrozenArray<float> values;
10+
};
11+
12+
dictionary SVGPathDataSettings {
13+
boolean normalize = false;
14+
};
15+
16+
interface mixin SVGPathData {
17+
sequence<SVGPathSegment> getPathData(optional SVGPathDataSettings settings = {});
18+
undefined setPathData(sequence<SVGPathSegment> pathData);
19+
};
20+
21+
[Exposed=Window]
22+
interface SVGPathElement : SVGGeometryElement {
23+
24+
readonly attribute SVGAnimatedNumber pathLength;
25+
26+
float getTotalLength();
27+
DOMPoint getPointAtLength(float distance);
28+
SVGPathSegment? getPathSegmentAtLength(float distance);
29+
};
30+
31+
SVGPathElement includes SVGPathData;

Diff for: test/fixtures/wpt/interfaces/turtledove.idl

+4-6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dictionary AuctionAd {
1818
sequence<USVString> selectableBuyerAndSellerReportingIds;
1919
sequence<USVString> allowedReportingOrigins;
2020
DOMString adRenderId;
21+
USVString creativeScanningMetadata;
2122
};
2223

2324
dictionary AuctionAdInterestGroupSize {
@@ -106,6 +107,7 @@ dictionary AuctionAdConfig {
106107
USVString trustedScoringSignalsURL;
107108
long maxTrustedScoringSignalsURLLength;
108109
USVString trustedScoringSignalsCoordinator;
110+
boolean sendCreativeScanningMetadata;
109111
sequence<USVString> interestGroupBuyers;
110112
Promise<any> auctionSignals;
111113
Promise<any> sellerSignals;
@@ -218,12 +220,6 @@ dictionary PAExtendedHistogramContribution {
218220
bigint filteringId = 0;
219221
};
220222

221-
[Exposed=InterestGroupScriptRunnerGlobalScope]
222-
partial interface PrivateAggregation {
223-
undefined contributeToHistogramOnEvent(
224-
DOMString event, PAExtendedHistogramContribution contribution);
225-
};
226-
227223
[Exposed=InterestGroupBiddingAndScoringScriptRunnerGlobalScope]
228224
interface ForDebuggingOnly {
229225
undefined reportAdAuctionWin(USVString url);
@@ -351,6 +347,8 @@ dictionary ScoringBrowserSignals {
351347
unsigned long crossOriginDataVersion;
352348
sequence<USVString> adComponents;
353349
boolean forDebuggingOnlyInCooldownOrLockout = false;
350+
USVString creativeScanningMetadata;
351+
sequence<USVString?> adComponentsCreativeScanningMetadata;
354352
};
355353

356354
dictionary ReportingBrowserSignals {

Diff for: test/fixtures/wpt/interfaces/webaudio.idl

-28
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ interface AudioContext : BaseAudioContext {
8080
readonly attribute double baseLatency;
8181
readonly attribute double outputLatency;
8282
[SecureContext] readonly attribute (DOMString or AudioSinkInfo) sinkId;
83-
[SecureContext] readonly attribute AudioRenderCapacity renderCapacity;
8483
attribute EventHandler onsinkchange;
8584
attribute EventHandler onerror;
8685
AudioTimestamp getOutputTimestamp ();
@@ -116,33 +115,6 @@ dictionary AudioTimestamp {
116115
DOMHighResTimeStamp performanceTime;
117116
};
118117

119-
[Exposed=Window]
120-
interface AudioRenderCapacity : EventTarget {
121-
undefined start(optional AudioRenderCapacityOptions options = {});
122-
undefined stop();
123-
attribute EventHandler onupdate;
124-
};
125-
126-
dictionary AudioRenderCapacityOptions {
127-
double updateInterval = 1;
128-
};
129-
130-
[Exposed=Window]
131-
interface AudioRenderCapacityEvent : Event {
132-
constructor (DOMString type, optional AudioRenderCapacityEventInit eventInitDict = {});
133-
readonly attribute double timestamp;
134-
readonly attribute double averageLoad;
135-
readonly attribute double peakLoad;
136-
readonly attribute double underrunRatio;
137-
};
138-
139-
dictionary AudioRenderCapacityEventInit : EventInit {
140-
double timestamp = 0;
141-
double averageLoad = 0;
142-
double peakLoad = 0;
143-
double underrunRatio = 0;
144-
};
145-
146118
[Exposed=Window]
147119
interface OfflineAudioContext : BaseAudioContext {
148120
constructor(OfflineAudioContextOptions contextOptions);

0 commit comments

Comments
 (0)