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

Unified Diff: remoting/host/chromoting_host_context_unittest.cc

Issue 11419265: Revert 170360 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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/chromoting_host_unittest.cc » ('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
===================================================================
--- remoting/host/chromoting_host_context_unittest.cc (revision 170590)
+++ remoting/host/chromoting_host_context_unittest.cc (working copy)
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/message_loop.h"
-#include "base/run_loop.h"
+#include "base/message_loop_proxy.h"
#include "remoting/base/auto_thread_task_runner.h"
#include "remoting/host/chromoting_host_context.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -14,25 +14,17 @@
// operates properly and all threads and message loops are valid.
TEST(ChromotingHostContextTest, StartAndStop) {
MessageLoopForUI message_loop;
- base::RunLoop run_loop;
+ ChromotingHostContext context(new AutoThreadTaskRunner(
+ base::MessageLoopProxy::current()));
- scoped_ptr<ChromotingHostContext> context =
- ChromotingHostContext::Create(new AutoThreadTaskRunner(
- message_loop.message_loop_proxy(), run_loop.QuitClosure()));
-
- EXPECT_TRUE(context);
- if (!context)
- return;
- EXPECT_TRUE(context->audio_task_runner());
- EXPECT_TRUE(context->video_capture_task_runner());
- EXPECT_TRUE(context->video_encode_task_runner());
- EXPECT_TRUE(context->file_task_runner());
- EXPECT_TRUE(context->input_task_runner());
- EXPECT_TRUE(context->network_task_runner());
- EXPECT_TRUE(context->ui_task_runner());
-
- context.reset();
- run_loop.Run();
+ context.Start();
+ EXPECT_TRUE(context.audio_task_runner());
+ EXPECT_TRUE(context.video_capture_task_runner());
+ EXPECT_TRUE(context.video_encode_task_runner());
+ EXPECT_TRUE(context.file_task_runner());
+ EXPECT_TRUE(context.input_task_runner());
+ EXPECT_TRUE(context.network_task_runner());
+ EXPECT_TRUE(context.ui_task_runner());
}
} // namespace remoting
« 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