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

Unified Diff: third_party/WebKit/Source/core/animation/AnimationStackTest.cpp

Issue 1410313004: Web Animations: Use a single animation clock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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/core/animation/AnimationStackTest.cpp
diff --git a/third_party/WebKit/Source/core/animation/AnimationStackTest.cpp b/third_party/WebKit/Source/core/animation/AnimationStackTest.cpp
index 791b440d4a7de4e923e4da6156ae3c6fbd86185b..bb2bb9e791ad9b738fb2a755323659be64eb16aa 100644
--- a/third_party/WebKit/Source/core/animation/AnimationStackTest.cpp
+++ b/third_party/WebKit/Source/core/animation/AnimationStackTest.cpp
@@ -11,6 +11,7 @@
#include "core/animation/KeyframeEffectModel.h"
#include "core/animation/LegacyStyleInterpolation.h"
#include "core/animation/animatable/AnimatableDouble.h"
+#include "core/testing/DummyPageHolder.h"
#include <gtest/gtest.h>
namespace blink {
@@ -19,7 +20,8 @@ class AnimationAnimationStackTest : public ::testing::Test {
protected:
virtual void SetUp()
{
- document = Document::create();
+ pageHolder = DummyPageHolder::create();
+ document = &pageHolder->document();
document->animationClock().resetTimeForTesting();
timeline = AnimationTimeline::create(document.get());
element = document->createElement("foo", ASSERT_NO_EXCEPTION);
@@ -35,7 +37,7 @@ protected:
void updateTimeline(double time)
{
- document->animationClock().updateTime(time);
+ document->animationClock().updateTime(document->timeline().zeroTime() + time);
timeline->serviceAnimations(TimingUpdateForAnimationFrame);
}
@@ -77,6 +79,7 @@ protected:
return toLegacyStyleInterpolation(interpolation).currentValue().get();
}
+ OwnPtr<DummyPageHolder> pageHolder;
RefPtrWillBePersistent<Document> document;
Persistent<AnimationTimeline> timeline;
RefPtrWillBePersistent<Element> element;

Powered by Google App Engine
This is Rietveld 408576698