Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/test/live_sync/live_autofill_sync_test.h" | 6 #include "chrome/test/live_sync/live_autofill_sync_test.h" |
| 7 | 7 |
| 8 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, WebDataServiceSanity) { | 8 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, WebDataServiceSanity) { |
| 9 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 9 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 keys1.insert(AutofillKey("name2", "value2")); | 88 keys1.insert(AutofillKey("name2", "value2")); |
| 89 keys1.insert(AutofillKey("name3", "value3")); | 89 keys1.insert(AutofillKey("name3", "value3")); |
| 90 AddKeys(1, keys1); | 90 AddKeys(1, keys1); |
| 91 | 91 |
| 92 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 92 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 93 ASSERT_TRUE(AwaitQuiescence()); | 93 ASSERT_TRUE(AwaitQuiescence()); |
| 94 ASSERT_TRUE(KeysMatch(0, 1)); | 94 ASSERT_TRUE(KeysMatch(0, 1)); |
| 95 ASSERT_EQ(5U, GetAllKeys(0).size()); | 95 ASSERT_EQ(5U, GetAllKeys(0).size()); |
| 96 } | 96 } |
| 97 | 97 |
| 98 // TODO(lipalani): Enable after http://crbug.com/69173 is fixed. | 98 // TODO(lipalani): Enable after http://crbug.com/69173 is fixed. |
|
Raghu Simha
2011/01/13 22:16:10
Remove this comment.
| |
| 99 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, | 99 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, |
| 100 DISABLED_PersonalDataManagerSanity) { | 100 PersonalDataManagerSanity) { |
| 101 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 101 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 102 | 102 |
| 103 // Client0 adds a profile. | 103 // Client0 adds a profile. |
| 104 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); | 104 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); |
| 105 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 105 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 106 ASSERT_TRUE(ProfilesMatch(0,1)); | 106 ASSERT_TRUE(ProfilesMatch(0,1)); |
| 107 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 107 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
| 108 | 108 |
| 109 // Client1 adds a profile. | 109 // Client1 adds a profile. |
| 110 AddProfile(1, CreateAutofillProfile(PROFILE_MARION)); | 110 AddProfile(1, CreateAutofillProfile(PROFILE_MARION)); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 220 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); | 220 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); |
| 221 AddProfile(1, CreateAutofillProfile(PROFILE_MARION)); | 221 AddProfile(1, CreateAutofillProfile(PROFILE_MARION)); |
| 222 AddProfile(1, CreateAutofillProfile(PROFILE_FRASIER)); | 222 AddProfile(1, CreateAutofillProfile(PROFILE_FRASIER)); |
| 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(3U, GetAllProfiles(0).size()); | 226 ASSERT_EQ(3U, GetAllProfiles(0).size()); |
| 227 } | 227 } |
| 228 | 228 |
| 229 // TestScribe ID - 426756. | 229 // TestScribe ID - 426756. |
| 230 // TODO(lipalani): Enable after http://crbug.com/69173 is fixed. | 230 // TODO(lipalani): Enable after http://crbug.com/69173 is fixed. |
|
Raghu Simha
2011/01/13 22:16:10
Remove this comment.
| |
| 231 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, DISABLED_UpdateFields) { | 231 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, UpdateFields) { |
| 232 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 232 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 233 | 233 |
| 234 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); | 234 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); |
| 235 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 235 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 236 ASSERT_TRUE(ProfilesMatch(0,1)); | 236 ASSERT_TRUE(ProfilesMatch(0,1)); |
| 237 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 237 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
| 238 | 238 |
| 239 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutoFillType(NAME_FIRST), | 239 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutoFillType(NAME_FIRST), |
| 240 ASCIIToUTF16("Lisa")); | 240 ASCIIToUTF16("Lisa")); |
| 241 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutoFillType(EMAIL_ADDRESS), | 241 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutoFillType(EMAIL_ADDRESS), |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 254 ASSERT_TRUE(ProfilesMatch(0,1)); | 254 ASSERT_TRUE(ProfilesMatch(0,1)); |
| 255 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 255 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
| 256 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutoFillType(NAME_FIRST), | 256 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutoFillType(NAME_FIRST), |
| 257 ASCIIToUTF16("Lisa")); | 257 ASCIIToUTF16("Lisa")); |
| 258 UpdateProfile(1, GetAllProfiles(1)[0]->guid(), AutoFillType(NAME_FIRST), | 258 UpdateProfile(1, GetAllProfiles(1)[0]->guid(), AutoFillType(NAME_FIRST), |
| 259 ASCIIToUTF16("Bart")); | 259 ASCIIToUTF16("Bart")); |
| 260 ASSERT_TRUE(AwaitQuiescence()); | 260 ASSERT_TRUE(AwaitQuiescence()); |
| 261 ASSERT_TRUE(ProfilesMatch(0,1)); | 261 ASSERT_TRUE(ProfilesMatch(0,1)); |
| 262 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 262 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
| 263 } | 263 } |
| OLD | NEW |