| 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "testing/gmock/include/gmock/gmock.h" | 6 #include "testing/gmock/include/gmock/gmock.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "ui/base/animation/animation_container.h" | 8 #include "ui/base/animation/animation_container.h" |
| 9 #include "ui/base/animation/animation_container_observer.h" | 9 #include "ui/base/animation/animation_container_observer.h" |
| 10 #include "ui/base/animation/linear_animation.h" | 10 #include "ui/base/animation/linear_animation.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 private: | 26 private: |
| 27 DISALLOW_COPY_AND_ASSIGN(MockObserver); | 27 DISALLOW_COPY_AND_ASSIGN(MockObserver); |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 class TestAnimation : public LinearAnimation { | 30 class TestAnimation : public LinearAnimation { |
| 31 public: | 31 public: |
| 32 explicit TestAnimation(AnimationDelegate* delegate) | 32 explicit TestAnimation(AnimationDelegate* delegate) |
| 33 : LinearAnimation(20, 20, delegate) { | 33 : LinearAnimation(20, 20, delegate) { |
| 34 } | 34 } |
| 35 | 35 |
| 36 virtual void AnimateToState(double state) { | 36 virtual void AnimateToState(double state) OVERRIDE { |
| 37 } | 37 } |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 DISALLOW_COPY_AND_ASSIGN(TestAnimation); | 40 DISALLOW_COPY_AND_ASSIGN(TestAnimation); |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 } // namespace | 43 } // namespace |
| 44 | 44 |
| 45 class AnimationContainerTest: public testing::Test { | 45 class AnimationContainerTest: public testing::Test { |
| 46 private: | 46 private: |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // The timer should have finished. | 117 // The timer should have finished. |
| 118 EXPECT_TRUE(delegate1.finished()); | 118 EXPECT_TRUE(delegate1.finished()); |
| 119 | 119 |
| 120 // And the container should no longer be running. | 120 // And the container should no longer be running. |
| 121 EXPECT_FALSE(container->is_running()); | 121 EXPECT_FALSE(container->is_running()); |
| 122 | 122 |
| 123 container->set_observer(NULL); | 123 container->set_observer(NULL); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace ui | 126 } // namespace ui |
| OLD | NEW |