diff options
author | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-29 23:56:11 +0000 |
---|---|---|
committer | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-29 23:56:11 +0000 |
commit | 893a5ccce13082aa85686ad142c0d8be0fb5cd70 (patch) | |
tree | 018c75351b722e9ae8258dcff804a53d6c422d65 /chrome/browser/cocoa/browser_window_cocoa_unittest.mm | |
parent | c3a7368e76527e15c1f2d2f06801a371bb5374e3 (diff) | |
download | chromium_src-893a5ccce13082aa85686ad142c0d8be0fb5cd70.zip chromium_src-893a5ccce13082aa85686ad142c0d8be0fb5cd70.tar.gz chromium_src-893a5ccce13082aa85686ad142c0d8be0fb5cd70.tar.bz2 |
Mac fullscreen mode (with pkasting).
TEST=Launch Chrome. Create a 2nd tab. Close bookmark bar.
Cmd-F11 to enter fullscreen; make sure content is centered and both
bookmark bar and toolbar are gone. Make sure menubar gone.
Cmd-Opt-arrows to switch tabs; make sure still OK.
Cmd-F11 to go back; make sure things look normal.
Open bookmark bar.
Cmd-F11; make sure gone. Cmd-F11 again; make sure it comes back.
Confirm View-->Fullscreen menu item works.
While in fullscreen, Cmd-T to create new tab and click on a fav tile.
Make sure page loads.
While in fullscreen, try window hotkeys (Cmd-N and Cmd-W) to make sure
they work. Cmd-` to switch windows; switch back, then Cmd-F11 to
undo fullscreen.
Move the mouse to to the top of the screen; make sure menubar appears.
Move the mouse down; make sure menubar goes away.
Review URL: http://codereview.chromium.org/126294
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/browser_window_cocoa_unittest.mm')
-rw-r--r-- | chrome/browser/cocoa/browser_window_cocoa_unittest.mm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/browser_window_cocoa_unittest.mm b/chrome/browser/cocoa/browser_window_cocoa_unittest.mm index 4308bc2..059be46 100644 --- a/chrome/browser/cocoa/browser_window_cocoa_unittest.mm +++ b/chrome/browser/cocoa/browser_window_cocoa_unittest.mm @@ -90,4 +90,34 @@ TEST_F(BrowserWindowCocoaTest, TestBookmarkBarVisible) { 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 */ |