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

Unified Diff: ui/views/controls/button/menu_button_unittest.cc

Issue 2010083002: views/mus: Run some more tests from views_unittests in mus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/button/menu_button_unittest.cc
diff --git a/ui/views/controls/button/menu_button_unittest.cc b/ui/views/controls/button/menu_button_unittest.cc
index 8f453d737bbe2f98e8c0ebc3c0b80a4a14110374..3504a558258d315f8967649f1b5f056698f0cbe6 100644
--- a/ui/views/controls/button/menu_button_unittest.cc
+++ b/ui/views/controls/button/menu_button_unittest.cc
@@ -88,8 +88,7 @@ class MenuButtonTest : public ViewsTestBase {
private:
void CreateMenuButton(MenuButtonListener* menu_button_listener) {
CreateWidget();
- generator_.reset(new ui::test::EventGenerator(GetContext(),
- widget_->GetNativeWindow()));
+ generator_.reset(new ui::test::EventGenerator(widget_->GetNativeWindow()));
// Set initial mouse location in a consistent way so that the menu button we
// are about to create initializes its hover state in a consistent manner.
generator_->set_current_location(gfx::Point(10, 10));
@@ -354,6 +353,10 @@ TEST_F(MenuButtonTest, ActivateDropDownOnMouseClick) {
// Test that the MenuButton stays pressed while there are any PressedLocks.
TEST_F(MenuButtonTest, ButtonStateForMenuButtonsWithPressedLocks) {
+ // Hovered-state is not updated under mus when EventGenerator send a
+ // mouse-move event. https://crbug.com/615033
+ if (IsMus())
+ return;
CreateMenuButtonWithNoListener();
// Move the mouse over the button; the button should be in a hovered state.
@@ -542,6 +545,10 @@ TEST_F(MenuButtonTest,
// Tests that the MenuButton does not become pressed if it can be dragged, and a
// DragDropClient is processing the events.
TEST_F(MenuButtonTest, DraggableMenuButtonDoesNotActivateOnDrag) {
+ // The test uses drag-n-drop, which isn't yet supported on mus.
+ // https://crbug.com/614037.
+ if (IsMus())
+ return;
TestMenuButtonListener menu_button_listener;
CreateMenuButtonWithMenuButtonListener(&menu_button_listener);
TestDragController drag_controller;
@@ -564,6 +571,10 @@ TEST_F(MenuButtonTest, DraggableMenuButtonDoesNotActivateOnDrag) {
// Tests if the listener is notified correctly when a gesture tap happens on a
// MenuButton that has a MenuButtonListener.
TEST_F(MenuButtonTest, ActivateDropDownOnGestureTap) {
+ // Hovered-state is not updated under mus when EventGenerator send a
+ // mouse-move event. https://crbug.com/615033
+ if (IsMus())
+ return;
TestMenuButtonListener menu_button_listener;
CreateMenuButtonWithMenuButtonListener(&menu_button_listener);
« no previous file with comments | « ui/views/controls/button/label_button_unittest.cc ('k') | ui/views/controls/menu/menu_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698