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

Side by Side Diff: app/animation_container_unittest.cc

Issue 5950003: Remove CrApplication dependency from base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: '' Created 10 years 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 | « no previous file | app/test_suite.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) 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/animation_container.h" 5 #include "app/animation_container.h"
6 #include "app/animation_container_observer.h" 6 #include "app/animation_container_observer.h"
7 #include "app/linear_animation.h" 7 #include "app/linear_animation.h"
8 #include "app/test_animation_delegate.h" 8 #include "app/test_animation_delegate.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // We expect to get these two calls: the animation progressed, and then when 102 // We expect to get these two calls: the animation progressed, and then when
103 // the animation completed the container went empty. 103 // the animation completed the container went empty.
104 EXPECT_CALL(observer, AnimationContainerProgressed(container.get())).Times( 104 EXPECT_CALL(observer, AnimationContainerProgressed(container.get())).Times(
105 AtLeast(1)); 105 AtLeast(1));
106 EXPECT_CALL(observer, AnimationContainerEmpty(container.get())).Times(1); 106 EXPECT_CALL(observer, AnimationContainerEmpty(container.get())).Times(1);
107 107
108 // Start the animation. 108 // Start the animation.
109 animation1.Start(); 109 animation1.Start();
110 EXPECT_TRUE(container->is_running()); 110 EXPECT_TRUE(container->is_running());
111 111
112 // Run the message loop the delegate quits the message loop when notified. 112 // Run the message loop. The delegate quits the message loop when notified.
113 MessageLoop::current()->Run(); 113 MessageLoop::current()->Run();
114 114
115 // The timer should have finished. 115 // The timer should have finished.
116 EXPECT_TRUE(delegate1.finished()); 116 EXPECT_TRUE(delegate1.finished());
117 117
118 // And the container should no longer be runnings. 118 // And the container should no longer be running.
119 EXPECT_FALSE(container->is_running()); 119 EXPECT_FALSE(container->is_running());
120 120
121 container->set_observer(NULL); 121 container->set_observer(NULL);
122 } 122 }
OLDNEW
« no previous file with comments | « no previous file | app/test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698