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

Unified Diff: third_party/WebKit/Source/platform/animation/CompositorAnimationTimelineTest.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/animation/CompositorAnimationTimelineTest.cpp
diff --git a/third_party/WebKit/Source/platform/animation/CompositorAnimationTimelineTest.cpp b/third_party/WebKit/Source/platform/animation/CompositorAnimationTimelineTest.cpp
index 72422d3a2cdd025c2d0019b7dc527abb5cd12e0e..41a72e37751f76bcef5c466604bed5af08edb87c 100644
--- a/third_party/WebKit/Source/platform/animation/CompositorAnimationTimelineTest.cpp
+++ b/third_party/WebKit/Source/platform/animation/CompositorAnimationTimelineTest.cpp
@@ -6,10 +6,10 @@
#include "base/memory/ref_counted.h"
#include "cc/animation/animation_host.h"
+#include "platform/animation/CompositorAnimationHost.h"
#include "platform/animation/CompositorAnimationPlayer.h"
#include "platform/testing/CompositorTest.h"
#include "platform/testing/WebLayerTreeViewImplForTesting.h"
-#include "wtf/PtrUtil.h"
#include <memory>
namespace blink {
@@ -25,12 +25,11 @@ TEST_F(CompositorAnimationTimelineTest,
timeline->animationTimeline();
EXPECT_FALSE(ccTimeline->animation_host());
- std::unique_ptr<WebLayerTreeView> layerTreeHost =
- WTF::wrapUnique(new WebLayerTreeViewImplForTesting);
- DCHECK(layerTreeHost);
+ WebLayerTreeViewImplForTesting layerTreeView;
+ CompositorAnimationHost compositorAnimationHost(
+ layerTreeView.compositorAnimationHost());
- layerTreeHost->attachCompositorAnimationTimeline(
- timeline->animationTimeline());
+ compositorAnimationHost.addTimeline(*timeline);
cc::AnimationHost* animationHost = ccTimeline->animation_host();
EXPECT_TRUE(animationHost);
EXPECT_TRUE(animationHost->GetTimelineById(ccTimeline->id()));

Powered by Google App Engine
This is Rietveld 408576698