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

Unified Diff: chrome/browser/sync/test/integration/updated_progress_marker_checker.h

Issue 184993006: sync: Change progress marker checking in tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 6 years, 9 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/updated_progress_marker_checker.h
diff --git a/chrome/browser/sync/test/integration/updated_progress_marker_checker.h b/chrome/browser/sync/test/integration/updated_progress_marker_checker.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd26da7444a45faeae92a32bc2820c73c17216b4
--- /dev/null
+++ b/chrome/browser/sync/test/integration/updated_progress_marker_checker.h
@@ -0,0 +1,30 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_UPDATED_PROGRESS_MARKER_CHECKER_H_
+#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_UPDATED_PROGRESS_MARKER_CHECKER_H_
+
+#include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
+
+// Waits until the latest progress markers are available.
+//
+// There are several limitations to this checker:
+// - It assumes that this client is the only one committing at this time.
+// - It relies on the test-only 'self-notify' to trigger an extra GetUpdate
+// cycle after every commit.
+// - It's flaky. In some rare cases, the IsExitConditionSatisifed() call could
+// return a false positive. See comments in the .cc file for details.
+//
+// Because of these limitations, we intend to eventually migrate all tests off
+// of this checker. Please do not use it in new tests.
+class UpdatedProgressMarkerChecker : public SingleClientStatusChangeChecker {
+ public:
+ explicit UpdatedProgressMarkerChecker(ProfileSyncService* service);
+ virtual ~UpdatedProgressMarkerChecker();
+
+ virtual bool IsExitConditionSatisfied() OVERRIDE;
+ virtual std::string GetDebugMessage() const OVERRIDE;
+};
+
+#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_UPDATED_PROGRESS_MARKER_CHECKER_H_

Powered by Google App Engine
This is Rietveld 408576698