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

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

Issue 848483002: [chromedriver] Use center of first ClientRect when moving mouse to an element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add some extra checks to testMoveToElementAndClick Created 5 years, 11 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
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/element_commands.h" 5 #include "chrome/test/chromedriver/element_commands.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 } 438 }
439 439
440 Status ExecuteGetElementLocationOnceScrolledIntoView( 440 Status ExecuteGetElementLocationOnceScrolledIntoView(
441 Session* session, 441 Session* session,
442 WebView* web_view, 442 WebView* web_view,
443 const std::string& element_id, 443 const std::string& element_id,
444 const base::DictionaryValue& params, 444 const base::DictionaryValue& params,
445 scoped_ptr<base::Value>* value) { 445 scoped_ptr<base::Value>* value) {
446 WebPoint location; 446 WebPoint location;
447 Status status = ScrollElementIntoView( 447 Status status = ScrollElementIntoView(
448 session, web_view, element_id, &location); 448 session, web_view, element_id, nullptr, &location);
449 if (status.IsError()) 449 if (status.IsError())
450 return status; 450 return status;
451 value->reset(CreateValueFrom(location)); 451 value->reset(CreateValueFrom(location));
452 return Status(kOk); 452 return Status(kOk);
453 } 453 }
454 454
455 Status ExecuteGetElementSize( 455 Status ExecuteGetElementSize(
456 Session* session, 456 Session* session,
457 WebView* web_view, 457 WebView* web_view,
458 const std::string& element_id, 458 const std::string& element_id,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 WebView* web_view, 502 WebView* web_view,
503 const std::string& element_id, 503 const std::string& element_id,
504 const base::DictionaryValue& params, 504 const base::DictionaryValue& params,
505 scoped_ptr<base::Value>* value) { 505 scoped_ptr<base::Value>* value) {
506 std::string other_element_id; 506 std::string other_element_id;
507 if (!params.GetString("other", &other_element_id)) 507 if (!params.GetString("other", &other_element_id))
508 return Status(kUnknownError, "'other' must be a string"); 508 return Status(kUnknownError, "'other' must be a string");
509 value->reset(new base::FundamentalValue(element_id == other_element_id)); 509 value->reset(new base::FundamentalValue(element_id == other_element_id));
510 return Status(kOk); 510 return Status(kOk);
511 } 511 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/chromedriver/element_util.h » ('j') | chrome/test/chromedriver/element_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698