| Index: cc/trees/threaded_channel_unittest.cc
|
| diff --git a/cc/trees/threaded_channel_unittest.cc b/cc/trees/threaded_channel_unittest.cc
|
| index 17350d8444b7c64cb111bd9dae8ae84f2ad8b423..152ff59bebbfb03b42006881d6ae9506afaf4304 100644
|
| --- a/cc/trees/threaded_channel_unittest.cc
|
| +++ b/cc/trees/threaded_channel_unittest.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -13,12 +13,13 @@
|
| // The ThreadedChannel tests are run only for threaded and direct mode.
|
| class ThreadedChannelTest : public LayerTreeTest {
|
| protected:
|
| - ThreadedChannelTest() : calls_received_(0) {}
|
| + ThreadedChannelTest() : thread_proxy_(nullptr), calls_received_(0) {}
|
|
|
| ~ThreadedChannelTest() override {}
|
|
|
| void BeginTest() override {
|
| DCHECK(HasImplThread());
|
| + thread_proxy_ = static_cast<ThreadProxy*>(proxy());
|
| BeginChannelTest();
|
| };
|
| virtual void BeginChannelTest() {}
|
| @@ -35,6 +36,9 @@
|
|
|
| void AfterTest() override {}
|
|
|
| + // TODO(khushalsagar): Remove this once ProxyImpl is added to the
|
| + // LayerTreeTest.
|
| + ThreadProxy* thread_proxy_;
|
| int calls_received_;
|
|
|
| private:
|
| @@ -43,6 +47,8 @@
|
|
|
| class ThreadedChannelTestInitializationAndShutdown
|
| : public ThreadedChannelTest {
|
| + void InitializeImplOnImpl() override { calls_received_++; }
|
| +
|
| void SetVisibleOnImpl(bool visible) override { calls_received_++; }
|
|
|
| void ReceivedRequestNewOutputSurface() override { calls_received_++; }
|
| @@ -63,9 +69,10 @@
|
| EndTest();
|
| }
|
|
|
| + void WillCloseLayerTreeHostOnImpl() override { calls_received_++; }
|
| void FinishGLOnImpl() override { calls_received_++; }
|
|
|
| - void AfterTest() override { EXPECT_EQ(6, calls_received_); }
|
| + void AfterTest() override { EXPECT_EQ(8, calls_received_); }
|
| };
|
|
|
| MULTI_THREAD_DIRECT_RENDERER_TEST_F(
|
| @@ -239,7 +246,7 @@
|
| void BeginChannelTest() override { PostOnImplThread(); }
|
|
|
| void StartTestOnImplThread() override {
|
| - GetProxyImplForTest()->SendBeginMainFrameNotExpectedSoon();
|
| + thread_proxy_->SendBeginMainFrameNotExpectedSoon();
|
| }
|
|
|
| void ReceivedBeginMainFrameNotExpectedSoon() override {
|
| @@ -259,7 +266,7 @@
|
| void StartTestOnImplThread() override {
|
| scoped_ptr<AnimationEventsVector> events(
|
| make_scoped_ptr(new AnimationEventsVector));
|
| - GetProxyImplForTest()->PostAnimationEventsToMainThreadOnImplThread(
|
| + thread_proxy_->PostAnimationEventsToMainThreadOnImplThread(
|
| std::move(events));
|
| }
|
|
|
| @@ -277,7 +284,7 @@
|
| void BeginChannelTest() override { PostOnImplThread(); }
|
|
|
| void StartTestOnImplThread() override {
|
| - GetProxyImplForTest()->DidLoseOutputSurfaceOnImplThread();
|
| + thread_proxy_->DidLoseOutputSurfaceOnImplThread();
|
| }
|
|
|
| void ReceivedDidLoseOutputSurface() override {
|
| @@ -294,7 +301,7 @@
|
| void BeginChannelTest() override { PostOnImplThread(); }
|
|
|
| void StartTestOnImplThread() override {
|
| - GetProxyImplForTest()->DidCompletePageScaleAnimationOnImplThread();
|
| + thread_proxy_->DidCompletePageScaleAnimationOnImplThread();
|
| }
|
|
|
| void ReceivedDidCompletePageScaleAnimation() override {
|
|
|