summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--DEPS3
-rw-r--r--chrome/chrome_tests.gypi2
-rw-r--r--chrome/test/data/gpu/webgl_conformance.html49
-rw-r--r--chrome/test/gpu/webgl_conformance_test_list_autogen.h309
-rw-r--r--chrome/test/gpu/webgl_conformance_tests.cc90
-rw-r--r--chrome/test/ui/ui_test.cc7
7 files changed, 459 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 1091306..ede0b85 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,6 +58,7 @@ v8.log
/chrome/test/data/osdd
/chrome/test/data/plugin
/chrome/test/data/pyauto_private
+/chrome/test/data/gpu/webgl_conformance
/chrome/tools/memory
/chrome/tools/test/reference_build
/chrome_frame/tools/test/reference_build
diff --git a/DEPS b/DEPS
index f85ee04..b405221 100644
--- a/DEPS
+++ b/DEPS
@@ -131,6 +131,9 @@ deps = {
"src/third_party/bidichecker":
(Var("googlecode_url") % "bidichecker") + "/trunk/lib@4",
+ "src/chrome/test/data/gpu/webgl_conformance":
+ "/trunk/deps/third_party/webgl/sdk/tests@91578",
+
# We run these layout tests as UI tests. Since many of the buildbots that
# run layout tests do NOT have access to the LayoutTest directory, we need
# to map them here. In practice, these do not take up much space.
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 3994f75..4ef2110 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -3555,6 +3555,7 @@
'chrome_strings',
'renderer',
'test_support_common',
+ 'test_support_ui',
'../base/base.gyp:base',
'../base/base.gyp:test_support_base',
'../net/net.gyp:net_test_support',
@@ -3573,6 +3574,7 @@
'browser/gpu_pixel_browsertest.cc',
'browser/gpu_crash_browsertest.cc',
'test/out_of_proc_test_runner.cc',
+ 'test/gpu/webgl_conformance_tests.cc',
],
'conditions': [
['OS=="win"', {
diff --git a/chrome/test/data/gpu/webgl_conformance.html b/chrome/test/data/gpu/webgl_conformance.html
new file mode 100644
index 0000000..6df30cd
--- /dev/null
+++ b/chrome/test/data/gpu/webgl_conformance.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<script type="text/javascript"
+ src="webgl_conformance/resources/webgl-test-harness.js">
+</script>
+<script>
+var reportType = WebGLTestHarnessModule.TestHarness.reportType;
+var running;
+var result;
+var message;
+
+// Report function called by each conformance test.
+function report(type, msg, success) {
+ switch (type) {
+ case reportType.START_PAGE:
+ // Accept every page loaded.
+ return true;
+ case reportType.TEST_RESULT:
+ if (!success) {
+ // If any test fails, the result is false.
+ result = false;
+ message += msg + "\n";
+ }
+ break;
+ case reportType.FINISHED_ALL_TESTS:
+ running = false;
+ break;
+ }
+}
+
+function start(start_url) {
+ running = true;
+ result = true;
+ message = "";
+ var iframe = document.getElementById("testframe");
+ var testHarness = new WebGLTestHarnessModule.TestHarness(
+ iframe,
+ start_url,
+ report);
+ window.webglTestHarness = testHarness;
+ window.webglTestHarness.runTests();
+}
+</script>
+</head>
+<body>
+<iframe id="testframe" scrolling="yes" width="100%" height="100%"></iframe>
+</table>
+</body>
+</html>
diff --git a/chrome/test/gpu/webgl_conformance_test_list_autogen.h b/chrome/test/gpu/webgl_conformance_test_list_autogen.h
new file mode 100644
index 0000000..4210fa6
--- /dev/null
+++ b/chrome/test/gpu/webgl_conformance_test_list_autogen.h
@@ -0,0 +1,309 @@
+// Copyright (c) 2011 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.
+
+// This file is auto-generated from a script. DO NOT EDIT!
+// TODO(jrt): Upload the python script.
+
+// It is included by webgl_conformance_tests.cc
+#ifndef CHROME_TEST_GPU_WEBGL_CONFORMANCE_TEST_LIST_AUTOGEN_H_
+#define CHROME_TEST_GPU_WEBGL_CONFORMANCE_TEST_LIST_AUTOGEN_H_
+
+CONFORMANCE_TEST(array_buffer_crash,
+ "conformance/array-buffer-crash.html");
+CONFORMANCE_TEST(array_buffer_view_crash,
+ "conformance/array-buffer-view-crash.html");
+CONFORMANCE_TEST(array_unit_tests,
+ "conformance/array-unit-tests.html");
+CONFORMANCE_TEST(bad_arguments_test,
+ "conformance/bad-arguments-test.html");
+CONFORMANCE_TEST(buffer_bind_test,
+ "conformance/buffer-bind-test.html");
+CONFORMANCE_TEST(buffer_data_array_buffer,
+ "conformance/buffer-data-array-buffer.html");
+CONFORMANCE_TEST(buffer_preserve_test,
+ "conformance/buffer-preserve-test.html");
+CONFORMANCE_TEST(canvas_test,
+ "conformance/canvas-test.html");
+CONFORMANCE_TEST(canvas_zero_size,
+ "conformance/canvas-zero-size.html");
+CONFORMANCE_TEST(constants,
+ "conformance/constants.html");
+CONFORMANCE_TEST(context_attributes_alpha_depth_stencil_antialias,
+ "conformance/context-attributes-alpha-depth-stencil-antialias.html");
+CONFORMANCE_TEST(context_lost_restored,
+ "conformance/context-lost-restored.html");
+CONFORMANCE_TEST(context_lost,
+ "conformance/context-lost.html");
+CONFORMANCE_TEST(context_type_test,
+ "conformance/context-type-test.html");
+CONFORMANCE_TEST(copy_tex_image_and_sub_image_2d,
+ "conformance/copy-tex-image-and-sub-image-2d.html");
+CONFORMANCE_TEST(draw_arrays_out_of_bounds,
+ "conformance/draw-arrays-out-of-bounds.html");
+CONFORMANCE_TEST(draw_elements_out_of_bounds,
+ "conformance/draw-elements-out-of-bounds.html");
+CONFORMANCE_TEST(drawingbuffer_static_canvas_test,
+ "conformance/drawingbuffer-static-canvas-test.html");
+CONFORMANCE_TEST(drawingbuffer_test,
+ "conformance/drawingbuffer-test.html");
+CONFORMANCE_TEST(error_reporting,
+ "conformance/error-reporting.html");
+CONFORMANCE_TEST(framebuffer_object_attachment,
+ "conformance/framebuffer-object-attachment.html");
+CONFORMANCE_TEST(framebuffer_test,
+ "conformance/framebuffer-test.html");
+CONFORMANCE_TEST(get_active_test,
+ "conformance/get-active-test.html");
+CONFORMANCE_TEST(gl_bind_attrib_location_test,
+ "conformance/gl-bind-attrib-location-test.html");
+CONFORMANCE_TEST(gl_clear,
+ "conformance/gl-clear.html");
+CONFORMANCE_TEST(gl_drawelements,
+ "conformance/gl-drawelements.html");
+CONFORMANCE_TEST(gl_enable_enum_test,
+ "conformance/gl-enable-enum-test.html");
+CONFORMANCE_TEST(gl_enable_vertex_attrib,
+ "conformance/gl-enable-vertex-attrib.html");
+CONFORMANCE_TEST(gl_enum_tests,
+ "conformance/gl-enum-tests.html");
+CONFORMANCE_TEST(gl_get_active_attribute,
+ "conformance/gl-get-active-attribute.html");
+CONFORMANCE_TEST(gl_get_active_uniform,
+ "conformance/gl-get-active-uniform.html");
+CONFORMANCE_TEST(gl_get_calls,
+ "conformance/gl-get-calls.html");
+CONFORMANCE_TEST(gl_geterror,
+ "conformance/gl-geterror.html");
+CONFORMANCE_TEST(gl_getshadersource,
+ "conformance/gl-getshadersource.html");
+CONFORMANCE_TEST(gl_getstring,
+ "conformance/gl-getstring.html");
+CONFORMANCE_TEST(gl_min_attribs,
+ "conformance/gl-min-attribs.html");
+CONFORMANCE_TEST(gl_min_textures,
+ "conformance/gl-min-textures.html");
+CONFORMANCE_TEST(gl_min_uniforms,
+ "conformance/gl-min-uniforms.html");
+CONFORMANCE_TEST(gl_object_get_calls,
+ "conformance/gl-object-get-calls.html");
+CONFORMANCE_TEST(gl_pixelstorei,
+ "conformance/gl-pixelstorei.html");
+CONFORMANCE_TEST(gl_scissor_test,
+ "conformance/gl-scissor-test.html");
+CONFORMANCE_TEST(gl_shader_test,
+ "conformance/gl-shader-test.html");
+CONFORMANCE_TEST(gl_teximage,
+ "conformance/gl-teximage.html");
+CONFORMANCE_TEST(gl_uniform_arrays,
+ "conformance/gl-uniform-arrays.html");
+CONFORMANCE_TEST(gl_uniform_bool,
+ "conformance/gl-uniform-bool.html");
+CONFORMANCE_TEST(gl_uniformmatrix4fv,
+ "conformance/gl-uniformmatrix4fv.html");
+CONFORMANCE_TEST(gl_unknown_uniform,
+ "conformance/gl-unknown-uniform.html");
+CONFORMANCE_TEST(gl_vertex_attrib_zero_issues,
+ "conformance/gl-vertex-attrib-zero-issues.html");
+CONFORMANCE_TEST(gl_vertex_attrib,
+ "conformance/gl-vertex-attrib.html");
+CONFORMANCE_TEST(gl_vertexattribpointer,
+ "conformance/gl-vertexattribpointer.html");
+CONFORMANCE_TEST(glsl_conformance,
+ "conformance/glsl-conformance.html");
+CONFORMANCE_TEST(glsl_long_variable_names,
+ "conformance/glsl-long-variable-names.html");
+CONFORMANCE_TEST(incorrect_context_object_behaviour,
+ "conformance/incorrect-context-object-behaviour.html");
+CONFORMANCE_TEST(index_validation_copies_indices,
+ "conformance/index-validation-copies-indices.html");
+CONFORMANCE_TEST(index_validation_crash_with_buffer_sub_data,
+ "conformance/index-validation-crash-with-buffer-sub-data.html");
+CONFORMANCE_TEST(index_validation_verifies_too_many_indices,
+ "conformance/index-validation-verifies-too-many-indices.html");
+CONFORMANCE_TEST(index_validation_with_resized_buffer,
+ "conformance/index-validation-with-resized-buffer.html");
+CONFORMANCE_TEST(index_validation,
+ "conformance/index-validation.html");
+CONFORMANCE_TEST(instanceof_test,
+ "conformance/instanceof-test.html");
+CONFORMANCE_TEST(invalid_UTF_16,
+ "conformance/invalid-UTF-16.html");
+CONFORMANCE_TEST(invalid_passed_params,
+ "conformance/invalid-passed-params.html");
+CONFORMANCE_TEST(is_object,
+ "conformance/is-object.html");
+CONFORMANCE_TEST(methods,
+ "conformance/methods.html");
+CONFORMANCE_TEST(more_than_65536_points,
+ "conformance/more-than-65536-points.html");
+CONFORMANCE_TEST(null_object_behaviour,
+ "conformance/null-object-behaviour.html");
+CONFORMANCE_TEST(null_uniform_location,
+ "conformance/null-uniform-location.html");
+CONFORMANCE_TEST(object_deletion_behaviour,
+ "conformance/object-deletion-behaviour.html");
+CONFORMANCE_TEST(oes_standard_derivatives,
+ "conformance/oes-standard-derivatives.html");
+CONFORMANCE_TEST(oes_texture_float,
+ "conformance/oes-texture-float.html");
+CONFORMANCE_TEST(oes_vertex_array_object,
+ "conformance/oes-vertex-array-object.html");
+CONFORMANCE_TEST(origin_clean_conformance,
+ "conformance/origin-clean-conformance.html");
+CONFORMANCE_TEST(point_size,
+ "conformance/point-size.html");
+CONFORMANCE_TEST(premultiplyalpha_test,
+ "conformance/premultiplyalpha-test.html");
+CONFORMANCE_TEST(program_test,
+ "conformance/program-test.html");
+CONFORMANCE_TEST(read_pixels_pack_alignment,
+ "conformance/read-pixels-pack-alignment.html");
+CONFORMANCE_TEST(read_pixels_test,
+ "conformance/read-pixels-test.html");
+CONFORMANCE_TEST(renderbuffer_initialization,
+ "conformance/renderbuffer-initialization.html");
+CONFORMANCE_TEST(resource_sharing_test,
+ "conformance/resource-sharing-test.html");
+CONFORMANCE_TEST(tex_image_and_sub_image_2d_with_array_buffer_view,
+ "conformance/tex-image-and-sub-image-2d-with-array-buffer-view.html");
+CONFORMANCE_TEST(tex_image_and_sub_image_2d_with_canvas,
+ "conformance/tex-image-and-sub-image-2d-with-canvas.html");
+CONFORMANCE_TEST(tex_image_and_sub_image_2d_with_image_data,
+ "conformance/tex-image-and-sub-image-2d-with-image-data.html");
+CONFORMANCE_TEST(tex_image_and_sub_image_2d_with_image,
+ "conformance/tex-image-and-sub-image-2d-with-image.html");
+CONFORMANCE_TEST(tex_image_and_sub_image_2d_with_video,
+ "conformance/tex-image-and-sub-image-2d-with-video.html");
+CONFORMANCE_TEST(tex_image_and_uniform_binding_bugs,
+ "conformance/tex-image-and-uniform-binding-bugs.html");
+CONFORMANCE_TEST(tex_image_with_format_and_type,
+ "conformance/tex-image-with-format-and-type.html");
+CONFORMANCE_TEST(tex_image_with_invalid_data,
+ "conformance/tex-image-with-invalid-data.html");
+CONFORMANCE_TEST(tex_input_validation,
+ "conformance/tex-input-validation.html");
+CONFORMANCE_TEST(tex_sub_image_2d_bad_args,
+ "conformance/tex-sub-image-2d-bad-args.html");
+CONFORMANCE_TEST(tex_sub_image_2d,
+ "conformance/tex-sub-image-2d.html");
+CONFORMANCE_TEST(texparameter_test,
+ "conformance/texparameter-test.html");
+CONFORMANCE_TEST(texture_active_bind_2,
+ "conformance/texture-active-bind-2.html");
+CONFORMANCE_TEST(texture_active_bind,
+ "conformance/texture-active-bind.html");
+CONFORMANCE_TEST(texture_complete,
+ "conformance/texture-complete.html");
+CONFORMANCE_TEST(texture_formats_test,
+ "conformance/texture-formats-test.html");
+CONFORMANCE_TEST(texture_npot,
+ "conformance/texture-npot.html");
+CONFORMANCE_TEST(texture_transparent_pixels_initialized,
+ "conformance/texture-transparent-pixels-initialized.html");
+CONFORMANCE_TEST(triangle,
+ "conformance/triangle.html");
+CONFORMANCE_TEST(type_conversion_test,
+ "conformance/type-conversion-test.html");
+CONFORMANCE_TEST(uniform_location,
+ "conformance/uniform-location.html");
+CONFORMANCE_TEST(uniform_samplers_test,
+ "conformance/uniform-samplers-test.html");
+CONFORMANCE_TEST(uninitialized_test,
+ "conformance/uninitialized-test.html");
+CONFORMANCE_TEST(viewport_unchanged_upon_resize,
+ "conformance/viewport-unchanged-upon-resize.html");
+CONFORMANCE_TEST(webgl_specific,
+ "conformance/webgl-specific.html");
+CONFORMANCE_TEST(conformance_constants,
+ "conformance/more/conformance/constants.html");
+CONFORMANCE_TEST(conformance_getContext,
+ "conformance/more/conformance/getContext.html");
+CONFORMANCE_TEST(conformance_methods,
+ "conformance/more/conformance/methods.html");
+CONFORMANCE_TEST(conformance_quickCheckAPI,
+ "conformance/more/conformance/quickCheckAPI.html");
+CONFORMANCE_TEST(conformance_webGLArrays,
+ "conformance/more/conformance/webGLArrays.html");
+CONFORMANCE_TEST(functions_bindBuffer,
+ "conformance/more/functions/bindBuffer.html");
+CONFORMANCE_TEST(functions_bindBufferBadArgs,
+ "conformance/more/functions/bindBufferBadArgs.html");
+CONFORMANCE_TEST(functions_bindFramebufferLeaveNonZero,
+ "conformance/more/functions/bindFramebufferLeaveNonZero.html");
+CONFORMANCE_TEST(functions_bufferData,
+ "conformance/more/functions/bufferData.html");
+CONFORMANCE_TEST(functions_bufferDataBadArgs,
+ "conformance/more/functions/bufferDataBadArgs.html");
+CONFORMANCE_TEST(functions_bufferSubData,
+ "conformance/more/functions/bufferSubData.html");
+CONFORMANCE_TEST(functions_bufferSubDataBadArgs,
+ "conformance/more/functions/bufferSubDataBadArgs.html");
+CONFORMANCE_TEST(functions_copyTexImage2D,
+ "conformance/more/functions/copyTexImage2D.html");
+CONFORMANCE_TEST(functions_copyTexImage2DBadArgs,
+ "conformance/more/functions/copyTexImage2DBadArgs.html");
+CONFORMANCE_TEST(functions_copyTexSubImage2D,
+ "conformance/more/functions/copyTexSubImage2D.html");
+CONFORMANCE_TEST(functions_copyTexSubImage2DBadArgs,
+ "conformance/more/functions/copyTexSubImage2DBadArgs.html");
+CONFORMANCE_TEST(functions_deleteBufferBadArgs,
+ "conformance/more/functions/deleteBufferBadArgs.html");
+CONFORMANCE_TEST(functions_drawArrays,
+ "conformance/more/functions/drawArrays.html");
+CONFORMANCE_TEST(functions_drawArraysOutOfBounds,
+ "conformance/more/functions/drawArraysOutOfBounds.html");
+CONFORMANCE_TEST(functions_drawElements,
+ "conformance/more/functions/drawElements.html");
+CONFORMANCE_TEST(functions_drawElementsBadArgs,
+ "conformance/more/functions/drawElementsBadArgs.html");
+CONFORMANCE_TEST(functions_isTests,
+ "conformance/more/functions/isTests.html");
+CONFORMANCE_TEST(functions_readPixels,
+ "conformance/more/functions/readPixels.html");
+CONFORMANCE_TEST(functions_readPixelsBadArgs,
+ "conformance/more/functions/readPixelsBadArgs.html");
+CONFORMANCE_TEST(functions_texImage2D,
+ "conformance/more/functions/texImage2D.html");
+CONFORMANCE_TEST(functions_texImage2DBadArgs,
+ "conformance/more/functions/texImage2DBadArgs.html");
+CONFORMANCE_TEST(functions_texImage2DHTML,
+ "conformance/more/functions/texImage2DHTML.html");
+CONFORMANCE_TEST(functions_texImage2DHTMLBadArgs,
+ "conformance/more/functions/texImage2DHTMLBadArgs.html");
+CONFORMANCE_TEST(functions_texSubImage2D,
+ "conformance/more/functions/texSubImage2D.html");
+CONFORMANCE_TEST(functions_texSubImage2DBadArgs,
+ "conformance/more/functions/texSubImage2DBadArgs.html");
+CONFORMANCE_TEST(functions_texSubImage2DHTML,
+ "conformance/more/functions/texSubImage2DHTML.html");
+CONFORMANCE_TEST(functions_texSubImage2DHTMLBadArgs,
+ "conformance/more/functions/texSubImage2DHTMLBadArgs.html");
+CONFORMANCE_TEST(functions_uniformf,
+ "conformance/more/functions/uniformf.html");
+CONFORMANCE_TEST(functions_uniformfBadArgs,
+ "conformance/more/functions/uniformfBadArgs.html");
+CONFORMANCE_TEST(functions_uniformfArrayLen1,
+ "conformance/more/functions/uniformfArrayLen1.html");
+CONFORMANCE_TEST(functions_uniformi,
+ "conformance/more/functions/uniformi.html");
+CONFORMANCE_TEST(functions_uniformiBadArgs,
+ "conformance/more/functions/uniformiBadArgs.html");
+CONFORMANCE_TEST(functions_uniformMatrix,
+ "conformance/more/functions/uniformMatrix.html");
+CONFORMANCE_TEST(functions_uniformMatrixBadArgs,
+ "conformance/more/functions/uniformMatrixBadArgs.html");
+CONFORMANCE_TEST(functions_vertexAttrib,
+ "conformance/more/functions/vertexAttrib.html");
+CONFORMANCE_TEST(functions_vertexAttribBadArgs,
+ "conformance/more/functions/vertexAttribBadArgs.html");
+CONFORMANCE_TEST(functions_vertexAttribPointer,
+ "conformance/more/functions/vertexAttribPointer.html");
+CONFORMANCE_TEST(functions_vertexAttribPointerBadArgs,
+ "conformance/more/functions/vertexAttribPointerBadArgs.html");
+CONFORMANCE_TEST(glsl_arrayOutOfBounds,
+ "conformance/more/glsl/arrayOutOfBounds.html");
+CONFORMANCE_TEST(glsl_uniformOutOfBounds,
+ "conformance/more/glsl/uniformOutOfBounds.html");
+
+#endif // CHROME_TEST_GPU_WEBGL_CONFORMANCE_TEST_LIST_AUTOGEN_H_
diff --git a/chrome/test/gpu/webgl_conformance_tests.cc b/chrome/test/gpu/webgl_conformance_tests.cc
new file mode 100644
index 0000000..02afdd6
--- /dev/null
+++ b/chrome/test/gpu/webgl_conformance_tests.cc
@@ -0,0 +1,90 @@
+// Copyright (c) 2011 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 "base/file_util.h"
+#include "base/path_service.h"
+#include "base/test/test_timeouts.h"
+#include "base/utf_string_conversions.h"
+#include "chrome/common/chrome_paths.h"
+#include "chrome/test/automation/tab_proxy.h"
+#include "chrome/test/test_launcher_utils.h"
+#include "chrome/test/ui/javascript_test_util.h"
+#include "chrome/test/ui/ui_test.h"
+#include "net/base/net_util.h"
+#include "ui/gfx/gl/gl_implementation.h"
+
+namespace {
+
+#if defined(OS_WIN)
+const std::string& kGLImplementationName = gfx::kGLImplementationEGLName;
+#else
+const std::string& kGLImplementationName = gfx::kGLImplementationDesktopName;
+#endif
+
+class WebGLConformanceTests : public UITest {
+ public:
+ WebGLConformanceTests() {
+ show_window_ = true;
+ dom_automation_enabled_ = true;
+ }
+
+ void SetUp() {
+ EXPECT_TRUE(test_launcher_utils::OverrideGLImplementation(
+ &launch_arguments_,
+ kGLImplementationName));
+ UITest::SetUp();
+ }
+
+ void RunTest(const std::string& url) {
+ FilePath test_path;
+ PathService::Get(chrome::DIR_TEST_DATA, &test_path);
+ test_path = test_path.Append(FILE_PATH_LITERAL("gpu"));
+
+ FilePath webgl_conformance_path = test_path.Append(
+ FILE_PATH_LITERAL("webgl_conformance"));
+ ASSERT_TRUE(file_util::DirectoryExists(webgl_conformance_path))
+ << "Missing conformance tests: " << webgl_conformance_path.value();
+
+ test_path = test_path.Append(FILE_PATH_LITERAL("webgl_conformance.html"));
+
+ scoped_refptr<TabProxy> tab(GetActiveTab());
+ ASSERT_TRUE(tab.get());
+
+ ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
+ tab->NavigateToURL(net::FilePathToFileURL(test_path)));
+
+ // Start the test. Note: prepend the WebGL conformance test directory.
+ ASSERT_TRUE(tab->NavigateToURLAsync(
+ GURL("javascript:start('webgl_conformance/" + url + "');")));
+
+ // Block until the test completes.
+ ASSERT_TRUE(WaitUntilJavaScriptCondition(
+ tab, L"", L"window.domAutomationController.send(!running);",
+ TestTimeouts::huge_test_timeout_ms()));
+
+ // Read out the test result.
+ std::wstring result, message;
+ ASSERT_TRUE(tab->ExecuteAndExtractString(
+ L"",
+ L"window.domAutomationController.send(JSON.stringify(result));",
+ &result));
+ ASSERT_TRUE(tab->ExecuteAndExtractString(
+ L"",
+ L"window.domAutomationController.send(message);",
+ &message));
+
+ EXPECT_EQ(WideToUTF8(result),"true") << WideToUTF8(message);
+ }
+};
+
+#define CONFORMANCE_TEST(name, url) \
+TEST_F(WebGLConformanceTests, name) { \
+ RunTest(url); \
+}
+
+// The test declarations are located in webgl_conformance_test_list_autogen.h,
+// because the list is automatically generated by a script.
+#include "webgl_conformance_test_list_autogen.h"
+
+} // namespace
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 417d65d..d8aae79 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -517,8 +517,11 @@ void UITest::SetUp() {
// Force tests to use OSMesa if they launch the GPU process. This is in
// UITest::SetUp so that it does not affect pyautolib, which runs tests that
// do not work with OSMesa.
- launch_arguments_.AppendSwitchASCII(switches::kUseGL,
- gfx::kGLImplementationOSMesaName);
+ // Note, if the launch arguments already declared a GL implementation, do not
+ // force OSMesa.
+ if (!launch_arguments_.HasSwitch(switches::kUseGL))
+ launch_arguments_.AppendSwitchASCII(switches::kUseGL,
+ gfx::kGLImplementationOSMesaName);
// Mac does not support accelerated compositing with OSMesa. Disable on all
// platforms so it is consistent. http://crbug.com/58343