OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h" | 5 // This file tests whichever implementation of NativeAppWindow is used. |
| 6 // I.e. it could be NativeAppWindowCocoa or ChromeNativeAppWindowViewsMac. |
| 7 #include "extensions/browser/app_window/native_app_window.h" |
6 | 8 |
7 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
8 | 10 |
9 #include "base/mac/mac_util.h" | 11 #include "base/mac/mac_util.h" |
| 12 #include "base/mac/scoped_nsobject.h" |
10 #include "base/mac/sdk_forward_declarations.h" | 13 #include "base/mac/sdk_forward_declarations.h" |
11 #include "chrome/browser/apps/app_browsertest_util.h" | 14 #include "chrome/browser/apps/app_browsertest_util.h" |
12 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/extensions/app_launch_params.h" | 16 #include "chrome/browser/ui/extensions/app_launch_params.h" |
14 #include "chrome/browser/ui/extensions/application_launch.h" | 17 #include "chrome/browser/ui/extensions/application_launch.h" |
15 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
16 #include "content/public/test/test_utils.h" | 19 #include "content/public/test/test_utils.h" |
17 #include "extensions/browser/app_window/app_window_registry.h" | 20 #include "extensions/browser/app_window/app_window_registry.h" |
18 #include "extensions/common/constants.h" | 21 #include "extensions/common/constants.h" |
19 | 22 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 watcher.reset([[ScopedNotificationWatcher alloc] | 206 watcher.reset([[ScopedNotificationWatcher alloc] |
204 initWithNotification:NSWindowDidExitFullScreenNotification | 207 initWithNotification:NSWindowDidExitFullScreenNotification |
205 andObject:ns_window]); | 208 andObject:ns_window]); |
206 [ns_window toggleFullScreen:nil]; | 209 [ns_window toggleFullScreen:nil]; |
207 [watcher waitForNotification]; | 210 [watcher waitForNotification]; |
208 EXPECT_EQ(extensions::AppWindow::FULLSCREEN_TYPE_NONE, | 211 EXPECT_EQ(extensions::AppWindow::FULLSCREEN_TYPE_NONE, |
209 app_window->fullscreen_types_for_test()); | 212 app_window->fullscreen_types_for_test()); |
210 EXPECT_FALSE(window->IsFullscreen()); | 213 EXPECT_FALSE(window->IsFullscreen()); |
211 EXPECT_FALSE([ns_window styleMask] & NSFullScreenWindowMask); | 214 EXPECT_FALSE([ns_window styleMask] & NSFullScreenWindowMask); |
212 } | 215 } |
OLD | NEW |