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

Unified Diff: chrome/test/data/password/infinite_password_form.html

Issue 2849653003: Password manager should autofill a dynamic form added and processed before the page was loaded. (Closed)
Patch Set: Created 3 years, 8 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/infinite_password_form.html
diff --git a/chrome/test/data/password/infinite_password_form.html b/chrome/test/data/password/infinite_password_form.html
new file mode 100644
index 0000000000000000000000000000000000000000..70be5af9031981473522099dac0cfd76b68b9d8b
--- /dev/null
+++ b/chrome/test/data/password/infinite_password_form.html
@@ -0,0 +1,26 @@
+<!--
+This page has a resource that takes a very long time to load. Nevetheless, a
+hidden password form is created dynamically. It should be autofilled and
+successful submission should be detected.
+-->
+<html>
+ <head>
+ <script src="form_utils.js"></script>
+ <script>
+function addDynamicForm() {
+ var form = createSimplePasswordForm();
+ form.style.display = 'none';
+ document.body.appendChild(form);
+}
+document.addEventListener("DOMContentLoaded", function(event) {
+ // Add the form some time after the DOM was loaded. It means that the form
+ // won't be detected during DidFinishDocumentLoad() stage.
+ setTimeout(addDynamicForm);
+});
+ </script>
+ <title>Test dynamically created password form</title>
+ </head>
+ <body>
+ <img src="/slow?100">
vabr (Chromium) 2017/04/28 19:17:33 Nice trick!
vasilii 2017/04/28 21:26:23 Acknowledged.
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698