mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update web-platform-tests to revision 632a3f59238036b6e24b28d47218ba9986ff4c62
This commit is contained in:
parent
cd02ca6c19
commit
fb838278a5
430 changed files with 15017 additions and 508 deletions
|
@ -0,0 +1,34 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
// META: global=window,dedicatedworker,sharedworker,serviceworker
|
||||
|
||||
'use strict';
|
||||
|
||||
promise_test(async t => {
|
||||
const srcs = ['./web-locks.idl', '/interfaces/html.idl'];
|
||||
const [weblocks, html] = await Promise.all(
|
||||
srcs.map(i => fetch(i).then(r => r.text())));
|
||||
|
||||
const idl_array = new IdlArray();
|
||||
idl_array.add_idls(weblocks);
|
||||
idl_array.add_dependency_idls(html);
|
||||
|
||||
try {
|
||||
await navigator.locks.request('name', l => { self.lock = l; });
|
||||
} catch (e) {
|
||||
// Surfaced in idlharness.js's test_object below.
|
||||
}
|
||||
|
||||
idl_array.add_objects({
|
||||
LockManager: ['navigator.locks'],
|
||||
Lock: ['lock'],
|
||||
});
|
||||
|
||||
if (self.Window) {
|
||||
idl_array.add_objects({ Navigator: ['navigator'] });
|
||||
} else {
|
||||
idl_array.add_objects({ WorkerNavigator: ['navigator'] });
|
||||
}
|
||||
|
||||
idl_array.test();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue