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

Unified Diff: trunk/src/content/public/test/browser_test_base.cc

Issue 22648006: Revert 216780 "Clean up compositor initialization/destruction." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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: trunk/src/content/public/test/browser_test_base.cc
===================================================================
--- trunk/src/content/public/test/browser_test_base.cc (revision 216906)
+++ trunk/src/content/public/test/browser_test_base.cc (working copy)
@@ -13,9 +13,6 @@
#include "content/public/common/main_function_params.h"
#include "content/public/test/test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
-#include "ui/compositor/compositor_switches.h"
-#include "ui/gl/gl_implementation.h"
-#include "ui/gl/gl_switches.h"
#if defined(OS_POSIX)
#include "base/process/process_handle.h"
@@ -32,10 +29,6 @@
#include "content/public/browser/browser_thread.h"
#endif
-#if defined(OS_CHROMEOS)
-#include "base/chromeos/chromeos_version.h"
-#endif
-
namespace content {
namespace {
@@ -71,9 +64,7 @@
BrowserTestBase::BrowserTestBase()
: embedded_test_server_(
new net::test_server::EmbeddedTestServer(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))),
- allow_test_contexts_(true),
- allow_osmesa_(true) {
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))) {
#if defined(OS_MACOSX)
base::mac::SetOverrideAmIBundled(true);
base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
@@ -107,50 +98,6 @@
new base::Closure(
base::Bind(&BrowserTestBase::ProxyRunTestOnMainThreadLoop, this));
-#if defined(USE_AURA)
- // Use test contexts for browser tests unless they override and force us to
- // use a real context.
- if (allow_test_contexts_)
- command_line->AppendSwitch(switches::kTestCompositor);
-#endif
-
- // When using real GL contexts, we usually use OSMesa as this works on all
- // bots. The command line can override this behaviour to use a real GPU.
- if (command_line->HasSwitch(switches::kUseGpuInTests))
- allow_osmesa_ = false;
-
- // Some bots pass this flag when they want to use a real GPU.
- if (command_line->HasSwitch("enable-gpu"))
- allow_osmesa_ = false;
-
-#if defined(OS_MACOSX)
- // On Mac we always use a real GPU.
- allow_osmesa_ = false;
-#endif
-
-#if defined(OS_ANDROID)
- // On Android we always use a real GPU.
- allow_osmesa_ = false;
-#endif
-
-#if defined(OS_CHROMEOS)
- // If the test is running on the chromeos envrionment (such as
- // device or vm bots), the compositor will use real GL contexts, and
- // we should use real GL bindings with it.
- if (base::chromeos::IsRunningOnChromeOS())
- allow_osmesa_ = false;
-#endif
-
- if (command_line->HasSwitch(switches::kUseGL)) {
- NOTREACHED() <<
- "kUseGL should not be used with tests. Try kUseGpuInTests instead.";
- }
-
- if (allow_osmesa_) {
- command_line->AppendSwitchASCII(
- switches::kUseGL, gfx::kGLImplementationOSMesaName);
- }
-
SetUpInProcessBrowserTestFixture();
#if defined(OS_ANDROID)
BrowserMainRunner::Create()->Initialize(params);
Property changes on: trunk/src/content/public/test/browser_test_base.cc
___________________________________________________________________
Deleted: svn:mergeinfo
« no previous file with comments | « trunk/src/content/public/test/browser_test_base.h ('k') | trunk/src/content/public/test/content_test_suite_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698