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

Side by Side Diff: chrome/renderer/autofill/password_generation_manager_browsertest.cc

Issue 11446028: Ignore autocomplete=off when password manager is saving the generated passwords during account crea… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a naming issue. Created 8 years 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 // 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
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
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
OLDNEW
« no previous file with comments | « chrome/renderer/autofill/password_generation_manager.cc ('k') | content/public/common/password_form.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698