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

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

Issue 399033002: Web Animations: Don't compare start time for AnimationPlayer sorting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 5 months 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
« no previous file with comments | « Source/core/animation/AnimationStack.cpp ('k') | Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationStackTest.cpp
diff --git a/Source/core/animation/AnimationStackTest.cpp b/Source/core/animation/AnimationStackTest.cpp
index 23ccd0bbcd021cfa94a9a08c4e88914e2872955f..1ef816b71a686e3ead9cb7d8cfa1a4a1d143e9e2 100644
--- a/Source/core/animation/AnimationStackTest.cpp
+++ b/Source/core/animation/AnimationStackTest.cpp
@@ -88,7 +88,7 @@ TEST_F(AnimationAnimationStackTest, ActiveAnimationsSorted)
play(makeAnimation(makeAnimationEffect(CSSPropertyFontSize, AnimatableDouble::create(3))).get(), 5);
WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > result = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
EXPECT_EQ(1u, result.size());
- EXPECT_TRUE(interpolationValue(result.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(2).get()));
+ EXPECT_TRUE(interpolationValue(result.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
}
TEST_F(AnimationAnimationStackTest, NewAnimations)
@@ -102,7 +102,7 @@ TEST_F(AnimationAnimationStackTest, NewAnimations)
newAnimations.append(inert2.get());
WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation> > result = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), &newAnimations, 0, Animation::DefaultPriority, 10);
EXPECT_EQ(2u, result.size());
- EXPECT_TRUE(interpolationValue(result.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(1).get()));
+ EXPECT_TRUE(interpolationValue(result.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
EXPECT_TRUE(interpolationValue(result.get(CSSPropertyZIndex))->equals(AnimatableDouble::create(4).get()));
}
@@ -128,36 +128,27 @@ TEST_F(AnimationAnimationStackTest, ForwardsFillDiscarding)
updateTimeline(11);
Heap::collectAllGarbage();
interpolations = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
- EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(2).get()));
+ EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
EXPECT_EQ(3u, effects().size());
EXPECT_EQ(1u, interpolations.size());
- EXPECT_EQ(2, effects()[0]->sortInfo().startTime());
- EXPECT_EQ(4, effects()[1]->sortInfo().startTime());
- EXPECT_EQ(6, effects()[2]->sortInfo().startTime());
updateTimeline(13);
Heap::collectAllGarbage();
interpolations = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
- EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(2).get()));
+ EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
EXPECT_EQ(3u, effects().size());
- EXPECT_EQ(2, effects()[0]->sortInfo().startTime());
- EXPECT_EQ(4, effects()[1]->sortInfo().startTime());
- EXPECT_EQ(6, effects()[2]->sortInfo().startTime());
updateTimeline(15);
Heap::collectAllGarbage();
interpolations = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
- EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(2).get()));
+ EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
EXPECT_EQ(2u, effects().size());
- EXPECT_EQ(4, effects()[0]->sortInfo().startTime());
- EXPECT_EQ(6, effects()[1]->sortInfo().startTime());
updateTimeline(17);
Heap::collectAllGarbage();
interpolations = AnimationStack::activeInterpolations(&element->activeAnimations()->defaultStack(), 0, 0, Animation::DefaultPriority, 0);
- EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(2).get()));
+ EXPECT_TRUE(interpolationValue(interpolations.get(CSSPropertyFontSize))->equals(AnimatableDouble::create(3).get()));
EXPECT_EQ(1u, effects().size());
- EXPECT_EQ(6, effects()[0]->sortInfo().startTime());
}
}
« no previous file with comments | « Source/core/animation/AnimationStack.cpp ('k') | Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698