OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |