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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <list> | 10 #include <list> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 session->GetCurrentFrameId(), kFocusScript, args, &result); | 73 session->GetCurrentFrameId(), kFocusScript, args, &result); |
74 if (status.IsError()) | 74 if (status.IsError()) |
75 return status; | 75 return status; |
76 } | 76 } |
77 | 77 |
78 return SendKeysOnWindow(web_view, key_list, true, &session->sticky_modifiers); | 78 return SendKeysOnWindow(web_view, key_list, true, &session->sticky_modifiers); |
79 } | 79 } |
80 | 80 |
81 } // namespace | 81 } // namespace |
82 | 82 |
83 Status ExecuteElementCommand(const ElementCommand& command, | 83 Status ExecuteElementCommand( |
84 Session* session, | 84 const ElementCommand& command, |
85 WebView* web_view, | 85 Session* session, |
86 const base::DictionaryValue& params, | 86 WebView* web_view, |
87 std::unique_ptr<base::Value>* value) { | 87 const base::DictionaryValue& params, |
| 88 std::unique_ptr<base::Value>* value, |
| 89 Timeout* timeout) { |
88 std::string id; | 90 std::string id; |
89 if (params.GetString("id", &id) || params.GetString("element", &id)) | 91 if (params.GetString("id", &id) || params.GetString("element", &id)) |
90 return command.Run(session, web_view, id, params, value); | 92 return command.Run(session, web_view, id, params, value); |
91 return Status(kUnknownError, "element identifier must be a string"); | 93 return Status(kUnknownError, "element identifier must be a string"); |
92 } | 94 } |
93 | 95 |
94 Status ExecuteFindChildElement(int interval_ms, | 96 Status ExecuteFindChildElement(int interval_ms, |
95 Session* session, | 97 Session* session, |
96 WebView* web_view, | 98 WebView* web_view, |
97 const std::string& element_id, | 99 const std::string& element_id, |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 WebView* web_view, | 524 WebView* web_view, |
523 const std::string& element_id, | 525 const std::string& element_id, |
524 const base::DictionaryValue& params, | 526 const base::DictionaryValue& params, |
525 std::unique_ptr<base::Value>* value) { | 527 std::unique_ptr<base::Value>* value) { |
526 std::string other_element_id; | 528 std::string other_element_id; |
527 if (!params.GetString("other", &other_element_id)) | 529 if (!params.GetString("other", &other_element_id)) |
528 return Status(kUnknownError, "'other' must be a string"); | 530 return Status(kUnknownError, "'other' must be a string"); |
529 value->reset(new base::FundamentalValue(element_id == other_element_id)); | 531 value->reset(new base::FundamentalValue(element_id == other_element_id)); |
530 return Status(kOk); | 532 return Status(kOk); |
531 } | 533 } |
OLD | NEW |