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

Unified Diff: content/public/test/test_renderer_host.cc

Issue 2190033002: content: Add ContextProviderFactory to create a render ContextProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove display_ DCHECK. Created 4 years, 4 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
« no previous file with comments | « content/content_browser.gypi ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a7ff602e3653a3139832b0ea55c51be3b4e9f53e..d385871bbf9ea30a84975834abc2050cec70f82a 100644
--- a/content/public/test/test_renderer_host.cc
+++ b/content/public/test/test_renderer_host.cc
@@ -28,6 +28,10 @@
#include "ui/base/material_design/material_design_controller.h"
#include "ui/base/test/material_design_controller_test_api.h"
+#if defined(OS_ANDROID)
+#include "content/browser/renderer_host/context_provider_factory_impl_android.h"
+#endif
+
#if defined(OS_WIN)
#include "ui/base/win/scoped_ole_initializer.h"
#endif
@@ -198,6 +202,9 @@ void RenderViewHostTestHarness::SetUp() {
#if !defined(OS_ANDROID)
ImageTransportFactory::InitializeForUnitTests(
base::WrapUnique(new NoTransportImageTransportFactory));
+#else
+ ui::ContextProviderFactory::SetInstance(
+ ContextProviderFactoryImpl::GetInstance());
#endif
#if defined(USE_AURA)
ui::ContextFactory* context_factory =
@@ -263,6 +270,8 @@ void RenderViewHostTestHarness::TearDown() {
// RenderWidgetHostView holds on to a reference to SurfaceManager, so it
// must be shut down before the ImageTransportFactory.
ImageTransportFactory::Terminate();
+#else
+ ui::ContextProviderFactory::SetInstance(nullptr);
#endif
}
« no previous file with comments | « content/content_browser.gypi ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698