Skip to content

Commit a93e159

Browse files
metcoder95github-actions[bot]
authored andcommitted
chore: update WPT
1 parent 6211fac commit a93e159

24 files changed

+470
-79
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
features:
2+
- name: fetch-request-streams
3+
files:
4+
- request-upload*
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
features:
2+
- name: zstd
3+
files: "**"

test/fixtures/wpt/fetch/http-cache/heuristic.any.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,33 @@ var tests = [
3232
],
3333
},
3434
{
35-
expected_type: "not_cached"
35+
expected_type: "not_cached",
3636
}
3737
]
38-
}
38+
},
39+
{
40+
name: "HTTP cache does not reuse a redirected response with no max-age and no Last-Modified header",
41+
requests: [
42+
{
43+
response_status: [301, "Moved Permanently"],
44+
response_headers: [
45+
["Cache-Control", "private"],
46+
["Location", "redirect_target"]
47+
],
48+
},
49+
{ skip: true}, // Response to first redirect
50+
{
51+
response_status: [301, "Moved Permanently"],
52+
response_headers: [
53+
["Cache-Control", "private"],
54+
["Location", "redirect_target"]
55+
],
56+
expected_type: "not_cached",
57+
},
58+
{ skip: true}, // response to second redirect
59+
],
60+
check_count: true,
61+
},
3962
];
4063

4164
function check_status(status) {

test/fixtures/wpt/fetch/http-cache/http-cache.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,25 @@ function makeTest (test) {
4343
var uuid = token()
4444
var requests = expandTemplates(test)
4545
var fetchFunctions = makeFetchFunctions(requests, uuid)
46-
return runTest(fetchFunctions, requests, uuid)
46+
return runTest(fetchFunctions, test, requests, uuid)
4747
}
4848
}
4949

