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

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

Issue 1540009: [Mac] Move star button into page-actions area of omnibox. (Closed)
Patch Set: Why did the trybot fail? I can't see anything. Created 10 years, 8 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "app/l10n_util_mac.h" 5 #include "app/l10n_util_mac.h"
6 #include "base/scoped_nsobject.h" 6 #include "base/scoped_nsobject.h"
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 browser_helper_.profile()->GetPrefs()->SetBoolean( 426 browser_helper_.profile()->GetPrefs()->SetBoolean(
427 prefs::kShowBookmarkBar, true); 427 prefs::kShowBookmarkBar, true);
428 428
429 // Make sure the bookmark bar is the same width as the toolbar 429 // Make sure the bookmark bar is the same width as the toolbar
430 NSView* bookmarkBarView = [controller_ bookmarkView]; 430 NSView* bookmarkBarView = [controller_ bookmarkView];
431 NSView* toolbarView = [controller_ toolbarView]; 431 NSView* toolbarView = [controller_ toolbarView];
432 EXPECT_EQ([toolbarView frame].size.width, 432 EXPECT_EQ([toolbarView frame].size.width,
433 [bookmarkBarView frame].size.width); 433 [bookmarkBarView frame].size.width);
434 } 434 }
435 435
436 TEST_F(BrowserWindowControllerTest, TestTopLeftForBubble) { 436 TEST_F(BrowserWindowControllerTest, TestTopRightForBubble) {
437 NSPoint p = [controller_ topLeftForBubble]; 437 NSPoint p = [controller_ topRightForBubble];
438 NSRect all = [[controller_ window] frame]; 438 NSRect all = [[controller_ window] frame];
439 439
440 // As a sanity check make sure the point is vaguely in the top left 440 // As a sanity check make sure the point is vaguely in the top right
441 // of the window. 441 // of the window.
442 EXPECT_GT(p.y, all.origin.y + (all.size.height/2)); 442 EXPECT_GT(p.y, all.origin.y + (all.size.height/2));
443 EXPECT_LT(p.x, all.origin.x + (all.size.width/2)); 443 EXPECT_GT(p.x, all.origin.x + (all.size.width/2));
444 } 444 }
445 445
446 // By the "zoom frame", we mean what Apple calls the "standard frame". 446 // By the "zoom frame", we mean what Apple calls the "standard frame".
447 TEST_F(BrowserWindowControllerTest, TestZoomFrame) { 447 TEST_F(BrowserWindowControllerTest, TestZoomFrame) {
448 NSWindow* window = [controller_ window]; 448 NSWindow* window = [controller_ window];
449 ASSERT_TRUE(window); 449 ASSERT_TRUE(window);
450 NSRect screenFrame = [[window screen] visibleFrame]; 450 NSRect screenFrame = [[window screen] visibleFrame];
451 ASSERT_FALSE(NSIsEmptyRect(screenFrame)); 451 ASSERT_FALSE(NSIsEmptyRect(screenFrame));
452 452
453 // Minimum zoomed width is the larger of 60% of available horizontal space or 453 // Minimum zoomed width is the larger of 60% of available horizontal space or
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 fullscreenWindow_.reset( 616 fullscreenWindow_.reset(
617 [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,400,400) 617 [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,400,400)
618 styleMask:NSBorderlessWindowMask 618 styleMask:NSBorderlessWindowMask
619 backing:NSBackingStoreBuffered 619 backing:NSBackingStoreBuffered
620 defer:NO]); 620 defer:NO]);
621 return fullscreenWindow_.get(); 621 return fullscreenWindow_.get();
622 } 622 }
623 @end 623 @end
624 624
625 /* TODO(???): test other methods of BrowserWindowController */ 625 /* TODO(???): test other methods of BrowserWindowController */
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/location_bar_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698