Index: third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialsconstainer-securecontext.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialsconstainer-securecontext.html b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialsconstainer-securecontext.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2d7c85c27d402c6b00316bf71e836ebab95c0092 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialsconstainer-securecontext.html |
@@ -0,0 +1,16 @@ |
+<!DOCTYPE html> |
+<title>Credential Manager: PasswordCredential SecureContext.</title> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<script src="/serviceworker/resources/interfaces.js"></script> |
+<script> |
+if (window.location.hostname == "127.0.0.1") { |
+ window.location = "http://example.test:8000/credentialmanager/credentialsconstainer-securecontext.html"; |
+} else { |
+ // After redirect, we are in an insecure context, so navigator.credentials |
+ // should be unavailable. |
+ test(function () { |
+ assert_equals(undefined, navigator.credentials); |
+ }, 'CredentialsContainer unavailable in insecure context'); |
+} |
+</script> |