OLD | NEW |
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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, TestTopRightForBubble) { | 436 TEST_F(BrowserWindowControllerTest, TestTopRightForBubble) { |
437 NSPoint p = [controller_ topRightForBubble]; | 437 NSPoint p = [controller_ pointForBubbleArrowTip]; |
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 right | 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_GT(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) { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 */ |
OLD | NEW |