| 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_highlight.h" | 5 #include "ui/views/animation/ink_drop_highlight.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // Observer of the test target. | 33 // Observer of the test target. |
| 34 TestInkDropHighlightObserver observer_; | 34 TestInkDropHighlightObserver observer_; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(InkDropHighlightTest); | 37 DISALLOW_COPY_AND_ASSIGN(InkDropHighlightTest); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 InkDropHighlightTest::InkDropHighlightTest() | 40 InkDropHighlightTest::InkDropHighlightTest() |
| 41 : ink_drop_highlight_(new InkDropHighlight(gfx::Size(10, 10), | 41 : ink_drop_highlight_(new InkDropHighlight(gfx::Size(10, 10), |
| 42 3, | 42 3, |
| 43 gfx::Point(), | 43 gfx::PointF(), |
| 44 SK_ColorBLACK)), | 44 SK_ColorBLACK)), |
| 45 test_api_(ink_drop_highlight_.get()) { | 45 test_api_(ink_drop_highlight_.get()) { |
| 46 ink_drop_highlight_->set_observer(&observer_); | 46 ink_drop_highlight_->set_observer(&observer_); |
| 47 | 47 |
| 48 test_api_.SetDisableAnimationTimers(true); | 48 test_api_.SetDisableAnimationTimers(true); |
| 49 } | 49 } |
| 50 | 50 |
| 51 InkDropHighlightTest::~InkDropHighlightTest() {} | 51 InkDropHighlightTest::~InkDropHighlightTest() {} |
| 52 | 52 |
| 53 TEST_F(InkDropHighlightTest, InitialStateAfterConstruction) { | 53 TEST_F(InkDropHighlightTest, InitialStateAfterConstruction) { |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 EXPECT_EQ(1, observer_.last_animation_started_ordinal()); | 146 EXPECT_EQ(1, observer_.last_animation_started_ordinal()); |
| 147 EXPECT_EQ(2, observer_.last_animation_ended_ordinal()); | 147 EXPECT_EQ(2, observer_.last_animation_ended_ordinal()); |
| 148 EXPECT_EQ(InkDropHighlight::FADE_IN, | 148 EXPECT_EQ(InkDropHighlight::FADE_IN, |
| 149 observer_.last_animation_ended_context()); | 149 observer_.last_animation_ended_context()); |
| 150 EXPECT_EQ(InkDropAnimationEndedReason::PRE_EMPTED, | 150 EXPECT_EQ(InkDropAnimationEndedReason::PRE_EMPTED, |
| 151 observer_.last_animation_ended_reason()); | 151 observer_.last_animation_ended_reason()); |
| 152 } | 152 } |
| 153 | 153 |
| 154 } // namespace test | 154 } // namespace test |
| 155 } // namespace views | 155 } // namespace views |
| OLD | NEW |