| 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 |
| 11 | 11 |
| 12 // When adding a new class or method, make sure you specify the doc string using | 12 // When adding a new class or method, make sure you specify the doc string using |
| 13 // %feature("docstring", "doc string goes here") NODENAME; | 13 // %feature("docstring", "doc string goes here") NODENAME; |
| 14 // and attach it to your node (class or method). This doc string will be | 14 // and attach it to your node (class or method). This doc string will be |
| 15 // copied over in the generated python classes/methods. | 15 // copied over in the generated python classes/methods. |
| 16 | 16 |
| 17 %module(docstring="Python interface to Automtion Proxy.") pyautolib | 17 %module(docstring="Python interface to Automation Proxy.") pyautolib |
| 18 %feature("autodoc", "1"); | 18 %feature("autodoc", "1"); |
| 19 | 19 |
| 20 %include <std_wstring.i> | 20 %include <std_wstring.i> |
| 21 %include <std_string.i> | 21 %include <std_string.i> |
| 22 | 22 |
| 23 %include "chrome/test/pyautolib/argc_argv.i" | 23 %include "chrome/test/pyautolib/argc_argv.i" |
| 24 | 24 |
| 25 // NOTE: All files included in this file should also be listed under | 25 // NOTE: All files included in this file should also be listed under |
| 26 // pyautolib_sources in chrome_tests.gypi. | 26 // pyautolib_sources in chrome_tests.gypi. |
| 27 | 27 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 "true if a navigation results in a login prompt, and if an attempted " | 145 "true if a navigation results in a login prompt, and if an attempted " |
| 146 "login fails. " | 146 "login fails. " |
| 147 "Note that this is only valid if you've done a navigation on this same " | 147 "Note that this is only valid if you've done a navigation on this same " |
| 148 "object; different TabProxy objects can refer to the same Tab. Calls " | 148 "object; different TabProxy objects can refer to the same Tab. Calls " |
| 149 "that can set this are NavigateToURL, GoBack, and GoForward. ") | 149 "that can set this are NavigateToURL, GoBack, and GoForward. ") |
| 150 NeedsAuth; | 150 NeedsAuth; |
| 151 bool NeedsAuth() const; | 151 bool NeedsAuth() const; |
| 152 %feature("docstring", "Supply authentication to a login prompt. " | 152 %feature("docstring", "Supply authentication to a login prompt. " |
| 153 "Blocks until navigation completes or another login prompt appears " | 153 "Blocks until navigation completes or another login prompt appears " |
| 154 "in the case of failed auth.") SetAuth; | 154 "in the case of failed auth.") SetAuth; |
| 155 bool SetAuth(const std::wstring& username, const std::wstring& password); | 155 bool SetAuth(const string16& username, const string16& password); |
| 156 %feature("docstring", "Cancel authentication to a login prompt. ") | 156 %feature("docstring", "Cancel authentication to a login prompt. ") |
| 157 CancelAuth; | 157 CancelAuth; |
| 158 bool CancelAuth(); | 158 bool CancelAuth(); |
| 159 | 159 |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 class PyUITestSuiteBase { | 162 class PyUITestSuiteBase { |
| 163 public: | 163 public: |
| 164 %feature("docstring", "Create the suite.") PyUITestSuiteBase; | 164 %feature("docstring", "Create the suite.") PyUITestSuiteBase; |
| 165 PyUITestSuiteBase(int argc, char** argv); | 165 PyUITestSuiteBase(int argc, char** argv); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 %feature("docstring", "Get FilePath to the document root") document_root; | 418 %feature("docstring", "Get FilePath to the document root") document_root; |
| 419 const FilePath& document_root() const; | 419 const FilePath& document_root() const; |
| 420 | 420 |
| 421 std::string GetScheme() const; | 421 std::string GetScheme() const; |
| 422 | 422 |
| 423 %feature("docstring", "Get URL for a file path") GetURL; | 423 %feature("docstring", "Get URL for a file path") GetURL; |
| 424 GURL GetURL(const std::string& path) const; | 424 GURL GetURL(const std::string& path) const; |
| 425 }; | 425 }; |
| 426 } | 426 } |
| 427 | 427 |
| OLD | NEW |