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

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

Issue 2008763002: [Extensions UI] Remove all traces of the chevron (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit 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/toolbar_actions_bar_unittest.cc
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.cc b/chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.cc
index a127432e0dbf96d9c52b44fa883c2a173045ca14..5bca72dd260f0e53aeca4ad8e55034014ff5beae 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.cc
+++ b/chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.cc
@@ -224,11 +224,9 @@ TEST_P(ToolbarActionsBarUnitTest, BasicToolbarActionsBarTest) {
// Since all icons are showing, the current width should be the max width.
int maximum_width = expected_width;
EXPECT_EQ(maximum_width, toolbar_actions_bar()->GetMaximumWidth());
- // The minimum width should be just enough for the chevron to be displayed
- // along with left and right padding.
- int minimum_width = 2 * platform_settings.item_spacing +
- toolbar_actions_bar()->delegate_for_test()->
- GetChevronWidth();
+ // The minimum width should be be non-zero (as long as there are any icons) so
+ // we can render the grippy to allow the user to drag to adjust the width.
+ int minimum_width = platform_settings.item_spacing;
EXPECT_EQ(minimum_width, toolbar_actions_bar()->GetMinimumWidth());
// Test the connection between the ToolbarActionsBar and the model by
@@ -236,14 +234,12 @@ TEST_P(ToolbarActionsBarUnitTest, BasicToolbarActionsBarTest) {
toolbar_model()->SetVisibleIconCount(2u);
EXPECT_EQ(2u, toolbar_actions_bar()->GetIconCount());
- // The current width should now be enough for two icons, and the chevron.
+ // The current width should now be enough for two icons.
// IconWidth(true) includes the spacing to the left of each icon and
// |item_spacing| accounts for the spacing to the right of the rightmost
// icon.
expected_width = 2 * ToolbarActionsBar::IconWidth(true) +
- platform_settings.item_spacing +
- toolbar_actions_bar()->delegate_for_test()->
- GetChevronWidth();
+ platform_settings.item_spacing;
EXPECT_EQ(expected_width, toolbar_actions_bar()->GetPreferredSize().width());
// The maximum and minimum widths should have remained constant (since we have
// the same number of actions).
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_bar_delegate.h ('k') | chrome/browser/ui/views/toolbar/browser_actions_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698