| Index: content/public/test/test_renderer_host.cc
|
| diff --git a/content/public/test/test_renderer_host.cc b/content/public/test/test_renderer_host.cc
|
| index 35d4ca6e77d892f42b351e309739d0520510e535..e9e41ab06921b2fd39dc8a11e7be8b63eff51e6d 100644
|
| --- a/content/public/test/test_renderer_host.cc
|
| +++ b/content/public/test/test_renderer_host.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/run_loop.h"
|
| #include "build/build_config.h"
|
| +#include "content/browser/compositor/test/no_transport_image_transport_factory.h"
|
| #include "content/browser/frame_host/navigation_entry_impl.h"
|
| #include "content/browser/renderer_host/render_view_host_factory.h"
|
| #include "content/browser/renderer_host/render_widget_host_impl.h"
|
| @@ -190,11 +191,13 @@ void RenderViewHostTestHarness::SetUp() {
|
| #if defined(OS_WIN)
|
| ole_initializer_.reset(new ui::ScopedOleInitializer());
|
| #endif
|
| +#if !defined(OS_ANDROID)
|
| + ImageTransportFactory::InitializeForUnitTests(
|
| + base::WrapUnique(new NoTransportImageTransportFactory));
|
| +#endif
|
| #if defined(USE_AURA)
|
| - // The ContextFactory must exist before any Compositors are created.
|
| - bool enable_pixel_output = false;
|
| ui::ContextFactory* context_factory =
|
| - ui::InitializeContextFactoryForTests(enable_pixel_output);
|
| + ImageTransportFactory::GetInstance()->GetContextFactory();
|
|
|
| aura_test_helper_.reset(
|
| new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
|
| @@ -242,6 +245,12 @@ void RenderViewHostTestHarness::TearDown() {
|
| FROM_HERE,
|
| browser_context_.release());
|
| thread_bundle_.reset();
|
| +
|
| +#if !defined(OS_ANDROID)
|
| + // RenderWidgetHostView holds on to a reference to SurfaceManager, so it
|
| + // must be shut down before the ImageTransportFactory.
|
| + ImageTransportFactory::Terminate();
|
| +#endif
|
| }
|
|
|
| BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
|
|
|