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

Unified Diff: chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc

Issue 1971463002: Get rid of some lingering MD-specific raster assets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msw review Created 4 years, 7 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/toolbar/browser_actions_bar_browsertest.cc
diff --git a/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc b/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc
index e4d6fc7752ac763981c93f479161c380dda9598b..c9c920cea36b816bf9a694bdb19a88c703beb814 100644
--- a/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc
+++ b/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc
@@ -209,7 +209,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionsBarBrowserTest, Visibility) {
EXPECT_EQ(extension_b()->id(), browser_actions_bar()->GetExtensionId(0));
// Enable A again. A should get its spot in the same location and the bar
- // should not grow (chevron is showing). For details: http://crbug.com/35349.
+ // should not grow. For details: http://crbug.com/35349.
// State becomes: A, [B, C].
EnableExtension(extension_a()->id());
EXPECT_EQ(3, browser_actions_bar()->NumberOfBrowserActions());
@@ -257,35 +257,37 @@ IN_PROC_BROWSER_TEST_F(BrowserActionsBarBrowserTest, Visibility) {
EXPECT_EQ(extension_a()->id(), browser_actions_bar()->GetExtensionId(0));
// Shrink the browser actions bar to zero visible icons.
- // No icons should be visible, but we *should* show the chevron and have a
+ // No icons should be visible, but we *should* overflow and have a
// non-empty size.
toolbar_model()->SetVisibleIconCount(0);
EXPECT_EQ(0, browser_actions_bar()->VisibleBrowserActions());
- EXPECT_TRUE(browser_actions_bar()->IsChevronShowing());
+ ToolbarActionsBar* toolbar_actions_bar =
+ browser_actions_bar()->GetToolbarActionsBar();
+ EXPECT_TRUE(toolbar_actions_bar->NeedsOverflow());
- // Reset visibility count to 2. State should be A, B, [C], and the chevron
- // should be visible.
+ // Reset visibility count to 2. State should be A, B, [C], and we should
+ // overflow.
toolbar_model()->SetVisibleIconCount(2);
EXPECT_EQ(2, browser_actions_bar()->VisibleBrowserActions());
EXPECT_EQ(extension_a()->id(), browser_actions_bar()->GetExtensionId(0));
EXPECT_EQ(extension_b()->id(), browser_actions_bar()->GetExtensionId(1));
- EXPECT_TRUE(browser_actions_bar()->IsChevronShowing());
+ EXPECT_TRUE(toolbar_actions_bar->NeedsOverflow());
- // Disable C (the overflowed extension). State should now be A, B, and the
- // chevron should be hidden.
+ // Disable C (the overflowed extension). State should now be A, B, and we
+ // should not overflow.
DisableExtension(extension_c()->id());
EXPECT_EQ(2, browser_actions_bar()->VisibleBrowserActions());
EXPECT_EQ(extension_a()->id(), browser_actions_bar()->GetExtensionId(0));
EXPECT_EQ(extension_b()->id(), browser_actions_bar()->GetExtensionId(1));
- EXPECT_FALSE(browser_actions_bar()->IsChevronShowing());
+ EXPECT_FALSE(toolbar_actions_bar->NeedsOverflow());
- // Re-enable C. We should still only have 2 visible icons, and the chevron
- // should be visible.
+ // Re-enable C. We should still only have 2 visible icons, still with
+ // overflow.
EnableExtension(extension_c()->id());
EXPECT_EQ(2, browser_actions_bar()->VisibleBrowserActions());
EXPECT_EQ(extension_a()->id(), browser_actions_bar()->GetExtensionId(0));
EXPECT_EQ(extension_b()->id(), browser_actions_bar()->GetExtensionId(1));
- EXPECT_TRUE(browser_actions_bar()->IsChevronShowing());
+ EXPECT_TRUE(toolbar_actions_bar->NeedsOverflow());
}
// Test that, with the toolbar action redesign, actions that want to run have
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | chrome/browser/ui/views/extensions/extension_installed_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698