Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: chrome/test/pyautolib/pyautolib.h

Issue 10736064: Switch to TimeDelta interfaces in chrome automation test infrastructure. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/ppapi/ppapi_test.cc ('k') | chrome/test/reliability/automated_ui_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // Resets to the default theme. Returns true on success. 189 // Resets to the default theme. Returns true on success.
190 bool ResetToDefaultTheme(); 190 bool ResetToDefaultTheme();
191 191
192 // Sets a cookie value for a url. Returns true on success. 192 // Sets a cookie value for a url. Returns true on success.
193 bool SetCookie(const GURL& cookie_url, const std::string& value, 193 bool SetCookie(const GURL& cookie_url, const std::string& value,
194 int window_index = 0, int tab_index = 0); 194 int window_index = 0, int tab_index = 0);
195 // Gets a cookie value for the given url. 195 // Gets a cookie value for the given url.
196 std::string GetCookie(const GURL& cookie_url, int window_index = 0, 196 std::string GetCookie(const GURL& cookie_url, int window_index = 0,
197 int tab_index = 0); 197 int tab_index = 0);
198 198
199 base::TimeDelta action_max_timeout() const {
200 return TestTimeouts::action_max_timeout();
201 }
202
199 int action_max_timeout_ms() const { 203 int action_max_timeout_ms() const {
200 return TestTimeouts::action_max_timeout_ms(); 204 return action_max_timeout().InMilliseconds();
205 }
206
207 base::TimeDelta large_test_timeout() const {
208 return TestTimeouts::large_test_timeout();
201 } 209 }
202 210
203 int large_test_timeout_ms() const { 211 int large_test_timeout_ms() const {
204 return TestTimeouts::large_test_timeout_ms(); 212 return large_test_timeout().InMilliseconds();
205 } 213 }
206 214
207 protected: 215 protected:
208 // Gets the automation proxy and checks that it exists. 216 // Gets the automation proxy and checks that it exists.
209 virtual AutomationProxy* automation() const OVERRIDE; 217 virtual AutomationProxy* automation() const OVERRIDE;
210 218
211 virtual void SetLaunchSwitches() OVERRIDE; 219 virtual void SetLaunchSwitches() OVERRIDE;
212 220
213 private: 221 private:
214 // Create JSON error responses. 222 // Create JSON error responses.
(...skipping 15 matching lines...) Expand all
230 // This is necessary since python's unittest module creates instances of 238 // This is necessary since python's unittest module creates instances of
231 // TestCase at load time itself. 239 // TestCase at load time itself.
232 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); 240 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type);
233 static MessageLoop* message_loop_; 241 static MessageLoop* message_loop_;
234 242
235 // Path to named channel id. 243 // Path to named channel id.
236 std::string named_channel_id_; 244 std::string named_channel_id_;
237 }; 245 };
238 246
239 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ 247 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_
OLDNEW
« no previous file with comments | « chrome/test/ppapi/ppapi_test.cc ('k') | chrome/test/reliability/automated_ui_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698