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 // This file declares the C++ side of PyAuto, the python interface to | 5 // This file declares the C++ side of PyAuto, the python interface to |
6 // Chromium automation. It access Chromium's internals using Automation Proxy. | 6 // Chromium automation. It access Chromium's internals using Automation Proxy. |
7 | 7 |
8 #ifndef CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 8 #ifndef CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
9 #define CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 9 #define CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 named_channel_id_ = named_channel_id; | 62 named_channel_id_ = named_channel_id; |
63 launcher_.reset(CreateProxyLauncher()); | 63 launcher_.reset(CreateProxyLauncher()); |
64 } | 64 } |
65 | 65 |
66 virtual ProxyLauncher* CreateProxyLauncher() OVERRIDE; | 66 virtual ProxyLauncher* CreateProxyLauncher() OVERRIDE; |
67 | 67 |
68 // SetUp,TearDown is redeclared as public to make it accessible from swig. | 68 // SetUp,TearDown is redeclared as public to make it accessible from swig. |
69 virtual void SetUp() OVERRIDE; | 69 virtual void SetUp() OVERRIDE; |
70 virtual void TearDown() OVERRIDE; | 70 virtual void TearDown() OVERRIDE; |
71 | 71 |
72 // Shows or hides the download shelf. | |
73 void SetDownloadShelfVisible(bool is_visible, int window_index = 0); | |
74 | |
75 // Determines the visibility of the download shelf | |
76 bool IsDownloadShelfVisible(int window_index = 0); | |
77 | |
78 // Open the Find box | 72 // Open the Find box |
79 void OpenFindInPage(int window_index = 0); | 73 void OpenFindInPage(int window_index = 0); |
80 | 74 |
81 // Determines the visibility of the Find box | 75 // Determines the visibility of the Find box |
82 bool IsFindInPageVisible(int window_index = 0); | 76 bool IsFindInPageVisible(int window_index = 0); |
83 | 77 |
84 // Get the path to the downloads directory | |
85 FilePath GetDownloadDirectory(); | |
86 | |
87 // AutomationProxy methods | 78 // AutomationProxy methods |
88 | 79 |
89 // Open a new browser window. Returns false on failure. | 80 // Open a new browser window. Returns false on failure. |
90 bool OpenNewBrowserWindow(bool show); | 81 bool OpenNewBrowserWindow(bool show); |
91 | 82 |
92 // Close a browser window. Returns false on failure. | 83 // Close a browser window. Returns false on failure. |
93 bool CloseBrowserWindow(int window_index); | 84 bool CloseBrowserWindow(int window_index); |
94 | 85 |
95 // Fetch the number of browser windows. Includes popups. | 86 // Fetch the number of browser windows. Includes popups. |
96 int GetBrowserWindowCount(); | 87 int GetBrowserWindowCount(); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // This is necessary since python's unittest module creates instances of | 191 // This is necessary since python's unittest module creates instances of |
201 // TestCase at load time itself. | 192 // TestCase at load time itself. |
202 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); | 193 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); |
203 static MessageLoop* message_loop_; | 194 static MessageLoop* message_loop_; |
204 | 195 |
205 // Path to named channel id. | 196 // Path to named channel id. |
206 std::string named_channel_id_; | 197 std::string named_channel_id_; |
207 }; | 198 }; |
208 | 199 |
209 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 200 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
OLD | NEW |