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

Unified Diff: chrome/browser/ui/cocoa/framed_browser_window_unittest.mm

Issue 8568001: Fix FramedBrowserWindowTest.WindowWidgetLocation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/framed_browser_window_unittest.mm
diff --git a/chrome/browser/ui/cocoa/framed_browser_window_unittest.mm b/chrome/browser/ui/cocoa/framed_browser_window_unittest.mm
index 5de0038defc77c1805b11fa722185386d42f7f44..de88f68d6d8dfd6d86bf8bf7c9aad93ef6fa9513 100644
--- a/chrome/browser/ui/cocoa/framed_browser_window_unittest.mm
+++ b/chrome/browser/ui/cocoa/framed_browser_window_unittest.mm
@@ -100,7 +100,18 @@ TEST_F(FramedBrowserWindowTest, DoesHideTitle) {
// Test to make sure that our window widgets are in the right place.
TEST_F(FramedBrowserWindowTest, WindowWidgetLocation) {
- // First without tabstrip.
+ BOOL yes = YES;
+ BOOL no = NO;
+
+ // First without a tabstrip.
+ id controller = [OCMockObject mockForClass:[BrowserWindowController class]];
+ [[[controller stub] andReturnValue:OCMOCK_VALUE(yes)]
+ isKindOfClass:[BrowserWindowController class]];
Robert Sesek 2011/11/15 15:22:43 nit: indent 4
+ [[[controller expect] andReturnValue:OCMOCK_VALUE(no)] hasTabStrip];
+ [[[controller expect] andReturnValue:OCMOCK_VALUE(yes)] hasTitleBar];
+ [[[controller expect] andReturnValue:OCMOCK_VALUE(no)] isTabbedWindow];
+ [window_ setWindowController:controller];
+
NSView* closeBoxControl = [window_ standardWindowButton:NSWindowCloseButton];
EXPECT_TRUE(closeBoxControl);
NSRect closeBoxFrame = [closeBoxControl frame];
@@ -124,9 +135,7 @@ TEST_F(FramedBrowserWindowTest, WindowWidgetLocation) {
NSMaxX(closeBoxFrame) + [window_ windowButtonsInterButtonSpacing]);
// Then with a tabstrip.
- id controller = [OCMockObject mockForClass:[BrowserWindowController class]];
- BOOL yes = YES;
- BOOL no = NO;
+ controller = [OCMockObject mockForClass:[BrowserWindowController class]];
[[[controller stub] andReturnValue:OCMOCK_VALUE(yes)]
isKindOfClass:[BrowserWindowController class]];
[[[controller expect] andReturnValue:OCMOCK_VALUE(yes)] hasTabStrip];
@@ -156,4 +165,3 @@ TEST_F(FramedBrowserWindowTest, WindowWidgetLocation) {
NSMaxX(closeBoxFrame) + [window_ windowButtonsInterButtonSpacing]);
[window_ setWindowController:nil];
}
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698