| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/animation/InterpolationEffect.h" | 5 #include "core/animation/InterpolationEffect.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "core/animation/LegacyStyleInterpolation.h" | 8 #include "core/animation/LegacyStyleInterpolation.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include <memory> | |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 class SampleInterpolation : public LegacyStyleInterpolation { | 15 class SampleInterpolation : public LegacyStyleInterpolation { |
| 16 public: | 16 public: |
| 17 static PassRefPtr<LegacyStyleInterpolation> create( | 17 static PassRefPtr<LegacyStyleInterpolation> create( |
| 18 std::unique_ptr<InterpolableValue> start, | 18 std::unique_ptr<InterpolableValue> start, |
| 19 std::unique_ptr<InterpolableValue> end) { | 19 std::unique_ptr<InterpolableValue> end) { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 EXPECT_EQ(1ul, activeInterpolations.size()); | 130 EXPECT_EQ(1ul, activeInterpolations.size()); |
| 131 EXPECT_FLOAT_EQ(12.5f, getInterpolableNumber(activeInterpolations.at(0))); | 131 EXPECT_FLOAT_EQ(12.5f, getInterpolableNumber(activeInterpolations.at(0))); |
| 132 | 132 |
| 133 interpolationEffect.getActiveInterpolations(2, duration, | 133 interpolationEffect.getActiveInterpolations(2, duration, |
| 134 activeInterpolations); | 134 activeInterpolations); |
| 135 EXPECT_EQ(1ul, activeInterpolations.size()); | 135 EXPECT_EQ(1ul, activeInterpolations.size()); |
| 136 EXPECT_FLOAT_EQ(15, getInterpolableNumber(activeInterpolations.at(0))); | 136 EXPECT_FLOAT_EQ(15, getInterpolableNumber(activeInterpolations.at(0))); |
| 137 } | 137 } |
| 138 | 138 |
| 139 } // namespace blink | 139 } // namespace blink |
| OLD | NEW |