| OLD | NEW |
| 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 // 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 int window_index=0); | 324 int window_index=0); |
| 325 | 325 |
| 326 %feature("docstring", "Set the URL of a bookmark.") SetBookmarkURL; | 326 %feature("docstring", "Set the URL of a bookmark.") SetBookmarkURL; |
| 327 bool SetBookmarkURL(std::wstring id, | 327 bool SetBookmarkURL(std::wstring id, |
| 328 const std::wstring url, | 328 const std::wstring url, |
| 329 int window_index=0); | 329 int window_index=0); |
| 330 | 330 |
| 331 %feature("docstring", "Remove (delete) a bookmark.") RemoveBookmark; | 331 %feature("docstring", "Remove (delete) a bookmark.") RemoveBookmark; |
| 332 bool RemoveBookmark(std::wstring id, int window_index=0); | 332 bool RemoveBookmark(std::wstring id, int window_index=0); |
| 333 | 333 |
| 334 %feature("docstring", "Open the Find box in the given or first browser " | |
| 335 "window.") OpenFindInPage; | |
| 336 void OpenFindInPage(int window_index=0); | |
| 337 | |
| 338 %feature("docstring", "Determine if the find box is visible in the " | |
| 339 "given or first browser window.") IsFindInPageVisible; | |
| 340 bool IsFindInPageVisible(int window_index=0); | |
| 341 | |
| 342 // Tabs and windows methods | |
| 343 %feature("docstring", "Open a new browser window.") OpenNewBrowserWindow; | |
| 344 bool OpenNewBrowserWindow(bool show); | |
| 345 | |
| 346 %feature("docstring", "Close a browser window.") CloseBrowserWindow; | |
| 347 bool CloseBrowserWindow(int window_index); | |
| 348 | |
| 349 %feature("docstring", "Fetch the number of browser windows. Includes popups.") | |
| 350 GetBrowserWindowCount; | |
| 351 int GetBrowserWindowCount(); | |
| 352 | |
| 353 // Misc methods | 334 // Misc methods |
| 354 %feature("docstring", "Get a proxy to the browser window at the given " | 335 %feature("docstring", "Get a proxy to the browser window at the given " |
| 355 "zero-based index.") GetBrowserWindow; | 336 "zero-based index.") GetBrowserWindow; |
| 356 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); | 337 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); |
| 357 | 338 |
| 358 // Meta-method | 339 // Meta-method |
| 359 %feature("docstring", "Send a sync JSON request to Chrome. " | 340 %feature("docstring", "Send a sync JSON request to Chrome. " |
| 360 "Returns a JSON dict as a response. " | 341 "Returns a JSON dict as a response. " |
| 361 "Given timeout in milliseconds." | 342 "Given timeout in milliseconds." |
| 362 "Internal method.") | 343 "Internal method.") |
| 363 _SendJSONRequest; | 344 _SendJSONRequest; |
| 364 std::string _SendJSONRequest(int window_index, | 345 std::string _SendJSONRequest(int window_index, |
| 365 const std::string& request, | 346 const std::string& request, |
| 366 int timeout); | 347 int timeout); |
| 367 | 348 |
| 368 %feature("docstring", "Resets to the default theme. " | |
| 369 "Returns true on success.") ResetToDefaultTheme; | |
| 370 bool ResetToDefaultTheme(); | |
| 371 | |
| 372 %feature("docstring", | 349 %feature("docstring", |
| 373 "Returns empty string if there were no unexpected Chrome asserts or " | 350 "Returns empty string if there were no unexpected Chrome asserts or " |
| 374 "crashes, a string describing the failures otherwise. As a side " | 351 "crashes, a string describing the failures otherwise. As a side " |
| 375 "effect, it will fail with EXPECT_EQ macros if this code runs " | 352 "effect, it will fail with EXPECT_EQ macros if this code runs " |
| 376 "within a gtest harness.") GetErrorsAndCrashes; | 353 "within a gtest harness.") GetErrorsAndCrashes; |
| 377 std::string CheckErrorsAndCrashes() const; | 354 std::string CheckErrorsAndCrashes() const; |
| 378 }; | 355 }; |
| 379 | 356 |
| 380 namespace net { | 357 namespace net { |
| 381 // TestServer | 358 // TestServer |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 // Initialize a new HTTPSOptions that will use the specified certificate. | 421 // Initialize a new HTTPSOptions that will use the specified certificate. |
| 445 explicit HTTPSOptions(ServerCertificate cert); | 422 explicit HTTPSOptions(ServerCertificate cert); |
| 446 }; | 423 }; |
| 447 | 424 |
| 448 %{ | 425 %{ |
| 449 typedef net::TestServer::HTTPSOptions HTTPSOptions; | 426 typedef net::TestServer::HTTPSOptions HTTPSOptions; |
| 450 %} | 427 %} |
| 451 | 428 |
| 452 %pointer_class(int, int_ptr); | 429 %pointer_class(int, int_ptr); |
| 453 %pointer_class(uint32, uint32_ptr); | 430 %pointer_class(uint32, uint32_ptr); |
| OLD | NEW |