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/animation/animation_container.h" |
| 6 |
5 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
6 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "ui/base/animation/animation_container.h" | 10 #include "ui/gfx/animation/animation_container_observer.h" |
9 #include "ui/base/animation/animation_container_observer.h" | 11 #include "ui/gfx/animation/linear_animation.h" |
10 #include "ui/base/animation/linear_animation.h" | 12 #include "ui/gfx/animation/test_animation_delegate.h" |
11 #include "ui/base/animation/test_animation_delegate.h" | |
12 | 13 |
13 using testing::AtLeast; | 14 using testing::AtLeast; |
14 | 15 |
15 namespace ui { | 16 namespace gfx { |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 class MockObserver : public AnimationContainerObserver { | 20 class MockObserver : public AnimationContainerObserver { |
20 public: | 21 public: |
21 MockObserver() {} | 22 MockObserver() {} |
22 | 23 |
23 MOCK_METHOD1(AnimationContainerProgressed, void(AnimationContainer*)); | 24 MOCK_METHOD1(AnimationContainerProgressed, void(AnimationContainer*)); |
24 MOCK_METHOD1(AnimationContainerEmpty, void(AnimationContainer*)); | 25 MOCK_METHOD1(AnimationContainerEmpty, void(AnimationContainer*)); |
25 | 26 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 117 |
117 // The timer should have finished. | 118 // The timer should have finished. |
118 EXPECT_TRUE(delegate1.finished()); | 119 EXPECT_TRUE(delegate1.finished()); |
119 | 120 |
120 // And the container should no longer be running. | 121 // And the container should no longer be running. |
121 EXPECT_FALSE(container->is_running()); | 122 EXPECT_FALSE(container->is_running()); |
122 | 123 |
123 container->set_observer(NULL); | 124 container->set_observer(NULL); |
124 } | 125 } |
125 | 126 |
126 } // namespace ui | 127 } // namespace gfx |
OLD | NEW |