Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <body> | |
| 3 <script src=/resources/testharness.js></script> | |
| 4 <script src=/resources/testharnessreport.js></script> | |
| 5 <script src=resources/featurepolicytest.js></script> | |
| 6 <script> | |
| 7 'use strict'; | |
| 8 | |
| 9 promise_test(() => { | |
| 10 return navigator.usb.getDevices().then(() => { | |
| 11 assert_unreached('expected promise to reject with SecurityError'); | |
| 12 }, error => { | |
| 13 assert_equals(error.name, 'SecurityError'); | |
| 14 }); | |
| 15 }, 'Feature-Policy header {"usb": []} disallows the top-level document.'); | |
| 16 | |
| 17 async_test(t => { | |
| 18 assert_usb_available_in_iframe(t, '', '#SecurityError'); | |
| 19 }, 'Feature-Policy header {"usb": []} disallows same-origin iframes.'); | |
| 20 | |
| 21 async_test(t => { | |
| 22 assert_usb_available_in_iframe(t, 'https://{{domains[www]}}:{{ports[https][0]} }', '#SecurityError'); | |
| 23 }, 'Fea-Policy header {"usb": []} disallows cross-origin iframes.'); | |
|
iclelland
2017/05/04 15:24:08
nit: typo
Reilly Grant (use Gerrit)
2017/05/04 20:34:46
Done.
| |
| 24 </script> | |
| 25 </body> | |
| OLD | NEW |