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 "extensions/browser/process_manager.h" | 5 #include "extensions/browser/process_manager.h" |
6 | 6 |
7 #include "chrome/browser/extensions/browser_action_test_util.h" | 7 #include "chrome/browser/extensions/browser_action_test_util.h" |
8 #include "chrome/browser/extensions/extension_browsertest.h" | 8 #include "chrome/browser/extensions/extension_browsertest.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" | |
11 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
12 #include "content/public/browser/notification_service.h" | 11 #include "content/public/browser/notification_service.h" |
13 #include "content/public/test/test_utils.h" | 12 #include "content/public/test/test_utils.h" |
| 13 #include "extensions/browser/extension_system.h" |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 | 16 |
17 // Exists as a browser test because ExtensionHosts are hard to create without | 17 // Exists as a browser test because ExtensionHosts are hard to create without |
18 // a real browser. | 18 // a real browser. |
19 typedef ExtensionBrowserTest ProcessManagerBrowserTest; | 19 typedef ExtensionBrowserTest ProcessManagerBrowserTest; |
20 | 20 |
21 // Test that basic extension loading creates the appropriate ExtensionHosts | 21 // Test that basic extension loading creates the appropriate ExtensionHosts |
22 // and background pages. | 22 // and background pages. |
23 IN_PROC_BROWSER_TEST_F(ProcessManagerBrowserTest, | 23 IN_PROC_BROWSER_TEST_F(ProcessManagerBrowserTest, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 EXPECT_EQ(0u, pm->background_hosts().size()); | 96 EXPECT_EQ(0u, pm->background_hosts().size()); |
97 EXPECT_EQ(1u, pm->GetAllViews().size()); | 97 EXPECT_EQ(1u, pm->GetAllViews().size()); |
98 EXPECT_FALSE(pm->GetBackgroundHostForExtension(popup->id())); | 98 EXPECT_FALSE(pm->GetBackgroundHostForExtension(popup->id())); |
99 EXPECT_EQ(1u, pm->GetRenderViewHostsForExtension(popup->id()).size()); | 99 EXPECT_EQ(1u, pm->GetRenderViewHostsForExtension(popup->id()).size()); |
100 EXPECT_TRUE(pm->GetSiteInstanceForURL(popup->url())); | 100 EXPECT_TRUE(pm->GetSiteInstanceForURL(popup->url())); |
101 EXPECT_FALSE(pm->IsBackgroundHostClosing(popup->id())); | 101 EXPECT_FALSE(pm->IsBackgroundHostClosing(popup->id())); |
102 EXPECT_EQ(0, pm->GetLazyKeepaliveCount(popup.get())); | 102 EXPECT_EQ(0, pm->GetLazyKeepaliveCount(popup.get())); |
103 } | 103 } |
104 | 104 |
105 } // namespace extensions | 105 } // namespace extensions |
OLD | NEW |