From c80439a8fff2c3eb2705f6857952e7a4d4443e1e Mon Sep 17 00:00:00 2001 From: WPT Sync Bot Date: Thu, 2 Jul 2020 08:20:17 +0000 Subject: [PATCH] Update web-platform-tests to revision 99a09c73e7f1d7b19ec4be2eb8ce2d3bebf52245 --- .../CSS2/floats/hit-test-floats-002.html.ini | 4 - .../CSS2/floats/hit-test-floats-003.html.ini | 4 - .../CSS2/floats/hit-test-floats-004.html.ini | 4 - .../inline-negative-margin-001.html.ini | 5 +- .../z-index-does-not-apply.html.ini | 2 + .../css/cssom-view/CaretPosition-001.html.ini | 4 + .../cssom-view/elementFromPoint-001.html.ini | 4 - .../reactions/HTMLMediaElement.html.ini | 2 - .../fetch/content-type/response.window.js.ini | 14 +- .../fetch/content-type/script.window.js.ini | 3 - .../traverse_the_history_1.html.ini | 4 - .../traverse_the_history_5.html.ini | 4 + .../hash-name-reference.html.ini | 3 + ...loading-lazy-load-event.tentative.html.ini | 7 + ...rame_sandbox_popups_nonescaping-3.html.ini | 1 + .../execution-timing/077.html.ini | 4 - .../module-static-import-delayed.html.ini | 4 - .../promise-job-entry.html.ini | 5 +- .../realtimeanalyser-fft-scaling.html.ini | 1 + .../webmessaging/with-ports/018.html.ini | 5 + .../webmessaging/without-ports/017.html.ini | 5 + .../alpha/import-in-moduleworker.html.ini | 1 - .../Worker/Worker-constructor.html.ini | 2 - tests/wpt/metadata/MANIFEST.json | 149 +++++++++++- .../CSS2/floats/hit-test-floats-002.html.ini | 4 - .../CSS2/floats/hit-test-floats-003.html.ini | 4 - .../CSS2/floats/hit-test-floats-004.html.ini | 4 - .../inline-negative-margin-001.html.ini | 5 +- .../z-index-does-not-apply.html.ini | 2 + .../css/cssom-view/CaretPosition-001.html.ini | 4 + .../cssom-view/elementFromPoint-001.html.ini | 4 - .../reactions/HTMLMediaElement.html.ini | 2 - .../fetch/content-type/response.window.js.ini | 14 +- .../fetch/content-type/script.window.js.ini | 3 - .../traverse_the_history_1.html.ini | 4 - .../traverse_the_history_5.html.ini | 4 + .../hash-name-reference.html.ini | 3 + ...loading-lazy-load-event.tentative.html.ini | 7 + ...rame_sandbox_popups_nonescaping-3.html.ini | 1 + .../execution-timing/077.html.ini | 4 - .../module-static-import-delayed.html.ini | 4 - .../promise-job-entry.html.ini | 5 +- .../realtimeanalyser-fft-scaling.html.ini | 1 + .../webmessaging/with-ports/018.html.ini | 5 + .../webmessaging/without-ports/017.html.ini | 5 + .../alpha/import-in-moduleworker.html.ini | 1 - .../Worker/Worker-constructor.html.ini | 2 - .../remove-float-then-abspos-in-inline.html | 31 +++ .../css-display/display-first-line-001.html | 42 ++++ .../aspect-ratio/abspos-008.tentative.html | 25 ++ .../block-aspect-ratio-020.tentative.html | 25 ++ .../z-index-does-not-apply-ref.html | 10 + .../z-index-does-not-apply.html | 25 ++ .../appearance-progress-bar-002-ref.html | 4 + .../css-ui/appearance-progress-bar-002.html | 16 ++ .../table-row-pagination-001-print-ref.html | 29 +++ .../table-row-pagination-001-print.html | 33 +++ .../table-row-pagination-002-print-ref.html | 14 ++ .../table-row-pagination-002-print.html | 26 +++ ...ame-loading-lazy-load-event.tentative.html | 47 ++++ .../interfaces/is-input-pending.idl | 22 ++ .../interfaces/webauthn.idl | 25 +- .../is-input-pending/idlharness.window.js | 15 ++ .../resources/chromium/webxr-test.js | 214 +++++++++--------- .../webxr/anchors/ar_anchor_states.https.html | 4 +- .../rendering/draw-buffers.html.ini | 12 + 66 files changed, 745 insertions(+), 207 deletions(-) delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/css-transforms/z-index-does-not-apply.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/custom-elements/reactions/HTMLMediaElement.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini create mode 100644 tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini create mode 100644 tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/html/semantics/scripting-1/the-script-element/execution-timing/077.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini create mode 100644 tests/wpt/metadata-layout-2020/webmessaging/with-ports/018.html.ini create mode 100644 tests/wpt/metadata-layout-2020/webmessaging/without-ports/017.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/workers/constructors/Worker/Worker-constructor.html.ini delete mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini delete mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini delete mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini create mode 100644 tests/wpt/metadata/css/css-transforms/z-index-does-not-apply.html.ini create mode 100644 tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini delete mode 100644 tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini delete mode 100644 tests/wpt/metadata/custom-elements/reactions/HTMLMediaElement.html.ini delete mode 100644 tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini create mode 100644 tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini create mode 100644 tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/scripting-1/the-script-element/execution-timing/077.html.ini delete mode 100644 tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini create mode 100644 tests/wpt/metadata/webmessaging/with-ports/018.html.ini create mode 100644 tests/wpt/metadata/webmessaging/without-ports/017.html.ini delete mode 100644 tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini create mode 100644 tests/wpt/web-platform-tests/css/CSS2/floats/remove-float-then-abspos-in-inline.html create mode 100644 tests/wpt/web-platform-tests/css/css-display/display-first-line-001.html create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/abspos-008.tentative.html create mode 100644 tests/wpt/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-020.tentative.html create mode 100644 tests/wpt/web-platform-tests/css/css-transforms/z-index-does-not-apply-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-transforms/z-index-does-not-apply.html create mode 100644 tests/wpt/web-platform-tests/css/css-ui/appearance-progress-bar-002-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-ui/appearance-progress-bar-002.html create mode 100644 tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-row-pagination-001-print-ref.html create mode 100644 tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-row-pagination-001-print.html create mode 100644 tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-row-pagination-002-print-ref.html create mode 100644 tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-row-pagination-002-print.html create mode 100644 tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-load-event.tentative.html create mode 100644 tests/wpt/web-platform-tests/interfaces/is-input-pending.idl create mode 100644 tests/wpt/web-platform-tests/is-input-pending/idlharness.window.js 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 f64b45fea6b..00000000000 --- 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 f29da48a2a0..00000000000 --- 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 4bfb0c2053a..00000000000 --- 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 6425f4beda1..cb2edcb5dcd 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 00000000000..b9867f577df --- /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 00000000000..4c79907309b --- /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 e38782d8c85..00000000000 --- 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 2ca05f57bb0..00000000000 --- 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 24b243191a4..26d9a6ee392 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 00000000000..191fafdb96c --- /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 56271808675..9de7f64919d 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 00000000000..e6bb26a5a71 --- /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 715ebc2fed4..7854b4f85ff 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++; - } + const populatePose = () => { + const mojo_space_reset = this.send_mojo_space_reset_; + this.send_mojo_space_reset_ = false; - // 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 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 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.next_frame_id_++; + + 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 } - } - - 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._calculateHitTestResults(frameData); - - this._calculateAnchorInformation(frameData); - - this._injectAdditionalFrameData(options, frameData); - - return Promise.resolve({ - frameData: frameData, }); } @@ -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); + const anchorController = new FakeXRAnchorController(); - if(createAnchorEvent.success) { - let anchor_controller = createAnchorEvent.anchorController; - const anchor_id = this.next_anchor_id_; - this.next_anchor_id_++; + this.anchor_creation_callback_(anchorCreationParameters, anchorController) + .then((result) => { + if(result) { + // If the test allowed the anchor creation, + // store the anchor controller & return success. - // 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; + const anchor_id = this.next_anchor_id_; + this.next_anchor_id_++; - resolve({ - result : device.mojom.CreateAnchorResult.SUCCESS, - anchorId : anchor_id - }); + this.anchor_controllers_.set(anchor_id, anchorController); + anchorController.device = this; + anchorController.id = anchor_id; - return; - } - - resolve({ - result : device.mojom.CreateAnchorResult.FAILURE, - anchorId : 0 - }); + 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 907da06880e..06bc6798839 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 @@ const testFunctionGenerator = function(expectSucceeded, endSession, expectedErro 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 07c1b8f8ea2..6d27ac4afa4 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 +