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

Side by Side Diff: extensions/browser/process_manager_unittest.cc

Issue 671763002: Extract ProcessManager from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 1 month 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
« no previous file with comments | « extensions/browser/process_manager_factory.cc ('k') | extensions/extensions.gyp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/process_manager.h" 5 #include "extensions/browser/process_manager.h"
6 6
7 #include "content/public/browser/content_browser_client.h" 7 #include "content/public/browser/content_browser_client.h"
8 #include "content/public/browser/notification_service.h" 8 #include "content/public/browser/notification_service.h"
9 #include "content/public/browser/site_instance.h" 9 #include "content/public/browser/site_instance.h"
10 #include "content/public/common/content_client.h" 10 #include "content/public/common/content_client.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, 118 extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
119 original_context())); 119 original_context()));
120 EXPECT_TRUE(IsRegistered(manager1.get(), 120 EXPECT_TRUE(IsRegistered(manager1.get(),
121 extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED, 121 extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED,
122 original_context())); 122 original_context()));
123 123
124 // Test for an incognito context ProcessManager. 124 // Test for an incognito context ProcessManager.
125 scoped_ptr<ProcessManager> manager2( 125 scoped_ptr<ProcessManager> manager2(
126 ProcessManager::CreateIncognitoForTesting(incognito_context(), 126 ProcessManager::CreateIncognitoForTesting(incognito_context(),
127 original_context(), 127 original_context(),
128 manager1.get(),
129 extension_registry())); 128 extension_registry()));
130 129
131 EXPECT_EQ(incognito_context(), manager2->GetBrowserContext()); 130 EXPECT_EQ(incognito_context(), manager2->GetBrowserContext());
132 EXPECT_EQ(0u, manager2->background_hosts().size()); 131 EXPECT_EQ(0u, manager2->background_hosts().size());
133 132
134 // Some notifications are observed for the original context. 133 // Some notifications are observed for the original context.
135 EXPECT_TRUE(IsRegistered(manager2.get(), 134 EXPECT_TRUE(IsRegistered(manager2.get(),
136 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, 135 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
137 original_context())); 136 original_context()));
138 137
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 scoped_refptr<SiteInstance> site21 = 253 scoped_refptr<SiteInstance> site21 =
255 manager1->GetSiteInstanceForURL(ext2_url1); 254 manager1->GetSiteInstanceForURL(ext2_url1);
256 EXPECT_NE(site11, site21); 255 EXPECT_NE(site11, site21);
257 256
258 scoped_refptr<SiteInstance> other_profile_site = 257 scoped_refptr<SiteInstance> other_profile_site =
259 manager2->GetSiteInstanceForURL(ext1_url1); 258 manager2->GetSiteInstanceForURL(ext1_url1);
260 EXPECT_NE(site11, other_profile_site); 259 EXPECT_NE(site11, other_profile_site);
261 } 260 }
262 261
263 } // namespace extensions 262 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/process_manager_factory.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698