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

Side by Side Diff: components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 months 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
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 "base/strings/string16.h" 5 #include "base/strings/string16.h"
6 #include "base/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "components/autofill/content/renderer/password_form_conversion_utils.h" 9 #include "components/autofill/content/renderer/password_form_conversion_utils.h"
10 #include "components/autofill/core/common/password_form.h" 10 #include "components/autofill/core/common/password_form.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ASSERT_NO_FATAL_FAILURE(LoadHTMLAndConvertForm(html, &password_form)); 262 ASSERT_NO_FATAL_FAILURE(LoadHTMLAndConvertForm(html, &password_form));
263 ASSERT_TRUE(password_form); 263 ASSERT_TRUE(password_form);
264 264
265 EXPECT_EQ(base::UTF8ToUTF16(cases[i].expected_username_element), 265 EXPECT_EQ(base::UTF8ToUTF16(cases[i].expected_username_element),
266 password_form->username_element); 266 password_form->username_element);
267 267
268 if (nonempty_username_fields) { 268 if (nonempty_username_fields) {
269 EXPECT_EQ(base::UTF8ToUTF16(cases[i].expected_username_value), 269 EXPECT_EQ(base::UTF8ToUTF16(cases[i].expected_username_value),
270 password_form->username_value); 270 password_form->username_value);
271 EXPECT_EQ(base::UTF8ToUTF16(cases[i].expected_other_possible_usernames), 271 EXPECT_EQ(base::UTF8ToUTF16(cases[i].expected_other_possible_usernames),
272 JoinString(password_form->other_possible_usernames, '+')); 272 base::JoinString(password_form->other_possible_usernames,
273 base::ASCIIToUTF16("+")));
273 } else { 274 } else {
274 EXPECT_TRUE(password_form->username_value.empty()); 275 EXPECT_TRUE(password_form->username_value.empty());
275 EXPECT_TRUE(password_form->other_possible_usernames.empty()); 276 EXPECT_TRUE(password_form->other_possible_usernames.empty());
276 } 277 }
277 278
278 // Do a basic sanity check that we are still having a password field. 279 // Do a basic sanity check that we are still having a password field.
279 EXPECT_EQ(base::UTF8ToUTF16("password"), password_form->password_element); 280 EXPECT_EQ(base::UTF8ToUTF16("password"), password_form->password_element);
280 EXPECT_EQ(base::UTF8ToUTF16("secret"), password_form->password_value); 281 EXPECT_EQ(base::UTF8ToUTF16("secret"), password_form->password_value);
281 } 282 }
282 } 283 }
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 693
693 scoped_ptr<PasswordForm> login_plus_signup_form; 694 scoped_ptr<PasswordForm> login_plus_signup_form;
694 ASSERT_NO_FATAL_FAILURE( 695 ASSERT_NO_FATAL_FAILURE(
695 LoadHTMLAndConvertForm(login_plus_signup_html, &login_plus_signup_form)); 696 LoadHTMLAndConvertForm(login_plus_signup_html, &login_plus_signup_form));
696 ASSERT_TRUE(login_plus_signup_form); 697 ASSERT_TRUE(login_plus_signup_form);
697 EXPECT_EQ(PasswordForm::Layout::LAYOUT_LOGIN_AND_SIGNUP, 698 EXPECT_EQ(PasswordForm::Layout::LAYOUT_LOGIN_AND_SIGNUP,
698 login_plus_signup_form->layout); 699 login_plus_signup_form->layout);
699 } 700 }
700 701
701 } // namespace autofill 702 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/renderer/autofill_agent.cc ('k') | components/autofill/core/browser/address.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698