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 365bc091c121cce1178e8f8c9b133fce46b2e284..e0ca01d08bcaf3421f96ac9cea293523b6cc7e20 100644 |
--- a/chrome/browser/sync/test/integration/sessions_helper.h |
+++ b/chrome/browser/sync/test/integration/sessions_helper.h |
@@ -27,21 +27,10 @@ using SessionWindowMap = std::map<SessionID::id_type, sessions::SessionWindow*>; |
using ScopedWindowMap = |
std::map<SessionID::id_type, std::unique_ptr<sessions::SessionWindow>>; |
-// Copies the local session windows of profile |index| to |local_windows|. |
-// Returns true if successful. |
+// Copies the local session windows of profile at |index| to |
+// |local_windows|. Returns true if successful. |
skym
2017/02/27 19:42:50
This now wraps too early.
Patrick Noland
2017/02/27 23:37:07
Done.
|
bool GetLocalWindows(int index, ScopedWindowMap* local_windows); |
-// Creates and verifies the creation of a new window for profile |index| with |
-// one tab displaying |url|. Copies the SessionWindow associated with the new |
-// window to |local_windows|. Returns true if successful. This call results in |
-// multiple sessions changes, and performs synchronous blocking. It is rare, but |
-// possible, that multiple sync cycle commits occur as a result of this call. |
-// Test cases should be written to handle this possibility, otherwise they may |
-// flake. |
-bool OpenTabAndGetLocalWindows(int index, |
- const GURL& url, |
- ScopedWindowMap* local_windows); |
- |
// Checks that window count and foreign session count are 0. |
bool CheckInitialState(int index); |
@@ -84,14 +73,36 @@ bool WindowsMatch(const SessionWindowMap& win1, const ScopedWindowMap& win2); |
// with a reference SessionWindow list. |
// Returns true if the session windows of the foreign session matches the |
// reference. |
-bool CheckForeignSessionsAgainst( |
- int index, |
- const std::vector<ScopedWindowMap>& windows); |
+bool CheckForeignSessionsAgainst(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. |
+// Open a single tab in the browser at |index| and block until the |
+// session model associator is aware of it. Returns true upon success, false |
+// otherwise. |
bool OpenTab(int index, const GURL& url); |
+// See OpenTab, except that the tab is opened in position |tab_index|. |
+// If |tab_index| is -1 or greater than the number of tabs, the tab will be |
skym
2017/02/27 19:42:50
Do we need to supposed -1 or greater? Can we just
Patrick Noland
2017/02/27 23:37:07
We don't use it but I wanted to honestly document
|
+// appended to the end of the strip. i.e. if tab_index is 3 for a tab strip of |
+// size 1, the new tab will be in position 1. |
+bool OpenTabAtIndex(int index, int tab_index, const GURL& url); |
+ |
+// Moves the tab in position |tab_index| in the TabStrip for browser at |
+// |from_index| to the TabStrip for browser at |to_index|. |
+void MoveTab(int from_index, int to_index, int tab_index); |
skym
2017/02/27 19:42:50
Do all these navigate methods block?
Patrick Noland
2017/02/27 23:37:07
No, of the Navigate* functions, only NavigateTab b
|
+ |
+// Navigate the active tab for browser in position |index| to the given |
+// url. |
+bool NavigateTab(int index, const GURL& url); |
+ |
+// Navigate the active tab for browser in position |index| back by one; |
+// if this isn't possible, does nothing |
+void NavigateTabBack(int index); |
+ |
+// Navigate the active tab for browser in position |index| forward by |
+// one; if this isn't possible, does nothing |
+void NavigateTabForward(int index); |
+ |
// Open multiple tabs and block until the session model associator is aware |
// of all of them. Returns true on success, false on failure. |
bool OpenMultipleTabs(int index, const std::vector<GURL>& urls); |