| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 const char kSigninFormHTML[] = | 127 const char kSigninFormHTML[] = |
| 128 "<FORM name = 'blah' action = 'http://www.random.com/'> " | 128 "<FORM name = 'blah' action = 'http://www.random.com/'> " |
| 129 " <INPUT type = 'text' id = 'username'/> " | 129 " <INPUT type = 'text' id = 'username'/> " |
| 130 " <INPUT type = 'password' id = 'password'/> " | 130 " <INPUT type = 'password' id = 'password'/> " |
| 131 " <INPUT type = 'button' id = 'dummy'/> " | 131 " <INPUT type = 'button' id = 'dummy'/> " |
| 132 " <INPUT type = 'submit' value = 'LOGIN' />" | 132 " <INPUT type = 'submit' value = 'LOGIN' />" |
| 133 "</FORM>"; | 133 "</FORM>"; |
| 134 | 134 |
| 135 const char kAccountCreationFormHTML[] = | 135 const char kAccountCreationFormHTML[] = |
| 136 "<FORM name = 'blah' action = 'http://www.random.com/'> " | 136 "<FORM name = 'blah' action = 'http://www.random.com/pa/th?q=1&p=3#first'> " |
| 137 " <INPUT type = 'text' id = 'username'/> " | 137 " <INPUT type = 'text' id = 'username'/> " |
| 138 " <INPUT type = 'password' id = 'first_password' size = 5/>" | 138 " <INPUT type = 'password' id = 'first_password' size = 5/>" |
| 139 " <INPUT type = 'password' id = 'second_password' size = 5/> " | 139 " <INPUT type = 'password' id = 'second_password' size = 5/> " |
| 140 " <INPUT type = 'text' id = 'address'/> " | 140 " <INPUT type = 'text' id = 'address'/> " |
| 141 " <INPUT type = 'button' id = 'dummy'/> " | 141 " <INPUT type = 'button' id = 'dummy'/> " |
| 142 " <INPUT type = 'submit' value = 'LOGIN' />" | 142 " <INPUT type = 'submit' value = 'LOGIN' />" |
| 143 "</FORM>"; | 143 "</FORM>"; |
| 144 | 144 |
| 145 const char kAccountCreationNoForm[] = | 145 const char kAccountCreationNoForm[] = |
| 146 "<INPUT type = 'text' id = 'username'/> " | 146 "<INPUT type = 'text' id = 'username'/> " |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 base::string16()); | 701 base::string16()); |
| 702 } | 702 } |
| 703 | 703 |
| 704 TEST_F(PasswordGenerationAgentTest, FormClassifierDisabled) { | 704 TEST_F(PasswordGenerationAgentTest, FormClassifierDisabled) { |
| 705 LoadHTMLWithUserGesture(kSigninFormHTML); | 705 LoadHTMLWithUserGesture(kSigninFormHTML); |
| 706 ExpectFormClassifierVoteReceived(false /* vote is not expected */, | 706 ExpectFormClassifierVoteReceived(false /* vote is not expected */, |
| 707 base::string16()); | 707 base::string16()); |
| 708 } | 708 } |
| 709 | 709 |
| 710 } // namespace autofill | 710 } // namespace autofill |
| OLD | NEW |