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

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

Issue 9288051: Implement the webdriver window sizing commands. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 years, 11 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 WebViewLocator view_locator; 703 WebViewLocator view_locator;
704 *error = ConvertViewIdToLocator(view_id, &view_locator); 704 *error = ConvertViewIdToLocator(view_id, &view_locator);
705 if (*error) 705 if (*error)
706 return; 706 return;
707 707
708 automation::Error auto_error; 708 automation::Error auto_error;
709 if (!SendCloseViewJSONRequest(automation(), view_locator, &auto_error)) 709 if (!SendCloseViewJSONRequest(automation(), view_locator, &auto_error))
710 *error = Error::FromAutomationError(auto_error); 710 *error = Error::FromAutomationError(auto_error);
711 } 711 }
712 712
713 void Automation::SetViewBounds(const WebViewId& view_id,
714 const Rect& bounds,
715 Error** error) {
716 automation::Error auto_error;
717 if (!SendSetViewBoundsJSONRequest(
718 automation(),
719 view_id,
720 bounds.x(),
721 bounds.y(),
722 bounds.width(),
723 bounds.height(),
724 &auto_error))
dennis_jeffrey 2012/01/27 16:23:29 nit: fit as many params on a line as you can, rath
kkania 2012/01/27 22:48:31 Done.
725 *error = Error::FromAutomationError(auto_error);
726 }
727
713 void Automation::GetAppModalDialogMessage(std::string* message, Error** error) { 728 void Automation::GetAppModalDialogMessage(std::string* message, Error** error) {
714 *error = CheckAlertsSupported(); 729 *error = CheckAlertsSupported();
715 if (*error) 730 if (*error)
716 return; 731 return;
717 732
718 automation::Error auto_error; 733 automation::Error auto_error;
719 if (!SendGetAppModalDialogMessageJSONRequest( 734 if (!SendGetAppModalDialogMessageJSONRequest(
720 automation(), message, &auto_error)) { 735 automation(), message, &auto_error)) {
721 *error = Error::FromAutomationError(auto_error); 736 *error = Error::FromAutomationError(auto_error);
722 } 737 }
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 return CheckVersion(750, message); 967 return CheckVersion(750, message);
953 } 968 }
954 969
955 Error* Automation::CheckNewExtensionInterfaceSupported() { 970 Error* Automation::CheckNewExtensionInterfaceSupported() {
956 const char* message = 971 const char* message =
957 "Extension interface is not supported for this version of Chrome"; 972 "Extension interface is not supported for this version of Chrome";
958 return CheckVersion(947, message); 973 return CheckVersion(947, message);
959 } 974 }
960 975
961 } // namespace webdriver 976 } // namespace webdriver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698