OLD | NEW |
---|---|
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 "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/browser/sync/profile_sync_service_harness.h" |
7 #include "chrome/browser/webdata/autofill_entry.h" | 7 #include "chrome/browser/webdata/autofill_entry.h" |
8 #include "chrome/test/live_sync/live_autofill_sync_test.h" | 8 #include "chrome/test/live_sync/live_autofill_sync_test.h" |
9 | 9 |
10 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, WebDataServiceSanity) { | 10 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, WebDataServiceSanity) { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 } | 151 } |
152 | 152 |
153 // TestScribe ID - 426761. | 153 // TestScribe ID - 426761. |
154 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, SameProfileWithConflict) { | 154 IN_PROC_BROWSER_TEST_F(TwoClientLiveAutofillSyncTest, SameProfileWithConflict) { |
155 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; | 155 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; |
156 | 156 |
157 AutofillProfile profile0 = | 157 AutofillProfile profile0 = |
158 CreateAutofillProfile(LiveAutofillSyncTest::PROFILE_HOMER); | 158 CreateAutofillProfile(LiveAutofillSyncTest::PROFILE_HOMER); |
159 AutofillProfile profile1 = | 159 AutofillProfile profile1 = |
160 CreateAutofillProfile(LiveAutofillSyncTest::PROFILE_HOMER); | 160 CreateAutofillProfile(LiveAutofillSyncTest::PROFILE_HOMER); |
161 profile1.SetInfo(AutofillType(PHONE_FAX_WHOLE_NUMBER), | 161 profile1.SetInfo(PHONE_FAX_WHOLE_NUMBER, |
dhollowa
2011/03/16 17:07:11
nit: Single line?
Ilya Sherman
2011/03/17 03:42:29
Done.
| |
162 ASCIIToUTF16("1234567890")); | 162 ASCIIToUTF16("1234567890")); |
163 | 163 |
164 AddProfile(0, profile0); | 164 AddProfile(0, profile0); |
165 AddProfile(1, profile1); | 165 AddProfile(1, profile1); |
166 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 166 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
167 ASSERT_TRUE(AwaitQuiescence()); | 167 ASSERT_TRUE(AwaitQuiescence()); |
168 ASSERT_TRUE(ProfilesMatch(0,1)); | 168 ASSERT_TRUE(ProfilesMatch(0,1)); |
169 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 169 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
170 } | 170 } |
171 | 171 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 ASSERT_TRUE(ProfilesMatch(0,1)); | 256 ASSERT_TRUE(ProfilesMatch(0,1)); |
257 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 257 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
258 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutofillType(NAME_FIRST), | 258 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutofillType(NAME_FIRST), |
259 ASCIIToUTF16("Lisa")); | 259 ASCIIToUTF16("Lisa")); |
260 UpdateProfile(1, GetAllProfiles(1)[0]->guid(), AutofillType(NAME_FIRST), | 260 UpdateProfile(1, GetAllProfiles(1)[0]->guid(), AutofillType(NAME_FIRST), |
261 ASCIIToUTF16("Bart")); | 261 ASCIIToUTF16("Bart")); |
262 ASSERT_TRUE(AwaitQuiescence()); | 262 ASSERT_TRUE(AwaitQuiescence()); |
263 ASSERT_TRUE(ProfilesMatch(0,1)); | 263 ASSERT_TRUE(ProfilesMatch(0,1)); |
264 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 264 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
265 } | 265 } |
OLD | NEW |