| 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_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/profiles/profile_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "net/test/embedded_test_server/embedded_test_server.h" | 22 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 23 | 23 |
| 24 using content::NavigationController; | 24 using content::NavigationController; |
| 25 using content::WebContents; | 25 using content::WebContents; |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 class ProcessManagementTest : public ExtensionBrowserTest { | 29 class ProcessManagementTest : public ExtensionBrowserTest { |
| 30 private: | 30 private: |
| 31 // This is needed for testing isolated apps, which are still experimental. | 31 // This is needed for testing isolated apps, which are still experimental. |
| 32 void SetUpCommandLine(CommandLine* command_line) override { | 32 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 33 ExtensionBrowserTest::SetUpCommandLine(command_line); | 33 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 34 command_line->AppendSwitch( | 34 command_line->AppendSwitch( |
| 35 extensions::switches::kEnableExperimentalExtensionApis); | 35 extensions::switches::kEnableExperimentalExtensionApis); |
| 36 } | 36 } |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace | 39 } // namespace |
| 40 | 40 |
| 41 | 41 |
| 42 // TODO(nasko): crbug.com/173137 | 42 // TODO(nasko): crbug.com/173137 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } | 235 } |
| 236 | 236 |
| 237 // We've loaded 5 extensions with background pages, 1 extension without | 237 // We've loaded 5 extensions with background pages, 1 extension without |
| 238 // background page, and one isolated app. We expect only 2 unique processes | 238 // background page, and one isolated app. We expect only 2 unique processes |
| 239 // hosting those extensions. | 239 // hosting those extensions. |
| 240 extensions::ProcessMap* process_map = extensions::ProcessMap::Get(profile); | 240 extensions::ProcessMap* process_map = extensions::ProcessMap::Get(profile); |
| 241 | 241 |
| 242 EXPECT_GE((size_t) 6, process_map->size()); | 242 EXPECT_GE((size_t) 6, process_map->size()); |
| 243 EXPECT_EQ((size_t) 2, process_ids.size()); | 243 EXPECT_EQ((size_t) 2, process_ids.size()); |
| 244 } | 244 } |
| OLD | NEW |