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

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

Powered by Google App Engine
This is Rietveld 408576698