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

Unified Diff: chrome/browser/cocoa/toolbar_controller_unittest.mm

Issue 194110: Convert the AutocompletePopupPositioner into a BubblePositioner in preparatio... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/cocoa/toolbar_controller_unittest.mm
===================================================================
--- chrome/browser/cocoa/toolbar_controller_unittest.mm (revision 26251)
+++ chrome/browser/cocoa/toolbar_controller_unittest.mm (working copy)
@@ -273,7 +273,7 @@
EXPECT_TRUE(NSContainsRect(all, star));
}
-TEST_F(ToolbarControllerTest, AutocompletePopupPosition) {
+TEST_F(ToolbarControllerTest, BubblePosition) {
NSView* locationBar = [[bar_ toolbarViews] objectAtIndex:kLocationIndex];
// The window frame (in window base coordinates).
@@ -281,17 +281,14 @@
// The frame of the location bar in window base coordinates.
NSRect locationFrame =
[locationBar convertRect:[locationBar bounds] toView:nil];
- // The frame of the popup in window base coordinates.
- gfx::Rect popupFrame = [bar_ autocompletePopupPosition];
+ // The frame of the location stack in window base coordinates. The horizontal
+ // coordinates here are used for the omnibox dropdown.
+ gfx::Rect locationStackFrame = [bar_ locationStackBounds];
- // Make sure the popup starts to the left of and ends to the right of the
- // location bar.
- EXPECT_LT(popupFrame.x(), NSMinX(locationFrame));
- EXPECT_GT(popupFrame.right(), NSMaxX(locationFrame));
-
- // Make sure the popup frame is positioned above the bottom of the
- // location bar.
- EXPECT_GE(popupFrame.bottom(), NSMinY(locationFrame));
+ // Make sure the location stack starts to the left of and ends to the right of
+ // the location bar.
+ EXPECT_LT(locationStackFrame.x(), NSMinX(locationFrame));
+ EXPECT_GT(locationStackFrame.right(), NSMaxX(locationFrame));
}
TEST_F(ToolbarControllerTest, HoverButtonForEvent) {

Powered by Google App Engine
This is Rietveld 408576698