| 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/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
| 11 #include "chrome/browser/extensions/extension_test_message_listener.h" | 11 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 12 #include "chrome/browser/extensions/test_management_policy.h" | 12 #include "chrome/browser/extensions/test_management_policy.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/browser_commands.h" | 15 #include "chrome/browser/ui/browser_commands.h" |
| 16 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
| 17 #include "chrome/browser/ui/browser_iterator.h" | 17 #include "chrome/browser/ui/browser_iterator.h" |
| 18 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 18 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
| 20 #include "chrome/common/extensions/manifest.h" | |
| 21 #include "content/public/test/test_utils.h" | 20 #include "content/public/test/test_utils.h" |
| 21 #include "extensions/common/manifest.h" |
| 22 | 22 |
| 23 using extensions::Extension; | 23 using extensions::Extension; |
| 24 using extensions::Manifest; | 24 using extensions::Manifest; |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // Find a browser other than |browser|. | 28 // Find a browser other than |browser|. |
| 29 Browser* FindOtherBrowser(Browser* browser) { | 29 Browser* FindOtherBrowser(Browser* browser) { |
| 30 Browser* found = NULL; | 30 Browser* found = NULL; |
| 31 for (chrome::BrowserIterator it; !it.done(); it.Next()) { | 31 for (chrome::BrowserIterator it; !it.done(); it.Next()) { |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 ASSERT_EQ(2, browser()->tab_strip_model()->count()); | 295 ASSERT_EQ(2, browser()->tab_strip_model()->count()); |
| 296 #else | 296 #else |
| 297 // Find the app's browser. Opening in a new window will create | 297 // Find the app's browser. Opening in a new window will create |
| 298 // a new browser. | 298 // a new browser. |
| 299 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(), | 299 ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile(), |
| 300 browser()->host_desktop_type())); | 300 browser()->host_desktop_type())); |
| 301 Browser* app_browser = FindOtherBrowser(browser()); | 301 Browser* app_browser = FindOtherBrowser(browser()); |
| 302 ASSERT_TRUE(app_browser->is_app()); | 302 ASSERT_TRUE(app_browser->is_app()); |
| 303 #endif | 303 #endif |
| 304 } | 304 } |
| OLD | NEW |