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

Unified Diff: remoting/host/setup/native_messaging_host_unittest.cc

Issue 16236008: Send enums as strings between Chromoting Native Messaging host and web-app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/setup/native_messaging_host.cc ('k') | remoting/webapp/host_native_messaging.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/native_messaging_host_unittest.cc
diff --git a/remoting/host/setup/native_messaging_host_unittest.cc b/remoting/host/setup/native_messaging_host_unittest.cc
index f71fa3cb1d6a2c6363076fc7032277c9502d4fdc..ab68d3b68f98edd7aee58a78a25f610972ed39e3 100644
--- a/remoting/host/setup/native_messaging_host_unittest.cc
+++ b/remoting/host/setup/native_messaging_host_unittest.cc
@@ -85,9 +85,8 @@ void VerifyStopDaemonResponse(const base::DictionaryValue* response) {
std::string value;
EXPECT_TRUE(response->GetString("type", &value));
EXPECT_EQ("stopDaemonResponse", value);
- int result;
- EXPECT_TRUE(response->GetInteger("result", &result));
- EXPECT_EQ(0, result);
+ EXPECT_TRUE(response->GetString("result", &value));
+ EXPECT_EQ("OK", value);
}
void VerifyGetDaemonStateResponse(const base::DictionaryValue* response) {
@@ -95,9 +94,8 @@ void VerifyGetDaemonStateResponse(const base::DictionaryValue* response) {
std::string value;
EXPECT_TRUE(response->GetString("type", &value));
EXPECT_EQ("getDaemonStateResponse", value);
- int result;
- EXPECT_TRUE(response->GetInteger("state", &result));
- EXPECT_EQ(4, result);
+ EXPECT_TRUE(response->GetString("state", &value));
+ EXPECT_EQ("STARTED", value);
}
void VerifyUpdateDaemonConfigResponse(const base::DictionaryValue* response) {
@@ -105,9 +103,8 @@ void VerifyUpdateDaemonConfigResponse(const base::DictionaryValue* response) {
std::string value;
EXPECT_TRUE(response->GetString("type", &value));
EXPECT_EQ("updateDaemonConfigResponse", value);
- int result;
- EXPECT_TRUE(response->GetInteger("result", &result));
- EXPECT_EQ(0, result);
+ EXPECT_TRUE(response->GetString("result", &value));
+ EXPECT_EQ("OK", value);
}
void VerifyStartDaemonResponse(const base::DictionaryValue* response) {
@@ -115,9 +112,8 @@ void VerifyStartDaemonResponse(const base::DictionaryValue* response) {
std::string value;
EXPECT_TRUE(response->GetString("type", &value));
EXPECT_EQ("startDaemonResponse", value);
- int result;
- EXPECT_TRUE(response->GetInteger("result", &result));
- EXPECT_EQ(0, result);
+ EXPECT_TRUE(response->GetString("result", &value));
+ EXPECT_EQ("OK", value);
}
} // namespace
« no previous file with comments | « remoting/host/setup/native_messaging_host.cc ('k') | remoting/webapp/host_native_messaging.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698