| OLD | NEW |
| 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 #include "chrome/test/chromedriver/status.h" | 5 #include "chrome/test/chromedriver/status.h" |
| 6 | 6 |
| 7 namespace { | 7 namespace { |
| 8 | 8 |
| 9 // Returns the string equivalent of the given |ErrorCode|. | 9 // Returns the string equivalent of the given |ErrorCode|. |
| 10 const char* DefaultMessageForStatusCode(StatusCode code) { | 10 const char* DefaultMessageForStatusCode(StatusCode code) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 case kUnknownError: | 24 case kUnknownError: |
| 25 return "unknown error"; | 25 return "unknown error"; |
| 26 case kXPathLookupError: | 26 case kXPathLookupError: |
| 27 return "xpath lookup error"; | 27 return "xpath lookup error"; |
| 28 case kInvalidSelector: | 28 case kInvalidSelector: |
| 29 return "invalid selector"; | 29 return "invalid selector"; |
| 30 case kSessionNotCreatedException: | 30 case kSessionNotCreatedException: |
| 31 return "session not created exception"; | 31 return "session not created exception"; |
| 32 case kNoSuchSession: | 32 case kNoSuchSession: |
| 33 return "no such session"; | 33 return "no such session"; |
| 34 case kNoSuchFrame: |
| 35 return "no such frame"; |
| 34 case kChromeNotReachable: | 36 case kChromeNotReachable: |
| 35 return "chrome not reachable"; | 37 return "chrome not reachable"; |
| 36 case kDisconnected: | 38 case kDisconnected: |
| 37 return "disconnected"; | 39 return "disconnected"; |
| 38 default: | 40 default: |
| 39 return "<unknown>"; | 41 return "<unknown>"; |
| 40 } | 42 } |
| 41 } | 43 } |
| 42 | 44 |
| 43 } // namespace | 45 } // namespace |
| (...skipping 29 matching lines...) Expand all Loading... |
| 73 return code_ != kOk; | 75 return code_ != kOk; |
| 74 } | 76 } |
| 75 | 77 |
| 76 StatusCode Status::code() const { | 78 StatusCode Status::code() const { |
| 77 return code_; | 79 return code_; |
| 78 } | 80 } |
| 79 | 81 |
| 80 const std::string& Status::message() const { | 82 const std::string& Status::message() const { |
| 81 return msg_; | 83 return msg_; |
| 82 } | 84 } |
| OLD | NEW |