Index: chrome/browser/sync/test/integration/sessions_helper.h |
diff --git a/chrome/browser/sync/test/integration/sessions_helper.h b/chrome/browser/sync/test/integration/sessions_helper.h |
index 3700b984f3551bcdda8734c65914064422f326f8..6fbf79525e721b5e4761affbedb1874ecde402f2 100644 |
--- a/chrome/browser/sync/test/integration/sessions_helper.h |
+++ b/chrome/browser/sync/test/integration/sessions_helper.h |
@@ -6,10 +6,13 @@ |
#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ |
#include <algorithm> |
+#include <map> |
+#include <memory> |
#include <string> |
#include <vector> |
#include "base/compiler_specific.h" |
+#include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h" |
#include "chrome/browser/sync/test/integration/sync_test.h" |
#include "components/sessions/core/session_types.h" |
#include "components/sync/syncable/nigori_util.h" |
@@ -81,12 +84,6 @@ bool CheckForeignSessionsAgainst( |
int index, |
const std::vector<ScopedWindowMap>& windows); |
-// Retrieves the foreign sessions for a particular profile and compares them |
-// to the reference windows using CheckForeignSessionsAgains. Returns true if |
-// they match and doesn't time out. |
-bool AwaitCheckForeignSessionsAgainst( |
- int index, const std::vector<ScopedWindowMap>& windows); |
- |
// Open a single tab and block until the session model associator is aware |
// of it. Returns true upon success, false otherwise. |
bool OpenTab(int index, const GURL& url); |
@@ -115,4 +112,21 @@ void DeleteForeignSession(int index, std::string session_tag); |
} // namespace sessions_helper |
+// Checker to block until the foreign sessions for a particular profile matches |
+// the reference windows. |
+class CheckForeignSessionsChecker : public MultiClientStatusChangeChecker { |
maxbogue
2016/09/30 16:27:55
Shouldn't this be ForeignSessionsMatchChecker to f
skym
2016/09/30 17:43:21
Done.
|
+ public: |
+ CheckForeignSessionsChecker( |
+ int index, |
+ const std::vector<sessions_helper::ScopedWindowMap>& windows); |
+ |
+ // StatusChangeChecker implementation. |
+ bool IsExitConditionSatisfied() override; |
+ std::string GetDebugMessage() const override; |
+ |
+ private: |
+ int index_; |
+ const std::vector<sessions_helper::ScopedWindowMap>& windows_; |
+}; |
+ |
#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SESSIONS_HELPER_H_ |