5050
function makeFetchFunctions(requests, uuid) {
5151
var fetchFunctions = []
5252
for (let i = 0; i < requests.length; ++i) {
53+
var config = requests[i];
54+
if (config.skip) {
55+
// Skip request are ones that we expect the browser to make in
56+
// response to a redirect. We don't fetch them again, but
57+
// the server needs them in the config to be able to respond to
58+
// them.
59+
continue;
60+
}
5361
fetchFunctions.push({
5462
code: function (idx) {
5563
var config = requests[idx]
56-
var url = makeTestUrl(uuid, config)
64+
var url = makeTestUrl(uuid, config);
5765
var init = fetchInit(requests, config)
5866
return fetch(url, init)
5967
.then(makeCheckResponse(idx, config))
@@ -71,7 +79,7 @@ function makeFetchFunctions(requests, uuid) {
7179
return fetchFunctions
7280
}
7381

74-
function runTest(fetchFunctions, requests, uuid) {
82+
function runTest(fetchFunctions, test, requests, uuid) {
7583
var idx = 0
7684
function runNextStep () {
7785
if (fetchFunctions.length) {
@@ -93,7 +101,7 @@ function runTest(fetchFunctions, requests, uuid) {
93101
.then(function () {
94102
return getServerState(uuid)
95103
}).then(function (testState) {
96-
checkRequests(requests, testState)
104+
checkRequests(test, requests, testState)
97105
return Promise.resolve()
98106
})
99107
}
@@ -153,7 +161,7 @@ function makeCheckResponse (idx, config) {
153161
if ('expected_status' in config) {
154162
assert_equals(response.status, config.expected_status,
155163
`Response ${reqNum} status is ${response.status}, not ${config.expected_status}`)
156-
} else if ('response_status' in config) {
164+
} else if ('response_status' in config && config.response_status[0] != 301) {
157165
assert_equals(response.status, config.response_status[0],
158166
`Response ${reqNum} status is ${response.status}, not ${config.response_status[0]}`)
159167
} else {
@@ -197,7 +205,7 @@ function makeCheckResponseBody (config, uuid) {
197205
}
198206
}
199207

200-
function checkRequests (requests, testState) {
208+
function checkRequests (test, requests, testState) {
201209
var testIdx = 0
202210
for (let i = 0; i < requests.length; ++i) {
203211
var expectedValidatingHeaders = []
@@ -225,6 +233,9 @@ function checkRequests (requests, testState) {
225233
})
226234
}
227235
}
236+
if (test?.check_count && testState) {
237+
assert_equals(requests.length, testState.length);
238+
}
228239
}
229240

230241
function pause () {

test/fixtures/wpt/fetch/http-cache/split-cache.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
function check_server_info() {
129129
return getServerState(uuid)
130130
.then(function (testState) {
131-
checkRequests(local_requests, testState)
131+
checkRequests(undefined, local_requests, testState)
132132
return Promise.resolve()
133133
})
134134
}

test/fixtures/wpt/fetch/private-network-access/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ See also:
88
* [The specification](https://wicg.github.io/private-network-access/)
99
* [The repository](https://github.com/WICG/private-network-access/)
1010
* [Open issues](https://github.com/WICG/private-network-access/issues/)
11+
12+
Private Network Access is deprecated and will eventually be replaced by [Local
13+
Network Access](https://github.com/explainers-by-googlers/local-network-access).

test/fixtures/wpt/interfaces/fedcm.idl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface IdentityCredential : Credential {
1212
static Promise<undefined> disconnect(IdentityCredentialDisconnectOptions options);
1313
readonly attribute USVString? token;
1414
readonly attribute boolean isAutoSelected;
15+
readonly attribute USVString configURL;
1516
};
1617

1718
dictionary DisconnectedAccount {
@@ -78,6 +79,7 @@ dictionary IdentityProviderAPIConfig {
7879
required USVString login_url;
7980
USVString disconnect_endpoint;
8081
IdentityProviderBranding branding;
82+
USVString account_label;
8183
};
8284

8385
dictionary IdentityProviderAccount {
@@ -89,6 +91,7 @@ dictionary IdentityProviderAccount {
8991
sequence<USVString> approved_clients;
9092
sequence<DOMString> login_hints;
9193
sequence<DOMString> domain_hints;
94+
sequence<DOMString> label_hints;
9295
};
9396
dictionary IdentityProviderAccountList {
9497
sequence<IdentityProviderAccount> accounts;

test/fixtures/wpt/interfaces/ppa.idl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ dictionary PrivateAttributionConversionOptions {
5151
unsigned long maxValue = 1;
5252
};
5353

54+
enum PrivateAttributionLogic {
55+
"last-touch",
56+
};
57+
5458
dictionary PrivateAttributionConversionResult {
5559
required Uint8Array report;
5660
};
@@ -59,7 +63,3 @@ dictionary PrivateAttributionConversionResult {
5963
partial interface PrivateAttribution {
6064
Promise<PrivateAttributionConversionResult> measureConversion(PrivateAttributionConversionOptions options);
6165
};
62-
63-
enum PrivateAttributionLogic {
64-
"last-touch",
65-
};

test/fixtures/wpt/interfaces/screen-capture.idl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ partial dictionary MediaTrackSettings {
7171
DOMString cursor;
7272
boolean restrictOwnAudio;
7373
boolean suppressLocalAudioPlayback;
74+
double screenPixelRatio;
7475
};
7576

7677
partial dictionary MediaTrackCapabilities {

test/fixtures/wpt/interfaces/speech-api.idl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface SpeechRecognition : EventTarget {
1919
undefined start(MediaStreamTrack audioTrack);
2020
undefined stop();
2121
undefined abort();
22-
static Promise<boolean> availableOnDevice(DOMString lang);
22+
static Promise<AvailabilityStatus> availableOnDevice(DOMString lang);
2323
static Promise<boolean> installOnDevice(DOMString lang);
2424

2525
// event methods
@@ -52,6 +52,13 @@ enum SpeechRecognitionMode {
5252
"cloud-only", // Cloud speech recognition only.
5353
};
5454

55+
enum AvailabilityStatus {
56+
"unavailable",
57+
"downloadable",
58+
"downloading",
59+
"available"
60+
};
61+
5562
[Exposed=Window]
5663
interface SpeechRecognitionErrorEvent : Event {
5764
constructor(DOMString type, SpeechRecognitionErrorEventInit eventInitDict);

test/fixtures/wpt/interfaces/webaudio.idl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
enum AudioContextState {
77
"suspended",
88
"running",
9-
"closed"
9+
"closed",
10+
"interrupted"
1011
};
1112

1213
enum AudioContextRenderSizeCategory {

test/fixtures/wpt/interfaces/webgpu.idl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ interface GPUAdapterInfo {
6464
readonly attribute DOMString description;
6565
readonly attribute unsigned long subgroupMinSize;
6666
readonly attribute unsigned long subgroupMaxSize;
67+
readonly attribute boolean isFallbackAdapter;
6768
};
6869

6970
interface mixin NavigatorGPU {
@@ -96,7 +97,6 @@ interface GPUAdapter {
9697
[SameObject] readonly attribute GPUSupportedFeatures features;
9798
[SameObject] readonly attribute GPUSupportedLimits limits;
9899
[SameObject] readonly attribute GPUAdapterInfo info;
99-
readonly attribute boolean isFallbackAdapter;
100100

101101
Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {});
102102
};
@@ -936,12 +936,16 @@ interface GPUCommandEncoder {
936936
GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor);
937937
GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {});
938938

939+
undefined copyBufferToBuffer(
940+
GPUBuffer source,
941+
GPUBuffer destination,
942+
optional GPUSize64 size);
939943
undefined copyBufferToBuffer(
940944
GPUBuffer source,
941945
GPUSize64 sourceOffset,
942946
GPUBuffer destination,
943947
GPUSize64 destinationOffset,
944-
GPUSize64 size);
948+
optional GPUSize64 size);
945949

946950
undefined copyBufferToTexture(
947951
GPUTexelCopyBufferInfo source,

test/fixtures/wpt/interfaces/webrtc-stats.idl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ dictionary RTCCodecStats : RTCStats {
3838

3939
dictionary RTCReceivedRtpStreamStats : RTCRtpStreamStats {
4040
unsigned long long packetsReceived;
41+
unsigned long long packetsReceivedWithEct1;
42+
unsigned long long packetsReceivedWithCe;
43+
unsigned long long packetsReportedAsLost;
44+
unsigned long long packetsReportedAsLostButRecovered;
4145
long long packetsLost;
4246
double jitter;
4347
};
@@ -107,18 +111,21 @@ dictionary RTCRemoteInboundRtpStreamStats : RTCReceivedRtpStreamStats {
107111
double totalRoundTripTime;
108112
double fractionLost;
109113
unsigned long long roundTripTimeMeasurements;
114+
unsigned long long packetsWithBleachedEct1Marking;
110115
};
111116

112117
dictionary RTCSentRtpStreamStats : RTCRtpStreamStats {
113-
unsigned long long packetsSent;
114-
unsigned long long bytesSent;
118+
unsigned long long packetsSent;
119+
unsigned long long bytesSent;
120+
unsigned long long packetsSentWithEct1;
115121
};
116122

117123
dictionary RTCOutboundRtpStreamStats : RTCSentRtpStreamStats {
118124
DOMString mid;
119125
DOMString mediaSourceId;
120126
DOMString remoteId;
121127
DOMString rid;
128+
unsigned long encodingIndex;
122129
unsigned long long headerBytesSent;
123130
unsigned long long retransmittedPacketsSent;
124131
unsigned long long retransmittedBytesSent;
@@ -225,6 +232,8 @@ dictionary RTCTransportStats : RTCStats {
225232
RTCDtlsRole dtlsRole;
226233
DOMString srtpCipher;
227234
unsigned long selectedCandidatePairChanges;
235+
unsigned long ccfbMessagesSent;
236+
unsigned long ccfbMessagesReceived;
228237
};
229238

230239
enum RTCDtlsRole {

test/fixtures/wpt/interfaces/webrtc.idl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ dictionary RTCLocalSessionDescriptionInit {
163163

164164
[Exposed=Window]
165165
interface RTCIceCandidate {
166-
constructor(optional RTCIceCandidateInit candidateInitDict = {});
166+
constructor(optional RTCLocalIceCandidateInit candidateInitDict = {});
167167
readonly attribute DOMString candidate;
168168
readonly attribute DOMString? sdpMid;
169169
readonly attribute unsigned short? sdpMLineIndex;
@@ -179,7 +179,7 @@ interface RTCIceCandidate {
179179
readonly attribute unsigned short? relatedPort;
180180
readonly attribute DOMString? usernameFragment;
181181
readonly attribute RTCIceServerTransportProtocol? relayProtocol;
182-
readonly attribute DOMString? url;
182+
readonly attribute USVString? url;
183183
RTCIceCandidateInit toJSON();
184184
};
185185

@@ -190,6 +190,11 @@ dictionary RTCIceCandidateInit {
190190
DOMString? usernameFragment = null;
191191
};
192192

193+
dictionary RTCLocalIceCandidateInit : RTCIceCandidateInit {
194+
RTCIceServerTransportProtocol? relayProtocol = null;
195+
USVString? url = null;
196+
};
197+
193198
enum RTCIceProtocol {
194199
"udp",
195200
"tcp"
@@ -218,7 +223,7 @@ enum RTCIceServerTransportProtocol {
218223
interface RTCPeerConnectionIceEvent : Event {
219224
constructor(DOMString type, optional RTCPeerConnectionIceEventInit eventInitDict = {});
220225
readonly attribute RTCIceCandidate? candidate;
221-
readonly attribute DOMString? url;
226+
readonly attribute USVString? url;
222227
};
223228

224229
dictionary RTCPeerConnectionIceEventInit : EventInit {

test/fixtures/wpt/interfaces/webxr.idl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ enum XRVisibilityState {
7070
dictionary XRRenderStateInit {
7171
double depthNear;
7272
double depthFar;
73+
boolean passthroughFullyObscured;
7374
double inlineVerticalFieldOfView;
7475
XRWebGLLayer? baseLayer;
7576
sequence<XRLayer>? layers;
@@ -78,6 +79,7 @@ dictionary XRRenderStateInit {
7879
[SecureContext, Exposed=Window] interface XRRenderState {
7980
readonly attribute double depthNear;
8081
readonly attribute double depthFar;
82+
readonly attribute boolean? passthroughFullyObscured;
8183
readonly attribute double? inlineVerticalFieldOfView;
8284
readonly attribute XRWebGLLayer? baseLayer;
8385
};

0 commit comments

Comments
 (0)