Skip to content

Commit

Permalink
Stop Using MessageLoopProxy in Test Since It's Deprecated
Browse files Browse the repository at this point in the history
Fix a recent use of MessageLoopProxy in test.

BUG=

Review URL: https://codereview.chromium.org/1063823007

Cr-Commit-Position: refs/heads/master@{#326365}
  • Loading branch information
weiliangc authored and Commit bot committed Apr 22, 2015
1 parent 7ccb4b4 commit 24688c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/compositor/compositor_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// 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_proxy.h"
#include "base/run_loop.h"
#include "base/thread_task_runner_handle.h"
#include "cc/output/begin_frame_args.h"
#include "cc/test/begin_frame_args_test.h"
#include "testing/gmock/include/gmock/gmock.h"
Expand All @@ -30,7 +30,7 @@ class CompositorTest : public testing::Test {
~CompositorTest() override {}

void SetUp() override {
task_runner_ = base::MessageLoopProxy::current();
task_runner_ = base::ThreadTaskRunnerHandle::Get();

ui::ContextFactory* context_factory =
ui::InitializeContextFactoryForTests(false);
Expand All @@ -44,11 +44,11 @@ class CompositorTest : public testing::Test {
}

protected:
base::MessageLoopProxy* task_runner() { return task_runner_.get(); }
base::SingleThreadTaskRunner* task_runner() { return task_runner_.get(); }
ui::Compositor* compositor() { return compositor_.get(); }

private:
scoped_refptr<base::MessageLoopProxy> task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
scoped_ptr<ui::Compositor> compositor_;

DISALLOW_COPY_AND_ASSIGN(CompositorTest);
Expand Down

0 comments on commit 24688c6

Please sign in to comment.