Commit 25abf646 authored by Carlos Caballero's avatar Carlos Caballero Committed by Commit Bot

Use ScopedTaskEnvironment instead of MessageLoop in /third_party/blink/renderer/platform

MessageLoop will go away, eventually.

ScopedTaskEnvironment will per default start a ThreadPool, which should
be fine in most of the cases. If you belive 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=fmalita@chromium.org

Change-Id: I19a8495c4050395219665057dd6013ec0112b643
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649327
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: default avatarFlorin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667125}
parent e8c722f7
......@@ -7,9 +7,9 @@
#include "base/bind.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/test/bind_test_util.h"
#include "base/test/scoped_task_environment.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/interface_ptr.h"
#include "mojo/public/interfaces/bindings/tests/ping_service.mojom-blink.h"
......@@ -97,7 +97,7 @@ class InterfaceInvalidatorTest : public testing::Test {
~InterfaceInvalidatorTest() override {}
private:
base::MessageLoop message_loop_;
base::test::ScopedTaskEnvironment scoped_task_environment_;
DISALLOW_COPY_AND_ASSIGN(InterfaceInvalidatorTest);
};
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/test/scoped_task_environment.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/mojom/url_test.mojom-blink.h"
......@@ -35,7 +35,7 @@ class UrlTestImpl : public url::mojom::blink::UrlTest {
// Mojo version of chrome IPC test in url/ipc/url_param_traits_unittest.cc.
TEST(KURLSecurityOriginStructTraitsTest, Basic) {
base::MessageLoop message_loop;
base::test::ScopedTaskEnvironment scoped_task_environment;
url::mojom::blink::UrlTestPtr proxy;
UrlTestImpl impl(MakeRequest(&proxy));
......
......@@ -6,8 +6,8 @@
#include <memory>
#include <queue>
#include "base/message_loop/message_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/test/scoped_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/platform.h"
......@@ -83,7 +83,7 @@ class TimerTest : public testing::Test {
platform_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
base::MessageLoop message_loop_;
base::test::ScopedTaskEnvironment scoped_task_environment_;
};
class OnHeapTimerOwner final
......
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