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

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

Issue 6705004: Return the full cookie details in TestingAutomationProvider and pass around (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 9 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
« no previous file with comments | « chrome/test/webdriver/commands/session_with_id.cc ('k') | chrome/test/webdriver/session.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 bool MouseMove(const gfx::Point& location); 91 bool MouseMove(const gfx::Point& location);
92 bool MouseDrag(const gfx::Point& start, const gfx::Point& end); 92 bool MouseDrag(const gfx::Point& start, const gfx::Point& end);
93 93
94 bool NavigateToURL(const std::string& url); 94 bool NavigateToURL(const std::string& url);
95 bool GoForward(); 95 bool GoForward();
96 bool GoBack(); 96 bool GoBack();
97 bool Reload(); 97 bool Reload();
98 bool GetURL(GURL* url); 98 bool GetURL(GURL* url);
99 bool GetURL(std::string* url); 99 bool GetURL(std::string* url);
100 bool GetTabTitle(std::string* tab_title); 100 bool GetTabTitle(std::string* tab_title);
101 bool GetCookies(const GURL& url, std::string* cookies); 101
102 bool GetCookieByName(const GURL& url, const std::string& cookie_name, 102 bool GetCookies(const std::string& url, ListValue** cookies);
103 std::string* cookie); 103 bool GetCookiesDeprecated(const GURL& url, std::string* cookies);
104 bool DeleteCookie(const GURL& url, const std::string& cookie_name); 104 bool GetCookieByNameDeprecated(const GURL& url,
105 bool SetCookie(const GURL& url, const std::string& cookie); 105 const std::string& cookie_name,
106 std::string* cookie);
107 bool DeleteCookie(const std::string& url, const std::string& cookie_name);
108 bool DeleteCookieDeprecated(const GURL& url, const std::string& cookie_name);
109 bool SetCookie(const std::string& url, DictionaryValue* cookie_dict);
110 bool SetCookieDeprecated(const GURL& url, const std::string& cookie);
106 111
107 // Gets all the currently existing window IDs. Returns true on success. 112 // Gets all the currently existing window IDs. Returns true on success.
108 bool GetWindowIds(std::vector<int>* window_ids); 113 bool GetWindowIds(std::vector<int>* window_ids);
109 114
110 // Switches the window used by default. |name| is either an ID returned by 115 // Switches the window used by default. |name| is either an ID returned by
111 // |GetWindowIds| or the name attribute of a DOM window. 116 // |GetWindowIds| or the name attribute of a DOM window.
112 ErrorCode SwitchToWindow(const std::string& name); 117 ErrorCode SwitchToWindow(const std::string& name);
113 118
114 // Switches the frame used by default. |name_or_id| is either the name or id 119 // Switches the frame used by default. |name_or_id| is either the name or id
115 // of a frame element. 120 // of a frame element.
116 ErrorCode SwitchToFrameWithNameOrId(const std::string& name_or_id); 121 ErrorCode SwitchToFrameWithNameOrId(const std::string& name_or_id);
117 122
118 // Switches the frame used by default. |index| is the zero-based frame index. 123 // Switches the frame used by default. |index| is the zero-based frame index.
119 ErrorCode SwitchToFrameWithIndex(int index); 124 ErrorCode SwitchToFrameWithIndex(int index);
120 125
121 // Switches the frame used by default to the topmost frame. 126 // Switches the frame used by default to the topmost frame.
122 void SwitchToTopFrame(); 127 void SwitchToTopFrame();
123 128
124 // Closes the current window. Returns true on success. 129 // Closes the current window. Returns true on success.
125 // Note: The session will be deleted if this closes the last window in the 130 // Note: The session will be deleted if this closes the last window in the
126 // session. 131 // session.
127 bool CloseWindow(); 132 bool CloseWindow();
128 133
129 // Gets the version of the running browser. 134 // Gets the version of the running browser.
130 std::string GetVersion(); 135 std::string GetBrowserVersion();
136
137 // Gets whether the running browser's version is newer or equal to the given
138 // version. Returns true on successful comparison. For example, in the version
139 // 11.0.632.4, 632 is the build number and 4 is the patch number.
140 bool CompareBrowserVersion(int build_no,
141 int patch_no,
142 bool* is_newer_or_equal);
131 143
132 // Finds a single element in the given frame, starting at the given 144 // Finds a single element in the given frame, starting at the given
133 // |root_element|, using the given locator strategy. |locator| should be a 145 // |root_element|, using the given locator strategy. |locator| should be a
134 // constant from |LocatorType|. Returns an error code. If successful, 146 // constant from |LocatorType|. Returns an error code. If successful,
135 // |element| will be set as the found element. 147 // |element| will be set as the found element.
136 ErrorCode FindElement(const FrameId& frame_id, 148 ErrorCode FindElement(const FrameId& frame_id,
137 const WebElementId& root_element, 149 const WebElementId& root_element,
138 const std::string& locator, 150 const std::string& locator,
139 const std::string& query, 151 const std::string& query,
140 WebElementId* element); 152 WebElementId* element);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 FrameId current_target_; 233 FrameId current_target_;
222 234
223 DISALLOW_COPY_AND_ASSIGN(Session); 235 DISALLOW_COPY_AND_ASSIGN(Session);
224 }; 236 };
225 237
226 } // namespace webdriver 238 } // namespace webdriver
227 239
228 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); 240 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session);
229 241
230 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ 242 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_
OLDNEW
« no previous file with comments | « chrome/test/webdriver/commands/session_with_id.cc ('k') | chrome/test/webdriver/session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698