OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <body> |
| 3 <script src=/resources/testharness.js></script> |
| 4 <script src=/resources/testharnessreport.js></script> |
| 5 <script> |
| 6 'use strict'; |
| 7 |
| 8 async_test(t => { |
| 9 let frame = document.createElement('iframe'); |
| 10 frame.src = 'https://{{domains[www]}}:{{ports[https][0]}}/webusb/resources/che
ck-availability.html'; |
| 11 frame.allow = 'usb'; |
| 12 |
| 13 window.addEventListener('message', t.step_func(evt => { |
| 14 if (evt.source == frame.contentWindow) { |
| 15 assert_equals(evt.data, '#OK'); |
| 16 document.body.removeChild(frame); |
| 17 t.done(); |
| 18 } |
| 19 })); |
| 20 |
| 21 document.body.appendChild(frame); |
| 22 }, 'Feature policy "usb" can be enabled in cross-origin iframes using "allowed"
attribute.'); |
| 23 </script> |
| 24 </body> |
OLD | NEW |