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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_action_button_interactive_uitest.mm

Issue 1888133002: [Extensions UI Mac] Fix a bug with popped out actions' highlighted state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: chrome/browser/ui/cocoa/extensions/browser_action_button_interactive_uitest.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_action_button_interactive_uitest.mm b/chrome/browser/ui/cocoa/extensions/browser_action_button_interactive_uitest.mm
index ff11027f9fd07fcb118f5db9fd3182037ecfc481..4154faf0e061ce699ef7e934ee8a105430756755 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_action_button_interactive_uitest.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_action_button_interactive_uitest.mm
@@ -277,6 +277,9 @@ void CheckActionIsPoppedOut(BrowserActionsController* actionsController,
EXPECT_EQ([actionsController containerView], [actionButton superview]);
EXPECT_EQ([actionButton viewController],
[actionsController toolbarActionsBar]->popped_out_action());
+ // Since the button is popped out for a popup or context menu, it should be
+ // highlighted.
+ EXPECT_TRUE([actionButton isHighlighted]);
}
// Test that opening a context menu works for both actions on the main bar and
@@ -321,6 +324,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionButtonUiTest,
runLoop.Run();
// The menu should have opened from the click.
EXPECT_TRUE([menuHelper menuOpened]);
+ EXPECT_FALSE([actionButton isHighlighted]);
}
// Reset the menu helper so we can use it again.
@@ -356,6 +360,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionButtonUiTest,
// action button, not the overflow's. Since Cocoa doesn't support running
// a menu-within-a-menu, this is what has to happen.
EXPECT_TRUE([menuHelper menuOpened]);
+ EXPECT_FALSE([actionButton isHighlighted]);
}
}

Powered by Google App Engine
This is Rietveld 408576698