Index: cc/trees/threaded_channel_unittest.cc |
diff --git a/cc/trees/threaded_channel_unittest.cc b/cc/trees/threaded_channel_unittest.cc |
index 6371f781393860231efac45a1e77021a594df58c..4d702baa14d38fdd7d3e83cac509943415e3d662 100644 |
--- a/cc/trees/threaded_channel_unittest.cc |
+++ b/cc/trees/threaded_channel_unittest.cc |
@@ -1,4 +1,4 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Copyright 2015 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,13 +13,13 @@ namespace cc { |
// The ThreadedChannel tests are run only for threaded and direct mode. |
class ThreadedChannelTest : public LayerTreeTest { |
protected: |
- ThreadedChannelTest() : thread_proxy_(nullptr), calls_received_(0) {} |
+ ThreadedChannelTest() : proxy_impl_(nullptr), calls_received_(0) {} |
~ThreadedChannelTest() override {} |
void BeginTest() override { |
DCHECK(HasImplThread()); |
- thread_proxy_ = static_cast<ThreadProxy*>(proxy()); |
+ proxy_impl_ = GetProxyImpl(); |
BeginChannelTest(); |
}; |
virtual void BeginChannelTest() {} |
@@ -34,9 +34,7 @@ class ThreadedChannelTest : public LayerTreeTest { |
void AfterTest() override {} |
- // TODO(khushalsagar): Remove this once ProxyImpl is added to the |
- // LayerTreeTest. |
- ThreadProxy* thread_proxy_; |
+ ProxyImpl* proxy_impl_; |
int calls_received_; |
private: |
@@ -45,8 +43,6 @@ class ThreadedChannelTest : public LayerTreeTest { |
class ThreadedChannelTestInitializationAndShutdown |
: public ThreadedChannelTest { |
- void InitializeImplOnImpl() override { calls_received_++; } |
- |
void SetVisibleOnImpl(bool visible) override { calls_received_++; } |
void ReceivedRequestNewOutputSurface() override { calls_received_++; } |
@@ -70,7 +66,7 @@ class ThreadedChannelTestInitializationAndShutdown |
void WillCloseLayerTreeHostOnImpl() override { calls_received_++; } |
void FinishGLOnImpl() override { calls_received_++; } |
- void AfterTest() override { EXPECT_EQ(8, calls_received_); } |
+ void AfterTest() override { EXPECT_EQ(7, calls_received_); } |
}; |
MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
@@ -244,7 +240,7 @@ class ThreadedChannelTestBeginMainFrameNotExpectedSoon |
void BeginChannelTest() override { PostOnImplThread(); } |
void StartTestOnImplThread() override { |
- thread_proxy_->SendBeginMainFrameNotExpectedSoon(); |
+ proxy_impl_->SendBeginMainFrameNotExpectedSoon(); |
} |
void ReceivedBeginMainFrameNotExpectedSoon() override { |
@@ -264,7 +260,7 @@ class ThreadedChannelTestSetAnimationEvents : public ThreadedChannelTest { |
void StartTestOnImplThread() override { |
scoped_ptr<AnimationEventsVector> events( |
make_scoped_ptr(new AnimationEventsVector)); |
- thread_proxy_->PostAnimationEventsToMainThreadOnImplThread(events.Pass()); |
+ proxy_impl_->PostAnimationEventsToMainThreadOnImplThread(events.Pass()); |
} |
void ReceivedSetAnimationEvents() override { |
@@ -281,7 +277,7 @@ class ThreadedChannelTestLoseOutputSurface : public ThreadedChannelTest { |
void BeginChannelTest() override { PostOnImplThread(); } |
void StartTestOnImplThread() override { |
- thread_proxy_->DidLoseOutputSurfaceOnImplThread(); |
+ proxy_impl_->DidLoseOutputSurfaceOnImplThread(); |
} |
void ReceivedDidLoseOutputSurface() override { |
@@ -298,7 +294,7 @@ class ThreadedChannelTestPageScaleAnimation : public ThreadedChannelTest { |
void BeginChannelTest() override { PostOnImplThread(); } |
void StartTestOnImplThread() override { |
- thread_proxy_->DidCompletePageScaleAnimationOnImplThread(); |
+ proxy_impl_->DidCompletePageScaleAnimationOnImplThread(); |
} |
void ReceivedDidCompletePageScaleAnimation() override { |