mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
2eeaa13b4f
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 |
||
---|---|---|
.. | ||
chromium | ||
test | ||
webidl2 | ||
.gitignore | ||
.htaccess | ||
check-layout-th.js | ||
idlharness.js | ||
idlharness.js.headers | ||
LICENSE | ||
OWNERS | ||
readme.md | ||
sriharness.js | ||
testdriver-vendor.js | ||
testdriver-vendor.js.headers | ||
testdriver.js | ||
testdriver.js.headers | ||
testharness.css | ||
testharness.css.headers | ||
testharness.js | ||
testharness.js.headers | ||
testharnessreport.js | ||
testharnessreport.js.headers |
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.