Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: chrome/browser/sync/test/integration/two_client_autofill_sync_test.cc

Issue 7841007: Rename browser/sync/test/live_sync directory to browser/sync/test/integration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/autofill/autofill_profile.h" 6 #include "chrome/browser/autofill/autofill_profile.h"
7 #include "chrome/browser/sync/profile_sync_service_harness.h" 7 #include "chrome/browser/sync/profile_sync_service_harness.h"
8 #include "chrome/browser/sync/test/live_sync/autofill_helper.h" 8 #include "chrome/browser/sync/test/integration/autofill_helper.h"
9 #include "chrome/browser/sync/test/live_sync/live_sync_test.h" 9 #include "chrome/browser/sync/test/integration/sync_test.h"
10 #include "chrome/browser/webdata/autofill_entry.h" 10 #include "chrome/browser/webdata/autofill_entry.h"
11 11
12 using autofill_helper::AddKeys; 12 using autofill_helper::AddKeys;
13 using autofill_helper::AddProfile; 13 using autofill_helper::AddProfile;
14 using autofill_helper::CreateAutofillProfile; 14 using autofill_helper::CreateAutofillProfile;
15 using autofill_helper::GetAllKeys; 15 using autofill_helper::GetAllKeys;
16 using autofill_helper::GetAllProfiles; 16 using autofill_helper::GetAllProfiles;
17 using autofill_helper::KeysMatch; 17 using autofill_helper::KeysMatch;
18 using autofill_helper::ProfilesMatch; 18 using autofill_helper::ProfilesMatch;
19 using autofill_helper::PROFILE_FRASIER; 19 using autofill_helper::PROFILE_FRASIER;
20 using autofill_helper::PROFILE_HOMER; 20 using autofill_helper::PROFILE_HOMER;
21 using autofill_helper::PROFILE_MARION; 21 using autofill_helper::PROFILE_MARION;
22 using autofill_helper::PROFILE_NULL; 22 using autofill_helper::PROFILE_NULL;
23 using autofill_helper::RemoveKey; 23 using autofill_helper::RemoveKey;
24 using autofill_helper::RemoveProfile; 24 using autofill_helper::RemoveProfile;
25 using autofill_helper::UpdateProfile; 25 using autofill_helper::UpdateProfile;
26 26
27 // Autofill entry length is limited to 1024. See http://crbug.com/49332. 27 // Autofill entry length is limited to 1024. See http://crbug.com/49332.
28 const size_t kMaxDataLength = 1024; 28 const size_t kMaxDataLength = 1024;
29 29
30 class TwoClientAutofillSyncTest : public LiveSyncTest { 30 class TwoClientAutofillSyncTest : public SyncTest {
31 public: 31 public:
32 TwoClientAutofillSyncTest() : LiveSyncTest(TWO_CLIENT) {} 32 TwoClientAutofillSyncTest() : SyncTest(TWO_CLIENT) {}
33 virtual ~TwoClientAutofillSyncTest() {} 33 virtual ~TwoClientAutofillSyncTest() {}
34 34
35 private: 35 private:
36 DISALLOW_COPY_AND_ASSIGN(TwoClientAutofillSyncTest); 36 DISALLOW_COPY_AND_ASSIGN(TwoClientAutofillSyncTest);
37 }; 37 };
38 38
39 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, WebDataServiceSanity) { 39 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, WebDataServiceSanity) {
40 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 40 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
41 41
42 // Client0 adds a key. 42 // Client0 adds a key.
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 AutofillType(EMAIL_ADDRESS), 400 AutofillType(EMAIL_ADDRESS),
401 exceeds_max_length_string); 401 exceeds_max_length_string);
402 UpdateProfile(0, 402 UpdateProfile(0,
403 GetAllProfiles(0)[0]->guid(), 403 GetAllProfiles(0)[0]->guid(),
404 AutofillType(ADDRESS_HOME_LINE1), 404 AutofillType(ADDRESS_HOME_LINE1),
405 exceeds_max_length_string); 405 exceeds_max_length_string);
406 406
407 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 407 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
408 ASSERT_FALSE(ProfilesMatch(0, 1)); 408 ASSERT_FALSE(ProfilesMatch(0, 1));
409 } 409 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698