OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/gfx/compositor/layer_animator.h" | 5 #include "ui/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/compositor/layer_animation_delegate.h" |
| 13 #include "ui/compositor/layer_animation_element.h" |
| 14 #include "ui/compositor/layer_animation_sequence.h" |
| 15 #include "ui/compositor/scoped_layer_animation_settings.h" |
| 16 #include "ui/compositor/test/test_layer_animation_delegate.h" |
| 17 #include "ui/compositor/test/test_layer_animation_observer.h" |
| 18 #include "ui/compositor/test/test_utils.h" |
12 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
13 #include "ui/gfx/transform.h" | 20 #include "ui/gfx/transform.h" |
14 #include "ui/gfx/compositor/layer_animation_delegate.h" | |
15 #include "ui/gfx/compositor/layer_animation_element.h" | |
16 #include "ui/gfx/compositor/layer_animation_sequence.h" | |
17 #include "ui/gfx/compositor/scoped_layer_animation_settings.h" | |
18 #include "ui/gfx/compositor/test/test_layer_animation_delegate.h" | |
19 #include "ui/gfx/compositor/test/test_layer_animation_observer.h" | |
20 #include "ui/gfx/compositor/test/test_utils.h" | |
21 | 21 |
22 namespace ui { | 22 namespace ui { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 class TestImplicitAnimationObserver : public ImplicitAnimationObserver { | 26 class TestImplicitAnimationObserver : public ImplicitAnimationObserver { |
27 public: | 27 public: |
28 explicit TestImplicitAnimationObserver(bool notify_when_animator_destructed) | 28 explicit TestImplicitAnimationObserver(bool notify_when_animator_destructed) |
29 : animations_completed_(false), | 29 : animations_completed_(false), |
30 notify_when_animator_destructed_(notify_when_animator_destructed) { | 30 notify_when_animator_destructed_(notify_when_animator_destructed) { |
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 animator->SetOpacity(0.5); | 1112 animator->SetOpacity(0.5); |
1113 EXPECT_EQ(0.5, animator->GetTargetOpacity()); | 1113 EXPECT_EQ(0.5, animator->GetTargetOpacity()); |
1114 | 1114 |
1115 // Because the strategy is ENQUEUE_NEW_ANIMATION the target should now be 1. | 1115 // Because the strategy is ENQUEUE_NEW_ANIMATION the target should now be 1. |
1116 animator->SetOpacity(1.0); | 1116 animator->SetOpacity(1.0); |
1117 EXPECT_EQ(1.0, animator->GetTargetOpacity()); | 1117 EXPECT_EQ(1.0, animator->GetTargetOpacity()); |
1118 } | 1118 } |
1119 } | 1119 } |
1120 | 1120 |
1121 } // namespace ui | 1121 } // namespace ui |
OLD | NEW |