| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/extensions/api/management/management_api.h" | 8 #include "chrome/browser/extensions/api/management/management_api.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/browser/extensions/extension_system.h" | |
| 12 #include "chrome/browser/extensions/extension_test_message_listener.h" | 11 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 13 #include "chrome/browser/extensions/launch_util.h" | 12 #include "chrome/browser/extensions/launch_util.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_commands.h" | 15 #include "chrome/browser/ui/browser_commands.h" |
| 17 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
| 18 #include "chrome/browser/ui/browser_iterator.h" | 17 #include "chrome/browser/ui/browser_iterator.h" |
| 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 18 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 20 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
| 21 #include "chrome/common/extensions/extension_constants.h" | 20 #include "chrome/common/extensions/extension_constants.h" |
| 22 #include "content/public/test/test_utils.h" | 21 #include "content/public/test/test_utils.h" |
| 22 #include "extensions/browser/extension_system.h" |
| 23 #include "extensions/browser/test_management_policy.h" | 23 #include "extensions/browser/test_management_policy.h" |
| 24 #include "extensions/common/manifest.h" | 24 #include "extensions/common/manifest.h" |
| 25 | 25 |
| 26 using extensions::Extension; | 26 using extensions::Extension; |
| 27 using extensions::Manifest; | 27 using extensions::Manifest; |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 // Find a browser other than |browser|. | 31 // Find a browser other than |browser|. |
| 32 Browser* FindOtherBrowser(Browser* browser) { | 32 Browser* FindOtherBrowser(Browser* browser) { |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 ASSERT_EQ(2, browser()->tab_strip_model()->count()); | 300 ASSERT_EQ(2, browser()->tab_strip_model()->count()); |
| 301 #else | 301 #else |
| 302 // Find the app's browser. Opening in a new window will create | 302 // Find the app's browser. Opening in a new window will create |
| 303 // a new browser. | 303 // a new browser. |
| 304 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(), | 304 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(), |
| 305 browser()->host_desktop_type())); | 305 browser()->host_desktop_type())); |
| 306 Browser* app_browser = FindOtherBrowser(browser()); | 306 Browser* app_browser = FindOtherBrowser(browser()); |
| 307 ASSERT_TRUE(app_browser->is_app()); | 307 ASSERT_TRUE(app_browser->is_app()); |
| 308 #endif | 308 #endif |
| 309 } | 309 } |
| OLD | NEW |