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

Side by Side Diff: chrome/test/webdriver/commands/command.cc

Issue 5572001: Send screenshots back to the client for debugging (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: need to push again to make sure rietveld didn't screw up Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command.h" 5 #include "chrome/test/webdriver/commands/command.h"
6 6
7 namespace webdriver { 7 namespace webdriver {
8 8
9 Command::Command(const std::vector<std::string>& path_segments, 9 Command::Command(const std::vector<std::string>& path_segments,
10 const DictionaryValue* const parameters) 10 const DictionaryValue* const parameters)
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 bool Command::DoesPost() { 24 bool Command::DoesPost() {
25 return false; 25 return false;
26 } 26 }
27 27
28 bool Command::Init(Response* const response) { 28 bool Command::Init(Response* const response) {
29 return true; 29 return true;
30 } 30 }
31 31
32 std::string Command::GetPathVariable(const size_t i) const {
33 return i < path_segments_.size() ? path_segments_.at(i) : "";
34 }
35
32 bool Command::HasParameter(const std::string& key) const { 36 bool Command::HasParameter(const std::string& key) const {
33 return parameters_.get() && parameters_->HasKey(key); 37 return parameters_.get() && parameters_->HasKey(key);
34 } 38 }
35 39
36 bool Command::IsNullParameter(const std::string& key) const { 40 bool Command::IsNullParameter(const std::string& key) const {
37 Value* value; 41 Value* value;
38 return parameters_.get() && 42 return parameters_.get() &&
39 parameters_->Get(key, &value) && 43 parameters_->Get(key, &value) &&
40 value->IsType(Value::TYPE_NULL); 44 value->IsType(Value::TYPE_NULL);
41 } 45 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 DictionaryValue** out) const { 77 DictionaryValue** out) const {
74 return parameters_.get() != NULL && parameters_->GetDictionary(key, out); 78 return parameters_.get() != NULL && parameters_->GetDictionary(key, out);
75 } 79 }
76 80
77 bool Command::GetListParameter(const std::string& key, 81 bool Command::GetListParameter(const std::string& key,
78 ListValue** out) const { 82 ListValue** out) const {
79 return parameters_.get() != NULL && parameters_->GetList(key, out); 83 return parameters_.get() != NULL && parameters_->GetList(key, out);
80 } 84 }
81 85
82 } // namespace webdriver 86 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/commands/command.h ('k') | chrome/test/webdriver/commands/create_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698