OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ | 5 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ |
6 #define CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ | 6 #define CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 // reference. | 104 // reference. |
105 bool CheckForeignSessionsAgainst(int index, | 105 bool CheckForeignSessionsAgainst(int index, |
106 const std::vector<std::vector<SessionWindow*>* >& windows) | 106 const std::vector<std::vector<SessionWindow*>* >& windows) |
107 WARN_UNUSED_RESULT; | 107 WARN_UNUSED_RESULT; |
108 | 108 |
109 protected: | 109 protected: |
110 // Open a single tab and block until the session model associator is aware | 110 // Open a single tab and block until the session model associator is aware |
111 // of it. Returns true upon success, false otherwise. | 111 // of it. Returns true upon success, false otherwise. |
112 bool OpenTab(int index, const GURL& url) WARN_UNUSED_RESULT; | 112 bool OpenTab(int index, const GURL& url) WARN_UNUSED_RESULT; |
113 | 113 |
114 // Open multiple tabs and block until the session model associator is aware | |
115 // of all of them. Returns true on success, false on failure. | |
116 bool OpenMultipleTabs(int index, const std::vector<GURL>& urls); | |
117 | |
118 // Wait for a session change to propagate to the model associator. Will not | |
119 // return until each url in |urls| has been found. | |
120 bool AwaitSessionPropagation(int index, const std::vector<GURL>& urls); | |
Nicolas Zea
2011/08/05 00:40:02
prefer WaitForTabsToLoad
braffert
2011/08/05 00:47:38
Done.
| |
121 | |
114 // Check if the session model associator's knows that the current open tab | 122 // Check if the session model associator's knows that the current open tab |
115 // has this url. | 123 // has this url. |
116 bool ModelAssociatorHasTabWithUrl(int index, const GURL& url); | 124 bool ModelAssociatorHasTabWithUrl(int index, const GURL& url); |
117 | 125 |
118 // Stores a pointer to the local session for a given profile in |session|. | 126 // Stores a pointer to the local session for a given profile in |session|. |
119 // Returns true on success, false on failure. | 127 // Returns true on success, false on failure. |
120 bool GetLocalSession(int index, const SyncedSession** session); | 128 bool GetLocalSession(int index, const SyncedSession** session); |
121 | 129 |
122 // Clean up our mess. | 130 // Clean up our mess. |
123 virtual void CleanUpOnMainThread(); | 131 virtual void CleanUpOnMainThread(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 public: | 167 public: |
160 MultipleClientLiveSessionsSyncTest() | 168 MultipleClientLiveSessionsSyncTest() |
161 : LiveSessionsSyncTest(MULTIPLE_CLIENT) {} | 169 : LiveSessionsSyncTest(MULTIPLE_CLIENT) {} |
162 virtual ~MultipleClientLiveSessionsSyncTest() {} | 170 virtual ~MultipleClientLiveSessionsSyncTest() {} |
163 | 171 |
164 private: | 172 private: |
165 DISALLOW_COPY_AND_ASSIGN(MultipleClientLiveSessionsSyncTest); | 173 DISALLOW_COPY_AND_ASSIGN(MultipleClientLiveSessionsSyncTest); |
166 }; | 174 }; |
167 | 175 |
168 #endif // CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ | 176 #endif // CHROME_TEST_LIVE_SYNC_LIVE_SESSIONS_SYNC_TEST_H_ |
OLD | NEW |