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

Side by Side Diff: ui/gfx/compositor/layer_animation_element_unittest.cc

Issue 8533019: Add two pixel-based compositor unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing images from this CL Created 9 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/gfx/compositor/layer_animation_element.h" 5 #include "ui/gfx/compositor/layer_animation_element.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
13 #include "ui/gfx/transform.h" 13 #include "ui/gfx/transform.h"
14 #include "ui/gfx/compositor/layer_animation_delegate.h" 14 #include "ui/gfx/compositor/layer_animation_delegate.h"
15 #include "ui/gfx/compositor/test_layer_animation_delegate.h" 15 #include "ui/gfx/compositor/test/test_layer_animation_delegate.h"
16 #include "ui/gfx/compositor/test_utils.h" 16 #include "ui/gfx/compositor/test/test_utils.h"
17 17
18 namespace ui { 18 namespace ui {
19 19
20 namespace { 20 namespace {
21 21
22 // Check that the transformation element progresses the delegate as expected and 22 // Check that the transformation element progresses the delegate as expected and
23 // that the element can be reused after it completes. 23 // that the element can be reused after it completes.
24 TEST(LayerAnimationElementTest, TransformElement) { 24 TEST(LayerAnimationElementTest, TransformElement) {
25 TestLayerAnimationDelegate delegate; 25 TestLayerAnimationDelegate delegate;
26 Transform start_transform, target_transform, middle_transform; 26 Transform start_transform, target_transform, middle_transform;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(), 134 EXPECT_FLOAT_EQ(delegate.GetOpacityForAnimation(),
135 copy.GetOpacityForAnimation()); 135 copy.GetOpacityForAnimation());
136 136
137 // Pause should last for |delta|. 137 // Pause should last for |delta|.
138 EXPECT_EQ(delta, element->duration()); 138 EXPECT_EQ(delta, element->duration());
139 } 139 }
140 140
141 } // namespace 141 } // namespace
142 142
143 } // namespace ui 143 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gfx/compositor/compositor_test_support.cc ('k') | ui/gfx/compositor/layer_animation_sequence_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698