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..9f33eb6f00849eecfab3dbd596d6a1a33c4c1b1f 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,24 @@ 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'); |
+ |
+ credential.additionalData = new FormData(); |
+ assert_true(credential.additionalData instanceof FormData); |
philipj_slow
2015/11/17 15:53:59
Maybe assert that it is the same object that was a
Mike West
2015/11/18 09:12:50
Sounds good.
|
+}, 'Poke at the Fetch-related bits'); |
philipj_slow
2015/11/17 15:53:59
An honest name, but maybe "something something bas
Mike West
2015/11/18 09:12:50
:)
|
</script> |