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

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

Issue 2725813003: reland of [sync] Add Sessions integration tests (Closed)
Patch Set: Switch back to WaitForURLOnServer, make everything a constant Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/session_hierarchy_match_checker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/session_hierarchy_match_checker.h
diff --git a/chrome/browser/sync/test/integration/session_hierarchy_match_checker.h b/chrome/browser/sync/test/integration/session_hierarchy_match_checker.h
new file mode 100644
index 0000000000000000000000000000000000000000..b8243f72012c187a53445103605dd7d08712edfd
--- /dev/null
+++ b/chrome/browser/sync/test/integration/session_hierarchy_match_checker.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2017 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_SESSION_HIERARCHY_MATCH_CHECKER_H_
+#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSION_HIERARCHY_MATCH_CHECKER_H_
+
+#include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
+#include "components/sync/test/fake_server/fake_server_verifier.h"
+#include "components/sync/test/fake_server/sessions_hierarchy.h"
+
+// Checker to block until the FakeServer records a SessionsHierarchy identical
+// to the SessionsHierarchy specified in the constructor.
+class SessionHierarchyMatchChecker : public SingleClientStatusChangeChecker {
+ public:
+ SessionHierarchyMatchChecker(
+ const fake_server::SessionsHierarchy& sessions_hierarchy,
+ browser_sync::ProfileSyncService* service,
+ fake_server::FakeServer* fake_server);
+
+ // StatusChangeChecker implementation.
+ bool IsExitConditionSatisfied() override;
+ std::string GetDebugMessage() const override;
+
+ private:
+ const fake_server::SessionsHierarchy sessions_hierarchy_;
+ fake_server::FakeServerVerifier verifier_;
+};
+
+#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSION_HIERARCHY_MATCH_CHECKER_H_
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/session_hierarchy_match_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698