Bug 694730 - Upgrade WebGL conformance test suite to r15815 - no review
authorBenoit Jacob <bjacob@mozilla.com>
Sun, 16 Oct 2011 21:19:28 -0400
changeset 78830 71276cce0cc3e0904cf99ac8367db652d83b0e7d
parent 78829 532c01d1ca0e6558f60238a0dc630ec55ce80388
child 78831 cd9fe4275983d4ec93c41d32887506c797d0fc9f
push id21338
push usermak77@bonardo.net
push dateMon, 17 Oct 2011 09:46:07 +0000
treeherdermozilla-central@d2241309d83c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs694730
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 694730 - Upgrade WebGL conformance test suite to r15815 - no review The 1.0.1 release is really close, and upgrading now allows us to give feedback and make sure that all tests are passable. The canonical URL for this test suite is https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/webgl-conformance-tests.html
content/canvas/test/webgl/README.mozilla
content/canvas/test/webgl/conformance/00_test_list.txt
content/canvas/test/webgl/conformance/array-buffer-crash.html
content/canvas/test/webgl/conformance/array-buffer-view-crash.html
content/canvas/test/webgl/conformance/array-unit-tests.html
content/canvas/test/webgl/conformance/attribs/00_test_list.txt
content/canvas/test/webgl/conformance/attribs/gl-enable-vertex-attrib.html
content/canvas/test/webgl/conformance/attribs/gl-vertex-attrib-zero-issues.html
content/canvas/test/webgl/conformance/attribs/gl-vertex-attrib.html
content/canvas/test/webgl/conformance/attribs/gl-vertexattribpointer-offsets.html
content/canvas/test/webgl/conformance/attribs/gl-vertexattribpointer.html
content/canvas/test/webgl/conformance/bad-arguments-test.html
content/canvas/test/webgl/conformance/buffer-bind-test.html
content/canvas/test/webgl/conformance/buffer-data-array-buffer.html
content/canvas/test/webgl/conformance/buffer-offscreen-test.html
content/canvas/test/webgl/conformance/buffer-preserve-test.html
content/canvas/test/webgl/conformance/buffers/00_test_list.txt
content/canvas/test/webgl/conformance/buffers/buffer-bind-test.html
content/canvas/test/webgl/conformance/buffers/buffer-data-array-buffer.html
content/canvas/test/webgl/conformance/buffers/index-validation-copies-indices.html
content/canvas/test/webgl/conformance/buffers/index-validation-crash-with-buffer-sub-data.html
content/canvas/test/webgl/conformance/buffers/index-validation-verifies-too-many-indices.html
content/canvas/test/webgl/conformance/buffers/index-validation-with-resized-buffer.html
content/canvas/test/webgl/conformance/buffers/index-validation.html
content/canvas/test/webgl/conformance/canvas-test.html
content/canvas/test/webgl/conformance/canvas-zero-size.html
content/canvas/test/webgl/conformance/canvas/00_test_list.txt
content/canvas/test/webgl/conformance/canvas/buffer-offscreen-test.html
content/canvas/test/webgl/conformance/canvas/buffer-preserve-test.html
content/canvas/test/webgl/conformance/canvas/canvas-test.html
content/canvas/test/webgl/conformance/canvas/canvas-zero-size.html
content/canvas/test/webgl/conformance/canvas/drawingbuffer-static-canvas-test.html
content/canvas/test/webgl/conformance/canvas/drawingbuffer-test.html
content/canvas/test/webgl/conformance/canvas/viewport-unchanged-upon-resize.html
content/canvas/test/webgl/conformance/constants.html
content/canvas/test/webgl/conformance/context-attributes-alpha-depth-stencil-antialias.html
content/canvas/test/webgl/conformance/context-lost-restored.html
content/canvas/test/webgl/conformance/context-lost.html
content/canvas/test/webgl/conformance/context-type-test.html
content/canvas/test/webgl/conformance/context/00_test_list.txt
content/canvas/test/webgl/conformance/context/constants.html
content/canvas/test/webgl/conformance/context/context-attributes-alpha-depth-stencil-antialias.html
content/canvas/test/webgl/conformance/context/context-lost-restored.html
content/canvas/test/webgl/conformance/context/context-lost.html
content/canvas/test/webgl/conformance/context/context-type-test.html
content/canvas/test/webgl/conformance/context/incorrect-context-object-behaviour.html
content/canvas/test/webgl/conformance/context/methods.html
content/canvas/test/webgl/conformance/context/premultiplyalpha-test.html
content/canvas/test/webgl/conformance/context/resource-sharing-test.html
content/canvas/test/webgl/conformance/copy-tex-image-and-sub-image-2d.html
content/canvas/test/webgl/conformance/draw-arrays-out-of-bounds.html
content/canvas/test/webgl/conformance/draw-elements-out-of-bounds.html
content/canvas/test/webgl/conformance/drawingbuffer-static-canvas-test.html
content/canvas/test/webgl/conformance/drawingbuffer-test.html
content/canvas/test/webgl/conformance/error-reporting.html
content/canvas/test/webgl/conformance/extensions/00_test_list.txt
content/canvas/test/webgl/conformance/extensions/oes-standard-derivatives.html
content/canvas/test/webgl/conformance/extensions/oes-texture-float.html
content/canvas/test/webgl/conformance/extensions/oes-vertex-array-object.html
content/canvas/test/webgl/conformance/extensions/webgl-debug-renderer-info.html
content/canvas/test/webgl/conformance/extensions/webgl-debug-shaders.html
content/canvas/test/webgl/conformance/framebuffer-object-attachment.html
content/canvas/test/webgl/conformance/framebuffer-test.html
content/canvas/test/webgl/conformance/get-active-test.html
content/canvas/test/webgl/conformance/gl-bind-attrib-location-test.html
content/canvas/test/webgl/conformance/gl-clear.html
content/canvas/test/webgl/conformance/gl-drawelements.html
content/canvas/test/webgl/conformance/gl-enable-enum-test.html
content/canvas/test/webgl/conformance/gl-enable-vertex-attrib.html
content/canvas/test/webgl/conformance/gl-enum-tests.html
content/canvas/test/webgl/conformance/gl-fragcoord.html
content/canvas/test/webgl/conformance/gl-get-active-attribute.html
content/canvas/test/webgl/conformance/gl-get-active-uniform.html
content/canvas/test/webgl/conformance/gl-get-calls.html
content/canvas/test/webgl/conformance/gl-geterror.html
content/canvas/test/webgl/conformance/gl-getshadersource.html
content/canvas/test/webgl/conformance/gl-getstring.html
content/canvas/test/webgl/conformance/gl-min-attribs.html
content/canvas/test/webgl/conformance/gl-min-textures.html
content/canvas/test/webgl/conformance/gl-min-uniforms.html
content/canvas/test/webgl/conformance/gl-object-get-calls.html
content/canvas/test/webgl/conformance/gl-pixelstorei.html
content/canvas/test/webgl/conformance/gl-scissor-test.html
content/canvas/test/webgl/conformance/gl-shader-test.html
content/canvas/test/webgl/conformance/gl-teximage.html
content/canvas/test/webgl/conformance/gl-uniform-arrays.html
content/canvas/test/webgl/conformance/gl-uniform-bool.html
content/canvas/test/webgl/conformance/gl-uniformmatrix4fv.html
content/canvas/test/webgl/conformance/gl-unknown-uniform.html
content/canvas/test/webgl/conformance/gl-vertex-attrib-zero-issues.html
content/canvas/test/webgl/conformance/gl-vertex-attrib.html
content/canvas/test/webgl/conformance/gl-vertexattribpointer-offsets.html
content/canvas/test/webgl/conformance/gl-vertexattribpointer.html
content/canvas/test/webgl/conformance/glsl-2types-of-textures-on-same-unit.html
content/canvas/test/webgl/conformance/glsl-conformance.html
content/canvas/test/webgl/conformance/glsl-features.html
content/canvas/test/webgl/conformance/glsl-long-variable-names.html
content/canvas/test/webgl/conformance/glsl/00_test_list.txt
content/canvas/test/webgl/conformance/glsl/functions/00_test_list.txt
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-abs.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-acos.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-asin.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-atan-xy.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-atan.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-ceil.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-clamp-float.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-clamp-gentype.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-cos.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-cross.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-distance.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-dot.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-faceforward.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-floor.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-fract.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-length.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-lessThan.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-max-float.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-max-gentype.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-min-float.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-min-gentype.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-mix-float.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-mix-gentype.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-mod-float.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-mod-gentype.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-normalize.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-reflect.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-refract.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-sign.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-sin.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-smoothstep-float.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-smoothstep-gentype.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-step-float.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function-step-gentype.html
content/canvas/test/webgl/conformance/glsl/functions/glsl-function.html
content/canvas/test/webgl/conformance/glsl/implicit/00_test_list.txt
content/canvas/test/webgl/conformance/glsl/implicit/add_int_float.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/add_int_mat2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/add_int_mat3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/add_int_mat4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/add_int_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/add_int_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/add_int_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/add_ivec2_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/add_ivec3_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/add_ivec4_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/assign_int_to_float.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/construct_struct.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/divide_int_float.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/divide_int_mat2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/divide_int_mat3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/divide_int_mat4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/divide_int_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/divide_int_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/divide_int_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/divide_ivec2_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/divide_ivec3_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/divide_ivec4_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/equal_int_float.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/equal_ivec2_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/equal_ivec3_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/equal_ivec4_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/function_int_float.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/function_ivec2_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/function_ivec3_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/function_ivec4_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/greater_than.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/greater_than_equal.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/less_than.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/less_than_equal.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_float.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_mat2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_mat3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_mat4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/multiply_int_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/not_equal_int_float.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_float.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_mat2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_mat3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_mat4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/subtract_int_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/ternary_int_float.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html
content/canvas/test/webgl/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html
content/canvas/test/webgl/conformance/glsl/misc/00_test_list.txt
content/canvas/test/webgl/conformance/glsl/misc/glsl-2types-of-textures-on-same-unit.html
content/canvas/test/webgl/conformance/glsl/misc/glsl-function-nodes.html
content/canvas/test/webgl/conformance/glsl/misc/glsl-long-variable-names.html
content/canvas/test/webgl/conformance/glsl/misc/include.vs
content/canvas/test/webgl/conformance/glsl/misc/non-ascii-comments.vert.html
content/canvas/test/webgl/conformance/glsl/misc/non-ascii.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-256-character-identifier.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-257-character-identifier.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-attrib-array.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-clipvertex.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-default-precision.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-default-precision.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-define-line-continuation.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-dfdx.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-error-directive.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-float-return-value.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-frag-depth.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-function-recursion.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-glcolor.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-gles-1.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-gles-symbol.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-include.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-int-return-value.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-invalid-identifier.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-line-directive.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-long-line.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-non-ascii-error.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-precision.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-quoted-error.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec2-return-value.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec3-return-value.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-vec4-return-value.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-100.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-100.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-120.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-version-130.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-with-webgl-identifier.vert.html
content/canvas/test/webgl/conformance/glsl/misc/shader-without-precision.frag.html
content/canvas/test/webgl/conformance/glsl/misc/shared.html
content/canvas/test/webgl/conformance/glsl/reserved/00_test_list.txt
content/canvas/test/webgl/conformance/glsl/reserved/_webgl_field.vert.html
content/canvas/test/webgl/conformance/glsl/reserved/_webgl_function.vert.html
content/canvas/test/webgl/conformance/glsl/reserved/_webgl_struct.vert.html
content/canvas/test/webgl/conformance/glsl/reserved/_webgl_variable.vert.html
content/canvas/test/webgl/conformance/glsl/reserved/webgl_field.vert.html
content/canvas/test/webgl/conformance/glsl/reserved/webgl_function.vert.html
content/canvas/test/webgl/conformance/glsl/reserved/webgl_struct.vert.html
content/canvas/test/webgl/conformance/glsl/reserved/webgl_variable.vert.html
content/canvas/test/webgl/conformance/glsl/variables/00_test_list.txt
content/canvas/test/webgl/conformance/glsl/variables/gl-fragcoord.html
content/canvas/test/webgl/conformance/glsl/variables/gl-frontfacing.html
content/canvas/test/webgl/conformance/glsl/variables/gl-pointcoord.html
content/canvas/test/webgl/conformance/include.vs
content/canvas/test/webgl/conformance/incorrect-context-object-behaviour.html
content/canvas/test/webgl/conformance/index-validation-copies-indices.html
content/canvas/test/webgl/conformance/index-validation-crash-with-buffer-sub-data.html
content/canvas/test/webgl/conformance/index-validation-verifies-too-many-indices.html
content/canvas/test/webgl/conformance/index-validation-with-resized-buffer.html
content/canvas/test/webgl/conformance/index-validation.html
content/canvas/test/webgl/conformance/instanceof-test.html
content/canvas/test/webgl/conformance/invalid-UTF-16.html
content/canvas/test/webgl/conformance/invalid-passed-params.html
content/canvas/test/webgl/conformance/is-object.html
content/canvas/test/webgl/conformance/limits/00_test_list.txt
content/canvas/test/webgl/conformance/limits/gl-max-texture-dimensions.html
content/canvas/test/webgl/conformance/limits/gl-min-attribs.html
content/canvas/test/webgl/conformance/limits/gl-min-textures.html
content/canvas/test/webgl/conformance/limits/gl-min-uniforms.html
content/canvas/test/webgl/conformance/methods.html
content/canvas/test/webgl/conformance/misc/00_test_list.txt
content/canvas/test/webgl/conformance/misc/bad-arguments-test.html
content/canvas/test/webgl/conformance/misc/error-reporting.html
content/canvas/test/webgl/conformance/misc/instanceof-test.html
content/canvas/test/webgl/conformance/misc/invalid-passed-params.html
content/canvas/test/webgl/conformance/misc/is-object.html
content/canvas/test/webgl/conformance/misc/null-object-behaviour.html
content/canvas/test/webgl/conformance/misc/object-deletion-behaviour.html
content/canvas/test/webgl/conformance/misc/type-conversion-test.html
content/canvas/test/webgl/conformance/misc/uninitialized-test.html
content/canvas/test/webgl/conformance/misc/webgl-specific.html
content/canvas/test/webgl/conformance/more-than-65536-points.html
content/canvas/test/webgl/conformance/more/util.js
content/canvas/test/webgl/conformance/null-object-behaviour.html
content/canvas/test/webgl/conformance/null-uniform-location.html
content/canvas/test/webgl/conformance/object-deletion-behaviour.html
content/canvas/test/webgl/conformance/oes-standard-derivatives.html
content/canvas/test/webgl/conformance/oes-texture-float.html
content/canvas/test/webgl/conformance/oes-vertex-array-object.html
content/canvas/test/webgl/conformance/origin-clean-conformance.html
content/canvas/test/webgl/conformance/point-size.html
content/canvas/test/webgl/conformance/premultiplyalpha-test.html
content/canvas/test/webgl/conformance/program-test.html
content/canvas/test/webgl/conformance/programs/00_test_list.txt
content/canvas/test/webgl/conformance/programs/get-active-test.html
content/canvas/test/webgl/conformance/programs/gl-bind-attrib-location-test.html
content/canvas/test/webgl/conformance/programs/gl-get-active-attribute.html
content/canvas/test/webgl/conformance/programs/gl-get-active-uniform.html
content/canvas/test/webgl/conformance/programs/gl-getshadersource.html
content/canvas/test/webgl/conformance/programs/gl-shader-test.html
content/canvas/test/webgl/conformance/programs/invalid-UTF-16.html
content/canvas/test/webgl/conformance/programs/program-test.html
content/canvas/test/webgl/conformance/read-pixels-pack-alignment.html
content/canvas/test/webgl/conformance/read-pixels-test.html
content/canvas/test/webgl/conformance/reading/00_test_list.txt
content/canvas/test/webgl/conformance/reading/read-pixels-pack-alignment.html
content/canvas/test/webgl/conformance/reading/read-pixels-test.html
content/canvas/test/webgl/conformance/renderbuffer-initialization.html
content/canvas/test/webgl/conformance/renderbuffers/00_test_list.txt
content/canvas/test/webgl/conformance/renderbuffers/framebuffer-object-attachment.html
content/canvas/test/webgl/conformance/renderbuffers/framebuffer-test.html
content/canvas/test/webgl/conformance/renderbuffers/renderbuffer-initialization.html
content/canvas/test/webgl/conformance/rendering/00_test_list.txt
content/canvas/test/webgl/conformance/rendering/draw-arrays-out-of-bounds.html
content/canvas/test/webgl/conformance/rendering/draw-elements-out-of-bounds.html
content/canvas/test/webgl/conformance/rendering/gl-clear.html
content/canvas/test/webgl/conformance/rendering/gl-drawelements.html
content/canvas/test/webgl/conformance/rendering/gl-scissor-test.html
content/canvas/test/webgl/conformance/rendering/more-than-65536-indices.html
content/canvas/test/webgl/conformance/rendering/point-size.html
content/canvas/test/webgl/conformance/rendering/triangle.html
content/canvas/test/webgl/conformance/resource-sharing-test.html
content/canvas/test/webgl/conformance/resources/glsl-conformance-test.js
content/canvas/test/webgl/conformance/resources/glsl-feature-tests.css
content/canvas/test/webgl/conformance/resources/glsl-generator.js
content/canvas/test/webgl/conformance/resources/webgl-test-utils.js
content/canvas/test/webgl/conformance/resources/webgl-test.js
content/canvas/test/webgl/conformance/state/00_test_list.txt
content/canvas/test/webgl/conformance/state/gl-enable-enum-test.html
content/canvas/test/webgl/conformance/state/gl-enum-tests.html
content/canvas/test/webgl/conformance/state/gl-get-calls.html
content/canvas/test/webgl/conformance/state/gl-geterror.html
content/canvas/test/webgl/conformance/state/gl-getstring.html
content/canvas/test/webgl/conformance/state/gl-object-get-calls.html
content/canvas/test/webgl/conformance/tex-image-and-sub-image-2d-with-array-buffer-view.html
content/canvas/test/webgl/conformance/tex-image-and-sub-image-2d-with-canvas.html
content/canvas/test/webgl/conformance/tex-image-and-sub-image-2d-with-image-data.html
content/canvas/test/webgl/conformance/tex-image-and-sub-image-2d-with-image.html
content/canvas/test/webgl/conformance/tex-image-and-sub-image-2d-with-video.html
content/canvas/test/webgl/conformance/tex-image-and-uniform-binding-bugs.html
content/canvas/test/webgl/conformance/tex-image-with-format-and-type.html
content/canvas/test/webgl/conformance/tex-image-with-invalid-data.html
content/canvas/test/webgl/conformance/tex-input-validation.html
content/canvas/test/webgl/conformance/tex-sub-image-2d-bad-args.html
content/canvas/test/webgl/conformance/tex-sub-image-2d.html
content/canvas/test/webgl/conformance/texparameter-test.html
content/canvas/test/webgl/conformance/texture-active-bind-2.html
content/canvas/test/webgl/conformance/texture-active-bind.html
content/canvas/test/webgl/conformance/texture-complete.html
content/canvas/test/webgl/conformance/texture-formats-test.html
content/canvas/test/webgl/conformance/texture-npot-video.html
content/canvas/test/webgl/conformance/texture-npot.html
content/canvas/test/webgl/conformance/texture-transparent-pixels-initialized.html
content/canvas/test/webgl/conformance/textures/00_test_list.txt
content/canvas/test/webgl/conformance/textures/copy-tex-image-and-sub-image-2d.html
content/canvas/test/webgl/conformance/textures/gl-pixelstorei.html
content/canvas/test/webgl/conformance/textures/gl-teximage.html
content/canvas/test/webgl/conformance/textures/origin-clean-conformance.html
content/canvas/test/webgl/conformance/textures/tex-image-and-sub-image-2d-with-array-buffer-view.html
content/canvas/test/webgl/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html
content/canvas/test/webgl/conformance/textures/tex-image-and-sub-image-2d-with-image-data.html
content/canvas/test/webgl/conformance/textures/tex-image-and-sub-image-2d-with-image.html
content/canvas/test/webgl/conformance/textures/tex-image-and-sub-image-2d-with-video.html
content/canvas/test/webgl/conformance/textures/tex-image-and-uniform-binding-bugs.html
content/canvas/test/webgl/conformance/textures/tex-image-with-format-and-type.html
content/canvas/test/webgl/conformance/textures/tex-image-with-invalid-data.html
content/canvas/test/webgl/conformance/textures/tex-input-validation.html
content/canvas/test/webgl/conformance/textures/tex-sub-image-2d-bad-args.html
content/canvas/test/webgl/conformance/textures/tex-sub-image-2d.html
content/canvas/test/webgl/conformance/textures/texparameter-test.html
content/canvas/test/webgl/conformance/textures/texture-active-bind-2.html
content/canvas/test/webgl/conformance/textures/texture-active-bind.html
content/canvas/test/webgl/conformance/textures/texture-complete.html
content/canvas/test/webgl/conformance/textures/texture-formats-test.html
content/canvas/test/webgl/conformance/textures/texture-mips.html
content/canvas/test/webgl/conformance/textures/texture-npot-video.html
content/canvas/test/webgl/conformance/textures/texture-npot.html
content/canvas/test/webgl/conformance/textures/texture-size-cube-maps.html
content/canvas/test/webgl/conformance/textures/texture-size.html
content/canvas/test/webgl/conformance/textures/texture-transparent-pixels-initialized.html
content/canvas/test/webgl/conformance/triangle.html
content/canvas/test/webgl/conformance/type-conversion-test.html
content/canvas/test/webgl/conformance/typedarrays/00_test_list.txt
content/canvas/test/webgl/conformance/typedarrays/array-buffer-crash.html
content/canvas/test/webgl/conformance/typedarrays/array-buffer-view-crash.html
content/canvas/test/webgl/conformance/typedarrays/array-unit-tests.html
content/canvas/test/webgl/conformance/uniform-location.html
content/canvas/test/webgl/conformance/uniform-samplers-test.html
content/canvas/test/webgl/conformance/uniforms/00_test_list.txt
content/canvas/test/webgl/conformance/uniforms/gl-uniform-arrays.html
content/canvas/test/webgl/conformance/uniforms/gl-uniform-bool.html
content/canvas/test/webgl/conformance/uniforms/gl-uniformmatrix4fv.html
content/canvas/test/webgl/conformance/uniforms/gl-unknown-uniform.html
content/canvas/test/webgl/conformance/uniforms/null-uniform-location.html
content/canvas/test/webgl/conformance/uniforms/uniform-location.html
content/canvas/test/webgl/conformance/uniforms/uniform-samplers-test.html
content/canvas/test/webgl/conformance/uninitialized-test.html
content/canvas/test/webgl/conformance/viewport-unchanged-upon-resize.html
content/canvas/test/webgl/conformance/webgl-specific.html
content/canvas/test/webgl/disable-quickCheckAPI.patch
content/canvas/test/webgl/dont-load-image-from-internet.patch
content/canvas/test/webgl/extra/out-of-vram.html
content/canvas/test/webgl/extra/simulated-attrib-0-bug-test.html
content/canvas/test/webgl/extra/slow-shader-example.html
content/canvas/test/webgl/failing_tests_linux.txt
content/canvas/test/webgl/failing_tests_mac.txt
content/canvas/test/webgl/failing_tests_windows.txt
content/canvas/test/webgl/remove-uniqueObjectTest.patch
content/canvas/test/webgl/resources/js-test-pre.js
content/canvas/test/webgl/resources/webgl-test-harness.js
content/canvas/test/webgl/test_webgl_conformance_test_suite.html
content/canvas/test/webgl/undo-r15330-async-test-list-loading.patch
content/canvas/test/webgl/webgl-conformance-tests.html
--- a/content/canvas/test/webgl/README.mozilla
+++ b/content/canvas/test/webgl/README.mozilla
@@ -1,15 +1,14 @@
-This is a local copy of the WebGL conformance suite, SVN revision 15318
+This is a local copy of the WebGL conformance suite, SVN revision 15815
 
 The canonical location for this testsuite is:
 
-  https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/webgl-conformance-tests.html
+  https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests
 
 All files and directories in this directory, with the exceptions listed below, come from
 upstream and should not be modified without corresponding upstream fixes and/or a
 patch file in this directory. The exceptions (the Mozilla-specific files) are:
- * the crossorigin directory is not from upstream (not easy to share, as it relies on special features of the HTTP server used for our test framework)
  * README.mozilla (this file)
  * failing_tests_*.txt
  * Makefile.in
  * *.patch files, if any
 
