Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/webusb/usb-default-feature-policy.https.sub.html

Issue 2815003005: Integrate WebUSB with Feature Policy (Closed)
Patch Set: Rebased Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 () => navigator.usb.getDevices(),
11 'Default "usb" feature policy ["self"] allows the top-level document.');
12
13 async_test(t => {
14 assert_usb_available_in_iframe(t, '', '#OK');
15 }, 'Default "usb" feature policy ["self"] allows same-origin iframes.');
16
17 async_test(t => {
18 assert_usb_available_in_iframe(t, 'https://{{domains[www]}}:{{ports[https][0]} }', '#SecurityError');
19 }, 'Default "usb" feature policy ["self"] disallows cross-origin iframes.');
20 </script>
21 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698