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

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

Issue 111683005: Fix AnimationKeyframeEffectModel.MultipleProperties to not depend on the order of CSS prope… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/KeyframeAnimationEffectTest.cpp
diff --git a/Source/core/animation/KeyframeAnimationEffectTest.cpp b/Source/core/animation/KeyframeAnimationEffectTest.cpp
index 4a493bd4f27d8c023989bac6690ecf9b0180b030..e41c8fa44103db906c1de6024b694e7610f03ec7 100644
--- a/Source/core/animation/KeyframeAnimationEffectTest.cpp
+++ b/Source/core/animation/KeyframeAnimationEffectTest.cpp
@@ -315,10 +315,19 @@ TEST(AnimationKeyframeAnimationEffectTest, MultipleProperties)
RefPtr<KeyframeAnimationEffect> effect = KeyframeAnimationEffect::create(keyframes);
OwnPtr<AnimationEffect::CompositableValueList> values = effect->sample(0, 0.6);
ASSERT_EQ(2UL, values->size());
- EXPECT_TRUE(values->at(0).first == CSSPropertyLeft);
- expectDoubleValue(5.0, values->at(0).second->compositeOnto(unknownAnimatableValue(7.0)));
- EXPECT_TRUE(values->at(1).first == CSSPropertyRight);
- expectDoubleValue(6.0, values->at(1).second->compositeOnto(unknownAnimatableValue(7.0)));
+ for (size_t i = 0; i < 2; ++i) {
+ std::pair<CSSPropertyID, RefPtr<AnimationEffect::CompositableValue> >& value = values->at(i);
+ switch (value.first) {
+ case CSSPropertyLeft:
+ expectDoubleValue(5.0, value.second->compositeOnto(unknownAnimatableValue(7.0)));
+ break;
+ case CSSPropertyRight:
+ expectDoubleValue(6.0, value.second->compositeOnto(unknownAnimatableValue(7.0)));
+ break;
+ default:
+ ADD_FAILURE();
+ }
+ }
Julien - ping for review 2013/12/16 07:25:10 Wouldn't this still pass if you have 2 'right' or
Steve Block 2013/12/16 23:23:52 Yes, it would. I didn't bother guarding against th
}
TEST(AnimationKeyframeAnimationEffectTest, RecompositeCompositableValue)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698