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

Side by Side Diff: chrome/renderer/media/cast_ipc_dispatcher_unittest.cc

Issue 1123733002: [chrome/renderer/media] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nit Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "base/test/simple_test_tick_clock.h" 6 #include "base/test/simple_test_tick_clock.h"
7 #include "base/thread_task_runner_handle.h"
7 #include "chrome/common/cast_messages.h" 8 #include "chrome/common/cast_messages.h"
8 #include "chrome/renderer/media/cast_ipc_dispatcher.h" 9 #include "chrome/renderer/media/cast_ipc_dispatcher.h"
9 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
10 #include "media/cast/logging/logging_defines.h" 11 #include "media/cast/logging/logging_defines.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 namespace { 14 namespace {
14 15
15 class CastIPCDispatcherTest : public testing::Test { 16 class CastIPCDispatcherTest : public testing::Test {
16 public: 17 public:
17 CastIPCDispatcherTest() { 18 CastIPCDispatcherTest() {
18 dispatcher_ = new CastIPCDispatcher(base::MessageLoopProxy::current()); 19 dispatcher_ = new CastIPCDispatcher(base::ThreadTaskRunnerHandle::Get());
19 } 20 }
20 21
21 protected: 22 protected:
22 void FakeSend(const IPC::Message& message) { 23 void FakeSend(const IPC::Message& message) {
23 EXPECT_TRUE(dispatcher_->OnMessageReceived(message)); 24 EXPECT_TRUE(dispatcher_->OnMessageReceived(message));
24 } 25 }
25 26
26 scoped_refptr<CastIPCDispatcher> dispatcher_; 27 scoped_refptr<CastIPCDispatcher> dispatcher_;
27 base::MessageLoopForIO message_loop_; 28 base::MessageLoopForIO message_loop_;
28 }; 29 };
(...skipping 22 matching lines...) Expand all
51 frame_events.push_back(frame_event); 52 frame_events.push_back(frame_event);
52 53
53 packet_events.push_back(packet_event); 54 packet_events.push_back(packet_event);
54 CastMsg_RawEvents raw_events_msg(kChannelId, packet_events, 55 CastMsg_RawEvents raw_events_msg(kChannelId, packet_events,
55 frame_events); 56 frame_events);
56 57
57 FakeSend(raw_events_msg); 58 FakeSend(raw_events_msg);
58 } 59 }
59 60
60 } // namespace 61 } // namespace
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_ipc_dispatcher.cc ('k') | chrome/renderer/media/cast_receiver_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698