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

Unified Diff: remoting/host/host_session_options_unittest.cc

Issue 2858813002: [Chromoting] Use ProcessStatsSender in host process
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/host_session_options.cc ('k') | remoting/host/process_stats_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_session_options_unittest.cc
diff --git a/remoting/host/host_session_options_unittest.cc b/remoting/host/host_session_options_unittest.cc
index 1c7195bc5f67aea189e9b3db20ba6e8624bec5e2..34948b236199ae9bfcee4b3c07b348e24cca4dd0 100644
--- a/remoting/host/host_session_options_unittest.cc
+++ b/remoting/host/host_session_options_unittest.cc
@@ -51,4 +51,25 @@ TEST(HostSessionOptionsTest, ImportAndExport) {
ASSERT_EQ(options.Export(), other.Export());
}
+TEST(HostSessionOptionsTest, ShouldBeAbleToGetBool) {
+ HostSessionOptions options;
+ options.Import("A:,B:x,C:true,D:TRUE,E:1,F:2");
+ ASSERT_TRUE(*options.GetBool("A"));
+ ASSERT_FALSE(*options.GetBool("B"));
+ ASSERT_TRUE(*options.GetBool("C"));
+ ASSERT_TRUE(*options.GetBool("D"));
+ ASSERT_TRUE(*options.GetBool("E"));
+ ASSERT_FALSE(*options.GetBool("F"));
+ ASSERT_FALSE(options.GetBool("G"));
+}
+
+TEST(HostSessionOptionsTest, ShouldBeAbleToGetInt) {
+ HostSessionOptions options;
+ options.Import("A:100,B:-200,C:x,D:");
+ ASSERT_EQ(*options.GetInt("A"), 100);
+ ASSERT_EQ(*options.GetInt("B"), -200);
+ ASSERT_FALSE(options.GetInt("C"));
+ ASSERT_FALSE(options.GetInt("D"));
+}
+
} // namespace remoting
« no previous file with comments | « remoting/host/host_session_options.cc ('k') | remoting/host/process_stats_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698