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

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

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
« no previous file with comments | « chrome/test/webdriver/chromedriver_tests.py ('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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Any failure is handled as a return code found in Response. 42 // Any failure is handled as a return code found in Response.
43 virtual void ExecuteDelete(Response* const response) {} 43 virtual void ExecuteDelete(Response* const response) {}
44 virtual void ExecuteGet(Response* const response) {} 44 virtual void ExecuteGet(Response* const response) {}
45 virtual void ExecutePost(Response* const response) {} 45 virtual void ExecutePost(Response* const response) {}
46 46
47 protected: 47 protected:
48 48
49 // Returns the path variable encoded at the |i|th index (0-based) in the 49 // Returns the path variable encoded at the |i|th index (0-based) in the
50 // request URL for this command. If the index is out of bounds, an empty 50 // request URL for this command. If the index is out of bounds, an empty
51 // string will be returned. 51 // string will be returned.
52 inline std::string GetPathVariable(const size_t i) const { 52 std::string GetPathVariable(const size_t i) const;
53 return i < path_segments_.size() ? path_segments_.at(i) : "";
54 }
55 53
56 // Returns whether the command has a parameter with the given |key|. 54 // Returns whether the command has a parameter with the given |key|.
57 bool HasParameter(const std::string& key) const; 55 bool HasParameter(const std::string& key) const;
58 56
59 // Returns true if the command parameter with the given |key| exists and is 57 // Returns true if the command parameter with the given |key| exists and is
60 // a null value. 58 // a null value.
61 bool IsNullParameter(const std::string& key) const; 59 bool IsNullParameter(const std::string& key) const;
62 60
63 // Returns the command parameter with the given |key| as a UTF-16 string. 61 // Returns the command parameter with the given |key| as a UTF-16 string.
64 // Returns true on success. 62 // Returns true on success.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // is printed for every object deallocted. Since every incomming command to 101 // is printed for every object deallocted. Since every incomming command to
104 // chrome driver is allocated a new thread, the release pool is declared here. 102 // chrome driver is allocated a new thread, the release pool is declared here.
105 base::mac::ScopedNSAutoreleasePool autorelease_pool; 103 base::mac::ScopedNSAutoreleasePool autorelease_pool;
106 104
107 DISALLOW_COPY_AND_ASSIGN(Command); 105 DISALLOW_COPY_AND_ASSIGN(Command);
108 }; 106 };
109 107
110 } // namespace webdriver 108 } // namespace webdriver
111 109
112 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_ 110 #endif // CHROME_TEST_WEBDRIVER_COMMANDS_COMMAND_H_
OLDNEW
« no previous file with comments | « chrome/test/webdriver/chromedriver_tests.py ('k') | chrome/test/webdriver/commands/command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698