Closed Bug 1459101 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 10835 - Add WorkerNavigatorUSB supplement

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Ovidio Henriquez <odejesush@chromium.org> wrote:
>  Add WorkerNavigatorUSB supplement
>  
>  This change adds a WorkerNavigatorUSB supplement for WorkerNavigator.
>  The WorkerNavigatorUSB interface contains a usb attribute that returns
>  a USB object. The constructor for this USB object was also changed to
>  use an ExecutionContext* parameter to allow a worker to properly
>  initialize the object.
>  
>  This change also updates the global interface listing tests to reflect
>  the new attribute that WorkerNavigator contains and adds web platform
>  tests to check that the WorkerNavigator does indeed have the usb
>  attribute defined in the supported contexts.
>  
>  Due to a bug (https://crbug.com/839117) with the WebIDL bindings
>  generator, the global-interface-listing-service-worker.html test
>  exposes the usb attribute of WorkerNavigator. Therefore, a check is
>  performed in WorkerNavigatorUSB to return a null pointer if the
>  execution context is a ServiceWorkerGlobalScope, and a web platform test
>  ensures that this is true when navigator.usb is called in a service
>  worker.
>  
>  Bug: 837414
>  Change-Id: I3ca63c9ae0b85e5425134024d2fdd9b29ef7d8c3
>  Reviewed-on: https://chromium-review.googlesource.com/1024724
>  WPT-Export-Revision: 54a752ca24a6f69ac3905d513cbb0b29e3572bee
Component: web-platform-tests → DOM: Device Interfaces
Product: Testing → Core
Ran 3 tests and 4 subtests
OK     : 3
PASS   : 2
FAIL   : 2

New tests that have failures or other problems:
/webusb/worker/usb.dedicatedworker.https.html
    Web workers should have the WebUSB API exposed as defined in the spec.: FAIL
/webusb/worker/usb.sharedworker.https.html
    Web workers should have the WebUSB API exposed as defined in the spec.: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f48a1bd26e4
[wpt PR 10835] - Add WorkerNavigatorUSB supplement, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/67cf2d929392
[wpt PR 10835] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/0f48a1bd26e4
https://hg.mozilla.org/mozilla-central/rev/67cf2d929392
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.