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
3 // found in the LICENSE file.
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_
10 #include "chrome/test/base/in_process_browser_test.h"
29 // TabDragControllerTest is the basis for the two tests that exercise
31 class TabDragControllerTest
: public InProcessBrowserTest
{
33 TabDragControllerTest();
34 ~TabDragControllerTest() override
;
36 // Cover for TabStrip::StopAnimating(true).
37 void StopAnimating(TabStrip
* tab_strip
);
39 // Adds a new blank tab to |browser|, stops animations and resets the ids of
40 // the tabs in |browser|.
41 void AddTabAndResetBrowser(Browser
* browser
);
43 // Creates a new Browser and resizes |browser()| and the new browser to be
45 Browser
* CreateAnotherWindowBrowserAndRelayout();
47 // The tab drag controller interactive ui tests only use the native desktop
49 const BrowserList
* native_browser_list
;
52 DISALLOW_COPY_AND_ASSIGN(TabDragControllerTest
);
57 // Returns the TabStrip for |browser|.
58 TabStrip
* GetTabStripForBrowser(Browser
* browser
);
60 // Returns the center of |view| in screen coordinates.
61 gfx::Point
GetCenterInScreenCoordinates(const views::View
* view
);
63 // Sets the id of |web_contents| to |id|.
64 void SetID(content::WebContents
* web_contents
, int id
);
66 // Resets the ids of all the tabs in |model| starting at |start|. That is, the
67 // id of the first tab is set to |start|, the second tab |start + 1| ...
68 void ResetIDs(TabStripModel
* model
, int start
);
70 // Returns a string representation of the ids of the tabs in |model|. Each id
71 // is separated by a space.
72 std::string
IDString(TabStripModel
* model
);
76 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_INTERACTIVE_UITEST_H_