OLD | NEW |
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_animator.h" | 5 #include "ui/gfx/compositor/layer_animator.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/layer_animation_element.h" | 15 #include "ui/gfx/compositor/layer_animation_element.h" |
16 #include "ui/gfx/compositor/layer_animation_sequence.h" | 16 #include "ui/gfx/compositor/layer_animation_sequence.h" |
17 #include "ui/gfx/compositor/test_layer_animation_delegate.h" | 17 #include "ui/gfx/compositor/test/test_layer_animation_delegate.h" |
18 #include "ui/gfx/compositor/test_layer_animation_observer.h" | 18 #include "ui/gfx/compositor/test/test_layer_animation_observer.h" |
19 #include "ui/gfx/compositor/test_utils.h" | 19 #include "ui/gfx/compositor/test/test_utils.h" |
20 | 20 |
21 namespace ui { | 21 namespace ui { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Checks that setting a property on an implicit animator causes an animation to | 25 // Checks that setting a property on an implicit animator causes an animation to |
26 // happen. | 26 // happen. |
27 TEST(LayerAnimatorTest, ImplicitAnimation) { | 27 TEST(LayerAnimatorTest, ImplicitAnimation) { |
28 scoped_ptr<LayerAnimator> animator(LayerAnimator::CreateImplicitAnimator()); | 28 scoped_ptr<LayerAnimator> animator(LayerAnimator::CreateImplicitAnimator()); |
29 AnimationContainerElement* element = animator.get(); | 29 AnimationContainerElement* element = animator.get(); |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 | 780 |
781 animator->SetOpacity(0.5); | 781 animator->SetOpacity(0.5); |
782 | 782 |
783 EXPECT_FALSE(animator->is_animating()); | 783 EXPECT_FALSE(animator->is_animating()); |
784 EXPECT_EQ(0.5, animator->GetTargetOpacity()); | 784 EXPECT_EQ(0.5, animator->GetTargetOpacity()); |
785 } | 785 } |
786 | 786 |
787 } // namespace | 787 } // namespace |
788 | 788 |
789 } // namespace ui | 789 } // namespace ui |
OLD | NEW |