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

Side by Side Diff: content/public/test/test_renderer_host.cc

Issue 11346016: Move remaining content test code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
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/render_widget_host_impl.h" 8 #include "content/browser/renderer_host/render_widget_host_impl.h"
9 #include "content/browser/renderer_host/test_render_view_host.h" 9 #include "content/browser/renderer_host/test_render_view_host.h"
10 #include "content/browser/site_instance_impl.h" 10 #include "content/browser/site_instance_impl.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Make sure we ran SetUp() already. 118 // Make sure we ran SetUp() already.
119 #if defined(OS_WIN) 119 #if defined(OS_WIN)
120 DCHECK(ole_initializer_ != NULL); 120 DCHECK(ole_initializer_ != NULL);
121 #endif 121 #endif
122 #if defined(USE_AURA) 122 #if defined(USE_AURA)
123 DCHECK(aura_test_helper_ != NULL); 123 DCHECK(aura_test_helper_ != NULL);
124 #endif 124 #endif
125 125
126 // See comment above browser_context_ decl for why we check for NULL here. 126 // See comment above browser_context_ decl for why we check for NULL here.
127 if (!browser_context_.get()) 127 if (!browser_context_.get())
128 browser_context_.reset(new content::TestBrowserContext()); 128 browser_context_.reset(new TestBrowserContext());
129 129
130 // This will be deleted when the WebContentsImpl goes away. 130 // This will be deleted when the WebContentsImpl goes away.
131 SiteInstance* instance = SiteInstance::Create(browser_context_.get()); 131 SiteInstance* instance = SiteInstance::Create(browser_context_.get());
132 132
133 return TestWebContents::Create(browser_context_.get(), instance); 133 return TestWebContents::Create(browser_context_.get(), instance);
134 } 134 }
135 135
136 void RenderViewHostTestHarness::NavigateAndCommit(const GURL& url) { 136 void RenderViewHostTestHarness::NavigateAndCommit(const GURL& url) {
137 static_cast<TestWebContents*>(web_contents())->NavigateAndCommit(url); 137 static_cast<TestWebContents*>(web_contents())->NavigateAndCommit(url);
138 } 138 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 ole_initializer_.reset(); 177 ole_initializer_.reset();
178 #endif 178 #endif
179 } 179 }
180 180
181 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 181 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
182 RenderProcessHostFactory* factory) { 182 RenderProcessHostFactory* factory) {
183 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 183 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
184 } 184 }
185 185
186 } // namespace content 186 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_navigation_observer.cc ('k') | content/public/test/web_contents_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698