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" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 process_manager(); | 222 process_manager(); |
223 for (ExtensionProcessManager::const_iterator iter = | 223 for (ExtensionProcessManager::const_iterator iter = |
224 epm->background_hosts().begin(); | 224 epm->background_hosts().begin(); |
225 iter != epm->background_hosts().end(); ++iter) { | 225 iter != epm->background_hosts().end(); ++iter) { |
226 process_ids.insert((*iter)->render_process_host()->GetID()); | 226 process_ids.insert((*iter)->render_process_host()->GetID()); |
227 } | 227 } |
228 | 228 |
229 // We've loaded 5 extensions with background pages, 1 extension without | 229 // We've loaded 5 extensions with background pages, 1 extension without |
230 // background page, and one isolated app. We expect only 2 unique processes | 230 // background page, and one isolated app. We expect only 2 unique processes |
231 // hosting those extensions. | 231 // hosting those extensions. |
232 EXPECT_GE((size_t) 6, profile->GetExtensionService()->process_map()->size()); | 232 ExtensionService* service = |
| 233 extensions::ExtensionSystem::Get(profile)->extension_service(); |
| 234 |
| 235 EXPECT_GE((size_t) 6, service->process_map()->size()); |
233 EXPECT_EQ((size_t) 2, process_ids.size()); | 236 EXPECT_EQ((size_t) 2, process_ids.size()); |
234 } | 237 } |
OLD | NEW |