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

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

Issue 273073002: Changes code using Compositor to pass in ContextFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tooltip on chromeos Created 6 years, 7 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
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 "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "content/browser/frame_host/navigation_entry_impl.h" 8 #include "content/browser/frame_host/navigation_entry_impl.h"
9 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 void RenderViewHostTestHarness::SetUp() { 164 void RenderViewHostTestHarness::SetUp() {
165 thread_bundle_.reset(new TestBrowserThreadBundle(thread_bundle_options_)); 165 thread_bundle_.reset(new TestBrowserThreadBundle(thread_bundle_options_));
166 166
167 #if defined(OS_WIN) 167 #if defined(OS_WIN)
168 ole_initializer_.reset(new ui::ScopedOleInitializer()); 168 ole_initializer_.reset(new ui::ScopedOleInitializer());
169 #endif 169 #endif
170 #if defined(USE_AURA) 170 #if defined(USE_AURA)
171 // The ContextFactory must exist before any Compositors are created. 171 // The ContextFactory must exist before any Compositors are created.
172 bool enable_pixel_output = false; 172 bool enable_pixel_output = false;
173 ui::InitializeContextFactoryForTests(enable_pixel_output); 173 ui::ContextFactory* context_factory =
174 ui::InitializeContextFactoryForTests(enable_pixel_output);
174 175
175 aura_test_helper_.reset( 176 aura_test_helper_.reset(
176 new aura::test::AuraTestHelper(base::MessageLoopForUI::current())); 177 new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
177 aura_test_helper_->SetUp(); 178 aura_test_helper_->SetUp(context_factory);
178 new wm::DefaultActivationClient(aura_test_helper_->root_window()); 179 new wm::DefaultActivationClient(aura_test_helper_->root_window());
179 #endif 180 #endif
180 181
181 DCHECK(!browser_context_); 182 DCHECK(!browser_context_);
182 browser_context_.reset(CreateBrowserContext()); 183 browser_context_.reset(CreateBrowserContext());
183 184
184 SetContents(CreateTestWebContents()); 185 SetContents(CreateTestWebContents());
185 } 186 }
186 187
187 void RenderViewHostTestHarness::TearDown() { 188 void RenderViewHostTestHarness::TearDown() {
(...skipping 27 matching lines...) Expand all
215 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 216 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
216 return new TestBrowserContext(); 217 return new TestBrowserContext();
217 } 218 }
218 219
219 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 220 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
220 RenderProcessHostFactory* factory) { 221 RenderProcessHostFactory* factory) {
221 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 222 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
222 } 223 }
223 224
224 } // namespace content 225 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698