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

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

Issue 10804038: Convert cookie and download automation commands to the JSON interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 %feature("docstring", "Determine if the profile is set to be cleared on " 269 %feature("docstring", "Determine if the profile is set to be cleared on "
270 "next startup.") get_clear_profile; 270 "next startup.") get_clear_profile;
271 bool get_clear_profile() const; 271 bool get_clear_profile() const;
272 %feature("docstring", "If False, sets the flag so that the profile is " 272 %feature("docstring", "If False, sets the flag so that the profile is "
273 "not cleared on next startup. Useful for persisting profile " 273 "not cleared on next startup. Useful for persisting profile "
274 "across restarts. By default the state is True, to clear profile.") 274 "across restarts. By default the state is True, to clear profile.")
275 set_clear_profile; 275 set_clear_profile;
276 void set_clear_profile(bool clear_profile); 276 void set_clear_profile(bool clear_profile);
277 277
278 // Get/fetch properties
279 %feature("docstring",
280 "Get the path to download directory.") GetDownloadDirectory;
281 FilePath GetDownloadDirectory();
282
283 %feature("docstring", "Get the path to profile directory.") user_data_dir; 278 %feature("docstring", "Get the path to profile directory.") user_data_dir;
284 FilePath user_data_dir() const; 279 FilePath user_data_dir() const;
285 280
286 %feature("docstring", "Set download shelf visibility for the given or "
287 "first browser window.") SetDownloadShelfVisible;
288 void SetDownloadShelfVisible(bool is_visible, int window_index=0);
289
290 %feature("docstring", "Determine if the download shelf is visible in the "
291 "given or first browser window.") IsDownloadShelfVisible;
292 bool IsDownloadShelfVisible(int window_index=0);
293
294 %feature("docstring", "Determine if the bookmark bar is visible. "
295 "If the NTP is visible, only return true if attached "
296 "(to the chrome).") GetBookmarkBarVisibility;
297 bool GetBookmarkBarVisibility();
298
299 %feature("docstring", "Determine if the bookmark bar is detached. " 281 %feature("docstring", "Determine if the bookmark bar is detached. "
300 "This usually is only true on the NTP.") IsBookmarkBarDetached; 282 "This usually is only true on the NTP.") IsBookmarkBarDetached;
301 bool IsBookmarkBarDetached(); 283 bool IsBookmarkBarDetached();
302 284
303 %feature("docstring", "Wait for the bookmark bar animation to complete. " 285 %feature("docstring", "Wait for the bookmark bar animation to complete. "
304 "|wait_for_open| specifies which kind of change we wait for.") 286 "|wait_for_open| specifies which kind of change we wait for.")
305 WaitForBookmarkBarVisibilityChange; 287 WaitForBookmarkBarVisibilityChange;
306 bool WaitForBookmarkBarVisibilityChange(bool wait_for_open, 288 bool WaitForBookmarkBarVisibilityChange(bool wait_for_open,
307 int window_index=0); 289 int window_index=0);
308 290
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 std::wstring GetActiveTabTitle(int window_index=0); 355 std::wstring GetActiveTabTitle(int window_index=0);
374 356
375 %feature("docstring", "Get the URL for the active tab. for the given or " 357 %feature("docstring", "Get the URL for the active tab. for the given or "
376 "first window. Returns an instance of GURL") GetActiveTabURL; 358 "first window. Returns an instance of GURL") GetActiveTabURL;
377 GURL GetActiveTabURL(int window_index=0); 359 GURL GetActiveTabURL(int window_index=0);
378 360
379 %feature("docstring", "Count of the number of tabs in the given or " 361 %feature("docstring", "Count of the number of tabs in the given or "
380 "first window.") GetTabCount; 362 "first window.") GetTabCount;
381 int GetTabCount(int window_index=0); 363 int GetTabCount(int window_index=0);
382 364
383 %feature("docstring", "Set the value of the cookie at cookie_url to value "
384 "for the given window index and tab index. "
385 "Returns True on success.") SetCookie;
386 bool SetCookie(const GURL& cookie_url, const std::string& value,
387 int window_index=0, int tab_index=0);
388
389 %feature("docstring", "Get the value of the cookie at cookie_url for the "
390 "given window index and tab index. "
391 "Returns empty string on error or if there is no value for the "
392 "cookie.") GetCookie;
393 std::string GetCookie(const GURL& cookie_url, int window_index=0,
394 int tab_index=0);
395
396 // Misc methods 365 // Misc methods
397 %feature("docstring", "Get a proxy to the browser window at the given " 366 %feature("docstring", "Get a proxy to the browser window at the given "
398 "zero-based index.") GetBrowserWindow; 367 "zero-based index.") GetBrowserWindow;
399 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index); 368 scoped_refptr<BrowserProxy> GetBrowserWindow(int window_index);
400 369
401 // Meta-method 370 // Meta-method
402 %feature("docstring", "Send a sync JSON request to Chrome. " 371 %feature("docstring", "Send a sync JSON request to Chrome. "
403 "Returns a JSON dict as a response. " 372 "Returns a JSON dict as a response. "
404 "Given timeout in milliseconds." 373 "Given timeout in milliseconds."
405 "Internal method.") 374 "Internal method.")
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 // Initialize a new HTTPSOptions that will use the specified certificate. 456 // Initialize a new HTTPSOptions that will use the specified certificate.
488 explicit HTTPSOptions(ServerCertificate cert); 457 explicit HTTPSOptions(ServerCertificate cert);
489 }; 458 };
490 459
491 %{ 460 %{
492 typedef net::TestServer::HTTPSOptions HTTPSOptions; 461 typedef net::TestServer::HTTPSOptions HTTPSOptions;
493 %} 462 %}
494 463
495 %pointer_class(int, int_ptr); 464 %pointer_class(int, int_ptr);
496 %pointer_class(uint32, uint32_ptr); 465 %pointer_class(uint32, uint32_ptr);
OLDNEW
« chrome/test/pyautolib/pyauto.py ('K') | « chrome/test/pyautolib/pyautolib.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698