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

Unified Diff: chrome/test/chromedriver/status.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/chromedriver/status.h ('k') | chrome/test/chromedriver/status_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/status.cc
diff --git a/chrome/test/chromedriver/status.cc b/chrome/test/chromedriver/status.cc
index bd5027952730113170b963a3c136c717b6770c5a..89dc7e9184885f08555e997268f0885ea21ee557 100644
--- a/chrome/test/chromedriver/status.cc
+++ b/chrome/test/chromedriver/status.cc
@@ -19,6 +19,8 @@ const char* DefaultMessageForStatusCode(StatusCode code) {
return "session not created exception";
case kNoSuchSession:
return "no such session";
+ case kChromeNotReachable:
+ return "chrome not reachable";
default:
return "<unknown>";
}
@@ -34,6 +36,21 @@ Status::Status(StatusCode code, const std::string& details)
msg_(DefaultMessageForStatusCode(code) + std::string(": ") + details) {
}
+Status::Status(StatusCode code, const Status& cause)
+ : code_(code),
+ msg_(DefaultMessageForStatusCode(code) + std::string("\nfrom ") +
+ cause.message()) {}
+
+Status::Status(StatusCode code,
+ const std::string& details,
+ const Status& cause)
+ : code_(code),
+ msg_(DefaultMessageForStatusCode(code) + std::string(": ") + details +
+ "\nfrom " + cause.message()) {
+}
+
+Status::~Status() {}
+
bool Status::IsOk() const {
return code_ == kOk;
}
« no previous file with comments | « chrome/test/chromedriver/status.h ('k') | chrome/test/chromedriver/status_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698