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

Unified Diff: chrome/browser/cocoa/browser_window_cocoa_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_cocoa.mm ('k') | chrome/browser/cocoa/browser_window_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/browser_window_cocoa_unittest.mm
===================================================================
--- chrome/browser/cocoa/browser_window_cocoa_unittest.mm (revision 19517)
+++ chrome/browser/cocoa/browser_window_cocoa_unittest.mm (working copy)
@@ -90,4 +90,34 @@
EXPECT_EQ(before, bwc->IsBookmarkBarVisible());
}
+@interface FakeController : NSWindowController {
+ BOOL fullscreen_;
+}
+@end
+
+@implementation FakeController
+- (void)setFullscreen:(BOOL)fullscreen {
+ fullscreen_ = fullscreen;
+}
+- (BOOL)isFullscreen {
+ return fullscreen_;
+}
+@end
+
+TEST_F(BrowserWindowCocoaTest, TestFullscreen) {
+ scoped_nsobject<FakeController> fake_controller_([[FakeController alloc]
+ init]);
+ BrowserWindowCocoaPong *bwc = new BrowserWindowCocoaPong(
+ browser_helper_.browser(),
+ (BrowserWindowController*)fake_controller_.get(),
+ cocoa_helper_.window());
+ scoped_ptr<BrowserWindowCocoaPong> scoped_bwc(bwc);
+
+ EXPECT_FALSE(bwc->IsFullscreen());
+ bwc->SetFullscreen(true);
+ EXPECT_TRUE(bwc->IsFullscreen());
+ bwc->SetFullscreen(false);
+ EXPECT_FALSE(bwc->IsFullscreen());
+}
+
/* TODO(???): test other methods of BrowserWindowCocoa */
Property changes on: chrome/browser/cocoa/browser_window_cocoa_unittest.mm
___________________________________________________________________
Name: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698