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 2cb64e14793c5f652e54a2c84c29152369cf4b3d..62d7a3df811210ab71b30e4e21530764567c586f 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html |
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html |
@@ -23,8 +23,9 @@ test(function() { |
assert_equals(credential.name, 'name'); |
assert_equals(credential.iconURL, 'https://example.com/icon.png'); |
assert_equals(credential.type, 'password'); |
- |
- assert_true(credential.toFormData() instanceof FormData); |
+ assert_equals(credential.idName, 'username'); |
+ assert_equals(credential.passwordName, 'password'); |
+ assert_equals(credential.additionalData, null); |
}, 'Interfaces and attributes of PasswordCredential'); |
test(function() { |
@@ -49,7 +50,9 @@ test(function() { |
assert_equals(credential.name, 'name'); |
assert_equals(credential.iconURL, ''); |
assert_equals(credential.type, 'password'); |
- assert_true(credential.toFormData() instanceof FormData); |
+ assert_equals(credential.idName, 'username'); |
+ assert_equals(credential.passwordName, 'password'); |
+ assert_equals(credential.additionalData, null); |
}, 'Construct a PasswordCredential with an empty icon URL.'); |
@@ -63,6 +66,25 @@ test(function() { |
assert_equals(credential.name, ''); |
assert_equals(credential.iconURL, ''); |
assert_equals(credential.type, 'password'); |
- assert_true(credential.toFormData() instanceof FormData); |
+ assert_equals(credential.idName, 'username'); |
+ assert_equals(credential.passwordName, 'password'); |
+ assert_equals(credential.additionalData, null); |
}, 'Construct a PasswordCredential with an empty name and icon URL.'); |
+ |
+test(function() { |
+ var credential = new PasswordCredential({ |
+ id: 'id', |
+ password: 'pencil', |
+ }); |
+ |
+ credential.idName = 'yay'; |
+ assert_equals(credential.idName, 'yay'); |
+ |
+ credential.passwordName = 'boo'; |
+ assert_equals(credential.passwordName, 'boo'); |
+ |
+ var additionalData = new FormData(); |
+ credential.additionalData = additionalData; |
+ assert_equals(credential.additionalData, additionalData); |
+}, 'Verify the basics of "idName", "passwordName", and "additionalData"'); |
</script> |