Skip to content

Commit

Permalink
Use ScopedTaskEnvironment instead of MessageLoop in /skia/public/inte…
Browse files Browse the repository at this point in the history
…rfaces/test/struct_traits_unittest.cc

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=rsesek@chromium.org

Change-Id: I844b1fed4483730544c9b03cd319968fcefad3c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648200
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667639}
  • Loading branch information
carlscabgro authored and Commit Bot committed Jun 10, 2019
1 parent 567c35a commit c1c9a9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skia/public/interfaces/test/struct_traits_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/message_loop/message_loop.h"
#include "base/test/scoped_task_environment.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "skia/public/interfaces/test/traits_test_service.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down Expand Up @@ -46,7 +46,7 @@ class StructTraitsTest : public testing::Test, public mojom::TraitsTestService {
std::move(callback).Run(t);
}

base::MessageLoop loop_;
base::test::ScopedTaskEnvironment scoped_task_environment_;
mojo::BindingSet<TraitsTestService> traits_test_bindings_;

DISALLOW_COPY_AND_ASSIGN(StructTraitsTest);
Expand Down

0 comments on commit c1c9a9c

Please sign in to comment.