From 893a5ccce13082aa85686ad142c0d8be0fb5cd70 Mon Sep 17 00:00:00 2001 From: "jrg@chromium.org" Date: Mon, 29 Jun 2009 23:56:11 +0000 Subject: 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 --- chrome/browser/cocoa/fullscreen_window_unittest.mm | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 chrome/browser/cocoa/fullscreen_window_unittest.mm (limited to 'chrome/browser/cocoa/fullscreen_window_unittest.mm') diff --git a/chrome/browser/cocoa/fullscreen_window_unittest.mm b/chrome/browser/cocoa/fullscreen_window_unittest.mm new file mode 100644 index 0000000..c12f1fd --- /dev/null +++ b/chrome/browser/cocoa/fullscreen_window_unittest.mm @@ -0,0 +1,27 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/scoped_ptr.h" +#include "chrome/browser/cocoa/cocoa_test_helper.h" +#include "chrome/browser/cocoa/fullscreen_window.h" +#include "testing/gtest/include/gtest/gtest.h" + +class FullscreenWindowTest : public testing::Test { + public: + CocoaTestHelper cocoa_helper_; +}; + +TEST_F(FullscreenWindowTest, Basics) { + scoped_nsobject window_; + window_.reset([[FullscreenWindow alloc] init]); + + EXPECT_EQ([NSScreen mainScreen], [window_ screen]); + EXPECT_TRUE([window_ canBecomeKeyWindow]); + EXPECT_TRUE([window_ canBecomeMainWindow]); + EXPECT_EQ(NSBorderlessWindowMask, [window_ styleMask]); + EXPECT_FALSE([window_ isReleasedWhenClosed]); + EXPECT_TRUE(NSEqualRects([[NSScreen mainScreen] frame], [window_ frame])); +} + + -- cgit v1.1