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

Side by Side Diff: chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc

Issue 11360055: [Autofill] Rename GetInfo and SetInfo to GetRawInfo and SetRawInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase harder Created 8 years, 1 month 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 "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/autofill/autofill_profile.h" 6 #include "chrome/browser/autofill/autofill_profile.h"
7 #include "chrome/browser/autofill/credit_card.h" 7 #include "chrome/browser/autofill/credit_card.h"
8 #include "chrome/browser/autofill/personal_data_manager.h" 8 #include "chrome/browser/autofill/personal_data_manager.h"
9 #include "chrome/browser/sync/profile_sync_service_harness.h" 9 #include "chrome/browser/sync/profile_sync_service_harness.h"
10 #include "chrome/browser/sync/test/integration/autofill_helper.h" 10 #include "chrome/browser/sync/test/integration/autofill_helper.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 ASSERT_TRUE(ProfilesMatch(0, 1)); 209 ASSERT_TRUE(ProfilesMatch(0, 1));
210 ASSERT_EQ(1U, GetAllProfiles(0).size()); 210 ASSERT_EQ(1U, GetAllProfiles(0).size());
211 } 211 }
212 212
213 // TCM ID - 3636294. 213 // TCM ID - 3636294.
214 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, SameProfileWithConflict) { 214 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, SameProfileWithConflict) {
215 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; 215 ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
216 216
217 AutofillProfile profile0 = CreateAutofillProfile(PROFILE_HOMER); 217 AutofillProfile profile0 = CreateAutofillProfile(PROFILE_HOMER);
218 AutofillProfile profile1 = CreateAutofillProfile(PROFILE_HOMER); 218 AutofillProfile profile1 = CreateAutofillProfile(PROFILE_HOMER);
219 profile1.SetInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("1234567890")); 219 profile1.SetRawInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("1234567890"));
220 220
221 AddProfile(0, profile0); 221 AddProfile(0, profile0);
222 AddProfile(1, profile1); 222 AddProfile(1, profile1);
223 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 223 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
224 ASSERT_TRUE(AwaitQuiescence()); 224 ASSERT_TRUE(AwaitQuiescence());
225 ASSERT_TRUE(ProfilesMatch(0, 1)); 225 ASSERT_TRUE(ProfilesMatch(0, 1));
226 ASSERT_EQ(1U, GetAllProfiles(0).size()); 226 ASSERT_EQ(1U, GetAllProfiles(0).size());
227 } 227 }
228 228
229 // TCM ID - 3626291. 229 // TCM ID - 3626291.
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 ASSERT_FALSE(ProfilesMatch(0, 1)); 453 ASSERT_FALSE(ProfilesMatch(0, 1));
454 } 454 }
455 455
456 // Test credit cards don't sync. 456 // Test credit cards don't sync.
457 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, NoCreditCardSync) { 457 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, NoCreditCardSync) {
458 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 458 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
459 459
460 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); 460 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER));
461 461
462 CreditCard card; 462 CreditCard card;
463 card.SetInfo(CREDIT_CARD_NUMBER, ASCIIToUTF16("6011111111111117")); 463 card.SetRawInfo(CREDIT_CARD_NUMBER, ASCIIToUTF16("6011111111111117"));
464 std::vector<CreditCard> credit_cards; 464 std::vector<CreditCard> credit_cards;
465 credit_cards.push_back(card); 465 credit_cards.push_back(card);
466 SetCreditCards(0, &credit_cards); 466 SetCreditCards(0, &credit_cards);
467 467
468 MakeABookmarkChange(0); 468 MakeABookmarkChange(0);
469 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 469 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
470 ASSERT_TRUE(ProfilesMatch(0, 1)); 470 ASSERT_TRUE(ProfilesMatch(0, 1));
471 ASSERT_EQ(1U, GetAllProfiles(0).size()); 471 ASSERT_EQ(1U, GetAllProfiles(0).size());
472 472
473 PersonalDataManager* pdm = GetPersonalDataManager(1); 473 PersonalDataManager* pdm = GetPersonalDataManager(1);
474 ASSERT_EQ(0U, pdm->credit_cards().size()); 474 ASSERT_EQ(0U, pdm->credit_cards().size());
475 } 475 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698