| 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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "chrome/browser/automation/automation_util.h" | 6 #include "chrome/browser/automation/automation_util.h" |
| 7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
| 8 #include "chrome/browser/extensions/extension_host.h" | 8 #include "chrome/browser/extensions/extension_host.h" |
| 9 #include "chrome/browser/extensions/extension_process_manager.h" | 9 #include "chrome/browser/extensions/extension_process_manager.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
| 13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 14 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 17 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 18 #include "content/public/browser/render_process_host.h" | 18 #include "content/public/browser/render_process_host.h" |
| 19 #include "content/public/browser/render_view_host.h" | 19 #include "content/public/browser/render_view_host.h" |
| 20 #include "content/public/browser/site_instance.h" | 20 #include "content/public/browser/site_instance.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "net/base/mock_host_resolver.h" | 22 #include "net/base/mock_host_resolver.h" |
| 23 | 23 |
| 24 using content::NavigationController; | 24 using content::NavigationController; |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 iter != epm->background_hosts().end(); ++iter) { | 220 iter != epm->background_hosts().end(); ++iter) { |
| 221 process_ids.insert((*iter)->render_process_host()->GetID()); | 221 process_ids.insert((*iter)->render_process_host()->GetID()); |
| 222 } | 222 } |
| 223 | 223 |
| 224 // We've loaded 5 extensions with background pages, 1 extension without | 224 // We've loaded 5 extensions with background pages, 1 extension without |
| 225 // background page, and one isolated app. We expect only 2 unique processes | 225 // background page, and one isolated app. We expect only 2 unique processes |
| 226 // hosting those extensions. | 226 // hosting those extensions. |
| 227 EXPECT_GE((size_t) 6, profile->GetExtensionService()->process_map()->size()); | 227 EXPECT_GE((size_t) 6, profile->GetExtensionService()->process_map()->size()); |
| 228 EXPECT_EQ((size_t) 2, process_ids.size()); | 228 EXPECT_EQ((size_t) 2, process_ids.size()); |
| 229 } | 229 } |
| OLD | NEW |