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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 TEST_P(InkDropFactoryTest, | 98 TEST_P(InkDropFactoryTest, |
99 VerifyInkDropLayersRemovedAfterDestructionWhenRippleIsActive) { | 99 VerifyInkDropLayersRemovedAfterDestructionWhenRippleIsActive) { |
100 ink_drop_->AnimateToState(InkDropState::ACTION_PENDING); | 100 ink_drop_->AnimateToState(InkDropState::ACTION_PENDING); |
101 ink_drop_.reset(); | 101 ink_drop_.reset(); |
102 EXPECT_EQ(0, test_ink_drop_host_.num_ink_drop_layers()); | 102 EXPECT_EQ(0, test_ink_drop_host_.num_ink_drop_layers()); |
103 } | 103 } |
104 | 104 |
105 TEST_P(InkDropFactoryTest, | 105 TEST_P(InkDropFactoryTest, |
106 VerifyInkDropLayersRemovedAfterDestructionWhenHoverIsActive) { | 106 VerifyInkDropLayersRemovedAfterDestructionWhenHoverIsActive) { |
107 test_ink_drop_host_.set_should_show_hover(true); | 107 test_ink_drop_host_.set_should_show_highlight(true); |
108 ink_drop_->SetHovered(true); | 108 ink_drop_->SetHovered(true); |
109 ink_drop_.reset(); | 109 ink_drop_.reset(); |
110 EXPECT_EQ(0, test_ink_drop_host_.num_ink_drop_layers()); | 110 EXPECT_EQ(0, test_ink_drop_host_.num_ink_drop_layers()); |
111 } | 111 } |
112 | 112 |
113 TEST_P(InkDropFactoryTest, StateIsHiddenInitially) { | 113 TEST_P(InkDropFactoryTest, StateIsHiddenInitially) { |
114 EXPECT_EQ(InkDropState::HIDDEN, ink_drop_->GetTargetInkDropState()); | 114 EXPECT_EQ(InkDropState::HIDDEN, ink_drop_->GetTargetInkDropState()); |
115 } | 115 } |
116 | 116 |
117 TEST_P(InkDropFactoryTest, TypicalQuickAction) { | 117 TEST_P(InkDropFactoryTest, TypicalQuickAction) { |
(...skipping 31 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 |