mirror of
https://github.com/servo/servo.git
synced 2025-09-03 11:38:22 +01:00
Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d
This commit is contained in:
parent
3f07cfec7c
commit
578498ba24
4001 changed files with 159517 additions and 30260 deletions
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
async_test(t => {
|
||||
let frame = document.createElement('iframe');
|
||||
frame.src = 'https://{{domains[www]}}:{{ports[https][0]}}/webusb/resources/check-availability.html';
|
||||
frame.allow = 'usb';
|
||||
|
||||
window.addEventListener('message', t.step_func(evt => {
|
||||
if (evt.source == frame.contentWindow) {
|
||||
assert_equals(evt.data, '#OK');
|
||||
document.body.removeChild(frame);
|
||||
t.done();
|
||||
}
|
||||
}));
|
||||
|
||||
document.body.appendChild(frame);
|
||||
}, 'Feature policy "usb" can be enabled in cross-origin iframes using "allowed" attribute.');
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue