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

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

Issue 6482014: Implement sendKeys webdriver API in ChromeDriver. (Closed) Base URL: svn://chrome-svn/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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_ 5 #ifndef CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_
6 #define CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_ 6 #define CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 bool GetStringASCIIParameter(const std::string& key, std::string* out) const; 69 bool GetStringASCIIParameter(const std::string& key, std::string* out) const;
70 70
71 // Returns the command parameter with the given |key| as a boolean. Returns 71 // Returns the command parameter with the given |key| as a boolean. Returns
72 // false if there is no such parameter, or if it is not a boolean. 72 // false if there is no such parameter, or if it is not a boolean.
73 bool GetBooleanParameter(const std::string& key, bool* out) const; 73 bool GetBooleanParameter(const std::string& key, bool* out) const;
74 74
75 // Returns the command parameter with the given |key| as a int. Returns 75 // Returns the command parameter with the given |key| as a int. Returns
76 // false if there is no such parameter, or if it is not a int. 76 // false if there is no such parameter, or if it is not a int.
77 bool GetIntegerParameter(const std::string& key, int* out) const; 77 bool GetIntegerParameter(const std::string& key, int* out) const;
78 78
79 // Returns the command parameter with the given |key| as a list. Returns
80 // false if there is no such parameter, or if it is not a list.
81 bool GetListParameter(const std::string& key, ListValue** out) const;
82
79 private: 83 private:
80 const std::vector<std::string> path_segments_; 84 const std::vector<std::string> path_segments_;
81 const scoped_ptr<const DictionaryValue> parameters_; 85 const scoped_ptr<const DictionaryValue> parameters_;
82 86
83 // An autorelease pool must exist on any thread where Objective C is used, 87 // An autorelease pool must exist on any thread where Objective C is used,
84 // even implicitly. Otherwise the warning: 88 // even implicitly. Otherwise the warning:
85 // "Objects autoreleased with no pool in place." 89 // "Objects autoreleased with no pool in place."
86 // is printed for every object deallocted. Since every incomming command to 90 // is printed for every object deallocted. Since every incomming command to
87 // chrome driver is allocated a new thread, the release pool is declared here. 91 // chrome driver is allocated a new thread, the release pool is declared here.
88 base::mac::ScopedNSAutoreleasePool autorelease_pool; 92 base::mac::ScopedNSAutoreleasePool autorelease_pool;
89 93
90 DISALLOW_COPY_AND_ASSIGN(Command); 94 DISALLOW_COPY_AND_ASSIGN(Command);
91 }; 95 };
92 96
93 } // namespace webdriver 97 } // namespace webdriver
94 98
95 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_ 99 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_
96 100
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698