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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | ui/base/animation/linear_animation.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) 2011 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/animation_delegate.h" 6 #include "ui/base/animation/animation_delegate.h"
7 #include "ui/base/animation/linear_animation.h" 7 #include "ui/base/animation/linear_animation.h"
8 #include "ui/base/animation/test_animation_delegate.h" 8 #include "ui/base/animation/test_animation_delegate.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } else { 136 } else {
137 // On XP, the function should check the SM_REMOTESESSION value. 137 // On XP, the function should check the SM_REMOTESESSION value.
138 EXPECT_EQ(!::GetSystemMetrics(SM_REMOTESESSION), 138 EXPECT_EQ(!::GetSystemMetrics(SM_REMOTESESSION),
139 Animation::ShouldRenderRichAnimation()); 139 Animation::ShouldRenderRichAnimation());
140 } 140 }
141 #else 141 #else
142 EXPECT_TRUE(Animation::ShouldRenderRichAnimation()); 142 EXPECT_TRUE(Animation::ShouldRenderRichAnimation());
143 #endif 143 #endif
144 } 144 }
145 145
146 // Test that current value is always 0 after Start() is called.
147 TEST_F(AnimationTest, StartState) {
148 LinearAnimation animation(100, 60, NULL);
149 EXPECT_EQ(0.0, animation.GetCurrentValue());
150 animation.Start();
151 EXPECT_EQ(0.0, animation.GetCurrentValue());
152 animation.End();
153 EXPECT_EQ(1.0, animation.GetCurrentValue());
154 animation.Start();
155 EXPECT_EQ(0.0, animation.GetCurrentValue());
156 }
157
146 } // namespace ui 158 } // namespace ui
OLDNEW
« 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