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

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

Issue 148723002: [sync] Eliminate Await*SyncCompletion methods in integration tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback Created 6 years, 10 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) 2012 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/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "chrome/browser/sync/test/integration/autofill_helper.h" 6 #include "chrome/browser/sync/test/integration/autofill_helper.h"
7 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 7 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" 8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
9 #include "chrome/browser/sync/test/integration/sync_test.h" 9 #include "chrome/browser/sync/test/integration/sync_test.h"
10 #include "components/autofill/core/browser/autofill_profile.h" 10 #include "components/autofill/core/browser/autofill_profile.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER)); 376 AddProfile(0, CreateAutofillProfile(PROFILE_HOMER));
377 MakeABookmarkChange(0); 377 MakeABookmarkChange(0);
378 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 378 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
379 ASSERT_TRUE(ProfilesMatch(0, 1)); 379 ASSERT_TRUE(ProfilesMatch(0, 1));
380 ASSERT_EQ(1U, GetAllProfiles(0).size()); 380 ASSERT_EQ(1U, GetAllProfiles(0).size());
381 381
382 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes()); 382 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes());
383 AddProfile(0, CreateAutofillProfile(PROFILE_FRASIER)); 383 AddProfile(0, CreateAutofillProfile(PROFILE_FRASIER));
384 MakeABookmarkChange(0); 384 MakeABookmarkChange(0);
385 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion()); 385 ASSERT_TRUE(GetClient(0)->AwaitCommitActivityCompletion());
386 ASSERT_FALSE(ProfilesMatch(0, 1)); 386 ASSERT_FALSE(ProfilesMatch(0, 1));
387 ASSERT_EQ(2U, GetAllProfiles(0).size()); 387 ASSERT_EQ(2U, GetAllProfiles(0).size());
388 ASSERT_EQ(1U, GetAllProfiles(1).size()); 388 ASSERT_EQ(1U, GetAllProfiles(1).size());
389 389
390 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); 390 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes());
391 ASSERT_TRUE(AwaitQuiescence()); 391 ASSERT_TRUE(AwaitQuiescence());
392 ASSERT_TRUE(ProfilesMatch(0, 1)); 392 ASSERT_TRUE(ProfilesMatch(0, 1));
393 ASSERT_EQ(2U, GetAllProfiles(0).size()); 393 ASSERT_EQ(2U, GetAllProfiles(0).size());
394 } 394 }
395 395
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 SetCreditCards(0, &credit_cards); 473 SetCreditCards(0, &credit_cards);
474 474
475 MakeABookmarkChange(0); 475 MakeABookmarkChange(0);
476 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); 476 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
477 ASSERT_TRUE(ProfilesMatch(0, 1)); 477 ASSERT_TRUE(ProfilesMatch(0, 1));
478 ASSERT_EQ(1U, GetAllProfiles(0).size()); 478 ASSERT_EQ(1U, GetAllProfiles(0).size());
479 479
480 PersonalDataManager* pdm = GetPersonalDataManager(1); 480 PersonalDataManager* pdm = GetPersonalDataManager(1);
481 ASSERT_EQ(0U, pdm->GetCreditCards().size()); 481 ASSERT_EQ(0U, pdm->GetCreditCards().size());
482 } 482 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698