| Index: chrome/test/gpu/gpu_browsertest.cc
|
| ===================================================================
|
| --- chrome/test/gpu/gpu_browsertest.cc (revision 65684)
|
| +++ 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);
|
| +
|
| + 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")));
|
|
|