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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html

Issue 2852423002: Expose passwords to JavaScript in Credential Manager API (Closed)
Patch Set: Console Message 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
index f80d2ba071b39dae40f6d4b7bad24bc45c1f3e67..ed5ba181c7b899c2c5a5b85bd34083d2df4622b3 100644
--- a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
@@ -26,6 +26,7 @@ test(function() {
assert_equals(credential.idName, 'username');
assert_equals(credential.passwordName, 'password');
assert_equals(credential.additionalData, null);
+ assert_equals(credential.password, 'pencil');
}, 'Interfaces and attributes of PasswordCredential');
test(function() {
@@ -53,6 +54,7 @@ test(function() {
assert_equals(credential.idName, 'username');
assert_equals(credential.passwordName, 'password');
assert_equals(credential.additionalData, null);
+ assert_equals(credential.password, 'pencil');
}, 'Construct a PasswordCredential with an empty icon URL.');
@@ -69,6 +71,7 @@ test(function() {
assert_equals(credential.idName, 'username');
assert_equals(credential.passwordName, 'password');
assert_equals(credential.additionalData, null);
+ assert_equals(credential.password, 'pencil');
}, 'Construct a PasswordCredential with an empty name and icon URL.');
test(function() {
@@ -86,6 +89,8 @@ test(function() {
var additionalData = new FormData();
credential.additionalData = additionalData;
assert_equals(credential.additionalData, additionalData);
+
+ assert_equals(credential.password, 'pencil');
}, 'Verify the basics of "idName", "passwordName", and "additionalData"');
test(function() {
@@ -123,6 +128,8 @@ function verify_form_credential(f, credential) {
assert_equals(credential.additionalData.get('theName'), 'friendly name');
assert_equals(credential.additionalData.get('theExtraField'), 'extra');
+ assert_equals(credential.password, 'sekrit');
+
var password = f.querySelector('[name=thePassword]');
password.value = "";
assert_throws(new TypeError(), _ => new PasswordCredential(f));

Powered by Google App Engine
This is Rietveld 408576698