| Index: chrome/test/webdriver/commands/window_commands.cc
|
| diff --git a/chrome/test/webdriver/commands/window_commands.cc b/chrome/test/webdriver/commands/window_commands.cc
|
| index e799dd36a70873d2ace5f35f163cd19de0d97c01..f67500b395d9022cd692858e0c5bbe9ebcaff171 100644
|
| --- a/chrome/test/webdriver/commands/window_commands.cc
|
| +++ b/chrome/test/webdriver/commands/window_commands.cc
|
| @@ -132,7 +132,7 @@ void WindowPositionCommand::ExecuteGet(Response* const response) {
|
| }
|
|
|
| void WindowPositionCommand::ExecutePost(Response* const response) {
|
| - // Path segment: "/session/$sessionId/window/$windowHandle/size"
|
| + // Path segment: "/session/$sessionId/window/$windowHandle/position"
|
| WebViewId window_id;
|
| WebViewId current_id = session_->current_target().view_id;
|
| if (!GetWindowId(GetPathVariable(4), current_id, &window_id, response))
|
| @@ -158,4 +158,31 @@ void WindowPositionCommand::ExecutePost(Response* const response) {
|
| }
|
| }
|
|
|
| +WindowMaximizeCommand::WindowMaximizeCommand(
|
| + const std::vector<std::string>& path_segments,
|
| + const base::DictionaryValue* parameters)
|
| + : WebDriverCommand(path_segments, parameters) {
|
| +}
|
| +
|
| +WindowMaximizeCommand::~WindowMaximizeCommand() {
|
| +}
|
| +
|
| +bool WindowMaximizeCommand::DoesPost() {
|
| + return true;
|
| +}
|
| +
|
| +void WindowMaximizeCommand::ExecutePost(Response* const response) {
|
| + // Path segment: "/session/$sessionId/window/$windowHandle/maximize"
|
| + WebViewId window_id;
|
| + WebViewId current_id = session_->current_target().view_id;
|
| + if (!GetWindowId(GetPathVariable(4), current_id, &window_id, response))
|
| + return;
|
| +
|
| + Error* error = session_->MaximizeWindow(window_id);
|
| + if (error) {
|
| + response->SetError(error);
|
| + return;
|
| + }
|
| +}
|
| +
|
| } // namespace webdriver
|
|
|