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

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

Issue 6507015: Implement the target locator commands for ChromeDriver. (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 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 // Error message taken from: 9 // Error message taken from:
10 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#Response_Status_Codes 10 // http://code.google.com/p/selenium/wiki/JsonWireProtocol#Response_Status_Codes
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 bool Command::DoesPost() { 35 bool Command::DoesPost() {
36 return false; 36 return false;
37 } 37 }
38 38
39 bool Command::Init(Response* const response) { 39 bool Command::Init(Response* const response) {
40 return true; 40 return true;
41 } 41 }
42 42
43 bool Command::IsNullParameter(const std::string& key) const {
44 Value* value;
45 return parameters_.get() &&
46 parameters_->Get(key, &value) &&
47 value->IsType(Value::TYPE_NULL);
48 }
49
43 bool Command::GetStringParameter(const std::string& key, 50 bool Command::GetStringParameter(const std::string& key,
44 string16* out) const { 51 string16* out) const {
45 return parameters_.get() != NULL && parameters_->GetString(key, out); 52 return parameters_.get() != NULL && parameters_->GetString(key, out);
46 } 53 }
47 54
48 bool Command::GetStringParameter(const std::string& key, 55 bool Command::GetStringParameter(const std::string& key,
49 std::string* out) const { 56 std::string* out) const {
50 return parameters_.get() != NULL && parameters_->GetString(key, out); 57 return parameters_.get() != NULL && parameters_->GetString(key, out);
51 } 58 }
52 59
(...skipping 16 matching lines...) Expand all
69 DictionaryValue** out) const { 76 DictionaryValue** out) const {
70 return parameters_.get() != NULL && parameters_->GetDictionary(key, out); 77 return parameters_.get() != NULL && parameters_->GetDictionary(key, out);
71 } 78 }
72 79
73 bool Command::GetListParameter(const std::string& key, 80 bool Command::GetListParameter(const std::string& key,
74 ListValue** out) const { 81 ListValue** out) const {
75 return parameters_.get() != NULL && parameters_->GetList(key, out); 82 return parameters_.get() != NULL && parameters_->GetList(key, out);
76 } 83 }
77 84
78 } // namespace webdriver 85 } // namespace webdriver
79
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