summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-09 20:46:09 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-09 20:46:09 +0000
commita81e5f4317b551631f7d516594a6a12e11373535 (patch)
tree2b3af081ed416caaf050844a168d9397db36fdef /webkit
parentce2d4128e2df25dbe6802243f0eba1956a0cd192 (diff)
downloadchromium_src-a81e5f4317b551631f7d516594a6a12e11373535.zip
chromium_src-a81e5f4317b551631f7d516594a6a12e11373535.tar.gz
chromium_src-a81e5f4317b551631f7d516594a6a12e11373535.tar.bz2
Test shell initializes OSMesa GL bindings.
This is in preparation for using OSMesa for running WebGL tests in test shell. TEST=try, view WebGL pages in test shell with OSMesa BUG=none Review URL: http://codereview.chromium.org/3040046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55466 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/test_shell/test_shell.gypi1
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc6
2 files changed, 7 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi
index 52d68bc..0a73531 100644
--- a/webkit/tools/test_shell/test_shell.gypi
+++ b/webkit/tools/test_shell/test_shell.gypi
@@ -213,6 +213,7 @@
'test_shell_common',
'<(DEPTH)/net/net.gyp:net_test_support',
'<(DEPTH)/skia/skia.gyp:skia',
+ '<(DEPTH)/third_party/mesa/mesa.gyp:osmesa',
'<(DEPTH)/tools/imagediff/image_diff.gyp:image_diff',
'<(DEPTH)/webkit/support/webkit_support.gyp:copy_npapi_layout_test_plugin',
],
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc
index cc2871d..8ccc7ef 100644
--- a/webkit/tools/test_shell/test_shell_main.cc
+++ b/webkit/tools/test_shell/test_shell_main.cc
@@ -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/app_switches.h"
+#include "app/gfx/gl/gl_implementation.h"
#include "base/at_exit.h"
#include "base/basictypes.h"
#include "base/command_line.h"
@@ -212,6 +214,10 @@ int main(int argc, char* argv[]) {
TestShell::SetFileTestTimeout(timeout_ms);
}
+ // Unless specifically requested otherwise, default to OSMesa for GL.
+ if (!parsed_command_line.HasSwitch(switches::kUseGL))
+ gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL);
+
// Treat the first argument as the initial URL to open.
GURL starting_url;