| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 "that can set this are NavigateToURL, GoBack, and GoForward. ") | 147 "that can set this are NavigateToURL, GoBack, and GoForward. ") |
| 148 NeedsAuth; | 148 NeedsAuth; |
| 149 bool NeedsAuth() const; | 149 bool NeedsAuth() const; |
| 150 %feature("docstring", "Supply authentication to a login prompt. " | 150 %feature("docstring", "Supply authentication to a login prompt. " |
| 151 "Blocks until navigation completes or another login prompt appears " | 151 "Blocks until navigation completes or another login prompt appears " |
| 152 "in the case of failed auth.") SetAuth; | 152 "in the case of failed auth.") SetAuth; |
| 153 bool SetAuth(const std::wstring& username, const std::wstring& password); | 153 bool SetAuth(const std::wstring& username, const std::wstring& password); |
| 154 %feature("docstring", "Cancel authentication to a login prompt. ") | 154 %feature("docstring", "Cancel authentication to a login prompt. ") |
| 155 CancelAuth; | 155 CancelAuth; |
| 156 bool CancelAuth(); | 156 bool CancelAuth(); |
| 157 |
| 157 }; | 158 }; |
| 158 | 159 |
| 159 class PyUITestSuiteBase { | 160 class PyUITestSuiteBase { |
| 160 public: | 161 public: |
| 161 %feature("docstring", "Create the suite.") PyUITestSuiteBase; | 162 %feature("docstring", "Create the suite.") PyUITestSuiteBase; |
| 162 PyUITestSuiteBase(int argc, char** argv); | 163 PyUITestSuiteBase(int argc, char** argv); |
| 163 ~PyUITestSuiteBase(); | 164 ~PyUITestSuiteBase(); |
| 164 | 165 |
| 165 %feature("docstring", "Initialize from the path to browser dir.") Initialize; | 166 %feature("docstring", "Initialize from the path to browser dir.") Initialize; |
| 166 void Initialize(const FilePath& browser_dir); | 167 void Initialize(const FilePath& browser_dir); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 "zero-based index.") GetBrowserWindow; | 341 "zero-based index.") GetBrowserWindow; |
| 341 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); | 342 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); |
| 342 | 343 |
| 343 // Meta-method | 344 // Meta-method |
| 344 %feature("docstring", "Send a sync JSON request to Chrome. " | 345 %feature("docstring", "Send a sync JSON request to Chrome. " |
| 345 "Returns a JSON dict as a response. " | 346 "Returns a JSON dict as a response. " |
| 346 "Internal method.") | 347 "Internal method.") |
| 347 _SendJSONRequest; | 348 _SendJSONRequest; |
| 348 std::string _SendJSONRequest(int window_index, std::string request); | 349 std::string _SendJSONRequest(int window_index, std::string request); |
| 349 | 350 |
| 351 %feature("docstring", "Execute a string of javascript in the specified " |
| 352 "(window, tab, frame) and return a string.") ExecuteJavascript; |
| 353 std::wstring ExecuteJavascript(const std::wstring& script, |
| 354 int window_index=0, |
| 355 int tab_index=0, |
| 356 const std::wstring& frame_xpath=""); |
| 357 |
| 358 %feature("docstring", "Evaluate a javascript expression in the specified " |
| 359 "(window, tab, frame) and return the specified DOM value " |
| 360 "as a string. This is a wrapper around " |
| 361 "window.domAutomationController.send().") GetDOMValue; |
| 362 std::wstring GetDOMValue(const std::wstring& expr, |
| 363 int window_index=0, |
| 364 int tab_index=0, |
| 365 const std::wstring& frame_xpath=""); |
| 366 |
| 350 %feature("docstring", "Resets to the default theme. " | 367 %feature("docstring", "Resets to the default theme. " |
| 351 "Returns true on success.") ResetToDefaultTheme; | 368 "Returns true on success.") ResetToDefaultTheme; |
| 352 bool ResetToDefaultTheme(); | 369 bool ResetToDefaultTheme(); |
| 353 | 370 |
| 354 }; | 371 }; |
| 355 | 372 |
| OLD | NEW |