Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: chrome/test/pyautolib/pyautolib.i

Issue 2903008: Expose cookie get/set to pyauto (Closed)
Patch Set: Final Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/pyautolib/pyautolib.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 GURL GetActiveTabURL(int window_index=0); 306 GURL GetActiveTabURL(int window_index=0);
307 307
308 %feature("docstring", "Count of the number of tabs in the given or " 308 %feature("docstring", "Count of the number of tabs in the given or "
309 "first window.") GetTabCount; 309 "first window.") GetTabCount;
310 int GetTabCount(int window_index=0); 310 int GetTabCount(int window_index=0);
311 %feature("docstring", "Create a new tab at the end of given or first browser " 311 %feature("docstring", "Create a new tab at the end of given or first browser "
312 "window and activate it. Blocks until the page is loaded. " 312 "window and activate it. Blocks until the page is loaded. "
313 "Returns True on success.") AppendTab; 313 "Returns True on success.") AppendTab;
314 bool AppendTab(const GURL& tab_url, int window_index=0); 314 bool AppendTab(const GURL& tab_url, int window_index=0);
315 315
316 %feature("docstring", "Set the value of the cookie at cookie_url to value "
317 "for the given window index and tab index. "
318 "Returns True on success.") SetCookie;
319 bool SetCookie(const GURL& cookie_url, const std::string& value,
320 int window_index=0, int tab_index=0);
321
322 %feature("docstring", "Get the value of the cokie at cookie_url for the "
323 "given window index and tab index. "
324 "Returns empty string on error or if there is no value for the "
325 "cookie.") GetCookieVal;
326 std::string GetCookie(const GURL& cookie_url, int window_index=0,
327 int tab_index=0);
328
316 // Misc methods 329 // Misc methods
317 %feature("docstring", "Determine if the browser is running. " 330 %feature("docstring", "Determine if the browser is running. "
318 "Returns False if user closed the window or if the browser died") 331 "Returns False if user closed the window or if the browser died")
319 IsBrowserRunning; 332 IsBrowserRunning;
320 bool IsBrowserRunning(); 333 bool IsBrowserRunning();
321 334
322 %feature("docstring", "Install an extension from the given file. Returns " 335 %feature("docstring", "Install an extension from the given file. Returns "
323 "True if successfully installed and loaded.") InstallExtension; 336 "True if successfully installed and loaded.") InstallExtension;
324 bool InstallExtension(const FilePath& crx_file, bool with_ui); 337 bool InstallExtension(const FilePath& crx_file, bool with_ui);
325 338
326 %feature("docstring", "Get a proxy to the browser window at the given " 339 %feature("docstring", "Get a proxy to the browser window at the given "
327 "zero-based index.") GetBrowserWindow; 340 "zero-based index.") GetBrowserWindow;
328 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); 341 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index);
329 342
330 // Meta-method 343 // Meta-method
331 %feature("docstring", "Send a sync JSON request to Chrome. " 344 %feature("docstring", "Send a sync JSON request to Chrome. "
332 "Returns a JSON dict as a response. " 345 "Returns a JSON dict as a response. "
333 "Internal method.") 346 "Internal method.")
334 _SendJSONRequest; 347 _SendJSONRequest;
335 std::string _SendJSONRequest(int window_index, std::string request); 348 std::string _SendJSONRequest(int window_index, std::string request);
336 349
337 %feature("docstring", "Resets to the default theme. " 350 %feature("docstring", "Resets to the default theme. "
338 "Returns true on success.") ResetToDefaultTheme; 351 "Returns true on success.") ResetToDefaultTheme;
339 bool ResetToDefaultTheme(); 352 bool ResetToDefaultTheme();
340 353
341 }; 354 };
342 355
OLDNEW
« no previous file with comments | « chrome/test/pyautolib/pyautolib.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698