| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #endif // SWIGWIN | 72 #endif // SWIGWIN |
| 73 const StringType& value() const; | 73 const StringType& value() const; |
| 74 %feature("docstring", "Construct an empty FilePath or from a string.") | 74 %feature("docstring", "Construct an empty FilePath or from a string.") |
| 75 FilePath; | 75 FilePath; |
| 76 FilePath(); | 76 FilePath(); |
| 77 explicit FilePath(const StringType& path); | 77 explicit FilePath(const StringType& path); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 class PyUITestSuite { | 80 class PyUITestSuite { |
| 81 public: | 81 public: |
| 82 PyUITestSuite(int argc, char** argv); | 82 PyUITestSuite(int argc, char** argv, bool clear_profile, |
| 83 std::wstring homepage); |
| 83 | 84 |
| 84 %feature("docstring", "Initialize the entire setup. Should be called " | 85 %feature("docstring", "Initialize the entire setup. Should be called " |
| 85 "before launching the browser. For internal use.") Initialize; | 86 "before launching the browser. For internal use.") Initialize; |
| 86 void Initialize(const FilePath& browser_dir); | 87 void Initialize(const FilePath& browser_dir); |
| 87 | 88 |
| 88 %feature("docstring", | 89 %feature("docstring", |
| 89 "Fires up the browser and opens a window.") SetUp; | 90 "Fires up the browser and opens a window.") SetUp; |
| 90 virtual void SetUp(); | 91 virtual void SetUp(); |
| 91 %feature("docstring", | 92 %feature("docstring", |
| 92 "Closes all windows and destroys the browser.") TearDown; | 93 "Closes all windows and destroys the browser.") TearDown; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 123 FilePath user_data_dir() const; | 124 FilePath user_data_dir() const; |
| 124 | 125 |
| 125 %feature("docstring", "Set download shelf visibility for the given or " | 126 %feature("docstring", "Set download shelf visibility for the given or " |
| 126 "first browser window.") SetDownloadShelfVisible; | 127 "first browser window.") SetDownloadShelfVisible; |
| 127 void SetDownloadShelfVisible(bool is_visible, int window_index=0); | 128 void SetDownloadShelfVisible(bool is_visible, int window_index=0); |
| 128 | 129 |
| 129 %feature("docstring", "Determine if the download shelf is visible in the " | 130 %feature("docstring", "Determine if the download shelf is visible in the " |
| 130 "given or first browser window.") IsDownloadShelfVisible; | 131 "given or first browser window.") IsDownloadShelfVisible; |
| 131 bool IsDownloadShelfVisible(int window_index=0); | 132 bool IsDownloadShelfVisible(int window_index=0); |
| 132 | 133 |
| 133 %feature("docstring", "Determine if the bookmark bar is visible. " | 134 %feature("docstring", "Determine if the bookmark bar is visible. " |
| 134 "If the NTP is visible, only return true if attached " | 135 "If the NTP is visible, only return true if attached " |
| 135 » "(to the chrome).") GetBookmarkBarVisibility; | 136 "(to the chrome).") GetBookmarkBarVisibility; |
| 136 bool GetBookmarkBarVisibility(); | 137 bool GetBookmarkBarVisibility(); |
| 137 | 138 |
| 138 %feature("docstring", "Wait for the bookmark bar animation to complete. " | 139 %feature("docstring", "Wait for the bookmark bar animation to complete. " |
| 139 "|wait_for_open| specifies which kind of change we wait for.") | 140 "|wait_for_open| specifies which kind of change we wait for.") |
| 140 WaitForBookmarkBarVisibilityChange; | 141 WaitForBookmarkBarVisibilityChange; |
| 141 bool WaitForBookmarkBarVisibilityChange(bool wait_for_open); | 142 bool WaitForBookmarkBarVisibilityChange(bool wait_for_open); |
| 142 | 143 |
| 143 %feature("docstring", "Get the bookmarks as a JSON string. Internal method.") | 144 %feature("docstring", "Get the bookmarks as a JSON string. Internal method.") |
| 144 _GetBookmarksAsJSON; | 145 _GetBookmarksAsJSON; |
| 145 std::string _GetBookmarksAsJSON(); | 146 std::string _GetBookmarksAsJSON(); |
| 146 | 147 |
| 147 %feature("docstring", "Add a bookmark folder with the given index in the paren
t." | 148 %feature("docstring", "Add a bookmark folder with the given index in the paren
t." |
| 148 " |title| is the title/name of the folder.") AddBookmar
kGroup; | 149 " |title| is the title/name of the folder.") AddBookmar
kGroup; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 %feature("docstring", "Determine if the browser is running. " | 204 %feature("docstring", "Determine if the browser is running. " |
| 204 "Returns False if user closed the window or if the browser died") | 205 "Returns False if user closed the window or if the browser died") |
| 205 IsBrowserRunning; | 206 IsBrowserRunning; |
| 206 bool IsBrowserRunning(); | 207 bool IsBrowserRunning(); |
| 207 | 208 |
| 208 %feature("docstring", "Install an extension from the given file. Returns " | 209 %feature("docstring", "Install an extension from the given file. Returns " |
| 209 "True if successfully installed and loaded.") InstallExtension; | 210 "True if successfully installed and loaded.") InstallExtension; |
| 210 bool InstallExtension(const FilePath& crx_file); | 211 bool InstallExtension(const FilePath& crx_file); |
| 211 }; | 212 }; |
| 212 | 213 |
| OLD | NEW |