summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/fullscreen_window_unittest.mm
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-29 23:56:11 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-29 23:56:11 +0000
commit893a5ccce13082aa85686ad142c0d8be0fb5cd70 (patch)
tree018c75351b722e9ae8258dcff804a53d6c422d65 /chrome/browser/cocoa/fullscreen_window_unittest.mm
parentc3a7368e76527e15c1f2d2f06801a371bb5374e3 (diff)
downloadchromium_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/fullscreen_window_unittest.mm')
-rw-r--r--chrome/browser/cocoa/fullscreen_window_unittest.mm27
1 files changed, 27 insertions, 0 deletions
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<FullscreenWindow> 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]));
+}
+
+