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

Unified Diff: chrome/browser/sync/test/integration/single_client_directory_sync_test.cc

Issue 2379433002: [Sync] Refactoring of sync integration test checkers to remove boilerplate await methods. (Closed)
Patch Set: Rebase Created 4 years, 2 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_directory_sync_test.cc
diff --git a/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc b/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc
index 77cb99113bea90bcb4b92688b7e043b00dbccdba..72b63cd294e7f5cf2bbcc3ea4dd6217a568d8258 100644
--- a/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc
@@ -12,8 +12,8 @@
#include "base/time/time.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
#include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
-#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
+#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "components/browser_sync/profile_sync_service.h"
#include "components/sync/syncable/directory.h"
#include "components/sync/test/directory_backing_store_corruption_testing.h"
@@ -21,7 +21,6 @@
#include "url/gurl.h"
using content::BrowserThread;
-using sync_integration_test_util::AwaitCommitActivityCompletion;
using syncer::syncable::corruption_testing::kNumEntriesRequiredForCorruption;
using syncer::syncable::corruption_testing::CorruptDatabase;
@@ -92,7 +91,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientDirectorySyncTest,
ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
// Sync and wait for syncing to complete.
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
- ASSERT_TRUE(AwaitCommitActivityCompletion(GetSyncService(0)));
+ ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait());
ASSERT_TRUE(bookmarks_helper::ModelMatchesVerifier(0));
// Flush the directory to the backing store and wait until the flush
@@ -129,9 +128,7 @@ IN_PROC_BROWSER_TEST_F(SingleClientDirectorySyncTest,
sync_service->FlushDirectory();
// Wait for an unrecoverable error to occur.
- SyncUnrecoverableErrorChecker checker(sync_service);
- checker.Wait();
- ASSERT_TRUE(!checker.TimedOut());
+ ASSERT_TRUE(SyncUnrecoverableErrorChecker(sync_service).Wait());
ASSERT_TRUE(sync_service->HasUnrecoverableError());
// Wait until the sync loop has processed any existing tasks and see that the

Powered by Google App Engine
This is Rietveld 408576698