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/session_commands.h" | 5 #include "chrome/test/chromedriver/session_commands.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 return status; | 428 return status; |
429 status = web_view->ConnectIfNecessary(); | 429 status = web_view->ConnectIfNecessary(); |
430 if (status.IsError()) | 430 if (status.IsError()) |
431 return status; | 431 return status; |
432 status = web_view->OverrideNetworkConditions( | 432 status = web_view->OverrideNetworkConditions( |
433 *session->overridden_network_conditions); | 433 *session->overridden_network_conditions); |
434 if (status.IsError()) | 434 if (status.IsError()) |
435 return status; | 435 return status; |
436 } | 436 } |
437 | 437 |
| 438 status = session->chrome->ActivateWebView(web_view_id); |
| 439 if (status.IsError()) |
| 440 return status; |
438 session->window = web_view_id; | 441 session->window = web_view_id; |
439 session->SwitchToTopFrame(); | 442 session->SwitchToTopFrame(); |
440 session->mouse_position = WebPoint(0, 0); | 443 session->mouse_position = WebPoint(0, 0); |
441 return Status(kOk); | 444 return Status(kOk); |
442 } | 445 } |
443 | 446 |
444 Status ExecuteSetTimeout(Session* session, | 447 Status ExecuteSetTimeout(Session* session, |
445 const base::DictionaryValue& params, | 448 const base::DictionaryValue& params, |
446 std::unique_ptr<base::Value>* value) { | 449 std::unique_ptr<base::Value>* value) { |
447 double ms_double; | 450 double ms_double; |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 std::unique_ptr<base::Value>* value) { | 891 std::unique_ptr<base::Value>* value) { |
889 WebView* web_view = nullptr; | 892 WebView* web_view = nullptr; |
890 Status status = session->GetTargetWindow(&web_view); | 893 Status status = session->GetTargetWindow(&web_view); |
891 if (status.IsError()) | 894 if (status.IsError()) |
892 return status; | 895 return status; |
893 status = web_view->DeleteScreenOrientation(); | 896 status = web_view->DeleteScreenOrientation(); |
894 if (status.IsError()) | 897 if (status.IsError()) |
895 return status; | 898 return status; |
896 return Status(kOk); | 899 return Status(kOk); |
897 } | 900 } |
OLD | NEW |