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

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

Issue 6694007: Small test and ChromeDriver fixes to enable additional tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Dennis' comments 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/run_webdriver_tests.py ('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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Same as above, but uses the currently targeted window and frame. 80 // Same as above, but uses the currently targeted window and frame.
81 ErrorCode ExecuteScript(const std::string& script, 81 ErrorCode ExecuteScript(const std::string& script,
82 const ListValue* const args, 82 const ListValue* const args,
83 Value** value); 83 Value** value);
84 84
85 // Send the given keys to the given element dictionary. This function takes 85 // Send the given keys to the given element dictionary. This function takes
86 // ownership of |element|. 86 // ownership of |element|.
87 ErrorCode SendKeys(const WebElementId& element, const string16& keys); 87 ErrorCode SendKeys(const WebElementId& element, const string16& keys);
88 88
89 // Clicks the mouse at the given location using the given button. 89 // Clicks the mouse at the given location using the given button.
90 void MouseClick(const gfx::Point& click, automation::MouseButton button); 90 bool MouseClick(const gfx::Point& click, automation::MouseButton button);
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);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 const WebElementId& element, 163 const WebElementId& element,
164 const std::string& prop, 164 const std::string& prop,
165 std::string* value); 165 std::string* value);
166 166
167 // Gets the top and left element border widths for the given frame. 167 // Gets the top and left element border widths for the given frame.
168 ErrorCode GetElementBorder(const FrameId& frame_id, 168 ErrorCode GetElementBorder(const FrameId& frame_id,
169 const WebElementId& element, 169 const WebElementId& element,
170 int* border_left, 170 int* border_left,
171 int* border_top); 171 int* border_top);
172 172
173 // Gets whether the element is currently displayed.
174 ErrorCode IsElementDisplayed(const FrameId& frame_id,
175 const WebElementId& element,
176 bool* is_visible);
177
173 // Waits for all tabs to stop loading. Returns true on success. 178 // Waits for all tabs to stop loading. Returns true on success.
174 bool WaitForAllTabsToStopLoading(); 179 bool WaitForAllTabsToStopLoading();
175 180
176 inline const std::string& id() const { return id_; } 181 inline const std::string& id() const { return id_; }
177 182
178 inline int implicit_wait() const { return implicit_wait_; } 183 inline int implicit_wait() const { return implicit_wait_; }
179 inline void set_implicit_wait(const int& timeout) { 184 inline void set_implicit_wait(const int& timeout) {
180 implicit_wait_ = timeout > 0 ? timeout : 0; 185 implicit_wait_ = timeout > 0 ? timeout : 0;
181 } 186 }
182 187
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 FrameId current_target_; 226 FrameId current_target_;
222 227
223 DISALLOW_COPY_AND_ASSIGN(Session); 228 DISALLOW_COPY_AND_ASSIGN(Session);
224 }; 229 };
225 230
226 } // namespace webdriver 231 } // namespace webdriver
227 232
228 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); 233 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session);
229 234
230 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ 235 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_
OLDNEW
« no previous file with comments | « chrome/test/webdriver/run_webdriver_tests.py ('k') | chrome/test/webdriver/session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698