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

Side by Side Diff: chrome/test/webdriver/session.h

Issue 6330012: Cookie commands for the webdriver protocol (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: updates Created 9 years, 10 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) 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 #ifndef CHROME_TEST_WEBDRIVER_SESSION_H_ 5 #ifndef CHROME_TEST_WEBDRIVER_SESSION_H_
6 #define CHROME_TEST_WEBDRIVER_SESSION_H_ 6 #define CHROME_TEST_WEBDRIVER_SESSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 #include "chrome/test/webdriver/automation.h" 11 #include "chrome/test/webdriver/automation.h"
12 #include "chrome/test/webdriver/error_codes.h" 12 #include "chrome/test/webdriver/error_codes.h"
13 13
kkania 2011/02/08 18:35:22 add: class GURL;
14 namespace base { 14 namespace base {
15 class WaitableEvent; 15 class WaitableEvent;
16 } 16 }
17 17
18 namespace webdriver { 18 namespace webdriver {
19 19
20 // Every connection made by WebDriver maps to a session object. 20 // Every connection made by WebDriver maps to a session object.
21 // This object creates the chrome instance and keeps track of the 21 // This object creates the chrome instance and keeps track of the
22 // state necessary to control the chrome browser created. 22 // state necessary to control the chrome browser created.
23 // TODO(phajdan.jr): Abstract UITestBase classes, see: 23 // TODO(phajdan.jr): Abstract UITestBase classes, see:
(...skipping 16 matching lines...) Expand all
40 // script result |value|. 40 // script result |value|.
41 ErrorCode ExecuteScript(const std::wstring& script, 41 ErrorCode ExecuteScript(const std::wstring& script,
42 const ListValue* const args, 42 const ListValue* const args,
43 Value** value); 43 Value** value);
44 44
45 45
46 bool NavigateToURL(const std::string& url); 46 bool NavigateToURL(const std::string& url);
47 bool GoForward(); 47 bool GoForward();
48 bool GoBack(); 48 bool GoBack();
49 bool Reload(); 49 bool Reload();
50 bool GetURL(GURL* url);
50 bool GetURL(std::string* url); 51 bool GetURL(std::string* url);
51 bool GetTabTitle(std::string* tab_title); 52 bool GetTabTitle(std::string* tab_title);
53 bool GetCookies(const GURL& url, std::string* cookies);
54 bool GetCookieByName(const GURL& url, const std::string& cookie_name,
55 std::string* cookie);
56 bool DeleteCookie(const GURL& url, const std::string& cookie_name);
57 bool SetCookie(const GURL& url, const std::string& cookie);
52 58
53 inline const std::string& id() const { return id_; } 59 inline const std::string& id() const { return id_; }
54 60
55 inline int implicit_wait() { return implicit_wait_; } 61 inline int implicit_wait() { return implicit_wait_; }
56 inline void set_implicit_wait(const int& timeout) { 62 inline void set_implicit_wait(const int& timeout) {
57 implicit_wait_ = timeout > 0 ? timeout : 0; 63 implicit_wait_ = timeout > 0 ? timeout : 0;
58 } 64 }
59 65
60 enum Speed { kSlow, kMedium, kFast, kUnknown }; 66 enum Speed { kSlow, kMedium, kFast, kUnknown };
61 inline Speed speed() { return speed_; } 67 inline Speed speed() { return speed_; }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 std::wstring current_frame_xpath_; 104 std::wstring current_frame_xpath_;
99 105
100 DISALLOW_COPY_AND_ASSIGN(Session); 106 DISALLOW_COPY_AND_ASSIGN(Session);
101 }; 107 };
102 108
103 } // namespace webdriver 109 } // namespace webdriver
104 110
105 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); 111 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session);
106 112
107 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ 113 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698