OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Swig Interface for PyAuto. | 5 // Swig Interface for PyAuto. |
6 // PyAuto makes the Automation Proxy interface available in Python | 6 // PyAuto makes the Automation Proxy interface available in Python |
7 // | 7 // |
8 // Running swig as: | 8 // Running swig as: |
9 // swig -python -c++ chrome/test/pyautolib/pyautolib.i | 9 // swig -python -c++ chrome/test/pyautolib/pyautolib.i |
10 // would generate pyautolib.py, pyautolib_wrap.cxx | 10 // would generate pyautolib.py, pyautolib_wrap.cxx |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 virtual void SetUp(); | 187 virtual void SetUp(); |
188 %feature("docstring", | 188 %feature("docstring", |
189 "Closes all windows and destroys the browser.") TearDown; | 189 "Closes all windows and destroys the browser.") TearDown; |
190 virtual void TearDown(); | 190 virtual void TearDown(); |
191 | 191 |
192 %feature("docstring", "Timeout (in milli secs) for an action. " | 192 %feature("docstring", "Timeout (in milli secs) for an action. " |
193 "This value is also used as default for the WaitUntil() method.") | 193 "This value is also used as default for the WaitUntil() method.") |
194 action_max_timeout_ms; | 194 action_max_timeout_ms; |
195 int action_max_timeout_ms() const; | 195 int action_max_timeout_ms() const; |
196 | 196 |
197 %feature("docstring", "Get the timeout (in milli secs) for an automation " | 197 %feature("docstring", "Timeout (in milli secs) for large tests.") |
Nirnimesh
2011/03/29 20:27:28
Please retain these. Just replace command_executio
Huyen
2011/03/31 02:42:55
Done. This corresponds to AutomationProx::action_t
| |
198 "call") command_execution_timeout_ms; | 198 large_test_timeout_ms; |
199 int command_execution_timeout_ms() const; | 199 int large_test_timeout_ms() const; |
200 %feature("docstring", "Set the timeout (in milli secs) for an automation " | |
201 "call. This is an internal method. Do not use this directly. " | |
202 "Use CmdExecutionTimeoutChanger instead") | |
203 set_command_execution_timeout_ms; | |
204 void set_command_execution_timeout_ms(int timeout); | |
205 | 200 |
206 %feature("docstring", "Launches the browser and IPC testing server.") | 201 %feature("docstring", "Launches the browser and IPC testing server.") |
207 LaunchBrowserAndServer; | 202 LaunchBrowserAndServer; |
208 void LaunchBrowserAndServer(); | 203 void LaunchBrowserAndServer(); |
209 %feature("docstring", "Closes the browser and IPC testing server.") | 204 %feature("docstring", "Closes the browser and IPC testing server.") |
210 CloseBrowserAndServer; | 205 CloseBrowserAndServer; |
211 void CloseBrowserAndServer(); | 206 void CloseBrowserAndServer(); |
212 | 207 |
213 %feature("docstring", "Determine if the profile is set to be cleared on " | 208 %feature("docstring", "Determine if the profile is set to be cleared on " |
214 "next startup.") get_clear_profile; | 209 "next startup.") get_clear_profile; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 "zero-based index.") GetBrowserWindow; | 362 "zero-based index.") GetBrowserWindow; |
368 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); | 363 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); |
369 | 364 |
370 // Meta-method | 365 // Meta-method |
371 %feature("docstring", "Send a sync JSON request to Chrome. " | 366 %feature("docstring", "Send a sync JSON request to Chrome. " |
372 "Returns a JSON dict as a response. " | 367 "Returns a JSON dict as a response. " |
373 "Internal method.") | 368 "Internal method.") |
374 _SendJSONRequest; | 369 _SendJSONRequest; |
375 std::string _SendJSONRequest(int window_index, const std::string& request); | 370 std::string _SendJSONRequest(int window_index, const std::string& request); |
376 | 371 |
372 // Meta-method | |
373 %feature("docstring", "Send a sync JSON request to Chrome. " | |
374 "Returns a JSON dict as a response. " | |
Nirnimesh
2011/03/29 20:27:28
Add some description about the timeout in the docs
Huyen
2011/03/31 02:42:55
Done.
| |
375 "Internal method.") | |
376 _SendJSONRequest; | |
377 std::string _SendJSONRequest(int window_index, | |
378 const std::string& request, | |
379 int timeout); | |
380 | |
377 %feature("docstring", "Execute a string of javascript in the specified " | 381 %feature("docstring", "Execute a string of javascript in the specified " |
378 "(window, tab, frame) and return a string.") ExecuteJavascript; | 382 "(window, tab, frame) and return a string.") ExecuteJavascript; |
379 std::wstring ExecuteJavascript(const std::wstring& script, | 383 std::wstring ExecuteJavascript(const std::wstring& script, |
380 int window_index=0, | 384 int window_index=0, |
381 int tab_index=0, | 385 int tab_index=0, |
382 const std::wstring& frame_xpath=""); | 386 const std::wstring& frame_xpath=""); |
383 | 387 |
384 %feature("docstring", "Evaluate a javascript expression in the specified " | 388 %feature("docstring", "Evaluate a javascript expression in the specified " |
385 "(window, tab, frame) and return the specified DOM value " | 389 "(window, tab, frame) and return the specified DOM value " |
386 "as a string. This is a wrapper around " | 390 "as a string. This is a wrapper around " |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
421 %feature("docstring", "Get FilePath to the document root") document_root; | 425 %feature("docstring", "Get FilePath to the document root") document_root; |
422 const FilePath& document_root() const; | 426 const FilePath& document_root() const; |
423 | 427 |
424 std::string GetScheme() const; | 428 std::string GetScheme() const; |
425 | 429 |
426 %feature("docstring", "Get URL for a file path") GetURL; | 430 %feature("docstring", "Get URL for a file path") GetURL; |
427 GURL GetURL(const std::string& path) const; | 431 GURL GetURL(const std::string& path) const; |
428 }; | 432 }; |
429 } | 433 } |
430 | 434 |
OLD | NEW |