| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/webdriver/webdriver_automation.h" | 5 #include "chrome/test/webdriver/webdriver_automation.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 WebViewLocator view_locator; | 703 WebViewLocator view_locator; |
| 704 *error = ConvertViewIdToLocator(view_id, &view_locator); | 704 *error = ConvertViewIdToLocator(view_id, &view_locator); |
| 705 if (*error) | 705 if (*error) |
| 706 return; | 706 return; |
| 707 | 707 |
| 708 automation::Error auto_error; | 708 automation::Error auto_error; |
| 709 if (!SendCloseViewJSONRequest(automation(), view_locator, &auto_error)) | 709 if (!SendCloseViewJSONRequest(automation(), view_locator, &auto_error)) |
| 710 *error = Error::FromAutomationError(auto_error); | 710 *error = Error::FromAutomationError(auto_error); |
| 711 } | 711 } |
| 712 | 712 |
| 713 void Automation::SetViewBounds(const WebViewId& view_id, |
| 714 const Rect& bounds, |
| 715 Error** error) { |
| 716 automation::Error auto_error; |
| 717 if (!SendSetViewBoundsJSONRequest( |
| 718 automation(), view_id, bounds.x(), bounds.y(), |
| 719 bounds.width(), bounds.height(), &auto_error)) |
| 720 *error = Error::FromAutomationError(auto_error); |
| 721 } |
| 722 |
| 713 void Automation::GetAppModalDialogMessage(std::string* message, Error** error) { | 723 void Automation::GetAppModalDialogMessage(std::string* message, Error** error) { |
| 714 *error = CheckAlertsSupported(); | 724 *error = CheckAlertsSupported(); |
| 715 if (*error) | 725 if (*error) |
| 716 return; | 726 return; |
| 717 | 727 |
| 718 automation::Error auto_error; | 728 automation::Error auto_error; |
| 719 if (!SendGetAppModalDialogMessageJSONRequest( | 729 if (!SendGetAppModalDialogMessageJSONRequest( |
| 720 automation(), message, &auto_error)) { | 730 automation(), message, &auto_error)) { |
| 721 *error = Error::FromAutomationError(auto_error); | 731 *error = Error::FromAutomationError(auto_error); |
| 722 } | 732 } |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 return CheckVersion(750, message); | 962 return CheckVersion(750, message); |
| 953 } | 963 } |
| 954 | 964 |
| 955 Error* Automation::CheckNewExtensionInterfaceSupported() { | 965 Error* Automation::CheckNewExtensionInterfaceSupported() { |
| 956 const char* message = | 966 const char* message = |
| 957 "Extension interface is not supported for this version of Chrome"; | 967 "Extension interface is not supported for this version of Chrome"; |
| 958 return CheckVersion(947, message); | 968 return CheckVersion(947, message); |
| 959 } | 969 } |
| 960 | 970 |
| 961 } // namespace webdriver | 971 } // namespace webdriver |
| OLD | NEW |