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

Side by Side Diff: content/test/test_renderer_host.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 | « content/public/common/content_switches.h ('k') | no next file » | 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 "content/public/test/test_renderer_host.h" 5 #include "content/public/test/test_renderer_host.h"
6 6
7 #include "content/browser/renderer_host/render_view_host_factory.h" 7 #include "content/browser/renderer_host/render_view_host_factory.h"
8 #include "content/browser/renderer_host/test_render_view_host.h" 8 #include "content/browser/renderer_host/test_render_view_host.h"
9 #include "content/browser/site_instance_impl.h" 9 #include "content/browser/site_instance_impl.h"
10 #include "content/browser/web_contents/navigation_entry_impl.h" 10 #include "content/browser/web_contents/navigation_entry_impl.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 void RenderViewHostTestHarness::TearDown() { 137 void RenderViewHostTestHarness::TearDown() {
138 SetContents(NULL); 138 SetContents(NULL);
139 #if defined(USE_AURA) 139 #if defined(USE_AURA)
140 aura_test_helper_->TearDown(); 140 aura_test_helper_->TearDown();
141 #endif 141 #endif
142 // Make sure that we flush any messages related to WebContentsImpl destruction 142 // Make sure that we flush any messages related to WebContentsImpl destruction
143 // before we destroy the browser context. 143 // before we destroy the browser context.
144 MessageLoop::current()->RunAllPending(); 144 MessageLoop::current()->RunAllPending();
145 145
146 // Delete any RenderProcessHosts before the BrowserContext goes away.
147 if (rvh_test_enabler_.rph_factory_.get())
148 rvh_test_enabler_.rph_factory_.reset();
149
146 // Release the browser context on the UI thread. 150 // Release the browser context on the UI thread.
147 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release()); 151 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release());
148 message_loop_.RunAllPending(); 152 message_loop_.RunAllPending();
149 } 153 }
150 154
151 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 155 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
152 RenderProcessHostFactory* factory) { 156 RenderProcessHostFactory* factory) {
153 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 157 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
154 } 158 }
155 159
156 } // namespace content 160 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698