OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_INTERACTIVE_UITEST_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_INTERACTIVE_UITEST_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_INTERACTIVE_UITEST_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_INTERACTIVE_UITEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
11 | 11 |
12 class Browser; | 12 class Browser; |
13 class TabStrip; | 13 class TabStrip; |
14 class TabStripModel; | 14 class TabStripModel; |
15 | 15 |
| 16 namespace chrome { |
| 17 class BrowserListImpl; |
| 18 } |
| 19 |
16 namespace content { | 20 namespace content { |
17 class WebContents; | 21 class WebContents; |
18 } | 22 } |
19 | 23 |
20 namespace gfx { | 24 namespace gfx { |
21 class Point; | 25 class Point; |
22 } | 26 } |
23 | 27 |
24 namespace views { | 28 namespace views { |
25 class View; | 29 class View; |
(...skipping 10 matching lines...) Expand all Loading... |
36 void StopAnimating(TabStrip* tab_strip); | 40 void StopAnimating(TabStrip* tab_strip); |
37 | 41 |
38 // Adds a new blank tab to |browser|, stops animations and resets the ids of | 42 // Adds a new blank tab to |browser|, stops animations and resets the ids of |
39 // the tabs in |browser|. | 43 // the tabs in |browser|. |
40 void AddTabAndResetBrowser(Browser* browser); | 44 void AddTabAndResetBrowser(Browser* browser); |
41 | 45 |
42 // Creates a new Browser and resizes |browser()| and the new browser to be | 46 // Creates a new Browser and resizes |browser()| and the new browser to be |
43 // side by side. | 47 // side by side. |
44 Browser* CreateAnotherWindowBrowserAndRelayout(); | 48 Browser* CreateAnotherWindowBrowserAndRelayout(); |
45 | 49 |
| 50 // The tab drag controller interactive ui tests only use the native desktop |
| 51 // for now. |
| 52 const chrome::BrowserListImpl* native_browser_list; |
| 53 |
46 private: | 54 private: |
47 DISALLOW_COPY_AND_ASSIGN(TabDragControllerTest); | 55 DISALLOW_COPY_AND_ASSIGN(TabDragControllerTest); |
48 }; | 56 }; |
49 | 57 |
50 namespace test { | 58 namespace test { |
51 | 59 |
52 // Returns the TabStrip for |browser|. | 60 // Returns the TabStrip for |browser|. |
53 TabStrip* GetTabStripForBrowser(Browser* browser); | 61 TabStrip* GetTabStripForBrowser(Browser* browser); |
54 | 62 |
55 // Returns the center of |view| in screen coordinates. | 63 // Returns the center of |view| in screen coordinates. |
56 gfx::Point GetCenterInScreenCoordinates(const views::View* view); | 64 gfx::Point GetCenterInScreenCoordinates(const views::View* view); |
57 | 65 |
58 // Sets the id of |web_contents| to |id|. | 66 // Sets the id of |web_contents| to |id|. |
59 void SetID(content::WebContents* web_contents, int id); | 67 void SetID(content::WebContents* web_contents, int id); |
60 | 68 |
61 // Resets the ids of all the tabs in |model| starting at |start|. That is, the | 69 // Resets the ids of all the tabs in |model| starting at |start|. That is, the |
62 // id of the first tab is set to |start|, the second tab |start + 1| ... | 70 // id of the first tab is set to |start|, the second tab |start + 1| ... |
63 void ResetIDs(TabStripModel* model, int start); | 71 void ResetIDs(TabStripModel* model, int start); |
64 | 72 |
65 // Returns a string representation of the ids of the tabs in |model|. Each id | 73 // Returns a string representation of the ids of the tabs in |model|. Each id |
66 // is separated by a space. | 74 // is separated by a space. |
67 std::string IDString(TabStripModel* model); | 75 std::string IDString(TabStripModel* model); |
68 | 76 |
69 } | 77 } |
70 | 78 |
71 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_INTERACTIVE_UITEST_H
_ | 79 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_INTERACTIVE_UITEST_H
_ |
OLD | NEW |