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

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: Fix compile error. 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
« no previous file with comments | « chrome/test/chromedriver/session.cc ('k') | chrome/test/chromedriver/window_commands.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) 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 if (window_name == name) { 160 if (window_name == name) {
161 web_view = *it; 161 web_view = *it;
162 break; 162 break;
163 } 163 }
164 } 164 }
165 } 165 }
166 166
167 if (!web_view) 167 if (!web_view)
168 return Status(kNoSuchWindow); 168 return Status(kNoSuchWindow);
169 session->window = web_view->GetId(); 169 session->window = web_view->GetId();
170 session->frame = ""; 170 session->SwitchToTopFrame();
171 session->mouse_position = WebPoint(0, 0); 171 session->mouse_position = WebPoint(0, 0);
172 return Status(kOk); 172 return Status(kOk);
173 } 173 }
174 174
175 Status ExecuteSetTimeout( 175 Status ExecuteSetTimeout(
176 Session* session, 176 Session* session,
177 const base::DictionaryValue& params, 177 const base::DictionaryValue& params,
178 scoped_ptr<base::Value>* value) { 178 scoped_ptr<base::Value>* value) {
179 int ms; 179 int ms;
180 if (!params.GetInteger("ms", &ms) || ms < 0) 180 if (!params.GetInteger("ms", &ms) || ms < 0)
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 WebView* web_view = NULL; 274 WebView* web_view = NULL;
275 Status status = session->GetTargetWindow(&web_view); 275 Status status = session->GetTargetWindow(&web_view);
276 if (status.IsError()) 276 if (status.IsError())
277 return status; 277 return status;
278 278
279 status = web_view->ConnectIfNecessary(); 279 status = web_view->ConnectIfNecessary();
280 if (status.IsError()) 280 if (status.IsError())
281 return status; 281 return status;
282 282
283 bool is_pending; 283 bool is_pending;
284 status = web_view->IsPendingNavigation(session->frame, &is_pending); 284 status = web_view->IsPendingNavigation(
285 session->GetCurrentFrameId(), &is_pending);
285 if (status.IsError()) 286 if (status.IsError())
286 return status; 287 return status;
287 value->reset(new base::FundamentalValue(is_pending)); 288 value->reset(new base::FundamentalValue(is_pending));
288 return Status(kOk); 289 return Status(kOk);
289 } 290 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/session.cc ('k') | chrome/test/chromedriver/window_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698