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

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

Issue 105493002: Use base namespace for string16 in chrome/renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 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 "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/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/test/base/chrome_render_view_test.h" 10 #include "chrome/test/base/chrome_render_view_test.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 ASSERT_FALSE(element.isNull()); 207 ASSERT_FALSE(element.isNull());
208 WebInputElement first_password_element = element.to<WebInputElement>(); 208 WebInputElement first_password_element = element.to<WebInputElement>();
209 element = document.getElementById(WebString::fromUTF8("second_password")); 209 element = document.getElementById(WebString::fromUTF8("second_password"));
210 ASSERT_FALSE(element.isNull()); 210 ASSERT_FALSE(element.isNull());
211 WebInputElement second_password_element = element.to<WebInputElement>(); 211 WebInputElement second_password_element = element.to<WebInputElement>();
212 212
213 // Both password fields should be empty. 213 // Both password fields should be empty.
214 EXPECT_TRUE(first_password_element.value().isNull()); 214 EXPECT_TRUE(first_password_element.value().isNull());
215 EXPECT_TRUE(second_password_element.value().isNull()); 215 EXPECT_TRUE(second_password_element.value().isNull());
216 216
217 string16 password = ASCIIToUTF16("random_password"); 217 base::string16 password = ASCIIToUTF16("random_password");
218 AutofillMsg_GeneratedPasswordAccepted msg(0, password); 218 AutofillMsg_GeneratedPasswordAccepted msg(0, password);
219 generation_manager_->OnMessageReceived(msg); 219 generation_manager_->OnMessageReceived(msg);
220 220
221 // Password fields are filled out and set as being autofilled. 221 // Password fields are filled out and set as being autofilled.
222 EXPECT_EQ(password, first_password_element.value()); 222 EXPECT_EQ(password, first_password_element.value());
223 EXPECT_EQ(password, second_password_element.value()); 223 EXPECT_EQ(password, second_password_element.value());
224 EXPECT_TRUE(first_password_element.isAutofilled()); 224 EXPECT_TRUE(first_password_element.isAutofilled());
225 EXPECT_TRUE(second_password_element.isAutofilled()); 225 EXPECT_TRUE(second_password_element.isAutofilled());
226 226
227 // Focus moved to the next input field. 227 // Focus moved to the next input field.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 // Receive the account creation forms detected message. Show password 272 // Receive the account creation forms detected message. Show password
273 // generation icon. 273 // generation icon.
274 LoadHTML(kAccountCreationFormHTML); 274 LoadHTML(kAccountCreationFormHTML);
275 SetNotBlacklistedMessage(kAccountCreationFormHTML); 275 SetNotBlacklistedMessage(kAccountCreationFormHTML);
276 SetAccountCreationFormsDetectedMessage(kAccountCreationFormHTML); 276 SetAccountCreationFormsDetectedMessage(kAccountCreationFormHTML);
277 ExpectPasswordGenerationIconShown("first_password", true); 277 ExpectPasswordGenerationIconShown("first_password", true);
278 } 278 }
279 279
280 } // namespace autofill 280 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/renderer/autofill/password_autofill_agent_browsertest.cc ('k') | chrome/renderer/chrome_content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698