| 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 13 matching lines...) Expand all Loading... |
| 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(AppLaunchParams( |
| 34 profile(), app_, extensions::LAUNCH_NONE, NEW_WINDOW)); | 34 profile(), app_, extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW)); |
| 35 app_loaded_observer.Wait(); | 35 app_loaded_observer.Wait(); |
| 36 } | 36 } |
| 37 } | 37 } |
| 38 | 38 |
| 39 const extensions::Extension* app_; | 39 const extensions::Extension* app_; |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoaBrowserTest); | 42 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowCocoaBrowserTest); |
| 43 }; | 43 }; |
| 44 | 44 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 other_window->Hide(); | 97 other_window->Hide(); |
| 98 EXPECT_FALSE([other_ns_window isVisible]); | 98 EXPECT_FALSE([other_ns_window isVisible]); |
| 99 | 99 |
| 100 // HideWithApp, ShowWithApp does not show the other window. | 100 // HideWithApp, ShowWithApp does not show the other window. |
| 101 window->HideWithApp(); | 101 window->HideWithApp(); |
| 102 EXPECT_FALSE([ns_window isVisible]); | 102 EXPECT_FALSE([ns_window isVisible]); |
| 103 window->ShowWithApp(); | 103 window->ShowWithApp(); |
| 104 EXPECT_TRUE([ns_window isVisible]); | 104 EXPECT_TRUE([ns_window isVisible]); |
| 105 EXPECT_FALSE([other_ns_window isVisible]); | 105 EXPECT_FALSE([other_ns_window isVisible]); |
| 106 } | 106 } |
| OLD | NEW |