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

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: "Fix documentation." 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
Index: chrome/test/webdriver/webdriver_automation.cc
diff --git a/chrome/test/webdriver/webdriver_automation.cc b/chrome/test/webdriver/webdriver_automation.cc
index 169224d150225632c6aafa9e6a5864c0371a6841..80763ec03fd6f5e90b3c8308207d37a3faf95324 100644
--- a/chrome/test/webdriver/webdriver_automation.cc
+++ b/chrome/test/webdriver/webdriver_automation.cc
@@ -885,6 +885,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)
@@ -1163,4 +1174,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

Powered by Google App Engine
This is Rietveld 408576698