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 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 enum AvailableApps { PACKAGED_1 = 0x1, PACKAGED_2 = 0x2, HOSTED = 0x4 }; | 33 enum AvailableApps { PACKAGED_1 = 0x1, PACKAGED_2 = 0x2, HOSTED = 0x4 }; |
34 | 34 |
35 AppShimMenuControllerBrowserTest() | 35 AppShimMenuControllerBrowserTest() |
36 : app_1_(nullptr), | 36 : app_1_(nullptr), |
37 app_2_(nullptr), | 37 app_2_(nullptr), |
38 hosted_app_(nullptr), | 38 hosted_app_(nullptr), |
39 initial_menu_item_count_(0) {} | 39 initial_menu_item_count_(0) {} |
40 | 40 |
41 void SetUpCommandLine(base::CommandLine* command_line) override { | 41 void SetUpCommandLine(base::CommandLine* command_line) override { |
42 PlatformAppBrowserTest::SetUpCommandLine(command_line); | 42 PlatformAppBrowserTest::SetUpCommandLine(command_line); |
| 43 command_line->AppendSwitch(switches::kEnableNewBookmarkApps); |
43 } | 44 } |
44 | 45 |
45 // Start testing apps and wait for them to launch. |flags| is a bitmask of | 46 // Start testing apps and wait for them to launch. |flags| is a bitmask of |
46 // AvailableApps. | 47 // AvailableApps. |
47 void SetUpApps(int flags) { | 48 void SetUpApps(int flags) { |
48 | 49 |
49 if (flags & PACKAGED_1) { | 50 if (flags & PACKAGED_1) { |
50 ExtensionTestMessageListener listener_1("Launched", false); | 51 ExtensionTestMessageListener listener_1("Launched", false); |
51 app_1_ = InstallAndLaunchPlatformApp("minimal_id"); | 52 app_1_ = InstallAndLaunchPlatformApp("minimal_id"); |
52 ASSERT_TRUE(listener_1.WaitUntilSatisfied()); | 53 ASSERT_TRUE(listener_1.WaitUntilSatisfied()); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 220 |
220 CheckHasAppMenus(app_1_); | 221 CheckHasAppMenus(app_1_); |
221 ExtensionService::UninstallExtensionHelper( | 222 ExtensionService::UninstallExtensionHelper( |
222 extension_service(), | 223 extension_service(), |
223 app_1_->id(), | 224 app_1_->id(), |
224 extensions::UNINSTALL_REASON_FOR_TESTING); | 225 extensions::UNINSTALL_REASON_FOR_TESTING); |
225 CheckNoAppMenus(); | 226 CheckNoAppMenus(); |
226 } | 227 } |
227 | 228 |
228 } // namespace | 229 } // namespace |
OLD | NEW |