OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/slide_animation.h" | |
6 #include "app/test_animation_delegate.h" | |
7 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 #include "ui/base/animation/slide_animation.h" |
| 7 #include "ui/base/animation/test_animation_delegate.h" |
8 #include "views/animation/bounds_animator.h" | 8 #include "views/animation/bounds_animator.h" |
9 #include "views/view.h" | 9 #include "views/view.h" |
10 | 10 |
11 using views::BoundsAnimator; | 11 using views::BoundsAnimator; |
| 12 using ui::Animation; |
| 13 using ui::SlideAnimation; |
12 | 14 |
13 namespace { | 15 namespace { |
14 | 16 |
15 class TestBoundsAnimator : public BoundsAnimator { | 17 class TestBoundsAnimator : public BoundsAnimator { |
16 public: | 18 public: |
17 explicit TestBoundsAnimator(views::View* view) : BoundsAnimator(view) { | 19 explicit TestBoundsAnimator(views::View* view) : BoundsAnimator(view) { |
18 } | 20 } |
19 | 21 |
20 protected: | 22 protected: |
21 SlideAnimation* CreateAnimation() { | 23 SlideAnimation* CreateAnimation() { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 171 |
170 animator()->StopAnimatingView(child()); | 172 animator()->StopAnimatingView(child()); |
171 | 173 |
172 // Shouldn't be animating now. | 174 // Shouldn't be animating now. |
173 EXPECT_FALSE(animator()->IsAnimating()); | 175 EXPECT_FALSE(animator()->IsAnimating()); |
174 | 176 |
175 // Stopping should both cancel the delegate and delete it. | 177 // Stopping should both cancel the delegate and delete it. |
176 EXPECT_TRUE(OwnedDelegate::get_and_clear_deleted()); | 178 EXPECT_TRUE(OwnedDelegate::get_and_clear_deleted()); |
177 EXPECT_TRUE(OwnedDelegate::get_and_clear_canceled()); | 179 EXPECT_TRUE(OwnedDelegate::get_and_clear_canceled()); |
178 } | 180 } |
OLD | NEW |