Skip to content

Commit

Permalink
Remove MessageLoop references in /cc
Browse files Browse the repository at this point in the history
MessageLoop is going away soon.

This CL was uploaded by git cl split.

R=samans@chromium.org

Bug: 891670
Change-Id: I15740af265a11a121228c63c6cca39541fcc6ed5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1946228
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: Saman Sami <samans@chromium.org>
Commit-Queue: Carlos Caballero <carlscab@google.com>
Cr-Commit-Position: refs/heads/master@{#720833}
  • Loading branch information
carlscabgro authored and Commit Bot committed Dec 3, 2019
1 parent c4c3bb0 commit 1f50033
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions cc/test/cc_test_suite.cc
Expand Up @@ -5,7 +5,7 @@
#include "cc/test/cc_test_suite.h"

#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
#include "base/test/task_environment.h"
#include "base/threading/thread_id_name_manager.h"
#include "cc/base/histograms.h"
#include "components/viz/test/paths.h"
Expand All @@ -21,7 +21,8 @@ CCTestSuite::~CCTestSuite() = default;

void CCTestSuite::Initialize() {
base::TestSuite::Initialize();
message_loop_ = std::make_unique<base::MessageLoop>();
task_environment_ =
std::make_unique<base::test::SingleThreadTaskEnvironment>();

gl::GLSurfaceTestSupport::InitializeOneOff();

Expand All @@ -35,7 +36,7 @@ void CCTestSuite::Initialize() {
}

void CCTestSuite::Shutdown() {
message_loop_ = nullptr;
task_environment_ = nullptr;

base::TestSuite::Shutdown();
}
Expand Down
6 changes: 4 additions & 2 deletions cc/test/cc_test_suite.h
Expand Up @@ -11,8 +11,10 @@
#include "base/test/test_suite.h"

namespace base {
class MessageLoop;
namespace test {
class SingleThreadTaskEnvironment;
}
} // namespace base

namespace cc {

Expand All @@ -30,7 +32,7 @@ class CCTestSuite : public base::TestSuite {
void Shutdown() override;

private:
std::unique_ptr<base::MessageLoop> message_loop_;
std::unique_ptr<base::test::SingleThreadTaskEnvironment> task_environment_;

base::TestDiscardableMemoryAllocator discardable_memory_allocator_;
};
Expand Down

0 comments on commit 1f50033

Please sign in to comment.