Index: third_party/WebKit/LayoutTests/http/tests/usb/insecure-context.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/usb/insecure-context.html b/third_party/WebKit/LayoutTests/http/tests/usb/insecure-context.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..06afc29e628b32f349c060c4796a9a6a39a7f3e3 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/usb/insecure-context.html |
@@ -0,0 +1,17 @@ |
+<!DOCTYPE html> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<script src="/resources/get-host-info.js"></script> |
+<script> |
+'use strict'; |
+ |
+if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) { |
+ window.location = get_host_info().UNAUTHENTICATED_ORIGIN + |
+ window.location.pathname; |
+} else { |
+ test(t => { |
+ assert_false(window.isSecureContext); |
+ assert_true(navigator.usb == undefined); |
+ }, 'navigator.usb is not present in an insecure context'); |
+} |
+</script> |