| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ | 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ |
| 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ | 6 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 TEST_F(InkDropAnimationTest, AnimateToActionPending) { | 56 TEST_F(InkDropAnimationTest, AnimateToActionPending) { |
| 57 scoped_ptr<InkDropAnimation> ink_drop_animation = CreateInkDropAnimation(); | 57 scoped_ptr<InkDropAnimation> ink_drop_animation = CreateInkDropAnimation(); |
| 58 ink_drop_animation->AnimateToState(views::InkDropState::ACTION_PENDING); | 58 ink_drop_animation->AnimateToState(views::InkDropState::ACTION_PENDING); |
| 59 EXPECT_EQ(views::InkDropState::ACTION_PENDING, | 59 EXPECT_EQ(views::InkDropState::ACTION_PENDING, |
| 60 ink_drop_animation->ink_drop_state()); | 60 ink_drop_animation->ink_drop_state()); |
| 61 } | 61 } |
| 62 | 62 |
| 63 TEST_F(InkDropAnimationTest, AnimateToQuickAction) { | 63 TEST_F(InkDropAnimationTest, AnimateToQuickAction) { |
| 64 scoped_ptr<InkDropAnimation> ink_drop_animation = CreateInkDropAnimation(); | 64 scoped_ptr<InkDropAnimation> ink_drop_animation = CreateInkDropAnimation(); |
| 65 ink_drop_animation->AnimateToState(views::InkDropState::ACTION_PENDING); |
| 65 ink_drop_animation->AnimateToState(views::InkDropState::QUICK_ACTION); | 66 ink_drop_animation->AnimateToState(views::InkDropState::QUICK_ACTION); |
| 66 EXPECT_EQ(views::InkDropState::QUICK_ACTION, | 67 EXPECT_EQ(views::InkDropState::QUICK_ACTION, |
| 67 ink_drop_animation->ink_drop_state()); | 68 ink_drop_animation->ink_drop_state()); |
| 68 } | 69 } |
| 69 | 70 |
| 70 TEST_F(InkDropAnimationTest, AnimateToSlowActionPending) { | 71 TEST_F(InkDropAnimationTest, AnimateToSlowActionPending) { |
| 71 scoped_ptr<InkDropAnimation> ink_drop_animation = CreateInkDropAnimation(); | 72 scoped_ptr<InkDropAnimation> ink_drop_animation = CreateInkDropAnimation(); |
| 73 ink_drop_animation->AnimateToState(views::InkDropState::ACTION_PENDING); |
| 72 ink_drop_animation->AnimateToState(views::InkDropState::SLOW_ACTION_PENDING); | 74 ink_drop_animation->AnimateToState(views::InkDropState::SLOW_ACTION_PENDING); |
| 73 EXPECT_EQ(views::InkDropState::SLOW_ACTION_PENDING, | 75 EXPECT_EQ(views::InkDropState::SLOW_ACTION_PENDING, |
| 74 ink_drop_animation->ink_drop_state()); | 76 ink_drop_animation->ink_drop_state()); |
| 75 } | 77 } |
| 76 | 78 |
| 77 TEST_F(InkDropAnimationTest, AnimateToSlowAction) { | 79 TEST_F(InkDropAnimationTest, AnimateToSlowAction) { |
| 78 scoped_ptr<InkDropAnimation> ink_drop_animation = CreateInkDropAnimation(); | 80 scoped_ptr<InkDropAnimation> ink_drop_animation = CreateInkDropAnimation(); |
| 81 ink_drop_animation->AnimateToState(views::InkDropState::ACTION_PENDING); |
| 82 ink_drop_animation->AnimateToState(views::InkDropState::SLOW_ACTION_PENDING); |
| 79 ink_drop_animation->AnimateToState(views::InkDropState::SLOW_ACTION); | 83 ink_drop_animation->AnimateToState(views::InkDropState::SLOW_ACTION); |
| 80 EXPECT_EQ(views::InkDropState::SLOW_ACTION, | 84 EXPECT_EQ(views::InkDropState::SLOW_ACTION, |
| 81 ink_drop_animation->ink_drop_state()); | 85 ink_drop_animation->ink_drop_state()); |
| 82 } | 86 } |
| 83 | 87 |
| 84 TEST_F(InkDropAnimationTest, AnimateToActivated) { | 88 TEST_F(InkDropAnimationTest, AnimateToActivated) { |
| 85 scoped_ptr<InkDropAnimation> ink_drop_animation = CreateInkDropAnimation(); | 89 scoped_ptr<InkDropAnimation> ink_drop_animation = CreateInkDropAnimation(); |
| 86 ink_drop_animation->AnimateToState(views::InkDropState::ACTIVATED); | 90 ink_drop_animation->AnimateToState(views::InkDropState::ACTIVATED); |
| 87 EXPECT_EQ(views::InkDropState::ACTIVATED, | 91 EXPECT_EQ(views::InkDropState::ACTIVATED, |
| 88 ink_drop_animation->ink_drop_state()); | 92 ink_drop_animation->ink_drop_state()); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 EXPECT_EQ(gfx::Point(0, -kHalfTransformedHeight), | 299 EXPECT_EQ(gfx::Point(0, -kHalfTransformedHeight), |
| 296 TransformPoint(kVerticalTransform, top_mid)); | 300 TransformPoint(kVerticalTransform, top_mid)); |
| 297 EXPECT_EQ(gfx::Point(0, kHalfTransformedHeight), | 301 EXPECT_EQ(gfx::Point(0, kHalfTransformedHeight), |
| 298 TransformPoint(kVerticalTransform, bottom_mid)); | 302 TransformPoint(kVerticalTransform, bottom_mid)); |
| 299 } | 303 } |
| 300 | 304 |
| 301 } // namespace test | 305 } // namespace test |
| 302 } // namespace views | 306 } // namespace views |
| 303 | 307 |
| 304 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ | 308 #endif // UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_UNITTEST_H_ |
| OLD | NEW |