OLD | NEW |
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 97 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
98 ASSERT_TRUE(KeysMatch(0, 1)); | 98 ASSERT_TRUE(KeysMatch(0, 1)); |
99 ASSERT_EQ(0U, GetAllKeys(0).size()); | 99 ASSERT_EQ(0U, GetAllKeys(0).size()); |
100 } | 100 } |
101 | 101 |
102 // TCM ID - 3678296. | 102 // TCM ID - 3678296. |
103 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, AddUnicodeProfile) { | 103 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, AddUnicodeProfile) { |
104 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; | 104 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; |
105 | 105 |
106 std::set<AutofillKey> keys; | 106 std::set<AutofillKey> keys; |
107 keys.insert(AutofillKey(WideToUTF16(L"Sigur R\u00F3s"), | 107 keys.insert(AutofillKey(base::WideToUTF16(L"Sigur R\u00F3s"), |
108 WideToUTF16(L"\u00C1g\u00E6tis byrjun"))); | 108 base::WideToUTF16(L"\u00C1g\u00E6tis byrjun"))); |
109 AddKeys(0, keys); | 109 AddKeys(0, keys); |
110 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 110 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
111 ASSERT_TRUE(AwaitQuiescence()); | 111 ASSERT_TRUE(AwaitQuiescence()); |
112 ASSERT_TRUE(KeysMatch(0, 1)); | 112 ASSERT_TRUE(KeysMatch(0, 1)); |
113 } | 113 } |
114 | 114 |
115 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, | 115 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, |
116 AddDuplicateNamesToSameProfile) { | 116 AddDuplicateNamesToSameProfile) { |
117 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; | 117 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; |
118 | 118 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |