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

Side by Side Diff: chrome/browser/cocoa/toolbar_controller_unittest.mm

Issue 178007: [Mac] Tweaks to Omnibox metrics. (Closed)
Patch Set: Oops, fixed unit test. 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "base/scoped_nsobject.h" 7 #import "base/scoped_nsobject.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/browser/cocoa/browser_test_helper.h" 9 #include "chrome/browser/cocoa/browser_test_helper.h"
10 #import "chrome/browser/cocoa/cocoa_test_helper.h" 10 #import "chrome/browser/cocoa/cocoa_test_helper.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 NSRect locationFrame = 265 NSRect locationFrame =
266 [locationBar convertRect:[locationBar bounds] toView:nil]; 266 [locationBar convertRect:[locationBar bounds] toView:nil];
267 // The frame of the popup in window base coordinates. 267 // The frame of the popup in window base coordinates.
268 gfx::Rect popupFrame = [bar_ autocompletePopupPosition]; 268 gfx::Rect popupFrame = [bar_ autocompletePopupPosition];
269 269
270 // Make sure the popup starts to the left of and ends to the right of the 270 // Make sure the popup starts to the left of and ends to the right of the
271 // location bar. 271 // location bar.
272 EXPECT_LT(popupFrame.x(), NSMinX(locationFrame)); 272 EXPECT_LT(popupFrame.x(), NSMinX(locationFrame));
273 EXPECT_GT(popupFrame.right(), NSMaxX(locationFrame)); 273 EXPECT_GT(popupFrame.right(), NSMaxX(locationFrame));
274 274
275 // Make sure the popup frame is positioned at the bottom of the location bar. 275 // Make sure the popup frame is positioned above the bottom of the
276 EXPECT_EQ(popupFrame.bottom(), NSMinY(locationFrame)); 276 // location bar.
277 EXPECT_GE(popupFrame.bottom(), NSMinY(locationFrame));
277 } 278 }
278 279
279 280
280 281
281 } // namespace 282 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/toolbar_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698