| 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_util.h" | 5 #include "chrome/test/chromedriver/element_util.h" |
| 6 | 6 |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/test/chromedriver/basic_types.h" | 13 #include "chrome/test/chromedriver/basic_types.h" |
| 14 #include "chrome/test/chromedriver/chrome/browser_info.h" |
| 14 #include "chrome/test/chromedriver/chrome/chrome.h" | 15 #include "chrome/test/chromedriver/chrome/chrome.h" |
| 15 #include "chrome/test/chromedriver/chrome/js.h" | 16 #include "chrome/test/chromedriver/chrome/js.h" |
| 16 #include "chrome/test/chromedriver/chrome/status.h" | 17 #include "chrome/test/chromedriver/chrome/status.h" |
| 17 #include "chrome/test/chromedriver/chrome/version.h" | |
| 18 #include "chrome/test/chromedriver/chrome/web_view.h" | 18 #include "chrome/test/chromedriver/chrome/web_view.h" |
| 19 #include "chrome/test/chromedriver/session.h" | 19 #include "chrome/test/chromedriver/session.h" |
| 20 #include "third_party/webdriver/atoms.h" | 20 #include "third_party/webdriver/atoms.h" |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 const char kElementKey[] = "ELEMENT"; | 24 const char kElementKey[] = "ELEMENT"; |
| 25 | 25 |
| 26 bool ParseFromValue(base::Value* value, WebPoint* point) { | 26 bool ParseFromValue(base::Value* value, WebPoint* point) { |
| 27 base::DictionaryValue* dict_value; | 27 base::DictionaryValue* dict_value; |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 status = ScrollElementRegionIntoViewHelper( | 650 status = ScrollElementRegionIntoViewHelper( |
| 651 rit->parent_frame_id, web_view, frame_element_id, | 651 rit->parent_frame_id, web_view, frame_element_id, |
| 652 WebRect(region_offset, region_size), | 652 WebRect(region_offset, region_size), |
| 653 center, frame_element_id, ®ion_offset); | 653 center, frame_element_id, ®ion_offset); |
| 654 if (status.IsError()) | 654 if (status.IsError()) |
| 655 return status; | 655 return status; |
| 656 } | 656 } |
| 657 *location = region_offset; | 657 *location = region_offset; |
| 658 return Status(kOk); | 658 return Status(kOk); |
| 659 } | 659 } |
| OLD | NEW |