| Index: chrome/test/webdriver/commands/navigate_commands.cc
|
| diff --git a/chrome/test/webdriver/commands/navigate_commands.cc b/chrome/test/webdriver/commands/navigate_commands.cc
|
| index 7fbb54fa27b313f1919b648f5804feae5a76c9e0..75f9a1afe851adc0d281b1849f49952ca74fd335 100644
|
| --- a/chrome/test/webdriver/commands/navigate_commands.cc
|
| +++ b/chrome/test/webdriver/commands/navigate_commands.cc
|
| @@ -6,6 +6,16 @@
|
|
|
| namespace webdriver {
|
|
|
| +ForwardCommand::ForwardCommand(const std::vector<std::string>& path_segments,
|
| + const DictionaryValue* const parameters)
|
| + : WebDriverCommand(path_segments, parameters) {}
|
| +
|
| +ForwardCommand::~ForwardCommand() {}
|
| +
|
| +bool ForwardCommand::DoesPost() {
|
| + return true;
|
| +}
|
| +
|
| void ForwardCommand::ExecutePost(Response* const response) {
|
| if (!session_->GoForward()) {
|
| SET_WEBDRIVER_ERROR(response, "GoForward failed", kInternalServerError);
|
| @@ -16,6 +26,20 @@ void ForwardCommand::ExecutePost(Response* const response) {
|
| response->set_status(kSuccess);
|
| }
|
|
|
| +bool ForwardCommand::RequiresValidTab() {
|
| + return true;
|
| +}
|
| +
|
| +BackCommand::BackCommand(const std::vector<std::string>& path_segments,
|
| + const DictionaryValue* const parameters)
|
| + : WebDriverCommand(path_segments, parameters) {}
|
| +
|
| +BackCommand::~BackCommand() {}
|
| +
|
| +bool BackCommand::DoesPost() {
|
| + return true;
|
| +}
|
| +
|
| void BackCommand::ExecutePost(Response* const response) {
|
| if (!session_->GoBack()) {
|
| SET_WEBDRIVER_ERROR(response, "GoBack failed", kInternalServerError);
|
| @@ -26,6 +50,20 @@ void BackCommand::ExecutePost(Response* const response) {
|
| response->set_status(kSuccess);
|
| }
|
|
|
| +bool BackCommand::RequiresValidTab() {
|
| + return true;
|
| +}
|
| +
|
| +RefreshCommand::RefreshCommand(const std::vector<std::string>& path_segments,
|
| + const DictionaryValue* const parameters)
|
| + : WebDriverCommand(path_segments, parameters) {}
|
| +
|
| +RefreshCommand::~RefreshCommand() {}
|
| +
|
| +bool RefreshCommand::DoesPost() {
|
| + return true;
|
| +}
|
| +
|
| void RefreshCommand::ExecutePost(Response* const response) {
|
| if (!session_->Reload()) {
|
| SET_WEBDRIVER_ERROR(response, "Reload failed", kInternalServerError);
|
| @@ -36,4 +74,8 @@ void RefreshCommand::ExecutePost(Response* const response) {
|
| response->set_status(kSuccess);
|
| }
|
|
|
| +bool RefreshCommand::RequiresValidTab() {
|
| + return true;
|
| +}
|
| +
|
| } // namespace webdriver
|
|
|