Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: chrome/browser/extensions/process_management_browsertest.cc

Issue 10575014: Move process-per-site logic from BrowsingInstance to RenderProcessHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review comment. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 EXPECT_NE(isolated2_host, web1_host); 150 EXPECT_NE(isolated2_host, web1_host);
151 EXPECT_NE(isolated2_host, extension1_host); 151 EXPECT_NE(isolated2_host, extension1_host);
152 152
153 // Everything else is clannish. WebUI only shares with other WebUI. 153 // Everything else is clannish. WebUI only shares with other WebUI.
154 EXPECT_EQ(ntp1_host, ntp2_host); 154 EXPECT_EQ(ntp1_host, ntp2_host);
155 EXPECT_NE(ntp1_host, hosted1_host); 155 EXPECT_NE(ntp1_host, hosted1_host);
156 EXPECT_NE(ntp1_host, web1_host); 156 EXPECT_NE(ntp1_host, web1_host);
157 EXPECT_NE(ntp1_host, extension1_host); 157 EXPECT_NE(ntp1_host, extension1_host);
158 158
159 // Hosted apps only share with each other. 159 // Hosted apps only share with each other.
160 // Note that hosted2_host's app has the background permission and will use
161 // process-per-site mode, but it should still share with hosted1_host's app.
160 EXPECT_EQ(hosted1_host, hosted2_host); 162 EXPECT_EQ(hosted1_host, hosted2_host);
161 EXPECT_NE(hosted1_host, web1_host); 163 EXPECT_NE(hosted1_host, web1_host);
162 EXPECT_NE(hosted1_host, extension1_host); 164 EXPECT_NE(hosted1_host, extension1_host);
163 165
164 // Web pages only share with each other. 166 // Web pages only share with each other.
165 EXPECT_EQ(web1_host, web2_host); 167 EXPECT_EQ(web1_host, web2_host);
166 EXPECT_NE(web1_host, extension1_host); 168 EXPECT_NE(web1_host, extension1_host);
167 169
168 // Extensions only share with each other. 170 // Extensions only share with each other.
169 EXPECT_EQ(extension1_host, extension2_host); 171 EXPECT_EQ(extension1_host, extension2_host);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 iter != epm->background_hosts().end(); ++iter) { 222 iter != epm->background_hosts().end(); ++iter) {
221 process_ids.insert((*iter)->render_process_host()->GetID()); 223 process_ids.insert((*iter)->render_process_host()->GetID());
222 } 224 }
223 225
224 // We've loaded 5 extensions with background pages, 1 extension without 226 // We've loaded 5 extensions with background pages, 1 extension without
225 // background page, and one isolated app. We expect only 2 unique processes 227 // background page, and one isolated app. We expect only 2 unique processes
226 // hosting those extensions. 228 // hosting those extensions.
227 EXPECT_GE((size_t) 6, profile->GetExtensionService()->process_map()->size()); 229 EXPECT_GE((size_t) 6, profile->GetExtensionService()->process_map()->size());
228 EXPECT_EQ((size_t) 2, process_ids.size()); 230 EXPECT_EQ((size_t) 2, process_ids.size());
229 } 231 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698