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 #include "base/macros.h" | 5 #include "base/macros.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/test/test_mock_time_task_runner.h" | 7 #include "base/test/test_mock_time_task_runner.h" |
8 #include "base/test/test_simple_task_runner.h" | |
9 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
10 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "ui/base/material_design/material_design_controller.h" | 11 #include "ui/base/material_design/material_design_controller.h" |
13 #include "ui/base/test/material_design_controller_test_api.h" | 12 #include "ui/base/test/material_design_controller_test_api.h" |
14 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 13 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
15 #include "ui/views/animation/ink_drop_animation_controller.h" | 14 #include "ui/views/animation/ink_drop_animation_controller.h" |
16 #include "ui/views/animation/ink_drop_animation_controller_factory.h" | 15 #include "ui/views/animation/ink_drop_animation_controller_factory.h" |
17 #include "ui/views/animation/ink_drop_animation_controller_impl.h" | 16 #include "ui/views/animation/ink_drop_animation_controller_impl.h" |
18 #include "ui/views/animation/ink_drop_host.h" | 17 #include "ui/views/animation/ink_drop_host.h" |
19 #include "ui/views/animation/ink_drop_state.h" | 18 #include "ui/views/animation/ink_drop_state.h" |
20 #include "ui/views/animation/test/test_ink_drop_host.h" | 19 #include "ui/views/animation/test/test_ink_drop_host.h" |
21 | 20 |
22 namespace views { | 21 namespace views { |
23 | |
24 class InkDropAnimationControllerFactoryTest | 22 class InkDropAnimationControllerFactoryTest |
25 : public testing::TestWithParam< | 23 : public testing::TestWithParam< |
26 testing::tuple<ui::MaterialDesignController::Mode>> { | 24 testing::tuple<ui::MaterialDesignController::Mode>> { |
27 public: | 25 public: |
28 InkDropAnimationControllerFactoryTest(); | 26 InkDropAnimationControllerFactoryTest(); |
29 ~InkDropAnimationControllerFactoryTest(); | 27 ~InkDropAnimationControllerFactoryTest(); |
30 | 28 |
31 protected: | 29 protected: |
32 // A dummy InkDropHost required to create an InkDropAnimationController. | 30 // A dummy InkDropHost required to create an InkDropAnimationController. |
33 TestInkDropHost test_ink_drop_host_; | 31 TestInkDropHost test_ink_drop_host_; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 ink_drop_animation_controller_->AnimateToState(InkDropState::ACTION_PENDING); | 160 ink_drop_animation_controller_->AnimateToState(InkDropState::ACTION_PENDING); |
163 ink_drop_animation_controller_->AnimateToState( | 161 ink_drop_animation_controller_->AnimateToState( |
164 InkDropState::SLOW_ACTION_PENDING); | 162 InkDropState::SLOW_ACTION_PENDING); |
165 ink_drop_animation_controller_->AnimateToState(InkDropState::ACTIVATED); | 163 ink_drop_animation_controller_->AnimateToState(InkDropState::ACTIVATED); |
166 ink_drop_animation_controller_->AnimateToState(InkDropState::DEACTIVATED); | 164 ink_drop_animation_controller_->AnimateToState(InkDropState::DEACTIVATED); |
167 EXPECT_EQ(InkDropState::HIDDEN, | 165 EXPECT_EQ(InkDropState::HIDDEN, |
168 ink_drop_animation_controller_->GetInkDropState()); | 166 ink_drop_animation_controller_->GetInkDropState()); |
169 } | 167 } |
170 | 168 |
171 } // namespace views | 169 } // namespace views |
OLD | NEW |