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

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: 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 unified diff | Download patch | Annotate | Revision Log
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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 void Automation::SetViewBounds(const WebViewId& view_id, 735 void Automation::SetViewBounds(const WebViewId& view_id,
736 const Rect& bounds, 736 const Rect& bounds,
737 Error** error) { 737 Error** error) {
738 automation::Error auto_error; 738 automation::Error auto_error;
739 if (!SendSetViewBoundsJSONRequest( 739 if (!SendSetViewBoundsJSONRequest(
740 automation(), view_id, bounds.x(), bounds.y(), 740 automation(), view_id, bounds.x(), bounds.y(),
741 bounds.width(), bounds.height(), &auto_error)) 741 bounds.width(), bounds.height(), &auto_error))
742 *error = Error::FromAutomationError(auto_error); 742 *error = Error::FromAutomationError(auto_error);
743 } 743 }
744 744
745 void Automation::Maximize(const WebViewId& view_id, Error** error) {
746 automation::Error auto_error;
kkania 2012/05/23 17:58:42 Also, can you return a nicer error for the user if
zori 2012/05/24 00:39:33 Done.
747 if (!SendMaximizeJSONRequest(
748 automation(), view_id, &auto_error))
749 *error = Error::FromAutomationError(auto_error);
750 }
751
745 void Automation::GetAppModalDialogMessage(std::string* message, Error** error) { 752 void Automation::GetAppModalDialogMessage(std::string* message, Error** error) {
746 *error = CheckAlertsSupported(); 753 *error = CheckAlertsSupported();
747 if (*error) 754 if (*error)
748 return; 755 return;
749 756
750 automation::Error auto_error; 757 automation::Error auto_error;
751 if (!SendGetAppModalDialogMessageJSONRequest( 758 if (!SendGetAppModalDialogMessageJSONRequest(
752 automation(), message, &auto_error)) { 759 automation(), message, &auto_error)) {
753 *error = Error::FromAutomationError(auto_error); 760 *error = Error::FromAutomationError(auto_error);
754 } 761 }
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 } 1021 }
1015 1022
1016 Error* Automation::CheckGeolocationSupported() { 1023 Error* Automation::CheckGeolocationSupported() {
1017 const char* message = 1024 const char* message =
1018 "Geolocation automation interface is not supported for this version of " 1025 "Geolocation automation interface is not supported for this version of "
1019 "Chrome."; 1026 "Chrome.";
1020 return CheckVersion(1119, message); 1027 return CheckVersion(1119, message);
1021 } 1028 }
1022 1029
1023 } // namespace webdriver 1030 } // namespace webdriver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698