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

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

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
« no previous file with comments | « chrome/test/webdriver/automation.cc ('k') | chrome/test/webdriver/commands/command.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 protected: 48 protected:
49 49
50 // Returns the path variable encoded at the |i|th index (0-based) in the 50 // Returns the path variable encoded at the |i|th index (0-based) in the
51 // request URL for this command. If the index is out of bounds, an empty 51 // request URL for this command. If the index is out of bounds, an empty
52 // string will be returned. 52 // string will be returned.
53 inline std::string GetPathVariable(const size_t i) const { 53 inline std::string GetPathVariable(const size_t i) const {
54 return i < path_segments_.size() ? path_segments_.at(i) : ""; 54 return i < path_segments_.size() ? path_segments_.at(i) : "";
55 } 55 }
56 56
57 // Provides the command parameter with the given |key| as a UTF-16 string. 57 // Returns true if the command parameter with the given |key| exists and is
58 // a null value.
59 bool IsNullParameter(const std::string& key) const;
60
61 // Returns the command parameter with the given |key| as a UTF-16 string.
58 // Returns true on success. 62 // Returns true on success.
59 bool GetStringParameter(const std::string& key, string16* out) const; 63 bool GetStringParameter(const std::string& key, string16* out) const;
60 64
61 // Provides the command parameter with the given |key| as a UTF-8 string. 65 // Provides the command parameter with the given |key| as a UTF-8 string.
62 // Returns true on success. 66 // Returns true on success.
63 bool GetStringParameter(const std::string& key, std::string* out) const; 67 bool GetStringParameter(const std::string& key, std::string* out) const;
64 68
65 // Provides the command parameter with the given |key| as a ASCII string. 69 // Provides the command parameter with the given |key| as a ASCII string.
66 // Returns true on success. 70 // Returns true on success.
67 bool GetStringASCIIParameter(const std::string& key, std::string* out) const; 71 bool GetStringASCIIParameter(const std::string& key, std::string* out) const;
(...skipping 25 matching lines...) Expand all
93 // is printed for every object deallocted. Since every incomming command to 97 // is printed for every object deallocted. Since every incomming command to
94 // chrome driver is allocated a new thread, the release pool is declared here. 98 // chrome driver is allocated a new thread, the release pool is declared here.
95 base::mac::ScopedNSAutoreleasePool autorelease_pool; 99 base::mac::ScopedNSAutoreleasePool autorelease_pool;
96 100
97 DISALLOW_COPY_AND_ASSIGN(Command); 101 DISALLOW_COPY_AND_ASSIGN(Command);
98 }; 102 };
99 103
100 } // namespace webdriver 104 } // namespace webdriver
101 105
102 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_ 106 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_
103
OLDNEW
« no previous file with comments | « chrome/test/webdriver/automation.cc ('k') | chrome/test/webdriver/commands/command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698