Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: ui/views/animation/ink_drop_highlight_unittest.cc

Issue 2094343005: Fix MD button hover shadow effect on odd-sized buttons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698