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

Unified Diff: ui/base/animation/animation_unittest.cc

Issue 10855151: Gradient overlay for constrained window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | ui/base/animation/linear_animation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/animation/animation_unittest.cc
diff --git a/ui/base/animation/animation_unittest.cc b/ui/base/animation/animation_unittest.cc
index 7d87600444fcf143b3b1f1475f5294e0a484af3c..3961aae688e1456decb5a2a2a5b2297f3927df2a 100644
--- a/ui/base/animation/animation_unittest.cc
+++ b/ui/base/animation/animation_unittest.cc
@@ -143,4 +143,16 @@ TEST_F(AnimationTest, ShouldRenderRichAnimation) {
#endif
}
+// Test that current value is always 0 after Start() is called.
+TEST_F(AnimationTest, StartState) {
+ LinearAnimation animation(100, 60, NULL);
+ EXPECT_EQ(0.0, animation.GetCurrentValue());
+ animation.Start();
+ EXPECT_EQ(0.0, animation.GetCurrentValue());
+ animation.End();
+ EXPECT_EQ(1.0, animation.GetCurrentValue());
+ animation.Start();
+ EXPECT_EQ(0.0, animation.GetCurrentValue());
+}
+
} // namespace ui
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | ui/base/animation/linear_animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698