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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/webdriver/webdriver_automation.h ('k') | chrome/test/webdriver/webdriver_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/webdriver_automation.cc
diff --git a/chrome/test/webdriver/webdriver_automation.cc b/chrome/test/webdriver/webdriver_automation.cc
index 3af0033e012ef0e06b48c616de23c1547121829b..b78093f32fd90ead2dfaecde2ea0848ac23578bf 100644
--- a/chrome/test/webdriver/webdriver_automation.cc
+++ b/chrome/test/webdriver/webdriver_automation.cc
@@ -881,6 +881,17 @@ void Automation::SetViewBounds(const WebViewId& view_id,
*error = Error::FromAutomationError(auto_error);
}
+void Automation::MaximizeView(const WebViewId& view_id, Error** error) {
+ *error = CheckMaximizeSupported();
+ if (*error)
+ return;
+
+ automation::Error auto_error;
+ if (!SendMaximizeJSONRequest(
+ automation(), view_id, &auto_error))
+ *error = Error::FromAutomationError(auto_error);
+}
+
void Automation::GetAppModalDialogMessage(std::string* message, Error** error) {
*error = CheckAlertsSupported();
if (*error)
@@ -1159,4 +1170,11 @@ Error* Automation::CheckGeolocationSupported() {
return CheckVersion(1119, message);
}
+Error* Automation::CheckMaximizeSupported() {
+ const char* message =
+ "Maximize automation interface is not supported for this version of "
+ "Chrome.";
+ return CheckVersion(1160, message);
+}
+
} // namespace webdriver
« 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