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

Side by Side Diff: chrome/browser/autofill/personal_data_manager_unittest.cc

Issue 8143007: Move a bunch of non-shared methods out of the FormGroup class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: De-nitting Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 form1.fields.push_back(field); 989 form1.fields.push_back(field);
990 autofill_test::CreateTestFormField( 990 autofill_test::CreateTestFormField(
991 "Zip:", "zipcode", "19106", "text", &field); 991 "Zip:", "zipcode", "19106", "text", &field);
992 form1.fields.push_back(field); 992 form1.fields.push_back(field);
993 993
994 FormStructure form_structure1(form1); 994 FormStructure form_structure1(form1);
995 form_structure1.DetermineHeuristicTypes(); 995 form_structure1.DetermineHeuristicTypes();
996 const CreditCard* imported_credit_card; 996 const CreditCard* imported_credit_card;
997 EXPECT_TRUE(personal_data_->ImportFormData(form_structure1, 997 EXPECT_TRUE(personal_data_->ImportFormData(form_structure1,
998 &imported_credit_card)); 998 &imported_credit_card));
999 ASSERT_FALSE(imported_credit_card); 999 EXPECT_FALSE(imported_credit_card);
1000 1000
1001 // Verify that the web database has been updated and the notification sent. 1001 // Verify that the web database has been updated and the notification sent.
1002 EXPECT_CALL(personal_data_observer_, 1002 EXPECT_CALL(personal_data_observer_,
1003 OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop()); 1003 OnPersonalDataChanged()).WillOnce(QuitUIMessageLoop());
1004 MessageLoop::current()->Run(); 1004 MessageLoop::current()->Run();
1005 1005
1006 AutofillProfile expected; 1006 AutofillProfile expected;
1007 autofill_test::SetProfileInfo(&expected, "George", NULL, 1007 autofill_test::SetProfileInfo(&expected, "George", NULL,
1008 "Washington", NULL, NULL, "190 High Street", NULL, 1008 "Washington", NULL, NULL, "190 High Street", NULL,
1009 "Philadelphia", "Pennsylvania", "19106", NULL, NULL); 1009 "Philadelphia", "Pennsylvania", "19106", NULL, NULL);
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 1890
1891 // Modify expected to include multi-valued fields. 1891 // Modify expected to include multi-valued fields.
1892 std::vector<string16> values; 1892 std::vector<string16> values;
1893 expected.GetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, &values); 1893 expected.GetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, &values);
1894 values.push_back(ASCIIToUTF16("214-555-1234")); 1894 values.push_back(ASCIIToUTF16("214-555-1234"));
1895 expected.SetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, values); 1895 expected.SetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, values);
1896 1896
1897 ASSERT_EQ(1U, results2.size()); 1897 ASSERT_EQ(1U, results2.size());
1898 EXPECT_EQ(0, expected.CompareMulti(*results2[0])); 1898 EXPECT_EQ(0, expected.CompareMulti(*results2[0]));
1899 } 1899 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/personal_data_manager.cc ('k') | chrome/test/data/autofill/merge/input/primarycase.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698