Files
firefox/testing/web-platform/tests/web-locks/interfaces.tentative.https.any.js
T
Joshua Bell ee818f0e3b Bug 1472022 [wpt PR 11713] - Web Locks API: Upstream tests to web-platform-tests (as .tentative), a=testonly
Automatic update from web-platform-testsWeb Locks API: Upstream tests to web-platform-tests (as .tentative)

* Move tests from http/tests/locks to external/wpt/web-locks
* Name with '.tentative' infix since this is still just a proposal
* Name most tests with '.https' infix since feature is [SecureContext]
   (and remove redirect-to-secure-host logic in tests)
* Consolidate window/worker interfaces test with '.any.js' variant
* Update paths to service worker helpers

Bug: 857265
Change-Id: Iaf254c5d53ff5b6bb65de4516df85307ad3a6519
Reviewed-on: https://chromium-review.googlesource.com/1118764
Commit-Queue: Victor Costan <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#573991}

--

wpt-commits: 89ccb892ad85159b093dab6956ca9caea7bb4edc
wpt-pr: 11713
2018-07-24 21:46:13 +00:00

27 lines
623 B
JavaScript

// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
'use strict';
promise_test(async t => {
const response = await fetch('interfaces.idl');
const idls = await response.text();
const idl_array = new IdlArray();
idl_array.add_untested_idls('[Exposed=Window] interface Navigator {};');
idl_array.add_untested_idls('[Exposed=Worker] interface WorkerNavigator {};');
idl_array.add_idls(idls);
let lock;
await navigator.locks.request('name', l => { lock = l; });
idl_array.add_objects({
LockManager: [navigator.locks],
Lock: [lock],
});
idl_array.test();
});