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 #import "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "apps/shell_window_registry.h" | 9 #include "apps/shell_window_registry.h" |
10 #include "chrome/browser/apps/app_browsertest_util.h" | 10 #include "chrome/browser/apps/app_browsertest_util.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 void SetUpAppWithWindows(int num_windows) { | 24 void SetUpAppWithWindows(int num_windows) { |
25 app_ = InstallExtension( | 25 app_ = InstallExtension( |
26 test_data_dir_.AppendASCII("platform_apps").AppendASCII("minimal"), 1); | 26 test_data_dir_.AppendASCII("platform_apps").AppendASCII("minimal"), 1); |
27 EXPECT_TRUE(app_); | 27 EXPECT_TRUE(app_); |
28 | 28 |
29 for (int i = 0; i < num_windows; ++i) { | 29 for (int i = 0; i < num_windows; ++i) { |
30 content::WindowedNotificationObserver app_loaded_observer( | 30 content::WindowedNotificationObserver app_loaded_observer( |
31 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, | 31 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, |
32 content::NotificationService::AllSources()); | 32 content::NotificationService::AllSources()); |
33 OpenApplication(AppLaunchParams( | 33 OpenApplication( |
34 profile(), app_, extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW)); | 34 AppLaunchParams(profile(), |
| 35 app_, |
| 36 extensions::LAUNCH_CONTAINER_NONE, |
| 37 NEW_WINDOW)); |
35 app_loaded_observer.Wait(); | 38 app_loaded_observer.Wait(); |
36 } | 39 } |
37 } | 40 } |
38 | 41 |
39 const extensions::Extension* app_; | 42 const extensions::Extension* app_; |
40 | 43 |
41 private: | 44 private: |
42 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoaBrowserTest); | 45 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoaBrowserTest); |
43 }; | 46 }; |
44 | 47 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 other_window->Hide(); | 100 other_window->Hide(); |
98 EXPECT_FALSE([other_ns_window isVisible]); | 101 EXPECT_FALSE([other_ns_window isVisible]); |
99 | 102 |
100 // HideWithApp, ShowWithApp does not show the other window. | 103 // HideWithApp, ShowWithApp does not show the other window. |
101 window->HideWithApp(); | 104 window->HideWithApp(); |
102 EXPECT_FALSE([ns_window isVisible]); | 105 EXPECT_FALSE([ns_window isVisible]); |
103 window->ShowWithApp(); | 106 window->ShowWithApp(); |
104 EXPECT_TRUE([ns_window isVisible]); | 107 EXPECT_TRUE([ns_window isVisible]); |
105 EXPECT_FALSE([other_ns_window isVisible]); | 108 EXPECT_FALSE([other_ns_window isVisible]); |
106 } | 109 } |
OLD | NEW |