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

Unified Diff: content/test/test_render_view_host_factory.cc

Issue 16267002: Re-fix http://crbug.com/87176, and add a test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Much shorter test Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/test/test_render_view_host_factory.cc
diff --git a/content/test/test_render_view_host_factory.cc b/content/test/test_render_view_host_factory.cc
index 3211dd021e7f7041a9e334b00cfddfac0cad8155..47213aa170c783f7df33eed6d5b27bc4643938f1 100644
--- a/content/test/test_render_view_host_factory.cc
+++ b/content/test/test_render_view_host_factory.cc
@@ -11,18 +11,19 @@
namespace content {
TestRenderViewHostFactory::TestRenderViewHostFactory(
- RenderProcessHostFactory* rph_factory)
- : render_process_host_factory_(rph_factory) {
+ RenderProcessHostFactory* rph_factory) {
+ SiteInstanceImpl::set_render_process_host_factory(rph_factory);
RenderViewHostFactory::RegisterFactory(this);
}
TestRenderViewHostFactory::~TestRenderViewHostFactory() {
RenderViewHostFactory::UnregisterFactory();
+ SiteInstanceImpl::set_render_process_host_factory(NULL);
}
void TestRenderViewHostFactory::set_render_process_host_factory(
RenderProcessHostFactory* rph_factory) {
- render_process_host_factory_ = rph_factory;
+ SiteInstanceImpl::set_render_process_host_factory(rph_factory);
}
RenderViewHost* TestRenderViewHostFactory::CreateRenderViewHost(
@@ -33,9 +34,6 @@ RenderViewHost* TestRenderViewHostFactory::CreateRenderViewHost(
int main_frame_routing_id,
bool swapped_out,
SessionStorageNamespace* session_storage) {
- // See declaration of render_process_host_factory_ below.
- static_cast<SiteInstanceImpl*>(instance)->
- set_render_process_host_factory(render_process_host_factory_);
return new TestRenderViewHost(
instance, delegate, widget_delegate, routing_id, main_frame_routing_id,
swapped_out);

Powered by Google App Engine
This is Rietveld 408576698