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

Unified Diff: chrome/test/data/password/form_utils.js

Issue 331593008: Only consider PasswordFromManager which HasCompletedMatching when provisionally saving passwords (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test added Created 6 years, 5 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: chrome/test/data/password/form_utils.js
diff --git a/chrome/test/data/password/form_utils.js b/chrome/test/data/password/form_utils.js
new file mode 100644
index 0000000000000000000000000000000000000000..6659fa7063258e026074f41dd49c29d3ffc71fd4
--- /dev/null
+++ b/chrome/test/data/password/form_utils.js
@@ -0,0 +1,37 @@
+function createForm() {
engedy 2014/07/11 17:05:36 Now that we are exporting this into a util, I thin
vabr (Chromium) 2014/07/11 18:15:48 Done.
+ var form = document.createElement('form');
+ form.setAttribute('action', 'done.html');
+
+ var username_label = document.createElement('label');
+ username_label.setAttribute('for', 'username');
engedy 2014/07/11 17:05:36 We could use the short form here (and in 1 more pl
vabr (Chromium) 2014/07/11 18:15:48 Done.
+ username_label.innerText = 'Username: ';
+ var username = document.createElement('input');
+ username.type = 'text';
+ username.name = 'username';
+ username.id = 'username';
+
+ var password_label = document.createElement('label');
+ password_label.innerText = 'Password: ';
+ password_label.setAttribute('for', 'password');
+ var password = document.createElement('input');
+ password.type = 'password';
+ password.name = 'password';
+ password.id = 'password';
+
+ var submit = document.createElement('input');
+ submit.type = 'submit';
+ submit.id = 'submit-button';
+ submit.value = 'Submit';
+
+ form.appendChild(username_label);
+ form.appendChild(username);
+ form.appendChild(password_label);
+ form.appendChild(password);
+ form.appendChild(submit);
+
+ return form;
+}
+
+function addForm(form) {
engedy 2014/07/11 17:05:36 I think this might be suitable for inlining after
vabr (Chromium) 2014/07/11 18:15:48 Done.
+ document.getElementsByTagName('body')[0].appendChild(form);
engedy 2014/07/11 17:05:36 We could just use the short form here: document.b
vabr (Chromium) 2014/07/11 18:15:48 Done.
+}

Powered by Google App Engine
This is Rietveld 408576698