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

Side by Side Diff: chrome/test/data/password/between_parsing_and_rendering.html

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!-- 1 <!--
2 This page enables to simulate the following scenario: 2 This page enables to simulate the following scenario:
3 Once a page body, but not the entire frame, is loaded, a 3 Once a page body, but not the entire frame, is loaded, a
4 password form is dynamically created and added to the page 4 password form is dynamically created and added to the page
5 body. 5 body.
6 6
7 Three main points to note: 7 Three main points to note:
8 1. The form only gets created after the body loads. Therefore 8 1. The form only gets created after the body loads. Therefore
9 the form is not registered during form parsing stage 9 the form is not registered during form parsing stage
10 (as in PasswordManager::OnPasswordFormsParsed). 10 (as in PasswordManager::OnPasswordFormsParsed).
11 2. The form gets created before the rendering stage, so it gets 11 2. The form gets created before the rendering stage, so it gets
12 registered during PasswordManager::OnPasswordFormsRendered. 12 registered during PasswordManager::OnPasswordFormsRendered.
13 3. The form gets created before the main frame loads. Therefore 13 3. The form gets created before the main frame loads. Therefore
14 the form is not registered during OnDynamicFormsSeen. 14 the form is not registered during OnDynamicFormsSeen.
15 15
16 The goal is to make sure that there is enough time between the form 16 The goal is to make sure that there is enough time between the form
17 creation and the frame load, so that OnDynamicFormsSeen is not 17 creation and the frame load, so that OnDynamicFormsSeen is not
18 triggered for the created form after frame load. To achieve that, 18 triggered for the created form after frame load. To achieve that,
19 this page contains a strange stylesheet, distilled from a much bigger 19 this page contains a strange stylesheet, distilled from a much bigger
20 stylesheet included in the current live.com website (that's where 20 stylesheet included in the current live.com website (that's where
21 http://crbug.com/367768 was demonstrated). The style uses 21 http://crbug.com/367768 was demonstrated). The style uses
22 some webkit-only rules for background properties. 22 some webkit-only rules for background properties.
23 --> 23 -->
24 <html> 24 <html>
25 <head> 25 <head>
26 <script src="form_utils.js"></script>
26 <script> 27 <script>
27 function createForm() {
28 var form = document.createElement('form');
29 form.setAttribute('action', 'done.html');
30
31 var username_label = document.createElement('label');
32 username_label.setAttribute('for', 'username');
33 username_label.innerText = 'Username: ';
34 var username = document.createElement('input');
35 username.type = 'text';
36 username.name = 'username';
37 username.id = 'username';
38
39 var password_label = document.createElement('label');
40 password_label.innerText = 'Password: ';
41 password_label.setAttribute('for', 'password');
42 var password = document.createElement('input');
43 password.type = 'password';
44 password.name = 'password';
45 password.id = 'password';
46
47 var submit = document.createElement('input');
48 submit.type = 'submit';
49 submit.id = 'submit-button';
50 submit.value = 'Submit';
51
52 form.appendChild(username_label);
53 form.appendChild(username);
54 form.appendChild(password_label);
55 form.appendChild(password);
56 form.appendChild(submit);
57
58 return form;
59 }
60
61 function addForm(form) {
62 document.getElementsByTagName('body')[0].appendChild(form);
63 }
64
65 function onLoadHandler() { 28 function onLoadHandler() {
66 addForm(createForm()); 29 addForm(createForm());
67 } 30 }
68 </script> 31 </script>
69 <style> 32 <style>
70 ::-webkit-scrollbar{ 33 ::-webkit-scrollbar{
71 background-color:#abc; 34 background-color:#abc;
72 } 35 }
73 ::-webkit-scrollbar:disabled{ 36 ::-webkit-scrollbar:disabled{
74 background-color:#abc 37 background-color:#abc
(...skipping 11 matching lines...) Expand all
86 ::-webkit-scrollbar-button:disabled{ 49 ::-webkit-scrollbar-button:disabled{
87 background-color:#abc 50 background-color:#abc
88 } 51 }
89 </style> 52 </style>
90 <title>Test dynamically created password form</title> 53 <title>Test dynamically created password form</title>
91 </head> 54 </head>
92 <body onload="onLoadHandler();"> 55 <body onload="onLoadHandler();">
93 This page is not empty. 56 This page is not empty.
94 </body> 57 </body>
95 </html> 58 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698