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

Side by Side Diff: chrome/test/chromedriver/session_commands.cc

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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chrome/test/chromedriver/session_commands.h" 5 #include "chrome/test/chromedriver/session_commands.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" // For CHECK macros. 10 #include "base/logging.h" // For CHECK macros.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 if (window_name == name) { 151 if (window_name == name) {
152 web_view = *it; 152 web_view = *it;
153 break; 153 break;
154 } 154 }
155 } 155 }
156 } 156 }
157 157
158 if (!web_view) 158 if (!web_view)
159 return Status(kNoSuchWindow); 159 return Status(kNoSuchWindow);
160 session->window = web_view->GetId(); 160 session->window = web_view->GetId();
161 session->frame = ""; 161 session->SwitchToTopFrame();
162 session->mouse_position = WebPoint(0, 0); 162 session->mouse_position = WebPoint(0, 0);
163 return Status(kOk); 163 return Status(kOk);
164 } 164 }
165 165
166 Status ExecuteSetTimeout( 166 Status ExecuteSetTimeout(
167 Session* session, 167 Session* session,
168 const base::DictionaryValue& params, 168 const base::DictionaryValue& params,
169 scoped_ptr<base::Value>* value) { 169 scoped_ptr<base::Value>* value) {
170 int ms; 170 int ms;
171 if (!params.GetInteger("ms", &ms) || ms < 0) 171 if (!params.GetInteger("ms", &ms) || ms < 0)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 Status ExecuteDismissAlert( 240 Status ExecuteDismissAlert(
241 Session* session, 241 Session* session,
242 const base::DictionaryValue& params, 242 const base::DictionaryValue& params,
243 scoped_ptr<base::Value>* value) { 243 scoped_ptr<base::Value>* value) {
244 Status status = session->chrome->HandleJavaScriptDialog( 244 Status status = session->chrome->HandleJavaScriptDialog(
245 false, session->prompt_text); 245 false, session->prompt_text);
246 session->prompt_text = ""; 246 session->prompt_text = "";
247 return status; 247 return status;
248 } 248 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698