Index: third_party/WebKit/Source/core/animation/InterpolationEffectTest.cpp |
diff --git a/third_party/WebKit/Source/core/animation/InterpolationEffectTest.cpp b/third_party/WebKit/Source/core/animation/InterpolationEffectTest.cpp |
index df2589377a9e912e3c76eaf8ddb2b420f4d2dc1e..ef75e33ccb05a746340a991af0cf117bdd59e42f 100644 |
--- a/third_party/WebKit/Source/core/animation/InterpolationEffectTest.cpp |
+++ b/third_party/WebKit/Source/core/animation/InterpolationEffectTest.cpp |
@@ -14,7 +14,7 @@ namespace { |
class SampleInterpolation : public LegacyStyleInterpolation { |
public: |
- static PassRefPtr<Interpolation> create( |
+ static PassRefPtr<LegacyStyleInterpolation> create( |
std::unique_ptr<InterpolableValue> start, |
std::unique_ptr<InterpolableValue> end) { |
return adoptRef(new SampleInterpolation(std::move(start), std::move(end))); |
@@ -34,12 +34,18 @@ const double duration = 1.0; |
class AnimationInterpolationEffectTest : public ::testing::Test { |
protected: |
- InterpolableValue* interpolationValue(Interpolation& interpolation) { |
+ InterpolableValue* interpolationValue( |
+ LegacyStyleInterpolation& interpolation) { |
return interpolation.getCachedValueForTesting(); |
} |
double getInterpolableNumber(PassRefPtr<Interpolation> value) { |
- return toInterpolableNumber(interpolationValue(*value.get()))->value(); |
+ if (value->isLegacyStyleInterpolation()) { |
+ LegacyStyleInterpolation& interpolation = |
+ toLegacyStyleInterpolation(*value.get()); |
+ return toInterpolableNumber(interpolationValue(interpolation))->value(); |
+ } |
+ return 0.0; |
alancutter (OOO until 2018)
2017/01/11 04:27:33
Remove this branch, don't check just cast, the mac
|
} |
}; |