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

Unified Diff: remoting/host/chromoting_host_context_unittest.cc

Issue 2829018: Fix thread usage in chromoting host (Closed)
Patch Set: removed useless test Created 10 years, 6 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/chromoting_host_context.cc ('k') | remoting/host/client_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host_context_unittest.cc
diff --git a/remoting/host/chromoting_host_context_unittest.cc b/remoting/host/chromoting_host_context_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6b481d7a18cbc79f5c015a7f7f4a63cc8cc20dfc
--- /dev/null
+++ b/remoting/host/chromoting_host_context_unittest.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/message_loop.h"
+#include "remoting/host/chromoting_host_context.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace remoting {
+
+// A simple test that starts and stop the context. This tests the context
+// operates properly and all threads and message loops are valid.
+TEST(ChromotingHostContextTest, StartAndStop) {
+ ChromotingHostContext context;
+ context.Start();
+ EXPECT_TRUE(context.jingle_thread());
+ EXPECT_TRUE(context.main_message_loop());
+ EXPECT_TRUE(context.capture_message_loop());
+ EXPECT_TRUE(context.encode_message_loop());
+ context.Stop();
+
+ // Expect all the threads are stopped.
+ EXPECT_FALSE(context.main_thread_.IsRunning());
+ EXPECT_FALSE(context.capture_thread_.IsRunning());
+ EXPECT_FALSE(context.encode_thread_.IsRunning());
+}
+
+} // namespace remoting
« no previous file with comments | « remoting/host/chromoting_host_context.cc ('k') | remoting/host/client_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698