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

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

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights Created 8 years, 5 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) 2012 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/integration/autofill_helper.h" 8 #include "chrome/browser/sync/test/integration/autofill_helper.h"
9 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 9 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
10 #include "chrome/browser/sync/test/integration/sync_test.h" 10 #include "chrome/browser/sync/test/integration/sync_test.h"
11 #include "chrome/browser/webdata/autofill_entry.h" 11 #include "chrome/browser/webdata/autofill_entry.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // TCM ID - 3663293. 337 // TCM ID - 3663293.
338 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, DisableAutofill) { 338 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, DisableAutofill) {
339 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 339 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
340 340
341 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); 341 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER));
342 MakeABookmarkChange(0); 342 MakeABookmarkChange(0);
343 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 343 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
344 ASSERT_TRUE(ProfilesMatch(0, 1)); 344 ASSERT_TRUE(ProfilesMatch(0, 1));
345 ASSERT_EQ(1U, GetAllProfiles(0).size()); 345 ASSERT_EQ(1U, GetAllProfiles(0).size());
346 346
347 ASSERT_TRUE(GetClient(0)->DisableSyncForDatatype(syncable::AUTOFILL)); 347 ASSERT_TRUE(GetClient(0)->DisableSyncForDatatype(syncer::AUTOFILL));
348 AddProfile(0, CreateAutofillProfile(PROFILE_FRASIER)); 348 AddProfile(0, CreateAutofillProfile(PROFILE_FRASIER));
349 MakeABookmarkChange(0); 349 MakeABookmarkChange(0);
350 ASSERT_TRUE(AwaitQuiescence()); 350 ASSERT_TRUE(AwaitQuiescence());
351 ASSERT_FALSE(ProfilesMatch(0, 1)); 351 ASSERT_FALSE(ProfilesMatch(0, 1));
352 ASSERT_EQ(2U, GetAllProfiles(0).size()); 352 ASSERT_EQ(2U, GetAllProfiles(0).size());
353 ASSERT_EQ(1U, GetAllProfiles(1).size()); 353 ASSERT_EQ(1U, GetAllProfiles(1).size());
354 354
355 ASSERT_TRUE(GetClient(0)->EnableSyncForDatatype(syncable::AUTOFILL)); 355 ASSERT_TRUE(GetClient(0)->EnableSyncForDatatype(syncer::AUTOFILL));
356 MakeABookmarkChange(0); 356 MakeABookmarkChange(0);
357 ASSERT_TRUE(AwaitQuiescence()); 357 ASSERT_TRUE(AwaitQuiescence());
358 ASSERT_TRUE(ProfilesMatch(0, 1)); 358 ASSERT_TRUE(ProfilesMatch(0, 1));
359 ASSERT_EQ(2U, GetAllProfiles(0).size()); 359 ASSERT_EQ(2U, GetAllProfiles(0).size());
360 } 360 }
361 361
362 // TCM ID - 3661291. 362 // TCM ID - 3661291.
363 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, DisableSync) { 363 IN_PROC_BROWSER_TEST_F(TwoClientAutofillSyncTest, DisableSync) {
364 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 364 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
365 365
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 exceeds_max_length_string); 440 exceeds_max_length_string);
441 UpdateProfile(0, 441 UpdateProfile(0,
442 GetAllProfiles(0)[0]->guid(), 442 GetAllProfiles(0)[0]->guid(),
443 AutofillType(ADDRESS_HOME_LINE1), 443 AutofillType(ADDRESS_HOME_LINE1),
444 exceeds_max_length_string); 444 exceeds_max_length_string);
445 445
446 MakeABookmarkChange(0); 446 MakeABookmarkChange(0);
447 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 447 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
448 ASSERT_FALSE(ProfilesMatch(0, 1)); 448 ASSERT_FALSE(ProfilesMatch(0, 1));
449 } 449 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698