Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(962)

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp

Issue 2559273003: Blink Compositor Animation: Introduce CompositorAnimationHost correctly. (Closed)
Patch Set: Allocate on stack in unit tests. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..37b726adca8d9dd9b9c493959bb78a3e8b5d6f0a 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,9 @@ TEST_F(GraphicsLayerTest, updateLayerShouldFlattenTransformWithAnimations) {
CompositorAnimationTimeline::create();
AnimationPlayerForTesting player;
- layerTreeView()->attachCompositorAnimationTimeline(
- compositorTimeline->animationTimeline());
+ CompositorAnimationHost host(layerTreeView()->compositorAnimationHost());
+
+ host.addTimeline(*compositorTimeline);
compositorTimeline->playerAttached(player);
m_platformLayer->setElementId(CompositorElementId(m_platformLayer->id(), 0));
@@ -151,8 +153,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>,

Powered by Google App Engine
This is Rietveld 408576698