| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/commands/url_command.h" | 5 #include "chrome/test/webdriver/commands/url_command.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/test/webdriver/commands/response.h" | 9 #include "chrome/test/webdriver/commands/response.h" |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 SET_WEBDRIVER_ERROR(response, "URL field not found", kInternalServerError); | 42 SET_WEBDRIVER_ERROR(response, "URL field not found", kInternalServerError); |
| 43 return; | 43 return; |
| 44 } | 44 } |
| 45 // TODO(jmikhail): sniff for meta-redirects. | 45 // TODO(jmikhail): sniff for meta-redirects. |
| 46 if (!session_->NavigateToURL(url)) { | 46 if (!session_->NavigateToURL(url)) { |
| 47 SET_WEBDRIVER_ERROR(response, "NavigateToURL failed", | 47 SET_WEBDRIVER_ERROR(response, "NavigateToURL failed", |
| 48 kInternalServerError); | 48 kInternalServerError); |
| 49 return; | 49 return; |
| 50 } | 50 } |
| 51 | 51 |
| 52 session_->set_current_frame_xpath(""); | 52 session_->SetCurrentFrameXPath(""); |
| 53 response->SetValue(new StringValue(url)); | 53 response->SetValue(new StringValue(url)); |
| 54 response->SetStatus(kSuccess); | 54 response->SetStatus(kSuccess); |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool URLCommand::RequiresValidTab() { | 57 bool URLCommand::RequiresValidTab() { |
| 58 return true; | 58 return true; |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace webdriver | 61 } // namespace webdriver |
| OLD | NEW |