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

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

Issue 579004: Pull latest googleurl to get various fixes (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « chrome/browser/extensions/extension_popup_api.cc ('k') | chrome/browser/net/url_fixer_upper.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/extensions/extension_process_manager.h" 5 #include "chrome/browser/extensions/extension_process_manager.h"
6 #include "chrome/browser/renderer_host/site_instance.h" 6 #include "chrome/browser/renderer_host/site_instance.h"
7 #include "chrome/common/extensions/extension_error_reporter.h" 7 #include "chrome/common/extensions/extension_error_reporter.h"
8 #include "chrome/test/testing_profile.h" 8 #include "chrome/test/testing_profile.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
(...skipping 23 matching lines...) Expand all
34 TestingProfile profile1(1); 34 TestingProfile profile1(1);
35 scoped_ptr<ExtensionProcessManager> manager1( 35 scoped_ptr<ExtensionProcessManager> manager1(
36 new ExtensionProcessManager(&profile1)); 36 new ExtensionProcessManager(&profile1));
37 37
38 TestingProfile profile2(2); 38 TestingProfile profile2(2);
39 scoped_ptr<ExtensionProcessManager> manager2( 39 scoped_ptr<ExtensionProcessManager> manager2(
40 new ExtensionProcessManager(&profile2)); 40 new ExtensionProcessManager(&profile2));
41 41
42 // Extensions with common origins ("scheme://id/") should be grouped in the 42 // Extensions with common origins ("scheme://id/") should be grouped in the
43 // same SiteInstance. 43 // same SiteInstance.
44 GURL ext1_url1("chrome-extensions://ext1_id/index.html"); 44 GURL ext1_url1("chrome-extension://ext1_id/index.html");
45 GURL ext1_url2("chrome-extensions://ext1_id/toolstrips/toolstrip.html"); 45 GURL ext1_url2("chrome-extension://ext1_id/toolstrips/toolstrip.html");
46 GURL ext2_url1("chrome-extensions://ext2_id/index.html"); 46 GURL ext2_url1("chrome-extension://ext2_id/index.html");
47 47
48 scoped_refptr<SiteInstance> site11 = 48 scoped_refptr<SiteInstance> site11 =
49 manager1->GetSiteInstanceForURL(ext1_url1); 49 manager1->GetSiteInstanceForURL(ext1_url1);
50 scoped_refptr<SiteInstance> site12 = 50 scoped_refptr<SiteInstance> site12 =
51 manager1->GetSiteInstanceForURL(ext1_url2); 51 manager1->GetSiteInstanceForURL(ext1_url2);
52 EXPECT_EQ(site11, site12); 52 EXPECT_EQ(site11, site12);
53 53
54 scoped_refptr<SiteInstance> site21 = 54 scoped_refptr<SiteInstance> site21 =
55 manager1->GetSiteInstanceForURL(ext2_url1); 55 manager1->GetSiteInstanceForURL(ext2_url1);
56 EXPECT_NE(site11, site21); 56 EXPECT_NE(site11, site21);
57 57
58 scoped_refptr<SiteInstance> other_profile_site = 58 scoped_refptr<SiteInstance> other_profile_site =
59 manager2->GetSiteInstanceForURL(ext1_url1); 59 manager2->GetSiteInstanceForURL(ext1_url1);
60 EXPECT_NE(site11, other_profile_site); 60 EXPECT_NE(site11, other_profile_site);
61 } 61 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_popup_api.cc ('k') | chrome/browser/net/url_fixer_upper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698