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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 // Test to check that hosted apps have "Find" and "Paste and Match Style" menu | 208 // Test to check that hosted apps have "Find" and "Paste and Match Style" menu |
209 // items under the "Edit" menu. | 209 // items under the "Edit" menu. |
210 // Disabled until tab versus window apps are properly tested | 210 // Disabled until tab versus window apps are properly tested |
211 // http://crbug.com/517744 | 211 // http://crbug.com/517744 |
212 IN_PROC_BROWSER_TEST_F(AppShimMenuControllerBrowserTest, | 212 IN_PROC_BROWSER_TEST_F(AppShimMenuControllerBrowserTest, |
213 DISABLED_HostedAppHasAdditionalEditMenuItems) { | 213 DISABLED_HostedAppHasAdditionalEditMenuItems) { |
214 SetUpApps(HOSTED | PACKAGED_1); | 214 SetUpApps(HOSTED | PACKAGED_1); |
215 | 215 |
216 // Find the first hosted app window. | 216 // Find the first hosted app window. |
217 Browser* hosted_app_browser = nullptr; | 217 Browser* hosted_app_browser = nullptr; |
218 BrowserList* browsers = | 218 for (Browser* browser : *BrowserList::GetInstance()) { |
219 BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_NATIVE); | |
220 for (Browser* browser : *browsers) { | |
221 const extensions::Extension* extension = | 219 const extensions::Extension* extension = |
222 apps::ExtensionAppShimHandler::MaybeGetAppForBrowser(browser); | 220 apps::ExtensionAppShimHandler::MaybeGetAppForBrowser(browser); |
223 if (extension && extension->is_hosted_app()) { | 221 if (extension && extension->is_hosted_app()) { |
224 hosted_app_browser = browser; | 222 hosted_app_browser = browser; |
225 break; | 223 break; |
226 } | 224 } |
227 } | 225 } |
228 EXPECT_TRUE(hosted_app_browser); | 226 EXPECT_TRUE(hosted_app_browser); |
229 | 227 |
230 // Focus the hosted app. | 228 // Focus the hosted app. |
(...skipping 30 matching lines...) Expand all Loading... |
261 | 259 |
262 // OSX will send NSWindowWillResignMainNotification when a main window is | 260 // OSX will send NSWindowWillResignMainNotification when a main window is |
263 // closed. | 261 // closed. |
264 [[NSNotificationCenter defaultCenter] | 262 [[NSNotificationCenter defaultCenter] |
265 postNotificationName:NSWindowDidResignMainNotification | 263 postNotificationName:NSWindowDidResignMainNotification |
266 object:app_1_window]; | 264 object:app_1_window]; |
267 CheckNoAppMenus(); | 265 CheckNoAppMenus(); |
268 } | 266 } |
269 | 267 |
270 } // namespace | 268 } // namespace |
OLD | NEW |