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

Unified Diff: chrome/browser/ui/views/tabs/tab_unittest.cc

Issue 2360803002: Remove some pre-MD code from toolbar/tabstrip/frame. (Closed)
Patch Set: couple more Created 4 years, 3 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/views/tabs/tab_unittest.cc
diff --git a/chrome/browser/ui/views/tabs/tab_unittest.cc b/chrome/browser/ui/views/tabs/tab_unittest.cc
index 3c01b5ec26d42b138d54a10df4f945c882c5c6a7..e8a4140c32cb82fb3b417f829885b32af54f17e8 100644
--- a/chrome/browser/ui/views/tabs/tab_unittest.cc
+++ b/chrome/browser/ui/views/tabs/tab_unittest.cc
@@ -265,15 +265,13 @@ TEST_F(TabTest, HitTestTopPixel) {
int middle_y = tab.height() / 2;
EXPECT_FALSE(tab.HitTestPoint(gfx::Point(0, middle_y)));
- // Normally, tabs should not be hit if we click in the exclusion region, only
- // if we click below it.
- const int exclusion = GetLayoutConstant(TAB_TOP_EXCLUSION_HEIGHT);
+ // Tabs should not be hit if we click above them.
int middle_x = tab.width() / 2;
- EXPECT_FALSE(tab.HitTestPoint(gfx::Point(middle_x, exclusion - 1)));
- EXPECT_TRUE(tab.HitTestPoint(gfx::Point(middle_x, exclusion)));
+ EXPECT_FALSE(tab.HitTestPoint(gfx::Point(middle_x, -1)));
+ EXPECT_TRUE(tab.HitTestPoint(gfx::Point(middle_x, 0)));
- // If the window is maximized, however, we want clicks in the top edge to
- // select the tab.
+ // Make sure top edge clicks still select the tab when the window is
+ // maximized.
widget.Maximize();
EXPECT_TRUE(tab.HitTestPoint(gfx::Point(middle_x, 0)));

Powered by Google App Engine
This is Rietveld 408576698