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 // 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 #pragma once | 10 #pragma once |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 bool SetCookie(const GURL& cookie_url, const std::string& value, | 195 bool SetCookie(const GURL& cookie_url, const std::string& value, |
196 int window_index = 0, int tab_index = 0); | 196 int window_index = 0, int tab_index = 0); |
197 // Gets a cookie value for the given url. | 197 // Gets a cookie value for the given url. |
198 std::string GetCookie(const GURL& cookie_url, int window_index = 0, | 198 std::string GetCookie(const GURL& cookie_url, int window_index = 0, |
199 int tab_index = 0); | 199 int tab_index = 0); |
200 | 200 |
201 int action_max_timeout_ms() const { | 201 int action_max_timeout_ms() const { |
202 return TestTimeouts::action_max_timeout_ms(); | 202 return TestTimeouts::action_max_timeout_ms(); |
203 } | 203 } |
204 | 204 |
205 int command_execution_timeout_ms() const { | |
206 return TestTimeouts::command_execution_timeout_ms(); | |
207 } | |
208 | |
209 private: | 205 private: |
210 // Enables PostTask to main thread. | 206 // Enables PostTask to main thread. |
211 // Should be shared across multiple instances of PyUITestBase so that this | 207 // Should be shared across multiple instances of PyUITestBase so that this |
212 // class is re-entrant and multiple instances can be created. | 208 // class is re-entrant and multiple instances can be created. |
213 // This is necessary since python's unittest module creates instances of | 209 // This is necessary since python's unittest module creates instances of |
214 // TestCase at load time itself. | 210 // TestCase at load time itself. |
215 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); | 211 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); |
216 static MessageLoop* message_loop_; | 212 static MessageLoop* message_loop_; |
217 | 213 |
218 // Path to named channel id. | 214 // Path to named channel id. |
219 std::string named_channel_id_; | 215 std::string named_channel_id_; |
220 }; | 216 }; |
221 | 217 |
222 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ | 218 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ |
OLD | NEW |