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

Unified Diff: chrome/browser/cocoa/browser_window_controller_unittest.mm

Issue 126294: Mac fullscreen mode (with pkasting). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/fullscreen_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/browser_window_controller_unittest.mm
===================================================================
--- chrome/browser/cocoa/browser_window_controller_unittest.mm (revision 19517)
+++ chrome/browser/cocoa/browser_window_controller_unittest.mm (working copy)
@@ -50,4 +50,31 @@
EXPECT_TRUE(prefs->GetDictionary(prefs::kBrowserWindowPlacement) != NULL);
}
+@interface BrowserWindowControllerFakeFullscreen : BrowserWindowController {
+}
+@end
+@implementation BrowserWindowControllerFakeFullscreen
+// This isn't needed to pass the test, but does prevent an actual
+// fullscreen from happening.
+- (NSWindow*)fullscreenWindow {
+ return nil;
+}
+@end
+
+TEST_F(BrowserWindowControllerTest, TestFullscreen) {
+ // Note use of "controller", not "controller_"
+ scoped_nsobject<BrowserWindowController> controller;
+ controller.reset([[BrowserWindowControllerFakeFullscreen alloc]
+ initWithBrowser:browser_helper_.browser()
+ takeOwnership:NO]);
+ EXPECT_FALSE([controller isFullscreen]);
+ [controller setFullscreen:YES];
+ EXPECT_TRUE([controller isFullscreen]);
+ [controller setFullscreen:NO];
+ EXPECT_FALSE([controller isFullscreen]);
+
+ // Confirm the real fullscreen command doesn't return nil
+ EXPECT_TRUE([controller_ fullscreenWindow]);
+}
+
/* TODO(???): test other methods of BrowserWindowController */
Property changes on: chrome/browser/cocoa/browser_window_controller_unittest.mm
___________________________________________________________________
Name: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/fullscreen_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698