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, ASCIIToUTF16("1234567890")); |
162 ASCIIToUTF16("1234567890")); | |
163 | 162 |
164 AddProfile(0, profile0); | 163 AddProfile(0, profile0); |
165 AddProfile(1, profile1); | 164 AddProfile(1, profile1); |
166 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 165 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
167 ASSERT_TRUE(AwaitQuiescence()); | 166 ASSERT_TRUE(AwaitQuiescence()); |
168 ASSERT_TRUE(ProfilesMatch(0,1)); | 167 ASSERT_TRUE(ProfilesMatch(0,1)); |
169 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 168 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
170 } | 169 } |
171 | 170 |
172 // TestScribe ID - 426757. | 171 // TestScribe ID - 426757. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 ASSERT_TRUE(ProfilesMatch(0,1)); | 255 ASSERT_TRUE(ProfilesMatch(0,1)); |
257 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 256 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
258 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutofillType(NAME_FIRST), | 257 UpdateProfile(0, GetAllProfiles(0)[0]->guid(), AutofillType(NAME_FIRST), |
259 ASCIIToUTF16("Lisa")); | 258 ASCIIToUTF16("Lisa")); |
260 UpdateProfile(1, GetAllProfiles(1)[0]->guid(), AutofillType(NAME_FIRST), | 259 UpdateProfile(1, GetAllProfiles(1)[0]->guid(), AutofillType(NAME_FIRST), |
261 ASCIIToUTF16("Bart")); | 260 ASCIIToUTF16("Bart")); |
262 ASSERT_TRUE(AwaitQuiescence()); | 261 ASSERT_TRUE(AwaitQuiescence()); |
263 ASSERT_TRUE(ProfilesMatch(0,1)); | 262 ASSERT_TRUE(ProfilesMatch(0,1)); |
264 ASSERT_EQ(1U, GetAllProfiles(0).size()); | 263 ASSERT_EQ(1U, GetAllProfiles(0).size()); |
265 } | 264 } |
OLD | NEW |