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

Unified Diff: LayoutTests/http/tests/credentialmanager/localcredential-basics.html

Issue 661973002: Credential Manager: JavaScript arguments make more sense in a different order. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/master
Patch Set: Created 6 years, 2 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: LayoutTests/http/tests/credentialmanager/localcredential-basics.html
diff --git a/LayoutTests/http/tests/credentialmanager/localcredential-basics.html b/LayoutTests/http/tests/credentialmanager/localcredential-basics.html
index 3870dc84196f40d480a8a1e4476e5ce07b875a91..75912ec268fa67551e30587b62ddcf1b7f3769a5 100644
--- a/LayoutTests/http/tests/credentialmanager/localcredential-basics.html
+++ b/LayoutTests/http/tests/credentialmanager/localcredential-basics.html
@@ -5,7 +5,7 @@
<script src="/serviceworker/resources/interfaces.js"></script>
<script>
test(function() {
- var credential = new LocalCredential('id', 'name', 'https://example.com/avatar.png', 'pencil');
+ var credential = new LocalCredential('id', 'pencil', 'name', 'https://example.com/avatar.png');
verifyInterface('LocalCredential', credential, {
id: 'string',
@@ -22,12 +22,12 @@ test(function() {
test(function() {
assert_throws(new SyntaxError(), function () {
- var credential = new LocalCredential('id', 'name', '-', 'pencil');
+ var credential = new LocalCredential('id', 'pencil', 'name', '-');
});
}, 'Construct a LocalCredential with an invalid avatar URL.');
test(function() {
- var credential = new LocalCredential('id', 'name', '', 'pencil');
+ var credential = new LocalCredential('id', 'pencil', 'name');
assert_equals(credential.id, 'id');
assert_equals(credential.name, 'name');
@@ -35,4 +35,14 @@ test(function() {
assert_equals(credential.password, 'pencil');
}, 'Construct a LocalCredential with an empty avatar URL.');
+
+test(function() {
+ var credential = new LocalCredential('id', 'pencil');
+
+ assert_equals(credential.id, 'id');
+ assert_equals(credential.name, '');
+ assert_equals(credential.avatarURL, '');
+ assert_equals(credential.password, 'pencil');
+
+}, 'Construct a LocalCredential with an empty namd and avatar URL.');
</script>

Powered by Google App Engine
This is Rietveld 408576698