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

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: Added missing copyright notice in the JavaScript file 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..12a6577531d1850374a969bb23749bc921f8b575
--- /dev/null
+++ b/chrome/test/data/password/form_utils.js
@@ -0,0 +1,45 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Creates the following form:
+// <form action="done.html">
+// <label for="username">Username</label>
+// <input type="text" id="username" name="username">
+// <label for="password">Password</label>
+// <input type="password" id="password" name="password">
+// <input type="submit" id="submit-button">
+// </form>
+function createSimplePasswordForm() {
+ var form = document.createElement('form');
+ form.setAttribute('action', 'done.html');
+
+ var username_label = document.createElement('label');
+ username_label.htmlFor = 'username';
+ 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.htmlFor = '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;
+}

Powered by Google App Engine
This is Rietveld 408576698