| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/common/autofill_messages.h" | 10 #include "chrome/common/autofill_messages.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 const char kSigninFormHTML[] = | 97 const char kSigninFormHTML[] = |
| 98 "<FORM name = 'blah' action = 'http://www.random.com/'> " | 98 "<FORM name = 'blah' action = 'http://www.random.com/'> " |
| 99 " <INPUT type = 'text' id = 'username'/> " | 99 " <INPUT type = 'text' id = 'username'/> " |
| 100 " <INPUT type = 'password' id = 'password'/> " | 100 " <INPUT type = 'password' id = 'password'/> " |
| 101 " <INPUT type = 'submit' value = 'LOGIN' />" | 101 " <INPUT type = 'submit' value = 'LOGIN' />" |
| 102 "</FORM>"; | 102 "</FORM>"; |
| 103 | 103 |
| 104 const char kAccountCreationFormHTML[] = | 104 const char kAccountCreationFormHTML[] = |
| 105 "<FORM name = 'blah' action = 'http://www.random.com/'> " | 105 "<FORM name = 'blah' action = 'http://www.random.com/'> " |
| 106 " <INPUT type = 'text' id = 'username'/> " | 106 " <INPUT type = 'text' id = 'username'/> " |
| 107 " <INPUT type = 'password' id = 'first_password' size=5/> " | 107 " <INPUT type = 'password' id = 'first_password' " |
| 108 " <INPUT type = 'password' id = 'second_password' size=5/> " | 108 " autocomplete = 'off' size = 5/>" |
| 109 " <INPUT type = 'password' id = 'second_password' size = 5/> " |
| 109 " <INPUT type = 'text' id = 'address'/> " | 110 " <INPUT type = 'text' id = 'address'/> " |
| 110 " <INPUT type = 'submit' value = 'LOGIN' />" | 111 " <INPUT type = 'submit' value = 'LOGIN' />" |
| 111 "</FORM>"; | 112 "</FORM>"; |
| 112 | 113 |
| 113 const char kHiddenPasswordAccountCreationFormHTML[] = | 114 const char kHiddenPasswordAccountCreationFormHTML[] = |
| 114 "<FORM name = 'blah' action = 'http://www.random.com/'> " | 115 "<FORM name = 'blah' action = 'http://www.random.com/'> " |
| 115 " <INPUT type = 'text' id = 'username'/> " | 116 " <INPUT type = 'text' id = 'username'/> " |
| 116 " <INPUT type = 'password' id = 'first_password'/> " | 117 " <INPUT type = 'password' id = 'first_password'/> " |
| 117 " <INPUT type = 'password' id = 'second_password' style='display:none'/> " | 118 " <INPUT type = 'password' id = 'second_password' style='display:none'/> " |
| 118 " <INPUT type = 'submit' value = 'LOGIN' />" | 119 " <INPUT type = 'submit' value = 'LOGIN' />" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 ASSERT_FALSE(element.isNull()); | 270 ASSERT_FALSE(element.isNull()); |
| 270 first_password_element = element.to<WebInputElement>(); | 271 first_password_element = element.to<WebInputElement>(); |
| 271 EXPECT_TRUE(DecorationIsVisible(&first_password_element)); | 272 EXPECT_TRUE(DecorationIsVisible(&first_password_element)); |
| 272 SimulateClickOnDecoration(&first_password_element); | 273 SimulateClickOnDecoration(&first_password_element); |
| 273 EXPECT_EQ(2u, generation_manager_->messages().size()); | 274 EXPECT_EQ(2u, generation_manager_->messages().size()); |
| 274 EXPECT_EQ(AutofillHostMsg_ShowPasswordGenerationPopup::ID, | 275 EXPECT_EQ(AutofillHostMsg_ShowPasswordGenerationPopup::ID, |
| 275 generation_manager_->messages()[1]->type()); | 276 generation_manager_->messages()[1]->type()); |
| 276 } | 277 } |
| 277 | 278 |
| 278 } // namespace autofill | 279 } // namespace autofill |
| OLD | NEW |