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

Side by Side Diff: remoting/host/chromoting_host_context_unittest.cc

Issue 7655006: Revert 97050 - Add PluginMessageLoopProxy and use it for Host plugin UI thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/chromoting_host_context.cc ('k') | remoting/host/chromoting_host_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/message_loop_proxy.h"
7 #include "remoting/host/chromoting_host_context.h" 6 #include "remoting/host/chromoting_host_context.h"
8 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
9 8
10 namespace remoting { 9 namespace remoting {
11 10
12 // A simple test that starts and stop the context. This tests the context 11 // A simple test that starts and stop the context. This tests the context
13 // operates properly and all threads and message loops are valid. 12 // operates properly and all threads and message loops are valid.
14 TEST(ChromotingHostContextTest, StartAndStop) { 13 TEST(ChromotingHostContextTest, StartAndStop) {
15 MessageLoop message_loop; 14 ChromotingHostContext context;
16 ChromotingHostContext context(
17 base::MessageLoopProxy::current());
18
19 context.Start(); 15 context.Start();
20 EXPECT_TRUE(context.jingle_thread()); 16 EXPECT_TRUE(context.jingle_thread());
21 EXPECT_TRUE(context.main_message_loop()); 17 EXPECT_TRUE(context.main_message_loop());
22 EXPECT_TRUE(context.encode_message_loop()); 18 EXPECT_TRUE(context.encode_message_loop());
23 context.Stop(); 19 context.Stop();
24 20
25 // Expect all the threads are stopped. 21 // Expect all the threads are stopped.
26 EXPECT_FALSE(context.main_thread_.IsRunning()); 22 EXPECT_FALSE(context.main_thread_.IsRunning());
27 EXPECT_FALSE(context.encode_thread_.IsRunning()); 23 EXPECT_FALSE(context.encode_thread_.IsRunning());
28 } 24 }
29 25
30 } // namespace remoting 26 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host_context.cc ('k') | remoting/host/chromoting_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698