| 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 "ui/views/animation/ink_drop_factory.h" | 5 #include "ui/views/animation/ink_drop_factory.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/test/test_mock_time_task_runner.h" | 10 #include "base/test/test_mock_time_task_runner.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 InkDropFactory::CreateInkDrop(&test_ink_drop_host_).release()); | 61 InkDropFactory::CreateInkDrop(&test_ink_drop_host_).release()); |
| 62 | 62 |
| 63 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( | 63 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( |
| 64 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); | 64 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); |
| 65 | 65 |
| 66 switch (GetMaterialMode()) { | 66 switch (GetMaterialMode()) { |
| 67 case ui::MaterialDesignController::NON_MATERIAL: | 67 case ui::MaterialDesignController::NON_MATERIAL: |
| 68 break; | 68 break; |
| 69 case ui::MaterialDesignController::MATERIAL_NORMAL: | 69 case ui::MaterialDesignController::MATERIAL_NORMAL: |
| 70 case ui::MaterialDesignController::MATERIAL_HYBRID: | 70 case ui::MaterialDesignController::MATERIAL_HYBRID: |
| 71 // The Timer's used by the InkDropAnimationControllerImpl class require a | 71 // The Timer's used by the InkDropImpl class require a |
| 72 // base::ThreadTaskRunnerHandle instance. | 72 // base::ThreadTaskRunnerHandle instance. |
| 73 scoped_refptr<base::TestMockTimeTaskRunner> task_runner( | 73 scoped_refptr<base::TestMockTimeTaskRunner> task_runner( |
| 74 new base::TestMockTimeTaskRunner); | 74 new base::TestMockTimeTaskRunner); |
| 75 thread_task_runner_handle_.reset( | 75 thread_task_runner_handle_.reset( |
| 76 new base::ThreadTaskRunnerHandle(task_runner)); | 76 new base::ThreadTaskRunnerHandle(task_runner)); |
| 77 break; | 77 break; |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 InkDropFactoryTest::~InkDropFactoryTest() { | 81 InkDropFactoryTest::~InkDropFactoryTest() { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 TEST_P(InkDropFactoryTest, TypicalSlowActivated) { | 150 TEST_P(InkDropFactoryTest, TypicalSlowActivated) { |
| 151 ink_drop_->AnimateToState(InkDropState::ACTION_PENDING); | 151 ink_drop_->AnimateToState(InkDropState::ACTION_PENDING); |
| 152 ink_drop_->AnimateToState(InkDropState::ALTERNATE_ACTION_PENDING); | 152 ink_drop_->AnimateToState(InkDropState::ALTERNATE_ACTION_PENDING); |
| 153 ink_drop_->AnimateToState(InkDropState::ACTIVATED); | 153 ink_drop_->AnimateToState(InkDropState::ACTIVATED); |
| 154 ink_drop_->AnimateToState(InkDropState::DEACTIVATED); | 154 ink_drop_->AnimateToState(InkDropState::DEACTIVATED); |
| 155 EXPECT_EQ(InkDropState::HIDDEN, ink_drop_->GetTargetInkDropState()); | 155 EXPECT_EQ(InkDropState::HIDDEN, ink_drop_->GetTargetInkDropState()); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace views | 158 } // namespace views |
| OLD | NEW |