mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update web-platform-tests to revision 4333a1d2f109795547fc5e22ebfc8481fa649de7
This commit is contained in:
parent
728ebcc932
commit
8c46b67f8e
456 changed files with 10561 additions and 5108 deletions
|
@ -0,0 +1,25 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
// https://w3c.github.io/touch-events/
|
||||
|
||||
'use strict';
|
||||
|
||||
promise_test(async () => {
|
||||
const srcs = ['touch-events', 'uievents', 'dom', 'html'];
|
||||
const [idl, uievents, dom, html] = await Promise.all(
|
||||
srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));
|
||||
|
||||
const idl_array = new IdlArray();
|
||||
idl_array.add_idls(idl);
|
||||
idl_array.add_dependency_idls(uievents);
|
||||
idl_array.add_dependency_idls(dom);
|
||||
idl_array.add_dependency_idls(html);
|
||||
idl_array.add_objects({
|
||||
Document: ['document'],
|
||||
GlobalEventHandlers: ['window', 'document', 'document.body'],
|
||||
Touch: ['new Touch({identifier: 1, target: document})'],
|
||||
TouchEvent: ['new TouchEvent("name")'],
|
||||
});
|
||||
idl_array.test();
|
||||
}, 'Test IDL implementation of touch-events API');
|
Loading…
Add table
Add a link
Reference in a new issue