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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_unittest.mm

Issue 14689007: Instant Extended: Move omnibox dropdown by 2 pixels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #import "base/memory/scoped_nsobject.h" 8 #import "base/memory/scoped_nsobject.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 NSRect tabstrip = [[controller tabStripView] frame]; 250 NSRect tabstrip = [[controller tabStripView] frame];
251 NSRect toolbar = [[controller toolbarView] frame]; 251 NSRect toolbar = [[controller toolbarView] frame];
252 NSRect infobar = [[controller infoBarContainerView] frame]; 252 NSRect infobar = [[controller infoBarContainerView] frame];
253 NSRect contentArea = [[controller tabContentArea] frame]; 253 NSRect contentArea = [[controller tabContentArea] frame];
254 NSRect download = [[[controller downloadShelf] view] frame]; 254 NSRect download = [[[controller downloadShelf] view] frame];
255 255
256 EXPECT_EQ(NSMinY(contentView), NSMinY(download)); 256 EXPECT_EQ(NSMinY(contentView), NSMinY(download));
257 EXPECT_EQ(NSMaxY(download), NSMinY(contentArea)); 257 EXPECT_EQ(NSMaxY(download), NSMinY(contentArea));
258 258
259 CGFloat min_toolbar_height = [[controller toolbarController] 259 CGFloat min_toolbar_height = [[controller toolbarController]
260 desiredHeightForCompression:bookmarks::kBookmarkBarOverlap]; 260 desiredHeightForCompression:1];
261 EXPECT_EQ(NSMaxY(contentArea), NSMaxY(toolbar) - min_toolbar_height); 261 EXPECT_EQ(NSMaxY(contentArea), NSMaxY(toolbar) - min_toolbar_height);
262 262
263 // Bookmark bar frame is random memory when hidden. 263 // Bookmark bar frame is random memory when hidden.
264 if ([controller bookmarkBarVisible]) { 264 if ([controller bookmarkBarVisible]) {
265 NSRect bookmark = [[controller bookmarkView] frame]; 265 NSRect bookmark = [[controller bookmarkView] frame];
266 EXPECT_EQ(NSMaxY(infobar), NSMinY(bookmark)); 266 EXPECT_EQ(NSMaxY(infobar), NSMinY(bookmark));
267 EXPECT_EQ(NSMaxY(bookmark), NSMinY(toolbar)); 267 EXPECT_EQ(NSMaxY(bookmark), NSMinY(toolbar));
268 EXPECT_FALSE([[controller bookmarkView] isHidden]); 268 EXPECT_FALSE([[controller bookmarkView] isHidden]);
269 } else { 269 } else {
270 EXPECT_EQ(NSMaxY(infobar), NSMinY(toolbar)); 270 EXPECT_EQ(NSMaxY(infobar), NSMinY(toolbar));
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 testFullscreenWindow_.reset( 899 testFullscreenWindow_.reset(
900 [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,400,400) 900 [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,400,400)
901 styleMask:NSBorderlessWindowMask 901 styleMask:NSBorderlessWindowMask
902 backing:NSBackingStoreBuffered 902 backing:NSBackingStoreBuffered
903 defer:NO]); 903 defer:NO]);
904 return testFullscreenWindow_.get(); 904 return testFullscreenWindow_.get();
905 } 905 }
906 @end 906 @end
907 907
908 /* TODO(???): test other methods of BrowserWindowController */ 908 /* TODO(???): test other methods of BrowserWindowController */
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698