| OLD | NEW |
| 1 // Copyright (c) 2010 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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "chrome/browser/sync/profile_sync_service_harness.h" |
| 6 #include "chrome/test/live_sync/live_autofill_sync_test.h" | 7 #include "chrome/test/live_sync/live_autofill_sync_test.h" |
| 7 | 8 |
| 8 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, WebDataServiceSanity) { | 9 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, WebDataServiceSanity) { |
| 9 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 10 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 10 | 11 |
| 11 // Client0 adds a key. | 12 // Client0 adds a key. |
| 12 std::set<AutofillKey> keys; | 13 std::set<AutofillKey> keys; |
| 13 keys.insert(AutofillKey("name0", "value0")); | 14 keys.insert(AutofillKey("name0", "value0")); |
| 14 AddKeys(0, keys); | 15 AddKeys(0, keys); |
| 15 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 16 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 ASSERT_TRUE(ProfilesMatch(0,1)); | 253 ASSERT_TRUE(ProfilesMatch(0,1)); |
| 253 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 254 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
| 254 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutoFillType(NAME_FIRST), | 255 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutoFillType(NAME_FIRST), |
| 255 ASCIIToUTF16("Lisa")); | 256 ASCIIToUTF16("Lisa")); |
| 256 UpdateProfile(1, GetAllProfiles(1)[0]->guid(), AutoFillType(NAME_FIRST), | 257 UpdateProfile(1, GetAllProfiles(1)[0]->guid(), AutoFillType(NAME_FIRST), |
| 257 ASCIIToUTF16("Bart")); | 258 ASCIIToUTF16("Bart")); |
| 258 ASSERT_TRUE(AwaitQuiescence()); | 259 ASSERT_TRUE(AwaitQuiescence()); |
| 259 ASSERT_TRUE(ProfilesMatch(0,1)); | 260 ASSERT_TRUE(ProfilesMatch(0,1)); |
| 260 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 261 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
| 261 } | 262 } |
| OLD | NEW |