| OLD | NEW |
| 1 // Copyright (c) 2010 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 #include "ui/base/animation/slide_animation.h" | 6 #include "ui/base/animation/slide_animation.h" |
| 7 #include "ui/base/animation/test_animation_delegate.h" | 7 #include "ui/base/animation/test_animation_delegate.h" |
| 8 #include "views/animation/bounds_animator.h" | 8 #include "ui/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; | 12 using ui::Animation; |
| 13 using ui::SlideAnimation; | 13 using ui::SlideAnimation; |
| 14 using ui::TestAnimationDelegate; | 14 using ui::TestAnimationDelegate; |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 class TestBoundsAnimator : public BoundsAnimator { | 18 class TestBoundsAnimator : public BoundsAnimator { |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 animator()->StopAnimatingView(child()); | 173 animator()->StopAnimatingView(child()); |
| 174 | 174 |
| 175 // Shouldn't be animating now. | 175 // Shouldn't be animating now. |
| 176 EXPECT_FALSE(animator()->IsAnimating()); | 176 EXPECT_FALSE(animator()->IsAnimating()); |
| 177 | 177 |
| 178 // Stopping should both cancel the delegate and delete it. | 178 // Stopping should both cancel the delegate and delete it. |
| 179 EXPECT_TRUE(OwnedDelegate::get_and_clear_deleted()); | 179 EXPECT_TRUE(OwnedDelegate::get_and_clear_deleted()); |
| 180 EXPECT_TRUE(OwnedDelegate::get_and_clear_canceled()); | 180 EXPECT_TRUE(OwnedDelegate::get_and_clear_canceled()); |
| 181 } | 181 } |
| OLD | NEW |