--- a/content/canvas/test/webgl/conformance/00_test_list.txt
+++ b/content/canvas/test/webgl/conformance/00_test_list.txt
@@ -1,109 +1,17 @@
-array-buffer-crash.html
-array-buffer-view-crash.html
-array-unit-tests.html
-bad-arguments-test.html
-buffer-bind-test.html
-buffer-data-array-buffer.html
-buffer-preserve-test.html
-buffer-offscreen-test.html
-canvas-test.html
-canvas-zero-size.html
-constants.html
-context-attributes-alpha-depth-stencil-antialias.html
-context-lost-restored.html
-context-lost.html
-context-type-test.html
-copy-tex-image-and-sub-image-2d.html
-draw-arrays-out-of-bounds.html
-draw-elements-out-of-bounds.html
-drawingbuffer-static-canvas-test.html
-drawingbuffer-test.html
-error-reporting.html
-framebuffer-object-attachment.html
-framebuffer-test.html
-get-active-test.html
-gl-bind-attrib-location-test.html
-gl-clear.html
-gl-drawelements.html
-gl-enable-enum-test.html
-gl-enable-vertex-attrib.html
-gl-enum-tests.html
-gl-fragcoord.html
-shaders/00_test_list.txt
-gl-get-active-attribute.html
-gl-get-active-uniform.html
-gl-get-calls.html
-gl-geterror.html
-gl-getshadersource.html
-gl-getstring.html
-gl-min-attribs.html
-gl-min-textures.html
-gl-min-uniforms.html
-gl-object-get-calls.html
-gl-pixelstorei.html
-gl-scissor-test.html
-gl-shader-test.html
-gl-teximage.html
-gl-uniform-arrays.html
-gl-uniform-bool.html
-gl-uniformmatrix4fv.html
-gl-unknown-uniform.html
-gl-vertex-attrib-zero-issues.html
-gl-vertex-attrib.html
-gl-vertexattribpointer.html
-gl-vertexattribpointer-offsets.html
-#glsl-2types-of-textures-on-same-unit.html
-glsl-conformance.html
-glsl-long-variable-names.html
-incorrect-context-object-behaviour.html
-index-validation-copies-indices.html
-index-validation-crash-with-buffer-sub-data.html
-index-validation-verifies-too-many-indices.html
-index-validation-with-resized-buffer.html
-index-validation.html
-instanceof-test.html
-invalid-UTF-16.html
-invalid-passed-params.html
-is-object.html
-methods.html
-more-than-65536-points.html
-null-object-behaviour.html
-null-uniform-location.html
-object-deletion-behaviour.html
-oes-standard-derivatives.html
-oes-texture-float.html
-oes-vertex-array-object.html
-origin-clean-conformance.html
-point-size.html
-premultiplyalpha-test.html
-program-test.html
-read-pixels-pack-alignment.html
-read-pixels-test.html
-renderbuffer-initialization.html
-resource-sharing-test.html
-tex-image-and-sub-image-2d-with-array-buffer-view.html
-tex-image-and-sub-image-2d-with-canvas.html
-tex-image-and-sub-image-2d-with-image-data.html
-tex-image-and-sub-image-2d-with-image.html
-tex-image-and-sub-image-2d-with-video.html
-tex-image-and-uniform-binding-bugs.html
-tex-image-with-format-and-type.html
-tex-image-with-invalid-data.html
-tex-input-validation.html
-tex-sub-image-2d-bad-args.html
-tex-sub-image-2d.html
-texparameter-test.html
-texture-active-bind-2.html
-texture-active-bind.html
-texture-complete.html
-texture-formats-test.html
-texture-npot.html
-texture-npot-video.html
-texture-transparent-pixels-initialized.html
-triangle.html
-type-conversion-test.html
-uniform-location.html
-uniform-samplers-test.html
-uninitialized-test.html
-viewport-unchanged-upon-resize.html
-webgl-specific.html
+attribs/00_test_list.txt
+buffers/00_test_list.txt
+canvas/00_test_list.txt
+context/00_test_list.txt
+extensions/00_test_list.txt
+glsl/00_test_list.txt
+limits/00_test_list.txt
+misc/00_test_list.txt
+programs/00_test_list.txt
+reading/00_test_list.txt
+renderbuffers/00_test_list.txt
+rendering/00_test_list.txt
+state/00_test_list.txt
+textures/00_test_list.txt
+typedarrays/00_test_list.txt
+uniforms/00_test_list.txt
+
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/array-buffer-crash.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!--
-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.
- -->
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-
-<script>
-
-description('Test ArrayBuffer.byteLength');
-
-// The following used to cause a crash in Chrome.
-
-// Note that because the argument to ArrayBuffer's constructor is not
-// optional, an implementation might throw an exception on the expression
-// below rather than implicitly passing undefined. Either way is acceptable
-// from the point of view of this test, but implementations must not crash.
-try {
-  new ArrayBuffer().byteLength;
-} catch (e) {
-}
-
-testPassed("new ArrayBuffer().byteLength did not crash");
-successfullyParsed = true;
-
-</script>
-<script src="../resources/js-test-post.js"></script>
-</body>
-</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/array-buffer-view-crash.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!--
-Copyright (c) 2011 The Chromium Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-   * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-
-<script>
-
-description('Verify that constructing a typed array view with no arguments and fetching its length does not crash');
-
-
-// The following used to cause a crash in both Safari and Chrome.
-
-// Note that because the argument to ArrayBuffer's constructor is not
-// optional, an implementation might throw an exception on the expression
-// below rather than implicitly passing undefined. Either way is acceptable
-// from the point of view of this test, but implementations must not crash.
-try {
-  new Uint32Array().length;
-} catch (e) {
-}
-
-testPassed("new Uint32Array().length did not crash");
-successfullyParsed = true;
-
-</script>
-<script src="../resources/js-test-post.js"></script>
-
-</body>
-</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/array-unit-tests.html
+++ /dev/null
@@ -1,923 +0,0 @@
-<!--
-Copyright (c) 2011 The Chromium Authors. All rights reserved.
-Copyright (C) 2011 Apple Computer, Inc.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-   * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-
-<script>
-
-description("Verifies the functionality of the new array-like objects in the TypedArray spec");
-
-var currentlyRunning = '';
-var allPassed = true;
-function running(str) {
-  currentlyRunning = str;
-}
-
-function output(str) {
-  debug(str);
-}
-
-function pass() {
-  testPassed(currentlyRunning);
-}
-
-function fail(str) {
-  allPassed = false;
-  var exc;
-  if (str)
-    exc = currentlyRunning + ': ' + str;
-  else
-    exc = currentlyRunning;
-  testFailed(exc);
-}
-
-function assertEq(prefix, expected, val) {
-  if (expected != val) {
-    var str = prefix + ': expected ' + expected + ', got ' + val;
-    throw str;
-  }
-}
-
-function assert(prefix, expected) {
-  if (!expected) {
-    var str = prefix + ': expected value / true';
-    throw str;
-  }
-}
-
-function printSummary() {
-  if (allPassed) {
-    debug("Test passed.");
-  } else {
-    debug("TEST FAILED");
-  }
-}
-
-//
-// Tests for unsigned array variants
-//
-
-function testSetAndGet10To1(type, name) {
-  running('test ' + name + ' SetAndGet10To1');
-  try {
-    var array = new type(10);
-    for (var i = 0; i < 10; i++) {
-      array[i] = 10 - i;
-    }
-    for (var i = 0; i < 10; i++) {
-      assertEq('Element ' + i, 10 - i, array[i]);
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function testConstructWithArrayOfUnsignedValues(type, name) {
-  running('test ' + name + ' ConstructWithArrayOfUnsignedValues');
-  try {
-    var array = new type([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]);
-    assertEq('Array length', 10, array.length);
-    for (var i = 0; i < 10; i++) {
-      assertEq('Element ' + i, 10 - i, array[i]);
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function testConstructWithTypedArrayOfUnsignedValues(type, name) {
-  running('test ' + name + ' ConstructWithTypedArrayOfUnsignedValues');
-  try {
-    var tmp = new type([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]);
-    var array = new type(tmp);
-    assertEq('Array length', 10, array.length);
-    for (var i = 0; i < 10; i++) {
-      assertEq('Element ' + i, 10 - i, array[i]);
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-//
-// Tests for signed array variants
-//
-
-function testSetAndGetPos10ToNeg10(type, name) {
-  running('test ' + name + ' SetAndGetPos10ToNeg10');
-  try {
-    var array = new type(21);
-    for (var i = 0; i < 21; i++) {
-      array[i] = 10 - i;
-    }
-    for (var i = 0; i < 21; i++) {
-      assertEq('Element ' + i, 10 - i, array[i]);
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function testConstructWithArrayOfSignedValues(type, name) {
-  running('test ' + name + ' ConstructWithArrayOfSignedValues');
-  try {
-    var array = new type([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]);
-    assertEq('Array length', 21, array.length);
-    for (var i = 0; i < 21; i++) {
-      assertEq('Element ' + i, 10 - i, array[i]);
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function testConstructWithTypedArrayOfSignedValues(type, name) {
-  running('test ' + name + ' ConstructWithTypedArrayOfSignedValues');
-  try {
-    var tmp = new type([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]);
-    var array = new type(tmp);
-    assertEq('Array length', 21, array.length);
-    for (var i = 0; i < 21; i++) {
-      assertEq('Element ' + i, 10 - i, array[i]);
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-//
-// Test cases for integral types.
-// Some JavaScript engines need separate copies of this code in order
-// to exercise all of their optimized code paths.
-//
-
-function testIntegralArrayTruncationBehavior(type, name, unsigned) {
-  running('test integral array truncation behavior for ' + name);
-
-  var sourceData;
-  var expectedResults;
-
-  if (unsigned) {
-    sourceData = [0.6, 10.6];
-    expectedResults = [0, 10];
-  } else {
-    sourceData = [0.6, 10.6, -0.6, -10.6];
-    expectedResults = [0, 10, 0, -10];
-  }
-
-  var numIterations = 10;
-  var array = new type(numIterations);
-
-  // The code block in each of the case statements below is identical, but some
-  // JavaScript engines need separate copies in order to exercise all of
-  // their optimized code paths.
-
-  try {
-    switch (type) {
-    case Int8Array:
-      for (var ii = 0; ii < sourceData.length; ++ii) {
-        for (var jj = 0; jj < numIterations; ++jj) {
-          array[jj] = sourceData[ii];
-          assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
-        }
-      }
-      break;
-    case Int16Array:
-      for (var ii = 0; ii < sourceData.length; ++ii) {
-        for (var jj = 0; jj < numIterations; ++jj) {
-          array[jj] = sourceData[ii];
-          assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
-        }
-      }
-      break;
-    case Int32Array:
-      for (var ii = 0; ii < sourceData.length; ++ii) {
-        for (var jj = 0; jj < numIterations; ++jj) {
-          array[jj] = sourceData[ii];
-          assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
-        }
-      }
-      break;
-    case Uint8Array:
-      for (var ii = 0; ii < sourceData.length; ++ii) {
-        for (var jj = 0; jj < numIterations; ++jj) {
-          array[jj] = sourceData[ii];
-          assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
-        }
-      }
-      break;
-    case Uint16Array:
-      for (var ii = 0; ii < sourceData.length; ++ii) {
-        for (var jj = 0; jj < numIterations; ++jj) {
-          array[jj] = sourceData[ii];
-          assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
-        }
-      }
-      break;
-    case Uint32Array:
-      for (var ii = 0; ii < sourceData.length; ++ii) {
-        for (var jj = 0; jj < numIterations; ++jj) {
-          array[jj] = sourceData[ii];
-          assertEq('Storing ' + sourceData[ii], expectedResults[ii], array[jj]);
-        }
-      }
-      break;
-    default:
-      fail("Unhandled type");
-      break;
-    }
-
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-
-//
-// Test cases for both signed and unsigned types
-//
-
-function testGetWithOutOfRangeIndices(type, name) {
-    debug('Testing ' + name + ' GetWithOutOfRangeIndices');
-    // See below for declaration of this global variable
-    array = new type([2, 3]);
-    shouldBeUndefined("array[2]");
-    shouldBeUndefined("array[-1]");
-    shouldBeUndefined("array[0x20000000]");
-}
-
-function testOffsetsAndSizes(type, name, elementSizeInBytes) {
-  running('test ' + name + ' OffsetsAndSizes');
-  try {
-    var len = 10;
-    assertEq('type.BYTES_PER_ELEMENT', elementSizeInBytes, type.BYTES_PER_ELEMENT);
-    var array = new type(len);
-    assert('array.buffer', array.buffer);
-    assertEq('array.byteOffset', 0, array.byteOffset);
-    assertEq('array.length', len, array.length);
-    assertEq('array.byteLength', len * elementSizeInBytes, array.byteLength);
-    array = new type(array.buffer, elementSizeInBytes, len - 1);
-    assert('array.buffer', array.buffer);
-    assertEq('array.byteOffset', elementSizeInBytes, array.byteOffset);
-    assertEq('array.length', len - 1, array.length);
-    assertEq('array.byteLength', (len - 1) * elementSizeInBytes, array.byteLength);
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function testSetFromTypedArray(type, name) {
-  running('test ' + name + ' SetFromTypedArray');
-  try {
-    var array = new type(10);
-    var array2 = new type(5);
-    for (var i = 0; i < 10; i++) {
-      assertEq('Element ' + i, 0, array[i]);
-    }
-    for (var i = 0; i < array2.length; i++) {
-      array2[i] = i;
-    }
-    array.set(array2);
-    for (var i = 0; i < array2.length; i++) {
-      assertEq('Element ' + i, i, array[i]);
-    }
-    array.set(array2, 5);
-    for (var i = 0; i < array2.length; i++) {
-      assertEq('Element ' + i, i, array[5 + i]);
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function negativeTestSetFromTypedArray(type, name) {
-  running('negativeTest ' + name + ' SetFromTypedArray');
-  try {
-    var array = new type(5);
-    var array2 = new type(6);
-    for (var i = 0; i < 5; i++) {
-      assertEq('Element ' + i, 0, array[i]);
-    }
-    for (var i = 0; i < array2.length; i++) {
-      array2[i] = i;
-    }
-    try {
-      array.set(array2);
-      fail('Expected exception from array.set(array2)');
-      return;
-    } catch (e) {
-    }
-    try {
-      array2.set(array, 2);
-      fail('Expected exception from array2.set(array, 2)');
-      return;
-    } catch (e) {
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function testSetFromArray(type, name) {
-  running('test ' + name + ' SetFromArray');
-  try {
-    var array = new type(10);
-    var array2 = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1];
-    for (var i = 0; i < 10; i++) {
-      assertEq('Element ' + i, 0, array[i]);
-    }
-    array.set(array2, 0);
-    for (var i = 0; i < array2.length; i++) {
-      assertEq('Element ' + i, 10 - i, array[i]);
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function negativeTestSetFromArray(type, name) {
-  running('negativeTest ' + name + ' SetFromArray');
-  try {
-    var array = new type([2, 3]);
-    try {
-      array.set([4, 5], 1);
-      fail();
-      return;
-    } catch (e) {
-    }
-    try {
-      array.set([4, 5, 6]);
-      fail();
-      return;
-    } catch (e) {
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function testSubarray(type, name) {
-  running('test ' + name + ' Subarray');
-  try {
-    var array = new type([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
-    var subarray = array.subarray(0, 5);
-    assertEq('subarray.length', 5, subarray.length);
-    for (var i = 0; i < 5; i++) {
-      assertEq('Element ' + i, i, subarray[i]);
-    }
-    subarray = array.subarray(4, 10);
-    assertEq('subarray.length', 6, subarray.length);
-    for (var i = 0; i < 6; i++) {
-      assertEq('Element ' + i, 4 + i, subarray[i]);
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function negativeTestSubarray(type, name) {
-  running('negativeTest ' + name + ' Subarray');
-  try {
-    var array = new type([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
-    subarray = array.subarray(5, 11);
-    if (subarray.length != 5) {
-      fail();
-      return;
-    }
-    subarray = array.subarray(10, 10);
-    if (subarray.length != 0) {
-      fail();
-      return;
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function testSetBoundaryConditions(type, name, testValues, expectedValues) {
-  running('test ' + name + ' SetBoundaryConditions');
-  try {
-    var array = new type(1);
-    assertEq('Array length', 1, array.length);
-    for (var ii = 0; ii < testValues.length; ++ii) {
-      for (var jj = 0; jj < 10; ++jj) {
-        array[0] = testValues[ii];
-        assertEq('Element 0', expectedValues[ii], array[0]);
-      }
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function testConstructionBoundaryConditions(type, name, testValues, expectedValues) {
-  running('test ' + name + ' ConstructionBoundaryConditions');
-  try {
-    var array = new type(testValues);
-    assertEq('Array length', testValues.length, array.length);
-    for (var ii = 0; ii < testValues.length; ++ii) {
-      assertEq('Element ' + ii, expectedValues[ii], array[ii]);
-    }
-    pass();
-  } catch (e) {
-    fail(e);
-  }
-}
-
-function testConstructionWithNullBuffer(type, name) {
-    var array;
-    try {
-        array = new type(null);
-        testFailed("Construction of " + name + " with null buffer should throw exception");
-    } catch (e) {
-        testPassed("Construction of " + name + " with null buffer threw exception");
-    }
-    try {
-        array = new type(null, 0, 0);
-        testFailed("Construction of " + name + " with (null buffer, 0) should throw exception");
-    } catch (e) {
-        testPassed("Construction of " + name + " with (null buffer, 0) threw exception");
-    }
-    try {
-        array = new type(null, 0, 0);
-        testFailed("Construction of " + name + " with (null buffer, 0, 0) should throw exception");
-    } catch (e) {
-        testPassed("Construction of " + name + " with (null buffer, 0, 0) threw exception");
-    }
-}
-
-function shouldThrowIndexSizeErr(func, text) {
-    var errorText = text + " should throw an exception";
-    try {
-        func();
-        testFailed(errorText);
-    } catch (e) {
-        testPassed(text + " threw an exception");
-    }
-}
-
-function testConstructionWithOutOfRangeValues(type, name) {
-    shouldThrowIndexSizeErr(function() {
-        var buffer = new ArrayBuffer(4);
-        var array = new type(buffer, 4, 0x3FFFFFFF);
-    }, "Construction of " + name + " with out-of-range number of elements");
-    shouldThrowIndexSizeErr(function() {
-        var buffer = new ArrayBuffer(4);
-        var array = new type(buffer, 8);
-    }, "Construction of " + name + " with out-of-range offset");
-}
-
-function testConstructionWithNegativeOutOfRangeValues(type, name) {
-    try {
-        var buffer = new ArrayBuffer(-1);
-        testFailed("Construction of ArrayBuffer with negative size should throw exception");
-    } catch (e) {
-        testPassed("Construction of ArrayBuffer with negative size threw exception");
-    }
-    try {
-        var array = new type(-1);
-        testFailed("Construction of " + name + " with negative size should throw exception");
-    } catch (e) {
-        testPassed("Construction of " + name + " with negative size threw exception");
-    }
-    shouldThrowIndexSizeErr(function() {
-        var buffer = new ArrayBuffer(4);
-        var array = new type(buffer, 4, -2147483648);
-    }, "Construction of " + name + " with negative out-of-range values");
-}
-
-function testConstructionWithUnalignedOffset(type, name, elementSizeInBytes) {
-    if (elementSizeInBytes > 1) {
-        shouldThrowIndexSizeErr(function() {
-            var buffer = new ArrayBuffer(32);
-            var array = new type(buffer, 1, elementSizeInBytes);
-        }, "Construction of " + name + " with unaligned offset");
-    }
-}
-
-function testConstructionWithUnalignedLength(type, name, elementSizeInBytes) {
-    if (elementSizeInBytes > 1) {
-        shouldThrowIndexSizeErr(function() {
-            var buffer = new ArrayBuffer(elementSizeInBytes + 1);
-            var array = new type(buffer, 0);
-        }, "Construction of " + name + " with unaligned length");
-    }
-}
-
-function testConstructionOfHugeArray(type, name, sz) {
-    if (sz == 1)
-        return;
-    try {
-        // Construction of huge arrays must fail because byteLength is
-        // an unsigned long
-        array = new type(3000000000);
-        testFailed("Construction of huge " + name + " should throw exception");
-    } catch (e) {
-        testPassed("Construction of huge " + name + " threw exception");
-    }
-}
-
-function testConstructionWithBothArrayBufferAndLength(type, name, elementSizeInBytes) {
-    var bufByteLength = 1000 * elementSizeInBytes;
-    var buf = new ArrayBuffer(bufByteLength);
-    var array1 = new type(buf);
-    var array2 = new type(bufByteLength / elementSizeInBytes);
-    if (array1.length == array2.length) {
-        testPassed("Array lengths matched with explicit and implicit creation of ArrayBuffer");
-    } else {
-        testFailed("Array lengths DID NOT MATCH with explicit and implicit creation of ArrayBuffer");
-    }
-}
-
-function testConstructionWithSubPortionOfArrayBuffer(type, name, elementSizeInBytes) {
-    if (elementSizeInBytes > 1) {
-        // Test construction with a valid sub-portion of an array buffer
-        // (whose size is not an integral multiple of the element size).
-        var size = 4 * elementSizeInBytes + (elementSizeInBytes / 2);
-        var buf = new ArrayBuffer(size);
-        try {
-            var array = new type(buf, 0, 2);
-            testPassed("new " + name + "(new ArrayBuffer(" + size + "), 0, 2) succeeded");
-        } catch (e) {
-            testFailed("new " + name + "(new ArrayBuffer(" + size + "), 0, 2) failed: " + e);
-        }
-    }
-}
-
-// These need to be global for shouldBe to see them
-var array;
-var typeSize;
-
-function testSubarrayWithOutOfRangeValues(type, name, sz) {
-    debug("Testing subarray of " + name);
-    try {
-        var buffer = new ArrayBuffer(32);
-        array = new type(buffer);
-        typeSize = sz;
-        shouldBe("array.length", "32 / typeSize");
-        try {
-            shouldBe("array.subarray(4, 0x3FFFFFFF).length", "(32 / typeSize) - 4");
-            shouldBe("array.subarray(4, -2147483648).length", "0");
-            // Test subarray() against overflows.
-            array = array.subarray(2);
-            if (sz > 1) {
-                // Full byte offset is +1 larger than the maximum unsigned long int.
-                // Make sure subarray() still handles it correctly.  Otherwise overflow would happen and
-                // offset would be 0, and array.length array.length would incorrectly be 1.
-                var start = 4294967296 / sz - 2;
-                array = array.subarray(start, start + 1);
-                shouldBe("array.length", "0");
-            }
-        } catch (e) {
-            testFailed("Subarray of " + name + " threw exception");
-        }
-    } catch (e) {
-        testFailed("Exception: " + e);
-    }
-}
-
-function testSubarrayWithDefaultValues(type, name, sz) {
-    debug("Testing subarray with default inputs of " + name);
-    try {
-        var buffer = new ArrayBuffer(32);
-        array = new type(buffer);
-        typeSize = sz;
-        shouldBe("array.length", "32 / typeSize");
-        try {
-            shouldBe("array.subarray(0).length", "(32 / typeSize)");
-            shouldBe("array.subarray(2).length", "(32 / typeSize) - 2");
-            shouldBe("array.subarray(-2).length", "2");
-            shouldBe("array.subarray(-2147483648).length", "(32 / typeSize)");
-        } catch (e) {
-            testFailed("Subarray of " + name + " threw exception");
-        }
-    } catch (e) {
-        testFailed("Exception: " + e);
-    }
-}
-
-function testSettingFromArrayWithOutOfRangeOffset(type, name) {
-    var webglArray = new type(32);
-    var array = [];
-    for (var i = 0; i < 16; i++) {
-        array.push(i);
-    }
-    try {
-        webglArray.set(array, 0x7FFFFFF8);
-        testFailed("Setting " + name + " from array with out-of-range offset was not caught");
-    } catch (e) {
-        testPassed("Setting " + name + " from array with out-of-range offset was caught");
-    }
-}
-
-function testSettingFromFakeArrayWithOutOfRangeLength(type, name) {
-    var webglArray = new type(32);
-    var array = {};
-    array.length = 0x80000000;
-    try {
-        webglArray.set(array, 8);
-        testFailed("Setting " + name + " from fake array with invalid length was not caught");
-    } catch (e) {
-        testPassed("Setting " + name + " from fake array with invalid length was caught");
-    }
-}
-
-function testSettingFromTypedArrayWithOutOfRangeOffset(type, name) {
-    var webglArray = new type(32);
-    var srcArray = new type(16);
-    for (var i = 0; i < 16; i++) {
-        srcArray[i] = i;
-    }
-    try {
-        webglArray.set(srcArray, 0x7FFFFFF8);
-        testFailed("Setting " + name + " from " + name + " with out-of-range offset was not caught");
-    } catch (e) {
-        testPassed("Setting " + name + " from " + name + " with out-of-range offset was caught");
-    }
-}
-
-function negativeTestGetAndSetMethods(type, name) {
-    array = new type([2, 3]);
-    shouldBeUndefined("array.get");
-    var exceptionThrown = false;
-    // We deliberately check for an exception here rather than using
-    // shouldThrow here because the precise contents of the syntax
-    // error are not specified.
-    try {
-        webGLArray.set(0, 1);
-    } catch (e) {
-        exceptionThrown = true;
-    }
-    var output = "array.set(0, 1) ";
-    if (exceptionThrown) {
-        testPassed(output + "threw exception.");
-    } else {
-        testFailed(output + "did not throw exception.");
-    }
-}
-
-function testNaNConversion(type, name) {
-  running('test storing NaN in ' + name);
-
-  var array = new type([1, 1]);
-  var results = [];
-
-  // The code block in each of the case statements below is identical, but some
-  // JavaScript engines need separate copies in order to exercise all of
-  // their optimized code paths.
-  try {
-    switch (type) {
-    case Float32Array:
-      for (var i = 0; i < array.length; ++i) {
-        array[i] = NaN;
-        results[i] = array[i];
-      }
-      break;
-    case Float64Array:
-      for (var i = 0; i < array.length; ++i) {
-        array[i] = NaN;
-        results[i] = array[i];
-      }
-      break;
-    case Int8Array:
-      for (var i = 0; i < array.length; ++i) {
-        array[i] = NaN;
-        results[i] = array[i];
-      }
-      break;
-    case Int16Array:
-      for (var i = 0; i < array.length; ++i) {
-        array[i] = NaN;
-        results[i] = array[i];
-      }
-      break;
-    case Int32Array:
-      for (var i = 0; i < array.length; ++i) {
-        array[i] = NaN;
-        results[i] = array[i];
-      }
-      break;
-    case Uint8Array:
-      for (var i = 0; i < array.length; ++i) {
-        array[i] = NaN;
-        results[i] = array[i];
-      }
-      break;
-    case Uint16Array:
-      for (var i = 0; i < array.length; ++i) {
-        array[i] = NaN;
-        results[i] = array[i];
-      }
-      break;
-    case Uint32Array:
-      for (var i = 0; i < array.length; ++i) {
-        array[i] = NaN;
-        results[i] = array[i];
-      }
-      break;
-    default:
-      fail("Unhandled type");
-      break;
-    }
-
-    // Some types preserve NaN values; all other types convert NaN to zero.
-    if (type === Float32Array || type === Float64Array) {
-      assert('initial NaN preserved', isNaN(new type([NaN])[0]));
-      for (var i = 0; i < array.length; ++i)
-        assert('NaN preserved via setter', isNaN(results[i]));
-    } else {
-      assertEq('initial NaN converted to zero', 0, new type([NaN])[0]);
-      for (var i = 0; i < array.length; ++i)
-        assertEq('NaN converted to zero by setter', 0, results[i]);
-    }
-
-    pass();
-  } catch (e) {
-      fail(e);
-  }
-}
-
-//
-// Test driver
-//
-
-function runTests() {
-  allPassed = true;
-
-  // The "name" attribute is a concession to browsers which don't
-  // implement the "name" property on function objects
-  var testCases =
-    [ {name: "Float32Array",
-       unsigned: false,
-       integral: false,
-       elementSizeInBytes: 4,
-       testValues:     [ -500.5, 500.5 ],
-       expectedValues: [ -500.5, 500.5 ]
-      },
-      {name: "Float64Array",
-       unsigned: false,
-       integral: false,
-       elementSizeInBytes: 8,
-       testValues:     [ -500.5, 500.5 ],
-       expectedValues: [ -500.5, 500.5 ]
-      },
-      {name: "Int8Array",
-       unsigned: false,
-       integral: true,
-       elementSizeInBytes: 1,
-       testValues:     [ -128, 127, -129,  128 ],
-       expectedValues: [ -128, 127,  127, -128 ]
-      },
-      {name: "Int16Array",
-       unsigned: false,
-       integral: true,
-       elementSizeInBytes: 2,
-       testValues:     [ -32768, 32767, -32769,  32768 ],
-       expectedValues: [ -32768, 32767,  32767, -32768 ]
-      },
-      {name: "Int32Array",
-       unsigned: false,
-       integral: true,
-       elementSizeInBytes: 4,
-       testValues:     [ -2147483648, 2147483647, -2147483649,  2147483648 ],
-       expectedValues: [ -2147483648, 2147483647,  2147483647, -2147483648 ]
-      },
-      {name: "Uint8Array",
-       unsigned: true,
-       integral: true,
-       elementSizeInBytes: 1,
-       testValues:     [ 0, 255,  -1, 256 ],
-       expectedValues: [ 0, 255, 255,   0 ]
-      },
-      {name: "Uint16Array",
-       unsigned: true,
-       integral: true,
-       elementSizeInBytes: 2,
-       testValues:     [ 0, 65535,    -1, 65536 ],
-       expectedValues: [ 0, 65535, 65535,     0 ]
-      },
-      {name: "Uint32Array",
-       unsigned: true,
-       integral: true,
-       elementSizeInBytes: 4,
-       testValues:     [ 0, 4294967295,         -1, 4294967296 ],
-       expectedValues: [ 0, 4294967295, 4294967295,          0 ]
-      }
-    ];
-  for (var i = 0; i < testCases.length; i++) {
-    var testCase = testCases[i];
-    running(testCase.name);
-    if (!(testCase.name in window)) {
-        fail("does not exist");
-        continue;
-    }
-    var type = window[testCase.name];
-    var name = testCase.name;
-    if (testCase.unsigned) {
-      testSetAndGet10To1(type, name);
-      testConstructWithArrayOfUnsignedValues(type, name);
-      testConstructWithTypedArrayOfUnsignedValues(type, name);
-    } else {
-      testSetAndGetPos10ToNeg10(type, name);
-      testConstructWithArrayOfSignedValues(type, name);
-      testConstructWithTypedArrayOfSignedValues(type, name);
-    }
-    if (testCase.integral) {
-      testIntegralArrayTruncationBehavior(type, name, testCase.unsigned);
-    }
-    testGetWithOutOfRangeIndices(type, name);
-    testOffsetsAndSizes(type, name, testCase.elementSizeInBytes);
-    testSetFromTypedArray(type, name);
-    negativeTestSetFromTypedArray(type, name);
-    testSetFromArray(type, name);
-    negativeTestSetFromArray(type, name);
-    testSubarray(type, name);
-    negativeTestSubarray(type, name);
-    testSetBoundaryConditions(type,
-                              name,
-                              testCase.testValues,
-                              testCase.expectedValues);
-    testConstructionBoundaryConditions(type,
-                                       name,
-                                       testCase.testValues,
-                                       testCase.expectedValues);
-    testConstructionWithNullBuffer(type, name);
-    testConstructionWithOutOfRangeValues(type, name);
-    testConstructionWithNegativeOutOfRangeValues(type, name);
-    testConstructionWithUnalignedOffset(type, name, testCase.elementSizeInBytes);
-    testConstructionWithUnalignedLength(type, name, testCase.elementSizeInBytes);
-    testConstructionOfHugeArray(type, name, testCase.elementSizeInBytes);
-    testConstructionWithBothArrayBufferAndLength(type, name, testCase.elementSizeInBytes);
-    testConstructionWithSubPortionOfArrayBuffer(type, name, testCase.elementSizeInBytes);
-    testSubarrayWithOutOfRangeValues(type, name, testCase.elementSizeInBytes);
-    testSubarrayWithDefaultValues(type, name, testCase.elementSizeInBytes);
-    testSettingFromArrayWithOutOfRangeOffset(type, name);
-    testSettingFromFakeArrayWithOutOfRangeLength(type, name);
-    testSettingFromTypedArrayWithOutOfRangeOffset(type, name);
-    negativeTestGetAndSetMethods(type, name);
-    testNaNConversion(type, name);
-  }
-
-  printSummary();
-}
-
-runTests();
-successfullyParsed = true;
-
-</script>
-<script src="../resources/js-test-post.js"></script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/attribs/00_test_list.txt
@@ -0,0 +1,6 @@
+gl-enable-vertex-attrib.html
+gl-vertex-attrib-zero-issues.html
+gl-vertex-attrib.html
+gl-vertexattribpointer-offsets.html
+gl-vertexattribpointer.html
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/attribs/gl-enable-vertex-attrib.html
@@ -0,0 +1,57 @@
+<!--
+// 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.
+-->
+<!DOCTYPE html>
+<html>
+  <head>
+<meta charset="utf-8">
+    <title>WebGL Enable Vertex Attrib Test</title>
+    <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../resources/webgl-test.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+    attribute vec4 vPosition;
+    void main()
+    {
+        gl_Position = vPosition;
+    }
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+    void main()
+    {
+        gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+    }
+</script>
+
+<script>
+gl = initWebGL("example", "vshader", "fshader", [ "vPosition"], [ 0, 0, 0, 1 ], 1);
+gl.viewport(0, 0, 50, 50);
+
+var vertexObject = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+gl.enableVertexAttribArray(0);
+gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+gl.enableVertexAttribArray(3);
+glErrorShouldBe(gl, gl.NO_ERROR);
+
+gl.drawArrays(gl.TRIANGLES, 0, 3);
+glErrorShouldBe(gl, gl.INVALID_OPERATION);
+
+successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/attribs/gl-vertex-attrib-zero-issues.html
@@ -0,0 +1,95 @@
+<!--
+// 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.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Enable Vertex Attrib Zero Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"> </script>
+<script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script id="vshader" type="x-shader/x-vertex">
+    attribute vec4 vPosition;
+    void main()
+    {
+        gl_Position = vPosition;
+    }
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+    void main()
+    {
+        gl_FragColor = vec4(0.0,0.0,0.0,0.0);
+    }
+</script>
+
+<script>
+description("Test some of the issues of the difference between attrib 0 on OpenGL vs WebGL");
+debug("");
+var wtu = WebGLTestUtils;
+var canvas = document.getElementById("example");
+var gl = wtu.create3DContext(canvas);
+
+function setup(numVerts, attribIndex) {
+  var program = wtu.setupProgram(
+      gl,
+      [wtu.loadShaderFromScript(gl, 'vshader', gl.VERTEX_SHADER),
+       wtu.loadShaderFromScript(gl, 'fshader', gl.FRAGMENT_SHADER)],
+      ['vPosition'], [attribIndex]);
+  // draw with something on attrib zero with a small number of vertices
+  var vertexObject = gl.createBuffer();
+  g_program = program;
+  g_attribLocation = attribIndex;
+  shouldBe("g_attribLocation", "gl.getAttribLocation(g_program, 'vPosition')");
+  gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+  gl.bufferData(
+      gl.ARRAY_BUFFER, new Float32Array(numVerts * 3), gl.STATIC_DRAW);
+  gl.vertexAttribPointer(attribIndex, 3, gl.FLOAT, false, 0, 0);
+  var indices = new Uint16Array(numVerts);
+  for (var ii = 0; ii < numVerts; ++ii) {
+    indices[ii] = ii;
+  }
+  var indexBuffer = gl.createBuffer();
+  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
+  gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+  return program;
+}
+
+var p1 = setup(3, 0);
+var p2 = setup(60000, 3);
+
+for (var ii = 0; ii < 5; ++ii) {
+  gl.useProgram(p1);
+  gl.enableVertexAttribArray(0);
+  gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0);
+  glErrorShouldBe(
+      gl, gl.NO_ERROR,
+      "drawing using attrib 0 with 3 verts");
+
+  gl.useProgram(p2);
+  gl.enableVertexAttribArray(3);
+  gl.drawArrays(gl.LINES, 0, 60000);
+  glErrorShouldBe(
+      gl, gl.NO_ERROR,
+      "drawing using attrib 3 with 60000 verts");
+}
+
+wtu.checkCanvas(gl, [0, 0, 0, 0], "canvas should be 0, 0, 0, 0");
+
+successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/attribs/gl-vertex-attrib.html
@@ -0,0 +1,94 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL vertexAttrib Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+description("This test ensures WebGL implementations vertexAttrib can be set and read.");
+
+debug("");
+debug("Canvas.getContext");
+
+var gl = create3DContext(document.getElementById("canvas"));
+if (!gl) {
+  testFailed("context does not exist");
+} else {
+  testPassed("context exists");
+
+  debug("");
+  debug("Checking gl.vertexAttrib.");
+
+  var numVertexAttribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
+  for (var ii = 0; ii < numVertexAttribs; ++ii) {
+    gl.vertexAttrib1fv(ii, [1]);
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '1');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '0');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '0');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+    gl.vertexAttrib2fv(ii, [1, 2]);
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '1');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '2');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '0');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+    gl.vertexAttrib3fv(ii, [1, 2, 3]);
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '1');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '2');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '3');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+    gl.vertexAttrib4fv(ii, [1, 2, 3, 4]);
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '1');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '2');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '3');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '4');
+
+    gl.vertexAttrib1f(ii, 5);
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '5');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '0');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '0');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+    gl.vertexAttrib2f(ii, 6, 7);
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '6');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '7');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '0');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+    gl.vertexAttrib3f(ii, 7, 8, 9);
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '7');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '8');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '9');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
+
+    gl.vertexAttrib4f(ii, 6, 7, 8, 9);
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[0]', '6');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[1]', '7');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[2]', '8');
+    shouldBe('gl.getVertexAttrib(' + ii + ', gl.CURRENT_VERTEX_ATTRIB)[3]', '9');
+  }
+  glErrorShouldBe(gl, gl.NO_ERROR);
+}
+
+debug("");
+successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/attribs/gl-vertexattribpointer-offsets.html
@@ -0,0 +1,192 @@
+<!--
+Copyright (C) 2011 Apple Computer, Inc.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<!DOCTYPE html>
+<html>
+  <head>
+<meta charset="utf-8">
+    <title>Rendering Test</title>
+    <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../resources/webgl-test.js"> </script>
+    <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<canvas id="example" width="50" height="50">
+There is supposed to be an example drawing here, but it's not important.
+</canvas>
+<div id="description"></div>
+<div id="console"></div>
+    <script id="vshader" type="x-shader/x-vertex">
+        attribute vec4 vPosition;
+        void main()
+        {
+            gl_Position = vPosition;
+        }
+    </script>
+
+    <script id="fshader" type="x-shader/x-fragment">
+        precision mediump float;
+        uniform vec4 color;
+        void main()
+        {
+            gl_FragColor = color;
+        }
+    </script>
+
+    <script>
+        function fail(x,y, buf, shouldBe)
+        {
+            var i = (y*50+x) * 4;
+            var reason = "pixel at ("+x+","+y+") is ("+buf[i]+","+buf[i+1]+","+buf[i+2]+","+buf[i+3]+"), should be "+shouldBe;
+            testFailed(reason);
+        }
+
+        function pass()
+        {
+            testPassed("drawing is correct");
+        }
+
+        function init()
+        {
+            if (window.initNonKhronosFramework) {
+                window.initNonKhronosFramework(false);
+            }
+
+            wtu = WebGLTestUtils;
+            gl = initWebGL("example", "vshader", "fshader", [ "vPosition"], [ 0, 0, 0, 1 ], 1);
+
+            var tests = [
+              { data: new Float32Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+                type: gl.FLOAT,
+                componentSize: 4,
+                normalize: false,
+              },
+              { data: new Float32Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+                type: gl.FLOAT,
+                componentSize: 4,
+                normalize: false,
+              },
+              { data: new Uint16Array([ 0, 32767, 0, 32767, 0, 0, 0, 0, 0 ]),
+                type: gl.SHORT,
+                componentSize: 2,
+                normalize: true,
+              },
+              { data: new Uint16Array([ 0, 65535, 0, 65535, 0, 0, 0, 0, 0 ]),
+                type: gl.UNSIGNED_SHORT,
+                componentSize: 2,
+                normalize: true,
+              },
+              { data: new Uint16Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+                type: gl.UNSIGNED_SHORT,
+                componentSize: 2,
+                normalize: false,
+              },
+              { data: new Uint16Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+                type: gl.SHORT,
+                componentSize: 2,
+                normalize: false,
+              },
+              { data: new Uint8Array([ 0, 127, 0, 127, 0, 0, 0, 0, 0 ]),
+                type: gl.BYTE,
+                componentSize: 1,
+                normalize: true,
+              },
+              { data: new Uint8Array([ 0, 255, 0, 255, 0, 0, 0, 0, 0 ]),
+                type: gl.UNSIGNED_BYTE,
+                componentSize: 1,
+                normalize: true,
+              },
+              { data: new Uint8Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+                type: gl.BYTE,
+                componentSize: 1,
+                normalize: false,
+              },
+              { data: new Uint8Array([ 0, 1, 0, 1, 0, 0, 0, 0, 0 ]),
+                type: gl.UNSIGNED_BYTE,
+                componentSize: 1,
+                normalize: false,
+              }
+            ];
+
+            var vertexObject = gl.createBuffer();
+            gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+            gl.bufferData(gl.ARRAY_BUFFER, 1024, gl.STATIC_DRAW);
+            gl.enableVertexAttribArray(0);
+
+            var colorLoc = gl.getUniformLocation(gl.program, "color");
+            var kNumVerts = 3;
+            var kNumComponents = 3;
+
+            var count = 0;
+            for (var tt = 0; tt < tests.length; ++tt) {
+              var test = tests[tt];
+              for (var oo = 0; oo < 3; ++oo) {
+                for (var ss = 0; ss < 3; ++ss) {
+                  var offset = (oo + 1) * test.componentSize;
+                  var color = (count % 2) ? [1, 0, 0, 1] : [0, 1, 0, 1];
+                  var stride = test.componentSize * kNumComponents + test.componentSize * ss;
+                  debug("");
+                  debug("check with " + wtu.glEnumToString(gl, test.type) + " at offset: " + offset + " with stride:" + stride + " normalize: " + test.normalize);
+                  gl.uniform4fv(colorLoc, color);
+                  var data = new Uint8Array(test.componentSize * kNumVerts * kNumComponents + stride * (kNumVerts - 1));
+                  var view = new Uint8Array(test.data.buffer);
+                  var size = test.componentSize * kNumComponents;
+                  for (var jj = 0; jj < kNumVerts; ++jj) {
+                    var off1 = jj * size;
+                    var off2 = jj * stride;
+                    for (var zz = 0; zz < size; ++zz) {
+                      data[off2 + zz] = view[off1 + zz];
+                    }
+                  }
+                  gl.bufferSubData(gl.ARRAY_BUFFER, offset, data);
+                  gl.vertexAttribPointer(0, 3, test.type, test.normalize, stride, offset);
+                  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+                  gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+                  var buf = new Uint8Array(50 * 50 * 4);
+                  gl.readPixels(0, 0, 50, 50, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+
+                  var black = [0, 0, 0, 255];
+                  var other = [color[0] * 255, color[1] * 255, color[2] * 255, color[3] * 255];
+                  var otherMsg = "should be " + ((count % 2) ? "red" : "green")
+                  wtu.checkCanvasRect(gl, 0, 0, 1, 1, black, "should be black", 0);
+                  wtu.checkCanvasRect(gl, 0, 49, 1, 1, black, "should be black", 0);
+                  wtu.checkCanvasRect(gl, 26, 40, 1, 1, other, otherMsg, 0);
+                  wtu.checkCanvasRect(gl, 26, 27, 1, 1, other, otherMsg, 0);
+                  wtu.checkCanvasRect(gl, 40, 27, 1, 1, other, otherMsg, 0);
+                  ++count;
+                }
+              }
+            }
+       }
+
+       init();
+       successfullyParsed = true;
+    </script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/attribs/gl-vertexattribpointer.html
@@ -0,0 +1,133 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL vertexAttribPointer Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="2" height="2"> </canvas>
+<script>
+description("This test checks vertexAttribPointer behaviors in WebGL.");
+
+debug("");
+debug("Canvas.getContext");
+
+var wtu = WebGLTestUtils;
+var gl = create3DContext(document.getElementById("canvas"));
+if (!gl) {
+  testFailed("context does not exist");
+} else {
+  testPassed("context exists");
+
+  debug("");
+  debug("Checking gl.vertexAttribPointer.");
+
+  if (!gl.FIXED) {
+    gl.FIXED = 0x140C;
+  }
+
+  gl.vertexAttribPointer(0, 3, gl.FLOAT, 0, 0, 12);
+  glErrorShouldBe(gl, gl.INVALID_OPERATION,
+      "vertexAttribPointer should fail if no buffer is bound");
+
+  var vertexObject = gl.createBuffer();
+  gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+  gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(0), gl.STATIC_DRAW);
+
+  gl.vertexAttribPointer(0, 1, gl.INT, 0, 0, 0);
+  glErrorShouldBe(gl, gl.INVALID_ENUM,
+      "vertexAttribPointer should not support INT");
+  gl.vertexAttribPointer(0, 1, gl.UNSIGNED_INT, 0, 0, 0);
+  glErrorShouldBe(gl, gl.INVALID_ENUM,
+      "vertexAttribPointer should not support UNSIGNED_INT");
+  gl.vertexAttribPointer(0, 1, gl.FIXED, 0, 0, 0);
+  glErrorShouldBe(gl, gl.INVALID_ENUM,
+      "vertexAttribPointer should not support FIXED");
+
+  function checkVertexAttribPointer(
+      gl, err, reason, size, type, normalize, stride, offset) {
+    gl.vertexAttribPointer(0, size, type, normalize, stride, offset);
+    glErrorShouldBe(gl, err,
+        "gl.vertexAttribPointer(0, " + size +
+        ", gl." + wtu.glEnumToString(gl, type) +
+        ", " + normalize +
+        ", " + stride +
+        ", " + offset +
+        ") should " + (err == gl.NO_ERROR ? "succeed " : "fail ") + reason);
+  }
+
+  var types = [
+    { type:gl.BYTE,           bytesPerComponent: 1 },
+    { type:gl.UNSIGNED_BYTE,  bytesPerComponent: 1 },
+    { type:gl.SHORT,          bytesPerComponent: 2 },
+    { type:gl.UNSIGNED_SHORT, bytesPerComponent: 2 },
+    { type:gl.FLOAT,          bytesPerComponent: 4 },
+  ];
+
+  for (var ii = 0; ii < types.length; ++ii) {
+    var info = types[ii];
+    debug("");
+    for (var size = 1; size <= 4; ++size) {
+      debug("");
+      debug("checking: " + wtu.glEnumToString(gl, info.type) + " with size " + size);
+      var bytesPerElement = size * info.bytesPerComponent;
+      var offsetSet = [
+          0,
+          1,
+          info.bytesPerComponent - 1,
+          info.bytesPerComponent,
+          info.bytesPerComponent + 1,
+          info.bytesPerComponent * 2];
+      for (var jj = 0; jj < offsetSet.length; ++jj) {
+        var offset = offsetSet[jj];
+        for (var kk = 0; kk < offsetSet.length; ++kk) {
+          var stride = offsetSet[kk];
+          var err = gl.NO_ERROR;
+          var reason = ""
+          if (offset % info.bytesPerComponent != 0) {
+            reason = "because offset is bad";
+            err = gl.INVALID_OPERATION;
+          }
+          if (stride % info.bytesPerComponent != 0) {
+            reason = "because stride is bad";
+            err = gl.INVALID_OPERATION;
+          }
+          checkVertexAttribPointer(
+              gl, err, reason, size, info.type, false, stride, offset);
+        }
+        var stride = Math.floor(255 / info.bytesPerComponent) * info.bytesPerComponent;
+
+        if (offset == 0) {
+          checkVertexAttribPointer(
+              gl, gl.NO_ERROR, "at stride limit",
+              size, info.type, false, stride, offset);
+          checkVertexAttribPointer(
+              gl, gl.INVALID_VALUE, "over stride limit",
+              size, info.type, false,
+              stride + info.bytesPerComponent, offset);
+        }
+      }
+    }
+  }
+}
+
+debug("");
+successfullyParsed = true;
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/bad-arguments-test.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<!--
-Copyright (C) 2011 Apple Computer, Inc.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-<script src="resources/webgl-test-utils.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-
-<script>
-var wtu = WebGLTestUtils;
-description("Tests calling WebGL APIs with wrong argument types");
-
-var context = wtu.create3DContext();
-var program = wtu.loadStandardProgram(context);
-var shader = wtu.loadStandardVertexShader(context);
-var shouldGenerateGLError = wtu.shouldGenerateGLError;
-
-assertMsg(program != null, "Program Compiled");
-assertMsg(shader != null, "Shader Compiled");
-
-var loc = context.getUniformLocation(program, "u_modelViewProjMatrix");
-assertMsg(loc != null, "getUniformLocation succeeded");
-
-var arguments = [
-  { value: "foo",
-    throws: true },
-  { value: 0,
-    throws: true },
-  { value: null,
-    throws: false },
-  { value: undefined,
-    throws: false }
-];
-
-var argument;
-
-function shouldBeEmptyString(command) {
-  shouldBe(command, "''");
-}
-
-for (var i = 0; i < arguments.length; ++i) {
-  var func, func2, func3;
-  if (arguments[i].throws) {
-    func = shouldThrow;
-    func2 = shouldThrow;
-    func3 = shouldThrow;
-  } else {
-    func = shouldBeUndefined;
-    func2 = shouldBeNull;
-    func3 = shouldBeEmptyString;
-  }
-  argument = arguments[i].value;
-  func("context.compileShader(argument)");
-  func("context.linkProgram(argument)");
-  func("context.attachShader(program, argument)");
-  func("context.attachShader(argument, shader)");
-  func("context.detachShader(program, argument)");
-  func("context.detachShader(argument, shader)");
-  func("context.useProgram(argument)");
-  func("context.shaderSource(argument, 'foo')");
-  func("context.bindAttribLocation(argument, 0, 'foo')");
-  func("context.bindBuffer(context.ARRAY_BUFFER, argument)");
-  func("context.bindFramebuffer(context.FRAMEBUFFER, argument)");
-  func("context.bindRenderbuffer(context.RENDERBUFFER, argument)");
-  func("context.bindTexture(context.TEXTURE_2D, argument)");
-  func("context.framebufferRenderbuffer(context.FRAMEBUFFER, context.DEPTH_ATTACHMENT, context.RENDERBUFFER, argument)");
-  func("context.framebufferTexture2D(context.FRAMEBUFFER, context.COLOR_ATTACHMENT0, context.TEXTURE_2D, argument, 0)");
-  func("context.uniform2fv(argument, new Float32Array([0.0, 0.0]))");
-  func("context.uniform2iv(argument, new Int32Array([0, 0]))");
-  func("context.uniformMatrix2fv(argument, false, new Float32Array([0.0, 0.0, 0.0, 0.0]))");
-
-  func2("context.getProgramParameter(argument, 0)");
-  func2("context.getShaderParameter(argument, 0)");
-  func2("context.getUniform(argument, loc)");
-  func2("context.getUniform(program, argument)");
-  func2("context.getUniformLocation(argument, 'u_modelViewProjMatrix')");
-
-  func3("context.getProgramInfoLog(argument)");
-  func3("context.getShaderInfoLog(argument)");
-  func3("context.getShaderSource(argument)");
-}
-
-successfullyParsed = true;
-</script>
-
-<script src="../resources/js-test-post.js"></script>
-</body>
-</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/buffer-bind-test.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!--
-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.
- -->
-<!DOCTYPE html>
-<html>
-  <head>
-<meta charset="utf-8">
-    <title>WebGL BindBuffer conformance test.</title>
-    <link rel="stylesheet" href="../resources/js-test-style.css"/>
-    <script src="../resources/js-test-pre.js"></script>
-    <script src="resources/webgl-test.js"> </script>
-</head>
-<body>
-<canvas id="example" width="40" height="40" style="width: 40px; height: 40px;"></canvas>
-<div id="description"></div>
-<div id="console"></div>
-<script>
-description("Checks a buffer can only be bound to 1 target.");
-
-debug("");
-debug("Canvas.getContext");
-
-var gl = create3DContext(document.getElementById("canvas"));
-if (!gl) {
-  testFailed("context does not exist");
-} else {
-  testPassed("context exists");
-
-  debug("");
-
-  var buf = gl.createBuffer();
-  gl.bindBuffer(gl.ARRAY_BUFFER, buf);
-  glErrorShouldBe(gl, gl.NO_ERROR,
-            "should be able to bind buffer.");
-  gl.bindBuffer(gl.ARRAY_BUFFER, null);
-  glErrorShouldBe(gl, gl.NO_ERROR,
-            "should be able to unbind buffer.");
-  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buf);
-  glErrorShouldBe(gl, gl.INVALID_OPERATION,
-            "should get INVALID_OPERATION if attempting to bind buffer to different target");
-
-  var buf = gl.createBuffer();
-  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buf);
-  glErrorShouldBe(gl, gl.NO_ERROR,
-            "should be able to bind buffer.");
-  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
-  glErrorShouldBe(gl, gl.NO_ERROR,
-            "should be able to unbind buffer.");
-  gl.bindBuffer(gl.ARRAY_BUFFER, buf);
-  glErrorShouldBe(gl, gl.INVALID_OPERATION,
-            "should get INVALID_OPERATION if attempting to bind buffer to different target");
-}
-
-debug("");
-successfullyParsed = true;
-</script>
-<script src="../resources/js-test-post.js"></script>
-
-</body>
-</html>
-
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/buffer-data-array-buffer.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!--
-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.
- -->
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-
-<script>
-description("Test bufferData/bufferSubData with ArrayBuffer input");
-
-debug('Regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=41884">https://bugs.webkit.org/show_bug.cgi?id=41884</a> : <code>Implement bufferData and bufferSubData with ArrayBuffer as input</code>');
-
-var gl = create3DContext();
-shouldBeNonNull("gl");
-
-var array = new ArrayBuffer(128);
-shouldBeNonNull("array");
-
-var buf = gl.createBuffer();
-shouldBeNonNull(buf);
-
-gl.bufferData(gl.ARRAY_BUFFER, array, gl.STATIC_DRAW);
-glErrorShouldBe(gl, gl.INVALID_OPERATION);
-
-gl.bindBuffer(gl.ARRAY_BUFFER, buf);
-glErrorShouldBe(gl, gl.NO_ERROR);
-
-gl.bufferData(gl.ARRAY_BUFFER, -10, gl.STATIC_DRAW);
-glErrorShouldBe(gl, gl.INVALID_VALUE);
-
-// This should not crash, but the selection of the overload is ambiguous per Web IDL.
-gl.bufferData(gl.ARRAY_BUFFER, null, gl.STATIC_DRAW);
-gl.getError();
-
-gl.bufferData(gl.ARRAY_BUFFER, array, gl.STATIC_DRAW);
-glErrorShouldBe(gl, gl.NO_ERROR);
-
-array = new ArrayBuffer(64);
-
-gl.bufferSubData(gl.ARRAY_BUFFER, -10, array);
-glErrorShouldBe(gl, gl.INVALID_VALUE);
-
-gl.bufferSubData(gl.ARRAY_BUFFER, -10, new Float32Array(8));
-glErrorShouldBe(gl, gl.INVALID_VALUE);
-
-gl.bufferSubData(gl.ARRAY_BUFFER, 10, array);
-glErrorShouldBe(gl, gl.NO_ERROR);
-
-gl.bufferSubData(gl.ARRAY_BUFFER, 10, null);
-glErrorShouldBe(gl, gl.NO_ERROR);
-
-successfullyParsed = true;
-</script>
-
-<script src="../resources/js-test-post.js"></script>
-</body>
-</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/buffer-offscreen-test.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta charset="utf-8">
-<title>WebGL required buffer clear behaviour test</title>
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"> </script>
-<script src="resources/webgl-test-utils.js"> </script>
-<style type="text/css">
-body {
-    height: 3000px;
-}
-</style>
-<script type="text/javascript">
-
-var iter = 0;
-var gl1;
-var gl2;
-
-var wtu = WebGLTestUtils;
-
-function timer() {
-    if (iter == 0) {
-        // some random hacky stuff to make sure that we get a compositing step
-        window.scrollBy(0, 10);
-        window.scrollBy(0, -10);
-        iter++;
-
-        setTimeout(timer, 500);
-    } else if (iter == 1) {
-        function clear(gl) {
-            // scissor was set earlier
-            gl.clearColor(0, 0, 1, 1);
-            gl.clear(gl.COLOR_BUFFER_BIT);
-        }
-        clear(gl1);
-        clear(gl2);
-
-        debug("check on screen canvas");
-        wtu.checkCanvasRect(gl1, 0, 10, 10, 10, [0, 0, 255, 255], "cleared corner should be blue, stencil should be preserved");
-        wtu.checkCanvasRect(gl1, 0, 0, 10, 10, [0, 0, 0, 0], "remainder of buffer should be cleared");
-        debug("check off screen canvas");
-        wtu.checkCanvasRect(gl2, 0, 10, 10, 10, [0, 0, 255, 255], "cleared corner should be blue, stencil should be preserved");
-        wtu.checkCanvasRect(gl2, 0, 0, 10, 10, [255, 0, 0, 255], "remainder of buffer should be un-cleared red");
-
-        finishTest();
-    }
-}
-
-function go() {
-    description("This test ensures WebGL implementations correctly clear the drawing buffer on composite if preserveDrawingBuffer is false.");
-
-    debug("");
-
-    gl1 = create3DContext(document.getElementById("c"));
-    c2 = document.createElement('canvas');
-    gl2 = create3DContext(c2);
-    shouldBeTrue("gl1 != null");
-    shouldBeTrue("gl2 != null");
-
-    shouldBeTrue('gl1.getContextAttributes().preserveDrawingBuffer == false');
-    shouldBeTrue('gl2.getContextAttributes().preserveDrawingBuffer == false');
-
-    function init(gl) {
-        gl.clearColor(1, 0, 0, 1);
-        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);
-
-        // enable scissor here, before compositing, to make sure it's correctly
-        // ignored and restored
-        gl.scissor(0, 10, 10, 10);
-        gl.enable(gl.SCISSOR_TEST);
-    }
-
-    init(gl1);
-    init(gl2);
-
-    setTimeout(timer, 500);
-}
-
-window.addEventListener("load", go, false);
-
-successfullyParsed = true;
-</script>
-</head>
-<body>
-<div id="description"></div>
-<canvas width="20" height="20" style="border: 1px solid blue;" id="c"></canvas>
-<div id="console"></div>
-</body>
-</html>
-
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/buffer-preserve-test.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<meta charset="utf-8">
-<title>WebGL required buffer clear behaviour test</title>
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"> </script>
-<script src="resources/webgl-test-utils.js"> </script>
-<style type="text/css">
-body {
-    height: 3000px;
-}
-</style>
-<script type="text/javascript">
-
-var iter = 0;
-var gl1;
-
-var wtu = WebGLTestUtils;
-
-function timer() {
-    if (iter == 0) {
-        // some random hacky stuff to make sure that we get a compositing step
-        window.scrollBy(0, 10);
-        window.scrollBy(0, -10);
-        iter++;
-
-        setTimeout(timer, 500);
-    } else if (iter == 1) {
-        function clear(gl) {
-            // scissor was set earlier
-            gl.clearColor(0, 0, 1, 1);
-            gl.clear(gl.COLOR_BUFFER_BIT);
-
-            wtu.checkCanvasRect(gl, 0, 10, 10, 10, [0, 0, 255, 255], "cleared corner should be blue, stencil should be preserved");
-            wtu.checkCanvasRect(gl, 0, 0, 10, 10, [0, 0, 0, 0], "remainder of buffer should be cleared");
-        }
-        clear(gl1);
-
-        finishTest();
-    }
-}
-
-function go() {
-    description("This test ensures WebGL implementations correctly clear the drawing buffer on composite if preserveDrawingBuffer is false.");
-
-    debug("");
-
-    gl1 = create3DContext(document.getElementById("c"));
-    if (!gl1) {
-        finishTest();
-        return;
-    }
-
-    shouldBeTrue("gl1 != null");
-    shouldBeTrue('gl1.getContextAttributes().preserveDrawingBuffer == false');
-
-    function init(gl) {
-        gl.clearColor(1, 0, 0, 1);
-        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);
-
-        // enable scissor here, before compositing, to make sure it's correctly
-        // ignored and restored
-        gl.scissor(0, 10, 10, 10);
-        gl.enable(gl.SCISSOR_TEST);
-    }
-
-    init(gl1);
-
-    setTimeout(timer, 500);
-}
-
-window.addEventListener("load", go, false);
-
-successfullyParsed = true;
-</script>
-</head>
-<body>
-<!-- Important to put the canvas at the top so that it's always visible even in the test suite runner.
-     Otherwise it just doesn't get composited in Firefox. -->
-<canvas width="20" height="20" style="border: 1px solid blue;" id="c"></canvas>
-<div id="description"></div>
-<div id="console"></div>
-</body>
-</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/buffers/00_test_list.txt
@@ -0,0 +1,8 @@
+buffer-bind-test.html
+buffer-data-array-buffer.html
+index-validation-copies-indices.html
+index-validation-crash-with-buffer-sub-data.html
+index-validation-verifies-too-many-indices.html
+index-validation-with-resized-buffer.html
+index-validation.html
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/buffers/buffer-bind-test.html
@@ -0,0 +1,63 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+  <head>
+<meta charset="utf-8">
+    <title>WebGL BindBuffer conformance test.</title>
+    <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../resources/webgl-test.js"> </script>
+</head>
+<body>
+<canvas id="example" width="40" height="40" style="width: 40px; height: 40px;"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+description("Checks a buffer can only be bound to 1 target.");
+
+debug("");
+debug("Canvas.getContext");
+
+var gl = create3DContext(document.getElementById("canvas"));
+if (!gl) {
+  testFailed("context does not exist");
+} else {
+  testPassed("context exists");
+
+  debug("");
+
+  var buf = gl.createBuffer();
+  gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+  glErrorShouldBe(gl, gl.NO_ERROR,
+            "should be able to bind buffer.");
+  gl.bindBuffer(gl.ARRAY_BUFFER, null);
+  glErrorShouldBe(gl, gl.NO_ERROR,
+            "should be able to unbind buffer.");
+  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buf);
+  glErrorShouldBe(gl, gl.INVALID_OPERATION,
+            "should get INVALID_OPERATION if attempting to bind buffer to different target");
+
+  var buf = gl.createBuffer();
+  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buf);
+  glErrorShouldBe(gl, gl.NO_ERROR,
+            "should be able to bind buffer.");
+  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+  glErrorShouldBe(gl, gl.NO_ERROR,
+            "should be able to unbind buffer.");
+  gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+  glErrorShouldBe(gl, gl.INVALID_OPERATION,
+            "should get INVALID_OPERATION if attempting to bind buffer to different target");
+}
+
+debug("");
+successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/buffers/buffer-data-array-buffer.html
@@ -0,0 +1,67 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+description("Test bufferData/bufferSubData with ArrayBuffer input");
+
+debug('Regression test for <a href="https://bugs.webkit.org/show_bug.cgi?id=41884">https://bugs.webkit.org/show_bug.cgi?id=41884</a> : <code>Implement bufferData and bufferSubData with ArrayBuffer as input</code>');
+
+var gl = create3DContext();
+shouldBeNonNull("gl");
+
+var array = new ArrayBuffer(128);
+shouldBeNonNull("array");
+
+var buf = gl.createBuffer();
+shouldBeNonNull(buf);
+
+gl.bufferData(gl.ARRAY_BUFFER, array, gl.STATIC_DRAW);
+glErrorShouldBe(gl, gl.INVALID_OPERATION);
+
+gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+glErrorShouldBe(gl, gl.NO_ERROR);
+
+gl.bufferData(gl.ARRAY_BUFFER, -10, gl.STATIC_DRAW);
+glErrorShouldBe(gl, gl.INVALID_VALUE);
+
+// This should not crash, but the selection of the overload is ambiguous per Web IDL.
+gl.bufferData(gl.ARRAY_BUFFER, null, gl.STATIC_DRAW);
+gl.getError();
+
+gl.bufferData(gl.ARRAY_BUFFER, array, gl.STATIC_DRAW);
+glErrorShouldBe(gl, gl.NO_ERROR);
+
+array = new ArrayBuffer(64);
+
+gl.bufferSubData(gl.ARRAY_BUFFER, -10, array);
+glErrorShouldBe(gl, gl.INVALID_VALUE);
+
+gl.bufferSubData(gl.ARRAY_BUFFER, -10, new Float32Array(8));
+glErrorShouldBe(gl, gl.INVALID_VALUE);
+
+gl.bufferSubData(gl.ARRAY_BUFFER, 10, array);
+glErrorShouldBe(gl, gl.NO_ERROR);
+
+gl.bufferSubData(gl.ARRAY_BUFFER, 10, null);
+glErrorShouldBe(gl, gl.NO_ERROR);
+
+successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/buffers/index-validation-copies-indices.html
@@ -0,0 +1,76 @@
+<!--
+Copyright (c) 2011 The Chromium Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+   * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+   * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+description('Test that client data is always copied during bufferData and bufferSubData calls, because otherwise the data the GL uses to draw may differ from that checked by the index validation code.')
+
+var context = create3DContext();
+var program = loadStandardProgram(context);
+
+context.useProgram(program);
+var vertexObject = context.createBuffer();
+context.enableVertexAttribArray(0);
+context.bindBuffer(context.ARRAY_BUFFER, vertexObject);
+// 4 vertices -> 2 triangles
+context.bufferData(context.ARRAY_BUFFER, new Float32Array([ 0,0,0, 0,1,0, 1,0,0, 1,1,0 ]), context.STATIC_DRAW);
+context.vertexAttribPointer(0, 3, context.FLOAT, false, 0, 0);
+
+var indexObject = context.createBuffer();
+
+context.bindBuffer(context.ELEMENT_ARRAY_BUFFER, indexObject);
+var indices = new Uint16Array([ 10000, 0, 1, 2, 3, 10000 ]);
+context.bufferData(context.ELEMENT_ARRAY_BUFFER, indices, context.STATIC_DRAW);
+shouldGenerateGLError(context, context.NO_ERROR, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 2)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 0)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 4)");
+indices[0] = 2;
+indices[5] = 1;
+shouldGenerateGLError(context, context.NO_ERROR, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 2)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 0)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 4)");
+
+debug("")
+successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/buffers/index-validation-crash-with-buffer-sub-data.html
@@ -0,0 +1,35 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+description('Verifies that the index validation code which is within bufferSubData does not crash.')
+
+var gl = create3DContext();
+
+var elementBuffer = gl.createBuffer();
+gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elementBuffer);
+gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, 256, gl.STATIC_DRAW);
+var data = new Uint8Array(127);
+gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 63, data);
+testPassed("bufferSubData, when buffer object was initialized with null, did not crash");
+
+successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/buffers/index-validation-verifies-too-many-indices.html
@@ -0,0 +1,47 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+description('Tests that index validation for drawElements does not examine too many indices');
+
+var context = create3DContext();
+var program = loadStandardProgram(context);
+
+context.useProgram(program);
+var vertexObject = context.createBuffer();
+context.enableVertexAttribArray(0);
+context.bindBuffer(context.ARRAY_BUFFER, vertexObject);
+// 4 vertices -> 2 triangles
+context.bufferData(context.ARRAY_BUFFER, new Float32Array([ 0,0,0, 0,1,0, 1,0,0, 1,1,0 ]), context.STATIC_DRAW);
+context.vertexAttribPointer(0, 3, context.FLOAT, false, 0, 0);
+
+var indexObject = context.createBuffer();
+
+debug("Test out of range indices")
+context.bindBuffer(context.ELEMENT_ARRAY_BUFFER, indexObject);
+context.bufferData(context.ELEMENT_ARRAY_BUFFER, new Uint16Array([ 10000, 0, 1, 2, 3, 10000 ]), context.STATIC_DRAW);
+shouldGenerateGLError(context, context.NO_ERROR, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 2)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 0)");
+shouldGenerateGLError(context, context.INVALID_OPERATION, "context.drawElements(context.TRIANGLE_STRIP, 4, context.UNSIGNED_SHORT, 4)");
+
+debug("")
+successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/buffers/index-validation-with-resized-buffer.html
@@ -0,0 +1,104 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+</head>
+<body>
+<canvas id="example" width="1px" height="1px"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+
+<script id="vs" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+attribute vec4 vColor;
+varying vec4 color;
+void main() {
+    gl_Position = vPosition;
+    color = vColor;
+}
+</script>
+<script id="fs" type="x-shader/x-fragment">
+precision mediump float;
+varying vec4 color;
+void main() {
+  gl_FragColor = color;
+}
+</script>
+<script>
+description('Test that updating the size of a vertex buffer is properly noticed by the WebGL implementation.')
+
+var gl = initWebGL("example", "vs", "fs", ["vPosition", "vColor"], [0, 0, 0, 1], 1);
+glErrorShouldBe(gl, gl.NO_ERROR, "after initialization");
+
+gl.useProgram(gl.program);
+var vertexObject = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
+    [-1,1,0, 1,1,0, -1,-1,0,
+     -1,-1,0, 1,1,0, 1,-1,0]), gl.STATIC_DRAW);
+gl.enableVertexAttribArray(0);
+gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+glErrorShouldBe(gl, gl.NO_ERROR, "after vertex setup");
+
+var texCoordObject = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, texCoordObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(
+    [0,0, 1,0, 0,1,
+     0,1, 1,0, 1,1]), gl.STATIC_DRAW);
+gl.enableVertexAttribArray(1);
+gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+glErrorShouldBe(gl, gl.NO_ERROR, "after texture coord setup");
+
+// Now resize these buffers because we want to change what we're drawing.
+gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
+    -1,1,0, 1,1,0, -1,-1,0, 1,-1,0,
+    -1,1,0, 1,1,0, -1,-1,0, 1,-1,0]), gl.STATIC_DRAW);
+glErrorShouldBe(gl, gl.NO_ERROR, "after vertex redefinition");
+gl.bindBuffer(gl.ARRAY_BUFFER, texCoordObject);
+gl.bufferData(gl.ARRAY_BUFFER, new Uint8Array([
+    255, 0, 0, 255,
+    255, 0, 0, 255,
+    255, 0, 0, 255,
+    255, 0, 0, 255,
+    0, 255, 0, 255,
+    0, 255, 0, 255,
+    0, 255, 0, 255,
+    0, 255, 0, 255]), gl.STATIC_DRAW);
+gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, false, 0, 0);
+glErrorShouldBe(gl, gl.NO_ERROR, "after texture coordinate / color redefinition");
+
+var numQuads = 2;
+var indices = new Uint8Array(numQuads * 6);
+for (var ii = 0; ii < numQuads; ++ii) {
+    var offset = ii * 6;
+    var quad = (ii == (numQuads - 1)) ? 4 : 0;
+    indices[offset + 0] = quad + 0;
+    indices[offset + 1] = quad + 1;
+    indices[offset + 2] = quad + 2;
+    indices[offset + 3] = quad + 2;
+    indices[offset + 4] = quad + 1;
+    indices[offset + 5] = quad + 3;
+}
+var indexObject = gl.createBuffer();
+gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexObject);
+gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+glErrorShouldBe(gl, gl.NO_ERROR, "after setting up indices");
+gl.drawElements(gl.TRIANGLES, numQuads * 6, gl.UNSIGNED_BYTE, 0);
+glErrorShouldBe(gl, gl.NO_ERROR, "after drawing");
+
+debug("")
+successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/buffers/index-validation.html
@@ -0,0 +1,140 @@
+<!--
+Copyright (c) 2011 The Chromium Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+   * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+   * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+description("Tests that index validation verifies the correct number of indices");
+
+function sizeInBytes(type) {
+  switch (type) {
+  case gl.BYTE:
+  case gl.UNSIGNED_BYTE:
+    return 1;
+  case gl.SHORT:
+  case gl.UNSIGNED_SHORT:
+    return 2;
+  case gl.INT:
+  case gl.UNSIGNED_INT:
+  case gl.FLOAT:
+    return 4;
+  default:
+    throw "unknown type";
+  }
+}
+
+var gl = create3DContext();
+var program = loadStandardProgram(gl);
+
+// 3 vertices => 1 triangle, interleaved data
+var dataComplete = new Float32Array([0, 0, 0, 1,
+                                     0, 0, 1,
+                                     1, 0, 0, 1,
+                                     0, 0, 1,
+                                     1, 1, 1, 1,
+                                     0, 0, 1]);
+var dataIncomplete = new Float32Array([0, 0, 0, 1,
+                                       0, 0, 1,
+                                       1, 0, 0, 1,
+                                       0, 0, 1,
+                                       1, 1, 1, 1]);
+var indices = new Uint16Array([0, 1, 2]);
+
+debug("Testing with valid indices");
+
+var bufferComplete = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, bufferComplete);
+gl.bufferData(gl.ARRAY_BUFFER, dataComplete, gl.STATIC_DRAW);
+var elements = gl.createBuffer();
+gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, elements);
+gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
+gl.useProgram(program);
+var vertexLoc = gl.getAttribLocation(program, "a_vertex");
+var normalLoc = gl.getAttribLocation(program, "a_normal");
+gl.vertexAttribPointer(vertexLoc, 4, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 0);
+gl.enableVertexAttribArray(vertexLoc);
+gl.vertexAttribPointer(normalLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 4 * sizeInBytes(gl.FLOAT));
+gl.enableVertexAttribArray(normalLoc);
+shouldBe('gl.checkFramebufferStatus(gl.FRAMEBUFFER)', 'gl.FRAMEBUFFER_COMPLETE');
+glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+glErrorShouldBe(gl, gl.NO_ERROR);
+
+debug("Testing with out-of-range indices");
+
+var bufferIncomplete = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, bufferIncomplete);
+gl.bufferData(gl.ARRAY_BUFFER, dataIncomplete, gl.STATIC_DRAW);
+gl.vertexAttribPointer(vertexLoc, 4, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 0);
+gl.enableVertexAttribArray(vertexLoc);
+gl.disableVertexAttribArray(normalLoc);
+debug("Enable vertices, valid");
+glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+glErrorShouldBe(gl, gl.NO_ERROR);
+debug("Enable normals, out-of-range");
+gl.vertexAttribPointer(normalLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 4 * sizeInBytes(gl.FLOAT));
+gl.enableVertexAttribArray(normalLoc);
+glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+glErrorShouldBe(gl, gl.INVALID_OPERATION);
+
+debug("Test with enabled attribute that does not belong to current program");
+
+gl.disableVertexAttribArray(normalLoc);
+var extraLoc = Math.max(vertexLoc, normalLoc) + 1;
+gl.enableVertexAttribArray(extraLoc);
+debug("Enable an extra attribute with null");
+glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+glErrorShouldBe(gl, gl.INVALID_OPERATION);
+debug("Enable an extra attribute with insufficient data buffer");
+gl.vertexAttribPointer(extraLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), 4 * sizeInBytes(gl.FLOAT));
+glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+gl.vertexAttribPointer(normalLoc, 3, gl.FLOAT, false, 7 * sizeInBytes(gl.FLOAT), -2000000000 * sizeInBytes(gl.FLOAT));
+glErrorShouldBe(gl, gl.NO_ERROR);
+shouldBeUndefined('gl.drawElements(gl.TRIANGLES, 3, gl.UNSIGNED_SHORT, 0)');
+
+successfullyParsed = true;
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/canvas-test.html
+++ /dev/null
@@ -1,192 +0,0 @@
-<!--
-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.
- -->
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>WebGL Canvas Conformance Tests</title>
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/desktop-gl-constants.js" type="text/javascript"></script>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
-<canvas id="canvas2d" width="40" height="40"> </canvas>
-<script>
-if (window.initNonKhronosFramework) {
-  window.initNonKhronosFramework(true);
-}
-
-description("This test ensures WebGL implementations interact correctly with the canvas tag.");
-
-debug("");
-debug("Canvas.getContext");
-
-var err;
-var canvas = document.getElementById("canvas");
-var canvas2d = document.getElementById("canvas2d");
-var ctx2d = canvas2d.getContext("2d");
-var gl = create3DContext(canvas);
-if (!gl) {
-  testFailed("context does not exist");
-} else {
-  testPassed("context exists");
-
-  debug("");
-  debug("Checking canvas and WebGL interaction");
-
-  // Check that a canvas with no width or height is 300x150 pixels
-  shouldBe('canvas.width', '300');
-  shouldBe('canvas.height', '150');
-
-  // Check get a 4 value gl parameter as a csv string.
-  function getValue4v(name) {
-    var v = gl.getParameter(name);
-    var result = '' +
-        v[0] + ',' +
-        v[1] + ',' +
-        v[2] + ',' +
-        v[3];
-    return result;
-  }
-
-  function getViewport() {
-    return getValue4v(gl.VIEWPORT);
-  }
-
-  function getClearColor() {
-    return getValue4v(gl.COLOR_CLEAR_VALUE);
-  }
-
-  function isAboutEqual(a, b) {
-    return Math.abs(a - b) < 0.01;
-  }
-
-  function isAboutEqualInt(a, b) {
-    return Math.abs(a - b) < 3;
-  }
-
-  function checkCanvasContentIs(r3d,g3d,b3d,a3d) {
-    var r2d;
-    var g2d;
-    var b2d;
-    var a2d;
-
-    function checkPixel(x, y, r3d,g3d,b3d,a3d) {
-      var offset = (y * 40 + x) * 4;
-      r2d = imgData.data[offset];
-      g2d = imgData.data[offset + 1];
-      b2d = imgData.data[offset + 2];
-      a2d = imgData.data[offset + 3];
-      //debug('' + x + ', ' + y + "(" + offset + ") = " + r2d + ", " + g2d + ", " + b2d + ", " + a2d);
-      return isAboutEqualInt(r2d, r3d) &&
-             isAboutEqualInt(g2d, g3d) &&
-             isAboutEqualInt(b2d, b3d) &&
-             isAboutEqualInt(a2d, a3d);
-    }
-
-    function checkPixels(r3d,g3d,b3d,a3d) {
-      return checkPixel(0, 0, r3d, g3d, b3d, a3d) &&
-             checkPixel(0, 39, r3d, g3d, b3d, a3d) &&
-             checkPixel(39, 0, r3d, g3d, b3d, a3d) &&
-             checkPixel(39, 39, r3d, g3d, b3d, a3d) &&
-             checkPixel(0, 0, r3d, g3d, b3d, a3d);
-    };
-
-    // Set to just take the color from the 3d canvas
-    ctx2d.globalCompositeOperation = 'copy';
-
-    // fill 2d canvas with orange
-    ctx2d.fillStyle = "rgb(255,192,128)";
-    ctx2d.fillRect (0, 0, 40, 40);
-
-    // get the image data
-    var imgData = ctx2d.getImageData(0, 0, 40, 40);
-
-    // check it got cleared.
-    if (!checkPixels(255, 192, 128, 255)) {
-      testFailed("unable to fill 2d context.");
-      return;
-    }
-
-    // draw 3d canvas on top.
-    ctx2d.drawImage(canvas, 0,0, 40, 40);
-
-    // get the image data
-    var imgData = ctx2d.getImageData(0, 0, 40, 40);
-
-    // Check it's the expected color.
-    if (!checkPixels(r3d, g3d, b3d, a3d)) {
-     testFailed("pixels are " + r2d + "," + g2d + "," + b2d + "," + a2d +
-                " expected " + r3d + "," + g3d + "," + b3d + "," + a3d);
-    } else {
-      testPassed("pixels are " + r3d + "," + g3d + "," + b3d + "," + a3d);
-    }
-  }
-
-  checkCanvasContentIs(0, 0, 0, 0);
-  shouldBe('getViewport()', '"0,0,300,150"');
-
-  // Change the display size of the canvas and check
-  // the viewport size does not change.
-  debug("");
-  debug("change display size of canvas and see that viewport does not change");
-  canvas.style.width = "100px";
-  canvas.style.height = "25px";
-  var intervalId;
-  intervalId = window.setInterval(function() {
-    if (canvas.clientWidth == 100 &&
-        canvas.clientHeight == 25) {
-      window.clearInterval(intervalId);
-      shouldBe('getViewport()', '"0,0,300,150"');
-      shouldBe('canvas.width', '300');
-      shouldBe('canvas.height', '150');
-
-      // Change the actual size of the canvas
-      // Check that the viewport does not change.
-      // Check that the clear color does not change.
-      // Check that the color mask does not change.
-      debug("");
-      debug("change the actual size of the canvas and see that the viewport does not change");
-      gl.clearColor(0.25, 0.5, 0.75, 1);
-      gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-      checkCanvasContentIs(64, 128, 192, 255);
-      gl.colorMask(0,0,0,0);
-      glErrorShouldBe(gl, gl.NO_ERROR, "No GL errors before resizing the canvas");
-      canvas.width = 400;
-      canvas.height = 10;
-      err = gl.getError();
-      // Some implementations might lost the context when resizing
-      if (err != gl.CONTEXT_LOST_WEBGL) {
-        shouldBe("err", "gl.NO_ERROR");
-        var v = gl.getParameter(gl.COLOR_CLEAR_VALUE);
-        assertMsg(isAboutEqual(v[0], 0.25) &&
-                  isAboutEqual(v[1], 0.5) &&
-                  isAboutEqual(v[2], 0.75) &&
-                  isAboutEqual(v[3], 1),
-                  "gl.clearColor should not change after canvas resize");
-        v = gl.getParameter(gl.COLOR_WRITEMASK);
-        assertMsg(isAboutEqual(v[0], 0) &&
-                  isAboutEqual(v[1], 0) &&
-                  isAboutEqual(v[2], 0) &&
-                  isAboutEqual(v[3], 0),
-                  "gl.colorMask should not change after canvas resize");
-        shouldBe('getViewport()', '"0,0,300,150"');
-        checkCanvasContentIs(0, 0, 0, 0);
-      }
-
-      debug("");
-      finishTest();
-    }
-   }, 1000/30);
-}
-</script>
-
-</body>
-</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/canvas-zero-size.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-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.
- -->
-<!DOCTYPE html>
-<html>
-  <head>
-  <meta charset="utf-8">
-    <title>Zero Size Canvas Test</title>
-    <link rel="stylesheet" href="../resources/js-test-style.css"/>
-    <script src="../resources/js-test-pre.js"></script>
-    <script src="resources/webgl-test.js"> </script>
-    <script src="resources/webgl-test-utils.js"> </script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script>
-description("Tests that a zero size canvas does not fail.");
-var wtu = WebGLTestUtils;
-var canvas = document.createElement('canvas');
-var gl = wtu.create3DContext(canvas);
-canvas.width = 0;
-canvas.height = 0;
-gl.viewport(0, 0, 0, 0);
-var program = wtu.setupTexturedQuad(gl);
-shouldBeTrue("program != null");
-var tex = gl.createTexture();
-gl.bindTexture(gl.TEXTURE_2D, tex);
-var pixel = new Uint8Array([0, 255, 0, 255]);
-gl.texImage2D(
-  gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixel);
-wtu.drawQuad(gl);
-
-glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
-successfullyParsed = true;
-</script>
-<script src="../resources/js-test-post.js"></script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/canvas/00_test_list.txt
@@ -0,0 +1,8 @@
+buffer-offscreen-test.html
+buffer-preserve-test.html
+canvas-test.html
+canvas-zero-size.html
+drawingbuffer-static-canvas-test.html
+drawingbuffer-test.html
+viewport-unchanged-upon-resize.html
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/canvas/buffer-offscreen-test.html
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL required buffer clear behaviour test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"> </script>
+<script src="../resources/webgl-test-utils.js"> </script>
+<style type="text/css">
+body {
+    height: 3000px;
+}
+</style>
+<script type="text/javascript">
+
+var iter = 0;
+var gl1;
+var gl2;
+
+var wtu = WebGLTestUtils;
+
+function timer() {
+    if (iter == 0) {
+        // some random hacky stuff to make sure that we get a compositing step
+        window.scrollBy(0, 10);
+        window.scrollBy(0, -10);
+        iter++;
+
+        setTimeout(timer, 500);
+    } else if (iter == 1) {
+        function clear(gl) {
+            // scissor was set earlier
+            gl.clearColor(0, 0, 1, 1);
+            gl.clear(gl.COLOR_BUFFER_BIT);
+        }
+        clear(gl1);
+        clear(gl2);
+
+        debug("check on screen canvas");
+        wtu.checkCanvasRect(gl1, 0, 10, 10, 10, [0, 0, 255, 255], "cleared corner should be blue, stencil should be preserved");
+        wtu.checkCanvasRect(gl1, 0, 0, 10, 10, [0, 0, 0, 0], "remainder of buffer should be cleared");
+        debug("check off screen canvas");
+        wtu.checkCanvasRect(gl2, 0, 10, 10, 10, [0, 0, 255, 255], "cleared corner should be blue, stencil should be preserved");
+        wtu.checkCanvasRect(gl2, 0, 0, 10, 10, [255, 0, 0, 255], "remainder of buffer should be un-cleared red");
+
+        finishTest();
+    }
+}
+
+function go() {
+    description("This test ensures WebGL implementations correctly clear the drawing buffer on composite if preserveDrawingBuffer is false.");
+
+    debug("");
+
+    gl1 = create3DContext(document.getElementById("c"));
+    c2 = document.createElement('canvas');
+    gl2 = create3DContext(c2);
+    shouldBeTrue("gl1 != null");
+    shouldBeTrue("gl2 != null");
+
+    shouldBeTrue('gl1.getContextAttributes().preserveDrawingBuffer == false');
+    shouldBeTrue('gl2.getContextAttributes().preserveDrawingBuffer == false');
+
+    function init(gl) {
+        gl.clearColor(1, 0, 0, 1);
+        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);
+
+        // enable scissor here, before compositing, to make sure it's correctly
+        // ignored and restored
+        gl.scissor(0, 10, 10, 10);
+        gl.enable(gl.SCISSOR_TEST);
+    }
+
+    init(gl1);
+    init(gl2);
+
+    setTimeout(timer, 500);
+}
+
+window.addEventListener("load", go, false);
+
+successfullyParsed = true;
+</script>
+</head>
+<body>
+<div id="description"></div>
+<canvas width="20" height="20" style="border: 1px solid blue;" id="c"></canvas>
+<div id="console"></div>
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/canvas/buffer-preserve-test.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL required buffer clear behaviour test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"> </script>
+<script src="../resources/webgl-test-utils.js"> </script>
+<style type="text/css">
+body {
+    height: 3000px;
+}
+</style>
+<script type="text/javascript">
+
+var iter = 0;
+var gl1;
+
+var wtu = WebGLTestUtils;
+
+function timer() {
+    if (iter == 0) {
+      function init(gl) {
+          gl.clearColor(1, 0, 0, 1);
+          gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);
+
+          // enable scissor here, before compositing, to make sure it's correctly
+          // ignored and restored
+          gl.scissor(0, 10, 10, 10);
+          gl.enable(gl.SCISSOR_TEST);
+      }
+      init(gl1);
+    } else if (iter == 1) {
+        // some random hacky stuff to make sure that we get a compositing step
+        window.scrollBy(0, 10);
+        window.scrollBy(0, -10);
+    } else if (iter == 2) {
+        function clear(gl) {
+            // scissor was set earlier
+            gl.clearColor(0, 0, 1, 1);
+            gl.clear(gl.COLOR_BUFFER_BIT);
+
+            wtu.checkCanvasRect(gl, 0, 10, 10, 10, [0, 0, 255, 255], "cleared corner should be blue, stencil should be preserved");
+            wtu.checkCanvasRect(gl, 0, 0, 10, 10, [0, 0, 0, 0], "remainder of buffer should be cleared");
+        }
+        clear(gl1);
+
+        finishTest();
+        return;
+    }
+
+    iter++;
+    setTimeout(timer, 500);
+}
+
+function go() {
+    description("This test ensures WebGL implementations correctly clear the drawing buffer on composite if preserveDrawingBuffer is false.");
+
+    debug("");
+
+    gl1 = create3DContext(document.getElementById("c"));
+    if (!gl1) {
+        finishTest();
+        return;
+    }
+
+    shouldBeTrue("gl1 != null");
+    shouldBeTrue('gl1.getContextAttributes().preserveDrawingBuffer == false');
+
+    setTimeout(timer, 500);
+}
+
+window.addEventListener("load", go, false);
+
+successfullyParsed = true;
+</script>
+</head>
+<body>
+<!-- Important to put the canvas at the top so that it's always visible even in the test suite runner.
+     Otherwise it just doesn't get composited in Firefox. -->
+<canvas width="20" height="20" style="border: 1px solid blue;" id="c"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+</body>
+</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/canvas/canvas-test.html
@@ -0,0 +1,192 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Canvas Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<canvas id="canvas2d" width="40" height="40"> </canvas>
+<script>
+if (window.initNonKhronosFramework) {
+  window.initNonKhronosFramework(true);
+}
+
+description("This test ensures WebGL implementations interact correctly with the canvas tag.");
+
+debug("");
+debug("Canvas.getContext");
+
+var err;
+var canvas = document.getElementById("canvas");
+var canvas2d = document.getElementById("canvas2d");
+var ctx2d = canvas2d.getContext("2d");
+var gl = create3DContext(canvas);
+if (!gl) {
+  testFailed("context does not exist");
+} else {
+  testPassed("context exists");
+
+  debug("");
+  debug("Checking canvas and WebGL interaction");
+
+  // Check that a canvas with no width or height is 300x150 pixels
+  shouldBe('canvas.width', '300');
+  shouldBe('canvas.height', '150');
+
+  // Check get a 4 value gl parameter as a csv string.
+  function getValue4v(name) {
+    var v = gl.getParameter(name);
+    var result = '' +
+        v[0] + ',' +
+        v[1] + ',' +
+        v[2] + ',' +
+        v[3];
+    return result;
+  }
+
+  function getViewport() {
+    return getValue4v(gl.VIEWPORT);
+  }
+
+  function getClearColor() {
+    return getValue4v(gl.COLOR_CLEAR_VALUE);
+  }
+
+  function isAboutEqual(a, b) {
+    return Math.abs(a - b) < 0.01;
+  }
+
+  function isAboutEqualInt(a, b) {
+    return Math.abs(a - b) < 3;
+  }
+
+  function checkCanvasContentIs(r3d,g3d,b3d,a3d) {
+    var r2d;
+    var g2d;
+    var b2d;
+    var a2d;
+
+    function checkPixel(x, y, r3d,g3d,b3d,a3d) {
+      var offset = (y * 40 + x) * 4;
+      r2d = imgData.data[offset];
+      g2d = imgData.data[offset + 1];
+      b2d = imgData.data[offset + 2];
+      a2d = imgData.data[offset + 3];
+      //debug('' + x + ', ' + y + "(" + offset + ") = " + r2d + ", " + g2d + ", " + b2d + ", " + a2d);
+      return isAboutEqualInt(r2d, r3d) &&
+             isAboutEqualInt(g2d, g3d) &&
+             isAboutEqualInt(b2d, b3d) &&
+             isAboutEqualInt(a2d, a3d);
+    }
+
+    function checkPixels(r3d,g3d,b3d,a3d) {
+      return checkPixel(0, 0, r3d, g3d, b3d, a3d) &&
+             checkPixel(0, 39, r3d, g3d, b3d, a3d) &&
+             checkPixel(39, 0, r3d, g3d, b3d, a3d) &&
+             checkPixel(39, 39, r3d, g3d, b3d, a3d) &&
+             checkPixel(0, 0, r3d, g3d, b3d, a3d);
+    };
+
+    // Set to just take the color from the 3d canvas
+    ctx2d.globalCompositeOperation = 'copy';
+
+    // fill 2d canvas with orange
+    ctx2d.fillStyle = "rgb(255,192,128)";
+    ctx2d.fillRect (0, 0, 40, 40);
+
+    // get the image data
+    var imgData = ctx2d.getImageData(0, 0, 40, 40);
+
+    // check it got cleared.
+    if (!checkPixels(255, 192, 128, 255)) {
+      testFailed("unable to fill 2d context.");
+      return;
+    }
+
+    // draw 3d canvas on top.
+    ctx2d.drawImage(canvas, 0,0, 40, 40);
+
+    // get the image data
+    var imgData = ctx2d.getImageData(0, 0, 40, 40);
+
+    // Check it's the expected color.
+    if (!checkPixels(r3d, g3d, b3d, a3d)) {
+     testFailed("pixels are " + r2d + "," + g2d + "," + b2d + "," + a2d +
+                " expected " + r3d + "," + g3d + "," + b3d + "," + a3d);
+    } else {
+      testPassed("pixels are " + r3d + "," + g3d + "," + b3d + "," + a3d);
+    }
+  }
+
+  checkCanvasContentIs(0, 0, 0, 0);
+  shouldBe('getViewport()', '"0,0,300,150"');
+
+  // Change the display size of the canvas and check
+  // the viewport size does not change.
+  debug("");
+  debug("change display size of canvas and see that viewport does not change");
+  canvas.style.width = "100px";
+  canvas.style.height = "25px";
+  var intervalId;
+  intervalId = window.setInterval(function() {
+    if (canvas.clientWidth == 100 &&
+        canvas.clientHeight == 25) {
+      window.clearInterval(intervalId);
+      shouldBe('getViewport()', '"0,0,300,150"');
+      shouldBe('canvas.width', '300');
+      shouldBe('canvas.height', '150');
+
+      // Change the actual size of the canvas
+      // Check that the viewport does not change.
+      // Check that the clear color does not change.
+      // Check that the color mask does not change.
+      debug("");
+      debug("change the actual size of the canvas and see that the viewport does not change");
+      gl.clearColor(0.25, 0.5, 0.75, 1);
+      gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+      checkCanvasContentIs(64, 128, 192, 255);
+      gl.colorMask(0,0,0,0);
+      glErrorShouldBe(gl, gl.NO_ERROR, "No GL errors before resizing the canvas");
+      canvas.width = 400;
+      canvas.height = 10;
+      err = gl.getError();
+      // Some implementations might lost the context when resizing
+      if (err != gl.CONTEXT_LOST_WEBGL) {
+        shouldBe("err", "gl.NO_ERROR");
+        var v = gl.getParameter(gl.COLOR_CLEAR_VALUE);
+        assertMsg(isAboutEqual(v[0], 0.25) &&
+                  isAboutEqual(v[1], 0.5) &&
+                  isAboutEqual(v[2], 0.75) &&
+                  isAboutEqual(v[3], 1),
+                  "gl.clearColor should not change after canvas resize");
+        v = gl.getParameter(gl.COLOR_WRITEMASK);
+        assertMsg(isAboutEqual(v[0], 0) &&
+                  isAboutEqual(v[1], 0) &&
+                  isAboutEqual(v[2], 0) &&
+                  isAboutEqual(v[3], 0),
+                  "gl.colorMask should not change after canvas resize");
+        shouldBe('getViewport()', '"0,0,300,150"');
+        checkCanvasContentIs(0, 0, 0, 0);
+      }
+
+      debug("");
+      finishTest();
+    }
+   }, 1000/30);
+}
+</script>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/canvas/canvas-zero-size.html
@@ -0,0 +1,42 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+  <head>
+  <meta charset="utf-8">
+    <title>Zero Size Canvas Test</title>
+    <link rel="stylesheet" href="../../resources/js-test-style.css"/>
+    <script src="../../resources/js-test-pre.js"></script>
+    <script src="../resources/webgl-test.js"> </script>
+    <script src="../resources/webgl-test-utils.js"> </script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+description("Tests that a zero size canvas does not fail.");
+var wtu = WebGLTestUtils;
+var canvas = document.createElement('canvas');
+var gl = wtu.create3DContext(canvas);
+canvas.width = 0;
+canvas.height = 0;
+gl.viewport(0, 0, 0, 0);
+var program = wtu.setupTexturedQuad(gl);
+shouldBeTrue("program != null");
+var tex = gl.createTexture();
+gl.bindTexture(gl.TEXTURE_2D, tex);
+var pixel = new Uint8Array([0, 255, 0, 255]);
+gl.texImage2D(
+  gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixel);
+wtu.drawQuad(gl);
+
+glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
+successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/canvas/drawingbuffer-static-canvas-test.html
@@ -0,0 +1,149 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Canvas Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" width="50" height="50"> </canvas>
+
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+  gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+  gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+}
+</script>
+
+<script>
+function fail(x,y, buf, shouldBe)
+{
+  var i = (y*50+x) * 4;
+  var reason = "pixel at ("+x+","+y+") is ("+buf[i]+","+buf[i+1]+","+buf[i+2]+","+buf[i+3]+"), should be "+shouldBe;
+  testFailed(reason);
+}
+
+function pass()
+{
+  testPassed("drawing is correct");
+}
+
+function drawTriangleTest(gl)
+{
+  gl.viewport(0, 0, 50, 50);
+  var vertexObject = gl.createBuffer();
+  gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+  gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+  gl.enableVertexAttribArray(0);
+  gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+  gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+  var buf = new Uint8Array(50 * 50 * 4);
+  gl.readPixels(0, 0, 50, 50, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+
+  // Test several locations
+  // First line should be all black
+  for (var i = 0; i < 50; ++i) {
+    if (buf[i*4] != 0 || buf[i*4+1] != 0 || buf[i*4+2] != 0 || buf[i*4+3] != 255) {
+      fail(i, 0, buf, "(0,0,0,255)");
+      return;
+    }
+  }
+  // Line 15 should be red for at least 10 red pixels starting 20 pixels in
+  var offset = (15*50+20) * 4;
+  for (var i = 0; i < 10; ++i) {
+    if (buf[offset+i*4] != 255 || buf[offset+i*4+1] != 0 || buf[offset+i*4+2] != 0 || buf[offset+i*4+3] != 255) {
+      fail(20 + i, 15, buf, "(255,0,0,255)");
+      return;
+    }
+  }
+  // Last line should be all black
+  offset = (49*50) * 4;
+  for (var i = 0; i < 50; ++i) {
+    if (buf[offset+i*4] != 0 || buf[offset+i*4+1] != 0 || buf[offset+i*4+2] != 0 || buf[offset+i*4+3] != 255) {
+      fail(i, 49, buf, "(0,0,0,255)");
+      return;
+    }
+  }
+}
+
+description("This test ensures WebGL implementations correctly implement drawingbufferWidth/Height with compositing.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var err;
+var maxSize;
+var canvas = document.getElementById("canvas");
+var gl =  wtu.create3DContext(canvas);
+if (!gl) {
+  testFailed("context does not exist");
+} else {
+  testPassed("context exists");
+
+  gl.program = createProgram(gl, "vshader", "fshader", ["vPosition"]);
+  shouldBeNonNull(gl.program);
+  gl.useProgram(gl.program);
+  gl.enable(gl.DEPTH_TEST);
+  gl.disable(gl.BLEND);
+  gl.clearColor(0, 0, 0, 1);
+  gl.clearDepth(1);
+  shouldBe('gl.getError()', 'gl.NO_ERROR');
+
+  debug("");
+  debug("Checking drawingBufferWidth/drawingBufferHeight");
+
+  // Check that a canvas with no width or height is 300x150 pixels
+  shouldBe('gl.drawingBufferWidth', 'canvas.width');
+  shouldBe('gl.drawingBufferHeight', 'canvas.height');
+
+  // Check that changing the canvas size to something too large falls back to reasonable values.
+  maxSize = gl.getParameter(gl.MAX_VIEWPORT_DIMS);
+  shouldBeTrue('maxSize[0] > 0');
+  shouldBeTrue('maxSize[1] > 0');
+
+  // debug("MAX_VIEWPORT_DIMS = " + maxSize[0] + "x" + maxSize[1]);
+  canvas.width = maxSize[0] * 4;
+  canvas.height = maxSize[1] * 4;
+  shouldBeTrue('gl.drawingBufferWidth > 0');
+  shouldBeTrue('gl.drawingBufferHeight > 0');
+  shouldBeTrue('gl.drawingBufferWidth <= maxSize[0]');
+  shouldBeTrue('gl.drawingBufferHeight <= maxSize[1]');
+  shouldBe('gl.getError()', 'gl.NO_ERROR');
+
+  debug("");
+  debug("Checking scaling up then back down to 50/50, drawing still works.");
+  canvas.width = 50;
+  canvas.height = 50;
+  shouldBeTrue('gl.drawingBufferWidth == 50');
+  shouldBeTrue('gl.drawingBufferHeight == 50');
+  shouldBe('gl.getError()', 'gl.NO_ERROR');
+  drawTriangleTest(gl);
+  shouldBe('gl.getError()', 'gl.NO_ERROR');
+}
+debug("")
+successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/canvas/drawingbuffer-test.html
@@ -0,0 +1,148 @@
+<!--
+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.
+ -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Canvas Conformance Tests</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+<script src="../resources/webgl-test-utils.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec4 vPosition;
+void main()
+{
+  gl_Position = vPosition;
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+  gl_FragColor = vec4(1.0,0.0,0.0,1.0);
+}
+</script>
+
+<script>
+function fail(x,y, buf, shouldBe)
+{
+  var i = (y*50+x) * 4;
+  var reason = "pixel at ("+x+","+y+") is ("+buf[i]+","+buf[i+1]+","+buf[i+2]+","+buf[i+3]+"), should be "+shouldBe;
+  testFailed(reason);
+}
+
+function pass()
+{
+  testPassed("drawing is correct");
+}
+
+function drawTriangleTest(gl)
+{
+  gl.viewport(0, 0, 50, 50);
+  var vertexObject = gl.createBuffer();
+  gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
+  gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5,0 ]), gl.STATIC_DRAW);
+  gl.enableVertexAttribArray(0);
+  gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+  gl.drawArrays(gl.TRIANGLES, 0, 3);
+
+  var buf = new Uint8Array(50 * 50 * 4);
+  gl.readPixels(0, 0, 50, 50, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+
+  // Test several locations
+  // First line should be all black
+  for (var i = 0; i < 50; ++i) {
+    if (buf[i*4] != 0 || buf[i*4+1] != 0 || buf[i*4+2] != 0 || buf[i*4+3] != 255) {
+      fail(i, 0, buf, "(0,0,0,255)");
+      return;
+    }
+  }
+  // Line 15 should be red for at least 10 red pixels starting 20 pixels in
+  var offset = (15*50+20) * 4;
+  for (var i = 0; i < 10; ++i) {
+    if (buf[offset+i*4] != 255 || buf[offset+i*4+1] != 0 || buf[offset+i*4+2] != 0 || buf[offset+i*4+3] != 255) {
+      fail(20 + i, 15, buf, "(255,0,0,255)");
+      return;
+    }
+  }
+  // Last line should be all black
+  offset = (49*50) * 4;
+  for (var i = 0; i < 50; ++i) {
+    if (buf[offset+i*4] != 0 || buf[offset+i*4+1] != 0 || buf[offset+i*4+2] != 0 || buf[offset+i*4+3] != 255) {
+      fail(i, 49, buf, "(0,0,0,255)");
+      return;
+    }
+  }
+}
+
+description("This test ensures WebGL implementations correctly implement drawingbufferWidth/Height.");
+
+debug("");
+
+var wtu = WebGLTestUtils;
+var err;
+var maxSize;
+var canvas = document.createElement("canvas");
+var gl = create3DContext(canvas);
+if (!gl) {
+  testFailed("context does not exist");
+} else {
+  testPassed("context exists");
+
+  gl.program = createProgram(gl, "vshader", "fshader", ["vPosition"]);
+  shouldBeNonNull(gl.program);
+  gl.useProgram(gl.program);
+  gl.enable(gl.DEPTH_TEST);
+  gl.disable(gl.BLEND);
+  gl.clearColor(0, 0, 0, 1);
+  gl.clearDepth(1);
+  shouldBe('gl.getError()', 'gl.NO_ERROR');
+
+  debug("");
+  debug("Checking drawingBufferWidth/drawingBufferHeight");
+
+  // Check that a canvas with no width or height is 300x150 pixels
+  shouldBe('gl.drawingBufferWidth', 'canvas.width');
+  shouldBe('gl.drawingBufferHeight', 'canvas.height');
+
+  // Check that changing the canvas size to something too large falls back to reasonable values.
+  maxSize = gl.getParameter(gl.MAX_VIEWPORT_DIMS);
+  shouldBeTrue('maxSize[0] > 0');
+  shouldBeTrue('maxSize[1] > 0');
+
+  // debug("MAX_VIEWPORT_DIMS = " + maxSize[0] + "x" + maxSize[1]);
+  canvas.width = maxSize[0] * 4;
+  canvas.height = maxSize[1] * 4;
+  shouldBeTrue('gl.drawingBufferWidth > 0');
+  shouldBeTrue('gl.drawingBufferHeight > 0');
+  shouldBeTrue('gl.drawingBufferWidth <= maxSize[0]');
+  shouldBeTrue('gl.drawingBufferHeight <= maxSize[1]');
+  shouldBe('gl.getError()', 'gl.NO_ERROR');
+
+  debug("");
+  debug("Checking scaling up then back down to 50/50, drawing still works.");
+  canvas.width = 50;
+  canvas.height = 50;
+  shouldBeTrue('gl.drawingBufferWidth == 50');
+  shouldBeTrue('gl.drawingBufferHeight == 50');
+  shouldBe('gl.getError()', 'gl.NO_ERROR');
+  drawTriangleTest(gl);
+  shouldBe('gl.getError()', 'gl.NO_ERROR');
+}
+debug("")
+successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/canvas/viewport-unchanged-upon-resize.html
@@ -0,0 +1,112 @@
+<!--
+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.
+ -->
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+<script id="vshader" type="x-shader/x-vertex">
+attribute vec3 g_Position;
+
+void main()
+{
+    gl_Position = vec4(g_Position.x, g_Position.y, g_Position.z, 1.0);
+}
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+void main()
+{
+    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+</script>
+
+</head>
+<body>
+<canvas id="example" width="4px" height="4px"></canvas>
+<div id="description"></div>
+<div id="console"></div>
+<script>
+description('Verifies that GL viewport does not change when canvas is resized');
+
+var err;
+var gl = initWebGL("example", "vshader", "fshader", [ "g_Position" ], [ 0, 0, 1, 1 ], 1);
+
+var vertices = new Float32Array([
+     1.0,  1.0, 0.0,
+    -1.0,  1.0, 0.0,
+    -1.0, -1.0, 0.0,
+     1.0,  1.0, 0.0,
+    -1.0, -1.0, 0.0,
+     1.0, -1.0, 0.0]);
+var vbo = gl.createBuffer();
+gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
+
+gl.enableVertexAttribArray(0);
+gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+// Clear and set up
+gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+gl.useProgram(gl.program);
+// Draw the triangle pair to the frame buffer
+gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+// Ensure that the frame buffer is red at the sampled pixel
+var buf = new Uint8Array(1 * 1 * 4);
+gl.readPixels(2, 2, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+var passed = true;
+if (buf[0] != 255 ||
+    buf[1] != 0 ||
+    buf[2] != 0 ||
+    buf[3] != 255) {
+  testFailed("Pixel at (2, 2) should have been (255, 0, 0, 255), " +
+             "was (" + buf[0] + ", " + buf[1] + ", " + buf[2] + ", " + buf[3] + ")");
+  passed = false;
+}
+
+if (passed) {
+  // Now resize the canvas
+  glErrorShouldBe(gl, gl.NO_ERROR, "No GL errors before resizing the canvas");
+  var canvas = document.getElementById("example");
+  canvas.width = 8;
+  canvas.height = 8;
+  err = gl.getError();
+  // Some implementations might lost the context when resizing
+  if (err == gl.CONTEXT_LOST_WEBGL) {
+    testPassed("canvas lost context on resize");
+  } else {
+	shouldBe("err", "gl.NO_ERROR");
+    // Do another render
+    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+    gl.drawArrays(gl.TRIANGLES, 0, 6);
+    // This time, because we did not change the viewport, it should
+    // still be (0, 0, 4, 4), so only the lower-left quadrant should
+    // have been filled.
+    var buf = new Uint8Array(1 * 1 * 4);
+    gl.readPixels(6, 6, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf);
+    var passed = true;
+    if (buf[0] != 0 ||
+        buf[1] != 0 ||
+        buf[2] != 255 ||
+        buf[3] != 255) {
+      testFailed("Pixel at (6, 6) should have been (0, 0, 255, 255), " +
+                 "was (" + buf[0] + ", " + buf[1] + ", " + buf[2] + ", " + buf[3] + ")");
+      passed = false;
+    }
+    if (passed) {
+      testPassed("Viewport correctly did not change size during canvas resize");
+    }
+  }
+}
+
+successfullyParsed = true;
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
+
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/constants.html
+++ /dev/null
@@ -1,487 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<!--
-Copyright (c) 2011 Ilmari Heikkinen. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<title>WebGL Constants Test</title>
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/desktop-gl-constants.js" type="text/javascript"></script>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
-<script>
-description("This test ensures that the WebGL context has all the constants in the specification.");
-
-var constants = {
-    /* ClearBufferMask */
-DEPTH_BUFFER_BIT               : 0x00000100,
-STENCIL_BUFFER_BIT             : 0x00000400,
-COLOR_BUFFER_BIT               : 0x00004000,
-    
-    /* BeginMode */
-POINTS                         : 0x0000,
-LINES                          : 0x0001,
-LINE_LOOP                      : 0x0002,
-LINE_STRIP                     : 0x0003,
-TRIANGLES                      : 0x0004,
-TRIANGLE_STRIP                 : 0x0005,
-TRIANGLE_FAN                   : 0x0006,
-    
-    /* AlphaFunction (not supported in ES20) */
-    /*      NEVER */
-    /*      LESS */
-    /*      EQUAL */
-    /*      LEQUAL */
-    /*      GREATER */
-    /*      NOTEQUAL */
-    /*      GEQUAL */
-    /*      ALWAYS */
-    
-    /* BlendingFactorDest */
-ZERO                           : 0,
-ONE                            : 1,
-SRC_COLOR                      : 0x0300,
-ONE_MINUS_SRC_COLOR            : 0x0301,
-SRC_ALPHA                      : 0x0302,
-ONE_MINUS_SRC_ALPHA            : 0x0303,
-DST_ALPHA                      : 0x0304,
-ONE_MINUS_DST_ALPHA            : 0x0305,
-    
-    /* BlendingFactorSrc */
-    /*      ZERO */
-    /*      ONE */
-DST_COLOR                      : 0x0306,
-ONE_MINUS_DST_COLOR            : 0x0307,
-SRC_ALPHA_SATURATE             : 0x0308,
-    /*      SRC_ALPHA */
-    /*      ONE_MINUS_SRC_ALPHA */
-    /*      DST_ALPHA */
-    /*      ONE_MINUS_DST_ALPHA */
-    
-    /* BlendEquationSeparate */
-FUNC_ADD                       : 0x8006,
-BLEND_EQUATION                 : 0x8009,
-BLEND_EQUATION_RGB             : 0x8009,   /* same as BLEND_EQUATION */
-BLEND_EQUATION_ALPHA           : 0x883D,
-    
-    /* BlendSubtract */
-FUNC_SUBTRACT                  : 0x800A,
-FUNC_REVERSE_SUBTRACT          : 0x800B,
-    
-    /* Separate Blend Functions */
-BLEND_DST_RGB                  : 0x80C8,
-BLEND_SRC_RGB                  : 0x80C9,
-BLEND_DST_ALPHA                : 0x80CA,
-BLEND_SRC_ALPHA                : 0x80CB,
-CONSTANT_COLOR                 : 0x8001,
-ONE_MINUS_CONSTANT_COLOR       : 0x8002,
-CONSTANT_ALPHA                 : 0x8003,
-ONE_MINUS_CONSTANT_ALPHA       : 0x8004,
-BLEND_COLOR                    : 0x8005,
-    
-    /* Buffer Objects */
-ARRAY_BUFFER                   : 0x8892,
-ELEMENT_ARRAY_BUFFER           : 0x8893,
-ARRAY_BUFFER_BINDING           : 0x8894,
-ELEMENT_ARRAY_BUFFER_BINDING   : 0x8895,
-    
-STREAM_DRAW                    : 0x88E0,
-STATIC_DRAW                    : 0x88E4,
-DYNAMIC_DRAW                   : 0x88E8,
-    
-BUFFER_SIZE                    : 0x8764,
-BUFFER_USAGE                   : 0x8765,
-    
-CURRENT_VERTEX_ATTRIB          : 0x8626,
-    
-    /* CullFaceMode */
-FRONT                          : 0x0404,
-BACK                           : 0x0405,
-FRONT_AND_BACK                 : 0x0408,
-    
-    /* DepthFunction */
-    /*      NEVER */
-    /*      LESS */
-    /*      EQUAL */
-    /*      LEQUAL */
-    /*      GREATER */
-    /*      NOTEQUAL */
-    /*      GEQUAL */
-    /*      ALWAYS */
-    
-    /* EnableCap */
-    /* TEXTURE_2D */
-CULL_FACE                      : 0x0B44,
-BLEND                          : 0x0BE2,
-DITHER                         : 0x0BD0,
-STENCIL_TEST                   : 0x0B90,
-DEPTH_TEST                     : 0x0B71,
-SCISSOR_TEST                   : 0x0C11,
-POLYGON_OFFSET_FILL            : 0x8037,
-SAMPLE_ALPHA_TO_COVERAGE       : 0x809E,
-SAMPLE_COVERAGE                : 0x80A0,
-    
-    /* ErrorCode */
-NO_ERROR                       : 0,
-INVALID_ENUM                   : 0x0500,
-INVALID_VALUE                  : 0x0501,
-INVALID_OPERATION              : 0x0502,
-OUT_OF_MEMORY                  : 0x0505,
-    
-    /* FrontFaceDirection */
-CW                             : 0x0900,
-CCW                            : 0x0901,
-    
-    /* GetPName */
-LINE_WIDTH                     : 0x0B21,
-ALIASED_POINT_SIZE_RANGE       : 0x846D,
-ALIASED_LINE_WIDTH_RANGE       : 0x846E,
-CULL_FACE_MODE                 : 0x0B45,
-FRONT_FACE                     : 0x0B46,
-DEPTH_RANGE                    : 0x0B70,
-DEPTH_WRITEMASK                : 0x0B72,
-DEPTH_CLEAR_VALUE              : 0x0B73,
-DEPTH_FUNC                     : 0x0B74,
-STENCIL_CLEAR_VALUE            : 0x0B91,
-STENCIL_FUNC                   : 0x0B92,
-STENCIL_FAIL                   : 0x0B94,
-STENCIL_PASS_DEPTH_FAIL        : 0x0B95,
-STENCIL_PASS_DEPTH_PASS        : 0x0B96,
-STENCIL_REF                    : 0x0B97,
-STENCIL_VALUE_MASK             : 0x0B93,
-STENCIL_WRITEMASK              : 0x0B98,
-STENCIL_BACK_FUNC              : 0x8800,
-STENCIL_BACK_FAIL              : 0x8801,
-STENCIL_BACK_PASS_DEPTH_FAIL   : 0x8802,
-STENCIL_BACK_PASS_DEPTH_PASS   : 0x8803,
-STENCIL_BACK_REF               : 0x8CA3,
-STENCIL_BACK_VALUE_MASK        : 0x8CA4,
-STENCIL_BACK_WRITEMASK         : 0x8CA5,
-VIEWPORT                       : 0x0BA2,
-SCISSOR_BOX                    : 0x0C10,
-    /*      SCISSOR_TEST */
-COLOR_CLEAR_VALUE              : 0x0C22,
-COLOR_WRITEMASK                : 0x0C23,
-UNPACK_ALIGNMENT               : 0x0CF5,
-PACK_ALIGNMENT                 : 0x0D05,
-MAX_TEXTURE_SIZE               : 0x0D33,
-MAX_VIEWPORT_DIMS              : 0x0D3A,
-SUBPIXEL_BITS                  : 0x0D50,
-RED_BITS                       : 0x0D52,
-GREEN_BITS                     : 0x0D53,
-BLUE_BITS                      : 0x0D54,
-ALPHA_BITS                     : 0x0D55,
-DEPTH_BITS                     : 0x0D56,
-STENCIL_BITS                   : 0x0D57,
-POLYGON_OFFSET_UNITS           : 0x2A00,
-    /*      POLYGON_OFFSET_FILL */
-POLYGON_OFFSET_FACTOR          : 0x8038,
-TEXTURE_BINDING_2D             : 0x8069,
-SAMPLE_BUFFERS                 : 0x80A8,
-SAMPLES                        : 0x80A9,
-SAMPLE_COVERAGE_VALUE          : 0x80AA,
-SAMPLE_COVERAGE_INVERT         : 0x80AB,
-    
-    /* GetTextureParameter */
-    /*      TEXTURE_MAG_FILTER */
-    /*      TEXTURE_MIN_FILTER */
-    /*      TEXTURE_WRAP_S */
-    /*      TEXTURE_WRAP_T */
-    
-NUM_COMPRESSED_TEXTURE_FORMATS : 0x86A2,
-COMPRESSED_TEXTURE_FORMATS     : 0x86A3,
-    
-    /* HintMode */
-DONT_CARE                      : 0x1100,
-FASTEST                        : 0x1101,
-NICEST                         : 0x1102,
-    
-    /* HintTarget */
-GENERATE_MIPMAP_HINT            : 0x8192,
-    
-    /* DataType */
-BYTE                           : 0x1400,
-UNSIGNED_BYTE                  : 0x1401,
-SHORT                          : 0x1402,
-UNSIGNED_SHORT                 : 0x1403,
-INT                            : 0x1404,
-UNSIGNED_INT                   : 0x1405,
-FLOAT                          : 0x1406,
-    
-    /* PixelFormat */
-DEPTH_COMPONENT                : 0x1902,
-ALPHA                          : 0x1906,
-RGB                            : 0x1907,
-RGBA                           : 0x1908,
-LUMINANCE                      : 0x1909,
-LUMINANCE_ALPHA                : 0x190A,
-    
-    /* PixelType */
-    /*      UNSIGNED_BYTE */
-UNSIGNED_SHORT_4_4_4_4         : 0x8033,
-UNSIGNED_SHORT_5_5_5_1         : 0x8034,
-UNSIGNED_SHORT_5_6_5           : 0x8363,
-    
-    /* Shaders */
-FRAGMENT_SHADER                  : 0x8B30,
-VERTEX_SHADER                    : 0x8B31,
-MAX_VERTEX_ATTRIBS               : 0x8869,
-MAX_VERTEX_UNIFORM_VECTORS       : 0x8DFB,
-MAX_VARYING_VECTORS              : 0x8DFC,
-MAX_COMBINED_TEXTURE_IMAGE_UNITS : 0x8B4D,
-MAX_VERTEX_TEXTURE_IMAGE_UNITS   : 0x8B4C,
-MAX_TEXTURE_IMAGE_UNITS          : 0x8872,
-MAX_FRAGMENT_UNIFORM_VECTORS     : 0x8DFD,
-SHADER_TYPE                      : 0x8B4F,
-DELETE_STATUS                    : 0x8B80,
-LINK_STATUS                      : 0x8B82,
-VALIDATE_STATUS                  : 0x8B83,
-ATTACHED_SHADERS                 : 0x8B85,
-ACTIVE_UNIFORMS                  : 0x8B86,
-ACTIVE_ATTRIBUTES                : 0x8B89,
-SHADING_LANGUAGE_VERSION         : 0x8B8C,
-CURRENT_PROGRAM                  : 0x8B8D,
-    
-    /* StencilFunction */
-NEVER                          : 0x0200,
-LESS                           : 0x0201,
-EQUAL                          : 0x0202,
-LEQUAL                         : 0x0203,
-GREATER                        : 0x0204,
-NOTEQUAL                       : 0x0205,
-GEQUAL                         : 0x0206,
-ALWAYS                         : 0x0207,
-    
-    /* StencilOp */
-    /*      ZERO */
-KEEP                           : 0x1E00,
-REPLACE                        : 0x1E01,
-INCR                           : 0x1E02,
-DECR                           : 0x1E03,
-INVERT                         : 0x150A,
-INCR_WRAP                      : 0x8507,
-DECR_WRAP                      : 0x8508,
-    
-    /* StringName */
-VENDOR                         : 0x1F00,
-RENDERER                       : 0x1F01,
-VERSION                        : 0x1F02,
-    
-    /* TextureMagFilter */
-NEAREST                        : 0x2600,
-LINEAR                         : 0x2601,
-    
-    /* TextureMinFilter */
-    /*      NEAREST */
-    /*      LINEAR */
-NEAREST_MIPMAP_NEAREST         : 0x2700,
-LINEAR_MIPMAP_NEAREST          : 0x2701,
-NEAREST_MIPMAP_LINEAR          : 0x2702,
-LINEAR_MIPMAP_LINEAR           : 0x2703,
-    
-    /* TextureParameterName */
-TEXTURE_MAG_FILTER             : 0x2800,
-TEXTURE_MIN_FILTER             : 0x2801,
-TEXTURE_WRAP_S                 : 0x2802,
-TEXTURE_WRAP_T                 : 0x2803,
-    
-    /* TextureTarget */
-TEXTURE_2D                     : 0x0DE1,
-TEXTURE                        : 0x1702,
-    
-TEXTURE_CUBE_MAP               : 0x8513,
-TEXTURE_BINDING_CUBE_MAP       : 0x8514,
-TEXTURE_CUBE_MAP_POSITIVE_X    : 0x8515,
-TEXTURE_CUBE_MAP_NEGATIVE_X    : 0x8516,
-TEXTURE_CUBE_MAP_POSITIVE_Y    : 0x8517,
-TEXTURE_CUBE_MAP_NEGATIVE_Y    : 0x8518,
-TEXTURE_CUBE_MAP_POSITIVE_Z    : 0x8519,
-TEXTURE_CUBE_MAP_NEGATIVE_Z    : 0x851A,
-MAX_CUBE_MAP_TEXTURE_SIZE      : 0x851C,
-    
-    /* TextureUnit */
-TEXTURE0                       : 0x84C0,
-TEXTURE1                       : 0x84C1,
-TEXTURE2                       : 0x84C2,
-TEXTURE3                       : 0x84C3,
-TEXTURE4                       : 0x84C4,
-TEXTURE5                       : 0x84C5,
-TEXTURE6                       : 0x84C6,
-TEXTURE7                       : 0x84C7,
-TEXTURE8                       : 0x84C8,
-TEXTURE9                       : 0x84C9,
-TEXTURE10                      : 0x84CA,
-TEXTURE11                      : 0x84CB,
-TEXTURE12                      : 0x84CC,
-TEXTURE13                      : 0x84CD,
-TEXTURE14                      : 0x84CE,
-TEXTURE15                      : 0x84CF,
-TEXTURE16                      : 0x84D0,
-TEXTURE17                      : 0x84D1,
-TEXTURE18                      : 0x84D2,
-TEXTURE19                      : 0x84D3,
-TEXTURE20                      : 0x84D4,
-TEXTURE21                      : 0x84D5,
-TEXTURE22                      : 0x84D6,
-TEXTURE23                      : 0x84D7,
-TEXTURE24                      : 0x84D8,
-TEXTURE25                      : 0x84D9,
-TEXTURE26                      : 0x84DA,
-TEXTURE27                      : 0x84DB,
-TEXTURE28                      : 0x84DC,
-TEXTURE29                      : 0x84DD,
-TEXTURE30                      : 0x84DE,
-TEXTURE31                      : 0x84DF,
-ACTIVE_TEXTURE                 : 0x84E0,
-    
-    /* TextureWrapMode */
-REPEAT                         : 0x2901,
-CLAMP_TO_EDGE                  : 0x812F,
-MIRRORED_REPEAT                : 0x8370,
-    
-    /* Uniform Types */
-FLOAT_VEC2                     : 0x8B50,
-FLOAT_VEC3                     : 0x8B51,
-FLOAT_VEC4                     : 0x8B52,
-INT_VEC2                       : 0x8B53,
-INT_VEC3                       : 0x8B54,
-INT_VEC4                       : 0x8B55,
-BOOL                           : 0x8B56,
-BOOL_VEC2                      : 0x8B57,
-BOOL_VEC3                      : 0x8B58,
-BOOL_VEC4                      : 0x8B59,
-FLOAT_MAT2                     : 0x8B5A,
-FLOAT_MAT3                     : 0x8B5B,
-FLOAT_MAT4                     : 0x8B5C,
-SAMPLER_2D                     : 0x8B5E,
-SAMPLER_CUBE                   : 0x8B60,
-    
-    /* Vertex Arrays */
-VERTEX_ATTRIB_ARRAY_ENABLED        : 0x8622,
-VERTEX_ATTRIB_ARRAY_SIZE           : 0x8623,
-VERTEX_ATTRIB_ARRAY_STRIDE         : 0x8624,
-VERTEX_ATTRIB_ARRAY_TYPE           : 0x8625,
-VERTEX_ATTRIB_ARRAY_NORMALIZED     : 0x886A,
-VERTEX_ATTRIB_ARRAY_POINTER        : 0x8645,
-VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F,
-    
-    /* Shader Source */
-COMPILE_STATUS                 : 0x8B81,
-SHADER_COMPILER                : 0x8DFA,
-    
-    /* Shader Precision-Specified Types */
-LOW_FLOAT                      : 0x8DF0,
-MEDIUM_FLOAT                   : 0x8DF1,
-HIGH_FLOAT                     : 0x8DF2,
-LOW_INT                        : 0x8DF3,
-MEDIUM_INT                     : 0x8DF4,
-HIGH_INT                       : 0x8DF5,
-    
-    /* Framebuffer Object. */
-FRAMEBUFFER                    : 0x8D40,
-RENDERBUFFER                   : 0x8D41,
-    
-RGBA4                          : 0x8056,
-RGB5_A1                        : 0x8057,
-RGB565                         : 0x8D62,
-DEPTH_COMPONENT16              : 0x81A5,
-STENCIL_INDEX                  : 0x1901,
-STENCIL_INDEX8                 : 0x8D48,
-DEPTH_STENCIL                  : 0x84F9,
-    
-RENDERBUFFER_WIDTH             : 0x8D42,
-RENDERBUFFER_HEIGHT            : 0x8D43,
-RENDERBUFFER_INTERNAL_FORMAT   : 0x8D44,
-RENDERBUFFER_RED_SIZE          : 0x8D50,
-RENDERBUFFER_GREEN_SIZE        : 0x8D51,
-RENDERBUFFER_BLUE_SIZE         : 0x8D52,
-RENDERBUFFER_ALPHA_SIZE        : 0x8D53,
-RENDERBUFFER_DEPTH_SIZE        : 0x8D54,
-RENDERBUFFER_STENCIL_SIZE      : 0x8D55,
-    
-FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           : 0x8CD0,
-FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           : 0x8CD1,
-FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         : 0x8CD2,
-FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3,
-    
-COLOR_ATTACHMENT0              : 0x8CE0,
-DEPTH_ATTACHMENT               : 0x8D00,
-STENCIL_ATTACHMENT             : 0x8D20,
-DEPTH_STENCIL_ATTACHMENT       : 0x821A,
-    
-NONE                           : 0,
-    
-FRAMEBUFFER_COMPLETE                      : 0x8CD5,
-FRAMEBUFFER_INCOMPLETE_ATTACHMENT         : 0x8CD6,
-FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7,
-FRAMEBUFFER_INCOMPLETE_DIMENSIONS         : 0x8CD9,
-FRAMEBUFFER_UNSUPPORTED                   : 0x8CDD,
-  
-FRAMEBUFFER_BINDING            : 0x8CA6,
-RENDERBUFFER_BINDING           : 0x8CA7,
-MAX_RENDERBUFFER_SIZE          : 0x84E8,
-    
-INVALID_FRAMEBUFFER_OPERATION  : 0x0506,
-
-/* WebGL-specific enums */
-UNPACK_FLIP_Y_WEBGL                : 0x9240,
-UNPACK_PREMULTIPLY_ALPHA_WEBGL     : 0x9241,
-CONTEXT_LOST_WEBGL                 : 0x9242,
-UNPACK_COLORSPACE_CONVERSION_WEBGL : 0x9243,
-BROWSER_DEFAULT_WEBGL              : 0x9244
-};
-
-function assertProperty(v, p) {
-  if (v[p] == null) {
-    testFailed("Property does not exist: " + p)
-    return false;
-  } else {
-    return true;
-  }
-}
-
-function assertMsg_(bool, msg) {
-  if (!bool) // show only failures to avoid spamming result list
-    assertMsg(bool, msg);
-  return bool;
-}
-
-debug("");
-debug("Canvas.getContext");
-
-var canvas = document.getElementById("canvas");
-var gl = create3DContext(canvas);
-var passed = true;
-for (var i in constants) {
-  var r = assertProperty(gl, i) && assertMsg_(gl[i] == constants[i], "Property "+i+" value test "+gl[i]+" == "+constants[i]);
-  passed = passed && r;
-}
-if (passed) {
-  testPassed("All WebGL constants found to have correct values.");
-}
-var extended = false;
-for (var i in gl) {
-  if (i.match(/^[^a-z]/) && constants[i] == null) {
-    if (!extended) {
-      extended = true;
-      debug("Also found the following extra constants:");
-    }
-    debug(i);
-  }
-}
-
-debug("");
-successfullyParsed = true;
-</script>
-<script src="../resources/js-test-post.js"></script>
-
-</body>
-</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/context-attributes-alpha-depth-stencil-antialias.html
+++ /dev/null
@@ -1,245 +0,0 @@
-<!--
-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.
- -->
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-<script id="vshader" type="x-shader/x-vertex">
-attribute vec3 pos;
-attribute vec4 colorIn;
-varying vec4 color;
-
-void main()
-{
-    color = colorIn;
-    gl_Position = vec4(pos.xyz, 1.0);
-}
-</script>
-
-<script id="fshader" type="x-shader/x-fragment">
-precision mediump float;
-
-varying vec4 color;
-
-void main()
-{
-    gl_FragColor = color;
-}
-</script>
-
-<script>
-var successfullyParsed = false;
-
-// These four declarations need to be global for "shouldBe" to see them
-var webGL = null;
-var contextAttribs = null;
-var pixel = [0, 0, 0, 1];
-var correctColor = null;
-var value;
-
-function init()
-{
-    if (window.initNonKhronosFramework) {
-        window.initNonKhronosFramework(true);
-    }
-
-    description('Verify WebGLContextAttributes are working as specified, including alpha, depth, stencil, antialias, but not premultipliedAlpha');
-
-    runTest();
-}
-
-function getWebGL(canvasWidth, canvasHeight, contextAttribs, clearColor, clearDepth, clearStencil)
-{
-    var canvas = document.createElement("canvas");
-    if (!canvas)
-        return null;
-    canvas.width = canvasWidth;
-    canvas.height = canvasHeight;
-
-    var context = create3DContext(canvas, contextAttribs);
-    if (!context)
-        return null;
-
-    context.program = createProgram(context, "vshader", "fshader", ["pos", "colorIn"]);
-    if (!context.program)
-        return null;
-
-    context.useProgram(context.program);
-
-    context.enable(context.DEPTH_TEST);
-    context.enable(context.STENCIL_TEST);
-    context.disable(context.BLEND);
-
-    context.clearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
-    context.clearDepth(clearDepth);
-    context.clearStencil(clearStencil);
-    context.clear(context.COLOR_BUFFER_BIT | context.DEPTH_BUFFER_BIT | context.STENCIL_BUFFER_BIT);
-
-    return context;
-}
-
-function drawAndReadPixel(gl, vertices, colors, x, y)
-{
-    var colorOffset = vertices.byteLength;
-
-    var vbo = gl.createBuffer();
-    gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
-    gl.bufferData(gl.ARRAY_BUFFER, colorOffset + colors.byteLength, gl.STATIC_DRAW);
-    gl.bufferSubData(gl.ARRAY_BUFFER, 0, vertices);
-    gl.bufferSubData(gl.ARRAY_BUFFER, colorOffset, colors);
-
-    gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
-    gl.enableVertexAttribArray(0);
-    gl.vertexAttribPointer(1, 4, gl.UNSIGNED_BYTE, true, 0, colorOffset);
-    gl.enableVertexAttribArray(1);
-
-    gl.drawArrays(gl.TRIANGLES, 0, vertices.length / 3);
-
-    var buf = new Uint8Array(1 * 1 * 4);
-    gl.readPixels(x, y, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf);
-    return buf;
-}
-
-function testAlpha(alpha)
-{
-    debug("Testing alpha = " + alpha);
-    if (alpha)
-        shouldBeNonNull("webGL = getWebGL(1, 1, { alpha: true, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)");
-    else
-        shouldBeNonNull("webGL = getWebGL(1, 1, { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)");
-    shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
-    shouldBeTrue("contextAttribs.alpha == " + alpha);
-
-    var buf = new Uint8Array(1 * 1 * 4);
-    webGL.readPixels(0, 0, 1, 1, webGL.RGBA, webGL.UNSIGNED_BYTE, buf);
-    pixel[0] = buf[0];
-    pixel[1] = buf[1];
-    pixel[2] = buf[2];
-    pixel[3] = buf[3];
-    correctColor = (contextAttribs.alpha ? [0, 0, 0, 0] : [0, 0, 0, 255]);
-    shouldBe("pixel", "correctColor");
-}
-
-function testDepth(depth)
-{
-    debug("Testing depth = " + depth);
-    if (depth)
-        shouldBeNonNull("webGL = getWebGL(1, 1, { stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
-    else
-        shouldBeNonNull("webGL = getWebGL(1, 1, { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
-    shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
-
-    webGL.depthFunc(webGL.NEVER);
-
-    var vertices = new Float32Array([
-         1.0,  1.0, 0.0,
-        -1.0,  1.0, 0.0,
-        -1.0, -1.0, 0.0,
-         1.0,  1.0, 0.0,
-        -1.0, -1.0, 0.0,
-         1.0, -1.0, 0.0]);
-    var colors = new Uint8Array([
-        255, 0, 0, 255,
-        255, 0, 0, 255,
-        255, 0, 0, 255,
-        255, 0, 0, 255,
-        255, 0, 0, 255,
-        255, 0, 0, 255]);
-
-    var buf = drawAndReadPixel(webGL, vertices, colors, 0, 0);
-    pixel[0] = buf[0];
-    pixel[1] = buf[1];
-    pixel[2] = buf[2];
-    pixel[3] = buf[3];
-    correctColor = (contextAttribs.depth ? [0, 0, 0, 255] : [255, 0, 0, 255]);
-    shouldBe("pixel", "correctColor");
-}
-
-function testStencil(stencil)
-{
-    debug("Testing stencil = " + stencil);
-    if (stencil)
-        shouldBeNonNull("webGL = getWebGL(1, 1, { depth: false, stencil: true, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
-    else
-        shouldBeNonNull("webGL = getWebGL(1, 1, { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
-    shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
-
-    webGL.depthFunc(webGL.ALWAYS);
-
-    webGL.stencilFunc(webGL.NEVER, 1, 1);
-    webGL.stencilOp(webGL.KEEP, webGL.KEEP, webGL.KEEP);
-
-    var vertices = new Float32Array([
-         1.0, 1.0, 0.0,
-        -1.0, 1.0, 0.0,
-        -1.0, -1.0, 0.0,
-         1.0, 1.0, 0.0,
-        -1.0, -1.0, 0.0,
-         1.0, -1.0, 0.0]);
-    var colors = new Uint8Array([
-        255, 0, 0, 255,
-        255, 0, 0, 255,
-        255, 0, 0, 255,
-        255, 0, 0, 255,
-        255, 0, 0, 255,
-        255, 0, 0, 255]);
-
-    var buf = drawAndReadPixel(webGL, vertices, colors, 0, 0);
-    pixel[0] = buf[0];
-    pixel[1] = buf[1];
-    pixel[2] = buf[2];
-    pixel[3] = buf[3];
-    correctColor = (contextAttribs.stencil ? [0, 0, 0, 255] : [255, 0, 0, 255]);
-    shouldBe("pixel", "correctColor");
-}
-
-function testAntialias(antialias)
-{
-    debug("Testing antialias = " + antialias);
-    if (antialias)
-        shouldBeNonNull("webGL = getWebGL(2, 2, { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0)");
-    else
-        shouldBeNonNull("webGL = getWebGL(2, 2, { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)");
-    shouldBeNonNull("contextAttribs = webGL.getContextAttributes()");
-
-    var vertices = new Float32Array([
-         1.0, 1.0, 0.0,
-        -1.0, 1.0, 0.0,
-        -1.0, -1.0, 0.0]);
-    var colors = new Uint8Array([
-        255, 0, 0, 255,
-        255, 0, 0, 255,
-        255, 0, 0, 255]);
-    var buf = drawAndReadPixel(webGL, vertices, colors, 0, 0);
-    pixel[0] = buf[0];
-    shouldBe("pixel[0] != 255 && pixel[0] != 0", "contextAttribs.antialias");
-}
-
-function runTest()
-{
-
-    testAlpha(true);
-    testAlpha(false);
-    testDepth(true);
-    testDepth(false);
-    testStencil(true);
-    testStencil(false);
-    testAntialias(true);
-    testAntialias(false);
-
-    finishTest()
-}
-
-</script>
-</head>
-<body onload="init()">
-<div id="description"></div>
-<div id="console"></div>
-</body>
-</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/context-lost-restored.html
+++ /dev/null
@@ -1,180 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-<script src="resources/webgl-test-utils.js"></script>
-<script>
-var wtu = WebGLTestUtils;
-var canvas;
-var gl;
-var shouldGenerateGLError;
-var extension_name = "WEBKIT_lose_context";
-var extension;
-var bufferObjects;
-var program;
-var texture;
-var texColor = [255, 10, 20, 255];
-var allowRestore;
-
-function init()
-{
-    if (window.initNonKhronosFramework) {
-        window.initNonKhronosFramework(true);
-    }
-
-    description("Tests behavior under a restored context.");
-
-    shouldGenerateGLError = wtu.shouldGenerateGLError;
-    runTests();
-}
-
-function runTests()
-{
-    testLosingContext();
-    testLosingAndRestoringContext();
-
-    finish();
-}
-
-function setupTest()
-{
-    canvas = document.createElement("canvas");
-    canvas.width = 1;
-    canvas.height = 1;
-    gl = wtu.create3DContext(canvas);
-    extension = gl.getExtension(extension_name);
-    if (!extension) {
-        debug(extension_name + " extension not found.");
-        return false;
-    }
-    return true;
-}
-
-function testLosingContext()
-{
-    if (!setupTest())
-        return;
-
-    debug("Test losing a context and inability to restore it.");
-
-    canvas.addEventListener("webglcontextlost", testLostContext);
-    canvas.addEventListener("webglcontextrestored", testShouldNotRestoreContext);
-    allowRestore = false;
-
-    testOriginalContext();
-    extension.loseContext();
-    shouldGenerateGLError(gl, gl.INVALID_OPERATION, "extension.restoreContext()");
-    debug("");
-}
-
-function testLosingAndRestoringContext()
-{
-    if (!setupTest())
-        return;
-
-    debug("Test losing and restoring a context.");
-
-    canvas.addEventListener("webglcontextlost", testLostContext);
-    canvas.addEventListener("webglcontextrestored", testRestoredContext);
-    allowRestore = true;
-
-    testOriginalContext();
-    extension.loseContext();
-    shouldGenerateGLError(gl, gl.NO_ERROR, "extension.restoreContext()");
-    debug("");
-}
-
-function testRendering()
-{
-    gl.clearColor(0, 0, 0, 255);
-    gl.colorMask(1, 1, 1, 0);
-    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-
-    program = wtu.setupSimpleTextureProgram(gl);
-    bufferObjects = wtu.setupUnitQuad(gl);
-    texture = wtu.createColoredTexture(gl, canvas.width, canvas.height, texColor);
-
-    gl.uniform1i(gl.getUniformLocation(program, "tex"), 0);
-    wtu.drawQuad(gl, [0, 0, 0, 255]);
-
-    var compare = texColor.slice(0, 3);
-    wtu.checkCanvasRect(gl, 0, 0, canvas.width, canvas.height, compare, "shouldBe " + compare);
-
-    shouldBe("gl.getError()", "gl.NO_ERROR");
-}
-
-function testOriginalContext()
-{
-    debug("Test valid context");
-    shouldBeFalse("gl.isContextLost()");
-    shouldBe("gl.getError()", "gl.NO_ERROR");
-    testRendering();
-    debug("");
-}
-
-function testLostContext(e)
-{
-    debug("Test lost context");
-    shouldBeTrue("gl.isContextLost()");
-    shouldBe("gl.getError()", "gl.CONTEXT_LOST_WEBGL");
-    shouldBe("gl.getError()", "gl.NO_ERROR");
-    debug("");
-    if (allowRestore)
-        e.preventDefault();
-}
-
-function testShouldNotRestoreContext(e)
-{
-    testFailed("Should not restore the context unless preventDefault is called on the context lost event");
-    debug("");
-}
-
-function testResources(expected)
-{
-    var tests = [
-        "gl.bindTexture(gl.TEXTURE_2D, texture)",
-        "gl.useProgram(program)",
-        "gl.bindBuffer(gl.ARRAY_BUFFER, bufferObjects[0])",
-    ];
-
-    for (var i = 0; i < tests.length; ++i)
-        shouldGenerateGLError(gl, expected, tests[i]);
-}
-
-function testRestoredContext()
-{
-    debug("Test restored context");
-    shouldBeFalse("gl.isContextLost()");
-    shouldBe("gl.getError()", "gl.NO_ERROR");
-
-    // Validate that using old resources fails.
-    testResources(gl.INVALID_OPERATION);
-
-    testRendering();
-
-    // Validate new resources created in testRendering().
-    testResources(gl.NO_ERROR);
-    debug("");
-}
-
-function finish() {
-    successfullyParsed = true;
-    var epilogue = document.createElement("script");
-    epilogue.onload = function() {
-        if (window.nonKhronosFrameworkNotifyDone)
-            window.nonKhronosFrameworkNotifyDone();
-    };
-    epilogue.src = "../resources/js-test-post.js";
-    document.body.appendChild(epilogue);
-}
-
-</script>
-</head>
-<body onload="init()">
-<div id="description"></div>
-<div id="console"></div>
-</body>
-</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/context-lost.html
+++ /dev/null
@@ -1,325 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-<script src="resources/webgl-test-utils.js"></script>
-<script>
-var wtu;
-var canvas;
-var gl;
-var shouldGenerateGLError;
-var extension_name = "WEBKIT_lose_context";
-var extension;
-
-var buffer;
-var framebuffer;
-var program;
-var renderbuffer;
-var shader;
-var texture;
-var uniformLocation;
-var arrayBuffer;
-var arrayBufferView
-var image;
-var video;
-var canvas2d;
-var ctx2d;
-var imageData;
-var float32array;
-var int32array;
-
-function init()
-{
-    wtu = WebGLTestUtils;
-    canvas = document.getElementById("canvas");
-    gl = wtu.create3DContext(canvas);
-    shouldGenerateGLError = wtu.shouldGenerateGLError;
-
-    description("Tests behavior under a lost context");
-
-    if (window.initNonKhronosFramework) {
-        window.initNonKhronosFramework(true);
-    }
-
-    // call testValidContext() before checking for the extension, because this is where we check
-    // for the isContextLost() method, which we want to do regardless of the extension's presence.
-    testValidContext();
-
-    extension = gl.getExtension(extension_name);
-    if (!extension) {
-        debug(extension_name + " extension not found.");
-        finish();
-        return;
-    }
-
-    canvas.addEventListener("webglcontextlost", testLostContext, false);
-
-    loseContext();
-}
-
-function loseContext()
-{
-    debug("");
-    debug("Lose context");
-
-    // Note: this will cause the context to be lost, and the
-    // webglcontextlost event listener to be called, immediately.
-    shouldGenerateGLError(gl, gl.NO_ERROR, "extension.loseContext()");
-    debug("");
-}
-
-function testValidContext()
-{
-    debug("Test valid context");
-
-    shouldBeFalse("gl.isContextLost()");
-
-    arrayBuffer = new ArrayBuffer(4);
-    arrayBufferView = new Int8Array(arrayBuffer);
-
-    // Generate resources for testing.
-    buffer = gl.createBuffer();
-    gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
-    framebuffer = gl.createFramebuffer();
-    gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
-    program = wtu.setupSimpleTextureProgram(gl);
-    renderbuffer = gl.createRenderbuffer();
-    gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);
-    shader = gl.createShader(gl.VERTEX_SHADER);
-    texture = gl.createTexture();
-    gl.bindTexture(gl.TEXTURE_2D, texture);
-    shouldBe("gl.getError()", "gl.NO_ERROR");
-
-    // Test is queries that will later be false
-    shouldGenerateGLError(gl, gl.NO_ERROR, "gl.enable(gl.BLEND)");
-    shouldBeTrue("gl.isBuffer(buffer)");
-    shouldBeTrue("gl.isEnabled(gl.BLEND)");
-    shouldBeTrue("gl.isFramebuffer(framebuffer)");
-    shouldBeTrue("gl.isProgram(program)");
-    shouldBeTrue("gl.isRenderbuffer(renderbuffer)");
-    shouldBeTrue("gl.isShader(shader)");
-    shouldBeTrue("gl.isTexture(texture)");
-}
-
-function testLostContext()
-{
-    debug("Test lost context");
-
-    // Functions with special return values.
-    shouldBeTrue("gl.isContextLost()");
-    shouldBe("gl.getError()", "gl.CONTEXT_LOST_WEBGL");
-    shouldBe("gl.getError()", "gl.NO_ERROR");
-    shouldBe("gl.checkFramebufferStatus(gl.FRAMEBUFFER)", "gl.FRAMEBUFFER_UNSUPPORTED");
-    shouldBe("gl.getAttribLocation(program, 'u_modelViewProjMatrix')", "-1");
-    shouldBe("gl.getVertexAttribOffset(0, gl.VERTEX_ATTRIB_ARRAY_POINTER)", "0");
-
-    // Test the extension itself.
-    shouldGenerateGLError(gl, gl.INVALID_OPERATION, "extension.loseContext()");
-
-    image = document.createElement("image");
-    video = document.createElement("video");
-    canvas2d = document.createElement("canvas");
-    ctx2d = canvas2d.getContext("2d");
-    imageData = ctx2d.createImageData(1, 1);
-    float32array = new Float32Array(1);
-    int32array = new Int32Array(1);
-
-    // Functions returning void should return immediately.
-    // This is untestable, but we can at least be sure they cause no errors
-    // and the codepaths are exercised.
-    var voidTests = [
-        "gl.activeTexture(gl.TEXTURE0)",
-        "gl.attachShader(program, shader)",
-        "gl.bindBuffer(gl.ARRAY_BUFFER, buffer)",
-        "gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer)",
-        "gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer)",
-        "gl.bindTexture(gl.TEXTURE_2D, texture)",
-        "gl.blendColor(1.0, 1.0, 1.0, 1.0)",
-        "gl.blendEquation(gl.FUNC_ADD)",
-        "gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD)",
-        "gl.blendFunc(gl.ONE, gl.ONE)",
-        "gl.blendFuncSeparate(gl.ONE, gl.ONE, gl.ONE, gl.ONE)",
-        "gl.bufferData(gl.ARRAY_BUFFER, 0, gl.STATIC_DRAW)",
-        "gl.bufferData(gl.ARRAY_BUFFER, arrayBufferView, gl.STATIC_DRAW)",
-        "gl.bufferData(gl.ARRAY_BUFFER, arrayBuffer, gl.STATIC_DRAW)",
-        "gl.bufferSubData(gl.ARRAY_BUFFRE, 0, arrayBufferView)",
-        "gl.bufferSubData(gl.ARRAY_BUFFRE, 0, arrayBuffer)",
-        "gl.clear(gl.COLOR_BUFFER_BIT)",
-        "gl.clearColor(1, 1, 1, 1)",
-        "gl.clearDepth(1)",
-        "gl.clearStencil(0)",
-        "gl.colorMask(1, 1, 1, 1)",
-        "gl.compileShader(shader)",
-        "gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, 0, 0, 0)",
-        "gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, 0, 0)",
-        "gl.cullFace(gl.FRONT)",
-        "gl.deleteBuffer(buffer)",
-        "gl.deleteFramebuffer(framebuffer)",
-        "gl.deleteProgram(program)",
-        "gl.deleteRenderbuffer(renderbuffer)",
-        "gl.deleteShader(shader)",
-        "gl.deleteTexture(texture)",
-        "gl.depthFunc(gl.NEVER)",
-        "gl.depthMask(0)",
-        "gl.depthRange(0, 1)",
-        "gl.detachShader(program, shader)",
-        "gl.disable(gl.BLEND)",
-        "gl.disableVertexAttribArray(0)",
-        "gl.drawArrays(gl.POINTS, 0, 0)",
-        "gl.drawElements(gl.POINTS, 0, gl.UNSIGNED_SHORT, 0)",
-        "gl.enable(gl.BLEND)",
-        "gl.enableVertexAttribArray(0)",
-        "gl.finish()",
-        "gl.flush()",
-        "gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.RENDERBUFFER, renderbuffer)",
-        "gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0)",
-        "gl.frontFace(gl.CW)",
-        "gl.generateMipmap(gl.TEXTURE_2D)",
-        "gl.hint(gl.GENERATE_MIPMAP_HINT, gl.FASTEST)",
-        "gl.lineWidth(0)",
-        "gl.linkProgram(program)",
-        "gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 0)",
-        "gl.polygonOffset(0, 0)",
-        "gl.readPixels(0, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, arrayBufferView)",
-        "gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA4, 0, 0)",
-        "gl.sampleCoverage(0, 0)",
-        "gl.scissor(0, 0, 0, 0)",
-        "gl.shaderSource(shader, '')",
-        "gl.stencilFunc(gl.NEVER, 0, 0)",
-        "gl.stencilFuncSeparate(gl.FRONT, gl.NEVER, 0, 0)",
-        "gl.stencilMask(0)",
-        "gl.stencilMaskSeparate(gl.FRONT, 0)",
-        "gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP)",
-        "gl.stencilOpSeparate(gl.FRONT, gl.KEEP, gl.KEEP, gl.KEEP)",
-        "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, arrayBufferView)",
-        "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, imageData)",
-        "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image)",
-        "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas)",
-        "gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, video)",
-        "gl.texParameterf(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST)",
-        "gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST)",
-        "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, arrayBufferView)",
-        "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, imageData)",
-        "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, image)",
-        "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, canvas)",
-        "gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, video)",
-        "gl.uniform1f(uniformLocation, 0)",
-        "gl.uniform1fv(uniformLocation, float32array)",
-        "gl.uniform1fv(uniformLocation, [0])",
-        "gl.uniform1i(uniformLocation, 0)",
-        "gl.uniform1iv(uniformLocation, int32array)",
-        "gl.uniform1iv(uniformLocation, [0])",
-        "gl.uniform2f(uniformLocation, 0, 0)",
-        "gl.uniform2fv(uniformLocation, float32array)",
-        "gl.uniform2fv(uniformLocation, [0, 0])",
-        "gl.uniform2i(uniformLocation, 0, 0)",
-        "gl.uniform2iv(uniformLocation, int32array)",
-        "gl.uniform2iv(uniformLocation, [0, 0])",
-        "gl.uniform3f(uniformLocation, 0, 0, 0)",
-        "gl.uniform3fv(uniformLocation, float32array)",
-        "gl.uniform3fv(uniformLocation, [0, 0, 0])",
-        "gl.uniform3i(uniformLocation, 0, 0, 0)",
-        "gl.uniform3iv(uniformLocation, int32array)",
-        "gl.uniform3iv(uniformLocation, [0, 0, 0])",
-        "gl.uniform4f(uniformLocation, 0, 0, 0, 0)",
-        "gl.uniform4fv(uniformLocation, float32array)",
-        "gl.uniform4fv(uniformLocation, [0, 0, 0, 0])",
-        "gl.uniform4i(uniformLocation, 0, 0, 0, 0)",
-        "gl.uniform4iv(uniformLocation, int32array)",
-        "gl.uniform4iv(uniformLocation, [0, 0, 0, 0])",
-        "gl.uniformMatrix2fv(uniformLocation, false, float32array)",
-        "gl.uniformMatrix2fv(uniformLocation, false, [0, 0, 0, 0])",
-        "gl.uniformMatrix3fv(uniformLocation, false, float32array)",
-        "gl.uniformMatrix3fv(uniformLocation, false, [0, 0, 0, 0, 0, 0, 0, 0, 0])",
-        "gl.uniformMatrix4fv(uniformLocation, false, float32array)",
-        "gl.uniformMatrix4fv(uniformLocation, false, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])",
-        "gl.useProgram(program)",
-        "gl.validateProgram(program)",
-        "gl.vertexAttrib1f(0, 0)",
-        "gl.vertexAttrib1fv(0, float32array)",
-        "gl.vertexAttrib1fv(0, [0])",
-        "gl.vertexAttrib2f(0, 0, 0)",
-        "gl.vertexAttrib2fv(0, float32array)",
-        "gl.vertexAttrib2fv(0, [0, 0])",
-        "gl.vertexAttrib3f(0, 0, 0, 0)",
-        "gl.vertexAttrib3fv(0, float32array)",
-        "gl.vertexAttrib3fv(0, [0, 0, 0])",
-        "gl.vertexAttrib4f(0, 0, 0, 0, 0)",
-        "gl.vertexAttrib4fv(0, float32array)",
-        "gl.vertexAttrib4fv(0, [0, 0, 0, 0])",
-        "gl.vertexAttribPointer(0, 0, gl.FLOAT, false, 0, 0)",
-        "gl.viewport(0, 0, 0, 0)",
-    ];
-    for (var i = 0; i < voidTests.length; ++i) {
-        shouldGenerateGLError(gl, gl.NO_ERROR, voidTests[i]);
-    }
-
-    // Functions return nullable values should all return null.
-    var nullTests = [
-        "gl.createBuffer()",
-        "gl.createFramebuffer()",
-        "gl.createProgram()",
-        "gl.createRenderbuffer()",
-        "gl.createShader(gl.GL_VERTEX_SHADER)",
-        "gl.createTexture()",
-        "gl.getActiveAttrib(program, 0)",
-        "gl.getActiveUniform(program, 0)",
-        "gl.getAttachedShaders(program)",
-        "gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE)",
-        "gl.getContextAttributes()",
-        "gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)",
-        "gl.getParameter(gl.CURRENT_PROGRAM)",
-        "gl.getProgramInfoLog(program)",
-        "gl.getProgramParameter(program, gl.LINK_STATUS)",
-        "gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_WIDTH)",
-        "gl.getShaderInfoLog(shader)",
-        "gl.getShaderParameter(shader, gl.SHADER_TYPE)",
-        "gl.getShaderSource(shader)",
-        "gl.getTexParameter(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S)",
-        "gl.getUniform(program, uniformLocation)",
-        "gl.getUniformLocation(program, 'vPosition')",
-        "gl.getVertexAttrib(0, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)",
-        "gl.getSupportedExtensions()",
-        "gl.getExtension('" + extension_name + "')",
-    ];
-    for (var i = 0; i < nullTests.length; ++i) {
-        shouldBeNull(nullTests[i]);
-    }
-
-    // "Is" queries should all return false.
-    shouldBeFalse("gl.isBuffer(buffer)");
-    shouldBeFalse("gl.isEnabled(gl.BLEND)");
-    shouldBeFalse("gl.isFramebuffer(framebuffer)");
-    shouldBeFalse("gl.isProgram(program)");
-    shouldBeFalse("gl.isRenderbuffer(renderbuffer)");
-    shouldBeFalse("gl.isShader(shader)");
-    shouldBeFalse("gl.isTexture(texture)");
-
-    shouldBe("gl.getError()", "gl.NO_ERROR");
-
-    debug("");
-
-    finish();
-}
-
-function finish() {
-    successfullyParsed = true;
-    var epilogue = document.createElement("script");
-    epilogue.onload = function() {
-        if (window.nonKhronosFrameworkNotifyDone)
-            window.nonKhronosFrameworkNotifyDone();
-    };
-    epilogue.src = "../resources/js-test-post.js";
-    document.body.appendChild(epilogue);
-}
-</script>
-</head>
-<body onload="init()">
-<div id="description"></div>
-<div id="console"></div>
-<canvas id="canvas">
-</body>
-</html>
deleted file mode 100644
--- a/content/canvas/test/webgl/conformance/context-type-test.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!--
-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.
- -->
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>WebGL Canvas Conformance Tests</title>
-<link rel="stylesheet" href="../resources/js-test-style.css"/>
-<script src="../resources/desktop-gl-constants.js" type="text/javascript"></script>
-<script src="../resources/js-test-pre.js"></script>
-<script src="resources/webgl-test.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
-<canvas id="canvas2d" width="40" height="40"> </canvas>
-<script>
-description("This test ensures WebGL implementations interact correctly with the canvas tag.");
-
-debug("");
-debug("Canvas.getContext");
-
-assertMsg(window.WebGLRenderingContext,
-          "WebGLRenderingContext should be a member of window");
-assertMsg('WebGLRenderingContext' in window,
-          "WebGLRenderingContext should be 'in' window");
-
-var canvas = document.getElementById("canvas");
-var gl = create3DContext(canvas);
-if (!gl) {
-  testFailed("context does not exist");
-} else {
-  testPassed("context exists");
-
-  debug("Checking context type");
-  assertMsg(gl instanceof WebGLRenderingContext,
-            "context type should be WebGLRenderingContext");
-}
-debug("");
-successfullyParsed = true;
-</script>
-<script src="../resources/js-test-post.js"></script>
-
-</body>
-</html>
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/context/00_test_list.txt
@@ -0,0 +1,10 @@
+constants.html
+context-attributes-alpha-depth-stencil-antialias.html
+context-lost-restored.html
+context-lost.html
+context-type-test.html
+incorrect-context-object-behaviour.html
+methods.html
+premultiplyalpha-test.html
+resource-sharing-test.html
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/webgl/conformance/context/constants.html
@@ -0,0 +1,487 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+Copyright (c) 2011 Ilmari Heikkinen. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+<title>WebGL Constants Test</title>
+<link rel="stylesheet" href="../../resources/js-test-style.css"/>
+<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../resources/webgl-test.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
+<script>
+description("This test ensures that the WebGL context has all the constants in the specification.");
+
+var constants = {
+    /* ClearBufferMask */
+DEPTH_BUFFER_BIT               : 0x00000100,
+STENCIL_BUFFER_BIT             : 0x00000400,
+COLOR_BUFFER_BIT               : 0x00004000,
+    
+    /* BeginMode */
+POINTS                         : 0x0000,
+LINES                          : 0x0001,
+LINE_LOOP                      : 0x0002,
+LINE_STRIP                     : 0x0003,
+TRIANGLES                      : 0x0004,
+TRIANGLE_STRIP                 : 0x0005,
+TRIANGLE_FAN                   : 0x0006,
+    
+    /* AlphaFunction (not supported in ES20) */
+    /*      NEVER */
+    /*      LESS */
+    /*      EQUAL */
+    /*      LEQUAL */
+    /*      GREATER */
+    /*      NOTEQUAL */
+    /*      GEQUAL */
+    /*      ALWAYS */
+    
+    /* BlendingFactorDest */
+ZERO                           : 0,
+ONE                            : 1,
+SRC_COLOR                      : 0x0300,
+ONE_MINUS_SRC_COLOR            : 0x0301,
+SRC_ALPHA                      : 0x0302,
+ONE_MINUS_SRC_ALPHA            : 0x0303,
+DST_ALPHA                      : 0x0304,
+ONE_MINUS_DST_ALPHA            : 0x0305,
+    
+    /* BlendingFactorSrc */
+    /*      ZERO */
+    /*      ONE */
+DST_COLOR                      : 0x0306,
+ONE_MINUS_DST_COLOR            : 0x0307,
+SRC_ALPHA_SATURATE             : 0x0308,
+    /*      SRC_ALPHA */
+    /*      ONE_MINUS_SRC_ALPHA */
+    /*      DST_ALPHA */
+    /*      ONE_MINUS_DST_ALPHA */
+    
+    /* BlendEquationSeparate */
+FUNC_ADD                       : 0x8006,
+BLEND_EQUATION                 : 0x8009,
+BLEND_EQUATION_RGB             : 0x8009,   /* same as BLEND_EQUATION */
+BLEND_EQUATION_ALPHA           : 0x883D,
+    
+    /* BlendSubtract */
+FUNC_SUBTRACT                  : 0x800A,
+FUNC_REVERSE_SUBTRACT          : 0x800B,
+    
+    /* Separate Blend Functions */
+BLEND_DST_RGB                  : 0x80C8,
+BLEND_SRC_RGB                  : 0x80C9,
+BLEND_DST_ALPHA                : 0x80CA,
+BLEND_SRC_ALPHA                : 0x80CB,
+CONSTANT_COLOR                 : 0x8001,
+ONE_MINUS_CONSTANT_COLOR       : 0x8002,
+CONSTANT_ALPHA                 : 0x8003,
+ONE_MINUS_CONSTANT_ALPHA       : 0x8004,
+BLEND_COLOR                    : 0x8005,
+    
+    /* Buffer Objects */
+ARRAY_BUFFER                   : 0x8892,
+ELEMENT_ARRAY_BUFFER           : 0x8893,
+ARRAY_BUFFER_BINDING           : 0x8894,
+ELEMENT_ARRAY_BUFFER_BINDING   : 0x8895,
+    
+STREAM_DRAW                    : 0x88E0,
+STATIC_DRAW                    : 0x88E4,
+DYNAMIC_DRAW                   : 0x88E8,
+    
+BUFFER_SIZE                    : 0x8764,
+BUFFER_USAGE                   : 0x8765,
+    
+CURRENT_VERTEX_ATTRIB          : 0x8626,
+    
+    /* CullFaceMode */
+FRONT                          : 0x0404,
+BACK                           : 0x0405,
+FRONT_AND_BACK                 : 0x0408,
+    
+    /* DepthFunction */
+    /*      NEVER */
+    /*      LESS */
+    /*      EQUAL */
+    /*      LEQUAL */
+    /*      GREATER */
+    /*      NOTEQUAL */
+    /*      GEQUAL */
+    /*      ALWAYS */
+    
+    /* EnableCap */
+    /* TEXTURE_2D */
+CULL_FACE                      : 0x0B44,
+BLEND                          : 0x0BE2,
+DITHER                         : 0x0BD0,
+STENCIL_TEST                   : 0x0B90,
+DEPTH_TEST                     : 0x0B71,
+SCISSOR_TEST                   : 0x0C11,
+POLYGON_OFFSET_FILL            : 0x8037,
+SAMPLE_ALPHA_TO_COVERAGE       : 0x809E,
+SAMPLE_COVERAGE                : 0x80A0,
+    
+    /* ErrorCode */
+NO_ERROR                       : 0,
+INVALID_ENUM                   : 0x0500,
+INVALID_VALUE                  : 0x0501,
+INVALID_OPERATION              : 0x0502,
+OUT_OF_MEMORY                  : 0x0505,
+    
+    /* FrontFaceDirection */
+CW                             : 0x0900,
+CCW                            : 0x0901,
+    
+    /* GetPName */
+LINE_WIDTH                     : 0x0B21,
+ALIASED_POINT_SIZE_RANGE       : 0x846D,
+ALIASED_LINE_WIDTH_RANGE       : 0x846E,
+CULL_FACE_MODE                 : 0x0B45,
+FRONT_FACE                     : 0x0B46,
+DEPTH_RANGE                    : 0x0B70,
+DEPTH_WRITEMASK                : 0x0B72,
+DEPTH_CLEAR_VALUE              : 0x0B73,
+DEPTH_FUNC                     : 0x0B74,
+STENCIL_CLEAR_VALUE            : 0x0B91,
+STENCIL_FUNC                   : 0x0B92,
+STENCIL_FAIL                   : 0x0B94,
+STENCIL_PASS_DEPTH_FAIL        : 0x0B95,
+STENCIL_PASS_DEPTH_PASS        : 0x0B96,
+STENCIL_REF                    : 0x0B97,
+STENCIL_VALUE_MASK             : 0x0B93,
+STENCIL_WRITEMASK              : 0x0B98,
+STENCIL_BACK_FUNC              : 0x8800,
+STENCIL_BACK_FAIL              : 0x8801,
+STENCIL_BACK_PASS_DEPTH_FAIL   : 0x8802,
+STENCIL_BACK_PASS_DEPTH_PASS   : 0x8803,
+STENCIL_BACK_REF               : 0x8CA3,
+STENCIL_BACK_VALUE_MASK        : 0x8CA4,
+STENCIL_BACK_WRITEMASK         : 0x8CA5,
+VIEWPORT                       : 0x0BA2,
+SCISSOR_BOX                    : 0x0C10,
+    /*      SCISSOR_TEST */
+COLOR_CLEAR_VALUE              : 0x0C22,
+COLOR_WRITEMASK                : 0x0C23,
+UNPACK_ALIGNMENT               : 0x0CF5,
+PACK_ALIGNMENT                 : 0x0D05,
+MAX_TEXTURE_SIZE               : 0x0D33,
+MAX_VIEWPORT_DIMS              : 0x0D3A,
+SUBPIXEL_BITS                  : 0x0D50,
+RED_BITS                       : 0x0D52,
+GREEN_BITS                     : 0x0D53,
+BLUE_BITS                      : 0x0D54,
+ALPHA_BITS                     : 0x0D55,
+DEPTH_BITS                     : 0x0D56,
+STENCIL_BITS                   : 0x0D57,
+POLYGON_OFFSET_UNITS           : 0x2A00,
+    /*      POLYGON_OFFSET_FILL */
+POLYGON_OFFSET_FACTOR          : 0x8038,
+TEXTURE_BINDING_2D             : 0x8069,
+SAMPLE_BUFFERS                 : 0x80A8,
+SAMPLES                        : 0x80A9,
+SAMPLE_COVERAGE_VALUE          : 0x80AA,
+SAMPLE_COVERAGE_INVERT         : 0x80AB,
+    
+    /* GetTextureParameter */
+    /*      TEXTURE_MAG_FILTER */
+    /*      TEXTURE_MIN_FILTER */
+    /*      TEXTURE_WRAP_S */
+    /*      TEXTURE_WRAP_T */
+    
+NUM_COMPRESSED_TEXTURE_FORMATS : 0x86A2,
+COMPRESSED_TEXTURE_FORMATS     : 0x86A3,
+    
+    /* HintMode */
+DONT_CARE                      : 0x1100,
+FASTEST                        : 0x1101,
+NICEST                         : 0x1102,
+    
+    /* HintTarget */
+GENERATE_MIPMAP_HINT            : 0x8192,
+    
+    /* DataType */
+BYTE                           : 0x1400,
+UNSIGNED_BYTE                  : 0x1401,
+SHORT                          : 0x1402,
+UNSIGNED_SHORT                 : 0x1403,
+INT                            : 0x1404,
+UNSIGNED_INT                   : 0x1405,
+FLOAT                          : 0x1406,
+    
+    /* PixelFormat */
+DEPTH_COMPONENT                : 0x1902,
+ALPHA                          : 0x1906,
+RGB                            : 0x1907,
+RGBA                           : 0x1908,
+LUMINANCE                      : 0x1909,
+LUMINANCE_ALPHA                : 0x190A,
+    
+    /* PixelType */
+    /*      UNSIGNED_BYTE */
+UNSIGNED_SHORT_4_4_4_4         : 0x8033,
+UNSIGNED_SHORT_5_5_5_1         : 0x8034,
+UNSIGNED_SHORT_5_6_5           : 0x8363,
+    
+    /* Shaders */
+FRAGMENT_SHADER                  : 0x8B30,
+VERTEX_SHADER                    : 0x8B31,
+MAX_VERTEX_ATTRIBS               : 0x8869,
+MAX_VERTEX_UNIFORM_VECTORS       : 0x8DFB,
+MAX_VARYING_VECTORS              : 0x8DFC,
+MAX_COMBINED_TEXTURE_IMAGE_UNITS : 0x8B4D,
+MAX_VERTEX_TEXTURE_IMAGE_UNITS   : 0x8B4C,
+MAX_TEXTURE_IMAGE_UNITS          : 0x8872,
+MAX_FRAGMENT_UNIFORM_VECTORS     : 0x8DFD,
+SHADER_TYPE                      : 0x8B4F,
+DELETE_STATUS                    : 0x8B80,
+LINK_STATUS                      : 0x8B82,
+VALIDATE_STATUS                  : 0x8B83,
+ATTACHED_SHADERS                 : 0x8B85,
+ACTIVE_UNIFORMS                  : 0x8B86,
+ACTIVE_ATTRIBUTES                : 0x8B89,
+SHADING_LANGUAGE_VERSION         : 0x8B8C,
+CURRENT_PROGRAM                  : 0x8B8D,
+    
+    /* StencilFunction */
+NEVER                          : 0x0200,
+LESS                           : 0x0201,
+EQUAL                          : 0x0202,
+LEQUAL                         : 0x0203,
+GREATER                        : 0x0204,
+NOTEQUAL                       : 0x0205,
+GEQUAL                         : 0x0206,
+ALWAYS                         : 0x0207,
+    
+    /* StencilOp */
+    /*      ZERO */
+KEEP                           : 0x1E00,
+REPLACE                        : 0x1E01,
+INCR                           : 0x1E02,
+DECR                           : 0x1E03,
+INVERT                         : 0x150A,
+INCR_WRAP                      : 0x8507,
+DECR_WRAP                      : 0x8508,
+    
+    /* StringName */
+VENDOR                         : 0x1F00,
+RENDERER                       : 0x1F01,
+VERSION                        : 0x1F02,
+    
+    /* TextureMagFilter */
+NEAREST                        : 0x2600,
+LINEAR                         : 0x2601,
+    
+    /* TextureMinFilter */
+    /*      NEAREST */
+    /*      LINEAR */
+NEAREST_MIPMAP_NEAREST         : 0x2700,
+LINEAR_MIPMAP_NEAREST          : 0x2701,
+NEAREST_MIPMAP_LINEAR          : 0x2702,
+LINEAR_MIPMAP_LINEAR           : 0x2703,
+    
+    /* TextureParameterName */
+TEXTURE_MAG_FILTER             : 0x2800,
+TEXTURE_MIN_FILTER             : 0x2801,
+TEXTURE_WRAP_S                 : 0x2802,
+TEXTURE_WRAP_T                 : 0x2803,
+    
+    /* TextureTarget */
+TEXTURE_2D                     : 0x0DE1,
+TEXTURE                        : 0x1702,
+    
+TEXTURE_CUBE_MAP               : 0x8513,
+TEXTURE_BINDING_CUBE_MAP       : 0x8514,
+TEXTURE_CUBE_MAP_POSITIVE_X    : 0x8515,
+TEXTURE_CUBE_MAP_NEGATIVE_X    : 0x8516,
+TEXTURE_CUBE_MAP_POSITIVE_Y    : 0x8517,
+TEXTURE_CUBE_MAP_NEGATIVE_Y    : 0x8518,
+TEXTURE_CUBE_MAP_POSITIVE_Z    : 0x8519,
+TEXTURE_CUBE_MAP_NEGATIVE_Z    : 0x851A,
+MAX_CUBE_MAP_TEXTURE_SIZE      : 0x851C,
+    
+    /* TextureUnit */
+TEXTURE0                       : 0x84C0,
+TEXTURE1                       : 0x84C1,
+TEXTURE2                       : 0x84C2,
+TEXTURE3                       : 0x84C3,
+TEXTURE4                       : 0x84C4,
+TEXTURE5                       : 0x84C5,
+TEXTURE6                       : 0x84C6,
+TEXTURE7                       : 0x84C7,
+TEXTURE8                       : 0x84C8,
+TEXTURE9                       : 0x84C9,
+TEXTURE10                      : 0x84CA,
+TEXTURE11                      : 0x84CB,
+TEXTURE12                      : 0x84CC,
+TEXTURE13                      : 0x84CD,
+TEXTURE14                      : 0x84CE,
+TEXTURE15                      : 0x84CF,
+TEXTURE16                      : 0x84D0,
+TEXTURE17                      : 0x84D1,
+TEXTURE18                      : 0x84D2,
+TEXTURE19                      : 0x84D3,
+TEXTURE20                      : 0x84D4,
+TEXTURE21                      : 0x84D5,
+TEXTURE22                      : 0x84D6,
+TEXTURE23                      : 0x84D7,
+TEXTURE24                      : 0x84D8,
+TEXTURE25                      : 0x84D9,
+TEXTURE26                      : 0x84DA,
+TEXTURE27                      : 0x84DB,
+TEXTURE28                      : 0x84DC,
+TEXTURE29                      : 0x84DD,
+TEXTURE30                      : 0x84DE,
+TEXTURE31                      : 0x84DF,
+ACTIVE_TEXTURE                 : 0x84E0,
+    
+    /* TextureWrapMode */
+REPEAT                         : 0x2901,
+CLAMP_TO_EDGE                  : 0x812F,
+MIRRORED_REPEAT                : 0x8370,
+    
+    /* Uniform Types */
+FLOAT_VEC2                     : 0x8B50,
+FLOAT_VEC3                     : 0x8B51,
+FLOAT_VEC4                     : 0x8B52,
+INT_VEC2                       : 0x8B53,
+INT_VEC3                       : 0x8B54,
+INT_VEC4                       : 0x8B55,
+BOOL                           : 0x8B56,
+BOOL_VEC2                      : 0x8B57,
+BOOL_VEC3                      : 0x8B58,
+BOOL_VEC4                      : 0x8B59,
+FLOAT_MAT2                     : 0x8B5A,
+FLOAT_MAT3                     : 0x8B5B,
+FLOAT_MAT4                     : 0x8B5C,
+SAMPLER_2D                     : 0x8B5E,
+SAMPLER_CUBE                   : 0x8B60,
+    
+    /* Vertex Arrays */
+VERTEX_ATTRIB_ARRAY_ENABLED        : 0x8622,
+VERTEX_ATTRIB_ARRAY_SIZE           : 0x8623,
+VERTEX_ATTRIB_ARRAY_STRIDE         : 0x8624,
+VERTEX_ATTRIB_ARRAY_TYPE           : 0x8625,
+VERTEX_ATTRIB_ARRAY_NORMALIZED     : 0x886A,
+VERTEX_ATTRIB_ARRAY_POINTER        : 0x8645,
+VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F,
+    
+    /* Shader Source */
+COMPILE_STATUS                 : 0x8B81,
+SHADER_COMPILER                : 0x8DFA,
+    
+    /* Shader Precision-Specified Types */
+LOW_FLOAT                      : 0x8DF0,
+MEDIUM_FLOAT                   : 0x8DF1,
+HIGH_FLOAT                     : 0x8DF2,
+LOW_INT                        : 0x8DF3,
+MEDIUM_INT                     : 0x8DF4,
+HIGH_INT                       : 0x8DF5,
+    
+    /* Framebuffer Object. */
+FRAMEBUFFER                    : 0x8D40,
+RENDERBUFFER                   : 0x8D41,
+    
+RGBA4                          : 0x8056,
+RGB5_A1                        : 0x8057,
+RGB565                         : 0x8D62,
+DEPTH_COMPONENT16              : 0x81A5,
+STENCIL_INDEX                  : 0x1901,
+STENCIL_INDEX8                 : 0x8D48,
+DEPTH_STENCIL                  : 0x84F9,
+    
+RENDERBUFFER_WIDTH             : 0x8D42,
+RENDERBUFFER_HEIGHT            : 0x8D43,
+RENDERBUFFER_INTERNAL_FORMAT   : 0x8D44,
+RENDERBUFFER_RED_SIZE          : 0x8D50,
+RENDERBUFFER_GREEN_SIZE        : 0x8D51,
+RENDERBUFFER_BLUE_SIZE         : 0x8D52,
+RENDERBUFFER_ALPHA_SIZE        : 0x8D53,
+RENDERBUFFER_DEPTH_SIZE        : 0x8D54,
+RENDERBUFFER_STENCIL_SIZE      : 0x8D55,
+    
+FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           : 0x8CD0,
+FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           : 0x8CD1,
+FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         : 0x8CD2,
+FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3,
+    
+COLOR_ATTACHMENT0              : 0x8CE0,
+DEPTH_ATTACHMENT               : 0x8D00,
+STENCIL_ATTACHMENT             : 0x8D20,
+DEPTH_STENCIL_ATTACHMENT       : 0x821A,
+    
+NONE                           : 0,
+    
+FRAMEBUFFER_COMPLETE                      : 0x8CD5,
+FRAMEBUFFER_INCOMPLETE_ATTACHMENT         : 0x8CD6,
+FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7,
+FRAMEBUFFER_INCOMPLETE_DIMENSIONS         : 0x8CD9,
+FRAMEBUFFER_UNSUPPORTED                   : 0x8CDD,
+  
+FRAMEBUFFER_BINDING            : 0x8CA6,
+RENDERBUFFER_BINDING           : 0x8CA7,
+MAX_RENDERBUFFER_SIZE          : 0x84E8,
+    
+INVALID_FRAMEBUFFER_OPERATION  : 0x0506,
+
+/* WebGL-specific enums */
+UNPACK_FLIP_Y_WEBGL                : 0x9240,
+UNPACK_PREMULTIPLY_ALPHA_WEBGL     : 0x9241,
+CONTEXT_LOST_WEBGL                 : 0x9242,
+UNPACK_COLORSPACE_CONVERSION_WEBGL : 0x9243,
+BROWSER_DEFAULT_WEBGL              : 0x9244
+};
+
+function assertProperty(v, p) {
+  if (v[p] == null) {
+    testFailed("Property does not exist: " + p)
+    return false;