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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/usb/insecure-context.html

Issue 2698083008: Make the navigator.usb attribute accessible only in secure contexts. (Closed)
Patch Set: Moved [NoInterfaceObject] change to a separate patch. Created 3 years, 10 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 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4 <script src="/resources/get-host-info.js"></script>
5 <script>
6 'use strict';
7
8 if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
9 window.location = get_host_info().UNAUTHENTICATED_ORIGIN +
10 window.location.pathname;
11 } else {
12 test(t => {
13 assert_false(window.isSecureContext);
14 assert_true(navigator.usb == undefined);
15 }, 'navigator.usb is not present in an insecure context');
16 }
17 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698