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

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: change test 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/credentialmanager/PasswordCredential.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3114c5eeb76b0bda114ace6d845aec7ad58553e7 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 value1'>"
+ + "<input type='text' name='theIcon' value='https://example.com/photo' autocomplete='photo value2'>"
+ + "<input type='text' name='theExtraField' value='extra'>"
+ + "<input type='text' name='theName' value='friendly name' autocomplete='name value3'>";
+
+ var credential = new PasswordCredential(f);
+ assert_true(credential.additionalData instanceof URLSearchParams);
+ verify_form_credential(f, credential);
+}, 'PasswordCredential creation from `HTMLFormElement` with multiple autocomplete attributes');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/credentialmanager/PasswordCredential.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698