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

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

Issue 10787010: Switch to TimeDelta interfaces in chrome automation test infrastructure. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // Resets to the default theme. Returns true on success. 160 // Resets to the default theme. Returns true on success.
161 bool ResetToDefaultTheme(); 161 bool ResetToDefaultTheme();
162 162
163 // Sets a cookie value for a url. Returns true on success. 163 // Sets a cookie value for a url. Returns true on success.
164 bool SetCookie(const GURL& cookie_url, const std::string& value, 164 bool SetCookie(const GURL& cookie_url, const std::string& value,
165 int window_index = 0, int tab_index = 0); 165 int window_index = 0, int tab_index = 0);
166 // Gets a cookie value for the given url. 166 // Gets a cookie value for the given url.
167 std::string GetCookie(const GURL& cookie_url, int window_index = 0, 167 std::string GetCookie(const GURL& cookie_url, int window_index = 0,
168 int tab_index = 0); 168 int tab_index = 0);
169 169
170 base::TimeDelta action_max_timeout() const {
171 return TestTimeouts::action_max_timeout();
172 }
173
170 int action_max_timeout_ms() const { 174 int action_max_timeout_ms() const {
171 return TestTimeouts::action_max_timeout_ms(); 175 return action_max_timeout().InMilliseconds();
176 }
177
178 base::TimeDelta large_test_timeout() const {
179 return TestTimeouts::large_test_timeout();
172 } 180 }
173 181
174 int large_test_timeout_ms() const { 182 int large_test_timeout_ms() const {
175 return TestTimeouts::large_test_timeout_ms(); 183 return large_test_timeout().InMilliseconds();
176 } 184 }
177 185
178 protected: 186 protected:
179 // Gets the automation proxy and checks that it exists. 187 // Gets the automation proxy and checks that it exists.
180 virtual AutomationProxy* automation() const OVERRIDE; 188 virtual AutomationProxy* automation() const OVERRIDE;
181 189
182 virtual void SetLaunchSwitches() OVERRIDE; 190 virtual void SetLaunchSwitches() OVERRIDE;
183 191
184 private: 192 private:
185 // Create JSON error responses. 193 // Create JSON error responses.
(...skipping 15 matching lines...) Expand all
201 // This is necessary since python's unittest module creates instances of 209 // This is necessary since python's unittest module creates instances of
202 // TestCase at load time itself. 210 // TestCase at load time itself.
203 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type); 211 static MessageLoop* GetSharedMessageLoop(MessageLoop::Type msg_loop_type);
204 static MessageLoop* message_loop_; 212 static MessageLoop* message_loop_;
205 213
206 // Path to named channel id. 214 // Path to named channel id.
207 std::string named_channel_id_; 215 std::string named_channel_id_;
208 }; 216 };
209 217
210 #endif // CHROME_TEST_PYAUTOLIB_PYAUTOLIB_H_ 218 #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