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/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
11 #include "base/time.h" | 11 #include "base/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/js.h" | 14 #include "chrome/test/chromedriver/chrome/js.h" |
| 15 #include "chrome/test/chromedriver/chrome/status.h" |
| 16 #include "chrome/test/chromedriver/chrome/web_view.h" |
15 #include "chrome/test/chromedriver/session.h" | 17 #include "chrome/test/chromedriver/session.h" |
16 #include "chrome/test/chromedriver/status.h" | |
17 #include "chrome/test/chromedriver/web_view.h" | |
18 #include "third_party/webdriver/atoms.h" | 18 #include "third_party/webdriver/atoms.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 const char kElementKey[] = "ELEMENT"; | 22 const char kElementKey[] = "ELEMENT"; |
23 | 23 |
24 bool ParseFromValue(base::Value* value, WebPoint* point) { | 24 bool ParseFromValue(base::Value* value, WebPoint* point) { |
25 base::DictionaryValue* dict_value; | 25 base::DictionaryValue* dict_value; |
26 if (!value->GetAsDictionary(&dict_value)) | 26 if (!value->GetAsDictionary(&dict_value)) |
27 return false; | 27 return false; |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 status = ScrollElementRegionIntoViewHelper( | 562 status = ScrollElementRegionIntoViewHelper( |
563 rit->parent_frame_id, web_view, frame_element_id, | 563 rit->parent_frame_id, web_view, frame_element_id, |
564 WebRect(region_offset, region_size), | 564 WebRect(region_offset, region_size), |
565 center, verify_clickable, ®ion_offset); | 565 center, verify_clickable, ®ion_offset); |
566 if (status.IsError()) | 566 if (status.IsError()) |
567 return status; | 567 return status; |
568 } | 568 } |
569 *location = region_offset; | 569 *location = region_offset; |
570 return Status(kOk); | 570 return Status(kOk); |
571 } | 571 } |
OLD | NEW |