Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp |
| index 7688182ebf3474a74ddc2ba3f695d209b274f77f..f1ca21d5ce42b16f5e6294a3b69169c41881dba8 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp |
| @@ -27,6 +27,7 @@ |
| #include "platform/RuntimeEnabledFeatures.h" |
| #include "platform/animation/CompositorAnimation.h" |
| +#include "platform/animation/CompositorAnimationHost.h" |
| #include "platform/animation/CompositorAnimationPlayer.h" |
| #include "platform/animation/CompositorAnimationPlayerClient.h" |
| #include "platform/animation/CompositorAnimationTimeline.h" |
| @@ -118,8 +119,10 @@ TEST_F(GraphicsLayerTest, updateLayerShouldFlattenTransformWithAnimations) { |
| CompositorAnimationTimeline::create(); |
| AnimationPlayerForTesting player; |
| - layerTreeView()->attachCompositorAnimationTimeline( |
| - compositorTimeline->animationTimeline()); |
| + auto host = WTF::makeUnique<CompositorAnimationHost>( |
|
jbroman
2016/12/13 16:38:32
nit: Why heap-allocate? This should work too:
Com
loyso (OOO)
2016/12/19 04:03:12
Done.
|
| + layerTreeView()->compositorAnimationHost()); |
| + |
| + host->addTimeline(compositorTimeline.get()); |
| compositorTimeline->playerAttached(player); |
| m_platformLayer->setElementId(CompositorElementId(m_platformLayer->id(), 0)); |
| @@ -151,8 +154,7 @@ TEST_F(GraphicsLayerTest, updateLayerShouldFlattenTransformWithAnimations) { |
| ASSERT_FALSE(player.compositorPlayer()->isElementAttached()); |
| compositorTimeline->playerDestroyed(player); |
| - layerTreeView()->detachCompositorAnimationTimeline( |
| - compositorTimeline->animationTimeline()); |
| + host->removeTimeline(compositorTimeline.get()); |
| } |
| class FakeScrollableArea : public GarbageCollectedFinalized<FakeScrollableArea>, |