mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Update web-platform-tests to revision abd18b3e018d25ed668d179c905b7869dca5e239
This commit is contained in:
parent
908a642063
commit
158f7eec0e
117 changed files with 2997 additions and 434 deletions
22
tests/wpt/web-platform-tests/webusb/insecure-context.any.js
Normal file
22
tests/wpt/web-platform-tests/webusb/insecure-context.any.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
// META: global=sharedworker
|
||||
'use strict';
|
||||
|
||||
test(() => {
|
||||
assert_false(isSecureContext);
|
||||
assert_false('usb' in navigator);
|
||||
}, '"usb" should not be present on navigator in an insecure context.');
|
||||
|
||||
[
|
||||
'USB', 'USBAlternateInterface', 'USBConfiguration', 'USBConnectionEvent',
|
||||
'USBDevice', 'USBEndpoint', 'USBInterface', 'USBInTransferResult',
|
||||
'USBOutTransferResult', 'USBIsochronousInTransferResult',
|
||||
'USBIsochronousOutTransferResult', 'USBIsochronousInTransferPacket',
|
||||
'USBIsochronousOutTransferPacket',
|
||||
].forEach((symbol) => {
|
||||
test(() => {
|
||||
assert_false(isSecureContext);
|
||||
assert_false(symbol in this)
|
||||
}, '"' + symbol + '" should not be visible in an insecure context.');
|
||||
});
|
||||
|
||||
done();
|
Loading…
Add table
Add a link
Reference in a new issue