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

Side by Side Diff: cc/layer_animation_controller_unittest.cc

Issue 11308153: Migrate most of cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 8 years 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
« no previous file with comments | « cc/layer_animation_controller.cc ('k') | cc/layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/layer_animation_controller.h" 5 #include "cc/layer_animation_controller.h"
6 6
7 #include "cc/active_animation.h" 7 #include "cc/active_animation.h"
8 #include "cc/animation_curve.h" 8 #include "cc/animation_curve.h"
9 #include "cc/test/animation_test_common.h" 9 #include "cc/test/animation_test_common.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include <public/WebTransformationMatrix.h> 12 #include "ui/gfx/transform.h"
13 13
14 using namespace WebKitTests; 14 using namespace WebKitTests;
15 using WebKit::WebTransformationMatrix;
16 15
17 namespace cc { 16 namespace cc {
18 namespace { 17 namespace {
19 18
20 void expectTranslateX(double translateX, const WebTransformationMatrix& matrix) 19 void expectTranslateX(double translateX, const gfx::Transform& matrix)
21 { 20 {
22 EXPECT_FLOAT_EQ(translateX, matrix.m41()); 21 EXPECT_FLOAT_EQ(translateX, matrix.matrix().getDouble(0, 3));
23 } 22 }
24 23
25 scoped_ptr<ActiveAnimation> createActiveAnimation(scoped_ptr<AnimationCurve> cur ve, int id, ActiveAnimation::TargetProperty property) 24 scoped_ptr<ActiveAnimation> createActiveAnimation(scoped_ptr<AnimationCurve> cur ve, int id, ActiveAnimation::TargetProperty property)
26 { 25 {
27 return ActiveAnimation::create(curve.Pass(), 0, id, property); 26 return ActiveAnimation::create(curve.Pass(), 0, id, property);
28 } 27 }
29 28
30 TEST(LayerAnimationControllerTest, syncNewAnimation) 29 TEST(LayerAnimationControllerTest, syncNewAnimation)
31 { 30 {
32 FakeLayerAnimationControllerClient dummyImpl; 31 FakeLayerAnimationControllerClient dummyImpl;
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 550
552 controller->pushAnimationUpdatesTo(controllerImpl.get()); 551 controller->pushAnimationUpdatesTo(controllerImpl.get());
553 552
554 activeAnimation = controllerImpl->getActiveAnimation(0, ActiveAnimation::Opa city); 553 activeAnimation = controllerImpl->getActiveAnimation(0, ActiveAnimation::Opa city);
555 EXPECT_TRUE(activeAnimation); 554 EXPECT_TRUE(activeAnimation);
556 EXPECT_EQ(ActiveAnimation::WaitingForTargetAvailability, activeAnimation->ru nState()); 555 EXPECT_EQ(ActiveAnimation::WaitingForTargetAvailability, activeAnimation->ru nState());
557 } 556 }
558 557
559 } // namespace 558 } // namespace
560 } // namespace cc 559 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_animation_controller.cc ('k') | cc/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698