| 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/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
| 6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 7 #include "chrome/browser/extensions/extension_host.h" | 7 #include "chrome/browser/extensions/extension_host.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/extensions/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 process_manager(); | 236 process_manager(); |
| 237 for (extensions::ProcessManager::const_iterator iter = | 237 for (extensions::ProcessManager::const_iterator iter = |
| 238 epm->background_hosts().begin(); | 238 epm->background_hosts().begin(); |
| 239 iter != epm->background_hosts().end(); ++iter) { | 239 iter != epm->background_hosts().end(); ++iter) { |
| 240 process_ids.insert((*iter)->render_process_host()->GetID()); | 240 process_ids.insert((*iter)->render_process_host()->GetID()); |
| 241 } | 241 } |
| 242 | 242 |
| 243 // We've loaded 5 extensions with background pages, 1 extension without | 243 // We've loaded 5 extensions with background pages, 1 extension without |
| 244 // background page, and one isolated app. We expect only 2 unique processes | 244 // background page, and one isolated app. We expect only 2 unique processes |
| 245 // hosting those extensions. | 245 // hosting those extensions. |
| 246 ExtensionService* service = | 246 extensions::ProcessMap* process_map = extensions::ProcessMap::Get(profile); |
| 247 extensions::ExtensionSystem::Get(profile)->extension_service(); | |
| 248 | 247 |
| 249 EXPECT_GE((size_t) 6, service->process_map()->size()); | 248 EXPECT_GE((size_t) 6, process_map->size()); |
| 250 EXPECT_EQ((size_t) 2, process_ids.size()); | 249 EXPECT_EQ((size_t) 2, process_ids.size()); |
| 251 } | 250 } |
| OLD | NEW |