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

Unified Diff: content/public/test/browser_test_base.h

Issue 22293003: Clean up compositor initialization/destruction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanupcompositor: UseRealGLBindings in NetInternalsTest Created 7 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
Index: content/public/test/browser_test_base.h
diff --git a/content/public/test/browser_test_base.h b/content/public/test/browser_test_base.h
index 26f7c0700205871ac5cc29acbdf011ab945ad854..bc5b390d310575e60c1e664daaed8f20dc0ad96a 100644
--- a/content/public/test/browser_test_base.h
+++ b/content/public/test/browser_test_base.h
@@ -109,6 +109,14 @@ class BrowserTestBase : public testing::Test {
// returns.
void PostTaskToInProcessRendererAndWait(const base::Closure& task);
+ // Call this before SetUp() to use real GL contexts in Compositor for the
+ // test.
+ void UseRealGLContexts() { allow_test_contexts_ = false; }
+
+ // Call this before SetUp() to use real GL drivers instead of OSMesa for the
+ // test.
+ void UseRealGLBindings() { allow_osmesa_ = false; }
+
private:
void ProxyRunTestOnMainThreadLoop();
@@ -118,6 +126,14 @@ class BrowserTestBase : public testing::Test {
// Embedded test server, cheap to create, started on demand.
scoped_ptr<net::test_server::EmbeddedTestServer> embedded_test_server_;
+ // When false, the ui::Compositor will be forced to use real GL contexts for
+ // the test, so that it produces real pixel output.
+ bool allow_test_contexts_;
+
+ // When false, the GL backend will use a real GPU. When true, it uses OSMesa
+ // to run GL on the CPU in a way that works across all platforms.
+ bool allow_osmesa_;
+
#if defined(OS_POSIX)
bool handle_sigterm_;
#endif

Powered by Google App Engine
This is Rietveld 408576698