Commit fe294966 authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Remove references of MessageLoopForIO in /chrome/renderer/media/cast_ipc_dispatcher_unittest.cc

MessageLoopForIO will go away soon use ScopedTaskEnvironment instead.

ScopedTaskEnvironment will per default start a ThreadPool, which should
be fine in most of the cases. If you believe your test needs to make sure
that no ThreadPool runs let me know and I will update the patch.

BUG=891670
This CL was uploaded by git cl split.

R=miu@chromium.org

Change-Id: I692e8ce91f43e17c5d0ad58dc1b194145490a4d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1733613
Commit-Queue: Carlos Caballero <carlscab@google.com>
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarYuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683976}
parent f8496cf4
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "base/message_loop/message_loop.h" #include "chrome/renderer/media/cast_ipc_dispatcher.h"
#include "base/test/scoped_task_environment.h"
#include "base/test/simple_test_tick_clock.h" #include "base/test/simple_test_tick_clock.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "chrome/common/cast_messages.h" #include "chrome/common/cast_messages.h"
#include "chrome/renderer/media/cast_ipc_dispatcher.h"
#include "ipc/ipc_message_macros.h" #include "ipc/ipc_message_macros.h"
#include "media/cast/logging/logging_defines.h" #include "media/cast/logging/logging_defines.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -25,7 +26,8 @@ class CastIPCDispatcherTest : public testing::Test { ...@@ -25,7 +26,8 @@ class CastIPCDispatcherTest : public testing::Test {
} }
scoped_refptr<CastIPCDispatcher> dispatcher_; scoped_refptr<CastIPCDispatcher> dispatcher_;
base::MessageLoopForIO message_loop_; base::test::ScopedTaskEnvironment scoped_task_environment_{
base::test::ScopedTaskEnvironment::MainThreadType::IO};
}; };
TEST_F(CastIPCDispatcherTest, RawEvents) { TEST_F(CastIPCDispatcherTest, RawEvents) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment