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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc

Issue 1495973002: [Views] If a sibling menu is selected, reset the MenuButton's PressedLock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fix Created 5 years 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
« no previous file with comments | « no previous file | ui/views/controls/button/menu_button.cc » ('j') | ui/views/controls/button/menu_button.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
index 9cae542d0d1c9ba9510066a33f80e83c1faf5631..283c9ea98d429439519e9fd071e46dd59e50a8c0 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -1716,8 +1716,11 @@ class BookmarkBarViewTest18 : public BookmarkBarViewEventTestBase {
views::MenuItemView* menu = bb_view_->GetMenu();
ASSERT_TRUE(menu != NULL);
ASSERT_TRUE(menu->GetSubmenu()->IsShowing());
+ // The button should be pressed.
+ EXPECT_EQ(views::Button::STATE_PRESSED,
+ bb_view_->other_bookmarks_button()->state());
- // Move the mouse to the first folder on the bookmark bar
+ // Move the mouse to the first folder on the bookmark bar.
views::LabelButton* button = GetBookmarkButton(0);
gfx::Point button_center(button->width() / 2, button->height() / 2);
views::View::ConvertPointToScreen(button, &button_center);
@@ -1733,9 +1736,12 @@ class BookmarkBarViewTest18 : public BookmarkBarViewEventTestBase {
ASSERT_TRUE(menu->GetSubmenu()->IsShowing());
// The menu for the first folder should be in the pressed state (since the
- // menu is showing for it).
+ // menu is showing for it)...
EXPECT_EQ(views::CustomButton::STATE_PRESSED,
GetBookmarkButton(0)->state());
+ // ... And the "other bookmarks" button should no longer be pressed.
+ EXPECT_EQ(views::Button::STATE_NORMAL,
+ bb_view_->other_bookmarks_button()->state());
menu->GetMenuController()->CancelAll();
« no previous file with comments | « no previous file | ui/views/controls/button/menu_button.cc » ('j') | ui/views/controls/button/menu_button.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698