| OLD | NEW |
| 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/gfx/animation/animation_delegate.h" |
| 7 #include "ui/base/animation/linear_animation.h" | 7 #include "ui/gfx/animation/linear_animation.h" |
| 8 #include "ui/base/animation/test_animation_delegate.h" | 8 #include "ui/gfx/animation/test_animation_delegate.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| 11 #include "base/win/windows_version.h" | 11 #include "base/win/windows_version.h" |
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 namespace ui { | 14 namespace gfx { |
| 15 | 15 |
| 16 class AnimationTest: public testing::Test { | 16 class AnimationTest: public testing::Test { |
| 17 private: | 17 private: |
| 18 base::MessageLoopForUI message_loop_; | 18 base::MessageLoopForUI message_loop_; |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 /////////////////////////////////////////////////////////////////////////////// | 23 /////////////////////////////////////////////////////////////////////////////// |
| 24 // RunAnimation | 24 // RunAnimation |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 LinearAnimation animation(100, 60, NULL); | 148 LinearAnimation animation(100, 60, NULL); |
| 149 EXPECT_EQ(0.0, animation.GetCurrentValue()); | 149 EXPECT_EQ(0.0, animation.GetCurrentValue()); |
| 150 animation.Start(); | 150 animation.Start(); |
| 151 EXPECT_EQ(0.0, animation.GetCurrentValue()); | 151 EXPECT_EQ(0.0, animation.GetCurrentValue()); |
| 152 animation.End(); | 152 animation.End(); |
| 153 EXPECT_EQ(1.0, animation.GetCurrentValue()); | 153 EXPECT_EQ(1.0, animation.GetCurrentValue()); |
| 154 animation.Start(); | 154 animation.Start(); |
| 155 EXPECT_EQ(0.0, animation.GetCurrentValue()); | 155 EXPECT_EQ(0.0, animation.GetCurrentValue()); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace ui | 158 } // namespace gfx |
| OLD | NEW |