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

Unified Diff: chrome/test/gpu/gpu_browsertest.cc

Issue 4784001: Removed --use-gl=osmesa as default for ui and browser tests.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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: chrome/test/gpu/gpu_browsertest.cc
===================================================================
--- chrome/test/gpu/gpu_browsertest.cc (revision 65835)
+++ chrome/test/gpu/gpu_browsertest.cc (working copy)
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "app/gfx/gl/gl_implementation.h"
+#include "base/command_line.h"
#include "base/path_service.h"
#include "base/string16.h"
#include "base/utf_string_conversions.h"
@@ -9,7 +11,9 @@
#include "chrome/browser/browser.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/test/in_process_browser_test.h"
+#include "chrome/test/test_launcher_utils.h"
#include "chrome/test/ui_test_utils.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
@@ -25,13 +29,25 @@
gpu_test_dir_ = test_dir.AppendASCII("gpu");
}
+ virtual void SetUpCommandLine(CommandLine* command_line) {
+ InProcessBrowserTest::SetUpCommandLine(command_line);
+
+ EXPECT_TRUE(test_launcher_utils::OverrideGLImplementation(
+ command_line,
+ gfx::kGLImplementationOSMesaName));
+
+#if defined(OS_MACOSX)
+ // Accelerated compositing does not work with OSMesa. AcceleratedSurface
+ // assumes GL contexts are native.
+ command_line->AppendSwitch(switches::kDisableAcceleratedCompositing);
+#endif
+ }
+
FilePath gpu_test_dir_;
};
-IN_PROC_BROWSER_TEST_F(GPUBrowserTest, BrowserTestLaunchedWithOSMesa) {
+IN_PROC_BROWSER_TEST_F(GPUBrowserTest, BrowserTestCanLaunchWithOSMesa) {
// Check the webgl test reports success and that the renderer was OSMesa.
- // We use OSMesa for tests in order to get consistent results across a
- // variety of boxes.
ui_test_utils::NavigateToURL(
browser(),
net::FilePathToFileURL(gpu_test_dir_.AppendASCII("webgl.html")));

Powered by Google App Engine
This is Rietveld 408576698