Skip to content

Commit

Permalink
chore: update WPT (#3669)
Browse files Browse the repository at this point in the history
Co-authored-by: Uzlopak <[email protected]>
  • Loading branch information
github-actions[bot] and Uzlopak authored Oct 2, 2024
1 parent 44a7e91 commit 87d7ccf
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 173 deletions.
24 changes: 12 additions & 12 deletions test/fixtures/wpt/interfaces/audio-session.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
// (https://github.com/w3c/webref)
// Source: Audio Session (https://w3c.github.io/audio-session/)

enum AudioSessionState {
"inactive",
"active",
"interrupted"
[Exposed=Window]
interface AudioSession : EventTarget {
attribute AudioSessionType type;

readonly attribute AudioSessionState state;
attribute EventHandler onstatechange;
};

enum AudioSessionType {
Expand All @@ -18,16 +20,14 @@ enum AudioSessionType {
"play-and-record"
};

enum AudioSessionState {
"inactive",
"active",
"interrupted"
};

[Exposed=Window]
partial interface Navigator {
// The default audio session that the user agent will use when media elements start/stop playing.
readonly attribute AudioSession audioSession;
};

[Exposed=Window]
interface AudioSession : EventTarget {
attribute AudioSessionType type;

readonly attribute AudioSessionState state;
attribute EventHandler onstatechange;
};
7 changes: 1 addition & 6 deletions test/fixtures/wpt/interfaces/mediacapture-viewport.idl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,5 @@

partial interface MediaDevices {
Promise<MediaStream> getViewportMedia(
optional ViewportMediaStreamConstraints constraints = {});
};

dictionary ViewportMediaStreamConstraints {
(boolean or MediaTrackConstraints) video = true;
(boolean or MediaTrackConstraints) audio = false;
optional DisplayMediaStreamOptions options = {});
};
11 changes: 1 addition & 10 deletions test/fixtures/wpt/interfaces/mediasession.idl
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,8 @@ dictionary MediaPositionState {

dictionary MediaSessionActionDetails {
required MediaSessionAction action;
};

dictionary MediaSessionSeekActionDetails : MediaSessionActionDetails {
double seekOffset;
};

dictionary MediaSessionSeekToActionDetails : MediaSessionActionDetails {
required double seekTime;
double seekTime;
boolean fastSeek;
};

dictionary MediaSessionCaptureActionDetails : MediaSessionActionDetails {
boolean isActivating;
};
2 changes: 1 addition & 1 deletion test/fixtures/wpt/interfaces/observable.idl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ interface Observable {
Observable drop(unsigned long long amount);
Observable flatMap(Mapper mapper);
Observable switchMap(Mapper mapper);
Observable inspect(optional ObservableInspectorUnion inspect_observer = {});
Observable inspect(optional ObservableInspectorUnion inspectorUnion = {});
Observable catch(CatchCallback callback);
Observable finally(VoidFunction callback);

Expand Down
6 changes: 5 additions & 1 deletion test/fixtures/wpt/interfaces/selection-api.idl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface Selection {
undefined removeRange(Range range);
undefined removeAllRanges();
undefined empty();
sequence<StaticRange> getComposedRanges(ShadowRoot... shadowRoots);
sequence<StaticRange> getComposedRanges(optional GetComposedRangesOptions options = {});
undefined collapse(Node? node, optional unsigned long offset = 0);
undefined setPosition(Node? node, optional unsigned long offset = 0);
undefined collapseToStart();
Expand All @@ -32,6 +32,10 @@ interface Selection {
stringifier;
};

dictionary GetComposedRangesOptions {
sequence<ShadowRoot> shadowRoots = [];
};

partial interface Document {
Selection? getSelection();
};
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/wpt/interfaces/service-workers.idl
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ dictionary ExtendableEventInit : EventInit {

[Exposed=ServiceWorker]
interface InstallEvent : ExtendableEvent {
constructor(DOMString type, optional ExtendableEventInit eventInitDict = {});
Promise<undefined> addRoutes((RouterRule or sequence<RouterRule>) rules);
};

Expand Down
1 change: 1 addition & 0 deletions test/fixtures/wpt/interfaces/shared-storage.idl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ dictionary SharedStorageRunOperationMethodOptions {
boolean resolveToConfig = false;
boolean keepAlive = false;
SharedStoragePrivateAggregationConfig privateAggregationConfig;
DOMString savedQuery;
};

dictionary SharedStorageWorkletOptions : WorkletOptions {
Expand Down
12 changes: 9 additions & 3 deletions test/fixtures/wpt/interfaces/turtledove.idl
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,20 @@ partial interface Navigator {
Promise<AdAuctionData> getInterestGroupAdAuctionData(AdAuctionDataConfig config);
};

dictionary AdAuctionData {
required Uint8Array request;
required USVString requestId;
};

dictionary AdAuctionDataConfig {
required USVString seller;
required USVString coordinatorOrigin;
unsigned long requestSize;
record<USVString, AdAuctionDataBuyerConfig> perBuyerConfig;
};

dictionary AdAuctionData {
required Uint8Array request;
required USVString requestId;
dictionary AdAuctionDataBuyerConfig {
unsigned long targetSize;
};

[SecureContext]
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/wpt/interfaces/webgpu.idl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ interface GPU {
};

dictionary GPURequestAdapterOptions {
any featureLevel;
DOMString featureLevel;
GPUPowerPreference powerPreference;
boolean forceFallbackAdapter = false;
};
Expand Down Expand Up @@ -1183,6 +1183,7 @@ interface GPUCanvasContext {
undefined configure(GPUCanvasConfiguration configuration);
undefined unconfigure();

GPUCanvasConfiguration? getConfiguration();
GPUTexture getCurrentTexture();
};

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/interfaces/webnn.idl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ enum MLOperandDataType {

dictionary MLOperandDescriptor {
required MLOperandDataType dataType;
sequence<[EnforceRange] unsigned long> shape = [];
required sequence<[EnforceRange] unsigned long> shape;
};

[SecureContext, Exposed=(Window, DedicatedWorker)]
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/wpt/interfaces/webrtc.idl
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ enum RTCSctpTransportState {
"closed"
};

[Exposed=Window]
[Exposed=(Window,DedicatedWorker), Transferable]
interface RTCDataChannel : EventTarget {
readonly attribute USVString label;
readonly attribute boolean ordered;
Expand Down
131 changes: 0 additions & 131 deletions test/fixtures/wpt/resources/chromium/mock-pressure-service.js

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
assert_equals(entryList.length, 1, description);
const entry = entryList[0];

assert_equals(entry.matchedSourceType, options.matched_source_type, description);
assert_equals(entry.finalSourceType, options.final_source_type, description);
assert_equals(entry.workerMatchedSourceType, options.matched_source_type, description);
assert_equals(entry.workerFinalSourceType, options.final_source_type, description);

assert_greater_than(entry.workerRouterEvaluationStart, 0, description);
switch (entry.matchedSouceType) {
Expand All @@ -60,16 +60,16 @@
case 'cache':
assert_equals(entry.workerStart, 0, description);
assert_greater_than_equal(entry.workerCacheLookupStart, entry.workerRouterEvaluationStart, description);
if (entry.finalSourceType === 'cache') {
assert_equals(entry.fetchStart, 0, description);
if (entry.workerFinalSourceType === 'cache') {
assert_equals(entry.fetchStart, entry.responseStart, description);
assert_less_than_equal(entry.workerCacheLookupStart, entry.responseStart, description);
} else {
assert_less_than_equal(entry.workerCacheLookupStart, entry.fetchStart, description);
}
break;
case 'race-network-and-fetch':
assert_equals(entry.workerCacheLookupStart, 0, description);
if (entry.finalSourceType === 'network') {
if (entry.workerFinalSourceType === 'network') {
assert_equals(entry.workerStart, 0, description);
assert_less_than_equal(entry.workerRouterEvaluationStart, entry.fetchStart, description);
} else {
Expand Down

0 comments on commit 87d7ccf

Please sign in to comment.