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

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

Issue 12764021: [chromedriver] Support clicking an element in sub frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHROMEDRIVER_SESSION_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_SESSION_H_
6 #define CHROME_TEST_CHROMEDRIVER_SESSION_H_ 6 #define CHROME_TEST_CHROMEDRIVER_SESSION_H_
7 7
8 #include <list>
8 #include <string> 9 #include <string>
9 10
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
14 #include "chrome/test/chromedriver/basic_types.h" 15 #include "chrome/test/chromedriver/basic_types.h"
15 16
16 namespace base { 17 namespace base {
17 class DictionaryValue; 18 class DictionaryValue;
18 } 19 }
19 20
20 class Chrome; 21 class Chrome;
21 class Status; 22 class Status;
22 class WebView; 23 class WebView;
23 24
24 struct Session { 25 struct Session {
25 explicit Session(const std::string& id); 26 explicit Session(const std::string& id);
26 Session(const std::string& id, scoped_ptr<Chrome> chrome); 27 Session(const std::string& id, scoped_ptr<Chrome> chrome);
27 ~Session(); 28 ~Session();
28 29
29 Status GetTargetWindow(WebView** web_view); 30 Status GetTargetWindow(WebView** web_view);
30 31
32 void SetToFrame(const std::string& new_frame, const std::string& xpath);
33
31 const std::string id; 34 const std::string id;
32 scoped_ptr<Chrome> chrome; 35 scoped_ptr<Chrome> chrome;
33 std::string window; 36 std::string window;
34 std::string frame; 37 std::string frame;
kkania 2013/03/12 18:34:25 this is a bit messy now that the client must remem
chrisgao (Use stgao instead) 2013/03/12 23:17:41 Remove frame, and only maintain frame_elements.
38 // Vector of |FrameInfo|s for each frame to the current target frame from the
39 // first frame element in the root document. If target frame is window.top,
40 // this list will be empty.
41 std::list<FrameInfo> frame_elements;
35 WebPoint mouse_position; 42 WebPoint mouse_position;
36 int implicit_wait; 43 int implicit_wait;
37 int page_load_timeout; 44 int page_load_timeout;
38 int script_timeout; 45 int script_timeout;
39 std::string prompt_text; 46 std::string prompt_text;
40 const scoped_ptr<base::DictionaryValue> capabilities; 47 const scoped_ptr<base::DictionaryValue> capabilities;
41 48
42 private: 49 private:
43 scoped_ptr<base::DictionaryValue> CreateCapabilities(); 50 scoped_ptr<base::DictionaryValue> CreateCapabilities();
44 }; 51 };
(...skipping 16 matching lines...) Expand all
61 private: 68 private:
62 virtual ~SessionAccessorImpl(); 69 virtual ~SessionAccessorImpl();
63 70
64 base::Lock session_lock_; 71 base::Lock session_lock_;
65 scoped_ptr<Session> session_; 72 scoped_ptr<Session> session_;
66 73
67 DISALLOW_COPY_AND_ASSIGN(SessionAccessorImpl); 74 DISALLOW_COPY_AND_ASSIGN(SessionAccessorImpl);
68 }; 75 };
69 76
70 #endif // CHROME_TEST_CHROMEDRIVER_SESSION_H_ 77 #endif // CHROME_TEST_CHROMEDRIVER_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698