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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 %feature("docstring", "Open a new browser window.") OpenNewBrowserWindow; | 356 %feature("docstring", "Open a new browser window.") OpenNewBrowserWindow; |
357 bool OpenNewBrowserWindow(bool show); | 357 bool OpenNewBrowserWindow(bool show); |
358 | 358 |
359 %feature("docstring", "Close a browser window.") CloseBrowserWindow; | 359 %feature("docstring", "Close a browser window.") CloseBrowserWindow; |
360 bool CloseBrowserWindow(int window_index); | 360 bool CloseBrowserWindow(int window_index); |
361 | 361 |
362 %feature("docstring", "Fetch the number of browser windows. Includes popups.") | 362 %feature("docstring", "Fetch the number of browser windows. Includes popups.") |
363 GetBrowserWindowCount; | 363 GetBrowserWindowCount; |
364 int GetBrowserWindowCount(); | 364 int GetBrowserWindowCount(); |
365 | 365 |
366 %feature("docstring", "Activate the tab at the given zero-based index in " | |
367 "the given or first window. Also brings the window to the front. " | |
368 "Returns True on success.") ActivateTab; | |
369 bool ActivateTab(int tab_index, int window_index=0); | |
370 | |
371 %feature("docstring", "Get the title of the active tab for the given or " | |
372 "first window.") GetActiveTabTitle; | |
373 std::wstring GetActiveTabTitle(int window_index=0); | |
374 | |
375 %feature("docstring", "Get the URL for the active tab. for the given or " | |
376 "first window. Returns an instance of GURL") GetActiveTabURL; | |
377 GURL GetActiveTabURL(int window_index=0); | |
378 | |
379 %feature("docstring", "Count of the number of tabs in the given or " | |
380 "first window.") GetTabCount; | |
381 int GetTabCount(int window_index=0); | |
382 | |
383 %feature("docstring", "Set the value of the cookie at cookie_url to value " | 366 %feature("docstring", "Set the value of the cookie at cookie_url to value " |
384 "for the given window index and tab index. " | 367 "for the given window index and tab index. " |
385 "Returns True on success.") SetCookie; | 368 "Returns True on success.") SetCookie; |
386 bool SetCookie(const GURL& cookie_url, const std::string& value, | 369 bool SetCookie(const GURL& cookie_url, const std::string& value, |
387 int window_index=0, int tab_index=0); | 370 int window_index=0, int tab_index=0); |
388 | 371 |
389 %feature("docstring", "Get the value of the cookie at cookie_url for the " | 372 %feature("docstring", "Get the value of the cookie at cookie_url for the " |
390 "given window index and tab index. " | 373 "given window index and tab index. " |
391 "Returns empty string on error or if there is no value for the " | 374 "Returns empty string on error or if there is no value for the " |
392 "cookie.") GetCookie; | 375 "cookie.") GetCookie; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 // Initialize a new HTTPSOptions that will use the specified certificate. | 470 // Initialize a new HTTPSOptions that will use the specified certificate. |
488 explicit HTTPSOptions(ServerCertificate cert); | 471 explicit HTTPSOptions(ServerCertificate cert); |
489 }; | 472 }; |
490 | 473 |
491 %{ | 474 %{ |
492 typedef net::TestServer::HTTPSOptions HTTPSOptions; | 475 typedef net::TestServer::HTTPSOptions HTTPSOptions; |
493 %} | 476 %} |
494 | 477 |
495 %pointer_class(int, int_ptr); | 478 %pointer_class(int, int_ptr); |
496 %pointer_class(uint32, uint32_ptr); | 479 %pointer_class(uint32, uint32_ptr); |
OLD | NEW |