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 5a62bb9cc9fdd14b93f4a8561295a19bacb5ad47..0125438af86e76c19d1d4b27363d539bae88a4da 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp |
| @@ -118,69 +118,47 @@ public: |
| TEST_F(GraphicsLayerTest, updateLayerShouldFlattenTransformWithAnimations) |
| { |
| - ASSERT_FALSE(m_platformLayer->hasActiveAnimation()); |
| + ASSERT_FALSE(m_platformLayer->hasActiveAnimationForTesting()); |
| OwnPtr<CompositorFloatAnimationCurve> curve = adoptPtr(CompositorFactory::current().createFloatAnimationCurve()); |
| curve->add(CompositorFloatKeyframe(0.0, 0.0)); |
| OwnPtr<CompositorAnimation> floatAnimation(adoptPtr(CompositorFactory::current().createAnimation(*curve, CompositorTargetProperty::OPACITY))); |
| int animationId = floatAnimation->id(); |
| - if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) { |
|
Ian Vollick
2016/02/29 13:21:37
Can you please remind me how this got enabled duri
loyso (OOO)
2016/02/29 22:39:28
See content/test/test_blink_web_unit_test_support.
|
| - OwnPtr<CompositorAnimationTimeline> compositorTimeline = adoptPtr(CompositorFactory::current().createAnimationTimeline()); |
| - AnimationPlayerForTesting player; |
| + OwnPtr<CompositorAnimationTimeline> compositorTimeline = adoptPtr(CompositorFactory::current().createAnimationTimeline()); |
| + AnimationPlayerForTesting player; |
| - layerTreeView()->attachCompositorAnimationTimeline(compositorTimeline->animationTimeline()); |
| - compositorTimeline->playerAttached(player); |
| + layerTreeView()->attachCompositorAnimationTimeline(compositorTimeline->animationTimeline()); |
| + compositorTimeline->playerAttached(player); |
| - player.compositorPlayer()->attachLayer(m_platformLayer); |
| - ASSERT_TRUE(player.compositorPlayer()->isLayerAttached()); |
| + player.compositorPlayer()->attachLayer(m_platformLayer); |
| + ASSERT_TRUE(player.compositorPlayer()->isLayerAttached()); |
| - player.compositorPlayer()->addAnimation(floatAnimation.leakPtr()); |
| + player.compositorPlayer()->addAnimation(floatAnimation.leakPtr()); |
| - ASSERT_TRUE(m_platformLayer->hasActiveAnimation()); |
| + ASSERT_TRUE(m_platformLayer->hasActiveAnimationForTesting()); |
| - m_graphicsLayer->setShouldFlattenTransform(false); |
| + m_graphicsLayer->setShouldFlattenTransform(false); |
| - m_platformLayer = m_graphicsLayer->platformLayer(); |
| - ASSERT_TRUE(m_platformLayer); |
| - |
| - ASSERT_TRUE(m_platformLayer->hasActiveAnimation()); |
| - player.compositorPlayer()->removeAnimation(animationId); |
| - ASSERT_FALSE(m_platformLayer->hasActiveAnimation()); |
| - |
| - m_graphicsLayer->setShouldFlattenTransform(true); |
| - |
| - m_platformLayer = m_graphicsLayer->platformLayer(); |
| - ASSERT_TRUE(m_platformLayer); |
| - |
| - ASSERT_FALSE(m_platformLayer->hasActiveAnimation()); |
| + m_platformLayer = m_graphicsLayer->platformLayer(); |
| + ASSERT_TRUE(m_platformLayer); |
| - player.compositorPlayer()->detachLayer(); |
| - ASSERT_FALSE(player.compositorPlayer()->isLayerAttached()); |
| + ASSERT_TRUE(m_platformLayer->hasActiveAnimationForTesting()); |
| + player.compositorPlayer()->removeAnimation(animationId); |
| + ASSERT_FALSE(m_platformLayer->hasActiveAnimationForTesting()); |
| - compositorTimeline->playerDestroyed(player); |
| - layerTreeView()->detachCompositorAnimationTimeline(compositorTimeline->animationTimeline()); |
| - } else { |
| - ASSERT_TRUE(m_platformLayer->addAnimation(floatAnimation->releaseCCAnimation())); |
| + m_graphicsLayer->setShouldFlattenTransform(true); |
| - ASSERT_TRUE(m_platformLayer->hasActiveAnimation()); |
| + m_platformLayer = m_graphicsLayer->platformLayer(); |
| + ASSERT_TRUE(m_platformLayer); |
| - m_graphicsLayer->setShouldFlattenTransform(false); |
| + ASSERT_FALSE(m_platformLayer->hasActiveAnimationForTesting()); |
| - m_platformLayer = m_graphicsLayer->platformLayer(); |
| - ASSERT_TRUE(m_platformLayer); |
| - |
| - ASSERT_TRUE(m_platformLayer->hasActiveAnimation()); |
| - m_platformLayer->removeAnimation(animationId); |
| - ASSERT_FALSE(m_platformLayer->hasActiveAnimation()); |
| - |
| - m_graphicsLayer->setShouldFlattenTransform(true); |
| + player.compositorPlayer()->detachLayer(); |
| + ASSERT_FALSE(player.compositorPlayer()->isLayerAttached()); |
| - m_platformLayer = m_graphicsLayer->platformLayer(); |
| - ASSERT_TRUE(m_platformLayer); |
| - |
| - ASSERT_FALSE(m_platformLayer->hasActiveAnimation()); |
| - } |
| + compositorTimeline->playerDestroyed(player); |
| + layerTreeView()->detachCompositorAnimationTimeline(compositorTimeline->animationTimeline()); |
| } |
| class FakeScrollableArea : public NoBaseWillBeGarbageCollectedFinalized<FakeScrollableArea>, public ScrollableArea { |