OLD | NEW |
1 // Copyright (c) 2011 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_animation_sequence.h" | 5 #include "ui/compositor/layer_animation_sequence.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/test/test_layer_animation_delegate.h" |
| 15 #include "ui/compositor/test/test_layer_animation_observer.h" |
| 16 #include "ui/compositor/test/test_utils.h" |
12 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
13 #include "ui/gfx/transform.h" | 18 #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/test/test_layer_animation_delegate.h" | |
17 #include "ui/gfx/compositor/test/test_layer_animation_observer.h" | |
18 #include "ui/gfx/compositor/test/test_utils.h" | |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 // Check that the sequence behaves sanely when it contains no elements. | 24 // Check that the sequence behaves sanely when it contains no elements. |
25 TEST(LayerAnimationSequenceTest, NoElement) { | 25 TEST(LayerAnimationSequenceTest, NoElement) { |
26 LayerAnimationSequence sequence; | 26 LayerAnimationSequence sequence; |
27 EXPECT_EQ(sequence.duration(), base::TimeDelta()); | 27 EXPECT_EQ(sequence.duration(), base::TimeDelta()); |
28 EXPECT_TRUE(sequence.properties().size() == 0); | 28 EXPECT_TRUE(sequence.properties().size() == 0); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 EXPECT_TRUE(!observer.last_ended_sequence()); | 188 EXPECT_TRUE(!observer.last_ended_sequence()); |
189 sequence.Progress(delta, &delegate); | 189 sequence.Progress(delta, &delegate); |
190 EXPECT_EQ(observer.last_ended_sequence(), &sequence); | 190 EXPECT_EQ(observer.last_ended_sequence(), &sequence); |
191 sequence.RemoveObserver(&observer); | 191 sequence.RemoveObserver(&observer); |
192 } | 192 } |
193 } | 193 } |
194 | 194 |
195 } // namespace | 195 } // namespace |
196 | 196 |
197 } // namespace ui | 197 } // namespace ui |
OLD | NEW |