OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string.h> | 5 #include <string.h> |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 const char kSigninFormHTML[] = | 151 const char kSigninFormHTML[] = |
152 "<FORM name = 'blah' action = 'http://www.random.com/'> " | 152 "<FORM name = 'blah' action = 'http://www.random.com/'> " |
153 " <INPUT type = 'text' id = 'username'/> " | 153 " <INPUT type = 'text' id = 'username'/> " |
154 " <INPUT type = 'password' id = 'password'/> " | 154 " <INPUT type = 'password' id = 'password'/> " |
155 " <INPUT type = 'button' id = 'dummy'/> " | 155 " <INPUT type = 'button' id = 'dummy'/> " |
156 " <INPUT type = 'submit' value = 'LOGIN' />" | 156 " <INPUT type = 'submit' value = 'LOGIN' />" |
157 "</FORM>"; | 157 "</FORM>"; |
158 | 158 |
159 const char kAccountCreationFormHTML[] = | 159 const char kAccountCreationFormHTML[] = |
160 "<FORM name = 'blah' action = 'http://www.random.com/pa/th?q=1&p=3#first'> " | 160 "<FORM name = 'blah' action = 'http://www.random.com/pa/th?q=1&p=3'> " |
161 " <INPUT type = 'text' id = 'username'/> " | 161 " <INPUT type = 'text' id = 'username'/> " |
162 " <INPUT type = 'password' id = 'first_password' size = 5/>" | 162 " <INPUT type = 'password' id = 'first_password' size = 5/>" |
163 " <INPUT type = 'password' id = 'second_password' size = 5/> " | 163 " <INPUT type = 'password' id = 'second_password' size = 5/> " |
164 " <INPUT type = 'text' id = 'address'/> " | 164 " <INPUT type = 'text' id = 'address'/> " |
165 " <INPUT type = 'button' id = 'dummy'/> " | 165 " <INPUT type = 'button' id = 'dummy'/> " |
166 " <INPUT type = 'submit' value = 'LOGIN' />" | 166 " <INPUT type = 'submit' value = 'LOGIN' />" |
167 "</FORM>"; | 167 "</FORM>"; |
168 | 168 |
169 const char kAccountCreationNoForm[] = | 169 const char kAccountCreationNoForm[] = |
170 "<INPUT type = 'text' id = 'username'/> " | 170 "<INPUT type = 'text' id = 'username'/> " |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 ExpectGenerationAvailable(kGenerationElementId, true); | 807 ExpectGenerationAvailable(kGenerationElementId, true); |
808 password_generation_->GeneratedPasswordAccepted(base::ASCIIToUTF16("pwd")); | 808 password_generation_->GeneratedPasswordAccepted(base::ASCIIToUTF16("pwd")); |
809 ExecuteJavaScriptForTests( | 809 ExecuteJavaScriptForTests( |
810 "document.getElementById('first_password').value = '';"); | 810 "document.getElementById('first_password').value = '';"); |
811 FocusField(kGenerationElementId); | 811 FocusField(kGenerationElementId); |
812 base::RunLoop().RunUntilIdle(); | 812 base::RunLoop().RunUntilIdle(); |
813 EXPECT_TRUE(fake_driver_.called_password_no_longer_generated()); | 813 EXPECT_TRUE(fake_driver_.called_password_no_longer_generated()); |
814 } | 814 } |
815 | 815 |
816 } // namespace autofill | 816 } // namespace autofill |
OLD | NEW |