| Index: third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
|
| index ae1413e4a4ed0b74c7e5cace3dd91a93dd961b68..938f5c3bcedd6d872fbc5230cc260c6e0b1eafbe 100644
|
| --- a/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp
|
| @@ -27,16 +27,17 @@ class KeyframeEffectTest : public ::testing::Test {
|
| protected:
|
| KeyframeEffectTest()
|
| : pageHolder(DummyPageHolder::create())
|
| - , document(pageHolder->document())
|
| - , element(document.createElement("foo", ASSERT_NO_EXCEPTION))
|
| {
|
| - document.animationClock().resetTimeForTesting(document.timeline().zeroTime());
|
| - document.documentElement()->appendChild(element.get());
|
| - EXPECT_EQ(0, document.timeline().currentTime());
|
| + element = document().createElement("foo", ASSERT_NO_EXCEPTION);
|
| +
|
| + document().animationClock().resetTimeForTesting(document().timeline().zeroTime());
|
| + document().documentElement()->appendChild(element.get());
|
| + EXPECT_EQ(0, document().timeline().currentTime());
|
| }
|
|
|
| + Document& document() const { return pageHolder->document(); }
|
| +
|
| OwnPtr<DummyPageHolder> pageHolder;
|
| - Document& document;
|
| RefPtrWillBePersistent<Element> element;
|
| TrackExceptionState exceptionState;
|
| };
|
| @@ -274,7 +275,7 @@ TEST_F(KeyframeEffectTest, TimeToEffectChange)
|
| timing.endDelay = 100;
|
| timing.fillMode = Timing::FillModeNone;
|
| KeyframeEffect* animation = KeyframeEffect::create(0, nullptr, timing);
|
| - Animation* player = document.timeline().play(animation);
|
| + Animation* player = document().timeline().play(animation);
|
| double inf = std::numeric_limits<double>::infinity();
|
|
|
| EXPECT_EQ(100, animation->timeToForwardsEffectChange());
|
| @@ -307,7 +308,7 @@ TEST_F(KeyframeEffectTest, TimeToEffectChangeWithPlaybackRate)
|
| timing.playbackRate = 2;
|
| timing.fillMode = Timing::FillModeNone;
|
| KeyframeEffect* animation = KeyframeEffect::create(0, nullptr, timing);
|
| - Animation* player = document.timeline().play(animation);
|
| + Animation* player = document().timeline().play(animation);
|
| double inf = std::numeric_limits<double>::infinity();
|
|
|
| EXPECT_EQ(100, animation->timeToForwardsEffectChange());
|
| @@ -340,7 +341,7 @@ TEST_F(KeyframeEffectTest, TimeToEffectChangeWithNegativePlaybackRate)
|
| timing.playbackRate = -2;
|
| timing.fillMode = Timing::FillModeNone;
|
| KeyframeEffect* animation = KeyframeEffect::create(0, nullptr, timing);
|
| - Animation* player = document.timeline().play(animation);
|
| + Animation* player = document().timeline().play(animation);
|
| double inf = std::numeric_limits<double>::infinity();
|
|
|
| EXPECT_EQ(100, animation->timeToForwardsEffectChange());
|
| @@ -371,7 +372,7 @@ TEST_F(KeyframeEffectTest, ElementDestructorClearsAnimationTarget)
|
| timing.iterationDuration = 5;
|
| KeyframeEffect* animation = KeyframeEffect::create(element.get(), nullptr, timing);
|
| EXPECT_EQ(element.get(), animation->target());
|
| - document.timeline().play(animation);
|
| + document().timeline().play(animation);
|
| pageHolder.clear();
|
| element.clear();
|
| }
|
|
|