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

Unified Diff: chrome/browser/sync/test/integration/single_client_bookmarks_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, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
diff --git a/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc b/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
index 03292bd777a7f323bd5cffa399f8621ca3b06128..0fc20af964c836d40706b86f8fbaf0809a98dde3 100644
--- a/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc
@@ -56,7 +56,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, Sanity) {
// Setup sync, wait for its completion, and make sure changes were synced.
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
- ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion());
+ ASSERT_TRUE(GetClient(0)->AwaitCommitActivityCompletion());
ASSERT_TRUE(ModelMatchesVerifier(0));
// Ultimately we want to end up with the following model; but this test is
@@ -87,7 +87,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, Sanity) {
Move(0, tier1_a, bar, 1);
// Wait for the bookmark position change to sync.
- ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion());
+ ASSERT_TRUE(GetClient(0)->AwaitCommitActivityCompletion());
ASSERT_TRUE(ModelMatchesVerifier(0));
const BookmarkNode* porsche = AddURL(0, bar, 2, L"Porsche",
@@ -99,7 +99,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, Sanity) {
Move(0, tier1_a_url1, tier1_a, 2);
// Wait for the rearranged hierarchy to sync.
- ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion());
+ ASSERT_TRUE(GetClient(0)->AwaitCommitActivityCompletion());
ASSERT_TRUE(ModelMatchesVerifier(0));
ASSERT_EQ(1, tier1_a_url0->parent()->GetIndexOf(tier1_a_url0));
@@ -122,7 +122,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, Sanity) {
SetTitle(0, porsche, L"ICanHazPorsche?");
// Wait for the title change to sync.
- ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion());
+ ASSERT_TRUE(GetClient(0)->AwaitCommitActivityCompletion());
ASSERT_TRUE(ModelMatchesVerifier(0));
ASSERT_EQ(tier1_a_url0->id(), top->GetChild(top->child_count() - 1)->id());
@@ -139,7 +139,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest, Sanity) {
Move(0, leafs, tier3_b, 0);
// Wait for newly added bookmarks to sync.
- ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion());
+ ASSERT_TRUE(GetClient(0)->AwaitCommitActivityCompletion());
ASSERT_TRUE(ModelMatchesVerifier(0));
}
@@ -173,7 +173,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest,
SetFavicon(0, bookmark, icon_url, original_favicon,
bookmarks_helper::FROM_SYNC);
- ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion());
+ ASSERT_TRUE(GetClient(0)->AwaitCommitActivityCompletion());
ASSERT_TRUE(ModelMatchesVerifier(0));
scoped_refptr<base::RefCountedMemory> original_favicon_bytes =
@@ -223,12 +223,12 @@ IN_PROC_BROWSER_TEST_F(SingleClientBookmarksSyncTest,
// Set up sync, wait for its completion and verify that changes propagated.
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
- ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion());
+ ASSERT_TRUE(GetClient(0)->AwaitCommitActivityCompletion());
ASSERT_TRUE(ModelMatchesVerifier(0));
// Remove all bookmarks and wait for sync completion.
RemoveAll(0);
- ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion());
+ ASSERT_TRUE(GetClient(0)->AwaitCommitActivityCompletion());
// Verify other node has no children now.
EXPECT_EQ(0, GetOtherNode(0)->child_count());
EXPECT_EQ(0, GetBookmarkBarNode(0)->child_count());

Powered by Google App Engine
This is Rietveld 408576698