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

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

Issue 11876036: Alternate NTP: Don't hide bookmark bar on instant (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 7 years, 11 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
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/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 void CheckViewPositions(BrowserWindowController* controller) { 260 void CheckViewPositions(BrowserWindowController* controller) {
261 NSRect contentView = [[[controller window] contentView] bounds]; 261 NSRect contentView = [[[controller window] contentView] bounds];
262 NSRect tabstrip = [[controller tabStripView] frame]; 262 NSRect tabstrip = [[controller tabStripView] frame];
263 NSRect toolbar = [[controller toolbarView] frame]; 263 NSRect toolbar = [[controller toolbarView] frame];
264 NSRect infobar = [[controller infoBarContainerView] frame]; 264 NSRect infobar = [[controller infoBarContainerView] frame];
265 NSRect contentArea = [[controller tabContentArea] frame]; 265 NSRect contentArea = [[controller tabContentArea] frame];
266 NSRect download = [[[controller downloadShelf] view] frame]; 266 NSRect download = [[[controller downloadShelf] view] frame];
267 267
268 EXPECT_EQ(NSMinY(contentView), NSMinY(download)); 268 EXPECT_EQ(NSMinY(contentView), NSMinY(download));
269 EXPECT_EQ(NSMaxY(download), NSMinY(contentArea)); 269 EXPECT_EQ(NSMaxY(download), NSMinY(contentArea));
270 EXPECT_EQ(NSMaxY(contentArea), NSMinY(infobar)); 270 EXPECT_EQ(NSMaxY(contentArea), NSMinY(toolbar));
271 271
272 // Bookmark bar frame is random memory when hidden. 272 // Bookmark bar frame is random memory when hidden.
273 if ([controller bookmarkBarVisible]) { 273 if ([controller bookmarkBarVisible]) {
274 NSRect bookmark = [[controller bookmarkView] frame]; 274 NSRect bookmark = [[controller bookmarkView] frame];
275 EXPECT_EQ(NSMaxY(infobar), NSMinY(bookmark)); 275 EXPECT_EQ(NSMaxY(infobar), NSMinY(bookmark));
276 EXPECT_EQ(NSMaxY(bookmark), NSMinY(toolbar)); 276 EXPECT_EQ(NSMaxY(bookmark), NSMinY(toolbar));
277 EXPECT_FALSE([[controller bookmarkView] isHidden]); 277 EXPECT_FALSE([[controller bookmarkView] isHidden]);
278 } else { 278 } else {
279 EXPECT_EQ(NSMaxY(infobar), NSMinY(toolbar)); 279 EXPECT_EQ(NSMaxY(infobar), NSMinY(toolbar));
280 EXPECT_TRUE([[controller bookmarkView] isHidden]); 280 EXPECT_TRUE([[controller bookmarkView] isHidden]);
(...skipping 618 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

Powered by Google App Engine
This is Rietveld 408576698