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

Unified Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 111063003: Aura: Don't create GL context for CreateSharedSurfaceHandle() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to make tests happy by still creating shared context Created 6 years, 11 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/browser/renderer_host/render_widget_host_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 967c8142715357ee3a4a89fb9df1e1dee6228ac4..cd3abedd6c29ae43ad9ca102b2907bf52bde48f5 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -35,9 +35,11 @@
#include "ui/gfx/screen.h"
#if defined(USE_AURA)
+#include "content/browser/aura/image_transport_factory.h"
#include "content/browser/renderer_host/render_widget_host_view_aura.h"
#include "ui/aura/env.h"
#include "ui/aura/test/test_screen.h"
+#include "ui/compositor/test/test_context_factory.h"
#endif
#if defined(OS_WIN) || defined(USE_AURA)
@@ -618,6 +620,8 @@ class RenderWidgetHostTest : public testing::Test {
delegate_.reset(new MockRenderWidgetHostDelegate());
process_ = new RenderWidgetHostProcess(browser_context_.get());
#if defined(USE_AURA)
+ ImageTransportFactory::InitializeForUnitTests(
+ scoped_ptr<ui::ContextFactory>(new ui::TestContextFactory));
aura::Env::CreateInstance();
screen_.reset(aura::TestScreen::Create());
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
@@ -638,6 +642,7 @@ class RenderWidgetHostTest : public testing::Test {
#if defined(USE_AURA)
aura::Env::DeleteInstance();
screen_.reset();
+ ImageTransportFactory::Terminate();
#endif
// Process all pending tasks to avoid leaks.
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698