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

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: Unit test in chromedriver_tests.py; nicer error reporting - a method to check whether the current v… Created 8 years, 7 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
Index: chrome/test/webdriver/webdriver_automation.cc
diff --git a/chrome/test/webdriver/webdriver_automation.cc b/chrome/test/webdriver/webdriver_automation.cc
index f64bf370f578aa313fa7a44c6c24a72c8d78210e..cd3590ea1915f77aa14b18e37c47a149aafa2ae7 100644
--- a/chrome/test/webdriver/webdriver_automation.cc
+++ b/chrome/test/webdriver/webdriver_automation.cc
@@ -742,6 +742,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)
@@ -1020,4 +1031,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(1148, message);
+}
+
} // namespace webdriver

Powered by Google App Engine
This is Rietveld 408576698