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

Unified Diff: chrome/test/webdriver/commands/navigate_commands.cc

Issue 6523032: Even more test cleanup. Some fixes to non-test code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698