Chromium Code Reviews| 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) |