OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "config.h" | |
6 | |
7 #include "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
8 #include "cc/timing_function.h" | 6 #include "cc/timing_function.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMa
trix.h" | 8 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMa
trix.h" |
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformOperati
ons.h" | 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformOperati
ons.h" |
12 #include "web_transform_animation_curve_impl.h" | 10 #include "web_transform_animation_curve_impl.h" |
13 | 11 |
14 using namespace WebKit; | 12 using namespace WebKit; |
15 | 13 |
16 namespace { | 14 namespace { |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 curve->add(WebTransformKeyframe(1, operations2), WebAnimationCurve::TimingFu
nctionTypeLinear); | 263 curve->add(WebTransformKeyframe(1, operations2), WebAnimationCurve::TimingFu
nctionTypeLinear); |
266 | 264 |
267 scoped_ptr<cc::TimingFunction> timingFunction(cc::EaseTimingFunction::create
()); | 265 scoped_ptr<cc::TimingFunction> timingFunction(cc::EaseTimingFunction::create
()); |
268 for (int i = 0; i <= 4; ++i) { | 266 for (int i = 0; i <= 4; ++i) { |
269 const double time = i * 0.25; | 267 const double time = i * 0.25; |
270 EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time).m4
1()); | 268 EXPECT_FLOAT_EQ(timingFunction->getValue(time), curve->getValue(time).m4
1()); |
271 } | 269 } |
272 } | 270 } |
273 | 271 |
274 } // namespace | 272 } // namespace |
OLD | NEW |