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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 if (base::win::GetVersion() < base::win::VERSION_WIN7) | 234 if (base::win::GetVersion() < base::win::VERSION_WIN7) |
235 return; | 235 return; |
236 | 236 |
237 // Load an app. | 237 // Load an app. |
238 const extensions::Extension* extension = | 238 const extensions::Extension* extension = |
239 LoadExtension(test_data_dir_.AppendASCII("app/")); | 239 LoadExtension(test_data_dir_.AppendASCII("app/")); |
240 EXPECT_TRUE(extension); | 240 EXPECT_TRUE(extension); |
241 | 241 |
242 OpenApplication(AppLaunchParams( | 242 OpenApplication(AppLaunchParams( |
243 browser()->profile(), extension, extensions::LAUNCH_CONTAINER_WINDOW, | 243 browser()->profile(), extension, extensions::LAUNCH_CONTAINER_WINDOW, |
244 NEW_FOREGROUND_TAB, extensions::SOURCE_TEST)); | 244 WindowOpenDisposition::NEW_FOREGROUND_TAB, extensions::SOURCE_TEST)); |
245 | 245 |
246 // Check that the new browser has an app name. | 246 // Check that the new browser has an app name. |
247 // The launch should have created a new browser. | 247 // The launch should have created a new browser. |
248 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); | 248 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); |
249 | 249 |
250 // Find the new browser. | 250 // Find the new browser. |
251 Browser* app_browser = nullptr; | 251 Browser* app_browser = nullptr; |
252 for (auto* b : *BrowserList::GetInstance()) { | 252 for (auto* b : *BrowserList::GetInstance()) { |
253 if (b != browser()) | 253 if (b != browser()) |
254 app_browser = b; | 254 app_browser = b; |
255 } | 255 } |
256 ASSERT_TRUE(app_browser); | 256 ASSERT_TRUE(app_browser); |
257 ASSERT_TRUE(app_browser != browser()); | 257 ASSERT_TRUE(app_browser != browser()); |
258 | 258 |
259 WaitAndValidateBrowserWindowProperties( | 259 WaitAndValidateBrowserWindowProperties( |
260 base::Bind(&ValidateHostedAppWindowProperties, app_browser, extension)); | 260 base::Bind(&ValidateHostedAppWindowProperties, app_browser, extension)); |
261 } | 261 } |
OLD | NEW |