diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini deleted file mode 100644 index f64b45fea6b5..000000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-002.html] - [Hit test float] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini deleted file mode 100644 index f29da48a2a08..000000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-003.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini deleted file mode 100644 index 4bfb0c2053a4..000000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-004.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/linebox/inline-negative-margin-001.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/linebox/inline-negative-margin-001.html.ini index 6425f4beda16..cb2edcb5dcd5 100644 --- a/tests/wpt/metadata-layout-2020/css/CSS2/linebox/inline-negative-margin-001.html.ini +++ b/tests/wpt/metadata-layout-2020/css/CSS2/linebox/inline-negative-margin-001.html.ini @@ -5,9 +5,6 @@ [[data-expected-height\] 7] expected: FAIL - [[data-expected-height\] 1] - expected: FAIL - - [[data-expected-height\] 2] + [[data-expected-height\] 4] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-transforms/z-index-does-not-apply.html.ini b/tests/wpt/metadata-layout-2020/css/css-transforms/z-index-does-not-apply.html.ini new file mode 100644 index 000000000000..b9867f577dfd --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-transforms/z-index-does-not-apply.html.ini @@ -0,0 +1,2 @@ +[z-index-does-not-apply.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini new file mode 100644 index 000000000000..4c79907309ba --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini @@ -0,0 +1,4 @@ +[CaretPosition-001.html] + [Element at (400, 100)] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini deleted file mode 100644 index e38782d8c85a..000000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[elementFromPoint-001.html] - [CSSOM View - 5 - extensions to the Document interface] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/custom-elements/reactions/HTMLMediaElement.html.ini b/tests/wpt/metadata-layout-2020/custom-elements/reactions/HTMLMediaElement.html.ini deleted file mode 100644 index 2ca05f57bb00..000000000000 --- a/tests/wpt/metadata-layout-2020/custom-elements/reactions/HTMLMediaElement.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[HTMLMediaElement.html] - expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index 24b243191a4c..26d9a6ee3924 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -318,15 +318,21 @@ [ + + + + diff --git a/tests/wpt/web-platform-tests/interfaces/is-input-pending.idl b/tests/wpt/web-platform-tests/interfaces/is-input-pending.idl new file mode 100644 index 000000000000..191fafdb96c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/is-input-pending.idl @@ -0,0 +1,22 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into reffy-reports +// (https://github.com/tidoust/reffy-reports) +// Source: Early detection of input events (https://wicg.github.io/is-input-pending/) + +dictionary IsInputPendingOptionsInit { + boolean includeContinuous = "false"; +}; + +[Exposed=Window] +interface IsInputPendingOptions { + constructor(optional IsInputPendingOptionsInit isInputPendingOptionsInit = {}); + attribute boolean includeContinuous; +}; + +[Exposed=Window] interface Scheduling { + boolean isInputPending(optional IsInputPendingOptions isInputPendingOptions); +}; + +partial interface Navigator { + readonly attribute Scheduling scheduling; +}; diff --git a/tests/wpt/web-platform-tests/interfaces/webauthn.idl b/tests/wpt/web-platform-tests/interfaces/webauthn.idl index 562718086758..9de7f64919d6 100644 --- a/tests/wpt/web-platform-tests/interfaces/webauthn.idl +++ b/tests/wpt/web-platform-tests/interfaces/webauthn.idl @@ -115,8 +115,6 @@ dictionary AuthenticationExtensionsClientInputs { dictionary AuthenticationExtensionsClientOutputs { }; -typedef record AuthenticationExtensionsAuthenticatorInputs; - dictionary CollectedClientData { required DOMString type; required DOMString challenge; @@ -192,6 +190,29 @@ partial dictionary AuthenticationExtensionsClientOutputs { CredentialPropertiesOutput credProps; }; +dictionary AuthenticationExtensionsPRFValues { + required ArrayBuffer first; + ArrayBuffer second; +}; + +dictionary AuthenticationExtensionsPRFInputs { + AuthenticationExtensionsPRFValues eval; + record evalByCredential; +}; + +partial dictionary AuthenticationExtensionsClientInputs { + AuthenticationExtensionsPRFInputs prf; +}; + +dictionary AuthenticationExtensionsPRFOutputs { + boolean enabled; + AuthenticationExtensionsPRFValues results; +}; + +partial dictionary AuthenticationExtensionsClientOutputs { + AuthenticationExtensionsPRFOutputs prf; +}; + partial dictionary AuthenticationExtensionsClientInputs { AuthenticationExtensionsLargeBlobInputs largeBlob; }; diff --git a/tests/wpt/web-platform-tests/is-input-pending/idlharness.window.js b/tests/wpt/web-platform-tests/is-input-pending/idlharness.window.js new file mode 100644 index 000000000000..e6bb26a5a710 --- /dev/null +++ b/tests/wpt/web-platform-tests/is-input-pending/idlharness.window.js @@ -0,0 +1,15 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +// https://wicg.github.io/is-input-pending/ + +idl_test( + ['is-input-pending'], + ['html', 'dom'], + async idl_array => { + idl_array.add_objects({ + IsInputPendingOptions: ['new IsInputPendingOptions'], + Scheduling: ['navigator.scheduling'], + }); + } +); diff --git a/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js b/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js index 715ebc2fed43..7854b4f85ff9 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js +++ b/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js @@ -276,48 +276,9 @@ class FakeXRAnchorController { } } -class FakeXRAnchorCreationEvent extends Event { - constructor(type, eventInitDict) { - super(type, eventInitDict); - - this.success_ = false; - this.requestedAnchorOrigin_ = {}; - this.isAttachedToEntity_ = false; - this.anchorController_ = new FakeXRAnchorController(); - - if(eventInitDict.requestedAnchorOrigin != null) { - this.requestedAnchorOrigin_ = eventInitDict.requestedAnchorOrigin; - } - - if(eventInitDict.isAttachedToEntity != null) { - this.isAttachedToEntity_ = eventInitDict.isAttachedToEntity; - } - } - - get requestedAnchorOrigin() { - return this.requestedAnchorOrigin_; - } - - get isAttachedToEntity() { - return this.isAttachedToEntity_; - } - - get success() { - return this.success_; - } - - set success(value) { - this.success_ = value; - } - - get anchorController() { - return this.anchorController_; - } -} - // Implements XRFrameDataProvider and XRPresentationProvider. Maintains a mock // for XRPresentationProvider. Implements FakeXRDevice test API. -class MockRuntime extends EventTarget { +class MockRuntime { // Mapping from string feature names to the corresponding mojo types. // This is exposed as a member for extensibility. static featureToMojoMap = { @@ -339,8 +300,6 @@ class MockRuntime extends EventTarget { }; constructor(fakeDeviceInit, service) { - super(); - this.sessionClient_ = new device.mojom.XRSessionClientPtr(); this.presentation_provider_ = new MockXRPresentationProvider(); @@ -368,6 +327,8 @@ class MockRuntime extends EventTarget { this.anchor_controllers_ = new Map(); // ID of the next anchor to be assigned. this.next_anchor_id_ = 1; + // Anchor creation callback (initially null, can be set by tests). + this.anchor_creation_callback_ = null; let supportedModes = []; if (fakeDeviceInit.supportedModes) { @@ -568,6 +529,10 @@ class MockRuntime extends EventTarget { return source; } + setAnchorCreationCallback(callback) { + this.anchor_creation_callback_ = callback; + } + // Helper methods getNonImmersiveDisplayInfo() { const displayInfo = this.getImmersiveDisplayInfo(); @@ -706,50 +671,67 @@ class MockRuntime extends EventTarget { // XRFrameDataProvider implementation. getFrameData(options) { - const mojo_space_reset = this.send_mojo_space_reset_; - this.send_mojo_space_reset_ = false; + return new Promise((resolve) => { - const stage_parameters_updated = this.stageParametersUpdated_; - this.stageParametersUpdated_ = false; - if (this.pose_) { - this.pose_.poseIndex++; - } - - // Setting the input_state to null tests a slightly different path than - // the browser tests where if the last input source is removed, the device - // code always sends up an empty array, but it's also valid mojom to send - // up a null array. - let input_state = null; - if (this.input_sources_.size > 0) { - input_state = []; - for (const input_source of this.input_sources_.values()) { - input_state.push(input_source.getInputSourceState()); - } - } + const populatePose = () => { + const mojo_space_reset = this.send_mojo_space_reset_; + this.send_mojo_space_reset_ = false; - const frameData = { - pose: this.pose_, - mojoSpaceReset: mojo_space_reset, - inputState: input_state, - timeDelta: { - // window.performance.now() is in milliseconds, so convert to microseconds. - microseconds: window.performance.now() * 1000, - }, - frameId: this.next_frame_id_++, - bufferHolder: null, - bufferSize: {}, - stageParameters: this.stageParameters_, - stageParametersUpdated: stage_parameters_updated, - }; + const stage_parameters_updated = this.stageParametersUpdated_; + this.stageParametersUpdated_ = false; + if (this.pose_) { + this.pose_.poseIndex++; + } - this._calculateHitTestResults(frameData); + // Setting the input_state to null tests a slightly different path than + // the browser tests where if the last input source is removed, the device + // code always sends up an empty array, but it's also valid mojom to send + // up a null array. + let input_state = null; + if (this.input_sources_.size > 0) { + input_state = []; + for (const input_source of this.input_sources_.values()) { + input_state.push(input_source.getInputSourceState()); + } + } - this._calculateAnchorInformation(frameData); + const frameData = { + pose: this.pose_, + mojoSpaceReset: mojo_space_reset, + inputState: input_state, + timeDelta: { + // window.performance.now() is in milliseconds, so convert to microseconds. + microseconds: window.performance.now() * 1000, + }, + frameId: this.next_frame_id_, + bufferHolder: null, + bufferSize: {}, + stageParameters: this.stageParameters_, + stageParametersUpdated: stage_parameters_updated, + }; - this._injectAdditionalFrameData(options, frameData); + this.next_frame_id_++; - return Promise.resolve({ - frameData: frameData, + this._calculateHitTestResults(frameData); + + this._calculateAnchorInformation(frameData); + + this._injectAdditionalFrameData(options, frameData); + + resolve({frameData}); + }; + + if(this.sessionOptions_.mode == device.mojom.XRSessionMode.kInline) { + // Inline sessions should not have a delay introduced since it causes them + // to miss a vsync blink-side and delays propagation of changes that happened + // within a rAFcb by one frame (e.g. setViewerOrigin() calls would take 2 frames + // to propagate). + populatePose(); + } else { + // For immerive sessions, add additional delay to allow for anchor creation + // promises to run. + setTimeout(populatePose, 3); // note: according to MDN, the timeout is not exact + } }); } @@ -768,6 +750,7 @@ class MockRuntime extends EventTarget { closeDataProvider() { this.dataProviderBinding_.close(); + this.sessionOptions_ = null; } // XREnvironmentIntegrationProvider implementation: @@ -818,6 +801,15 @@ class MockRuntime extends EventTarget { createAnchor(nativeOriginInformation, nativeOriginFromAnchor) { return new Promise((resolve) => { + if(this.anchor_creation_callback_ == null) { + resolve({ + result : device.mojom.CreateAnchorResult.FAILURE, + anchorId : 0 + }); + + return; + } + const mojoFromNativeOrigin = this._getMojoFromNativeOrigin(nativeOriginInformation); if(mojoFromNativeOrigin == null) { resolve({ @@ -830,36 +822,45 @@ class MockRuntime extends EventTarget { const mojoFromAnchor = XRMathHelper.mul4x4(mojoFromNativeOrigin, nativeOriginFromAnchor); - const createAnchorEvent = new FakeXRAnchorCreationEvent("anchorcreate", { + const anchorCreationParameters = { requestedAnchorOrigin: mojoFromAnchor, isAttachedToEntity: false, - }); - - this.dispatchEvent(createAnchorEvent); - - if(createAnchorEvent.success) { - let anchor_controller = createAnchorEvent.anchorController; - const anchor_id = this.next_anchor_id_; - this.next_anchor_id_++; - - // If the test allowed the anchor creation, - // store the anchor controller & return success. - this.anchor_controllers_.set(anchor_id, anchor_controller); - anchor_controller.device = this; - anchor_controller.id = anchor_id; - - resolve({ - result : device.mojom.CreateAnchorResult.SUCCESS, - anchorId : anchor_id - }); - - return; - } + }; - resolve({ - result : device.mojom.CreateAnchorResult.FAILURE, - anchorId : 0 - }); + const anchorController = new FakeXRAnchorController(); + + this.anchor_creation_callback_(anchorCreationParameters, anchorController) + .then((result) => { + if(result) { + // If the test allowed the anchor creation, + // store the anchor controller & return success. + + const anchor_id = this.next_anchor_id_; + this.next_anchor_id_++; + + this.anchor_controllers_.set(anchor_id, anchorController); + anchorController.device = this; + anchorController.id = anchor_id; + + resolve({ + result : device.mojom.CreateAnchorResult.SUCCESS, + anchorId : anchor_id + }); + } else { + // The test has rejected anchor creation. + resolve({ + result : device.mojom.CreateAnchorResult.FAILURE, + anchorId : 0 + }); + } + }) + .catch(() => { + // The test threw an error, treat anchor creation as failed. + resolve({ + result : device.mojom.CreateAnchorResult.FAILURE, + anchorId : 0 + }); + }); }); } @@ -897,6 +898,7 @@ class MockRuntime extends EventTarget { const dataProviderRequest = mojo.makeRequest(dataProviderPtr); this.dataProviderBinding_ = new mojo.Binding( device.mojom.XRFrameDataProvider, this, dataProviderRequest); + this.sessionOptions_ = sessionOptions; const clientReceiver = mojo.makeRequest(this.sessionClient_); diff --git a/tests/wpt/web-platform-tests/webxr/anchors/ar_anchor_states.https.html b/tests/wpt/web-platform-tests/webxr/anchors/ar_anchor_states.https.html index 907da06880e9..06bc6798839a 100644 --- a/tests/wpt/web-platform-tests/webxr/anchors/ar_anchor_states.https.html +++ b/tests/wpt/web-platform-tests/webxr/anchors/ar_anchor_states.https.html @@ -32,11 +32,11 @@ let debug = xr_debug.bind(this, 'testAnchorStates'); - fakeDeviceController.addEventListener("anchorcreate", (anchorCreateEvent) => { + fakeDeviceController.setAnchorCreationCallback((parameters, controller) => { // All anchor creation requests that reach this stage should be marked as successful. // If this test is expected to fail, the failure will happen earlier in the anchor // creation process. - anchorCreateEvent.success = true; + return Promise.resolve(true); }); let watcherDone = new Event("watcherdone"); diff --git a/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini b/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini index 07c1b8f8ea23..6d27ac4afa4c 100644 --- a/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini +++ b/tests/wpt/webgl/meta/conformance2/rendering/draw-buffers.html.ini @@ -170,3 +170,15 @@ [WebGL test #52: attachment 7 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,255,0] expected: FAIL + [WebGL test #44: attachment 7 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 255,0,255,0] + expected: FAIL + + [WebGL test #42: attachment 5 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,255] + expected: FAIL + + [WebGL test #51: attachment 6 should be 0,255,0,255\nat (0, 0) expected: 0,255,0,255 was 0,0,0,0] + expected: FAIL + + [WebGL test #50: attachment 5 should be 0,255,0,255\nat (4, 0) expected: 0,255,0,255 was 255,0,0,0] + expected: FAIL +