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

Side by Side Diff: webkit/renderer/compositor_bindings/web_float_animation_curve_unittest.cc

Issue 61553006: Rename WebKit namespace to blink (part 5) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "cc/animation/timing_function.h" 6 #include "cc/animation/timing_function.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h" 8 #include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h"
9 9
10 using WebKit::WebAnimationCurve; 10 using blink::WebAnimationCurve;
11 using WebKit::WebFloatAnimationCurve; 11 using blink::WebFloatAnimationCurve;
12 using WebKit::WebFloatKeyframe; 12 using blink::WebFloatKeyframe;
13 13
14 namespace webkit { 14 namespace webkit {
15 namespace { 15 namespace {
16 16
17 // Tests that a float animation with one keyframe works as expected. 17 // Tests that a float animation with one keyframe works as expected.
18 TEST(WebFloatAnimationCurveTest, OneFloatKeyframe) { 18 TEST(WebFloatAnimationCurveTest, OneFloatKeyframe) {
19 scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl); 19 scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurveImpl);
20 curve->add(WebFloatKeyframe(0, 2), 20 curve->add(WebFloatKeyframe(0, 2),
21 WebAnimationCurve::TimingFunctionTypeLinear); 21 WebAnimationCurve::TimingFunctionTypeLinear);
22 EXPECT_FLOAT_EQ(2, curve->getValue(-1)); 22 EXPECT_FLOAT_EQ(2, curve->getValue(-1));
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 scoped_ptr<cc::TimingFunction> timing_function( 224 scoped_ptr<cc::TimingFunction> timing_function(
225 cc::EaseTimingFunction::Create()); 225 cc::EaseTimingFunction::Create());
226 for (int i = 0; i <= 4; ++i) { 226 for (int i = 0; i <= 4; ++i) {
227 const double time = i * 0.25; 227 const double time = i * 0.25;
228 EXPECT_FLOAT_EQ(timing_function->GetValue(time), curve->getValue(time)); 228 EXPECT_FLOAT_EQ(timing_function->GetValue(time), curve->getValue(time));
229 } 229 }
230 } 230 }
231 231
232 } // namespace 232 } // namespace
233 } // namespace webkit 233 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698