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/app_shim_menu_controller_mac.h" | 5 #import "chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #import "base/mac/foundation_util.h" | 10 #import "base/mac/foundation_util.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 enum AvailableApps { PACKAGED_1 = 0x1, PACKAGED_2 = 0x2, HOSTED = 0x4 }; | 38 enum AvailableApps { PACKAGED_1 = 0x1, PACKAGED_2 = 0x2, HOSTED = 0x4 }; |
39 | 39 |
40 AppShimMenuControllerBrowserTest() | 40 AppShimMenuControllerBrowserTest() |
41 : app_1_(nullptr), | 41 : app_1_(nullptr), |
42 app_2_(nullptr), | 42 app_2_(nullptr), |
43 hosted_app_(nullptr), | 43 hosted_app_(nullptr), |
44 initial_menu_item_count_(0) {} | 44 initial_menu_item_count_(0) {} |
45 | 45 |
46 // testing::Test: | 46 // testing::Test: |
47 void SetUp() override { | 47 void SetUp() override { |
| 48 scoped_feature_list_.InitAndEnableFeature(features::kBookmarkApps); |
48 PlatformAppBrowserTest::SetUp(); | 49 PlatformAppBrowserTest::SetUp(); |
49 scoped_feature_list_.InitAndEnableFeature(features::kBookmarkApps); | |
50 } | 50 } |
51 | 51 |
52 // Start testing apps and wait for them to launch. |flags| is a bitmask of | 52 // Start testing apps and wait for them to launch. |flags| is a bitmask of |
53 // AvailableApps. | 53 // AvailableApps. |
54 void SetUpApps(int flags) { | 54 void SetUpApps(int flags) { |
55 | 55 |
56 if (flags & PACKAGED_1) { | 56 if (flags & PACKAGED_1) { |
57 ExtensionTestMessageListener listener_1("Launched", false); | 57 ExtensionTestMessageListener listener_1("Launched", false); |
58 app_1_ = InstallAndLaunchPlatformApp("minimal_id"); | 58 app_1_ = InstallAndLaunchPlatformApp("minimal_id"); |
59 ASSERT_TRUE(listener_1.WaitUntilSatisfied()); | 59 ASSERT_TRUE(listener_1.WaitUntilSatisfied()); |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 265 |
266 // OSX will send NSWindowWillResignMainNotification when a main window is | 266 // OSX will send NSWindowWillResignMainNotification when a main window is |
267 // closed. | 267 // closed. |
268 [[NSNotificationCenter defaultCenter] | 268 [[NSNotificationCenter defaultCenter] |
269 postNotificationName:NSWindowDidResignMainNotification | 269 postNotificationName:NSWindowDidResignMainNotification |
270 object:app_1_window]; | 270 object:app_1_window]; |
271 CheckNoAppMenus(); | 271 CheckNoAppMenus(); |
272 } | 272 } |
273 | 273 |
274 } // namespace | 274 } // namespace |
OLD | NEW |