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

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

Issue 2492553002: Allow PasswordCredential instantiation when an input element has multiple 'autocomplete' tokens. (Closed)
Patch Set: Created 4 years, 1 month 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 be246a1e11a2ab5d05efa39ea44a5da94f7a10ce..97c161f39ef8b1f0811e1c2d8ea550d6337b5bd4 100644
--- a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html
@@ -182,4 +182,17 @@ test(_ => {
assert_true(credential.additionalData instanceof URLSearchParams);
verify_form_credential(f, credential);
}, 'PasswordCredential creation from `HTMLFormElement` with no enctype');
+
+test(_ => {
+ var f = document.createElement('form');
+ f.innerHTML = "<input type='text' name='theId' value='musterman' autocomplete='email username'>"
+ + "<input type='text' name='thePassword' value='sekrit' autocomplete='current-password'>"
+ + "<input type='text' name='theIcon' value='https://example.com/photo' autocomplete='photo'>"
+ + "<input type='text' name='theExtraField' value='extra'>"
+ + "<input type='text' name='theName' value='friendly name' autocomplete='name'>";
+
+ var credential = new PasswordCredential(f);
+ assert_true(credential.additionalData instanceof URLSearchParams);
+ verify_form_credential(f, credential);
+}, 'PasswordCredential creation from `HTMLFormElement` with no multiple autocomplete attributes');
Mike West 2016/11/10 07:46:39 Nit: s/ no//
vasilii 2016/11/10 09:21:55 Done.
</script>

Powered by Google App Engine
This is Rietveld 408576698