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

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

Issue 6630001: Allow webdriver users to choose between sending the key events when... (Closed) Base URL: http://src.chromium.org/svn/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
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 inline const std::string& current_frame_xpath() const { 162 inline const std::string& current_frame_xpath() const {
163 return current_frame_xpath_; 163 return current_frame_xpath_;
164 } 164 }
165 165
166 inline void set_current_frame_xpath(const std::string& xpath) { 166 inline void set_current_frame_xpath(const std::string& xpath) {
167 current_frame_xpath_ = xpath; 167 current_frame_xpath_ = xpath;
168 } 168 }
169 169
170 inline int current_window_id() const { return current_window_id_; } 170 inline int current_window_id() const { return current_window_id_; }
171 171
172 inline bool use_native_events() const { return use_native_events_; }
173
174 inline void set_use_native_events(bool use_native_events) {
175 use_native_events_ = use_native_events;
176 }
177
172 private: 178 private:
173 void RunSessionTask(Task* task); 179 void RunSessionTask(Task* task);
174 void RunSessionTaskOnSessionThread( 180 void RunSessionTaskOnSessionThread(
175 Task* task, 181 Task* task,
176 base::WaitableEvent* done_event); 182 base::WaitableEvent* done_event);
177 void InitOnSessionThread(const FilePath& browser_dir, bool* success); 183 void InitOnSessionThread(const FilePath& browser_dir, bool* success);
178 void TerminateOnSessionThread(); 184 void TerminateOnSessionThread();
179 void SendKeysOnSessionThread(const string16& keys, bool* success); 185 void SendKeysOnSessionThread(const string16& keys, bool* success);
180 ErrorCode SwitchToFrameWithJavaScriptLocatedFrame( 186 ErrorCode SwitchToFrameWithJavaScriptLocatedFrame(
181 const std::string& script, 187 const std::string& script,
(...skipping 21 matching lines...) Expand all
203 209
204 // The XPath to the frame within this session's active tab which all 210 // The XPath to the frame within this session's active tab which all
205 // commands should be directed to. XPath strings can represent a frame deep 211 // commands should be directed to. XPath strings can represent a frame deep
206 // down the tree (across multiple frame DOMs). 212 // down the tree (across multiple frame DOMs).
207 // Example, /html/body/table/tbody/tr/td/iframe\n/frameset/frame[1] 213 // Example, /html/body/table/tbody/tr/td/iframe\n/frameset/frame[1]
208 // should break into 2 xpaths 214 // should break into 2 xpaths
209 // /html/body/table/tbody/tr/td/iframe & /frameset/frame[1]. 215 // /html/body/table/tbody/tr/td/iframe & /frameset/frame[1].
210 std::string current_frame_xpath_; 216 std::string current_frame_xpath_;
211 int current_window_id_; 217 int current_window_id_;
212 218
219 bool use_native_events_;
220
213 DISALLOW_COPY_AND_ASSIGN(Session); 221 DISALLOW_COPY_AND_ASSIGN(Session);
214 }; 222 };
215 223
216 } // namespace webdriver 224 } // namespace webdriver
217 225
218 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session); 226 DISABLE_RUNNABLE_METHOD_REFCOUNT(webdriver::Session);
219 227
220 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_ 228 #endif // CHROME_TEST_WEBDRIVER_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698