Skip to content

Commit

Permalink
Add [SecureContext] to navigator.credentials
Browse files Browse the repository at this point in the history
It was neglected to mark navigator.credentials as [SecureContext], yet it
must be for spec compliance and powerful-features compliance.

MozReview-Commit-ID: BYKGqqhoS2L

Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1430947 [ci skip]
  • Loading branch information
jcjones authored and jgraham committed Jan 23, 2018
1 parent 72f8f50 commit f5490e8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions credential-management/require_securecontext.html
@@ -0,0 +1,13 @@
<!doctype html>
<meta charset=utf-8>
<title>Test that Credential Management requires secure contexts</title>
<link rel="help" href="https://w3c.github.io/webappsec-credential-management/#idl-index">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
"use strict";
test(() => {
assert_false(isSecureContext);
assert_false('credentials' in navigator);
}, "Credential Management must not be accessible in insecure contexts");
</script>

0 comments on commit f5490e8

Please sign in to comment.