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

Side by Side Diff: ui/base/cocoa/fullscreen_window_manager_unittest.mm

Issue 12052012: Switch to Cocoa APIs for fullscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/notifications/notification_ui_manager_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ui/base/cocoa/fullscreen_window_manager.h" 5 #import "ui/base/cocoa/fullscreen_window_manager.h"
6 6
7
8 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
9 #include "testing/platform_test.h" 8 #include "testing/platform_test.h"
10 #import "ui/base/test/ui_cocoa_test_helper.h" 9 #import "ui/base/test/ui_cocoa_test_helper.h"
11 10
12 typedef ui::CocoaTest FullscreenWindowManagerTest; 11 typedef ui::CocoaTest FullscreenWindowManagerTest;
13 12
14 TEST_F(FullscreenWindowManagerTest, EnterExit) { 13 TEST_F(FullscreenWindowManagerTest, EnterExit) {
15 scoped_nsobject<FullscreenWindowManager> manager( 14 scoped_nsobject<FullscreenWindowManager> manager(
16 [[FullscreenWindowManager alloc] 15 [[FullscreenWindowManager alloc]
17 initWithWindow:test_window() 16 initWithWindow:test_window()
18 desiredScreen:[NSScreen mainScreen]]); 17 desiredScreen:[NSScreen mainScreen]]);
19 18
20 SystemUIMode mode = kUIModeNormal; 19 NSApplicationPresentationOptions current_options =
21 GetSystemUIMode(&mode, NULL); 20 [NSApp presentationOptions];
22 EXPECT_EQ(kUIModeNormal, mode); 21 EXPECT_EQ(NSApplicationPresentationDefault, current_options);
23 22
24 [manager enterFullscreenMode]; 23 [manager enterFullscreenMode];
25 GetSystemUIMode(&mode, NULL); 24 current_options = [NSApp presentationOptions];
26 EXPECT_EQ(kUIModeAllHidden, mode); 25 EXPECT_EQ(static_cast<NSApplicationPresentationOptions>(
26 NSApplicationPresentationHideDock |
27 NSApplicationPresentationHideMenuBar),
28 current_options);
27 29
28 [manager exitFullscreenMode]; 30 [manager exitFullscreenMode];
29 GetSystemUIMode(&mode, NULL); 31 current_options = [NSApp presentationOptions];
30 EXPECT_EQ(kUIModeNormal, mode); 32 EXPECT_EQ(NSApplicationPresentationDefault, current_options);
31 } 33 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification_ui_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698