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

Side by Side Diff: chrome/test/chromedriver/status.h

Issue 11415205: [chromedriver] Implement connecting to devtools and loading a page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years 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/chromedriver/net/net_util_unittest.cc ('k') | chrome/test/chromedriver/status.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHROMEDRIVER_STATUS_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_STATUS_H_
6 #define CHROME_TEST_CHROMEDRIVER_STATUS_H_ 6 #define CHROME_TEST_CHROMEDRIVER_STATUS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 // WebDriver standard status codes. 10 // WebDriver standard status codes.
11 enum StatusCode { 11 enum StatusCode {
12 kOk = 0, 12 kOk = 0,
13 kUnknownCommand = 9, 13 kUnknownCommand = 9,
14 kUnknownError = 13, 14 kUnknownError = 13,
15 kSessionNotCreatedException = 33, 15 kSessionNotCreatedException = 33,
16 kNoSuchSession = 100 16 // Chrome-specific status codes.
17 kNoSuchSession = 100,
18 kChromeNotReachable,
17 }; 19 };
18 20
19 // Represents a WebDriver status, which may be an error or ok. 21 // Represents a WebDriver status, which may be an error or ok.
20 class Status { 22 class Status {
21 public: 23 public:
22 explicit Status(StatusCode code); 24 explicit Status(StatusCode code);
23 Status(StatusCode code, const std::string& details); 25 Status(StatusCode code, const std::string& details);
26 Status(StatusCode code, const Status& cause);
27 Status(StatusCode code, const std::string& details, const Status& cause);
28 ~Status();
24 29
25 bool IsOk() const; 30 bool IsOk() const;
26 bool IsError() const; 31 bool IsError() const;
27 32
28 StatusCode code() const; 33 StatusCode code() const;
29 34
30 const std::string& message() const; 35 const std::string& message() const;
31 36
32 private: 37 private:
33 StatusCode code_; 38 StatusCode code_;
34 std::string msg_; 39 std::string msg_;
35 }; 40 };
36 41
37 #endif // CHROME_TEST_CHROMEDRIVER_STATUS_H_ 42 #endif // CHROME_TEST_CHROMEDRIVER_STATUS_H_
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/net/net_util_unittest.cc ('k') | chrome/test/chromedriver/status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698