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 #include <string> | 5 #include <string> |
6 | 6 |
7 #include <shlobj.h> // Must be before propkey. | 7 #include <shlobj.h> // Must be before propkey. |
8 #include <propkey.h> | 8 #include <propkey.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 const extensions::Extension* extension = | 249 const extensions::Extension* extension = |
250 LoadExtension(test_data_dir_.AppendASCII("app/")); | 250 LoadExtension(test_data_dir_.AppendASCII("app/")); |
251 EXPECT_TRUE(extension); | 251 EXPECT_TRUE(extension); |
252 | 252 |
253 OpenApplication(AppLaunchParams( | 253 OpenApplication(AppLaunchParams( |
254 browser()->profile(), extension, extensions::LAUNCH_CONTAINER_WINDOW, | 254 browser()->profile(), extension, extensions::LAUNCH_CONTAINER_WINDOW, |
255 NEW_FOREGROUND_TAB, extensions::SOURCE_TEST)); | 255 NEW_FOREGROUND_TAB, extensions::SOURCE_TEST)); |
256 | 256 |
257 // Check that the new browser has an app name. | 257 // Check that the new browser has an app name. |
258 // The launch should have created a new browser. | 258 // The launch should have created a new browser. |
259 ASSERT_EQ(2u, | 259 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); |
260 chrome::GetBrowserCount(browser()->profile(), | |
261 browser()->host_desktop_type())); | |
262 | 260 |
263 // Find the new browser. | 261 // Find the new browser. |
264 Browser* app_browser = nullptr; | 262 Browser* app_browser = nullptr; |
265 for (auto* b : *BrowserList::GetInstance()) { | 263 for (auto* b : *BrowserList::GetInstance()) { |
266 if (b != browser()) | 264 if (b != browser()) |
267 app_browser = b; | 265 app_browser = b; |
268 } | 266 } |
269 ASSERT_TRUE(app_browser); | 267 ASSERT_TRUE(app_browser); |
270 ASSERT_TRUE(app_browser != browser()); | 268 ASSERT_TRUE(app_browser != browser()); |
271 | 269 |
272 WaitAndValidateBrowserWindowProperties( | 270 WaitAndValidateBrowserWindowProperties( |
273 base::Bind(&ValidateHostedAppWindowProperties, app_browser, extension)); | 271 base::Bind(&ValidateHostedAppWindowProperties, app_browser, extension)); |
274 } | 272 } |
OLD | NEW |