diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 01:55:13 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 01:55:13 +0000 |
commit | 4566f13fe843c0821dbce19d7ea5e8aece8afe4a (patch) | |
tree | 586c6006431604f6b159daca30fcdfe4913ad996 /chrome/browser/site_instance_unittest.cc | |
parent | 3f366001f70b1ef4b8884796970cefb0769c469f (diff) | |
download | chromium_src-4566f13fe843c0821dbce19d7ea5e8aece8afe4a.zip chromium_src-4566f13fe843c0821dbce19d7ea5e8aece8afe4a.tar.gz chromium_src-4566f13fe843c0821dbce19d7ea5e8aece8afe4a.tar.bz2 |
Stop having renderers use both pids and a monotonically increasing "host_id". This allows ResourceDispatcher to be used by child processes other than renderers. I've done minor related cleanup on the way to make the code simpler.
Review URL: http://codereview.chromium.org/42054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/site_instance_unittest.cc')
-rw-r--r-- | chrome/browser/site_instance_unittest.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/site_instance_unittest.cc b/chrome/browser/site_instance_unittest.cc index 2001d53..d9e64ee 100644 --- a/chrome/browser/site_instance_unittest.cc +++ b/chrome/browser/site_instance_unittest.cc @@ -177,16 +177,15 @@ TEST_F(SiteInstanceTest, UpdateMaxPageID) { // Test to ensure GetProcess returns and creates processes correctly. TEST_F(SiteInstanceTest, GetProcess) { - // Ensure that GetProcess returns the process based on its host id. + // Ensure that GetProcess returns a process. scoped_ptr<TestingProfile> profile(new TestingProfile()); - scoped_ptr<BrowserRenderProcessHost> host1( - new BrowserRenderProcessHost(profile.get())); + scoped_ptr<RenderProcessHost> host1; scoped_refptr<SiteInstance> instance( SiteInstance::CreateSiteInstance(profile.get())); - instance.get()->set_process_host_id(host1.get()->host_id()); - EXPECT_EQ(host1.get(), instance.get()->GetProcess()); + host1.reset(instance.get()->GetProcess()); + EXPECT_TRUE(host1.get() != NULL); - // Ensure that GetProcess creates a new process if no host id is set. + // Ensure that GetProcess creates a new process. scoped_refptr<SiteInstance> instance2( SiteInstance::CreateSiteInstance(profile.get())); scoped_ptr<RenderProcessHost> host2(instance2.get()->GetProcess()); |