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

Unified Diff: chrome/test/webdriver/commands/speed_command.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/speed_command.cc
diff --git a/chrome/test/webdriver/commands/speed_command.cc b/chrome/test/webdriver/commands/speed_command.cc
index e09602d3c8068dceed244a15c8922f2de0144ce2..95b4abdc3f8d447fd84b0173e8446a2237918582 100644
--- a/chrome/test/webdriver/commands/speed_command.cc
+++ b/chrome/test/webdriver/commands/speed_command.cc
@@ -9,6 +9,14 @@
namespace webdriver {
+SpeedCommand::SpeedCommand(const std::vector<std::string>& path_segments,
+ const DictionaryValue* const parameters)
+ : WebDriverCommand(path_segments, parameters),
+ speed_(Session::kMedium) {
+}
+
+SpeedCommand::~SpeedCommand() {}
+
bool SpeedCommand::Init(Response* const response) {
std::string speed;
@@ -44,6 +52,14 @@ bool SpeedCommand::Init(Response* const response) {
return true;
}
+bool SpeedCommand::DoesGet() {
+ return true;
+}
+
+bool SpeedCommand::DoesPost() {
+ return true;
+}
+
void SpeedCommand::ExecuteGet(Response* const response) {
switch (session_->speed()) {
case Session::kSlow:
@@ -82,5 +98,9 @@ void SpeedCommand::ExecutePost(Response* const response) {
response->set_status(kSuccess);
}
+bool SpeedCommand::RequiresValidTab() {
+ return true;
+}
+
} // namespace webdriver

Powered by Google App Engine
This is Rietveld 408576698