diff --git a/test/fixtures/wpt/common/dispatcher/remote-executor-worker.js b/test/fixtures/wpt/common/dispatcher/remote-executor-worker.js new file mode 100644 index 00000000000..afba4bae24f --- /dev/null +++ b/test/fixtures/wpt/common/dispatcher/remote-executor-worker.js @@ -0,0 +1,5 @@ +importScripts('./dispatcher.js'); + +const params = new URLSearchParams(location.search); +const uuid = params.get('uuid'); +const executor = new Executor(uuid); // `execute()` is called in constructor. diff --git a/test/fixtures/wpt/common/dispatcher/remote-executor.html b/test/fixtures/wpt/common/dispatcher/remote-executor.html index 8b0030390d0..f87f566be96 100644 --- a/test/fixtures/wpt/common/dispatcher/remote-executor.html +++ b/test/fixtures/wpt/common/dispatcher/remote-executor.html @@ -3,7 +3,10 @@ - + + + diff --git a/test/fixtures/wpt/interfaces/css-highlight-api.idl b/test/fixtures/wpt/interfaces/css-highlight-api.idl index f3c6b2e9d21..61bf6d4caba 100644 --- a/test/fixtures/wpt/interfaces/css-highlight-api.idl +++ b/test/fixtures/wpt/interfaces/css-highlight-api.idl @@ -25,3 +25,11 @@ partial namespace CSS { interface HighlightRegistry { maplike; }; + +partial interface HighlightRegistry { + sequence highlightsFromPoint(float x, float y, optional HighlightsFromPointOptions options = {}); +}; + +dictionary HighlightsFromPointOptions { + sequence shadowRoots = []; +}; diff --git a/test/fixtures/wpt/interfaces/cssom-view.idl b/test/fixtures/wpt/interfaces/cssom-view.idl index f922bc81486..88abb078485 100644 --- a/test/fixtures/wpt/interfaces/cssom-view.idl +++ b/test/fixtures/wpt/interfaces/cssom-view.idl @@ -103,8 +103,11 @@ enum ScrollLogicalPosition { "start", "center", "end", "nearest" }; dictionary ScrollIntoViewOptions : ScrollOptions { ScrollLogicalPosition block = "start"; ScrollLogicalPosition inline = "nearest"; + ScrollIntoViewContainer container = "all"; }; +enum ScrollIntoViewContainer { "all", "nearest" }; + dictionary CheckVisibilityOptions { boolean checkOpacity = false; boolean checkVisibilityCSS = false; diff --git a/test/fixtures/wpt/interfaces/html.idl b/test/fixtures/wpt/interfaces/html.idl index 3832a6f9b71..f10bb72e913 100644 --- a/test/fixtures/wpt/interfaces/html.idl +++ b/test/fixtures/wpt/interfaces/html.idl @@ -1305,12 +1305,15 @@ typedef (HTMLOrSVGImageElement or enum PredefinedColorSpace { "srgb", "display-p3" }; +enum CanvasColorType { "unorm8", "float16" }; + enum CanvasFillRule { "nonzero", "evenodd" }; dictionary CanvasRenderingContext2DSettings { boolean alpha = true; boolean desynchronized = false; PredefinedColorSpace colorSpace = "srgb"; + CanvasColorType colorType = "unorm8"; boolean willReadFrequently = false; }; @@ -1320,9 +1323,8 @@ enum ImageSmoothingQuality { "low", "medium", "high" }; interface CanvasRenderingContext2D { // back-reference to the canvas readonly attribute HTMLCanvasElement canvas; - - CanvasRenderingContext2DSettings getContextAttributes(); }; +CanvasRenderingContext2D includes CanvasSettings; CanvasRenderingContext2D includes CanvasState; CanvasRenderingContext2D includes CanvasTransform; CanvasRenderingContext2D includes CanvasCompositing; @@ -1340,6 +1342,11 @@ CanvasRenderingContext2D includes CanvasPathDrawingStyles; CanvasRenderingContext2D includes CanvasTextDrawingStyles; CanvasRenderingContext2D includes CanvasPath; +interface mixin CanvasSettings { + // settings + CanvasRenderingContext2DSettings getContextAttributes(); +}; + interface mixin CanvasState { // state undefined save(); // push state on state stack @@ -1594,6 +1601,7 @@ interface OffscreenCanvasRenderingContext2D { readonly attribute OffscreenCanvas canvas; }; +OffscreenCanvasRenderingContext2D includes CanvasSettings; OffscreenCanvasRenderingContext2D includes CanvasState; OffscreenCanvasRenderingContext2D includes CanvasTransform; OffscreenCanvasRenderingContext2D includes CanvasCompositing; @@ -1987,6 +1995,7 @@ interface NavigateEvent : Event { readonly attribute DOMString? downloadRequest; readonly attribute any info; readonly attribute boolean hasUAVisualTransition; + readonly attribute Element? sourceElement; undefined intercept(optional NavigationInterceptOptions options = {}); undefined scroll(); @@ -2003,6 +2012,7 @@ dictionary NavigateEventInit : EventInit { DOMString? downloadRequest = null; any info; boolean hasUAVisualTransition = false; + Element? sourceElement = null; }; dictionary NavigationInterceptOptions { @@ -2119,10 +2129,10 @@ interface NotRestoredReasonDetails { [Exposed=Window] interface NotRestoredReasons { - readonly attribute DOMString? src; + readonly attribute USVString? src; readonly attribute DOMString? id; readonly attribute DOMString? name; - readonly attribute DOMString? url; + readonly attribute USVString? url; readonly attribute FrozenArray? reasons; readonly attribute FrozenArray? children; [Default] object toJSON(); diff --git a/test/fixtures/wpt/interfaces/interest-invokers.tentative.idl b/test/fixtures/wpt/interfaces/interest-invokers.tentative.idl index f89af4d7341..fe164e23575 100644 --- a/test/fixtures/wpt/interfaces/interest-invokers.tentative.idl +++ b/test/fixtures/wpt/interfaces/interest-invokers.tentative.idl @@ -2,6 +2,17 @@ interface mixin InterestInvokerElement { [CEReactions,Reflect=interesttarget] attribute Element? interestTargetElement; }; -HTMLInputElement includes InterestInvokerElement; +HTMLAnchorElement includes InterestInvokerElement; +HTMLAreaElement includes InterestInvokerElement; HTMLButtonElement includes InterestInvokerElement; -HTMLAnchorElement includes InterestInvokerElement; \ No newline at end of file +SVGAElement includes InterestInvokerElement; + +[Exposed=Window] +interface InterestEvent : Event { + constructor(DOMString type, optional InterestEventInit eventInitDict = {}); + readonly attribute Element? source; +}; + +dictionary InterestEventInit : EventInit { + Element? source = null; +}; diff --git a/test/fixtures/wpt/interfaces/media-capabilities.idl b/test/fixtures/wpt/interfaces/media-capabilities.idl index 94339b6d1dd..7bd8aca90c3 100644 --- a/test/fixtures/wpt/interfaces/media-capabilities.idl +++ b/test/fixtures/wpt/interfaces/media-capabilities.idl @@ -110,6 +110,8 @@ partial interface WorkerNavigator { [Exposed=(Window, Worker)] interface MediaCapabilities { - [NewObject] Promise decodingInfo(MediaDecodingConfiguration configuration); - [NewObject] Promise encodingInfo(MediaEncodingConfiguration configuration); + [NewObject] Promise decodingInfo( + MediaDecodingConfiguration configuration); + [NewObject] Promise encodingInfo( + MediaEncodingConfiguration configuration); }; diff --git a/test/fixtures/wpt/interfaces/mediacapture-surface-control.idl b/test/fixtures/wpt/interfaces/mediacapture-surface-control.idl index 964f662da7f..357b5c516f6 100644 --- a/test/fixtures/wpt/interfaces/mediacapture-surface-control.idl +++ b/test/fixtures/wpt/interfaces/mediacapture-surface-control.idl @@ -6,8 +6,10 @@ partial interface CaptureController { sequence getSupportedZoomLevels(); long getZoomLevel(); - Promise setZoomLevel(long zoomLevel); - attribute EventHandler oncapturedzoomlevelchange; + Promise increaseZoomLevel(); + Promise decreaseZoomLevel(); + Promise resetZoomLevel(); + attribute EventHandler onzoomlevelchange; }; partial interface CaptureController { diff --git a/test/fixtures/wpt/interfaces/observable.idl b/test/fixtures/wpt/interfaces/observable.idl index 5aa8332ca9b..b1ab3c3c5b1 100644 --- a/test/fixtures/wpt/interfaces/observable.idl +++ b/test/fixtures/wpt/interfaces/observable.idl @@ -74,7 +74,7 @@ interface Observable { // // takeUntil() can consume promises, iterables, async iterables, and other // observables. - Observable takeUntil(any notifier); + Observable takeUntil(any value); Observable map(Mapper mapper); Observable filter(Predicate predicate); Observable take(unsigned long long amount); diff --git a/test/fixtures/wpt/interfaces/permissions-policy.idl b/test/fixtures/wpt/interfaces/permissions-policy.idl index 806d2eb80f6..b17304de8d0 100644 --- a/test/fixtures/wpt/interfaces/permissions-policy.idl +++ b/test/fixtures/wpt/interfaces/permissions-policy.idl @@ -28,4 +28,5 @@ interface PermissionsPolicyViolationReportBody : ReportBody { readonly attribute long? columnNumber; readonly attribute DOMString disposition; readonly attribute DOMString? allowAttribute; + readonly attribute DOMString? srcAttribute; }; diff --git a/test/fixtures/wpt/interfaces/shared-storage.idl b/test/fixtures/wpt/interfaces/shared-storage.idl index 6f38d673952..941c7414c4f 100644 --- a/test/fixtures/wpt/interfaces/shared-storage.idl +++ b/test/fixtures/wpt/interfaces/shared-storage.idl @@ -114,6 +114,7 @@ dictionary SharedStoragePrivateAggregationConfig { USVString aggregationCoordinatorOrigin; USVString contextId; [EnforceRange] unsigned long long filteringIdMaxBytes; + [EnforceRange] unsigned long long maxContributions; }; dictionary SharedStorageRunOperationMethodOptions { diff --git a/test/fixtures/wpt/interfaces/speech-api.idl b/test/fixtures/wpt/interfaces/speech-api.idl index f3967b873ff..025f9424f01 100644 --- a/test/fixtures/wpt/interfaces/speech-api.idl +++ b/test/fixtures/wpt/interfaces/speech-api.idl @@ -8,16 +8,19 @@ interface SpeechRecognition : EventTarget { constructor(); // recognition parameters - attribute SpeechGrammarList grammars; attribute DOMString lang; attribute boolean continuous; attribute boolean interimResults; attribute unsigned long maxAlternatives; + attribute SpeechRecognitionMode mode; // methods to drive the speech interaction undefined start(); + undefined start(MediaStreamTrack audioTrack); undefined stop(); undefined abort(); + boolean onDeviceWebSpeechAvailable(DOMString lang); + boolean installOnDeviceSpeechRecognition(DOMString lang); // event methods attribute EventHandler onaudiostart; @@ -40,10 +43,15 @@ enum SpeechRecognitionErrorCode { "network", "not-allowed", "service-not-allowed", - "bad-grammar", "language-not-supported" }; +enum SpeechRecognitionMode { + "ondevice-preferred", // On-device speech recognition if available, otherwise use Cloud speech recognition as a fallback. + "ondevice-only", // On-device speech recognition only. Returns an error if on-device speech recognition is not available. + "cloud-only", // Cloud speech recognition only. +}; + [Exposed=Window] interface SpeechRecognitionErrorEvent : Event { constructor(DOMString type, SpeechRecognitionErrorEventInit eventInitDict); @@ -91,25 +99,6 @@ dictionary SpeechRecognitionEventInit : EventInit { required SpeechRecognitionResultList results; }; -// The object representing a speech grammar -[Exposed=Window] -interface SpeechGrammar { - attribute DOMString src; - attribute float weight; -}; - -// The object representing a speech grammar collection -[Exposed=Window] -interface SpeechGrammarList { - constructor(); - readonly attribute unsigned long length; - getter SpeechGrammar item(unsigned long index); - undefined addFromURI(DOMString src, - optional float weight = 1.0); - undefined addFromString(DOMString string, - optional float weight = 1.0); -}; - [Exposed=Window] interface SpeechSynthesis : EventTarget { readonly attribute boolean pending; diff --git a/test/fixtures/wpt/interfaces/turtledove.idl b/test/fixtures/wpt/interfaces/turtledove.idl index 05072974ec9..2f34d763722 100644 --- a/test/fixtures/wpt/interfaces/turtledove.idl +++ b/test/fixtures/wpt/interfaces/turtledove.idl @@ -151,17 +151,31 @@ partial interface Navigator { [SecureContext] partial interface Navigator { - Promise getInterestGroupAdAuctionData(AdAuctionDataConfig config); + Promise getInterestGroupAdAuctionData(optional AdAuctionDataConfig config = {}); +}; + +dictionary AdAuctionPerSellerData { + required USVString seller; + Uint8Array request; + DOMString error; }; dictionary AdAuctionData { - required Uint8Array request; required USVString requestId; + Uint8Array request; + sequence requests; }; -dictionary AdAuctionDataConfig { +dictionary AdAuctionOneSeller { required USVString seller; - required USVString coordinatorOrigin; + USVString coordinatorOrigin; +}; + +dictionary AdAuctionDataConfig { + USVString seller; + USVString coordinatorOrigin; + sequence sellers; + unsigned long requestSize; record perBuyerConfig; }; diff --git a/test/fixtures/wpt/interfaces/web-animations-2.idl b/test/fixtures/wpt/interfaces/web-animations-2.idl index 97a0d3f6c6b..c4a0c2532d9 100644 --- a/test/fixtures/wpt/interfaces/web-animations-2.idl +++ b/test/fixtures/wpt/interfaces/web-animations-2.idl @@ -14,6 +14,7 @@ partial interface AnimationTimeline { partial interface Animation { attribute CSSNumberish? startTime; attribute CSSNumberish? currentTime; + attribute AnimationTrigger? trigger; readonly attribute double? overallProgress; }; @@ -98,6 +99,7 @@ dictionary TimelineRangeOffset { partial dictionary KeyframeAnimationOptions { (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeStart = "normal"; (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeEnd = "normal"; + AnimationTrigger? trigger; }; [Exposed=Window] @@ -111,3 +113,25 @@ dictionary AnimationPlaybackEventInit : EventInit { CSSNumberish? currentTime = null; CSSNumberish? timelineTime = null; }; + +[Exposed=Window] +interface AnimationTrigger { + constructor(optional AnimationTriggerOptions options = {}); + attribute AnimationTimeline timeline; + attribute AnimationTriggerType type; + attribute any rangeStart; + attribute any rangeEnd; + attribute any exitRangeStart; + attribute any exitRangeEnd; +}; + +dictionary AnimationTriggerOptions { + AnimationTimeline? timeline; + AnimationTriggerType? type = "once"; + (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeStart = "normal"; + (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeEnd = "normal"; + (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) exitRangeStart = "auto"; + (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) exitRangeEnd = "auto"; +}; + +enum AnimationTriggerType { "once", "repeat", "alternate", "state" }; diff --git a/test/fixtures/wpt/interfaces/webcodecs.idl b/test/fixtures/wpt/interfaces/webcodecs.idl index 5cd4adf9348..274ef96578a 100644 --- a/test/fixtures/wpt/interfaces/webcodecs.idl +++ b/test/fixtures/wpt/interfaces/webcodecs.idl @@ -154,6 +154,8 @@ dictionary VideoDecoderConfig { VideoColorSpaceInit colorSpace; HardwareAcceleration hardwareAcceleration = "no-preference"; boolean optimizeForLatency; + double rotation = 0; + boolean flip = false; }; dictionary AudioEncoderConfig { diff --git a/test/fixtures/wpt/interfaces/webgpu.idl b/test/fixtures/wpt/interfaces/webgpu.idl index 401d2ec69b5..d91a6a710b1 100644 --- a/test/fixtures/wpt/interfaces/webgpu.idl +++ b/test/fixtures/wpt/interfaces/webgpu.idl @@ -62,6 +62,8 @@ interface GPUAdapterInfo { readonly attribute DOMString architecture; readonly attribute DOMString device; readonly attribute DOMString description; + readonly attribute unsigned long subgroupMinSize; + readonly attribute unsigned long subgroupMaxSize; }; interface mixin NavigatorGPU { @@ -123,6 +125,7 @@ enum GPUFeatureName { "float32-blendable", "clip-distances", "dual-source-blending", + "subgroups", }; [Exposed=(Window, Worker), SecureContext] diff --git a/test/fixtures/wpt/resources/chromium/webxr-test.js b/test/fixtures/wpt/resources/chromium/webxr-test.js index 49938dc3ec1..15d015debb1 100644 --- a/test/fixtures/wpt/resources/chromium/webxr-test.js +++ b/test/fixtures/wpt/resources/chromium/webxr-test.js @@ -5,14 +5,14 @@ import {GamepadHand, GamepadMapping} from '/gen/device/gamepad/public/mojom/game // This polyfill library implements the WebXR Test API as specified here: // https://github.com/immersive-web/webxr-test-api -const defaultMojoFromFloor = { +const defaultMojoFromStage = { matrix: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, -1.65, 0, 1] }; const default_stage_parameters = { - mojoFromFloor: defaultMojoFromFloor, + mojoFromStage: defaultMojoFromStage, bounds: null }; @@ -512,8 +512,8 @@ class MockRuntime { this.stageParameters_.bounds = this.bounds_; } - // floorOrigin is passed in as mojoFromFloor. - this.stageParameters_.mojoFromFloor = + // floorOrigin is passed in as mojoFromStage. + this.stageParameters_.mojoFromStage = {matrix: getMatrixFromTransform(floorOrigin)}; this._onStageParametersUpdated(); @@ -928,15 +928,17 @@ class MockRuntime { } const frameData = { - mojoFromViewer: this.pose_, - views: frame_views, + renderInfo: { + frameId: this.next_frame_id_, + mojoFromViewer: this.pose_, + views: frame_views + }, mojoSpaceReset: mojo_space_reset, inputState: input_state, timeDelta: { // window.performance.now() is in milliseconds, so convert to microseconds. microseconds: BigInt(Math.floor(window.performance.now() * 1000)), }, - frameId: this.next_frame_id_, bufferHolder: null, cameraImageSize: this.cameraImage_ ? { width: this.cameraImage_.width, @@ -1640,11 +1642,11 @@ class MockRuntime { case vrMojom.XRReferenceSpaceType.kLocal: return XRMathHelper.identity(); case vrMojom.XRReferenceSpaceType.kLocalFloor: - if (this.stageParameters_ == null || this.stageParameters_.mojoFromFloor == null) { + if (this.stageParameters_ == null || this.stageParameters_.mojoFromStage == null) { console.warn("Standing transform not available."); return null; } - return this.stageParameters_.mojoFromFloor.matrix; + return this.stageParameters_.mojoFromStage.matrix; case vrMojom.XRReferenceSpaceType.kViewer: return mojo_from_viewer; case vrMojom.XRReferenceSpaceType.kBoundedFloor: diff --git a/test/fixtures/wpt/service-workers/service-worker/resources/router-rules.js b/test/fixtures/wpt/service-workers/service-worker/resources/router-rules.js index 71c09e7079c..58c0e5cbbaf 100644 --- a/test/fixtures/wpt/service-workers/service-worker/resources/router-rules.js +++ b/test/fixtures/wpt/service-workers/service-worker/resources/router-rules.js @@ -53,10 +53,18 @@ const routerRules = { 'condition-lack-of-source': [{ condition: {requestMode: 'no-cors'}, }], - 'condition-invalid-request-method': [{ + 'condition-invalid-bytestring-request-method': [{ condition: {requestMethod: String.fromCodePoint(0x3042)}, source: 'network' }], + 'condition-invalid-http-request-method': [{ + condition: {requestMethod: '(GET|POST)'}, + source: 'network' + }], + 'condition-forbidden-request-method': [{ + condition: {requestMethod: 'connect'}, + source: 'network' + }], 'condition-request-destination-script-network': [{condition: {requestDestination: 'script'}, source: 'network'}], 'condition-or-source-network': [{ diff --git a/test/fixtures/wpt/service-workers/service-worker/static-router-invalid-rules.https.html b/test/fixtures/wpt/service-workers/service-worker/static-router-invalid-rules.https.html index 05f39f2c9dc..616f85bd618 100644 --- a/test/fixtures/wpt/service-workers/service-worker/static-router-invalid-rules.https.html +++ b/test/fixtures/wpt/service-workers/service-worker/static-router-invalid-rules.https.html @@ -13,19 +13,37 @@ diff --git a/test/fixtures/wpt/websockets/constants.sub.js b/test/fixtures/wpt/websockets/constants.sub.js index fd3c3b84b96..78601ce877a 100644 --- a/test/fixtures/wpt/websockets/constants.sub.js +++ b/test/fixtures/wpt/websockets/constants.sub.js @@ -15,6 +15,7 @@ if (url_has_flag('h2')) { } const SCHEME_DOMAIN_PORT = __SCHEME + '://' + __SERVER__NAME + ':' + __PORT; +const SCHEME_CROSSDOMAIN_PORT = __SCHEME + '://' + '{{hosts[alt][www]}}' + ':' + __PORT; function url_has_variant(variant) { const params = new URLSearchParams(location.search); diff --git a/test/fixtures/wpt/websockets/cookies/cross-origin-cookie-set.html b/test/fixtures/wpt/websockets/cookies/cross-origin-cookie-set.html new file mode 100644 index 00000000000..f5ccbd1a334 --- /dev/null +++ b/test/fixtures/wpt/websockets/cookies/cross-origin-cookie-set.html @@ -0,0 +1,40 @@ + +Include credentials in cross-origin websocket requests + + + + + + +

WebSocket - Set Cross-origin cookie

+
+ diff --git a/test/fixtures/wpt/websockets/opening-handshake/received-301-code.html b/test/fixtures/wpt/websockets/opening-handshake/received-301-code.html new file mode 100644 index 00000000000..41ca295d833 --- /dev/null +++ b/test/fixtures/wpt/websockets/opening-handshake/received-301-code.html @@ -0,0 +1,23 @@ + +WebSockets: 301 Code Failed + + + + +
+ diff --git a/test/fixtures/wpt/websockets/opening-handshake/resources/redirect_response.py b/test/fixtures/wpt/websockets/opening-handshake/resources/redirect_response.py new file mode 100644 index 00000000000..d6055860405 --- /dev/null +++ b/test/fixtures/wpt/websockets/opening-handshake/resources/redirect_response.py @@ -0,0 +1,3 @@ +def main(request, response): + headers = [('Location', '/echo')] + return (301, "moved"), headers, ''