Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: ui/base/animation/slide_animation_unittest.cc

Issue 6154001: Move animation code to new ui/base/animation directory.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/animation/slide_animation.cc ('k') | ui/base/animation/test_animation_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "app/slide_animation.h"
6 #include "app/test_animation_delegate.h"
7 #include "base/scoped_ptr.h" 5 #include "base/scoped_ptr.h"
8 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "ui/base/animation/slide_animation.h"
8 #include "ui/base/animation/test_animation_delegate.h"
9
10 namespace ui {
9 11
10 class SlideAnimationTest: public testing::Test { 12 class SlideAnimationTest: public testing::Test {
11 private: 13 private:
12 MessageLoopForUI message_loop_; 14 MessageLoopForUI message_loop_;
13 }; 15 };
14 16
15 // Tests that delegate is not notified when animation is running and is deleted. 17 // Tests that delegate is not notified when animation is running and is deleted.
16 // (Such a scenario would cause problems for BoundsAnimator). 18 // (Such a scenario would cause problems for BoundsAnimator).
17 TEST_F(SlideAnimationTest, DontNotifyOnDelete) { 19 TEST_F(SlideAnimationTest, DontNotifyOnDelete) {
18 TestAnimationDelegate delegate; 20 TestAnimationDelegate delegate;
19 scoped_ptr<SlideAnimation> animation(new SlideAnimation(&delegate)); 21 scoped_ptr<SlideAnimation> animation(new SlideAnimation(&delegate));
20 22
21 // Start the animation. 23 // Start the animation.
22 animation->Show(); 24 animation->Show();
23 25
24 // Delete the animation. 26 // Delete the animation.
25 animation.reset(); 27 animation.reset();
26 28
27 // Make sure the delegate wasn't notified. 29 // Make sure the delegate wasn't notified.
28 EXPECT_FALSE(delegate.finished()); 30 EXPECT_FALSE(delegate.finished());
29 EXPECT_FALSE(delegate.canceled()); 31 EXPECT_FALSE(delegate.canceled());
30 } 32 }
33
34 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/animation/slide_animation.cc ('k') | ui/base/animation/test_animation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698