gecko-dev/testing/web-platform/tests/resources
Ovidio Henriquez 2eeaa13b4f Bug 1462165 [wpt PR 11018] - Allow WebUSB to work in a Dedicated Worker, a=testonly
Automatic update from web-platform-testsAllow WebUSB to work in a Dedicated Worker

This change updates the USB class to allow the exposed APIs to work
correctly in the context of a Dedicated Worker. In order to do this, USB
was reworked to use an ExecutionContext object to check the context and
the FeaturePolicy, rather than the LocalFrame that it was using
previously. The usb layout test for workers was also updated to use the
WebUSB test API to check that getDevices and event listeners work in
Dedicated Workers.

Additionally, the UsbDeviceManager Mojo interface used by WebUSB is
added to the DedicatedWorkerHost BinderRegistry so that the request is
handled correctly.

Bug: 837414,837422
Change-Id: I1ad95e288312851e9ec39ce6ec917bf38b12d4d6
Reviewed-on: https://chromium-review.googlesource.com/1045309
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Chong Zhang <chongz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560026}

--

wpt-commits: 7166925d15efc18072471874e093c5416817d33e
wpt-pr: 11018
2018-05-22 09:40:41 +00:00
..
chromium Bug 1462165 [wpt PR 11018] - Allow WebUSB to work in a Dedicated Worker, a=testonly 2018-05-22 09:40:41 +00:00
test Bug 1452672 [wpt PR 10381] - Support adding Idlharness dependencies, a=testonly 2018-05-22 09:40:31 +00:00
webidl2 Bug 1457047 [wpt PR 10645] - Update webidl2.js to v10.2.1, a=testonly 2018-05-02 07:47:56 +01:00
.gitignore
.htaccess
check-layout-th.js Bug 1433144 - Update web-platform-tests to revision 2e19bfdaee6edb2c1069c07e14037284167284a3, a=testonly 2018-01-30 17:46:09 +00:00
idlharness.js Bug 1452672 [wpt PR 10381] - Support adding Idlharness dependencies, a=testonly 2018-05-22 09:40:31 +00:00
idlharness.js.headers Bug 1440723 [wpt PR 9393] - Ensure testharnessreport.js is loaded as utf8, a=testonly 2018-03-31 22:28:27 +01:00
LICENSE
OWNERS
readme.md Bug 1460278 [wpt PR 10925] - Use https://web-platform-tests.org, a=testonly 2018-05-18 11:15:13 +01:00
sriharness.js
testdriver-vendor.js Bug 1441488 [wpt PR 9377] - [css-typed-om] ay which is 0 should omit when serialize a CSSSkew, a=testonly 2018-03-01 16:09:09 +00:00
testdriver-vendor.js.headers Bug 1440723 [wpt PR 9393] - Ensure testharnessreport.js is loaded as utf8, a=testonly 2018-03-31 22:28:27 +01:00
testdriver.js Bug 1447415 [wpt PR 10113] - Automated Keyboard Input, a=testonly 2018-04-15 09:26:48 +01:00
testdriver.js.headers Bug 1440723 [wpt PR 9393] - Ensure testharnessreport.js is loaded as utf8, a=testonly 2018-03-31 22:28:27 +01:00
testharness.css
testharness.css.headers Bug 1419296 - Update web-platform-tests to fa27b785c62e67cc3a12201612db188c4fdd49ad, a=testonly 2017-11-21 07:39:00 +00:00
testharness.js Bug 1461234 [wpt PR 10978] - Make fetch_tests_from_worker return a promise, a=testonly 2018-05-18 11:15:13 +01:00
testharness.js.headers Bug 1419296 - Update web-platform-tests to fa27b785c62e67cc3a12201612db188c4fdd49ad, a=testonly 2017-11-21 07:39:00 +00:00
testharnessreport.js Bug 1429043 - Update web-platform-tests to revision 4de5305adf3d33badc23952672bcf28168fea37e, a=testonly 2018-01-09 14:45:43 +00:00
testharnessreport.js.headers Bug 1419296 - Update web-platform-tests to fa27b785c62e67cc3a12201612db188c4fdd49ad, a=testonly 2017-11-21 07:39:00 +00:00

Resources

testharness.js

testharness.js is a framework for writing low-level tests of browser functionality in javascript. It provides a convenient API for making assertions and is intended to work for both simple synchronous tests, and tests of asynchronous behaviour.

Getting started

To use testharness.js you must include two scripts, in the order given:

<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

Full documentation

For detailed API documentation please visit https://web-platform-tests.org/writing-tests/testharness-api.html.

Tutorials

You can also read a tutorial on Using testharness.js.