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

Side by Side Diff: ui/views/controls/button/custom_button_unittest.cc

Issue 1390113006: Added material design mouse hover feedback support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master. Created 4 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/controls/button/custom_button.h" 5 #include "ui/views/controls/button/custom_button.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/base/layout.h" 10 #include "ui/base/layout.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 case InkDropState::HIDDEN: 116 case InkDropState::HIDDEN:
117 *ink_hidden_ = true; 117 *ink_hidden_ = true;
118 break; 118 break;
119 case InkDropState::QUICK_ACTION: 119 case InkDropState::QUICK_ACTION:
120 case InkDropState::SLOW_ACTION: 120 case InkDropState::SLOW_ACTION:
121 case InkDropState::DEACTIVATED: 121 case InkDropState::DEACTIVATED:
122 break; 122 break;
123 } 123 }
124 } 124 }
125 125
126 void SetHovered(bool is_hovered) override {}
127
126 private: 128 private:
127 InkDropHost* ink_drop_host_; 129 InkDropHost* ink_drop_host_;
128 bool* ink_shown_; 130 bool* ink_shown_;
129 bool* ink_hidden_; 131 bool* ink_hidden_;
130 132
131 DISALLOW_COPY_AND_ASSIGN(TestInkDropDelegate); 133 DISALLOW_COPY_AND_ASSIGN(TestInkDropDelegate);
132 }; 134 };
133 135
134 // A test Button class that owns a TestInkDropDelegate. 136 // A test Button class that owns a TestInkDropDelegate.
135 class TestButtonWithInkDrop : public TestCustomButton { 137 class TestButtonWithInkDrop : public TestCustomButton {
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 generator.PressLeftButton(); 468 generator.PressLeftButton();
467 EXPECT_TRUE(ink_shown()); 469 EXPECT_TRUE(ink_shown());
468 EXPECT_FALSE(ink_hidden()); 470 EXPECT_FALSE(ink_hidden());
469 471
470 widget()->SetCapture(button()); 472 widget()->SetCapture(button());
471 widget()->ReleaseCapture(); 473 widget()->ReleaseCapture();
472 EXPECT_TRUE(ink_hidden()); 474 EXPECT_TRUE(ink_hidden());
473 } 475 }
474 476
475 } // namespace views 477 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698