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

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

Issue 10984040: Enable gpu crash tests in content (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: refine Created 8 years, 3 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/test_launcher_utils.cc
diff --git a/content/public/test/test_launcher_utils.cc b/content/public/test/test_launcher_utils.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8b4457a3b473727ab489c0bef63d3368be7871d6
--- /dev/null
+++ b/content/public/test/test_launcher_utils.cc
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/public/test/test_launcher_utils.h"
+
+#include "base/command_line.h"
+#include "base/environment.h"
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/path_service.h"
+#include "base/string_number_conversions.h"
+#include "content/public/common/content_switches.h"
+#include "ui/gl/gl_switches.h"
+
+namespace content {
+
+void PrepareBrowserCommandLineForTests(CommandLine* command_line) {
+ // Enable warning level logging so that we can see when bad stuff happens.
+ command_line->AppendSwitch(switches::kEnableLogging);
+ command_line->AppendSwitchASCII(switches::kLoggingLevel, "1"); // warning
+
+ // Don't collect GPU info, load GPU blacklist, or schedule a GPU blacklist
+ // auto-update.
+ command_line->AppendSwitch(switches::kSkipGpuDataLoading);
+}
+
+bool OverrideGLImplementation(CommandLine* command_line,
+ const std::string& implementation_name) {
+ if (command_line->HasSwitch(switches::kUseGL))
+ return false;
+
+ command_line->AppendSwitchASCII(switches::kUseGL, implementation_name);
+
+ return true;
+}
+
+} // namespace test_launcher_utils

Powered by Google App Engine
This is Rietveld 408576698