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

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

Issue 11947002: Switch back to deprecated fullscreen APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/chrome_browser_ui.gypi ('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
7 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
8 #include "testing/platform_test.h" 9 #include "testing/platform_test.h"
9 #import "ui/base/test/ui_cocoa_test_helper.h" 10 #import "ui/base/test/ui_cocoa_test_helper.h"
10 11
11 typedef ui::CocoaTest FullscreenWindowManagerTest; 12 typedef ui::CocoaTest FullscreenWindowManagerTest;
12 13
13 TEST_F(FullscreenWindowManagerTest, EnterExit) { 14 TEST_F(FullscreenWindowManagerTest, EnterExit) {
14 scoped_nsobject<FullscreenWindowManager> manager( 15 scoped_nsobject<FullscreenWindowManager> manager(
15 [[FullscreenWindowManager alloc] 16 [[FullscreenWindowManager alloc]
16 initWithWindow:test_window() 17 initWithWindow:test_window()
17 desiredScreen:[NSScreen mainScreen]]); 18 desiredScreen:[NSScreen mainScreen]]);
18 19
19 NSApplicationPresentationOptions current_options = 20 SystemUIMode mode = kUIModeNormal;
20 [NSApp presentationOptions]; 21 GetSystemUIMode(&mode, NULL);
21 EXPECT_EQ(NSApplicationPresentationDefault, current_options); 22 EXPECT_EQ(kUIModeNormal, mode);
22 23
23 [manager enterFullscreenMode]; 24 [manager enterFullscreenMode];
24 current_options = [NSApp presentationOptions]; 25 GetSystemUIMode(&mode, NULL);
25 EXPECT_EQ(static_cast<NSApplicationPresentationOptions>( 26 EXPECT_EQ(kUIModeAllHidden, mode);
26 NSApplicationPresentationHideDock |
27 NSApplicationPresentationHideMenuBar),
28 current_options);
29 27
30 [manager exitFullscreenMode]; 28 [manager exitFullscreenMode];
31 current_options = [NSApp presentationOptions]; 29 GetSystemUIMode(&mode, NULL);
32 EXPECT_EQ(NSApplicationPresentationDefault, current_options); 30 EXPECT_EQ(kUIModeNormal, mode);
33 } 31 }
OLDNEW
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698