Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: chrome/test/webdriver/webdriver_automation.cc

Issue 10388251: Support maximize window command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "Since the python bindings are to a newer version now, update chromedriver_tests.py accordingly." Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/webdriver/webdriver_automation.h ('k') | chrome/test/webdriver/webdriver_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 void Automation::SetViewBounds(const WebViewId& view_id, 874 void Automation::SetViewBounds(const WebViewId& view_id,
875 const Rect& bounds, 875 const Rect& bounds,
876 Error** error) { 876 Error** error) {
877 automation::Error auto_error; 877 automation::Error auto_error;
878 if (!SendSetViewBoundsJSONRequest( 878 if (!SendSetViewBoundsJSONRequest(
879 automation(), view_id, bounds.x(), bounds.y(), 879 automation(), view_id, bounds.x(), bounds.y(),
880 bounds.width(), bounds.height(), &auto_error)) 880 bounds.width(), bounds.height(), &auto_error))
881 *error = Error::FromAutomationError(auto_error); 881 *error = Error::FromAutomationError(auto_error);
882 } 882 }
883 883
884 void Automation::MaximizeView(const WebViewId& view_id, Error** error) {
885 *error = CheckMaximizeSupported();
886 if (*error)
887 return;
888
889 automation::Error auto_error;
890 if (!SendMaximizeJSONRequest(
891 automation(), view_id, &auto_error))
892 *error = Error::FromAutomationError(auto_error);
893 }
894
884 void Automation::GetAppModalDialogMessage(std::string* message, Error** error) { 895 void Automation::GetAppModalDialogMessage(std::string* message, Error** error) {
885 *error = CheckAlertsSupported(); 896 *error = CheckAlertsSupported();
886 if (*error) 897 if (*error)
887 return; 898 return;
888 899
889 automation::Error auto_error; 900 automation::Error auto_error;
890 if (!SendGetAppModalDialogMessageJSONRequest( 901 if (!SendGetAppModalDialogMessageJSONRequest(
891 automation(), message, &auto_error)) { 902 automation(), message, &auto_error)) {
892 *error = Error::FromAutomationError(auto_error); 903 *error = Error::FromAutomationError(auto_error);
893 } 904 }
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 return CheckVersion(947, message); 1163 return CheckVersion(947, message);
1153 } 1164 }
1154 1165
1155 Error* Automation::CheckGeolocationSupported() { 1166 Error* Automation::CheckGeolocationSupported() {
1156 const char* message = 1167 const char* message =
1157 "Geolocation automation interface is not supported for this version of " 1168 "Geolocation automation interface is not supported for this version of "
1158 "Chrome."; 1169 "Chrome.";
1159 return CheckVersion(1119, message); 1170 return CheckVersion(1119, message);
1160 } 1171 }
1161 1172
1173 Error* Automation::CheckMaximizeSupported() {
1174 const char* message =
1175 "Maximize automation interface is not supported for this version of "
1176 "Chrome.";
1177 return CheckVersion(1160, message);
1178 }
1179
1162 } // namespace webdriver 1180 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/webdriver_automation.h ('k') | chrome/test/webdriver/webdriver_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698