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

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

Issue 1314673007: CREDENTIAL: Update PasswordCredential's constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 3 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/passwordcredential-basics.html
diff --git a/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html b/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
index f56f3a76d3d1ac51f5dd3da9cf5244011273427d..19341f4fe2bf0ce616ed62c1f8773fcea367c8df 100644
--- a/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
+++ b/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
@@ -5,7 +5,12 @@
<script src="/serviceworker/resources/interfaces.js"></script>
<script>
test(function() {
- var credential = new PasswordCredential('id', 'pencil', 'name', 'https://example.com/icon.png');
+ var credential = new PasswordCredential({
+ id: 'id',
+ password: 'pencil',
+ name: 'name',
+ iconURL: 'https://example.com/icon.png'
+ });
verify_interface('PasswordCredential', credential, {
id: 'string',
@@ -24,12 +29,21 @@ test(function() {
test(function() {
assert_throws(new SyntaxError(), function () {
- var credential = new PasswordCredential('id', 'pencil', 'name', '-');
+ var credential = new PasswordCredential({
+ id: 'id',
+ password: 'pencil',
+ name: 'name',
+ iconURL: '-'
+ });
});
}, 'Construct a PasswordCredential with an invalid icon URL.');
test(function() {
- var credential = new PasswordCredential('id', 'pencil', 'name');
+ var credential = new PasswordCredential({
+ id: 'id',
+ password: 'pencil',
+ name: 'name',
+ });
assert_equals(credential.id, 'id');
assert_equals(credential.name, 'name');
@@ -40,7 +54,10 @@ test(function() {
}, 'Construct a PasswordCredential with an empty icon URL.');
test(function() {
- var credential = new PasswordCredential('id', 'pencil');
+ var credential = new PasswordCredential({
+ id: 'id',
+ password: 'pencil',
+ });
assert_equals(credential.id, 'id');
assert_equals(credential.name, '');
@@ -50,7 +67,10 @@ test(function() {
}, 'Construct a PasswordCredential with an empty name and icon URL.');
test(function() {
- var credential = new PasswordCredential('id', 'pencil');
+ var credential = new PasswordCredential({
+ id: 'id',
+ password: 'pencil',
+ });
var fd = credential.toFormData();
fd.append('n1', 'v1');
@@ -86,7 +106,10 @@ function verifyBodyMethodBehavior(t, req, methodName) {
// TODO(mkwst): 'Body' doesn't yet implement 'formData()'.
['arrayBuffer', 'blob', 'json', 'text'].forEach(function (methodName) {
async_test(function (t) {
- var credential = new PasswordCredential('id', 'pencil');
+ var credential = new PasswordCredential({
+ id: 'id',
+ password: 'pencil',
+ });
var fd = credential.toFormData();
fd.append('n1', 'v1');
fd.append('n2', 'v2');

Powered by Google App Engine
This is Rietveld 408576698