mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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,22 @@
|
|||
// META: script=/webusb/resources/fake-devices.js
|
||||
// META: script=/webusb/resources/usb-helpers.js
|
||||
// META: global=sharedworker
|
||||
|
||||
'use strict';
|
||||
|
||||
usb_test(() => getFakeDevice()
|
||||
.then(({ device }) => {
|
||||
let evt = new USBConnectionEvent('connect', { device: device });
|
||||
assert_equals(evt.type, 'connect');
|
||||
assert_equals(evt.device, device);
|
||||
}),
|
||||
'Can construct a USBConnectionEvent with a device');
|
||||
|
||||
test(t => {
|
||||
assert_throws(TypeError(),
|
||||
() => new USBConnectionEvent('connect', { device: null }));
|
||||
assert_throws(TypeError(),
|
||||
() => new USBConnectionEvent('connect', {}));
|
||||
}, 'Cannot construct a USBConnectionEvent without a device');
|
||||
|
||||
done();
|
Loading…
Add table
Add a link
Reference in a new issue