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

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

Issue 2832473004: Notify PasswordAutofillAgent about dynamic forms after the document was parsed. (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 unified diff | Download patch
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 unless
13 3. The form gets created before the main frame loads. Therefore 13 it is hidden.
14 the form is not registered during OnDynamicFormsSeen. 14 3. The form gets created after the document loads. Therefore
15 the form is registered during OnDynamicFormsSeen.
15 16
16 The goal is to make sure that there is enough time between the form 17 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 18 creation and the frame load, so that OnDynamicFormsSeen is not
18 triggered for the created form after frame load. To achieve that, 19 triggered for the created form after frame load. To achieve that,
19 this page contains a strange stylesheet, distilled from a much bigger 20 this page contains a strange stylesheet, distilled from a much bigger
20 stylesheet included in the current live.com website (that's where 21 stylesheet included in the current live.com website (that's where
21 http://crbug.com/367768 was demonstrated). The style uses 22 http://crbug.com/367768 was demonstrated). The style uses
22 some webkit-only rules for background properties. 23 some webkit-only rules for background properties.
23 --> 24 -->
24 <html> 25 <html>
25 <head> 26 <head>
26 <script src="form_utils.js"></script> 27 <script src="form_utils.js"></script>
27 <script> 28 <script>
28 function onLoadHandler() { 29 function onLoadHandler() {
29 document.body.appendChild(createSimplePasswordForm()); 30 var form = createSimplePasswordForm();
31 if (location.search == '?hidden')
32 form.style.display = 'none';
33 document.body.appendChild(form);
30 } 34 }
31 </script> 35 </script>
32 <style> 36 <style>
33 ::-webkit-scrollbar{ 37 ::-webkit-scrollbar{
34 background-color:#abc; 38 background-color:#abc;
35 } 39 }
36 ::-webkit-scrollbar:disabled{ 40 ::-webkit-scrollbar:disabled{
37 background-color:#abc 41 background-color:#abc
38 } 42 }
39 ::-webkit-scrollbar-button{ 43 ::-webkit-scrollbar-button{
40 background-color:#abc; 44 background-color:#abc;
41 background-image:url(nonexistent_image.png); 45 background-image:url(nonexistent_image.png);
42 } 46 }
43 ::-webkit-scrollbar-button:hover{ 47 ::-webkit-scrollbar-button:hover{
44 background-color:#abc 48 background-color:#abc
45 } 49 }
46 ::-webkit-scrollbar-button:active{ 50 ::-webkit-scrollbar-button:active{
47 background-color:#abc 51 background-color:#abc
48 } 52 }
49 ::-webkit-scrollbar-button:disabled{ 53 ::-webkit-scrollbar-button:disabled{
50 background-color:#abc 54 background-color:#abc
51 } 55 }
52 </style> 56 </style>
53 <title>Test dynamically created password form</title> 57 <title>Test dynamically created password form</title>
54 </head> 58 </head>
55 <body onload="onLoadHandler();"> 59 <body onload="onLoadHandler();">
56 This page is not empty. 60 This page is not empty.
57 </body> 61 </body>
58 </html> 62 </html>
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_manager_browsertest.cc ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698