Closed Bug 1595451 Opened 11 months ago Closed 10 months ago

[wpt-sync] Sync PR 20193 - [webnfc] Make NDEFReader#scan() return a Promise

Categories

(Core :: DOM: Device Interfaces, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 20193 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/20193
Details from upstream follow.

Leon Han <leon.han@intel.com> wrote:

[webnfc] Make NDEFReader#scan() return a Promise

Previously NDEFReader#scan() returns void and an NDEFErrorEvent will be
dispatched in case that the scan operation cannot be started
successfully.

This is not a well accepted pattern, and also to align with
NDEFWriter#push(), this CL makes NDEFReader#scan() return a Promise
instead.

Note that now NDEFErrorEvent is only used to notify Mojo disconnection,
a follow-up CL will remove it completely by using ErrorEvent instead.

The spec change:
https://github.com/w3c/web-nfc/pull/398
https://github.com/w3c/web-nfc/pull/432

BUG=520391

Change-Id: I1477258ab70f7e40da31ea8795d63125b6a13af0

Reviewed-on: https://chromium-review.googlesource.com/1899586
WPT-Export-Revision: e31295e9798ecf31fa945d9b164a9259de5c6365

PR 20193 applied with additional changes from upstream: e44f20914735498a05fc835efe3e2cbde9f86f00, 55b30cad64e25104acb82331d8def75cb4f0c665, 0abb411331f86f472103183c7ec1136ea21a7e1b, c0ec46c3e6f1452abf3cf9916f3e2ceb4c494b12, d4a7c5c8ff1f9a56e692b19469e655fd7f684582, ef43b5d72594d9bc2dfcd1a9371a9791796b173a, 75cef9e5eb3493b1105eb37c27eab174d203f397, 456845e6c6031335bc2e9e0d37323310e6dac2c3, eaf583ff9cfe4ce36b517ae3519e114948ba10c3
Component: web-platform-tests → DOM: Device Interfaces
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ee74abc564ce
[wpt PR 20193] - [webnfc] Make NDEFReader#scan() return a Promise, a=testonly
https://hg.mozilla.org/integration/autoland/rev/247796920302
[wpt PR 20193] - Update wpt metadata, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.