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

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

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/animation_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/time.h" 6 #include "base/time.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/base/animation/slide_animation.h" 8 #include "ui/base/animation/slide_animation.h"
9 #include "ui/base/animation/test_animation_delegate.h" 9 #include "ui/base/animation/test_animation_delegate.h"
10 10
(...skipping 15 matching lines...) Expand all
26 private: 26 private:
27 SlideAnimation* animation_; 27 SlideAnimation* animation_;
28 28
29 DISALLOW_COPY_AND_ASSIGN(TestApi); 29 DISALLOW_COPY_AND_ASSIGN(TestApi);
30 }; 30 };
31 31
32 //////////////////////////////////////////////////////////////////////////////// 32 ////////////////////////////////////////////////////////////////////////////////
33 // SlideAnimationTest 33 // SlideAnimationTest
34 class SlideAnimationTest: public testing::Test { 34 class SlideAnimationTest: public testing::Test {
35 private: 35 private:
36 MessageLoopForUI message_loop_; 36 base::MessageLoopForUI message_loop_;
37 }; 37 };
38 38
39 // Tests animation construction. 39 // Tests animation construction.
40 TEST_F(SlideAnimationTest, InitialState) { 40 TEST_F(SlideAnimationTest, InitialState) {
41 SlideAnimation animation(NULL); 41 SlideAnimation animation(NULL);
42 // By default, slide animations are 60 Hz, so the timer interval should be 42 // By default, slide animations are 60 Hz, so the timer interval should be
43 // 1/60th of a second. 43 // 1/60th of a second.
44 EXPECT_EQ(1000 / 60, animation.timer_interval().InMilliseconds()); 44 EXPECT_EQ(1000 / 60, animation.timer_interval().InMilliseconds());
45 // Duration defaults to 120 ms. 45 // Duration defaults to 120 ms.
46 EXPECT_EQ(120, animation.GetSlideDuration()); 46 EXPECT_EQ(120, animation.GetSlideDuration());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 // Delete the animation. 96 // Delete the animation.
97 animation.reset(); 97 animation.reset();
98 98
99 // Make sure the delegate wasn't notified. 99 // Make sure the delegate wasn't notified.
100 EXPECT_FALSE(delegate.finished()); 100 EXPECT_FALSE(delegate.finished());
101 EXPECT_FALSE(delegate.canceled()); 101 EXPECT_FALSE(delegate.canceled());
102 } 102 }
103 103
104 } // namespace ui 104 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/animation/animation_unittest.cc ('k') | ui/base/animation/test_animation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698