Add WebGL Conformance Tests more folder.
authorgman@chromium.org <gman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 07:41:10 +0000 (07:41 +0000)
committergman@chromium.org <gman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2013 07:41:10 +0000 (07:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=109118

Reviewed by Kenneth Russell.

* webgl/conformance/more/conformance/constants-expected.txt: Added.
* webgl/conformance/more/conformance/constants.html: Added.
* webgl/conformance/more/conformance/getContext-expected.txt: Added.
* webgl/conformance/more/conformance/getContext.html: Added.
* webgl/conformance/more/conformance/methods-expected.txt: Added.
* webgl/conformance/more/conformance/methods.html: Added.
* webgl/conformance/more/conformance/webGLArrays-expected.txt: Added.
* webgl/conformance/more/conformance/webGLArrays.html: Added.
* webgl/conformance/more/functions/bindBuffer-expected.txt: Added.
* webgl/conformance/more/functions/bindBuffer.html: Added.
* webgl/conformance/more/functions/bindBufferBadArgs-expected.txt: Added.
* webgl/conformance/more/functions/bindBufferBadArgs.html: Added.
* webgl/conformance/more/functions/bindFramebufferLeaveNonZero-expected.txt: Added.
* webgl/conformance/more/functions/bindFramebufferLeaveNonZero.html: Added.
* webgl/conformance/more/functions/bufferData-expected.txt: Added.
* webgl/conformance/more/functions/bufferData.html: Added.
* webgl/conformance/more/functions/bufferSubData-expected.txt: Added.
* webgl/conformance/more/functions/bufferSubData.html: Added.
* webgl/conformance/more/functions/bufferSubDataBadArgs-expected.txt: Added.
* webgl/conformance/more/functions/bufferSubDataBadArgs.html: Added.
* webgl/conformance/more/functions/isTests-expected.txt: Added.
* webgl/conformance/more/functions/isTests.html: Added.
* webgl/conformance/more/functions/isTestsBadArgs-expected.txt: Added.
* webgl/conformance/more/functions/isTestsBadArgs.html: Added.
* webgl/conformance/more/functions/readPixels-expected.txt: Added.
* webgl/conformance/more/functions/readPixels.html: Added.
* webgl/conformance/more/functions/texImage2D-expected.txt: Added.
* webgl/conformance/more/functions/texImage2D.html: Added.
* webgl/conformance/more/functions/texImage2DHTMLBadArgs-expected.txt: Added.
* webgl/conformance/more/functions/texImage2DHTMLBadArgs.html: Added.
* webgl/conformance/more/functions/texSubImage2D-expected.txt: Added.
* webgl/conformance/more/functions/texSubImage2D.html: Added.
* webgl/conformance/more/functions/texSubImage2DHTMLBadArgs-expected.txt: Added.
* webgl/conformance/more/functions/texSubImage2DHTMLBadArgs.html: Added.
* webgl/conformance/more/functions/uniformMatrix-expected.txt: Added.
* webgl/conformance/more/functions/uniformMatrix.html: Added.
* webgl/conformance/more/functions/uniformMatrixBadArgs-expected.txt: Added.
* webgl/conformance/more/functions/uniformMatrixBadArgs.html: Added.
* webgl/conformance/more/functions/uniformf-expected.txt: Added.
* webgl/conformance/more/functions/uniformf.html: Added.
* webgl/conformance/more/functions/uniformfArrayLen1-expected.txt: Added.
* webgl/conformance/more/functions/uniformfArrayLen1.html: Added.
* webgl/conformance/more/functions/uniformfBadArgs-expected.txt: Added.
* webgl/conformance/more/functions/uniformfBadArgs.html: Added.
* webgl/conformance/more/functions/uniformi-expected.txt: Added.
* webgl/conformance/more/functions/uniformi.html: Added.
* webgl/conformance/more/functions/uniformiBadArgs-expected.txt: Added.
* webgl/conformance/more/functions/uniformiBadArgs.html: Added.
* webgl/conformance/more/functions/vertexAttrib-expected.txt: Added.
* webgl/conformance/more/functions/vertexAttrib.html: Added.
* webgl/conformance/more/functions/vertexAttribBadArgs-expected.txt: Added.
* webgl/conformance/more/functions/vertexAttribBadArgs.html: Added.
* webgl/conformance/more/functions/vertexAttribPointer-expected.txt: Added.
* webgl/conformance/more/functions/vertexAttribPointer.html: Added.
* webgl/conformance/more/functions/vertexAttribPointerBadArgs-expected.txt: Added.
* webgl/conformance/more/functions/vertexAttribPointerBadArgs.html: Added.
* webgl/conformance/more/glsl/arrayOutOfBounds-expected.txt: Added.
* webgl/conformance/more/glsl/arrayOutOfBounds.html: Added.
* webgl/conformance/more/glsl/uniformOutOfBounds-expected.txt: Added.
* webgl/conformance/more/glsl/uniformOutOfBounds.html: Added.
* webgl/resources/webgl_test_files/conformance/more/00_test_list.txt: Added.
* webgl/resources/webgl_test_files/conformance/more/README.md: Added.
* webgl/resources/webgl_test_files/conformance/more/all_tests.html: Added.
* webgl/resources/webgl_test_files/conformance/more/all_tests_linkonly.html: Added.
* webgl/resources/webgl_test_files/conformance/more/all_tests_sequential.html: Added.
* webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-A.js: Added.
(ArgGenerators.activeTexture.generate):
(ArgGenerators.activeTexture.checkArgValidity):
(ArgGenerators.activeTexture.teardown):
(ArgGenerators.attachShader.generate):
(ArgGenerators.attachShader.checkArgValidity):
(ArgGenerators.attachShader.cleanup):
* webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B1.js: Added.
(ArgGenerators.bindAttribLocation.generate):
(ArgGenerators.bindAttribLocation.checkArgValidity):
(ArgGenerators.bindAttribLocation.cleanup):
* webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B2.js: Added.
(ArgGenerators.bindBuffer.generate):
(ArgGenerators.bindBuffer.checkArgValidity):
(ArgGenerators.bindBuffer.cleanup):
(ArgGenerators.bindFramebuffer.generate):
(ArgGenerators.bindFramebuffer.checkArgValidity):
(ArgGenerators.bindFramebuffer.cleanup):
(ArgGenerators.bindRenderbuffer.generate):
(ArgGenerators.bindRenderbuffer.checkArgValidity):
(ArgGenerators.bindRenderbuffer.cleanup):
(ArgGenerators.bindTexture.generate):
(ArgGenerators.bindTexture.checkArgValidity):
(ArgGenerators.bindTexture.cleanup):
(ArgGenerators.blendColor.generate):
(ArgGenerators.blendColor.teardown):
(ArgGenerators.blendEquation.generate):
(ArgGenerators.blendEquation.checkArgValidity):
(ArgGenerators.blendEquation.teardown):
(ArgGenerators.blendEquationSeparate.generate):
(ArgGenerators.blendEquationSeparate.checkArgValidity):
(ArgGenerators.blendEquationSeparate.teardown):
(ArgGenerators.blendFunc.generate):
(ArgGenerators.blendFunc.checkArgValidity):
(ArgGenerators.blendFunc.teardown):
(ArgGenerators.blendFuncSeparate.generate):
(ArgGenerators.blendFuncSeparate.checkArgValidity):
(ArgGenerators.blendFuncSeparate.teardown):
* webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B3.js: Added.
(ArgGenerators.bufferData.setup):
(ArgGenerators.bufferData.generate):
(ArgGenerators.bufferData.checkArgValidity):
(ArgGenerators.bufferData.teardown):
* webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B4.js: Added.
(ArgGenerators.bufferSubData.setup):
(ArgGenerators.bufferSubData.generate):
(ArgGenerators.bufferSubData.checkArgValidity):
(ArgGenerators.bufferSubData.teardown):
* webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-C.js: Added.
(ArgGenerators.checkFramebufferStatus.generate):
(ArgGenerators.checkFramebufferStatus.checkArgValidity):
(ArgGenerators.checkFramebufferStatus.cleanup):
(ArgGenerators.clear.generate):
(ArgGenerators.clear.checkArgValidity):
(ArgGenerators.clearColor.generate):
(ArgGenerators.clearColor.teardown):
(ArgGenerators.clearDepth.generate):
(ArgGenerators.clearDepth.teardown):
(ArgGenerators.clearStencil.generate):
(ArgGenerators.clearStencil.teardown):
(ArgGenerators.colorMask.generate):
(ArgGenerators.colorMask.teardown):
(ArgGenerators.createBuffer.generate):
(ArgGenerators.createBuffer.returnValueCleanup):
(ArgGenerators.createFramebuffer.generate):
(ArgGenerators.createFramebuffer.returnValueCleanup):
(ArgGenerators.createProgram.generate):
(ArgGenerators.createProgram.returnValueCleanup):
(ArgGenerators.createRenderbuffer.generate):
(ArgGenerators.createRenderbuffer.returnValueCleanup):
(ArgGenerators.createShader.generate):
(ArgGenerators.createShader.checkArgValidity):
(ArgGenerators.createShader.returnValueCleanup):
(ArgGenerators.createTexture.generate):
(ArgGenerators.createTexture.returnValueCleanup):
(ArgGenerators.cullFace.generate):
(ArgGenerators.cullFace.checkArgValidity):
(ArgGenerators.cullFace.teardown):
* webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-D_G.js: Added.
(ArgGenerators.deleteBuffer.generate):
(ArgGenerators.deleteBuffer.checkArgValidity):
(ArgGenerators.deleteBuffer.cleanup):
(ArgGenerators.deleteFramebuffer.generate):
(ArgGenerators.deleteFramebuffer.checkArgValidity):
(ArgGenerators.deleteFramebuffer.cleanup):
(ArgGenerators.deleteProgram.generate):
(ArgGenerators.deleteProgram.checkArgValidity):
(ArgGenerators.deleteProgram.cleanup):
(ArgGenerators.deleteRenderbuffer.generate):
(ArgGenerators.deleteRenderbuffer.checkArgValidity):
(ArgGenerators.deleteRenderbuffer.cleanup):
(ArgGenerators.deleteShader.generate):
(ArgGenerators.deleteShader.checkArgValidity):
(ArgGenerators.deleteShader.cleanup):
(ArgGenerators.deleteTexture.generate):
(ArgGenerators.deleteTexture.checkArgValidity):
(ArgGenerators.deleteTexture.cleanup):
(ArgGenerators.depthFunc.generate):
(ArgGenerators.depthFunc.checkArgValidity):
(ArgGenerators.depthFunc.teardown):
(ArgGenerators.depthMask.generate):
(ArgGenerators.depthMask.teardown):
(ArgGenerators.depthRange.generate):
(ArgGenerators.depthRange.teardown):
(ArgGenerators.detachShader.generate):
(ArgGenerators.detachShader.checkArgValidity):
(ArgGenerators.detachShader.cleanup):
(ArgGenerators.disable.generate):
(ArgGenerators.disable.checkArgValidity):
(ArgGenerators.disable.cleanup):
(ArgGenerators.disableVertexAttribArray.generate):
(ArgGenerators.disableVertexAttribArray.checkArgValidity):
(ArgGenerators.enable.generate):
(ArgGenerators.enable.checkArgValidity):
(ArgGenerators.enable.cleanup):
(ArgGenerators.enableVertexAttribArray.generate):
(ArgGenerators.enableVertexAttribArray.checkArgValidity):
(ArgGenerators.enableVertexAttribArray.cleanup):
(ArgGenerators.finish.generate):
(ArgGenerators.flush.generate):
(ArgGenerators.frontFace.generate):
(ArgGenerators.frontFace.checkArgValidity):
(ArgGenerators.frontFace.cleanup):
(ArgGenerators.generateMipmap.setup):
(ArgGenerators.generateMipmap.generate):
(ArgGenerators.generateMipmap.checkArgValidity):
(ArgGenerators.generateMipmap.teardown):
(ArgGenerators.getAttachedShaders.setup):
(ArgGenerators.getAttachedShaders.generate):
(ArgGenerators.getAttachedShaders.checkArgValidity):
(ArgGenerators.getAttachedShaders.teardown):
* webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-G_I.js: Added.
(ArgGenerators.getAttribLocation.generate):
(ArgGenerators.getAttribLocation.checkArgValidity):
(ArgGenerators.getAttribLocation.cleanup):
* webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-L_S.js: Added.
(ArgGenerators.lineWidth.generate):
(ArgGenerators.lineWidth.teardown):
(ArgGenerators.pixelStorei.generate):
(ArgGenerators.pixelStorei.checkArgValidity):
(ArgGenerators.pixelStorei.teardown):
(ArgGenerators.polygonOffset.generate):
(ArgGenerators.polygonOffset.teardown):
(ArgGenerators.sampleCoverage.generate):
(ArgGenerators.sampleCoverage.teardown):
(ArgGenerators.scissor.generate):
(ArgGenerators.scissor.checkArgValidity):
(ArgGenerators.scissor.teardown):
(ArgGenerators.stencilFunc.generate):
(ArgGenerators.stencilFunc.checkArgValidity):
(ArgGenerators.stencilFunc.teardown):
(ArgGenerators.stencilFuncSeparate.generate):
(ArgGenerators.stencilFuncSeparate.checkArgValidity):
(ArgGenerators.stencilFuncSeparate.teardown):
(ArgGenerators.stencilMask.generate):
(ArgGenerators.stencilMask.teardown):
* webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-S_V.js: Added.
(ArgGenerators.stencilMaskSeparate.generate):
(ArgGenerators.stencilMaskSeparate.checkArgValidity):
(ArgGenerators.stencilMaskSeparate.teardown):
(ArgGenerators.stencilOp.generate):
(ArgGenerators.stencilOp.checkArgValidity):
(ArgGenerators.stencilOp.teardown):
(ArgGenerators.stencilOpSeparate.generate):
(ArgGenerators.stencilOpSeparate.checkArgValidity):
(ArgGenerators.stencilOpSeparate.teardown):
(ArgGenerators.texImage2D.setup):
(ArgGenerators.texImage2D.generate):
(ArgGenerators.texImage2D.checkArgValidity):
(ArgGenerators.texImage2D.teardown):
(ArgGenerators.texParameterf.generate):
(ArgGenerators.texParameterf.checkArgValidity):
(ArgGenerators.texParameteri.generate):
(ArgGenerators.texParameteri.checkArgValidity):
(ArgGenerators.viewport.generate):
(ArgGenerators.viewport.checkArgValidity):
(ArgGenerators.viewport.teardown):
* webgl/resources/webgl_test_files/conformance/more/conformance/badArgsArityLessThanArgc.html: Added.
* webgl/resources/webgl_test_files/conformance/more/conformance/constants.html: Added.
* webgl/resources/webgl_test_files/conformance/more/conformance/fuzzTheAPI.html: Added.
* webgl/resources/webgl_test_files/conformance/more/conformance/getContext.html: Added.
* webgl/resources/webgl_test_files/conformance/more/conformance/methods.html: Added.
* webgl/resources/webgl_test_files/conformance/more/conformance/quickCheckAPI.js: Added.
(Array.from):
(Array.prototype.has):
(Array.prototype.random):
(castToInt):
(constCheck.a.has):
(constCheck):
(isBufferData):
(isVertexAttribute):
(isValidName):
(randomWebGLArray):
(randomArrayBuffer):
(randomBufferData):
(randomSmallWebGLArray):
(randomBufferSubData):
(randomColor):
(randomName):
(randomVertexAttribute):
(randomBool):
(randomStencil):
(randomLineWidth):
(randomImage):
(mutateArgs):
(argGeneratorTestRunner):
* webgl/resources/webgl_test_files/conformance/more/conformance/quickCheckAPIBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/conformance/webGLArrays.html: Added.
* webgl/resources/webgl_test_files/conformance/more/demos/opengl_web.html: Added.
* webgl/resources/webgl_test_files/conformance/more/demos/video.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/bindBuffer.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/bindBufferBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/bindFramebufferLeaveNonZero.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/bufferData.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/bufferSubData.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/bufferSubDataBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/isTests.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/isTestsBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/readPixels.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/texImage2D.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/texImage2DHTMLBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/texSubImage2D.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/texSubImage2DHTMLBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/uniformMatrix.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/uniformf.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/uniformfArrayLen1.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/uniformfBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/uniformi.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/uniformiBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/vertexAttrib.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/vertexAttribBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/vertexAttribPointer.html: Added.
* webgl/resources/webgl_test_files/conformance/more/functions/vertexAttribPointerBadArgs.html: Added.
* webgl/resources/webgl_test_files/conformance/more/glsl/arrayOutOfBounds.html: Added.
* webgl/resources/webgl_test_files/conformance/more/glsl/longLoops.html: Added.
* webgl/resources/webgl_test_files/conformance/more/glsl/uniformOutOfBounds.html: Added.
* webgl/resources/webgl_test_files/conformance/more/glsl/unusedAttribsUniforms.html: Added.
* webgl/resources/webgl_test_files/conformance/more/index.html: Added.
* webgl/resources/webgl_test_files/conformance/more/performance/CPUvsGPU.html: Added.
* webgl/resources/webgl_test_files/conformance/more/performance/bandwidth.html: Added.
* webgl/resources/webgl_test_files/conformance/more/performance/jsGCPause.html: Added.
* webgl/resources/webgl_test_files/conformance/more/performance/jsMatrixMult.html: Added.
* webgl/resources/webgl_test_files/conformance/more/performance/jsToGLOverhead.html: Added.
* webgl/resources/webgl_test_files/conformance/more/unit.css: Added.
(.ok):
(.fail):
(canvas):
(#test-status):
(#test-log):
(#test-log > div):
(#test-log h2):
(#test-log h3):
(#test-log p):
* webgl/resources/webgl_test_files/conformance/more/unit.js: Added.
(.window.console.log):
(.window.console.error):
(Tests.startUnit):
(Tests.setup):
(Tests.teardown):
(Tests.endUnit):
(.):
(Object.toSource):
* webgl/resources/webgl_test_files/conformance/more/util.js: Added.
(loadTexture):
(getShader):
(loadShaderArray):
(loadShader):
(getGLErrorAsString):
(checkError):
(throwError):
(Math.cot):
(Matrix.newIdentity):
(Matrix.newIdentity3x3):
(Matrix.copyMatrix):
(Matrix.to3x3):
(Matrix.inverseON):
(Matrix.inverseTo3x3):
(Matrix.inverseTo3x3InPlace):
(Matrix.inverse3x3):
(Matrix.inverse3x3InPlace):
(Matrix.frustum):
(Matrix.perspective):
(Matrix.mul4x4):
(Matrix.mul4x4InPlace):
(Matrix.mulv4):
(Matrix.rotate):
(Matrix.rotateInPlace):
(Matrix.scale):
(Matrix.scale3):
(Matrix.scale1):
(Matrix.scale3InPlace):
(Matrix.scale1InPlace):
(Matrix.scaleInPlace):
(Matrix.translate3):
(Matrix.translate):
(Matrix.translate3InPlace):
(Matrix.translateInPlace):
(Matrix.lookAt):
(Matrix.transpose4x4):
(Matrix.transpose4x4InPlace):
(Matrix.transpose3x3):
(Matrix.transpose3x3InPlace):
(Vec3.make):
(Vec3.copy):
(Vec3.add):
(Vec3.sub):
(Vec3.negate):
(Vec3.direction):
(Vec3.normalizeInPlace):
(Vec3.normalize):
(Vec3.scale):
(Vec3.dot):
(Vec3.inner):
(Vec3.cross):
(Shader):
(Shader.prototype.destroy):
(Shader.prototype.compile):
(Shader.prototype.use):
(Shader.prototype.uniform1fv):
(Shader.prototype.uniform2fv):
(Shader.prototype.uniform3fv):
(Shader.prototype.uniform4fv):
(Shader.prototype.uniform1f):
(Shader.prototype.uniform2f):
(Shader.prototype.uniform3f):
(Shader.prototype.uniform4f):
(Shader.prototype.uniform1iv):
(Shader.prototype.uniform2iv):
(Shader.prototype.uniform3iv):
(Shader.prototype.uniform4iv):
(Shader.prototype.uniform1i):
(Shader.prototype.uniform2i):
(Shader.prototype.uniform3i):
(Shader.prototype.uniform4i):
(Shader.prototype.uniformMatrix4fv):
(Shader.prototype.uniformMatrix3fv):
(Shader.prototype.uniformMatrix2fv):
(Shader.prototype.attrib):
(Shader.prototype.uniform):
(Filter):
(Filter.prototype.apply):
(VBO):
(VBO.prototype.setData):
(VBO.prototype.destroy):
(VBO.prototype.init):
(VBO.prototype.use):
(VBO.prototype.draw):
(FBO):
(FBO.prototype.destroy):
(FBO.prototype.init):
(FBO.prototype.getTempCanvas):
(FBO.prototype.use):
(GLError):
(makeGLErrorWrapper):
(wrapGLContext.wrap.getError):
(getGLContext):
(assertSomeGLError):
(assertThrowNoGLError):
(Quad.makeVBO):
(.gl):
(Quad.getCachedVBO):
(deleteShader):
(Cube.create):
(Cube.makeVBO):
(Cube.getCachedVBO):
(Sphere.create.vert):
(Sphere.create):
(initGL_CONTEXT_ID):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142854 268f45cc-cd09-0410-ab3c-d52691b4dbfc

123 files changed:
LayoutTests/ChangeLog
LayoutTests/webgl/conformance/more/conformance/constants-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/conformance/constants.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/conformance/getContext-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/conformance/getContext.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/conformance/methods-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/conformance/methods.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/conformance/webGLArrays-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/conformance/webGLArrays.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bindBuffer-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bindBuffer.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bindBufferBadArgs-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bindBufferBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bindFramebufferLeaveNonZero-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bindFramebufferLeaveNonZero.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bufferData-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bufferData.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bufferSubData-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bufferSubData.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bufferSubDataBadArgs-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/bufferSubDataBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/isTests-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/isTests.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/isTestsBadArgs-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/isTestsBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/readPixels-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/readPixels.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/texImage2D-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/texImage2D.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/texImage2DHTMLBadArgs-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/texImage2DHTMLBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/texSubImage2D-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/texSubImage2D.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/texSubImage2DHTMLBadArgs-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/texSubImage2DHTMLBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformMatrix-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformMatrix.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformMatrixBadArgs-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformMatrixBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformf-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformf.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformfArrayLen1-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformfArrayLen1.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformfBadArgs-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformfBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformi-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformi.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformiBadArgs-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/uniformiBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/vertexAttrib-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/vertexAttrib.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/vertexAttribBadArgs-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/vertexAttribBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/vertexAttribPointer-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/vertexAttribPointer.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/vertexAttribPointerBadArgs-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/functions/vertexAttribPointerBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/glsl/arrayOutOfBounds-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/glsl/arrayOutOfBounds.html [new file with mode: 0644]
LayoutTests/webgl/conformance/more/glsl/uniformOutOfBounds-expected.txt [new file with mode: 0644]
LayoutTests/webgl/conformance/more/glsl/uniformOutOfBounds.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/00_test_list.txt [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/README.md [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/all_tests.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/all_tests_linkonly.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/all_tests_sequential.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-A.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B1.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B2.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B3.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B4.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-C.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-D_G.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-G_I.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-L_S.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-S_V.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/badArgsArityLessThanArgc.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/constants.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/fuzzTheAPI.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/getContext.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/methods.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/quickCheckAPI.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/quickCheckAPIBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/webGLArrays.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/demos/opengl_web.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/demos/video.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bindBuffer.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bindBufferBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bindFramebufferLeaveNonZero.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bufferData.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bufferSubData.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bufferSubDataBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/isTests.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/isTestsBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/readPixels.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texImage2D.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texImage2DHTMLBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texSubImage2D.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texSubImage2DHTMLBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/uniformMatrix.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/uniformf.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/uniformfArrayLen1.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/uniformfBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/uniformi.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/uniformiBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/vertexAttrib.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/vertexAttribBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/vertexAttribPointer.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/vertexAttribPointerBadArgs.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/glsl/arrayOutOfBounds.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/glsl/longLoops.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/glsl/uniformOutOfBounds.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/glsl/unusedAttribsUniforms.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/index.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/performance/CPUvsGPU.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/performance/bandwidth.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/performance/jsGCPause.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/performance/jsMatrixMult.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/performance/jsToGLOverhead.html [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/unit.css [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/unit.js [new file with mode: 0644]
LayoutTests/webgl/resources/webgl_test_files/conformance/more/util.js [new file with mode: 0644]

index a8aaf92..95511ff 100644 (file)
@@ -1,5 +1,447 @@
 2013-02-06  Gregg Tavares  <gman@chromium.org>
 
+        Add WebGL Conformance Tests more folder.
+        https://bugs.webkit.org/show_bug.cgi?id=109118
+
+        Reviewed by Kenneth Russell.
+
+        * webgl/conformance/more/conformance/constants-expected.txt: Added.
+        * webgl/conformance/more/conformance/constants.html: Added.
+        * webgl/conformance/more/conformance/getContext-expected.txt: Added.
+        * webgl/conformance/more/conformance/getContext.html: Added.
+        * webgl/conformance/more/conformance/methods-expected.txt: Added.
+        * webgl/conformance/more/conformance/methods.html: Added.
+        * webgl/conformance/more/conformance/webGLArrays-expected.txt: Added.
+        * webgl/conformance/more/conformance/webGLArrays.html: Added.
+        * webgl/conformance/more/functions/bindBuffer-expected.txt: Added.
+        * webgl/conformance/more/functions/bindBuffer.html: Added.
+        * webgl/conformance/more/functions/bindBufferBadArgs-expected.txt: Added.
+        * webgl/conformance/more/functions/bindBufferBadArgs.html: Added.
+        * webgl/conformance/more/functions/bindFramebufferLeaveNonZero-expected.txt: Added.
+        * webgl/conformance/more/functions/bindFramebufferLeaveNonZero.html: Added.
+        * webgl/conformance/more/functions/bufferData-expected.txt: Added.
+        * webgl/conformance/more/functions/bufferData.html: Added.
+        * webgl/conformance/more/functions/bufferSubData-expected.txt: Added.
+        * webgl/conformance/more/functions/bufferSubData.html: Added.
+        * webgl/conformance/more/functions/bufferSubDataBadArgs-expected.txt: Added.
+        * webgl/conformance/more/functions/bufferSubDataBadArgs.html: Added.
+        * webgl/conformance/more/functions/isTests-expected.txt: Added.
+        * webgl/conformance/more/functions/isTests.html: Added.
+        * webgl/conformance/more/functions/isTestsBadArgs-expected.txt: Added.
+        * webgl/conformance/more/functions/isTestsBadArgs.html: Added.
+        * webgl/conformance/more/functions/readPixels-expected.txt: Added.
+        * webgl/conformance/more/functions/readPixels.html: Added.
+        * webgl/conformance/more/functions/texImage2D-expected.txt: Added.
+        * webgl/conformance/more/functions/texImage2D.html: Added.
+        * webgl/conformance/more/functions/texImage2DHTMLBadArgs-expected.txt: Added.
+        * webgl/conformance/more/functions/texImage2DHTMLBadArgs.html: Added.
+        * webgl/conformance/more/functions/texSubImage2D-expected.txt: Added.
+        * webgl/conformance/more/functions/texSubImage2D.html: Added.
+        * webgl/conformance/more/functions/texSubImage2DHTMLBadArgs-expected.txt: Added.
+        * webgl/conformance/more/functions/texSubImage2DHTMLBadArgs.html: Added.
+        * webgl/conformance/more/functions/uniformMatrix-expected.txt: Added.
+        * webgl/conformance/more/functions/uniformMatrix.html: Added.
+        * webgl/conformance/more/functions/uniformMatrixBadArgs-expected.txt: Added.
+        * webgl/conformance/more/functions/uniformMatrixBadArgs.html: Added.
+        * webgl/conformance/more/functions/uniformf-expected.txt: Added.
+        * webgl/conformance/more/functions/uniformf.html: Added.
+        * webgl/conformance/more/functions/uniformfArrayLen1-expected.txt: Added.
+        * webgl/conformance/more/functions/uniformfArrayLen1.html: Added.
+        * webgl/conformance/more/functions/uniformfBadArgs-expected.txt: Added.
+        * webgl/conformance/more/functions/uniformfBadArgs.html: Added.
+        * webgl/conformance/more/functions/uniformi-expected.txt: Added.
+        * webgl/conformance/more/functions/uniformi.html: Added.
+        * webgl/conformance/more/functions/uniformiBadArgs-expected.txt: Added.
+        * webgl/conformance/more/functions/uniformiBadArgs.html: Added.
+        * webgl/conformance/more/functions/vertexAttrib-expected.txt: Added.
+        * webgl/conformance/more/functions/vertexAttrib.html: Added.
+        * webgl/conformance/more/functions/vertexAttribBadArgs-expected.txt: Added.
+        * webgl/conformance/more/functions/vertexAttribBadArgs.html: Added.
+        * webgl/conformance/more/functions/vertexAttribPointer-expected.txt: Added.
+        * webgl/conformance/more/functions/vertexAttribPointer.html: Added.
+        * webgl/conformance/more/functions/vertexAttribPointerBadArgs-expected.txt: Added.
+        * webgl/conformance/more/functions/vertexAttribPointerBadArgs.html: Added.
+        * webgl/conformance/more/glsl/arrayOutOfBounds-expected.txt: Added.
+        * webgl/conformance/more/glsl/arrayOutOfBounds.html: Added.
+        * webgl/conformance/more/glsl/uniformOutOfBounds-expected.txt: Added.
+        * webgl/conformance/more/glsl/uniformOutOfBounds.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/00_test_list.txt: Added.
+        * webgl/resources/webgl_test_files/conformance/more/README.md: Added.
+        * webgl/resources/webgl_test_files/conformance/more/all_tests.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/all_tests_linkonly.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/all_tests_sequential.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-A.js: Added.
+        (ArgGenerators.activeTexture.generate):
+        (ArgGenerators.activeTexture.checkArgValidity):
+        (ArgGenerators.activeTexture.teardown):
+        (ArgGenerators.attachShader.generate):
+        (ArgGenerators.attachShader.checkArgValidity):
+        (ArgGenerators.attachShader.cleanup):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B1.js: Added.
+        (ArgGenerators.bindAttribLocation.generate):
+        (ArgGenerators.bindAttribLocation.checkArgValidity):
+        (ArgGenerators.bindAttribLocation.cleanup):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B2.js: Added.
+        (ArgGenerators.bindBuffer.generate):
+        (ArgGenerators.bindBuffer.checkArgValidity):
+        (ArgGenerators.bindBuffer.cleanup):
+        (ArgGenerators.bindFramebuffer.generate):
+        (ArgGenerators.bindFramebuffer.checkArgValidity):
+        (ArgGenerators.bindFramebuffer.cleanup):
+        (ArgGenerators.bindRenderbuffer.generate):
+        (ArgGenerators.bindRenderbuffer.checkArgValidity):
+        (ArgGenerators.bindRenderbuffer.cleanup):
+        (ArgGenerators.bindTexture.generate):
+        (ArgGenerators.bindTexture.checkArgValidity):
+        (ArgGenerators.bindTexture.cleanup):
+        (ArgGenerators.blendColor.generate):
+        (ArgGenerators.blendColor.teardown):
+        (ArgGenerators.blendEquation.generate):
+        (ArgGenerators.blendEquation.checkArgValidity):
+        (ArgGenerators.blendEquation.teardown):
+        (ArgGenerators.blendEquationSeparate.generate):
+        (ArgGenerators.blendEquationSeparate.checkArgValidity):
+        (ArgGenerators.blendEquationSeparate.teardown):
+        (ArgGenerators.blendFunc.generate):
+        (ArgGenerators.blendFunc.checkArgValidity):
+        (ArgGenerators.blendFunc.teardown):
+        (ArgGenerators.blendFuncSeparate.generate):
+        (ArgGenerators.blendFuncSeparate.checkArgValidity):
+        (ArgGenerators.blendFuncSeparate.teardown):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B3.js: Added.
+        (ArgGenerators.bufferData.setup):
+        (ArgGenerators.bufferData.generate):
+        (ArgGenerators.bufferData.checkArgValidity):
+        (ArgGenerators.bufferData.teardown):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B4.js: Added.
+        (ArgGenerators.bufferSubData.setup):
+        (ArgGenerators.bufferSubData.generate):
+        (ArgGenerators.bufferSubData.checkArgValidity):
+        (ArgGenerators.bufferSubData.teardown):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-C.js: Added.
+        (ArgGenerators.checkFramebufferStatus.generate):
+        (ArgGenerators.checkFramebufferStatus.checkArgValidity):
+        (ArgGenerators.checkFramebufferStatus.cleanup):
+        (ArgGenerators.clear.generate):
+        (ArgGenerators.clear.checkArgValidity):
+        (ArgGenerators.clearColor.generate):
+        (ArgGenerators.clearColor.teardown):
+        (ArgGenerators.clearDepth.generate):
+        (ArgGenerators.clearDepth.teardown):
+        (ArgGenerators.clearStencil.generate):
+        (ArgGenerators.clearStencil.teardown):
+        (ArgGenerators.colorMask.generate):
+        (ArgGenerators.colorMask.teardown):
+        (ArgGenerators.createBuffer.generate):
+        (ArgGenerators.createBuffer.returnValueCleanup):
+        (ArgGenerators.createFramebuffer.generate):
+        (ArgGenerators.createFramebuffer.returnValueCleanup):
+        (ArgGenerators.createProgram.generate):
+        (ArgGenerators.createProgram.returnValueCleanup):
+        (ArgGenerators.createRenderbuffer.generate):
+        (ArgGenerators.createRenderbuffer.returnValueCleanup):
+        (ArgGenerators.createShader.generate):
+        (ArgGenerators.createShader.checkArgValidity):
+        (ArgGenerators.createShader.returnValueCleanup):
+        (ArgGenerators.createTexture.generate):
+        (ArgGenerators.createTexture.returnValueCleanup):
+        (ArgGenerators.cullFace.generate):
+        (ArgGenerators.cullFace.checkArgValidity):
+        (ArgGenerators.cullFace.teardown):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-D_G.js: Added.
+        (ArgGenerators.deleteBuffer.generate):
+        (ArgGenerators.deleteBuffer.checkArgValidity):
+        (ArgGenerators.deleteBuffer.cleanup):
+        (ArgGenerators.deleteFramebuffer.generate):
+        (ArgGenerators.deleteFramebuffer.checkArgValidity):
+        (ArgGenerators.deleteFramebuffer.cleanup):
+        (ArgGenerators.deleteProgram.generate):
+        (ArgGenerators.deleteProgram.checkArgValidity):
+        (ArgGenerators.deleteProgram.cleanup):
+        (ArgGenerators.deleteRenderbuffer.generate):
+        (ArgGenerators.deleteRenderbuffer.checkArgValidity):
+        (ArgGenerators.deleteRenderbuffer.cleanup):
+        (ArgGenerators.deleteShader.generate):
+        (ArgGenerators.deleteShader.checkArgValidity):
+        (ArgGenerators.deleteShader.cleanup):
+        (ArgGenerators.deleteTexture.generate):
+        (ArgGenerators.deleteTexture.checkArgValidity):
+        (ArgGenerators.deleteTexture.cleanup):
+        (ArgGenerators.depthFunc.generate):
+        (ArgGenerators.depthFunc.checkArgValidity):
+        (ArgGenerators.depthFunc.teardown):
+        (ArgGenerators.depthMask.generate):
+        (ArgGenerators.depthMask.teardown):
+        (ArgGenerators.depthRange.generate):
+        (ArgGenerators.depthRange.teardown):
+        (ArgGenerators.detachShader.generate):
+        (ArgGenerators.detachShader.checkArgValidity):
+        (ArgGenerators.detachShader.cleanup):
+        (ArgGenerators.disable.generate):
+        (ArgGenerators.disable.checkArgValidity):
+        (ArgGenerators.disable.cleanup):
+        (ArgGenerators.disableVertexAttribArray.generate):
+        (ArgGenerators.disableVertexAttribArray.checkArgValidity):
+        (ArgGenerators.enable.generate):
+        (ArgGenerators.enable.checkArgValidity):
+        (ArgGenerators.enable.cleanup):
+        (ArgGenerators.enableVertexAttribArray.generate):
+        (ArgGenerators.enableVertexAttribArray.checkArgValidity):
+        (ArgGenerators.enableVertexAttribArray.cleanup):
+        (ArgGenerators.finish.generate):
+        (ArgGenerators.flush.generate):
+        (ArgGenerators.frontFace.generate):
+        (ArgGenerators.frontFace.checkArgValidity):
+        (ArgGenerators.frontFace.cleanup):
+        (ArgGenerators.generateMipmap.setup):
+        (ArgGenerators.generateMipmap.generate):
+        (ArgGenerators.generateMipmap.checkArgValidity):
+        (ArgGenerators.generateMipmap.teardown):
+        (ArgGenerators.getAttachedShaders.setup):
+        (ArgGenerators.getAttachedShaders.generate):
+        (ArgGenerators.getAttachedShaders.checkArgValidity):
+        (ArgGenerators.getAttachedShaders.teardown):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-G_I.js: Added.
+        (ArgGenerators.getAttribLocation.generate):
+        (ArgGenerators.getAttribLocation.checkArgValidity):
+        (ArgGenerators.getAttribLocation.cleanup):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-L_S.js: Added.
+        (ArgGenerators.lineWidth.generate):
+        (ArgGenerators.lineWidth.teardown):
+        (ArgGenerators.pixelStorei.generate):
+        (ArgGenerators.pixelStorei.checkArgValidity):
+        (ArgGenerators.pixelStorei.teardown):
+        (ArgGenerators.polygonOffset.generate):
+        (ArgGenerators.polygonOffset.teardown):
+        (ArgGenerators.sampleCoverage.generate):
+        (ArgGenerators.sampleCoverage.teardown):
+        (ArgGenerators.scissor.generate):
+        (ArgGenerators.scissor.checkArgValidity):
+        (ArgGenerators.scissor.teardown):
+        (ArgGenerators.stencilFunc.generate):
+        (ArgGenerators.stencilFunc.checkArgValidity):
+        (ArgGenerators.stencilFunc.teardown):
+        (ArgGenerators.stencilFuncSeparate.generate):
+        (ArgGenerators.stencilFuncSeparate.checkArgValidity):
+        (ArgGenerators.stencilFuncSeparate.teardown):
+        (ArgGenerators.stencilMask.generate):
+        (ArgGenerators.stencilMask.teardown):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-S_V.js: Added.
+        (ArgGenerators.stencilMaskSeparate.generate):
+        (ArgGenerators.stencilMaskSeparate.checkArgValidity):
+        (ArgGenerators.stencilMaskSeparate.teardown):
+        (ArgGenerators.stencilOp.generate):
+        (ArgGenerators.stencilOp.checkArgValidity):
+        (ArgGenerators.stencilOp.teardown):
+        (ArgGenerators.stencilOpSeparate.generate):
+        (ArgGenerators.stencilOpSeparate.checkArgValidity):
+        (ArgGenerators.stencilOpSeparate.teardown):
+        (ArgGenerators.texImage2D.setup):
+        (ArgGenerators.texImage2D.generate):
+        (ArgGenerators.texImage2D.checkArgValidity):
+        (ArgGenerators.texImage2D.teardown):
+        (ArgGenerators.texParameterf.generate):
+        (ArgGenerators.texParameterf.checkArgValidity):
+        (ArgGenerators.texParameteri.generate):
+        (ArgGenerators.texParameteri.checkArgValidity):
+        (ArgGenerators.viewport.generate):
+        (ArgGenerators.viewport.checkArgValidity):
+        (ArgGenerators.viewport.teardown):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/badArgsArityLessThanArgc.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/conformance/constants.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/conformance/fuzzTheAPI.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/conformance/getContext.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/conformance/methods.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/conformance/quickCheckAPI.js: Added.
+        (Array.from):
+        (Array.prototype.has):
+        (Array.prototype.random):
+        (castToInt):
+        (constCheck.a.has):
+        (constCheck):
+        (isBufferData):
+        (isVertexAttribute):
+        (isValidName):
+        (randomWebGLArray):
+        (randomArrayBuffer):
+        (randomBufferData):
+        (randomSmallWebGLArray):
+        (randomBufferSubData):
+        (randomColor):
+        (randomName):
+        (randomVertexAttribute):
+        (randomBool):
+        (randomStencil):
+        (randomLineWidth):
+        (randomImage):
+        (mutateArgs):
+        (argGeneratorTestRunner):
+        * webgl/resources/webgl_test_files/conformance/more/conformance/quickCheckAPIBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/conformance/webGLArrays.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/demos/opengl_web.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/demos/video.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/bindBuffer.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/bindBufferBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/bindFramebufferLeaveNonZero.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/bufferData.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/bufferSubData.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/bufferSubDataBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/isTests.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/isTestsBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/readPixels.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/texImage2D.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/texImage2DHTMLBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/texSubImage2D.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/texSubImage2DHTMLBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/uniformMatrix.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/uniformf.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/uniformfArrayLen1.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/uniformfBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/uniformi.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/uniformiBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/vertexAttrib.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/vertexAttribBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/vertexAttribPointer.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/functions/vertexAttribPointerBadArgs.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/glsl/arrayOutOfBounds.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/glsl/longLoops.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/glsl/uniformOutOfBounds.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/glsl/unusedAttribsUniforms.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/index.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/performance/CPUvsGPU.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/performance/bandwidth.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/performance/jsGCPause.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/performance/jsMatrixMult.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/performance/jsToGLOverhead.html: Added.
+        * webgl/resources/webgl_test_files/conformance/more/unit.css: Added.
+        (.ok):
+        (.fail):
+        (canvas):
+        (#test-status):
+        (#test-log):
+        (#test-log > div):
+        (#test-log h2):
+        (#test-log h3):
+        (#test-log p):
+        * webgl/resources/webgl_test_files/conformance/more/unit.js: Added.
+        (.window.console.log):
+        (.window.console.error):
+        (Tests.startUnit):
+        (Tests.setup):
+        (Tests.teardown):
+        (Tests.endUnit):
+        (.):
+        (Object.toSource):
+        * webgl/resources/webgl_test_files/conformance/more/util.js: Added.
+        (loadTexture):
+        (getShader):
+        (loadShaderArray):
+        (loadShader):
+        (getGLErrorAsString):
+        (checkError):
+        (throwError):
+        (Math.cot):
+        (Matrix.newIdentity):
+        (Matrix.newIdentity3x3):
+        (Matrix.copyMatrix):
+        (Matrix.to3x3):
+        (Matrix.inverseON):
+        (Matrix.inverseTo3x3):
+        (Matrix.inverseTo3x3InPlace):
+        (Matrix.inverse3x3):
+        (Matrix.inverse3x3InPlace):
+        (Matrix.frustum):
+        (Matrix.perspective):
+        (Matrix.mul4x4):
+        (Matrix.mul4x4InPlace):
+        (Matrix.mulv4):
+        (Matrix.rotate):
+        (Matrix.rotateInPlace):
+        (Matrix.scale):
+        (Matrix.scale3):
+        (Matrix.scale1):
+        (Matrix.scale3InPlace):
+        (Matrix.scale1InPlace):
+        (Matrix.scaleInPlace):
+        (Matrix.translate3):
+        (Matrix.translate):
+        (Matrix.translate3InPlace):
+        (Matrix.translateInPlace):
+        (Matrix.lookAt):
+        (Matrix.transpose4x4):
+        (Matrix.transpose4x4InPlace):
+        (Matrix.transpose3x3):
+        (Matrix.transpose3x3InPlace):
+        (Vec3.make):
+        (Vec3.copy):
+        (Vec3.add):
+        (Vec3.sub):
+        (Vec3.negate):
+        (Vec3.direction):
+        (Vec3.normalizeInPlace):
+        (Vec3.normalize):
+        (Vec3.scale):
+        (Vec3.dot):
+        (Vec3.inner):
+        (Vec3.cross):
+        (Shader):
+        (Shader.prototype.destroy):
+        (Shader.prototype.compile):
+        (Shader.prototype.use):
+        (Shader.prototype.uniform1fv):
+        (Shader.prototype.uniform2fv):
+        (Shader.prototype.uniform3fv):
+        (Shader.prototype.uniform4fv):
+        (Shader.prototype.uniform1f):
+        (Shader.prototype.uniform2f):
+        (Shader.prototype.uniform3f):
+        (Shader.prototype.uniform4f):
+        (Shader.prototype.uniform1iv):
+        (Shader.prototype.uniform2iv):
+        (Shader.prototype.uniform3iv):
+        (Shader.prototype.uniform4iv):
+        (Shader.prototype.uniform1i):
+        (Shader.prototype.uniform2i):
+        (Shader.prototype.uniform3i):
+        (Shader.prototype.uniform4i):
+        (Shader.prototype.uniformMatrix4fv):
+        (Shader.prototype.uniformMatrix3fv):
+        (Shader.prototype.uniformMatrix2fv):
+        (Shader.prototype.attrib):
+        (Shader.prototype.uniform):
+        (Filter):
+        (Filter.prototype.apply):
+        (VBO):
+        (VBO.prototype.setData):
+        (VBO.prototype.destroy):
+        (VBO.prototype.init):
+        (VBO.prototype.use):
+        (VBO.prototype.draw):
+        (FBO):
+        (FBO.prototype.destroy):
+        (FBO.prototype.init):
+        (FBO.prototype.getTempCanvas):
+        (FBO.prototype.use):
+        (GLError):
+        (makeGLErrorWrapper):
+        (wrapGLContext.wrap.getError):
+        (getGLContext):
+        (assertSomeGLError):
+        (assertThrowNoGLError):
+        (Quad.makeVBO):
+        (.gl):
+        (Quad.getCachedVBO):
+        (deleteShader):
+        (Cube.create):
+        (Cube.makeVBO):
+        (Cube.getCachedVBO):
+        (Sphere.create.vert):
+        (Sphere.create):
+        (initGL_CONTEXT_ID):
+
+2013-02-06  Gregg Tavares  <gman@chromium.org>
+
         Add the WebGL Conformance Tests extensions folder.
         https://bugs.webkit.org/show_bug.cgi?id=109117
 
diff --git a/LayoutTests/webgl/conformance/more/conformance/constants-expected.txt b/LayoutTests/webgl/conformance/more/conformance/constants-expected.txt
new file mode 100644 (file)
index 0000000..83744b6
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/conformance/constants.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/conformance/constants.html b/LayoutTests/webgl/conformance/more/conformance/constants.html
new file mode 100644 (file)
index 0000000..30acb64
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for constants.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/conformance/constants.html">../../../resources/webgl_test_files/conformance/more/conformance/constants.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/conformance/constants.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/conformance/getContext-expected.txt b/LayoutTests/webgl/conformance/more/conformance/getContext-expected.txt
new file mode 100644 (file)
index 0000000..887354d
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/conformance/getContext.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/conformance/getContext.html b/LayoutTests/webgl/conformance/more/conformance/getContext.html
new file mode 100644 (file)
index 0000000..5c573ff
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for getContext.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/conformance/getContext.html">../../../resources/webgl_test_files/conformance/more/conformance/getContext.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/conformance/getContext.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/conformance/methods-expected.txt b/LayoutTests/webgl/conformance/more/conformance/methods-expected.txt
new file mode 100644 (file)
index 0000000..1d40abf
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/conformance/methods.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/conformance/methods.html b/LayoutTests/webgl/conformance/more/conformance/methods.html
new file mode 100644 (file)
index 0000000..fb84fde
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for methods.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/conformance/methods.html">../../../resources/webgl_test_files/conformance/more/conformance/methods.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/conformance/methods.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/conformance/webGLArrays-expected.txt b/LayoutTests/webgl/conformance/more/conformance/webGLArrays-expected.txt
new file mode 100644 (file)
index 0000000..9c522bf
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/conformance/webGLArrays.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/conformance/webGLArrays.html b/LayoutTests/webgl/conformance/more/conformance/webGLArrays.html
new file mode 100644 (file)
index 0000000..aee7084
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for webGLArrays.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/conformance/webGLArrays.html">../../../resources/webgl_test_files/conformance/more/conformance/webGLArrays.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/conformance/webGLArrays.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/bindBuffer-expected.txt b/LayoutTests/webgl/conformance/more/functions/bindBuffer-expected.txt
new file mode 100644 (file)
index 0000000..785845d
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/bindBuffer.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/bindBuffer.html b/LayoutTests/webgl/conformance/more/functions/bindBuffer.html
new file mode 100644 (file)
index 0000000..85f05ee
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for bindBuffer.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/bindBuffer.html">../../../resources/webgl_test_files/conformance/more/functions/bindBuffer.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/bindBuffer.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/bindBufferBadArgs-expected.txt b/LayoutTests/webgl/conformance/more/functions/bindBufferBadArgs-expected.txt
new file mode 100644 (file)
index 0000000..ad8d24b
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/bindBufferBadArgs.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/bindBufferBadArgs.html b/LayoutTests/webgl/conformance/more/functions/bindBufferBadArgs.html
new file mode 100644 (file)
index 0000000..4660708
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for bindBufferBadArgs.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/bindBufferBadArgs.html">../../../resources/webgl_test_files/conformance/more/functions/bindBufferBadArgs.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/bindBufferBadArgs.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/bindFramebufferLeaveNonZero-expected.txt b/LayoutTests/webgl/conformance/more/functions/bindFramebufferLeaveNonZero-expected.txt
new file mode 100644 (file)
index 0000000..44a6365
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/bindFramebufferLeaveNonZero.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/bindFramebufferLeaveNonZero.html b/LayoutTests/webgl/conformance/more/functions/bindFramebufferLeaveNonZero.html
new file mode 100644 (file)
index 0000000..fc9ce7b
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for bindFramebufferLeaveNonZero.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/bindFramebufferLeaveNonZero.html">../../../resources/webgl_test_files/conformance/more/functions/bindFramebufferLeaveNonZero.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/bindFramebufferLeaveNonZero.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/bufferData-expected.txt b/LayoutTests/webgl/conformance/more/functions/bufferData-expected.txt
new file mode 100644 (file)
index 0000000..c34f18f
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/bufferData.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/bufferData.html b/LayoutTests/webgl/conformance/more/functions/bufferData.html
new file mode 100644 (file)
index 0000000..e78197b
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for bufferData.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/bufferData.html">../../../resources/webgl_test_files/conformance/more/functions/bufferData.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/bufferData.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/bufferSubData-expected.txt b/LayoutTests/webgl/conformance/more/functions/bufferSubData-expected.txt
new file mode 100644 (file)
index 0000000..3a48531
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/bufferSubData.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/bufferSubData.html b/LayoutTests/webgl/conformance/more/functions/bufferSubData.html
new file mode 100644 (file)
index 0000000..40cdafa
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for bufferSubData.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/bufferSubData.html">../../../resources/webgl_test_files/conformance/more/functions/bufferSubData.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/bufferSubData.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/bufferSubDataBadArgs-expected.txt b/LayoutTests/webgl/conformance/more/functions/bufferSubDataBadArgs-expected.txt
new file mode 100644 (file)
index 0000000..6b8ac4a
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/bufferSubDataBadArgs.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/bufferSubDataBadArgs.html b/LayoutTests/webgl/conformance/more/functions/bufferSubDataBadArgs.html
new file mode 100644 (file)
index 0000000..04e7a89
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for bufferSubDataBadArgs.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/bufferSubDataBadArgs.html">../../../resources/webgl_test_files/conformance/more/functions/bufferSubDataBadArgs.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/bufferSubDataBadArgs.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/isTests-expected.txt b/LayoutTests/webgl/conformance/more/functions/isTests-expected.txt
new file mode 100644 (file)
index 0000000..99dc193
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/isTests.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/isTests.html b/LayoutTests/webgl/conformance/more/functions/isTests.html
new file mode 100644 (file)
index 0000000..5fd3ef8
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for isTests.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/isTests.html">../../../resources/webgl_test_files/conformance/more/functions/isTests.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/isTests.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/isTestsBadArgs-expected.txt b/LayoutTests/webgl/conformance/more/functions/isTestsBadArgs-expected.txt
new file mode 100644 (file)
index 0000000..5939e99
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/isTestsBadArgs.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/isTestsBadArgs.html b/LayoutTests/webgl/conformance/more/functions/isTestsBadArgs.html
new file mode 100644 (file)
index 0000000..87e6642
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for isTestsBadArgs.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/isTestsBadArgs.html">../../../resources/webgl_test_files/conformance/more/functions/isTestsBadArgs.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/isTestsBadArgs.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/readPixels-expected.txt b/LayoutTests/webgl/conformance/more/functions/readPixels-expected.txt
new file mode 100644 (file)
index 0000000..c9db6dd
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/readPixels.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/readPixels.html b/LayoutTests/webgl/conformance/more/functions/readPixels.html
new file mode 100644 (file)
index 0000000..2f11d10
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for readPixels.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/readPixels.html">../../../resources/webgl_test_files/conformance/more/functions/readPixels.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/readPixels.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/texImage2D-expected.txt b/LayoutTests/webgl/conformance/more/functions/texImage2D-expected.txt
new file mode 100644 (file)
index 0000000..ab9ddc1
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/texImage2D.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/texImage2D.html b/LayoutTests/webgl/conformance/more/functions/texImage2D.html
new file mode 100644 (file)
index 0000000..65d9486
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for texImage2D.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/texImage2D.html">../../../resources/webgl_test_files/conformance/more/functions/texImage2D.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/texImage2D.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/texImage2DHTMLBadArgs-expected.txt b/LayoutTests/webgl/conformance/more/functions/texImage2DHTMLBadArgs-expected.txt
new file mode 100644 (file)
index 0000000..86a61b0
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/texImage2DHTMLBadArgs.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/texImage2DHTMLBadArgs.html b/LayoutTests/webgl/conformance/more/functions/texImage2DHTMLBadArgs.html
new file mode 100644 (file)
index 0000000..63a005e
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for texImage2DHTMLBadArgs.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/texImage2DHTMLBadArgs.html">../../../resources/webgl_test_files/conformance/more/functions/texImage2DHTMLBadArgs.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/texImage2DHTMLBadArgs.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/texSubImage2D-expected.txt b/LayoutTests/webgl/conformance/more/functions/texSubImage2D-expected.txt
new file mode 100644 (file)
index 0000000..f57f65d
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/texSubImage2D.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/texSubImage2D.html b/LayoutTests/webgl/conformance/more/functions/texSubImage2D.html
new file mode 100644 (file)
index 0000000..4c27f14
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for texSubImage2D.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/texSubImage2D.html">../../../resources/webgl_test_files/conformance/more/functions/texSubImage2D.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/texSubImage2D.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/texSubImage2DHTMLBadArgs-expected.txt b/LayoutTests/webgl/conformance/more/functions/texSubImage2DHTMLBadArgs-expected.txt
new file mode 100644 (file)
index 0000000..269330a
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/texSubImage2DHTMLBadArgs.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/texSubImage2DHTMLBadArgs.html b/LayoutTests/webgl/conformance/more/functions/texSubImage2DHTMLBadArgs.html
new file mode 100644 (file)
index 0000000..5989dc7
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for texSubImage2DHTMLBadArgs.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/texSubImage2DHTMLBadArgs.html">../../../resources/webgl_test_files/conformance/more/functions/texSubImage2DHTMLBadArgs.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/texSubImage2DHTMLBadArgs.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformMatrix-expected.txt b/LayoutTests/webgl/conformance/more/functions/uniformMatrix-expected.txt
new file mode 100644 (file)
index 0000000..91883c4
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/uniformMatrix.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformMatrix.html b/LayoutTests/webgl/conformance/more/functions/uniformMatrix.html
new file mode 100644 (file)
index 0000000..bc5a093
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for uniformMatrix.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/uniformMatrix.html">../../../resources/webgl_test_files/conformance/more/functions/uniformMatrix.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/uniformMatrix.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformMatrixBadArgs-expected.txt b/LayoutTests/webgl/conformance/more/functions/uniformMatrixBadArgs-expected.txt
new file mode 100644 (file)
index 0000000..204880f
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformMatrixBadArgs.html b/LayoutTests/webgl/conformance/more/functions/uniformMatrixBadArgs.html
new file mode 100644 (file)
index 0000000..dc64030
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for uniformMatrixBadArgs.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html">../../../resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/uniformMatrixBadArgs.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformf-expected.txt b/LayoutTests/webgl/conformance/more/functions/uniformf-expected.txt
new file mode 100644 (file)
index 0000000..40638ff
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/uniformf.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformf.html b/LayoutTests/webgl/conformance/more/functions/uniformf.html
new file mode 100644 (file)
index 0000000..779123a
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for uniformf.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/uniformf.html">../../../resources/webgl_test_files/conformance/more/functions/uniformf.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/uniformf.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformfArrayLen1-expected.txt b/LayoutTests/webgl/conformance/more/functions/uniformfArrayLen1-expected.txt
new file mode 100644 (file)
index 0000000..6d72533
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/uniformfArrayLen1.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformfArrayLen1.html b/LayoutTests/webgl/conformance/more/functions/uniformfArrayLen1.html
new file mode 100644 (file)
index 0000000..0431c6b
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for uniformfArrayLen1.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/uniformfArrayLen1.html">../../../resources/webgl_test_files/conformance/more/functions/uniformfArrayLen1.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/uniformfArrayLen1.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformfBadArgs-expected.txt b/LayoutTests/webgl/conformance/more/functions/uniformfBadArgs-expected.txt
new file mode 100644 (file)
index 0000000..3a97081
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/uniformfBadArgs.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformfBadArgs.html b/LayoutTests/webgl/conformance/more/functions/uniformfBadArgs.html
new file mode 100644 (file)
index 0000000..36a4828
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for uniformfBadArgs.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/uniformfBadArgs.html">../../../resources/webgl_test_files/conformance/more/functions/uniformfBadArgs.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/uniformfBadArgs.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformi-expected.txt b/LayoutTests/webgl/conformance/more/functions/uniformi-expected.txt
new file mode 100644 (file)
index 0000000..aecaaef
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/uniformi.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformi.html b/LayoutTests/webgl/conformance/more/functions/uniformi.html
new file mode 100644 (file)
index 0000000..98247aa
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for uniformi.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/uniformi.html">../../../resources/webgl_test_files/conformance/more/functions/uniformi.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/uniformi.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformiBadArgs-expected.txt b/LayoutTests/webgl/conformance/more/functions/uniformiBadArgs-expected.txt
new file mode 100644 (file)
index 0000000..59e55d6
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/uniformiBadArgs.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/uniformiBadArgs.html b/LayoutTests/webgl/conformance/more/functions/uniformiBadArgs.html
new file mode 100644 (file)
index 0000000..03fd149
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for uniformiBadArgs.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/uniformiBadArgs.html">../../../resources/webgl_test_files/conformance/more/functions/uniformiBadArgs.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/uniformiBadArgs.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/vertexAttrib-expected.txt b/LayoutTests/webgl/conformance/more/functions/vertexAttrib-expected.txt
new file mode 100644 (file)
index 0000000..7912c2f
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/vertexAttrib.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/vertexAttrib.html b/LayoutTests/webgl/conformance/more/functions/vertexAttrib.html
new file mode 100644 (file)
index 0000000..b3201a3
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for vertexAttrib.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/vertexAttrib.html">../../../resources/webgl_test_files/conformance/more/functions/vertexAttrib.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/vertexAttrib.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/vertexAttribBadArgs-expected.txt b/LayoutTests/webgl/conformance/more/functions/vertexAttribBadArgs-expected.txt
new file mode 100644 (file)
index 0000000..9ddf53c
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/vertexAttribBadArgs.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/vertexAttribBadArgs.html b/LayoutTests/webgl/conformance/more/functions/vertexAttribBadArgs.html
new file mode 100644 (file)
index 0000000..e75981c
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for vertexAttribBadArgs.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/vertexAttribBadArgs.html">../../../resources/webgl_test_files/conformance/more/functions/vertexAttribBadArgs.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/vertexAttribBadArgs.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/vertexAttribPointer-expected.txt b/LayoutTests/webgl/conformance/more/functions/vertexAttribPointer-expected.txt
new file mode 100644 (file)
index 0000000..4c4fe77
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/vertexAttribPointer.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/vertexAttribPointer.html b/LayoutTests/webgl/conformance/more/functions/vertexAttribPointer.html
new file mode 100644 (file)
index 0000000..303ae65
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for vertexAttribPointer.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/vertexAttribPointer.html">../../../resources/webgl_test_files/conformance/more/functions/vertexAttribPointer.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/vertexAttribPointer.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/functions/vertexAttribPointerBadArgs-expected.txt b/LayoutTests/webgl/conformance/more/functions/vertexAttribPointerBadArgs-expected.txt
new file mode 100644 (file)
index 0000000..d0f7862
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/functions/vertexAttribPointerBadArgs.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/functions/vertexAttribPointerBadArgs.html b/LayoutTests/webgl/conformance/more/functions/vertexAttribPointerBadArgs.html
new file mode 100644 (file)
index 0000000..70d4bad
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for vertexAttribPointerBadArgs.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/functions/vertexAttribPointerBadArgs.html">../../../resources/webgl_test_files/conformance/more/functions/vertexAttribPointerBadArgs.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/functions/vertexAttribPointerBadArgs.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/glsl/arrayOutOfBounds-expected.txt b/LayoutTests/webgl/conformance/more/glsl/arrayOutOfBounds-expected.txt
new file mode 100644 (file)
index 0000000..f5d18ed
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/glsl/arrayOutOfBounds.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/glsl/arrayOutOfBounds.html b/LayoutTests/webgl/conformance/more/glsl/arrayOutOfBounds.html
new file mode 100644 (file)
index 0000000..af3c50b
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for arrayOutOfBounds.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/glsl/arrayOutOfBounds.html">../../../resources/webgl_test_files/conformance/more/glsl/arrayOutOfBounds.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/glsl/arrayOutOfBounds.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/conformance/more/glsl/uniformOutOfBounds-expected.txt b/LayoutTests/webgl/conformance/more/glsl/uniformOutOfBounds-expected.txt
new file mode 100644 (file)
index 0000000..fe8110a
--- /dev/null
@@ -0,0 +1,5 @@
+This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
+
+Test: ../../../resources/webgl_test_files/conformance/more/glsl/uniformOutOfBounds.html
+PASS
+
diff --git a/LayoutTests/webgl/conformance/more/glsl/uniformOutOfBounds.html b/LayoutTests/webgl/conformance/more/glsl/uniformOutOfBounds.html
new file mode 100644 (file)
index 0000000..09dfb1c
--- /dev/null
@@ -0,0 +1,18 @@
+<!-- This file is auto-generated by generate-webgl-tests.py. DO NOT EDIT -->
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Conformance Test Wrapper for uniformOutOfBounds.html</title>
+<script type="text/javascript" src="../../../../fast/js/resources/js-test-pre.js"></script>
+<script type="text/javascript" src="../../../resources/webkit-webgl-test-harness.js"></script>
+</head>
+<body>
+<p>This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.</p>
+Test: <a href="../../../resources/webgl_test_files/conformance/more/glsl/uniformOutOfBounds.html">../../../resources/webgl_test_files/conformance/more/glsl/uniformOutOfBounds.html</a>
+<div id="result"></div>
+<div id="iframe">
+<iframe src="../../../resources/webgl_test_files/conformance/more/glsl/uniformOutOfBounds.html" width="800" height="600"></iframe>
+</div>
+</body>
+</html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/00_test_list.txt b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/00_test_list.txt
new file mode 100644 (file)
index 0000000..1a09da0
--- /dev/null
@@ -0,0 +1,58 @@
+conformance/constants.html
+conformance/getContext.html
+conformance/methods.html
+conformance/quickCheckAPI-A.html
+conformance/quickCheckAPI-B1.html
+conformance/quickCheckAPI-B2.html
+conformance/quickCheckAPI-B3.html
+conformance/quickCheckAPI-B4.html
+conformance/quickCheckAPI-C.html
+conformance/quickCheckAPI-D_G.html
+conformance/quickCheckAPI-G_I.html
+conformance/quickCheckAPI-L_S.html
+conformance/quickCheckAPI-S_V.html
+conformance/webGLArrays.html
+functions/bindBuffer.html
+functions/bindBufferBadArgs.html
+functions/bindFramebufferLeaveNonZero.html
+functions/bufferData.html
+functions/bufferDataBadArgs.html
+functions/bufferSubData.html
+functions/bufferSubDataBadArgs.html
+functions/copyTexImage2D.html
+functions/copyTexImage2DBadArgs.html
+functions/copyTexSubImage2D.html
+functions/copyTexSubImage2DBadArgs.html
+functions/deleteBufferBadArgs.html
+functions/drawArrays.html
+functions/drawArraysOutOfBounds.html
+functions/drawElements.html
+functions/drawElementsBadArgs.html
+functions/isTests.html
+--min-version 1.0.2 functions/isTestsBadArgs.html
+functions/readPixels.html
+functions/readPixelsBadArgs.html
+functions/texImage2D.html
+functions/texImage2DBadArgs.html
+functions/texImage2DHTML.html
+functions/texImage2DHTMLBadArgs.html
+functions/texSubImage2D.html
+functions/texSubImage2DBadArgs.html
+functions/texSubImage2DHTML.html
+functions/texSubImage2DHTMLBadArgs.html
+functions/uniformf.html
+functions/uniformfBadArgs.html
+functions/uniformfArrayLen1.html
+functions/uniformi.html
+functions/uniformiBadArgs.html
+functions/uniformMatrix.html
+functions/uniformMatrixBadArgs.html
+functions/vertexAttrib.html
+functions/vertexAttribBadArgs.html
+functions/vertexAttribPointer.html
+functions/vertexAttribPointerBadArgs.html
+glsl/arrayOutOfBounds.html
+#glsl/longLoops.html // No interactive tests.
+glsl/uniformOutOfBounds.html
+#glsl/unusedAttribsUniforms.html // No interactive tests.
+
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/README.md b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/README.md
new file mode 100644 (file)
index 0000000..0193714
--- /dev/null
@@ -0,0 +1,53 @@
+Tests for the WebGL canvas context
+==================================
+
+These tests are intended to serve the following purposes:
+
+  * Assert spec conformance
+  * Check the safety of the GL binding (bounds checking, same origin policy)
+  * Provide performance numbers for developers
+
+
+Running the tests
+-----------------
+
+  1. <a href="http://learningwebgl.com/blog/?p=11">Install a browser with WebGL support</a>
+  2. Run <code>ruby gen_tests.rb</code> if you have modified the tests.
+  3. Run <code>ruby test_server.rb</code> if you want to get test run output to test_server's stdout (especially useful for finding out which test crashed your browser.)
+  4. Open all_tests.html in your browser.
+
+
+Want to contribute?
+-------------------
+
+  1. Fork this repo
+  2. Run <code>gen_tests.rb</code>
+  3. Look into templates/ to see which functions lack tests (also see <a href="../raw/master/methods.txt">methods.txt</a> and <a href="http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/canvas/nsICanvasRenderingContextWebGL.idl">nsICanvasRenderingContextWebGL.idl</a>):
+    1. copy methodName.html to functions/methodName.html and write tests that test the results of valid inputs.
+    2. copy methodNameBadArgs.html to functions/methodNameBadArgs.html and write tests to assert that invalid inputs throw exceptions.
+    3. If your test causes a segfault, add the following to the top of the script tag: <code>Tests.autorun = false; Tests.message = "Caution: this may crash your browser";</code>
+  4. For each performance test:
+    1. Write a performance/myTestName.html and set <code>Tests.autorun = false;</code>
+  5. If you have a test that you would like to run over the whole API or want to generate tests programmatically, add them to gen_tests.rb or write your own script.
+  6. Create a commit for each file. (E.g. <code>for f in $(git status | grep -e "^#\\s*functions/\\S*$" | sed "s/^#\s*//"); do git add $f; git commit -m $f; done</code>)
+  7. Send me a pull request.
+  8. Congratulations, you're now a contributor!
+
+
+For more information on WebGL:
+
+  * <a href="http://planet-webgl.org">Planet WebGL</a>
+  * <a href="http://learningwebgl.com">Learning WebGL</a>
+  * <a href="http://www.khronos.org/message_boards/viewforum.php?f=34">WebGL on Khronos Message Boards</a>
+
+Developer links:
+
+  * <a href="https://bugzilla.mozilla.org/buglist.cgi?quicksearch=webgl">WebGL on Mozilla Bugzilla</a>
+  * <a href="https://bugzilla.webkit.org/buglist.cgi?quicksearch=webgl">WebGL on WebKit Bugzilla</a>
+  * <a href="http://code.google.com/p/chromium/issues/list?q=label:3D-WebGL">WebGL on Chromium Bugzilla</a>
+
+What's the stuff in apigen?
+
+  There are some Python scripts in the apigen/ directory that generate C++ based on the API definition files (gl2.h, api_modifications.txt, valid_args.txt.) The generated code is Mozilla XPCOM functions that check their args against the valid GLES 2.0 constants (as they were written on the man pages.) There's also some wackier stuff for checking copyTexImage2D and copyTexSubImage2D image dimensions against viewport dimensions.
+
+  If you can use it to generate code for your WebGL implementation, it might save you 1500 lines of typing and testing. The last time I used it was summer 2009 to generate a patch for Canvas 3D, so it's likely somewhat out of date.
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/all_tests.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/all_tests.html
new file mode 100644 (file)
index 0000000..390e263
--- /dev/null
@@ -0,0 +1,399 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+  <title>OpenGL ES 2.0 &lt;canvas&gt; context tests</title>
+  <style type="text/css">
+    h2 { display: inline; font-size: 1em; margin-bottom: 0.2em; }
+    iframe { display: inline; border: 1px solid black; overflow: hidden;}
+  </style>
+  <script type="text/javascript">
+    function loadTest(id, url) {
+      document.getElementById(id).src = url;
+    }
+    function seqLoader() {
+      var iframes = document.getElementsByTagName('iframe');
+      for (var i=0; i<iframes.length; i++) {
+        iframes[i].addEventListener('load', (function(j) {
+          return function() {
+            var e = document.getElementById((j+1)+'_link');
+            if (e) loadTest(j+1, e.href);
+          }
+        })(i), false);
+      }
+      var e = document.getElementById('0_link');
+      if (e) loadTest(0, e.href);
+    }
+  </script>
+</head>
+<body onload="seqLoader()">
+
+    <div>
+      <iframe src="conformance/badArgsArityLessThanArgc.html" width="110" height="42"></iframe>
+      <h2><a href="conformance/badArgsArityLessThanArgc.html">conformance/badArgsArityLessThanArgc.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="conformance/constants.html" width="110" height="42"></iframe>
+      <h2><a href="conformance/constants.html">conformance/constants.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="conformance/fuzzTheAPI.html" width="110" height="42"></iframe>
+      <h2><a href="conformance/fuzzTheAPI.html">conformance/fuzzTheAPI.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="conformance/getContext.html" width="110" height="42"></iframe>
+      <h2><a href="conformance/getContext.html">conformance/getContext.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="conformance/methods.html" width="110" height="42"></iframe>
+      <h2><a href="conformance/methods.html">conformance/methods.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="conformance/quickCheckAPI.html" width="110" height="42"></iframe>
+      <h2><a href="conformance/quickCheckAPI.html">conformance/quickCheckAPI.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="conformance/quickCheckAPIBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="conformance/quickCheckAPIBadArgs.html">conformance/quickCheckAPIBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="conformance/webGLArrays.html" width="110" height="42"></iframe>
+      <h2><a href="conformance/webGLArrays.html">conformance/webGLArrays.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/bindBuffer.html" width="110" height="42"></iframe>
+      <h2><a href="functions/bindBuffer.html">functions/bindBuffer.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/bindBufferBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/bindBufferBadArgs.html">functions/bindBufferBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/bindFramebufferLeaveNonZero.html" width="110" height="42"></iframe>
+      <h2><a href="functions/bindFramebufferLeaveNonZero.html">functions/bindFramebufferLeaveNonZero.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/bufferData.html" width="110" height="42"></iframe>
+      <h2><a href="functions/bufferData.html">functions/bufferData.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/bufferDataBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/bufferDataBadArgs.html">functions/bufferDataBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/bufferSubData.html" width="110" height="42"></iframe>
+      <h2><a href="functions/bufferSubData.html">functions/bufferSubData.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/bufferSubDataBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/bufferSubDataBadArgs.html">functions/bufferSubDataBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/copyTexImage2D.html" width="110" height="42"></iframe>
+      <h2><a href="functions/copyTexImage2D.html">functions/copyTexImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/copyTexImage2DBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/copyTexImage2DBadArgs.html">functions/copyTexImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/copyTexSubImage2D.html" width="110" height="42"></iframe>
+      <h2><a href="functions/copyTexSubImage2D.html">functions/copyTexSubImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/copyTexSubImage2DBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/copyTexSubImage2DBadArgs.html">functions/copyTexSubImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/deleteBufferBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/deleteBufferBadArgs.html">functions/deleteBufferBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/drawArrays.html" width="110" height="42"></iframe>
+      <h2><a href="functions/drawArrays.html">functions/drawArrays.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/drawArraysOutOfBounds.html" width="110" height="42"></iframe>
+      <h2><a href="functions/drawArraysOutOfBounds.html">functions/drawArraysOutOfBounds.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/drawElements.html" width="110" height="42"></iframe>
+      <h2><a href="functions/drawElements.html">functions/drawElements.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/drawElementsBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/drawElementsBadArgs.html">functions/drawElementsBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/getImageData.html" width="110" height="42"></iframe>
+      <h2><a href="functions/getImageData.html">functions/getImageData.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/getImageDataBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/getImageDataBadArgs.html">functions/getImageDataBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/isTests.html" width="110" height="42"></iframe>
+      <h2><a href="functions/isTests.html">functions/isTests.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/linkProgramBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/linkProgramBadArgs.html">functions/linkProgramBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/readPixels.html" width="110" height="42"></iframe>
+      <h2><a href="functions/readPixels.html">functions/readPixels.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/readPixelsBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/readPixelsBadArgs.html">functions/readPixelsBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/texImage2D.html" width="110" height="42"></iframe>
+      <h2><a href="functions/texImage2D.html">functions/texImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/texImage2DBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/texImage2DBadArgs.html">functions/texImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/texImage2DHTML.html" width="110" height="42"></iframe>
+      <h2><a href="functions/texImage2DHTML.html">functions/texImage2DHTML.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/texImage2DHTMLBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/texImage2DHTMLBadArgs.html">functions/texImage2DHTMLBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/texSubImage2D.html" width="110" height="42"></iframe>
+      <h2><a href="functions/texSubImage2D.html">functions/texSubImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/texSubImage2DBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/texSubImage2DBadArgs.html">functions/texSubImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/texSubImage2DHTML.html" width="110" height="42"></iframe>
+      <h2><a href="functions/texSubImage2DHTML.html">functions/texSubImage2DHTML.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/texSubImage2DHTMLBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/texSubImage2DHTMLBadArgs.html">functions/texSubImage2DHTMLBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/uniformMatrix.html" width="110" height="42"></iframe>
+      <h2><a href="functions/uniformMatrix.html">functions/uniformMatrix.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/uniformMatrixBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/uniformMatrixBadArgs.html">functions/uniformMatrixBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/uniformf.html" width="110" height="42"></iframe>
+      <h2><a href="functions/uniformf.html">functions/uniformf.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/uniformfBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/uniformfBadArgs.html">functions/uniformfBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/uniformi.html" width="110" height="42"></iframe>
+      <h2><a href="functions/uniformi.html">functions/uniformi.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/uniformiBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/uniformiBadArgs.html">functions/uniformiBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/vertexAttrib.html" width="110" height="42"></iframe>
+      <h2><a href="functions/vertexAttrib.html">functions/vertexAttrib.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/vertexAttribBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/vertexAttribBadArgs.html">functions/vertexAttribBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/vertexAttribPointer.html" width="110" height="42"></iframe>
+      <h2><a href="functions/vertexAttribPointer.html">functions/vertexAttribPointer.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="functions/vertexAttribPointerBadArgs.html" width="110" height="42"></iframe>
+      <h2><a href="functions/vertexAttribPointerBadArgs.html">functions/vertexAttribPointerBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="performance/CPUvsGPU.html" width="110" height="42"></iframe>
+      <h2><a href="performance/CPUvsGPU.html">performance/CPUvsGPU.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="performance/bandwidth.html" width="110" height="42"></iframe>
+      <h2><a href="performance/bandwidth.html">performance/bandwidth.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="performance/jsGCPause.html" width="110" height="42"></iframe>
+      <h2><a href="performance/jsGCPause.html">performance/jsGCPause.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="performance/jsMatrixMult.html" width="110" height="42"></iframe>
+      <h2><a href="performance/jsMatrixMult.html">performance/jsMatrixMult.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="performance/jsToGLOverhead.html" width="110" height="42"></iframe>
+      <h2><a href="performance/jsToGLOverhead.html">performance/jsToGLOverhead.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="glsl/arrayOutOfBounds.html" width="110" height="42"></iframe>
+      <h2><a href="glsl/arrayOutOfBounds.html">glsl/arrayOutOfBounds.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="glsl/longLoops.html" width="110" height="42"></iframe>
+      <h2><a href="glsl/longLoops.html">glsl/longLoops.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="glsl/uniformOutOfBounds.html" width="110" height="42"></iframe>
+      <h2><a href="glsl/uniformOutOfBounds.html">glsl/uniformOutOfBounds.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe src="glsl/unusedAttribsUniforms.html" width="110" height="42"></iframe>
+      <h2><a href="glsl/unusedAttribsUniforms.html">glsl/unusedAttribsUniforms.html</a></h2>
+    </div>
+    
+</body>
+</html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/all_tests_linkonly.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/all_tests_linkonly.html
new file mode 100644 (file)
index 0000000..7993393
--- /dev/null
@@ -0,0 +1,399 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+  <title>OpenGL ES 2.0 &lt;canvas&gt; context tests</title>
+  <style type="text/css">
+    h2 { display: inline; font-size: 1em; margin-bottom: 0.2em; }
+    iframe { display: inline; border: 1px solid black; overflow: hidden;}
+  </style>
+  <script type="text/javascript">
+    function loadTest(id, url) {
+      document.getElementById(id).src = url;
+    }
+    function seqLoader() {
+      var iframes = document.getElementsByTagName('iframe');
+      for (var i=0; i<iframes.length; i++) {
+        iframes[i].addEventListener('load', (function(j) {
+          return function() {
+            var e = document.getElementById((j+1)+'_link');
+            if (e) loadTest(j+1, e.href);
+          }
+        })(i), false);
+      }
+      var e = document.getElementById('0_link');
+      if (e) loadTest(0, e.href);
+    }
+  </script>
+</head>
+<body onload="seqLoader()">
+
+    <div>
+      <iframe id="0" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(0, 'conformance/badArgsArityLessThanArgc.html');return false" href="conformance/badArgsArityLessThanArgc.html">conformance/badArgsArityLessThanArgc.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="1" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(1, 'conformance/constants.html');return false" href="conformance/constants.html">conformance/constants.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="2" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(2, 'conformance/fuzzTheAPI.html');return false" href="conformance/fuzzTheAPI.html">conformance/fuzzTheAPI.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="3" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(3, 'conformance/getContext.html');return false" href="conformance/getContext.html">conformance/getContext.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="4" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(4, 'conformance/methods.html');return false" href="conformance/methods.html">conformance/methods.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="5" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(5, 'conformance/quickCheckAPI.html');return false" href="conformance/quickCheckAPI.html">conformance/quickCheckAPI.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="6" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(6, 'conformance/quickCheckAPIBadArgs.html');return false" href="conformance/quickCheckAPIBadArgs.html">conformance/quickCheckAPIBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="7" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(7, 'conformance/webGLArrays.html');return false" href="conformance/webGLArrays.html">conformance/webGLArrays.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="8" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(8, 'functions/bindBuffer.html');return false" href="functions/bindBuffer.html">functions/bindBuffer.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="9" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(9, 'functions/bindBufferBadArgs.html');return false" href="functions/bindBufferBadArgs.html">functions/bindBufferBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="10" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(10, 'functions/bindFramebufferLeaveNonZero.html');return false" href="functions/bindFramebufferLeaveNonZero.html">functions/bindFramebufferLeaveNonZero.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="11" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(11, 'functions/bufferData.html');return false" href="functions/bufferData.html">functions/bufferData.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="12" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(12, 'functions/bufferDataBadArgs.html');return false" href="functions/bufferDataBadArgs.html">functions/bufferDataBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="13" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(13, 'functions/bufferSubData.html');return false" href="functions/bufferSubData.html">functions/bufferSubData.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="14" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(14, 'functions/bufferSubDataBadArgs.html');return false" href="functions/bufferSubDataBadArgs.html">functions/bufferSubDataBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="15" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(15, 'functions/copyTexImage2D.html');return false" href="functions/copyTexImage2D.html">functions/copyTexImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="16" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(16, 'functions/copyTexImage2DBadArgs.html');return false" href="functions/copyTexImage2DBadArgs.html">functions/copyTexImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="17" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(17, 'functions/copyTexSubImage2D.html');return false" href="functions/copyTexSubImage2D.html">functions/copyTexSubImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="18" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(18, 'functions/copyTexSubImage2DBadArgs.html');return false" href="functions/copyTexSubImage2DBadArgs.html">functions/copyTexSubImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="19" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(19, 'functions/deleteBufferBadArgs.html');return false" href="functions/deleteBufferBadArgs.html">functions/deleteBufferBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="20" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(20, 'functions/drawArrays.html');return false" href="functions/drawArrays.html">functions/drawArrays.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="21" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(21, 'functions/drawArraysOutOfBounds.html');return false" href="functions/drawArraysOutOfBounds.html">functions/drawArraysOutOfBounds.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="22" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(22, 'functions/drawElements.html');return false" href="functions/drawElements.html">functions/drawElements.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="23" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(23, 'functions/drawElementsBadArgs.html');return false" href="functions/drawElementsBadArgs.html">functions/drawElementsBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="24" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(24, 'functions/getImageData.html');return false" href="functions/getImageData.html">functions/getImageData.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="25" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(25, 'functions/getImageDataBadArgs.html');return false" href="functions/getImageDataBadArgs.html">functions/getImageDataBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="26" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(26, 'functions/isTests.html');return false" href="functions/isTests.html">functions/isTests.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="27" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(27, 'functions/linkProgramBadArgs.html');return false" href="functions/linkProgramBadArgs.html">functions/linkProgramBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="28" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(28, 'functions/readPixels.html');return false" href="functions/readPixels.html">functions/readPixels.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="29" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(29, 'functions/readPixelsBadArgs.html');return false" href="functions/readPixelsBadArgs.html">functions/readPixelsBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="30" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(30, 'functions/texImage2D.html');return false" href="functions/texImage2D.html">functions/texImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="31" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(31, 'functions/texImage2DBadArgs.html');return false" href="functions/texImage2DBadArgs.html">functions/texImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="32" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(32, 'functions/texImage2DHTML.html');return false" href="functions/texImage2DHTML.html">functions/texImage2DHTML.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="33" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(33, 'functions/texImage2DHTMLBadArgs.html');return false" href="functions/texImage2DHTMLBadArgs.html">functions/texImage2DHTMLBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="34" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(34, 'functions/texSubImage2D.html');return false" href="functions/texSubImage2D.html">functions/texSubImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="35" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(35, 'functions/texSubImage2DBadArgs.html');return false" href="functions/texSubImage2DBadArgs.html">functions/texSubImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="36" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(36, 'functions/texSubImage2DHTML.html');return false" href="functions/texSubImage2DHTML.html">functions/texSubImage2DHTML.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="37" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(37, 'functions/texSubImage2DHTMLBadArgs.html');return false" href="functions/texSubImage2DHTMLBadArgs.html">functions/texSubImage2DHTMLBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="38" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(38, 'functions/uniformMatrix.html');return false" href="functions/uniformMatrix.html">functions/uniformMatrix.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="39" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(39, 'functions/uniformMatrixBadArgs.html');return false" href="functions/uniformMatrixBadArgs.html">functions/uniformMatrixBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="40" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(40, 'functions/uniformf.html');return false" href="functions/uniformf.html">functions/uniformf.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="41" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(41, 'functions/uniformfBadArgs.html');return false" href="functions/uniformfBadArgs.html">functions/uniformfBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="42" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(42, 'functions/uniformi.html');return false" href="functions/uniformi.html">functions/uniformi.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="43" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(43, 'functions/uniformiBadArgs.html');return false" href="functions/uniformiBadArgs.html">functions/uniformiBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="44" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(44, 'functions/vertexAttrib.html');return false" href="functions/vertexAttrib.html">functions/vertexAttrib.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="45" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(45, 'functions/vertexAttribBadArgs.html');return false" href="functions/vertexAttribBadArgs.html">functions/vertexAttribBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="46" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(46, 'functions/vertexAttribPointer.html');return false" href="functions/vertexAttribPointer.html">functions/vertexAttribPointer.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="47" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(47, 'functions/vertexAttribPointerBadArgs.html');return false" href="functions/vertexAttribPointerBadArgs.html">functions/vertexAttribPointerBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="48" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(48, 'performance/CPUvsGPU.html');return false" href="performance/CPUvsGPU.html">performance/CPUvsGPU.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="49" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(49, 'performance/bandwidth.html');return false" href="performance/bandwidth.html">performance/bandwidth.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="50" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(50, 'performance/jsGCPause.html');return false" href="performance/jsGCPause.html">performance/jsGCPause.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="51" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(51, 'performance/jsMatrixMult.html');return false" href="performance/jsMatrixMult.html">performance/jsMatrixMult.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="52" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(52, 'performance/jsToGLOverhead.html');return false" href="performance/jsToGLOverhead.html">performance/jsToGLOverhead.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="53" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(53, 'glsl/arrayOutOfBounds.html');return false" href="glsl/arrayOutOfBounds.html">glsl/arrayOutOfBounds.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="54" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(54, 'glsl/longLoops.html');return false" href="glsl/longLoops.html">glsl/longLoops.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="55" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(55, 'glsl/uniformOutOfBounds.html');return false" href="glsl/uniformOutOfBounds.html">glsl/uniformOutOfBounds.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="56" width="110" height="42"></iframe>
+      <h2><a onclick="loadTest(56, 'glsl/unusedAttribsUniforms.html');return false" href="glsl/unusedAttribsUniforms.html">glsl/unusedAttribsUniforms.html</a></h2>
+    </div>
+    
+</body>
+</html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/all_tests_sequential.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/all_tests_sequential.html
new file mode 100644 (file)
index 0000000..1174d96
--- /dev/null
@@ -0,0 +1,399 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+  <title>OpenGL ES 2.0 &lt;canvas&gt; context tests</title>
+  <style type="text/css">
+    h2 { display: inline; font-size: 1em; margin-bottom: 0.2em; }
+    iframe { display: inline; border: 1px solid black; overflow: hidden;}
+  </style>
+  <script type="text/javascript">
+    function loadTest(id, url) {
+      document.getElementById(id).src = url;
+    }
+    function seqLoader() {
+      var iframes = document.getElementsByTagName('iframe');
+      for (var i=0; i<iframes.length; i++) {
+        iframes[i].addEventListener('load', (function(j) {
+          return function() {
+            var e = document.getElementById((j+1)+'_link');
+            if (e) loadTest(j+1, e.href);
+          }
+        })(i), false);
+      }
+      var e = document.getElementById('0_link');
+      if (e) loadTest(0, e.href);
+    }
+  </script>
+</head>
+<body onload="seqLoader()">
+
+    <div>
+      <iframe id="0" width="110" height="42"></iframe>
+      <h2><a id="0_link" href="conformance/badArgsArityLessThanArgc.html">conformance/badArgsArityLessThanArgc.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="1" width="110" height="42"></iframe>
+      <h2><a id="1_link" href="conformance/constants.html">conformance/constants.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="2" width="110" height="42"></iframe>
+      <h2><a id="2_link" href="conformance/fuzzTheAPI.html">conformance/fuzzTheAPI.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="3" width="110" height="42"></iframe>
+      <h2><a id="3_link" href="conformance/getContext.html">conformance/getContext.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="4" width="110" height="42"></iframe>
+      <h2><a id="4_link" href="conformance/methods.html">conformance/methods.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="5" width="110" height="42"></iframe>
+      <h2><a id="5_link" href="conformance/quickCheckAPI.html">conformance/quickCheckAPI.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="6" width="110" height="42"></iframe>
+      <h2><a id="6_link" href="conformance/quickCheckAPIBadArgs.html">conformance/quickCheckAPIBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="7" width="110" height="42"></iframe>
+      <h2><a id="7_link" href="conformance/webGLArrays.html">conformance/webGLArrays.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="8" width="110" height="42"></iframe>
+      <h2><a id="8_link" href="functions/bindBuffer.html">functions/bindBuffer.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="9" width="110" height="42"></iframe>
+      <h2><a id="9_link" href="functions/bindBufferBadArgs.html">functions/bindBufferBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="10" width="110" height="42"></iframe>
+      <h2><a id="10_link" href="functions/bindFramebufferLeaveNonZero.html">functions/bindFramebufferLeaveNonZero.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="11" width="110" height="42"></iframe>
+      <h2><a id="11_link" href="functions/bufferData.html">functions/bufferData.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="12" width="110" height="42"></iframe>
+      <h2><a id="12_link" href="functions/bufferDataBadArgs.html">functions/bufferDataBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="13" width="110" height="42"></iframe>
+      <h2><a id="13_link" href="functions/bufferSubData.html">functions/bufferSubData.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="14" width="110" height="42"></iframe>
+      <h2><a id="14_link" href="functions/bufferSubDataBadArgs.html">functions/bufferSubDataBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="15" width="110" height="42"></iframe>
+      <h2><a id="15_link" href="functions/copyTexImage2D.html">functions/copyTexImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="16" width="110" height="42"></iframe>
+      <h2><a id="16_link" href="functions/copyTexImage2DBadArgs.html">functions/copyTexImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="17" width="110" height="42"></iframe>
+      <h2><a id="17_link" href="functions/copyTexSubImage2D.html">functions/copyTexSubImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="18" width="110" height="42"></iframe>
+      <h2><a id="18_link" href="functions/copyTexSubImage2DBadArgs.html">functions/copyTexSubImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="19" width="110" height="42"></iframe>
+      <h2><a id="19_link" href="functions/deleteBufferBadArgs.html">functions/deleteBufferBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="20" width="110" height="42"></iframe>
+      <h2><a id="20_link" href="functions/drawArrays.html">functions/drawArrays.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="21" width="110" height="42"></iframe>
+      <h2><a id="21_link" href="functions/drawArraysOutOfBounds.html">functions/drawArraysOutOfBounds.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="22" width="110" height="42"></iframe>
+      <h2><a id="22_link" href="functions/drawElements.html">functions/drawElements.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="23" width="110" height="42"></iframe>
+      <h2><a id="23_link" href="functions/drawElementsBadArgs.html">functions/drawElementsBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="24" width="110" height="42"></iframe>
+      <h2><a id="24_link" href="functions/getImageData.html">functions/getImageData.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="25" width="110" height="42"></iframe>
+      <h2><a id="25_link" href="functions/getImageDataBadArgs.html">functions/getImageDataBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="26" width="110" height="42"></iframe>
+      <h2><a id="26_link" href="functions/isTests.html">functions/isTests.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="27" width="110" height="42"></iframe>
+      <h2><a id="27_link" href="functions/linkProgramBadArgs.html">functions/linkProgramBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="28" width="110" height="42"></iframe>
+      <h2><a id="28_link" href="functions/readPixels.html">functions/readPixels.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="29" width="110" height="42"></iframe>
+      <h2><a id="29_link" href="functions/readPixelsBadArgs.html">functions/readPixelsBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="30" width="110" height="42"></iframe>
+      <h2><a id="30_link" href="functions/texImage2D.html">functions/texImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="31" width="110" height="42"></iframe>
+      <h2><a id="31_link" href="functions/texImage2DBadArgs.html">functions/texImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="32" width="110" height="42"></iframe>
+      <h2><a id="32_link" href="functions/texImage2DHTML.html">functions/texImage2DHTML.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="33" width="110" height="42"></iframe>
+      <h2><a id="33_link" href="functions/texImage2DHTMLBadArgs.html">functions/texImage2DHTMLBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="34" width="110" height="42"></iframe>
+      <h2><a id="34_link" href="functions/texSubImage2D.html">functions/texSubImage2D.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="35" width="110" height="42"></iframe>
+      <h2><a id="35_link" href="functions/texSubImage2DBadArgs.html">functions/texSubImage2DBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="36" width="110" height="42"></iframe>
+      <h2><a id="36_link" href="functions/texSubImage2DHTML.html">functions/texSubImage2DHTML.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="37" width="110" height="42"></iframe>
+      <h2><a id="37_link" href="functions/texSubImage2DHTMLBadArgs.html">functions/texSubImage2DHTMLBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="38" width="110" height="42"></iframe>
+      <h2><a id="38_link" href="functions/uniformMatrix.html">functions/uniformMatrix.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="39" width="110" height="42"></iframe>
+      <h2><a id="39_link" href="functions/uniformMatrixBadArgs.html">functions/uniformMatrixBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="40" width="110" height="42"></iframe>
+      <h2><a id="40_link" href="functions/uniformf.html">functions/uniformf.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="41" width="110" height="42"></iframe>
+      <h2><a id="41_link" href="functions/uniformfBadArgs.html">functions/uniformfBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="42" width="110" height="42"></iframe>
+      <h2><a id="42_link" href="functions/uniformi.html">functions/uniformi.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="43" width="110" height="42"></iframe>
+      <h2><a id="43_link" href="functions/uniformiBadArgs.html">functions/uniformiBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="44" width="110" height="42"></iframe>
+      <h2><a id="44_link" href="functions/vertexAttrib.html">functions/vertexAttrib.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="45" width="110" height="42"></iframe>
+      <h2><a id="45_link" href="functions/vertexAttribBadArgs.html">functions/vertexAttribBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="46" width="110" height="42"></iframe>
+      <h2><a id="46_link" href="functions/vertexAttribPointer.html">functions/vertexAttribPointer.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="47" width="110" height="42"></iframe>
+      <h2><a id="47_link" href="functions/vertexAttribPointerBadArgs.html">functions/vertexAttribPointerBadArgs.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="48" width="110" height="42"></iframe>
+      <h2><a id="48_link" href="performance/CPUvsGPU.html">performance/CPUvsGPU.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="49" width="110" height="42"></iframe>
+      <h2><a id="49_link" href="performance/bandwidth.html">performance/bandwidth.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="50" width="110" height="42"></iframe>
+      <h2><a id="50_link" href="performance/jsGCPause.html">performance/jsGCPause.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="51" width="110" height="42"></iframe>
+      <h2><a id="51_link" href="performance/jsMatrixMult.html">performance/jsMatrixMult.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="52" width="110" height="42"></iframe>
+      <h2><a id="52_link" href="performance/jsToGLOverhead.html">performance/jsToGLOverhead.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="53" width="110" height="42"></iframe>
+      <h2><a id="53_link" href="glsl/arrayOutOfBounds.html">glsl/arrayOutOfBounds.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="54" width="110" height="42"></iframe>
+      <h2><a id="54_link" href="glsl/longLoops.html">glsl/longLoops.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="55" width="110" height="42"></iframe>
+      <h2><a id="55_link" href="glsl/uniformOutOfBounds.html">glsl/uniformOutOfBounds.html</a></h2>
+    </div>
+    
+
+    <div>
+      <iframe id="56" width="110" height="42"></iframe>
+      <h2><a id="56_link" href="glsl/unusedAttribsUniforms.html">glsl/unusedAttribsUniforms.html</a></h2>
+    </div>
+    
+</body>
+</html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-A.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-A.js
new file mode 100644 (file)
index 0000000..31039b5
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+//   - setup    -- set up state for testing the GL function, returns values
+//                 that need cleanup in teardown. Run once before entering a
+//                 test loop.
+//   - teardown -- do cleanup on setup's return values after testing is complete
+//   - generate -- generate a valid set of random arguments for the GL function
+//   - returnValueCleanup -- do cleanup on value returned by the tested GL function
+//   - cleanup  -- do cleanup on generated arguments from generate
+//   - checkArgValidity -- check if passed args are valid. Has a call signature
+//                         that matches generate's return value. Returns true
+//                         if args are valid, false if not.
+//
+//   Example test loop that demonstrates how the function args and return
+//   values flow together:
+//
+//   var setupArgs = argGen.setup();
+//   for (var i=0; i<numberOfTests; i++) {
+//     var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+//     var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+//     var rv = call the GL function with generatedArgs;
+//     argGen.returnValueCleanup(rv);
+//     argGen.cleanup.apply(argGen, generatedArgs);
+//   }
+//   argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// A
+
+  activeTexture : {
+    generate : function() { return [textureUnit.random()]; },
+    checkArgValidity : function(t) { return textureUnit.has(t); },
+    teardown : function() { GL.activeTexture(GL.TEXTURE0); }
+  },
+  attachShader : {
+    generate : function() {
+      var p = GL.createProgram();
+      var sh = GL.createShader(shaderType.random());
+      return [p, sh];
+    },
+    checkArgValidity : function(p, sh) {
+      return GL.isProgram(p) && GL.isShader(sh) && !GL.getAttachedShaders(p).has(sh);
+    },
+    cleanup : function(p, sh) {
+      try {GL.detachShader(p,sh);} catch(e) {}
+      try {GL.deleteProgram(p);} catch(e) {}
+      try {GL.deleteShader(sh);} catch(e) {}
+    }
+  }
+
+};
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B1.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B1.js
new file mode 100644 (file)
index 0000000..e8abf39
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+//   - setup    -- set up state for testing the GL function, returns values
+//                 that need cleanup in teardown. Run once before entering a
+//                 test loop.
+//   - teardown -- do cleanup on setup's return values after testing is complete
+//   - generate -- generate a valid set of random arguments for the GL function
+//   - returnValueCleanup -- do cleanup on value returned by the tested GL function
+//   - cleanup  -- do cleanup on generated arguments from generate
+//   - checkArgValidity -- check if passed args are valid. Has a call signature
+//                         that matches generate's return value. Returns true
+//                         if args are valid, false if not.
+//
+//   Example test loop that demonstrates how the function args and return
+//   values flow together:
+//
+//   var setupArgs = argGen.setup();
+//   for (var i=0; i<numberOfTests; i++) {
+//     var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+//     var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+//     var rv = call the GL function with generatedArgs;
+//     argGen.returnValueCleanup(rv);
+//     argGen.cleanup.apply(argGen, generatedArgs);
+//   }
+//   argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// B-1
+
+  bindAttribLocation : {
+    generate : function() {
+      var program = GL.createProgram();
+      return [program, randomVertexAttribute(), randomName()];
+    },
+    checkArgValidity : function(program, index, name) {
+      return GL.isProgram(program) && isVertexAttribute(index) && isValidName(name);
+    },
+    cleanup : function(program, index, name) {
+      try { GL.deleteProgram(program); } catch(e) {}
+    }
+  }
+
+};
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B2.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B2.js
new file mode 100644 (file)
index 0000000..327f442
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+//   - setup    -- set up state for testing the GL function, returns values
+//                 that need cleanup in teardown. Run once before entering a
+//                 test loop.
+//   - teardown -- do cleanup on setup's return values after testing is complete
+//   - generate -- generate a valid set of random arguments for the GL function
+//   - returnValueCleanup -- do cleanup on value returned by the tested GL function
+//   - cleanup  -- do cleanup on generated arguments from generate
+//   - checkArgValidity -- check if passed args are valid. Has a call signature
+//                         that matches generate's return value. Returns true
+//                         if args are valid, false if not.
+//
+//   Example test loop that demonstrates how the function args and return
+//   values flow together:
+//
+//   var setupArgs = argGen.setup();
+//   for (var i=0; i<numberOfTests; i++) {
+//     var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+//     var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+//     var rv = call the GL function with generatedArgs;
+//     argGen.returnValueCleanup(rv);
+//     argGen.cleanup.apply(argGen, generatedArgs);
+//   }
+//   argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// B-2
+
+  bindBuffer : {
+    generate : function(buf) {
+      return [bufferTarget.random(), GL.createBuffer()];
+    },
+    checkArgValidity : function(target, buf) {
+      if (!bufferTarget.has(target))
+        return false;
+      GL.bindBuffer(target, buf);
+      return GL.isBuffer(buf);
+    },
+    cleanup : function(t, buf, m) {
+      GL.deleteBuffer(buf);
+    }
+  },
+  bindFramebuffer : {
+    generate : function() {
+      return [GL.FRAMEBUFFER, Math.random() > 0.5 ? null : GL.createFramebuffer()];
+    },
+    checkArgValidity : function(target, fbo) {
+      if (target != GL.FRAMEBUFFER)
+        return false;
+      if (fbo != null)
+          GL.bindFramebuffer(target, fbo);
+      return (fbo == null || GL.isFramebuffer(fbo));
+    },
+    cleanup : function(target, fbo) {
+      GL.bindFramebuffer(target, null);
+      if (fbo)
+        GL.deleteFramebuffer(fbo);
+    }
+  },
+  bindRenderbuffer : {
+    generate : function() {
+      return [GL.RENDERBUFFER, Math.random() > 0.5 ? null : GL.createRenderbuffer()];
+    },
+    checkArgValidity : function(target, rbo) {
+      if (target != GL.RENDERBUFFER)
+        return false;
+      if (rbo != null)
+        GL.bindRenderbuffer(target, rbo);
+      return (rbo == null || GL.isRenderbuffer(rbo));
+    },
+    cleanup : function(target, rbo) {
+      GL.bindRenderbuffer(target, null);
+      if (rbo)
+        GL.deleteRenderbuffer(rbo);
+    }
+  },
+  bindTexture : {
+    generate : function() {
+      return [bindTextureTarget.random(), Math.random() > 0.5 ? null : GL.createTexture()];
+    },
+    checkArgValidity : function(target, o) {
+      if (!bindTextureTarget.has(target))
+        return false;
+      if (o != null)
+        GL.bindTexture(target, o);
+      return (o == null || GL.isTexture(o));
+    },
+    cleanup : function(target, o) {
+      GL.bindTexture(target, null);
+      if (o)
+        GL.deleteTexture(o);
+    }
+  },
+  blendColor : {
+    generate : function() { return randomColor(); },
+    teardown : function() { GL.blendColor(0,0,0,0); }
+  },
+  blendEquation : {
+    generate : function() { return [blendEquationMode.random()]; },
+    checkArgValidity : function(o) { return blendEquationMode.has(o); },
+    teardown : function() { GL.blendEquation(GL.FUNC_ADD); }
+  },
+  blendEquationSeparate : {
+    generate : function() {
+      return [blendEquationMode.random(), blendEquationMode.random()];
+    },
+    checkArgValidity : function(o,p) {
+      return blendEquationMode.has(o) && blendEquationMode.has(p);
+    },
+    teardown : function() { GL.blendEquationSeparate(GL.FUNC_ADD, GL.FUNC_ADD); }
+  },
+  blendFunc : {
+    generate : function() {
+      return [blendFuncSfactor.random(), blendFuncDfactor.random()];
+    },
+    checkArgValidity : function(s,d) {
+      return blendFuncSfactor.has(s) && blendFuncDfactor.has(d);
+    },
+    teardown : function() { GL.blendFunc(GL.ONE, GL.ZERO); }
+  },
+  blendFuncSeparate : {
+    generate : function() {
+      return [blendFuncSfactor.random(), blendFuncDfactor.random(),
+              blendFuncSfactor.random(), blendFuncDfactor.random()];
+    },
+    checkArgValidity : function(s,d,as,ad) {
+      return blendFuncSfactor.has(s) && blendFuncDfactor.has(d) &&
+              blendFuncSfactor.has(as) && blendFuncDfactor.has(ad) ;
+    },
+    teardown : function() {
+      GL.blendFuncSeparate(GL.ONE, GL.ZERO, GL.ONE, GL.ZERO);
+    }
+  }
+
+};
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B3.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B3.js
new file mode 100644 (file)
index 0000000..7b7f46c
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+//   - setup    -- set up state for testing the GL function, returns values
+//                 that need cleanup in teardown. Run once before entering a
+//                 test loop.
+//   - teardown -- do cleanup on setup's return values after testing is complete
+//   - generate -- generate a valid set of random arguments for the GL function
+//   - returnValueCleanup -- do cleanup on value returned by the tested GL function
+//   - cleanup  -- do cleanup on generated arguments from generate
+//   - checkArgValidity -- check if passed args are valid. Has a call signature
+//                         that matches generate's return value. Returns true
+//                         if args are valid, false if not.
+//
+//   Example test loop that demonstrates how the function args and return
+//   values flow together:
+//
+//   var setupArgs = argGen.setup();
+//   for (var i=0; i<numberOfTests; i++) {
+//     var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+//     var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+//     var rv = call the GL function with generatedArgs;
+//     argGen.returnValueCleanup(rv);
+//     argGen.cleanup.apply(argGen, generatedArgs);
+//   }
+//   argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// B-3
+
+  bufferData : {
+    setup : function() {
+      var buf = GL.createBuffer();
+      var ebuf = GL.createBuffer();
+      GL.bindBuffer(GL.ARRAY_BUFFER, buf);
+      GL.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, ebuf);
+      return [buf, ebuf];
+    },
+    generate : function(buf, ebuf) {
+      return [bufferTarget.random(), randomBufferData(), bufferMode.random()];
+    },
+    checkArgValidity : function(target, bufData, mode) {
+      return bufferTarget.has(target) && isBufferData(bufData) && bufferMode.has(mode);
+    },
+    teardown : function(buf, ebuf) {
+      GL.deleteBuffer(buf);
+      GL.deleteBuffer(ebuf);
+    },
+  }
+
+};
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B4.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-B4.js
new file mode 100644 (file)
index 0000000..6881c32
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+//   - setup    -- set up state for testing the GL function, returns values
+//                 that need cleanup in teardown. Run once before entering a
+//                 test loop.
+//   - teardown -- do cleanup on setup's return values after testing is complete
+//   - generate -- generate a valid set of random arguments for the GL function
+//   - returnValueCleanup -- do cleanup on value returned by the tested GL function
+//   - cleanup  -- do cleanup on generated arguments from generate
+//   - checkArgValidity -- check if passed args are valid. Has a call signature
+//                         that matches generate's return value. Returns true
+//                         if args are valid, false if not.
+//
+//   Example test loop that demonstrates how the function args and return
+//   values flow together:
+//
+//   var setupArgs = argGen.setup();
+//   for (var i=0; i<numberOfTests; i++) {
+//     var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+//     var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+//     var rv = call the GL function with generatedArgs;
+//     argGen.returnValueCleanup(rv);
+//     argGen.cleanup.apply(argGen, generatedArgs);
+//   }
+//   argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// B-4
+
+  bufferSubData : {
+    setup : function() {
+      var buf = GL.createBuffer();
+      var ebuf = GL.createBuffer();
+      GL.bindBuffer(GL.ARRAY_BUFFER, buf);
+      GL.bufferData(GL.ARRAY_BUFFER, 256, GL.STATIC_DRAW);
+      GL.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, ebuf);
+      GL.bufferData(GL.ELEMENT_ARRAY_BUFFER, 256, GL.STATIC_DRAW);
+      return [buf, ebuf];
+    },
+    generate : function(buf, ebuf) {
+      var d = randomBufferSubData(256);
+      return [bufferTarget.random(), d.offset, d.data];
+    },
+    checkArgValidity : function(target, offset, data) {
+      return bufferTarget.has(target) && offset >= 0 && data.byteLength >= 0 && offset + data.byteLength <= 256;
+    },
+    teardown : function(buf, ebuf) {
+      GL.deleteBuffer(buf);
+      GL.deleteBuffer(ebuf);
+    },
+  }
+
+};
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-C.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-C.js
new file mode 100644 (file)
index 0000000..974ff74
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+//   - setup    -- set up state for testing the GL function, returns values
+//                 that need cleanup in teardown. Run once before entering a
+//                 test loop.
+//   - teardown -- do cleanup on setup's return values after testing is complete
+//   - generate -- generate a valid set of random arguments for the GL function
+//   - returnValueCleanup -- do cleanup on value returned by the tested GL function
+//   - cleanup  -- do cleanup on generated arguments from generate
+//   - checkArgValidity -- check if passed args are valid. Has a call signature
+//                         that matches generate's return value. Returns true
+//                         if args are valid, false if not.
+//
+//   Example test loop that demonstrates how the function args and return
+//   values flow together:
+//
+//   var setupArgs = argGen.setup();
+//   for (var i=0; i<numberOfTests; i++) {
+//     var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+//     var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+//     var rv = call the GL function with generatedArgs;
+//     argGen.returnValueCleanup(rv);
+//     argGen.cleanup.apply(argGen, generatedArgs);
+//   }
+//   argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// C
+
+  checkFramebufferStatus : {
+    generate : function() {
+      return [Math.random() > 0.5 ? null : GL.createFramebuffer()];
+    },
+    checkArgValidity : function(fbo) {
+      if (fbo != null)
+        GL.bindFramebuffer(GL.FRAMEBUFFER, fbo);
+      return fbo == null || GL.isFramebuffer(fbo);
+    },
+    cleanup : function(fbo){
+      GL.bindFramebuffer(GL.FRAMEBUFFER, null);
+      if (fbo != null)
+        try{ GL.deleteFramebuffer(fbo); } catch(e) {}
+    }
+  },
+  clear : {
+    generate : function() { return [clearMask.random()]; },
+    checkArgValidity : function(mask) { return clearMask.has(mask); }
+  },
+  clearColor : {
+    generate : function() { return randomColor(); },
+    teardown : function() { GL.clearColor(0,0,0,0); }
+  },
+  clearDepth : {
+    generate : function() { return [Math.random()]; },
+    teardown : function() { GL.clearDepth(1); }
+  },
+  clearStencil : {
+    generate : function() { return [randomStencil()]; },
+    teardown : function() { GL.clearStencil(0); }
+  },
+  colorMask : {
+    generate : function() {
+      return [randomBool(), randomBool(), randomBool(), randomBool()];
+    },
+    teardown : function() { GL.colorMask(true, true, true, true); }
+  },
+  compileShader : {}, // FIXME
+  copyTexImage2D : {}, // FIXME
+  copyTexSubImage2D : {}, // FIXME
+  createBuffer : {
+    generate : function() { return []; },
+    returnValueCleanup : function(o) { GL.deleteBuffer(o); }
+  },
+  createFramebuffer : {
+    generate : function() { return []; },
+    returnValueCleanup : function(o) { GL.deleteFramebuffer(o); }
+  },
+  createProgram : {
+    generate : function() { return []; },
+    returnValueCleanup : function(o) { GL.deleteProgram(o); }
+  },
+  createRenderbuffer : {
+    generate : function() { return []; },
+    returnValueCleanup : function(o) { GL.deleteRenderbuffer(o); }
+  },
+  createShader : {
+    generate : function() { return [shaderType.random()]; },
+    checkArgValidity : function(t) { return shaderType.has(t); },
+    returnValueCleanup : function(o) { GL.deleteShader(o); }
+  },
+  createTexture : {
+    generate : function() { return []; },
+    returnValueCleanup : function(o) { GL.deleteTexture(o); }
+  },
+  cullFace : {
+    generate : function() { return [cullFace.random()]; },
+    checkArgValidity : function(f) { return cullFace.has(f); },
+    teardown : function() { GL.cullFace(GL.BACK); }
+  }
+
+};
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-D_G.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-D_G.js
new file mode 100644 (file)
index 0000000..7d21851
--- /dev/null
@@ -0,0 +1,252 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+//   - setup    -- set up state for testing the GL function, returns values
+//                 that need cleanup in teardown. Run once before entering a
+//                 test loop.
+//   - teardown -- do cleanup on setup's return values after testing is complete
+//   - generate -- generate a valid set of random arguments for the GL function
+//   - returnValueCleanup -- do cleanup on value returned by the tested GL function
+//   - cleanup  -- do cleanup on generated arguments from generate
+//   - checkArgValidity -- check if passed args are valid. Has a call signature
+//                         that matches generate's return value. Returns true
+//                         if args are valid, false if not.
+//
+//   Example test loop that demonstrates how the function args and return
+//   values flow together:
+//
+//   var setupArgs = argGen.setup();
+//   for (var i=0; i<numberOfTests; i++) {
+//     var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+//     var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+//     var rv = call the GL function with generatedArgs;
+//     argGen.returnValueCleanup(rv);
+//     argGen.cleanup.apply(argGen, generatedArgs);
+//   }
+//   argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// D
+
+  deleteBuffer : {
+    generate : function() { return [GL.createBuffer()]; },
+    checkArgValidity : function(o) {
+      GL.bindBuffer(GL.ARRAY_BUFFER, o);
+      return GL.isBuffer(o);
+    },
+    cleanup : function(o) {
+      GL.bindBuffer(GL.ARRAY_BUFFER, null);
+      try { GL.deleteBuffer(o); } catch(e) {}
+    }
+  },
+  deleteFramebuffer : {
+    generate : function() { return [GL.createFramebuffer()]; },
+    checkArgValidity : function(o) {
+      GL.bindFramebuffer(GL.FRAMEBUFFER, o);
+      return GL.isFramebuffer(o);
+    },
+    cleanup : function(o) {
+      GL.bindFramebuffer(GL.FRAMEBUFFER, null);
+      try { GL.deleteFramebuffer(o); } catch(e) {}
+    }
+  },
+  deleteProgram : {
+    generate : function() { return [GL.createProgram()]; },
+    checkArgValidity : function(o) { return GL.isProgram(o); },
+    cleanup : function(o) { try { GL.deleteProgram(o); } catch(e) {} }
+  },
+  deleteRenderbuffer : {
+    generate : function() { return [GL.createRenderbuffer()]; },
+    checkArgValidity : function(o) {
+      GL.bindRenderbuffer(GL.RENDERBUFFER, o);
+      return GL.isRenderbuffer(o);
+    },
+    cleanup : function(o) {
+      GL.bindRenderbuffer(GL.RENDERBUFFER, null);
+      try { GL.deleteRenderbuffer(o); } catch(e) {}
+    }
+  },
+  deleteShader : {
+    generate : function() { return [GL.createShader(shaderType.random())]; },
+    checkArgValidity : function(o) { return GL.isShader(o); },
+    cleanup : function(o) { try { GL.deleteShader(o); } catch(e) {} }
+  },
+  deleteTexture : {
+    generate : function() { return [GL.createTexture()]; },
+    checkArgValidity : function(o) {
+      GL.bindTexture(GL.TEXTURE_2D, o);
+      return GL.isTexture(o);
+    },
+    cleanup : function(o) {
+      GL.bindTexture(GL.TEXTURE_2D, null);
+      try { GL.deleteTexture(o); } catch(e) {}
+    }
+  },
+  depthFunc : {
+    generate : function() { return [depthFuncFunc.random()]; },
+    checkArgValidity : function(f) { return depthFuncFunc.has(f); },
+    teardown : function() { GL.depthFunc(GL.LESS); }
+  },
+  depthMask : {
+    generate : function() { return [randomBool()]; },
+    teardown : function() { GL.depthFunc(GL.TRUE); }
+  },
+  depthRange : {
+    generate : function() { return [Math.random(), Math.random()]; },
+    teardown : function() { GL.depthRange(0, 1); }
+  },
+  detachShader : {
+    generate : function() {
+      var p = GL.createProgram();
+      var sh = GL.createShader(shaderType.random());
+      GL.attachShader(p, sh);
+      return [p, sh];
+    },
+    checkArgValidity : function(p, sh) {
+      return GL.isProgram(p) && GL.isShader(sh) && GL.getAttachedShaders(p).has(sh);
+    },
+    cleanup : function(p, sh) {
+      try {GL.deleteProgram(p);} catch(e) {}
+      try {GL.deleteShader(sh);} catch(e) {}
+    }
+  },
+  disable : {
+    generate : function() { return [enableCap.random()]; },
+    checkArgValidity : function(c) { return enableCap.has(c); },
+    cleanup : function(c) { if (c == GL.DITHER) GL.enable(c); }
+  },
+  disableVertexAttribArray : {
+    generate : function() { return [randomVertexAttribute()]; },
+    checkArgValidity : function(v) { return isVertexAttribute(v); }
+  },
+  drawArrays : {}, // FIXME
+  drawElements : {}, // FIXME
+
+// E
+
+  enable : {
+    generate : function() { return [enableCap.random()]; },
+    checkArgValidity : function(c) { return enableCap.has(c); },
+    cleanup : function(c) { if (c != GL.DITHER) GL.disable(c); }
+  },
+  enableVertexAttribArray : {
+    generate : function() { return [randomVertexAttribute()]; },
+    checkArgValidity : function(v) { return isVertexAttribute(castToInt(v)); },
+    cleanup : function(v) { GL.disableVertexAttribArray(v); }
+  },
+
+// F
+
+  finish : {
+    generate : function() { return []; }
+  },
+  flush : {
+    generate : function() { return []; }
+  },
+  framebufferRenderbuffer : {}, // FIXME
+  framebufferTexture2D : {}, // FIXME
+  frontFace : {
+    generate : function() { return [frontFaceMode.random()]; },
+    checkArgValidity : function(c) { return frontFaceMode.has(c); },
+    cleanup : function(c) { GL.frontFace(GL.CCW); }
+  },
+
+// G-1
+
+  generateMipmap : {
+    setup : function() {
+      var tex = GL.createTexture();
+      var tex2 = GL.createTexture();
+      GL.bindTexture(GL.TEXTURE_2D, tex);
+      GL.bindTexture(GL.TEXTURE_CUBE_MAP, tex2);
+      var pix = new Uint8Array(16*16*4);
+      GL.texImage2D(GL.TEXTURE_2D, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+      GL.texImage2D(GL.TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+      GL.texImage2D(GL.TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+      GL.texImage2D(GL.TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+      GL.texImage2D(GL.TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+      GL.texImage2D(GL.TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+      GL.texImage2D(GL.TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL.RGBA, 16, 16, 0, GL.RGBA, GL.UNSIGNED_BYTE, pix);
+    },
+    generate : function() { return [bindTextureTarget.random()]; },
+    checkArgValidity : function(t) { return bindTextureTarget.has(t); },
+    teardown : function(tex, tex2) {
+      GL.bindTexture(GL.TEXTURE_2D, null);
+      GL.bindTexture(GL.TEXTURE_CUBE_MAP, null);
+      GL.deleteTexture(tex);
+      GL.deleteTexture(tex2);
+    }
+  },
+  getActiveAttrib : {
+  /* FIXME the queried attrib needs to be an active one
+    generate : function() {
+      var program = GL.createProgram();
+      return [program, randomVertexAttribute()];
+    },
+    checkArgValidity : function(program, index) {
+      return GL.isProgram(program) && isVertexAttribute(index);
+    },
+    cleanup : function(program, index) {
+      GL.deleteProgram(program);
+    }
+  */
+  },
+  getActiveUniform : {}, // FIXME
+  getAttachedShaders : {
+    setup : function() {
+      var program = GL.createProgram();
+      var s1 = GL.createShader(GL.VERTEX_SHADER);
+      var s2 = GL.createShader(GL.FRAGMENT_SHADER);
+      GL.attachShader(program, s1);
+      GL.attachShader(program, s2);
+      return [program, s1, s2];
+    },
+    generate : function(program, s1, s2) {
+      return [program]
+    },
+    checkArgValidity : function(program) {
+      return GL.isProgram(program);
+    },
+    teardown : function(program, s1, s2) {
+      GL.deleteProgram(program);
+      GL.deleteShader(s1);
+      GL.deleteShader(s2);
+    }
+  }
+
+};
+
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-G_I.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-G_I.js
new file mode 100644 (file)
index 0000000..7af58b0
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+//   - setup    -- set up state for testing the GL function, returns values
+//                 that need cleanup in teardown. Run once before entering a
+//                 test loop.
+//   - teardown -- do cleanup on setup's return values after testing is complete
+//   - generate -- generate a valid set of random arguments for the GL function
+//   - returnValueCleanup -- do cleanup on value returned by the tested GL function
+//   - cleanup  -- do cleanup on generated arguments from generate
+//   - checkArgValidity -- check if passed args are valid. Has a call signature
+//                         that matches generate's return value. Returns true
+//                         if args are valid, false if not.
+//
+//   Example test loop that demonstrates how the function args and return
+//   values flow together:
+//
+//   var setupArgs = argGen.setup();
+//   for (var i=0; i<numberOfTests; i++) {
+//     var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+//     var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+//     var rv = call the GL function with generatedArgs;
+//     argGen.returnValueCleanup(rv);
+//     argGen.cleanup.apply(argGen, generatedArgs);
+//   }
+//   argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// G-2
+
+  getAttribLocation : {
+    generate : function() {
+      var program = GL.createProgram();
+      var name = randomName();
+      GL.bindAttribLocation(program, randomVertexAttribute(), name);
+      return [program, name];
+    },
+    checkArgValidity : function(program, name) {
+      return GL.isProgram(program) && isValidName(name);
+    },
+    cleanup : function(program, name) {
+      try { GL.deleteProgram(program); } catch(e) {}
+    }
+  },/*
+  getParameter : {
+    generate : function() { return [getParameterPname.random()]; },
+    checkArgValidity : function(p) { return getParameterPname.has(p); }
+  },
+  getBufferParameter : {}, // FIXME
+  getError : {
+    generate : function() { return []; }
+  },
+  getFramebufferAttachmentParameter : {}, // FIXME
+  getProgramParameter : {}, // FIXME
+  getProgramInfoLog : {}, // FIXME
+  getRenderbufferParameter : {}, // FIXME
+  getShaderParameter : {}, // FIXME
+  getShaderInfoLog : {}, // FIXME
+  getShaderSource : {}, // FIXME
+  getTexParameter : {}, // FIXME
+  getUniform : {}, // FIXME
+  getUniformLocation : {}, // FIXME
+  getVertexAttrib : {}, // FIXME
+  getVertexAttribOffset : {}, // FIXME
+
+// H
+
+  hint : {
+    generate : function() { return [GL.GENERATE_MIPMAP_HINT, mipmapHint.random()]; },
+    checkValidArgs : function(h, m) {
+      return h == GL.GENERATE_MIPMAP_HINT && mipmapHint.has(m);
+    },
+    teardown : function(){ GL.hint(GL.GENERATE_MIPMAP_HINT, GL.DONT_CARE); }
+  },
+
+// I
+
+  isBuffer : {
+    generate : function() { return [GL.createBuffer()]; },
+    cleanup : function(o) { try { GL.deleteBuffer(o); } catch(e) {} }
+  },
+  isEnabled : {
+    generate : function() { return [enableCap.random()]; },
+    checkArgValidity : function(c) { return enableCap.has(c); }
+  },
+  isFramebuffer : {
+    generate : function() { return [GL.createFramebuffer()]; },
+    cleanup : function(o) { try { GL.deleteFramebuffer(o); } catch(e) {} }
+  },
+  isProgram : {
+    generate : function() { return [GL.createProgram()]; },
+    cleanup : function(o) { try { GL.deleteProgram(o); } catch(e) {} }
+  },
+  isRenderbuffer : {
+    generate : function() { return [GL.createRenderbuffer()]; },
+    cleanup : function(o) { try { GL.deleteRenderbuffer(o); } catch(e) {} }
+  },
+  isShader : {
+    generate : function() { return [GL.createShader(shaderType.random())]; },
+    cleanup : function(o) { try { GL.deleteShader(o); } catch(e) {} }
+  },
+  isTexture : {
+    generate : function() { return [GL.createTexture()]; },
+    cleanup : function(o) { try { GL.deleteTexture(o); } catch(e) {} }
+  }*/
+
+};
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-L_S.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-L_S.js
new file mode 100644 (file)
index 0000000..db7f38d
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+//   - setup    -- set up state for testing the GL function, returns values
+//                 that need cleanup in teardown. Run once before entering a
+//                 test loop.
+//   - teardown -- do cleanup on setup's return values after testing is complete
+//   - generate -- generate a valid set of random arguments for the GL function
+//   - returnValueCleanup -- do cleanup on value returned by the tested GL function
+//   - cleanup  -- do cleanup on generated arguments from generate
+//   - checkArgValidity -- check if passed args are valid. Has a call signature
+//                         that matches generate's return value. Returns true
+//                         if args are valid, false if not.
+//
+//   Example test loop that demonstrates how the function args and return
+//   values flow together:
+//
+//   var setupArgs = argGen.setup();
+//   for (var i=0; i<numberOfTests; i++) {
+//     var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+//     var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+//     var rv = call the GL function with generatedArgs;
+//     argGen.returnValueCleanup(rv);
+//     argGen.cleanup.apply(argGen, generatedArgs);
+//   }
+//   argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// L
+
+  lineWidth : {
+    generate : function() { return [randomLineWidth()]; },
+    teardown : function() { GL.lineWidth(1); }
+  },
+  linkProgram : {}, // FIXME
+
+// P
+  pixelStorei : {
+    generate : function() {
+      return [pixelStoreiPname.random(), pixelStoreiParam.random()];
+    },
+    checkArgValidity : function(pname, param) {
+      return pixelStoreiPname.has(pname) && pixelStoreiParam.has(param);
+    },
+    teardown : function() {
+      GL.pixelStorei(GL.PACK_ALIGNMENT, 4);
+      GL.pixelStorei(GL.UNPACK_ALIGNMENT, 4);
+    }
+  },
+  polygonOffset : {
+    generate : function() { return [randomFloat(), randomFloat()]; },
+    teardown : function() { GL.polygonOffset(0,0); }
+  },
+
+// R
+
+  readPixels : {}, // FIXME
+  renderbufferStorage : {}, // FIXME
+
+// S-1
+
+  sampleCoverage : {
+    generate : function() { return [randomFloatFromRange(0,1), randomBool()] },
+    teardown : function() { GL.sampleCoverage(1, false); }
+  },
+  scissor : {
+    generate : function() {
+      return [randomInt(3000)-1500, randomInt(3000)-1500, randomIntFromRange(0,3000), randomIntFromRange(0,3000)];
+    },
+    checkArgValidity : function(x,y,w,h) {
+      return castToInt(w) >= 0 && castToInt(h) >= 0;
+    },
+    teardown : function() {
+      GL.scissor(0,0,GL.canvas.width, GL.canvas.height);
+    }
+  },
+  shaderSource : {}, // FIXME
+  stencilFunc : {
+    generate : function(){
+      return [stencilFuncFunc.random(), randomInt(MaxStencilValue), randomInt(0xffffffff)];
+    },
+    checkArgValidity : function(func, ref, mask) {
+      return stencilFuncFunc.has(func) && castToInt(ref) >= 0 && castToInt(ref) < MaxStencilValue;
+    },
+    teardown : function() {
+      GL.stencilFunc(GL.ALWAYS, 0, 0xffffffff);
+    }
+  },
+  stencilFuncSeparate : {
+    generate : function(){
+      return [cullFace.random(), stencilFuncFunc.random(), randomInt(MaxStencilValue), randomInt(0xffffffff)];
+    },
+    checkArgValidity : function(face, func, ref, mask) {
+      return cullFace.has(face) && stencilFuncFunc.has(func) && castToInt(ref) >= 0 && castToInt(ref) < MaxStencilValue;
+    },
+    teardown : function() {
+      GL.stencilFunc(GL.ALWAYS, 0, 0xffffffff);
+    }
+  },
+  stencilMask : {
+    generate : function() { return [randomInt(0xffffffff)]; },
+    teardown : function() { GL.stencilMask(0xffffffff); }
+  }
+
+};
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-S_V.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/argGenerators-S_V.js
new file mode 100644 (file)
index 0000000..726f6ef
--- /dev/null
@@ -0,0 +1,229 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+// ArgGenerators contains argument generators for WebGL functions.
+// The argument generators are used for running random tests against the WebGL
+// functions.
+//
+// ArgGenerators is an object consisting of functionName : argGen -properties.
+//
+// functionName is a WebGL context function name and the argGen is an argument
+// generator object that encapsulates the requirements to run
+// randomly generated tests on the WebGL function.
+//
+// An argGen object has the following methods:
+//   - setup    -- set up state for testing the GL function, returns values
+//                 that need cleanup in teardown. Run once before entering a
+//                 test loop.
+//   - teardown -- do cleanup on setup's return values after testing is complete
+//   - generate -- generate a valid set of random arguments for the GL function
+//   - returnValueCleanup -- do cleanup on value returned by the tested GL function
+//   - cleanup  -- do cleanup on generated arguments from generate
+//   - checkArgValidity -- check if passed args are valid. Has a call signature
+//                         that matches generate's return value. Returns true
+//                         if args are valid, false if not.
+//
+//   Example test loop that demonstrates how the function args and return
+//   values flow together:
+//
+//   var setupArgs = argGen.setup();
+//   for (var i=0; i<numberOfTests; i++) {
+//     var generatedArgs = argGen.generate.apply(argGen, setupArgs);
+//     var validArgs = argGen.checkArgValidity.apply(argGen, generatedArgs);
+//     var rv = call the GL function with generatedArgs;
+//     argGen.returnValueCleanup(rv);
+//     argGen.cleanup.apply(argGen, generatedArgs);
+//   }
+//   argGen.teardown.apply(argGen, setupArgs);
+//
+ArgGenerators = {
+
+// GL functions in alphabetical order
+
+// S-2
+
+  stencilMaskSeparate : {
+    generate : function() { return [cullFace.random(), randomInt(0xffffffff)]; },
+    checkArgValidity : function(face, mask) {
+      return cullFace.has(face);
+    },
+    teardown : function() { GL.stencilMask(0xffffffff); }
+  },
+  stencilOp : {
+    generate : function() {
+      return [stencilOp.random(), stencilOp.random(), stencilOp.random()];
+    },
+    checkArgValidity : function(sfail, dpfail, dppass) {
+      return stencilOp.has(sfail) && stencilOp.has(dpfail) && stencilOp.has(dppass);
+    },
+    teardown : function() { GL.stencilOp(GL.KEEP, GL.KEEP, GL.KEEP); }
+  },
+  stencilOpSeparate : {
+    generate : function() {
+      return [cullFace.random(), stencilOp.random(), stencilOp.random(), stencilOp.random()];
+    },
+    checkArgValidity : function(face, sfail, dpfail, dppass) {
+      return cullFace.has(face) && stencilOp.has(sfail) &&
+              stencilOp.has(dpfail) && stencilOp.has(dppass);
+    },
+    teardown : function() { GL.stencilOp(GL.KEEP, GL.KEEP, GL.KEEP); }
+  },
+
+// T
+  texImage2D : {
+    noAlreadyTriedCheck : true, // Object.toSource is very slow here
+    setup : function() {
+      var tex = GL.createTexture();
+      var tex2 = GL.createTexture();
+      GL.bindTexture(GL.TEXTURE_2D, tex);
+      GL.bindTexture(GL.TEXTURE_CUBE_MAP, tex2);
+      return [tex, tex2];
+    },
+    generate : function() {
+      var format = texImageFormat.random();
+      if (Math.random() < 0.5) {
+        var img = randomImage(16,16);
+        var a = [ texImageTarget.random(), 0, format, format, GL.UNSIGNED_BYTE, img ];
+        return a;
+      } else {
+        var pix = null;
+        if (Math.random > 0.5) {
+          pix = new Uint8Array(16*16*4);
+        }
+        return [
+          texImageTarget.random(), 0,
+          format, 16, 16, 0,
+          format, GL.UNSIGNED_BYTE, pix
+        ];
+      }
+    },
+    checkArgValidity : function(target, level, internalformat, width, height, border, format, type, data) {
+               // or : function(target, level, internalformat, format, type, image)
+      if (!texImageTarget.has(target) || castToInt(level) < 0)
+        return false;
+      if (arguments.length <= 6) {
+        var xformat = width;
+        var xtype = height;
+        var ximage = border;
+        if ((ximage instanceof HTMLImageElement ||
+             ximage instanceof HTMLVideoElement ||
+             ximage instanceof HTMLCanvasElement ||
+             ximage instanceof ImageData) &&
+            texImageInternalFormat.has(internalformat) &&
+            texImageFormat.has(xformat) &&
+            texImageType.has(xtype) &&
+            internalformat == xformat)
+          return true;
+        return false;
+      }
+      var w = castToInt(width), h = castToInt(height), b = castToInt(border);
+      return texImageInternalFormat.has(internalformat) && w >= 0 && h >= 0 &&
+            b == 0 && (data == null || data.byteLength == w*h*4) &&
+            texImageFormat.has(format) && texImageType.has(type)
+            && internalformat == format;
+    },
+    teardown : function(tex, tex2) {
+      GL.bindTexture(GL.TEXTURE_2D, null);
+      GL.bindTexture(GL.TEXTURE_CUBE_MAP, null);
+      GL.deleteTexture(tex);
+      GL.deleteTexture(tex2);
+    }
+  },
+  texParameterf : {
+    generate : function() {
+      var pname = texParameterPname.random();
+      var param = texParameterParam[pname].random();
+      return [bindTextureTarget.random(), pname, param];
+    },
+    checkArgValidity : function(target, pname, param) {
+      if (!bindTextureTarget.has(target))
+        return false;
+      if (!texParameterPname.has(pname))
+        return false;
+      return texParameterParam[pname].has(param);
+    }
+  },
+  texParameteri : {
+    generate : function() {
+      var pname = texParameterPname.random();
+      var param = texParameterParam[pname].random();
+      return [bindTextureTarget.random(), pname, param];
+    },
+    checkArgValidity : function(target, pname, param) {
+      if (!bindTextureTarget.has(target))
+        return false;
+      if (!texParameterPname.has(pname))
+        return false;
+      return texParameterParam[pname].has(param);
+    }
+  },
+  texSubImage2D : {}, // FIXME
+
+// U
+
+  uniform1f : {}, // FIXME
+  uniform1fv : {}, // FIXME
+  uniform1i : {}, // FIXME
+  uniform1iv : {}, // FIXME
+  uniform2f : {}, // FIXME
+  uniform2fv : {}, // FIXME
+  uniform2i : {}, // FIXME
+  uniform2iv : {}, // FIXME
+  uniform3f : {}, // FIXME
+  uniform3fv : {}, // FIXME
+  uniform3i : {}, // FIXME
+  uniform3iv : {}, // FIXME
+  uniform4f : {}, // FIXME
+  uniform4fv : {}, // FIXME
+  uniform4i : {}, // FIXME
+  uniform4iv : {}, // FIXME
+  uniformMatrix2fv : {}, // FIXME
+  uniformMatrix3fv : {}, // FIXME
+  uniformMatrix4fv : {}, // FIXME
+  useProgram : {}, // FIXME
+
+// V
+
+  validateProgram : {}, // FIXME
+  vertexAttrib1f : {}, // FIXME
+  vertexAttrib1fv : {}, // FIXME
+  vertexAttrib2f : {}, // FIXME
+  vertexAttrib2fv : {}, // FIXME
+  vertexAttrib3f : {}, // FIXME
+  vertexAttrib3fv : {}, // FIXME
+  vertexAttrib4f : {}, // FIXME
+  vertexAttrib4fv : {}, // FIXME
+  vertexAttribPointer : {}, // FIXME
+  viewport : {
+    generate : function() {
+      return [randomInt(3000)-1500, randomInt(3000)-1500, randomIntFromRange(0,3000), randomIntFromRange(0,3000)];
+    },
+    checkArgValidity : function(x,y,w,h) {
+      return castToInt(w) >= 0 && castToInt(h) >= 0;
+    },
+    teardown : function() {
+      GL.viewport(0,0,GL.canvas.width, GL.canvas.height);
+    }
+  }
+
+};
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/badArgsArityLessThanArgc.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/badArgsArityLessThanArgc.html
new file mode 100644 (file)
index 0000000..2eaf8f0
--- /dev/null
@@ -0,0 +1,597 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+/*
+  The following tests are generated from
+  http://www.khronos.org/registry/gles/api/2.0/gl2.h
+  and api_modifications.txt
+*/
+Tests.test_activeTexture = function(gl) {
+  assertFail(function(){ gl.activeTexture(); });
+}
+Tests.test_attachShader = function(gl) {
+  assertFail(function(){ gl.attachShader(); });
+  assertFail(function(){ gl.attachShader(0); });
+}
+Tests.test_bindAttribLocation = function(gl) {
+  assertFail(function(){ gl.bindAttribLocation(); });
+  assertFail(function(){ gl.bindAttribLocation(0); });
+  assertFail(function(){ gl.bindAttribLocation(0,0); });
+}
+Tests.test_bindBuffer = function(gl) {
+  assertFail(function(){ gl.bindBuffer(); });
+  assertFail(function(){ gl.bindBuffer(0); });
+}
+Tests.test_bindFramebuffer = function(gl) {
+  assertFail(function(){ gl.bindFramebuffer(); });
+  assertFail(function(){ gl.bindFramebuffer(0); });
+}
+Tests.test_bindRenderbuffer = function(gl) {
+  assertFail(function(){ gl.bindRenderbuffer(); });
+  assertFail(function(){ gl.bindRenderbuffer(0); });
+}
+Tests.test_bindTexture = function(gl) {
+  assertFail(function(){ gl.bindTexture(); });
+  assertFail(function(){ gl.bindTexture(0); });
+}
+Tests.test_blendColor = function(gl) {
+  assertFail(function(){ gl.blendColor(); });
+  assertFail(function(){ gl.blendColor(0); });
+  assertFail(function(){ gl.blendColor(0,0); });
+  assertFail(function(){ gl.blendColor(0,0,0); });
+}
+Tests.test_blendEquation = function(gl) {
+  assertFail(function(){ gl.blendEquation(); });
+}
+Tests.test_blendEquationSeparate = function(gl) {
+  assertFail(function(){ gl.blendEquationSeparate(); });
+  assertFail(function(){ gl.blendEquationSeparate(0); });
+}
+Tests.test_blendFunc = function(gl) {
+  assertFail(function(){ gl.blendFunc(); });
+  assertFail(function(){ gl.blendFunc(0); });
+}
+Tests.test_blendFuncSeparate = function(gl) {
+  assertFail(function(){ gl.blendFuncSeparate(); });
+  assertFail(function(){ gl.blendFuncSeparate(0); });
+  assertFail(function(){ gl.blendFuncSeparate(0,0); });
+  assertFail(function(){ gl.blendFuncSeparate(0,0,0); });
+}
+Tests.test_bufferData = function(gl) {
+  assertFail(function(){ gl.bufferData(); });
+  assertFail(function(){ gl.bufferData(0); });
+  assertFail(function(){ gl.bufferData(0,0); });
+}
+Tests.test_bufferSubData = function(gl) {
+  assertFail(function(){ gl.bufferSubData(); });
+  assertFail(function(){ gl.bufferSubData(0); });
+  assertFail(function(){ gl.bufferSubData(0,0); });
+}
+Tests.test_checkFramebufferStatus = function(gl) {
+  assertFail(function(){ gl.checkFramebufferStatus(); });
+}
+Tests.test_clear = function(gl) {
+  assertFail(function(){ gl.clear(); });
+}
+Tests.test_clearColor = function(gl) {
+  assertFail(function(){ gl.clearColor(); });
+  assertFail(function(){ gl.clearColor(0); });
+  assertFail(function(){ gl.clearColor(0,0); });
+  assertFail(function(){ gl.clearColor(0,0,0); });
+}
+Tests.test_clearDepth = function(gl) {
+  assertFail(function(){ gl.clearDepth(); });
+}
+Tests.test_clearStencil = function(gl) {
+  assertFail(function(){ gl.clearStencil(); });
+}
+Tests.test_colorMask = function(gl) {
+  assertFail(function(){ gl.colorMask(); });
+  assertFail(function(){ gl.colorMask(0); });
+  assertFail(function(){ gl.colorMask(0,0); });
+  assertFail(function(){ gl.colorMask(0,0,0); });
+}
+Tests.test_compileShader = function(gl) {
+  assertFail(function(){ gl.compileShader(); });
+}
+Tests.test_copyTexImage2D = function(gl) {
+  assertFail(function(){ gl.copyTexImage2D(); });
+  assertFail(function(){ gl.copyTexImage2D(0); });
+  assertFail(function(){ gl.copyTexImage2D(0,0); });
+  assertFail(function(){ gl.copyTexImage2D(0,0,0); });
+  assertFail(function(){ gl.copyTexImage2D(0,0,0,0); });
+  assertFail(function(){ gl.copyTexImage2D(0,0,0,0,0); });
+  assertFail(function(){ gl.copyTexImage2D(0,0,0,0,0,0); });
+  assertFail(function(){ gl.copyTexImage2D(0,0,0,0,0,0,0); });
+}
+Tests.test_copyTexSubImage2D = function(gl) {
+  assertFail(function(){ gl.copyTexSubImage2D(); });
+  assertFail(function(){ gl.copyTexSubImage2D(0); });
+  assertFail(function(){ gl.copyTexSubImage2D(0,0); });
+  assertFail(function(){ gl.copyTexSubImage2D(0,0,0); });
+  assertFail(function(){ gl.copyTexSubImage2D(0,0,0,0); });
+  assertFail(function(){ gl.copyTexSubImage2D(0,0,0,0,0); });
+  assertFail(function(){ gl.copyTexSubImage2D(0,0,0,0,0,0); });
+  assertFail(function(){ gl.copyTexSubImage2D(0,0,0,0,0,0,0); });
+}
+Tests.test_createProgram = function(gl) {
+}
+Tests.test_createShader = function(gl) {
+  assertFail(function(){ gl.createShader(); });
+}
+Tests.test_cullFace = function(gl) {
+  assertFail(function(){ gl.cullFace(); });
+}
+Tests.test_deleteBuffer = function(gl) {
+  assertFail(function(){ gl.deleteBuffer(); });
+}
+Tests.test_deleteFramebuffer = function(gl) {
+  assertFail(function(){ gl.deleteFramebuffer(); });
+}
+Tests.test_deleteProgram = function(gl) {
+  assertFail(function(){ gl.deleteProgram(); });
+}
+Tests.test_deleteRenderbuffer = function(gl) {
+  assertFail(function(){ gl.deleteRenderbuffer(); });
+}
+Tests.test_deleteShader = function(gl) {
+  assertFail(function(){ gl.deleteShader(); });
+}
+Tests.test_deleteTexture = function(gl) {
+  assertFail(function(){ gl.deleteTexture(); });
+}
+Tests.test_depthFunc = function(gl) {
+  assertFail(function(){ gl.depthFunc(); });
+}
+Tests.test_depthMask = function(gl) {
+  assertFail(function(){ gl.depthMask(); });
+}
+Tests.test_depthRange = function(gl) {
+  assertFail(function(){ gl.depthRange(); });
+  assertFail(function(){ gl.depthRange(0); });
+}
+Tests.test_detachShader = function(gl) {
+  assertFail(function(){ gl.detachShader(); });
+  assertFail(function(){ gl.detachShader(0); });
+}
+Tests.test_disable = function(gl) {
+  assertFail(function(){ gl.disable(); });
+}
+Tests.test_disableVertexAttribArray = function(gl) {
+  assertFail(function(){ gl.disableVertexAttribArray(); });
+}
+Tests.test_drawArrays = function(gl) {
+  assertFail(function(){ gl.drawArrays(); });
+  assertFail(function(){ gl.drawArrays(0); });
+  assertFail(function(){ gl.drawArrays(0,0); });
+}
+Tests.test_drawElements = function(gl) {
+  assertFail(function(){ gl.drawElements(); });
+  assertFail(function(){ gl.drawElements(0); });
+  assertFail(function(){ gl.drawElements(0,0); });
+  assertFail(function(){ gl.drawElements(0,0,0); });
+}
+Tests.test_enable = function(gl) {
+  assertFail(function(){ gl.enable(); });
+}
+Tests.test_enableVertexAttribArray = function(gl) {
+  assertFail(function(){ gl.enableVertexAttribArray(); });
+}
+Tests.test_finish = function(gl) {
+}
+Tests.test_flush = function(gl) {
+}
+Tests.test_framebufferRenderbuffer = function(gl) {
+  assertFail(function(){ gl.framebufferRenderbuffer(); });
+  assertFail(function(){ gl.framebufferRenderbuffer(0); });
+  assertFail(function(){ gl.framebufferRenderbuffer(0,0); });
+  assertFail(function(){ gl.framebufferRenderbuffer(0,0,0); });
+}
+Tests.test_framebufferTexture2D = function(gl) {
+  assertFail(function(){ gl.framebufferTexture2D(); });
+  assertFail(function(){ gl.framebufferTexture2D(0); });
+  assertFail(function(){ gl.framebufferTexture2D(0,0); });
+  assertFail(function(){ gl.framebufferTexture2D(0,0,0); });
+  assertFail(function(){ gl.framebufferTexture2D(0,0,0,0); });
+}
+Tests.test_frontFace = function(gl) {
+  assertFail(function(){ gl.frontFace(); });
+}
+Tests.test_createBuffer = function(gl) {
+}
+Tests.test_generateMipmap = function(gl) {
+  assertFail(function(){ gl.generateMipmap(); });
+}
+Tests.test_createFramebuffer = function(gl) {
+}
+Tests.test_createRenderbuffer = function(gl) {
+}
+Tests.test_createTexture = function(gl) {
+}
+Tests.test_getActiveAttrib = function(gl) {
+  assertFail(function(){ gl.getActiveAttrib(); });
+  assertFail(function(){ gl.getActiveAttrib(0); });
+}
+Tests.test_getActiveUniform = function(gl) {
+  assertFail(function(){ gl.getActiveUniform(); });
+  assertFail(function(){ gl.getActiveUniform(0); });
+}
+Tests.test_getAttachedShaders = function(gl) {
+  assertFail(function(){ gl.getAttachedShaders(); });
+}
+Tests.test_getAttribLocation = function(gl) {
+  assertFail(function(){ gl.getAttribLocation(); });
+  assertFail(function(){ gl.getAttribLocation(0); });
+}
+Tests.test_getBufferParameteri = function(gl) {
+  assertFail(function(){ gl.getBufferParameteri(); });
+  assertFail(function(){ gl.getBufferParameteri(0); });
+}
+Tests.test_getError = function(gl) {
+}
+Tests.test_getFramebufferAttachmentParameteri = function(gl) {
+  assertFail(function(){ gl.getFramebufferAttachmentParameteri(); });
+  assertFail(function(){ gl.getFramebufferAttachmentParameteri(0); });
+  assertFail(function(){ gl.getFramebufferAttachmentParameteri(0,0); });
+}
+Tests.test_getProgramInfoLog = function(gl) {
+  assertFail(function(){ gl.getProgramInfoLog(); });
+}
+Tests.test_getRenderbufferParameteri = function(gl) {
+  assertFail(function(){ gl.getRenderbufferParameteri(); });
+  assertFail(function(){ gl.getRenderbufferParameteri(0); });
+}
+Tests.test_getShaderInfoLog = function(gl) {
+  assertFail(function(){ gl.getShaderInfoLog(); });
+}
+Tests.test_getShaderSource = function(gl) {
+  assertFail(function(){ gl.getShaderSource(); });
+}
+Tests.test_getUniformLocation = function(gl) {
+  assertFail(function(){ gl.getUniformLocation(); });
+  assertFail(function(){ gl.getUniformLocation(0); });
+}
+Tests.test_hint = function(gl) {
+  assertFail(function(){ gl.hint(); });
+  assertFail(function(){ gl.hint(0); });
+}
+Tests.test_isBuffer = function(gl) {
+  assertFail(function(){ gl.isBuffer(); });
+}
+Tests.test_isEnabled = function(gl) {
+  assertFail(function(){ gl.isEnabled(); });
+}
+Tests.test_isFramebuffer = function(gl) {
+  assertFail(function(){ gl.isFramebuffer(); });
+}
+Tests.test_isProgram = function(gl) {
+  assertFail(function(){ gl.isProgram(); });
+}
+Tests.test_isRenderbuffer = function(gl) {
+  assertFail(function(){ gl.isRenderbuffer(); });
+}
+Tests.test_isShader = function(gl) {
+  assertFail(function(){ gl.isShader(); });
+}
+Tests.test_isTexture = function(gl) {
+  assertFail(function(){ gl.isTexture(); });
+}
+Tests.test_lineWidth = function(gl) {
+  assertFail(function(){ gl.lineWidth(); });
+}
+Tests.test_linkProgram = function(gl) {
+  assertFail(function(){ gl.linkProgram(); });
+}
+Tests.test_polygonOffset = function(gl) {
+  assertFail(function(){ gl.polygonOffset(); });
+  assertFail(function(){ gl.polygonOffset(0); });
+}
+Tests.test_readPixels = function(gl) {
+  assertFail(function(){ gl.readPixels(); });
+  assertFail(function(){ gl.readPixels(0); });
+  assertFail(function(){ gl.readPixels(0,0); });
+  assertFail(function(){ gl.readPixels(0,0,0); });
+  assertFail(function(){ gl.readPixels(0,0,0,0); });
+  assertFail(function(){ gl.readPixels(0,0,0,0,0); });
+}
+Tests.test_renderbufferStorage = function(gl) {
+  assertFail(function(){ gl.renderbufferStorage(); });
+  assertFail(function(){ gl.renderbufferStorage(0); });
+  assertFail(function(){ gl.renderbufferStorage(0,0); });
+  assertFail(function(){ gl.renderbufferStorage(0,0,0); });
+}
+Tests.test_sampleCoverage = function(gl) {
+  assertFail(function(){ gl.sampleCoverage(); });
+  assertFail(function(){ gl.sampleCoverage(0); });
+}
+Tests.test_scissor = function(gl) {
+  assertFail(function(){ gl.scissor(); });
+  assertFail(function(){ gl.scissor(0); });
+  assertFail(function(){ gl.scissor(0,0); });
+  assertFail(function(){ gl.scissor(0,0,0); });
+}
+Tests.test_shaderSource = function(gl) {
+  assertFail(function(){ gl.shaderSource(); });
+  assertFail(function(){ gl.shaderSource(0); });
+}
+Tests.test_stencilFunc = function(gl) {
+  assertFail(function(){ gl.stencilFunc(); });
+  assertFail(function(){ gl.stencilFunc(0); });
+  assertFail(function(){ gl.stencilFunc(0,0); });
+}
+Tests.test_stencilFuncSeparate = function(gl) {
+  assertFail(function(){ gl.stencilFuncSeparate(); });
+  assertFail(function(){ gl.stencilFuncSeparate(0); });
+  assertFail(function(){ gl.stencilFuncSeparate(0,0); });
+  assertFail(function(){ gl.stencilFuncSeparate(0,0,0); });
+}
+Tests.test_stencilMask = function(gl) {
+  assertFail(function(){ gl.stencilMask(); });
+}
+Tests.test_stencilMaskSeparate = function(gl) {
+  assertFail(function(){ gl.stencilMaskSeparate(); });
+  assertFail(function(){ gl.stencilMaskSeparate(0); });
+}
+Tests.test_stencilOp = function(gl) {
+  assertFail(function(){ gl.stencilOp(); });
+  assertFail(function(){ gl.stencilOp(0); });
+  assertFail(function(){ gl.stencilOp(0,0); });
+}
+Tests.test_stencilOpSeparate = function(gl) {
+  assertFail(function(){ gl.stencilOpSeparate(); });
+  assertFail(function(){ gl.stencilOpSeparate(0); });
+  assertFail(function(){ gl.stencilOpSeparate(0,0); });
+  assertFail(function(){ gl.stencilOpSeparate(0,0,0); });
+}
+Tests.test_texImage2D = function(gl) {
+  assertFail(function(){ gl.texImage2D(); });
+  assertFail(function(){ gl.texImage2D(0); });
+  assertFail(function(){ gl.texImage2D(0,0); });
+}
+Tests.test_texParameteri = function(gl) {
+  assertFail(function(){ gl.texParameteri(); });
+  assertFail(function(){ gl.texParameteri(0); });
+  assertFail(function(){ gl.texParameteri(0,0); });
+}
+Tests.test_texSubImage2D = function(gl) {
+  assertFail(function(){ gl.texSubImage2D(); });
+  assertFail(function(){ gl.texSubImage2D(0); });
+  assertFail(function(){ gl.texSubImage2D(0,0); });
+  assertFail(function(){ gl.texSubImage2D(0,0,0); });
+  assertFail(function(){ gl.texSubImage2D(0,0,0,0); });
+  assertFail(function(){ gl.texSubImage2D(0,0,0,0,0); });
+  assertFail(function(){ gl.texSubImage2D(0,0,0,0,0,0); });
+  assertFail(function(){ gl.texSubImage2D(0,0,0,0,0,0,0); });
+  assertFail(function(){ gl.texSubImage2D(0,0,0,0,0,0,0,0); });
+}
+Tests.test_uniform1f = function(gl) {
+  assertFail(function(){ gl.uniform1f(); });
+  assertFail(function(){ gl.uniform1f(0); });
+}
+Tests.test_uniform1fv = function(gl) {
+  assertFail(function(){ gl.uniform1fv(); });
+  assertFail(function(){ gl.uniform1fv(0); });
+}
+Tests.test_uniform1i = function(gl) {
+  assertFail(function(){ gl.uniform1i(); });
+  assertFail(function(){ gl.uniform1i(0); });
+}
+Tests.test_uniform1iv = function(gl) {
+  assertFail(function(){ gl.uniform1iv(); });
+  assertFail(function(){ gl.uniform1iv(0); });
+}
+Tests.test_uniform2f = function(gl) {
+  assertFail(function(){ gl.uniform2f(); });
+  assertFail(function(){ gl.uniform2f(0); });
+  assertFail(function(){ gl.uniform2f(0,0); });
+}
+Tests.test_uniform2fv = function(gl) {
+  assertFail(function(){ gl.uniform2fv(); });
+  assertFail(function(){ gl.uniform2fv(0); });
+}
+Tests.test_uniform2i = function(gl) {
+  assertFail(function(){ gl.uniform2i(); });
+  assertFail(function(){ gl.uniform2i(0); });
+  assertFail(function(){ gl.uniform2i(0,0); });
+}
+Tests.test_uniform2iv = function(gl) {
+  assertFail(function(){ gl.uniform2iv(); });
+  assertFail(function(){ gl.uniform2iv(0); });
+}
+Tests.test_uniform3f = function(gl) {
+  assertFail(function(){ gl.uniform3f(); });
+  assertFail(function(){ gl.uniform3f(0); });
+  assertFail(function(){ gl.uniform3f(0,0); });
+  assertFail(function(){ gl.uniform3f(0,0,0); });
+}
+Tests.test_uniform3fv = function(gl) {
+  assertFail(function(){ gl.uniform3fv(); });
+  assertFail(function(){ gl.uniform3fv(0); });
+}
+Tests.test_uniform3i = function(gl) {
+  assertFail(function(){ gl.uniform3i(); });
+  assertFail(function(){ gl.uniform3i(0); });
+  assertFail(function(){ gl.uniform3i(0,0); });
+  assertFail(function(){ gl.uniform3i(0,0,0); });
+}
+Tests.test_uniform3iv = function(gl) {
+  assertFail(function(){ gl.uniform3iv(); });
+  assertFail(function(){ gl.uniform3iv(0); });
+}
+Tests.test_uniform4f = function(gl) {
+  assertFail(function(){ gl.uniform4f(); });
+  assertFail(function(){ gl.uniform4f(0); });
+  assertFail(function(){ gl.uniform4f(0,0); });
+  assertFail(function(){ gl.uniform4f(0,0,0); });
+  assertFail(function(){ gl.uniform4f(0,0,0,0); });
+}
+Tests.test_uniform4fv = function(gl) {
+  assertFail(function(){ gl.uniform4fv(); });
+  assertFail(function(){ gl.uniform4fv(0); });
+}
+Tests.test_uniform4i = function(gl) {
+  assertFail(function(){ gl.uniform4i(); });
+  assertFail(function(){ gl.uniform4i(0); });
+  assertFail(function(){ gl.uniform4i(0,0); });
+  assertFail(function(){ gl.uniform4i(0,0,0); });
+  assertFail(function(){ gl.uniform4i(0,0,0,0); });
+}
+Tests.test_uniform4iv = function(gl) {
+  assertFail(function(){ gl.uniform4iv(); });
+  assertFail(function(){ gl.uniform4iv(0); });
+}
+Tests.test_uniformMatrix2fv = function(gl) {
+  assertFail(function(){ gl.uniformMatrix2fv(); });
+  assertFail(function(){ gl.uniformMatrix2fv(0); });
+  assertFail(function(){ gl.uniformMatrix2fv(0,0); });
+}
+Tests.test_uniformMatrix3fv = function(gl) {
+  assertFail(function(){ gl.uniformMatrix3fv(); });
+  assertFail(function(){ gl.uniformMatrix3fv(0); });
+  assertFail(function(){ gl.uniformMatrix3fv(0,0); });
+}
+Tests.test_uniformMatrix4fv = function(gl) {
+  assertFail(function(){ gl.uniformMatrix4fv(); });
+  assertFail(function(){ gl.uniformMatrix4fv(0); });
+  assertFail(function(){ gl.uniformMatrix4fv(0,0); });
+}
+Tests.test_useProgram = function(gl) {
+  assertFail(function(){ gl.useProgram(); });
+}
+Tests.test_validateProgram = function(gl) {
+  assertFail(function(){ gl.validateProgram(); });
+}
+Tests.test_vertexAttrib1f = function(gl) {
+  assertFail(function(){ gl.vertexAttrib1f(); });
+  assertFail(function(){ gl.vertexAttrib1f(0); });
+}
+Tests.test_vertexAttrib1fv = function(gl) {
+  assertFail(function(){ gl.vertexAttrib1fv(); });
+  assertFail(function(){ gl.vertexAttrib1fv(0); });
+}
+Tests.test_vertexAttrib2f = function(gl) {
+  assertFail(function(){ gl.vertexAttrib2f(); });
+  assertFail(function(){ gl.vertexAttrib2f(0); });
+  assertFail(function(){ gl.vertexAttrib2f(0,0); });
+}
+Tests.test_vertexAttrib2fv = function(gl) {
+  assertFail(function(){ gl.vertexAttrib2fv(); });
+  assertFail(function(){ gl.vertexAttrib2fv(0); });
+}
+Tests.test_vertexAttrib3f = function(gl) {
+  assertFail(function(){ gl.vertexAttrib3f(); });
+  assertFail(function(){ gl.vertexAttrib3f(0); });
+  assertFail(function(){ gl.vertexAttrib3f(0,0); });
+  assertFail(function(){ gl.vertexAttrib3f(0,0,0); });
+}
+Tests.test_vertexAttrib3fv = function(gl) {
+  assertFail(function(){ gl.vertexAttrib3fv(); });
+  assertFail(function(){ gl.vertexAttrib3fv(0); });
+}
+Tests.test_vertexAttrib4f = function(gl) {
+  assertFail(function(){ gl.vertexAttrib4f(); });
+  assertFail(function(){ gl.vertexAttrib4f(0); });
+  assertFail(function(){ gl.vertexAttrib4f(0,0); });
+  assertFail(function(){ gl.vertexAttrib4f(0,0,0); });
+  assertFail(function(){ gl.vertexAttrib4f(0,0,0,0); });
+}
+Tests.test_vertexAttrib4fv = function(gl) {
+  assertFail(function(){ gl.vertexAttrib4fv(); });
+  assertFail(function(){ gl.vertexAttrib4fv(0); });
+}
+Tests.test_vertexAttribPointer = function(gl) {
+  assertFail(function(){ gl.vertexAttribPointer(); });
+  assertFail(function(){ gl.vertexAttribPointer(0); });
+  assertFail(function(){ gl.vertexAttribPointer(0,0); });
+  assertFail(function(){ gl.vertexAttribPointer(0,0,0); });
+  assertFail(function(){ gl.vertexAttribPointer(0,0,0,0); });
+  assertFail(function(){ gl.vertexAttribPointer(0,0,0,0,0); });
+}
+Tests.test_viewport = function(gl) {
+  assertFail(function(){ gl.viewport(); });
+  assertFail(function(){ gl.viewport(0); });
+  assertFail(function(){ gl.viewport(0,0); });
+  assertFail(function(){ gl.viewport(0,0,0); });
+}
+Tests.test_currentArrayBufferBinding = function(gl) {
+}
+Tests.test_currentElementArrayBufferBinding = function(gl) {
+}
+Tests.test_currentFramebufferBinding = function(gl) {
+}
+Tests.test_currentRenderbufferBinding = function(gl) {
+}
+Tests.test_currentTextureBinding2D = function(gl) {
+}
+Tests.test_currentTextureBindingCubeMap = function(gl) {
+}
+Tests.test_currentProgram = function(gl) {
+}
+Tests.test_getParameter = function(gl) {
+  assertFail(function(){ gl.getParameter(); });
+}
+Tests.test_getProgramParameter = function(gl) {
+  assertFail(function(){ gl.getProgramParameter(); });
+  assertFail(function(){ gl.getProgramParameter(0); });
+}
+Tests.test_getShaderParameter = function(gl) {
+  assertFail(function(){ gl.getShaderParameter(); });
+  assertFail(function(){ gl.getShaderParameter(0); });
+}
+Tests.test_getTexParameteri = function(gl) {
+  assertFail(function(){ gl.getTexParameteri(); });
+  assertFail(function(){ gl.getTexParameteri(0); });
+}
+Tests.test_getUniformi = function(gl) {
+  assertFail(function(){ gl.getUniformi(); });
+  assertFail(function(){ gl.getUniformi(0); });
+}
+Tests.test_getVertexAttribi = function(gl) {
+  assertFail(function(){ gl.getVertexAttribi(); });
+  assertFail(function(){ gl.getVertexAttribi(0); });
+}
+Tests.test_present = function(gl) {
+}
+Tests.startUnit = function() {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  return [gl];
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+  <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/constants.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/constants.html
new file mode 100644 (file)
index 0000000..6933a92
--- /dev/null
@@ -0,0 +1,372 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+/*
+  The following tests are generated from
+  http://www.khronos.org/registry/gles/api/2.0/gl2.h
+  and api_modifications.txt
+*/
+var constants = {
+DEPTH_BUFFER_BIT : 0x00000100,
+STENCIL_BUFFER_BIT : 0x00000400,
+COLOR_BUFFER_BIT : 0x00004000,
+POINTS : 0x0000,
+LINES : 0x0001,
+LINE_LOOP : 0x0002,
+LINE_STRIP : 0x0003,
+TRIANGLES : 0x0004,
+TRIANGLE_STRIP : 0x0005,
+TRIANGLE_FAN : 0x0006,
+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,
+DST_COLOR : 0x0306,
+ONE_MINUS_DST_COLOR : 0x0307,
+SRC_ALPHA_SATURATE : 0x0308,
+FUNC_ADD : 0x8006,
+BLEND_EQUATION : 0x8009,
+BLEND_EQUATION_RGB : 0x8009,
+BLEND_EQUATION_ALPHA : 0x883D,
+FUNC_SUBTRACT : 0x800A,
+FUNC_REVERSE_SUBTRACT : 0x800B,
+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,
+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,
+FRONT : 0x0404,
+BACK : 0x0405,
+FRONT_AND_BACK : 0x0408,
+TEXTURE_2D : 0x0DE1,
+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,
+NO_ERROR : 0,
+INVALID_ENUM : 0x0500,
+INVALID_VALUE : 0x0501,
+INVALID_OPERATION : 0x0502,
+OUT_OF_MEMORY : 0x0505,
+CW : 0x0900,
+CCW : 0x0901,
+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,
+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_FACTOR : 0x8038,
+TEXTURE_BINDING_2D : 0x8069,
+SAMPLE_BUFFERS : 0x80A8,
+SAMPLES : 0x80A9,
+SAMPLE_COVERAGE_VALUE : 0x80AA,
+SAMPLE_COVERAGE_INVERT : 0x80AB,
+COMPRESSED_TEXTURE_FORMATS : 0x86A3,
+DONT_CARE : 0x1100,
+FASTEST : 0x1101,
+NICEST : 0x1102,
+GENERATE_MIPMAP_HINT : 0x8192,
+BYTE : 0x1400,
+UNSIGNED_BYTE : 0x1401,
+SHORT : 0x1402,
+UNSIGNED_SHORT : 0x1403,
+INT : 0x1404,
+UNSIGNED_INT : 0x1405,
+FLOAT : 0x1406,
+//FIXED : 0x140C,
+DEPTH_COMPONENT : 0x1902,
+ALPHA : 0x1906,
+RGB : 0x1907,
+RGBA : 0x1908,
+LUMINANCE : 0x1909,
+LUMINANCE_ALPHA : 0x190A,
+UNSIGNED_SHORT_4_4_4_4 : 0x8033,
+UNSIGNED_SHORT_5_5_5_1 : 0x8034,
+UNSIGNED_SHORT_5_6_5 : 0x8363,
+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,
+NEVER : 0x0200,
+LESS : 0x0201,
+EQUAL : 0x0202,
+LEQUAL : 0x0203,
+GREATER : 0x0204,
+NOTEQUAL : 0x0205,
+GEQUAL : 0x0206,
+ALWAYS : 0x0207,
+KEEP : 0x1E00,
+REPLACE : 0x1E01,
+INCR : 0x1E02,
+DECR : 0x1E03,
+INVERT : 0x150A,
+INCR_WRAP : 0x8507,
+DECR_WRAP : 0x8508,
+VENDOR : 0x1F00,
+RENDERER : 0x1F01,
+VERSION : 0x1F02,
+//EXTENSIONS : 0x1F03,
+NEAREST : 0x2600,
+LINEAR : 0x2601,
+NEAREST_MIPMAP_NEAREST : 0x2700,
+LINEAR_MIPMAP_NEAREST : 0x2701,
+NEAREST_MIPMAP_LINEAR : 0x2702,
+LINEAR_MIPMAP_LINEAR : 0x2703,
+TEXTURE_MAG_FILTER : 0x2800,
+TEXTURE_MIN_FILTER : 0x2801,
+TEXTURE_WRAP_S : 0x2802,
+TEXTURE_WRAP_T : 0x2803,
+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,
+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,
+REPEAT : 0x2901,
+CLAMP_TO_EDGE : 0x812F,
+MIRRORED_REPEAT : 0x8370,
+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_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,
+//IMPLEMENTATION_COLOR_READ_TYPE : 0x8B9A,
+//IMPLEMENTATION_COLOR_READ_FORMAT : 0x8B9B,
+COMPILE_STATUS : 0x8B81,
+//SHADER_COMPILER : 0x8DFA,
+LOW_FLOAT : 0x8DF0,
+MEDIUM_FLOAT : 0x8DF1,
+HIGH_FLOAT : 0x8DF2,
+LOW_INT : 0x8DF3,
+MEDIUM_INT : 0x8DF4,
+HIGH_INT : 0x8DF5,
+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,
+//FALSE : 0,
+//TRUE : 1,
+UNPACK_FLIP_Y_WEBGL : 0x9240,
+UNPACK_PREMULTIPLY_ALPHA_WEBGL : 0x9241
+}
+
+Tests.testOES20Constants = function(gl) {
+  for (var i in constants) {
+    assertProperty(gl, i) &&
+    assertEquals(i, gl[i], constants[i]);
+  }
+  var extended = false;
+  for (var i in gl) {
+    if (i.match(/^[A-Z_]+$/) && constants[i] == null) {
+      if (!extended) {
+        extended = true;
+        var h = document.createElement('h3');
+        h.textContent = "Also found the following extra constants";
+        __testLog__.appendChild(h);
+      }
+      log(i);
+    }
+  }
+}
+
+Tests.startUnit = function() {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  return [gl];
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+  <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/fuzzTheAPI.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/fuzzTheAPI.html
new file mode 100644 (file)
index 0000000..342a1b7
--- /dev/null
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+
+<script type="application/x-javascript">
+
+Tests.autorun = false;
+Tests.message = "This will fuzz the API with random inputs for a [long] while."
+
+
+function randomCall(testProgress, gl, m, arities) {
+    doTestNotify(m);
+    var argcs = {};
+    var foundArity = false;
+    if (arities == null) {
+        testProgress.textContent += "            500 random arity calls on " + m + "\n";
+        for (var i=0; i<50; i++) {
+            for (var j=0; j<10; j++) {
+                var args = generateRandomArgs(j);
+//                 doTestNotify(m + ": " + args.toSource());
+                try {
+                    gl[m].apply(gl, args);
+                    argcs[j] = true;
+                    foundArity = true;
+                } catch (e) {
+                }
+            }
+        }
+        for (var j in argcs) {
+            testProgress.textContent += "200 arity " + j + " calls on " + m + "\n";
+            for (var i=0; i<200; i++) {
+                var args = generateRandomArgs(j);
+//                 doTestNotify(m + ": " + args.toSource());
+                try {
+                    gl[m].apply(gl, args);
+                    argcs[j] = true;
+                } catch (e) {
+                }
+            }
+        }
+    } else {
+        for (var k=0; k<arities.length; k++) {
+            var j = arities[k];
+            testProgress.textContent += "500 arity " + j + " calls on " + m + "\n";
+            for (var i=0; i<500; i++) {
+                var args = generateRandomArgs(j);
+//                 doTestNotify(m + ": " + args.toSource());
+                try {
+                    gl[m].apply(gl, args);
+                } catch (e) {
+                }
+            }
+        }
+    }
+//     doTestNotify(m+"--OK");
+}
+
+Tests.testGetGLWeb20 = function() {
+    var testProgress = document.getElementById('testProgress');
+    var funcnames = document.getElementById('funcnames').value.split(",");
+    var canvas = document.getElementById('glweb20');
+    var gl;
+    assertOk(function(){gl = getGLContext(canvas);});
+    var funcs = [];
+    for (var i=0; i<funcnames.length; i++) {
+        var fn = funcnames[i];
+        fn = fn.replace(/^\s+|\s+$/g, '');
+        if (fn.length > 0)
+            funcs.push(fn);
+    }
+    if (funcs.length == 0) {
+        for (var m in gl)
+            try{if (typeof gl[m] == 'function')
+                funcs.push(m);}catch(e){}
+    }
+    var idx = 0;
+    var count = 0;
+    var limit = 1000;
+    var iv1;
+    var iv2;
+    iv1 = setInterval(function(){
+        if (idx >= funcs.length) {
+            iv2 = setInterval(function(){
+                if (count >= limit) {
+                    clearInterval(iv2);
+                    return false;
+                }
+                count++;
+                var f = Math.floor(Math.random() * funcs.length);
+                randomCall(testProgress, gl, funcs[f]);
+            }, 50);
+            clearInterval(iv1);
+            return false;
+        }
+        randomCall(testProgress, gl, funcs[idx]);
+        idx++;
+    }, 50);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+  <canvas id="glweb20" width="16" height="16"></canvas>
+  <p>Optional: Enter a comma-separated list of functions to fuzz (leave blank for full API)</p>
+  <input type="text" size="40" id="funcnames" value="">
+  <pre id="testProgress"></pre>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/getContext.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/getContext.html
new file mode 100644 (file)
index 0000000..b513915
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+
+<script type="application/x-javascript">
+
+Tests.testGetWebGL = function() {
+  var canvas = document.getElementById('webgl');
+  var gl;
+  assertOk(function(){gl = getGLContext(canvas)});
+  assertEquals("ctx.canvas === canvas", gl.canvas, canvas);
+  assertOk(function(){g2d = canvas.getContext('2d')});
+  assert("Should get a null 2d context after getting webgl context", g2d === null);
+}
+
+Tests.testGet2D = function() {
+  var canvas = document.getElementById('2d');
+  var g2d;
+  var gl;
+  assertOk(function(){g2d = canvas.getContext('2d')});
+  assertOk(function(){gl = getGLContext(canvas)});
+  assert("Should get a null WebGL context after getting 2D context", gl === null);
+}
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+  <canvas id="2d" width="1" height="1"></canvas>
+  <canvas id="webgl" width="1" height="1"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/methods.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/methods.html
new file mode 100644 (file)
index 0000000..d466fed
--- /dev/null
@@ -0,0 +1,201 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+/*
+  The following tests are generated from
+  http://www.khronos.org/registry/gles/api/2.0/gl2.h
+  and api_modifications.txt
+*/
+var methods = ['canvas',
+"activeTexture",
+"attachShader",
+"bindAttribLocation",
+"bindBuffer",
+"bindFramebuffer",
+"bindRenderbuffer",
+"bindTexture",
+"blendColor",
+"blendEquation",
+"blendEquationSeparate",
+"blendFunc",
+"blendFuncSeparate",
+"bufferData",
+"bufferSubData",
+"checkFramebufferStatus",
+"clear",
+"clearColor",
+"clearDepth",
+"clearStencil",
+"colorMask",
+"compileShader",
+"copyTexImage2D",
+"copyTexSubImage2D",
+"createProgram",
+"createShader",
+"cullFace",
+"deleteBuffer",
+"deleteFramebuffer",
+"deleteProgram",
+"deleteRenderbuffer",
+"deleteShader",
+"deleteTexture",
+"depthFunc",
+"depthMask",
+"depthRange",
+"detachShader",
+"disable",
+"disableVertexAttribArray",
+"drawArrays",
+"drawElements",
+"enable",
+"enableVertexAttribArray",
+"finish",
+"flush",
+"framebufferRenderbuffer",
+"framebufferTexture2D",
+"frontFace",
+"createBuffer",
+"generateMipmap",
+"createFramebuffer",
+"createRenderbuffer",
+"createTexture",
+"getActiveAttrib",
+"getActiveUniform",
+"getAttachedShaders",
+"getAttribLocation",
+"getBufferParameter",
+"getError",
+"getExtension",
+"getSupportedExtensions",
+"getFramebufferAttachmentParameter",
+"getProgramInfoLog",
+"getRenderbufferParameter",
+"getShaderInfoLog",
+"getShaderSource",
+"getUniformLocation",
+"hint",
+"isBuffer",
+"isContextLost",
+"isEnabled",
+"isFramebuffer",
+"isProgram",
+"isRenderbuffer",
+"isShader",
+"isTexture",
+"lineWidth",
+"linkProgram",
+"polygonOffset",
+"readPixels",
+"renderbufferStorage",
+"sampleCoverage",
+"scissor",
+"shaderSource",
+"stencilFunc",
+"stencilFuncSeparate",
+"stencilMask",
+"stencilMaskSeparate",
+"stencilOp",
+"stencilOpSeparate",
+"texImage2D",
+"texParameteri",
+"texSubImage2D",
+"uniform1f",
+"uniform1fv",
+"uniform1i",
+"uniform1iv",
+"uniform2f",
+"uniform2fv",
+"uniform2i",
+"uniform2iv",
+"uniform3f",
+"uniform3fv",
+"uniform3i",
+"uniform3iv",
+"uniform4f",
+"uniform4fv",
+"uniform4i",
+"uniform4iv",
+"uniformMatrix2fv",
+"uniformMatrix3fv",
+"uniformMatrix4fv",
+"useProgram",
+"validateProgram",
+"vertexAttrib1f",
+"vertexAttrib1fv",
+"vertexAttrib2f",
+"vertexAttrib2fv",
+"vertexAttrib3f",
+"vertexAttrib3fv",
+"vertexAttrib4f",
+"vertexAttrib4fv",
+"vertexAttribPointer",
+"viewport",
+"getParameter",
+"getProgramParameter",
+"getShaderParameter",
+"getTexParameter",
+"getUniform",
+"getVertexAttrib"
+]
+
+Tests.testOES20Methods = function(gl) {
+  for (var i=0; i<methods.length; i++) {
+    assertProperty(gl, methods[i]);
+  }
+  var extended = false;
+  for (var i in gl) {
+    if (i.match(/^[a-z_]+$/) && methods.indexOf(i) == -1) {
+      if (!extended) {
+        extended = true;
+        var h = document.createElement('h3');
+        h.textContent = "Also found the following extra properties";
+        __testLog__.appendChild(h);
+      }
+      log(i);
+    }
+  }
+}
+
+Tests.startUnit = function() {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  return [gl];
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+  <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/quickCheckAPI.js b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/quickCheckAPI.js
new file mode 100644 (file)
index 0000000..9b62f51
--- /dev/null
@@ -0,0 +1,413 @@
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/*
+  QuickCheck tests for WebGL:
+
+    1. Write a valid arg generator for each function
+      1.1. Write valid arg predicates to use with random generator:
+            if value passes generator, accept it as valid.
+      1.2. Often needs initializing and cleanup:
+            setup - generate - cleanup
+            gl.createBuffer - test(bindBufferGenerator) - gl.deleteBuffer
+
+    2. Write an invalid arg generator
+      2.1. Take valid args, modify an arg until the args no longer pass
+            checkArgValidity.
+      2.2. Repeat for all args.
+
+    3. Test functions using the generators
+      3.1. Args generated with the valid arg generator should pass
+            assertOk(f(args))
+      3.2. Args generated with the invalid arg generator should pass
+            assertFail(f(args))
+*/
+var GLcanvas = document.createElement('canvas');
+var canvas2D = document.createElement('canvas');
+GLcanvas.width = GLcanvas.height = 256;
+GL = getGLContext(GLcanvas);
+Array.from = function(o) {
+  var a = [];
+  for (var i=0; i<o.length; i++)
+    a.push(o[i]);
+  return a;
+}
+Array.prototype.has = function(v) { return this.indexOf(v) != -1; }
+Array.prototype.random = function() { return this[randomInt(this.length)]; }
+
+castToInt = function(o) {
+  if (typeof o == 'number')
+    return isNaN(o) ? 0 : Math.floor(o);
+  if (o == true) return 1;
+  return 0;
+};
+
+// Creates a constant checker / generator from its arguments.
+//
+// E.g. if you want a constant checker for the constants 1, 2, and 3, you
+// would do the following:
+//
+//   var cc = constCheck(1,2,3);
+//   var randomConst = cc.random();
+//   if (cc.has(randomConst))
+//     console.log("randomConst is included in cc's constants");
+//
+constCheck = function() {
+  var a = Array.from(arguments);
+  a.has = function(v) { return this.indexOf(castToInt(v)) != -1; };
+  return a;
+}
+
+bindTextureTarget = constCheck(GL.TEXTURE_2D, GL.TEXTURE_CUBE_MAP);
+blendEquationMode = constCheck(GL.FUNC_ADD, GL.FUNC_SUBTRACT, GL.FUNC_REVERSE_SUBTRACT);
+blendFuncSfactor = constCheck(
+  GL.ZERO, GL.ONE, GL.SRC_COLOR, GL.ONE_MINUS_SRC_COLOR, GL.DST_COLOR,
+  GL.ONE_MINUS_DST_COLOR, GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA, GL.DST_ALPHA,
+  GL.ONE_MINUS_DST_ALPHA, GL.CONSTANT_COLOR, GL.ONE_MINUS_CONSTANT_COLOR,
+  GL.CONSTANT_ALPHA, GL.ONE_MINUS_CONSTANT_ALPHA, GL.SRC_ALPHA_SATURATE
+);
+blendFuncDfactor = constCheck(
+  GL.ZERO, GL.ONE, GL.SRC_COLOR, GL.ONE_MINUS_SRC_COLOR, GL.DST_COLOR,
+  GL.ONE_MINUS_DST_COLOR, GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA, GL.DST_ALPHA,
+  GL.ONE_MINUS_DST_ALPHA, GL.CONSTANT_COLOR, GL.ONE_MINUS_CONSTANT_COLOR,
+  GL.CONSTANT_ALPHA, GL.ONE_MINUS_CONSTANT_ALPHA
+);
+bufferTarget = constCheck(GL.ARRAY_BUFFER, GL.ELEMENT_ARRAY_BUFFER);
+bufferMode = constCheck(GL.STREAM_DRAW, GL.STATIC_DRAW, GL.DYNAMIC_DRAW);
+clearMask = constCheck(
+  GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT | GL.STENCIL_BUFFER_BIT,
+  GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT,
+  GL.COLOR_BUFFER_BIT | GL.STENCIL_BUFFER_BIT,
+  GL.DEPTH_BUFFER_BIT | GL.STENCIL_BUFFER_BIT,
+  GL.COLOR_BUFFER_BIT, GL.DEPTH_BUFFER_BIT, GL.STENCIL_BUFFER_BIT, 0
+);
+cullFace = constCheck(GL.FRONT, GL.BACK, GL.FRONT_AND_BACK);
+depthFuncFunc = constCheck(
+  GL.NEVER, GL.LESS, GL.EQUAL, GL.LEQUAL, GL.GREATER, GL.NOTEQUAL,
+  GL.GEQUAL, GL.ALWAYS
+);
+stencilFuncFunc = depthFuncFunc;
+enableCap = constCheck(
+  GL.BLEND, GL.CULL_FACE, GL.DEPTH_TEST, GL.DITHER, GL.POLYGON_OFFSET_FILL,
+  GL.SAMPLE_ALPHA_TO_COVERAGE, GL.SAMPLE_COVERAGE, GL.SCISSOR_TEST,
+  GL.STENCIL_TEST
+);
+frontFaceMode = constCheck(GL.CCW, GL.CW);
+getParameterPname = constCheck(
+  GL.ACTIVE_TEXTURE || "GL.ACTIVE_TEXTURE",
+  GL.ALIASED_LINE_WIDTH_RANGE || "GL.ALIASED_LINE_WIDTH_RANGE",
+  GL.ALIASED_POINT_SIZE_RANGE || "GL.ALIASED_POINT_SIZE_RANGE",
+  GL.ALPHA_BITS || "GL.ALPHA_BITS",
+  GL.ARRAY_BUFFER_BINDING || "GL.ARRAY_BUFFER_BINDING",
+  GL.BLEND || "GL.BLEND",
+  GL.BLEND_COLOR || "GL.BLEND_COLOR",
+  GL.BLEND_DST_ALPHA || "GL.BLEND_DST_ALPHA",
+  GL.BLEND_DST_RGB || "GL.BLEND_DST_RGB",
+  GL.BLEND_EQUATION_ALPHA || "GL.BLEND_EQUATION_ALPHA",
+  GL.BLEND_EQUATION_RGB || "GL.BLEND_EQUATION_RGB",
+  GL.BLEND_SRC_ALPHA || "GL.BLEND_SRC_ALPHA",
+  GL.BLEND_SRC_RGB || "GL.BLEND_SRC_RGB",
+  GL.BLUE_BITS || "GL.BLUE_BITS",
+  GL.COLOR_CLEAR_VALUE || "GL.COLOR_CLEAR_VALUE",
+  GL.COLOR_WRITEMASK || "GL.COLOR_WRITEMASK",
+  GL.COMPRESSED_TEXTURE_FORMATS || "GL.COMPRESSED_TEXTURE_FORMATS",
+  GL.CULL_FACE || "GL.CULL_FACE",
+  GL.CULL_FACE_MODE || "GL.CULL_FACE_MODE",
+  GL.CURRENT_PROGRAM || "GL.CURRENT_PROGRAM",
+  GL.DEPTH_BITS || "GL.DEPTH_BITS",
+  GL.DEPTH_CLEAR_VALUE || "GL.DEPTH_CLEAR_VALUE",
+  GL.DEPTH_FUNC || "GL.DEPTH_FUNC",
+  GL.DEPTH_RANGE || "GL.DEPTH_RANGE",
+  GL.DEPTH_TEST || "GL.DEPTH_TEST",
+  GL.DEPTH_WRITEMASK || "GL.DEPTH_WRITEMASK",
+  GL.DITHER || "GL.DITHER",
+  GL.ELEMENT_ARRAY_BUFFER_BINDING || "GL.ELEMENT_ARRAY_BUFFER_BINDING",
+  GL.FRAMEBUFFER_BINDING || "GL.FRAMEBUFFER_BINDING",
+  GL.FRONT_FACE || "GL.FRONT_FACE",
+  GL.GENERATE_MIPMAP_HINT || "GL.GENERATE_MIPMAP_HINT",
+  GL.GREEN_BITS || "GL.GREEN_BITS",
+  GL.LINE_WIDTH || "GL.LINE_WIDTH",
+  GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS || "GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS",
+  GL.MAX_CUBE_MAP_TEXTURE_SIZE || "GL.MAX_CUBE_MAP_TEXTURE_SIZE",
+  GL.MAX_FRAGMENT_UNIFORM_VECTORS || "GL.MAX_FRAGMENT_UNIFORM_VECTORS",
+  GL.MAX_RENDERBUFFER_SIZE || "GL.MAX_RENDERBUFFER_SIZE",
+  GL.MAX_TEXTURE_IMAGE_UNITS || "GL.MAX_TEXTURE_IMAGE_UNITS",
+  GL.MAX_TEXTURE_SIZE || "GL.MAX_TEXTURE_SIZE",
+  GL.MAX_VARYING_VECTORS || "GL.MAX_VARYING_VECTORS",
+  GL.MAX_VERTEX_ATTRIBS || "GL.MAX_VERTEX_ATTRIBS",
+  GL.MAX_VERTEX_TEXTURE_IMAGE_UNITS || "GL.MAX_VERTEX_TEXTURE_IMAGE_UNITS",
+  GL.MAX_VERTEX_UNIFORM_VECTORS || "GL.MAX_VERTEX_UNIFORM_VECTORS",
+  GL.MAX_VIEWPORT_DIMS || "GL.MAX_VIEWPORT_DIMS",
+  GL.PACK_ALIGNMENT || "GL.PACK_ALIGNMENT",
+  GL.POLYGON_OFFSET_FACTOR || "GL.POLYGON_OFFSET_FACTOR",
+  GL.POLYGON_OFFSET_FILL || "GL.POLYGON_OFFSET_FILL",
+  GL.POLYGON_OFFSET_UNITS || "GL.POLYGON_OFFSET_UNITS",
+  GL.RED_BITS || "GL.RED_BITS",
+  GL.RENDERBUFFER_BINDING || "GL.RENDERBUFFER_BINDING",
+  GL.SAMPLE_BUFFERS || "GL.SAMPLE_BUFFERS",
+  GL.SAMPLE_COVERAGE_INVERT || "GL.SAMPLE_COVERAGE_INVERT",
+  GL.SAMPLE_COVERAGE_VALUE || "GL.SAMPLE_COVERAGE_VALUE",
+  GL.SAMPLES || "GL.SAMPLES",
+  GL.SCISSOR_BOX || "GL.SCISSOR_BOX",
+  GL.SCISSOR_TEST || "GL.SCISSOR_TEST",
+  GL.STENCIL_BACK_FAIL || "GL.STENCIL_BACK_FAIL",
+  GL.STENCIL_BACK_FUNC || "GL.STENCIL_BACK_FUNC",
+  GL.STENCIL_BACK_PASS_DEPTH_FAIL || "GL.STENCIL_BACK_PASS_DEPTH_FAIL",
+  GL.STENCIL_BACK_PASS_DEPTH_PASS || "GL.STENCIL_BACK_PASS_DEPTH_PASS",
+  GL.STENCIL_BACK_REF || "GL.STENCIL_BACK_REF",
+  GL.STENCIL_BACK_VALUE_MASK || "GL.STENCIL_BACK_VALUE_MASK",
+  GL.STENCIL_BACK_WRITEMASK || "GL.STENCIL_BACK_WRITEMASK",
+  GL.STENCIL_BITS || "GL.STENCIL_BITS",
+  GL.STENCIL_CLEAR_VALUE || "GL.STENCIL_CLEAR_VALUE",
+  GL.STENCIL_FAIL || "GL.STENCIL_FAIL",
+  GL.STENCIL_FUNC || "GL.STENCIL_FUNC",
+  GL.STENCIL_PASS_DEPTH_FAIL || "GL.STENCIL_PASS_DEPTH_FAIL",
+  GL.STENCIL_PASS_DEPTH_PASS || "GL.STENCIL_PASS_DEPTH_PASS",
+  GL.STENCIL_REF || "GL.STENCIL_REF",
+  GL.STENCIL_TEST || "GL.STENCIL_TEST",
+  GL.STENCIL_VALUE_MASK || "GL.STENCIL_VALUE_MASK",
+  GL.STENCIL_WRITEMASK || "GL.STENCIL_WRITEMASK",
+  GL.SUBPIXEL_BITS || "GL.SUBPIXEL_BITS",
+  GL.TEXTURE_BINDING_2D || "GL.TEXTURE_BINDING_2D",
+  GL.TEXTURE_BINDING_CUBE_MAP || "GL.TEXTURE_BINDING_CUBE_MAP",
+  GL.UNPACK_ALIGNMENT || "GL.UNPACK_ALIGNMENT",
+  GL.VIEWPORT || "GL.VIEWPORT"
+);
+mipmapHint = constCheck(GL.FASTEST, GL.NICEST, GL.DONT_CARE);
+pixelStoreiPname = constCheck(GL.PACK_ALIGNMENT, GL.UNPACK_ALIGNMENT);
+pixelStoreiParam = constCheck(1,2,4,8);
+shaderType = constCheck(GL.VERTEX_SHADER, GL.FRAGMENT_SHADER);
+stencilOp = constCheck(GL.KEEP, GL.ZERO, GL.REPLACE, GL.INCR, GL.INCR_WRAP,
+                        GL.DECR, GL.DECR_WRAP, GL.INVERT);
+texImageTarget = constCheck(
+  GL.TEXTURE_2D,
+  GL.TEXTURE_CUBE_MAP_POSITIVE_X,
+  GL.TEXTURE_CUBE_MAP_NEGATIVE_X,
+  GL.TEXTURE_CUBE_MAP_POSITIVE_Y,
+  GL.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+  GL.TEXTURE_CUBE_MAP_POSITIVE_Z,
+  GL.TEXTURE_CUBE_MAP_NEGATIVE_Z
+);
+texImageInternalFormat = constCheck(
+  GL.ALPHA,
+  GL.LUMINANCE,
+  GL.LUMINANCE_ALPHA,
+  GL.RGB,
+  GL.RGBA
+);
+texImageFormat = constCheck(
+  GL.ALPHA,
+  GL.LUMINANCE,
+  GL.LUMINANCE_ALPHA,
+  GL.RGB,
+  GL.RGBA
+);
+texImageType = constCheck(GL.UNSIGNED_BYTE);
+texParameterPname = constCheck(
+  GL.TEXTURE_MIN_FILTER, GL.TEXTURE_MAG_FILTER,
+  GL.TEXTURE_WRAP_S, GL.TEXTURE_WRAP_T);
+texParameterParam = {};
+texParameterParam[GL.TEXTURE_MIN_FILTER] = constCheck(
+  GL.NEAREST, GL.LINEAR, GL.NEAREST_MIPMAP_NEAREST, GL.LINEAR_MIPMAP_NEAREST,
+  GL.NEAREST_MIPMAP_LINEAR, GL.LINEAR_MIPMAP_LINEAR);
+texParameterParam[GL.TEXTURE_MAG_FILTER] = constCheck(GL.NEAREST, GL.LINEAR);
+texParameterParam[GL.TEXTURE_WRAP_S] = constCheck(
+  GL.CLAMP_TO_EDGE, GL.MIRRORED_REPEAT, GL.REPEAT);
+texParameterParam[GL.TEXTURE_WRAP_T] = texParameterParam[GL.TEXTURE_WRAP_S];
+textureUnit = constCheck.apply(this, (function(){
+  var textureUnits = [];
+  var texUnits = GL.getParameter(GL.MAX_TEXTURE_IMAGE_UNITS);
+  for (var i=0; i<texUnits; i++) textureUnits.push(GL['TEXTURE'+i]);
+  return textureUnits;
+})());
+
+var StencilBits = GL.getParameter(GL.STENCIL_BITS);
+var MaxStencilValue = 1 << StencilBits;
+
+var MaxVertexAttribs = GL.getParameter(GL.MAX_VERTEX_ATTRIBS);
+var LineWidthRange = GL.getParameter(GL.ALIASED_LINE_WIDTH_RANGE);
+
+// Returns true if bufData can be passed to GL.bufferData
+isBufferData = function(bufData) {
+  if (typeof bufData == 'number')
+    return bufData >= 0;
+  if (bufData instanceof ArrayBuffer)
+    return true;
+  return WebGLArrayTypes.some(function(t) {
+    return bufData instanceof t;
+  });
+};
+
+isVertexAttribute = function(idx) {
+  if (typeof idx != 'number') return false;
+  return idx >= 0 && idx < MaxVertexAttribs;
+};
+
+isValidName = function(name) {
+  if (typeof name != 'string') return false;
+  for (var i=0; i<name.length; i++) {
+    var c = name.charCodeAt(i);
+    if (c & 0x00FF == 0 || c & 0xFF00 == 0) {
+      return false;
+    }
+  }
+  return true;
+};
+
+WebGLArrayTypes = [
+  Float32Array,
+  Int32Array,
+  Int16Array,
+  Int8Array,
+  Uint32Array,
+  Uint16Array,
+  Uint8Array
+];
+webGLArrayContentGenerators = [randomLength, randomSmallIntArray];
+randomWebGLArray = function() {
+  var t = WebGLArrayTypes.random();
+  return new t(webGLArrayContentGenerators.random()());
+};
+
+randomArrayBuffer = function(buflen) {
+  if (buflen == null) buflen = 256;
+  var len = randomInt(buflen)+1;
+  var rv;
+  try {
+    rv = new ArrayBuffer(len);
+  } catch(e) {
+    log("Error creating ArrayBuffer with length " + len);
+    throw(e);
+  }
+  return rv;
+};
+
+bufferDataGenerators = [randomLength, randomWebGLArray, randomArrayBuffer];
+randomBufferData = function() {
+  return bufferDataGenerators.random()();
+};
+
+randomSmallWebGLArray = function(buflen) {
+  var t = WebGLArrayTypes.random();
+  return new t(randomInt(buflen/4)+1);
+};
+
+bufferSubDataGenerators = [randomSmallWebGLArray, randomArrayBuffer];
+randomBufferSubData = function(buflen) {
+  var data = bufferSubDataGenerators.random()(buflen);
+  var offset = randomInt(buflen - data.byteLength);
+  return {data:data, offset:offset};
+};
+
+randomColor = function() {
+  return [Math.random(), Math.random(), Math.random(), Math.random()];
+};
+
+randomName = function() {
+  var arr = [];
+  var len = randomLength()+1;
+  for (var i=0; i<len; i++) {
+    var l = randomInt(255)+1;
+    var h = randomInt(255)+1;
+    var c = (h << 8) | l;
+    arr.push(String.fromCharCode(c));
+  }
+  return arr.join('');
+};
+randomVertexAttribute = function() {
+  return randomInt(MaxVertexAttribs);
+};
+
+randomBool = function() { return Math.random() > 0.5; };
+
+randomStencil = function() {
+  return randomInt(MaxStencilValue);
+};
+
+randomLineWidth = function() {
+  var lo = LineWidthRange[0],
+      hi = LineWidthRange[1];
+  return randomFloatFromRange(lo, hi);
+};
+
+randomImage = function(w,h) {
+  var img;
+  var r = Math.random();
+  if (r < 0.5) {
+    img = document.createElement('canvas');
+    img.width = w; img.height = h;
+    img.getContext('2d').fillRect(0,0,w,h);
+  } else if (r < 0.5) {
+    img = document.createElement('video');
+    img.width = w; img.height = h;
+  } else if (r < 0.75) {
+    img = document.createElement('img');
+    img.width = w; img.height = h;
+  } else {
+    img = canvas2D.getContext('2d').createImageData(w,h);
+  }
+  return img
+};
+
+mutateArgs = function(args) {
+  var mutateCount = randomIntFromRange(1, args.length);
+  var newArgs = Array.from(args);
+  for (var i=0; i<mutateCount; i++) {
+    var idx = randomInt(args.length);
+    newArgs[idx] = generateRandomArg(idx, args.length);
+  }
+  return newArgs;
+};
+
+// Calls testFunction numberOfTests times with arguments generated by
+// argGen.generate() (or empty arguments if no generate present).
+//
+// The arguments testFunction is called with are the generated args,
+// the argGen, and what argGen.setup() returned or [] if argGen has not setup
+// method. I.e. testFunction(generatedArgs, argGen, setupVars).
+//
+argGeneratorTestRunner = function(argGen, testFunction, numberOfTests) {
+  // do argument generator setup if needed
+  var setupVars = argGen.setup ? argGen.setup() : [];
+  var error;
+  for (var i=0; i<numberOfTests; i++) {
+    var failed = false;
+    // generate arguments if argGen has a generate method
+    var generatedArgs = argGen.generate ? argGen.generate.apply(argGen, setupVars) : [];
+    try {
+      // call testFunction with the generated args
+      testFunction.call(this, generatedArgs, argGen, setupVars);
+    } catch (e) {
+      failed = true;
+      error = e;
+    }
+    // if argGen needs cleanup for generated args, do it here
+    if (argGen.cleanup)
+      argGen.cleanup.apply(argGen, generatedArgs);
+    if (failed) break;
+  }
+  // if argGen needs to do a final cleanup for setupVars, do it here
+  if (argGen.teardown)
+    argGen.teardown.apply(argGen, setupVars);
+  if (error) throw(error);
+}
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/quickCheckAPIBadArgs.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/quickCheckAPIBadArgs.html
new file mode 100644 (file)
index 0000000..d211837
--- /dev/null
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript" src="quickCheckAPI.js"></script>
+
+<script type="application/x-javascript">
+
+// Test that all GL functions specified in ArgGenerators fail
+// when called with randomly generated invalid arguments
+// Works only on tests with checkArgValidity defined
+Tests.testInvalidArgs = function() {
+  var randomTestCount = 100;
+  for (var name in ArgGenerators) {
+    try {
+      if (!GL[name])
+        throw (new Error(name + " is missing from the WebGL context"));
+      var argGen = ArgGenerators[name];
+      var alreadyTriedArgs = {};
+      if (!argGen.generate || !argGen.checkArgValidity) continue;
+      // test each GL function with randomTestCount randomly generated valid args
+      argGeneratorTestRunner(argGen, function(args, gen, setupVars) {
+        var mutatedArgs;
+        var foundArgs = false;
+        for (var j=0; j<100; j++) {
+          mutatedArgs = mutateArgs(args);
+          var validArgs = false;
+          try {
+            validArgs = gen.checkArgValidity.apply(gen, mutatedArgs);
+          } catch(e) {}
+          if (!validArgs) {
+            if (gen.noAlreadyTriedCheck) {
+              foundArgs = true;
+              break; // found new invalid args
+            }
+            var src = Object.toSource(mutatedArgs);
+            if (!alreadyTriedArgs[src]) {
+              alreadyTriedArgs[src] = true;
+              foundArgs = true;
+              break; // found new invalid args
+            }
+          }
+        }
+        if (!foundArgs)
+          return true;
+        var ok = false;
+        var rv;
+        // assert that GL function fails when called with invalid args
+        assertFail("This should fail: "+name+"("+mutatedArgs.map(function(a){return Object.toSource(a)}).join(",")+")",
+          function(){
+            GL.getError(); // clear off existing error
+            rv = GL[name].apply(GL, mutatedArgs);
+            throwError(GL, name);
+            ok = true;
+          });
+        // if we need to cleanup the return value, do it here
+        // e.g. calling gl.deleteBuffer(rv) after testing gl.createBuffer() above
+        if (gen.returnValueCleanup && rv != null) {
+          assertOk("Cleaning up return value after "+name+"("+mutatedArgs.map(function(a){return Object.toSource(a)}).join(",")+")",
+                   function() { gen.returnValueCleanup(rv); });
+        }
+        GL.getError();
+        return !ok;
+      }, argGen.testCount || randomTestCount);
+    } catch(e) {
+      testFailed(name, e.name, formatError(e));
+    }
+  }
+}
+
+</script>
+<style>canvas{position:absolute;}</style>
+</head><body>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/webGLArrays.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/conformance/webGLArrays.html
new file mode 100644 (file)
index 0000000..26a68e4
--- /dev/null
@@ -0,0 +1,186 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+
+<script type="application/x-javascript">
+
+function assertIdxs(name, arr, length) {
+//   assertOk(name+": Read with negative idx should work", function(){ return arr[-1] });
+//   assertOk(name+": Read with too large idx should work", function(){ return arr[length] });
+//   assertOk(name+": Write with negative idx should work", function(){ arr[-1] = 0 });
+//   assertOk(name+": Write with too large idx should work", function(){ arr[length] = 0 });
+//   arr[0] = 2;
+//   assertEquals(name+": Test that write worked", 2, arr[0]);
+//   assertOk(name+": Write with bad value should work", function(){ arr[0] = {x:"foo"} });
+//   assertEquals(name+": Test that bad write didn't work", 2, arr[0]);
+  assertOk(name+": Read and writes with OK idxs should work", function(){
+    for (var i=0; i<length; i++) arr[i] = i + 1;
+    for (var i=0; i<length; i++) arr[i] = arr[i] + 1;
+    for (var i=0; i<length; i++) assertEquals(name+": Test that reads and writes work", i+2, arr[i]);
+  });
+}
+
+Tests.startUnit = function () {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  prog = new Shader(gl, 'vert', 'frag');
+  prog.use();
+  prog.uniform4f('c', 255, 0, 0, 255);
+  va = prog.attrib('Vertex');
+  buffer = gl.createBuffer();
+  gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
+  return [gl];
+}
+
+Tests.endUnit = function() {
+  prog.destroy();
+}
+
+Tests.testCreateFromArray = function() {
+  var a = new Float32Array([1,2,3,4,5,6]);
+  assertIdxs('Float', a, 6);
+  var a = new Int32Array([1,2,3,4,5,6]);
+  assertIdxs('Int', a, 6);
+  var a = new Int16Array([1,2,3,4,5,6]);
+  assertIdxs('Short', a, 6);
+  var a = new Int8Array([1,2,3,4,5,6]);
+  assertIdxs('Byte', a, 6);
+  var a = new Uint32Array([1,2,3,4,5,6]);
+  assertIdxs('UInt', a, 6);
+  var a = new Uint16Array([1,2,3,4,5,6]);
+  assertIdxs('UShort', a, 6);
+  var a = new Uint8Array([1,2,3,4,5,6]);
+  assertIdxs('UByte', a, 6);
+}
+Tests.testCreateFromCount = function() {
+  var a = new Float32Array(6);
+  assertIdxs('Float', a, 6);
+  var a = new Int32Array(6);
+  assertIdxs('Int', a, 6);
+  var a = new Int16Array(6);
+  assertIdxs('Short', a, 6);
+  var a = new Int8Array(6);
+  assertIdxs('Byte', a, 6);
+  var a = new Uint32Array(6);
+  assertIdxs('UInt', a, 6);
+  var a = new Uint16Array(6);
+  assertIdxs('UShort', a, 6);
+  var a = new Uint8Array(6);
+  assertIdxs('UByte', a, 6);
+}
+Tests.testCreateFromBuffer = function() {
+  var sz = 24;
+  var b = new ArrayBuffer(sz);
+  var a = new Float32Array(b);
+  assertIdxs('Float', a, sz/4);
+  var a = new Int32Array(b);
+  assertIdxs('Int', a, sz/4);
+  var a = new Int16Array(b);
+  assertIdxs('Short', a, sz/2);
+  var a = new Int8Array(b);
+  assertIdxs('Byte', a, sz/1);
+  var a = new Uint32Array(b);
+  assertIdxs('UInt', a, sz/4);
+  var a = new Uint16Array(b);
+  assertIdxs('UShort', a, sz/2);
+  var a = new Uint8Array(b);
+  assertIdxs('UByte', a, sz/1);
+}
+
+Tests.testThatWritesChangeDrawing = function(gl) {
+  var verts = [
+    0,0,
+    1,0,
+    1,1,
+
+    0,0,
+    1,1,
+    0,1
+  ];
+  var a = new Float32Array(verts);
+  var arr = [];
+  for (var i=0; i<12; i++)
+    arr[i] = a[i];
+  assertEquals("Test that reads work from an array-initialized Float32Array", arr, verts);
+  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+  gl.bufferData(gl.ARRAY_BUFFER, a, gl.STATIC_DRAW);
+  gl.vertexAttribPointer(va, 2, gl.FLOAT, false, 0, 0);
+  gl.enableVertexAttribArray(va);
+
+  var id = new Uint8Array(4);
+  gl.readPixels(8,8,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+  assertEquals([0, 0, 0, 0], [id[0], id[1], id[2], id[3]]);
+
+  gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+  gl.readPixels(8,8,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+  assertEquals([255, 0, 0, 255], [id[0], id[1], id[2], id[3]]);
+  gl.readPixels(0,8,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+  assertEquals([0, 0, 0, 0], [id[0], id[1], id[2], id[3]]);
+
+  a[0] = a[6] = a[10] = -1;
+  gl.bufferData(gl.ARRAY_BUFFER, a, gl.STATIC_DRAW);
+  gl.vertexAttribPointer(va, 2, gl.FLOAT, false, 0, 0);
+
+  gl.drawArrays(gl.TRIANGLES, 0, 6);
+
+  gl.readPixels(8,8,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+  assertEquals([255, 0, 0, 255], [id[0], id[1], id[2], id[3]]);
+  gl.readPixels(0,8,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+  assertEquals("Test that Float32Array#[]= worked and drawArrays drew a full-width rectangle",
+               [255, 0, 0, 255], [id[0], id[1], id[2], id[3]]);
+  gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+  assertEquals([0, 0, 0, 0], [id[0], id[1], id[2], id[3]]);
+}
+
+</script>
+<script id="vert" type="x-shader/x-vertex">
+  attribute vec2 Vertex;
+  void main()
+  {
+    gl_Position = vec4(Vertex, 0.0, 1.0);
+  }
+</script>
+<script id="frag" type="x-shader/x-fragment">
+  precision mediump float;
+
+  uniform vec4 c;
+  void main()
+  {
+    gl_FragColor = c;
+  }
+</script>
+<style>canvas{border: 1px solid black}</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/demos/opengl_web.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/demos/opengl_web.html
new file mode 100644 (file)
index 0000000..2fdbe3a
--- /dev/null
@@ -0,0 +1,607 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<title>OpenGL for the web</title>
+
+<script type="application/x-javascript" src="../util.js"></script>
+
+    <script type="application/x-javascript">
+
+function log(msg) {
+  document.getElementById('note').textContent += "\n"+msg;
+}
+
+
+
+
+function init(ev) {
+    var canvas = document.getElementById('canvas');
+    var gl = getGLContext(canvas);
+
+    var shader = new Shader(gl, "ppix-vert", "ppix-frag");
+    shader.compile();
+    var fbo = new FBO(gl, canvas.width, canvas.height);
+    var fbo2 = new FBO(gl, canvas.width, canvas.height);
+    var fbo3 = new FBO(gl, canvas.width, canvas.height);
+    var depth = new Shader(gl, "depth-vert", "depth-frag");
+    var identity = new Filter(gl, "identity-vert", "identity-frag");
+    var unpremult = new Filter(gl, "identity-vert", "unpremult-frag");
+    var hblur = new Filter(gl, "identity-vert", "hblur-frag");
+    var vblur = new Filter(gl, "identity-vert", "vblur-frag");
+    var hdof = new Filter(gl, "identity-vert", "hdof-frag");
+    var vdof = new Filter(gl, "identity-vert", "vdof-frag");
+
+    redraw(canvas, gl, shader, fbo, fbo2, fbo3, depth, identity, unpremult, hblur, vblur, hdof, vdof);
+
+    setInterval(function(){
+        redraw(canvas, gl, shader, fbo, fbo2, fbo3, depth, identity, unpremult, hblur, vblur, hdof, vdof);
+    }, 33);
+}
+
+function drawCube (gl, shader, angle, axis, x,y,z, s, va, na, ta) {
+    Matrix.copyMatrix(look, vmat);
+    Matrix.translate3InPlace(x,y,z,vmat);
+    Matrix.scale1InPlace(s,vmat);
+    Matrix.rotateInPlace(angle, axis, vmat);
+
+    // Note: we could just use mat3(MVMatrix) as the normal matrix
+    // as MVMatrix has only rotations, translations and uniform scaling
+    // <=> MVMatrix is a scaled orthonormal matrix
+    // hence normalize(mat3(MVMatrix)*v) == normalize(mat3(transpose(inverse(MVMatrix))*v)
+    //
+    // But let's do it the hard way to see if Matrix.inverse3x3 works...
+    Matrix.inverseTo3x3InPlace(vmat, nmat);
+    Matrix.transpose3x3InPlace(nmat);
+
+    shader.uniformMatrix4fv("MVMatrix", vmat);
+    shader.uniformMatrix3fv("NMatrix", nmat);
+
+    var cube = Cube.getCachedVBO(gl);
+    cube.draw(va, na, ta);
+}
+
+var carr = [];
+for (var i=0; i<25; i++) {
+    carr.push([Math.random(), Math.random(), Math.random()]);
+}
+
+function drawScene (gl, shader, va, na, ta) {
+    var ot = new Date().getTime();
+    var t = ot;
+
+    shader.uniformMatrix4fv("PMatrix", pmat);
+    for (var i=0; i<carr.length; i++){
+        var c = carr[i];
+        var f = c[1] < 0.5 ? 1 : -1;
+        var t = ot;
+        drawCube(gl, shader,
+                (t/(f*400*(c[0]+0.5))) % (2*Math.PI), c,
+
+                0.45+0.8*c[2],
+                -0.4+Math.cos((i/carr.length*Math.PI*2)+t/1000),
+                0.8+Math.sin((i/carr.length*Math.PI*2)+t/1000)*3.2,
+
+                0.05 + Math.pow((c[0]+c[1]+c[2])*0.33, 2)*0.3,
+                va, na, ta);
+    }
+}
+
+var nmat = Matrix.newIdentity3x3();
+var vmat = Matrix.newIdentity();
+var vmat2 = Matrix.newIdentity();
+var pmat = null;
+var look = Matrix.lookAt([4,-1,8], [-0.2,0,0], [0,1,0]);
+var useDoF = false;
+
+var firstFrame = true;
+
+function redraw(canvas, gl, shader, fbo, fbo2, fbo3, depth, identity, unpremult, hblur, vblur, hdof, vdof) {
+
+    var doDoF = useDoF;
+    gl.viewport(0, 0, canvas.width, canvas.height);
+    gl.clearColor(0.0, 0.0, 0.0, 0.0);
+    gl.enable(gl.DEPTH_TEST);
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+    fbo.use();
+    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+    shader.use();
+
+    var va = shader.attrib("Vertex");
+    var na = shader.attrib("Normal");
+    var ta = shader.attrib("Tex");
+
+    if (pmat == null)
+        pmat = Matrix.perspective(30, canvas.width/canvas.height, 1, 100);
+
+    shader.uniform4f("MaterialSpecular", 0.95, 0.9, 0.6, 1);
+    shader.uniform4f("MaterialDiffuse", 0.50, 0.35, 0.35, 1);
+    shader.uniform4f("MaterialAmbient", 0.0, 0.1, 0.2, 1);
+    shader.uniform1f("MaterialShininess", 1.5);
+
+    shader.uniform4f("GlobalAmbient", 0.1, 0.1, 0.1, 1);
+
+    shader.uniform4f("LightPos", 1, 5, 3, 1.0);
+
+    shader.uniform4f("LightSpecular", 0.9, 0.9, 0.9, 1);
+    shader.uniform4f("LightDiffuse", 0.8, 0.8, 0.8, 1);
+    shader.uniform4f("LightAmbient", 0.0, 0.06, 0.2, 1);
+    shader.uniform1f("LightConstantAtt", 0.0);
+    shader.uniform1f("LightLinearAtt", 0.1);
+    shader.uniform1f("LightQuadraticAtt", 0.0);
+
+    drawScene(gl, shader, va, na);
+
+    if (doDoF || firstFrame) {
+
+        fbo3.use();
+        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+        depth.use();
+        var dva = depth.attrib("Vertex");
+
+        drawScene(gl, depth, dva);
+
+        gl.disable(gl.DEPTH_TEST);
+        gl.activeTexture(gl.TEXTURE1);
+        gl.bindTexture(gl.TEXTURE_2D, fbo3.texture);
+        gl.activeTexture(gl.TEXTURE0);
+
+
+        for (var i=0; i<3; i++) {
+            fbo2.use();
+            gl.bindTexture(gl.TEXTURE_2D, fbo.texture);
+
+            hdof.apply(function(f){
+                f.uniform1i("Texture", 0);
+                f.uniform1i("Depth", 1);
+                f.uniform1f("iter", i);
+                f.uniform1f("step", 1.0/canvas.width);
+            });
+
+            fbo.use();
+            gl.bindTexture(gl.TEXTURE_2D, fbo2.texture);
+
+            vdof.apply(function(f){
+                f.uniform1i("Texture", 0);
+                f.uniform1i("Depth", 1);
+                f.uniform1f("iter", i);
+                f.uniform1f("step", 1.0/canvas.width);
+            });
+        }
+
+    }
+    firstFrame = false;
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+
+    gl.activeTexture(gl.TEXTURE1);
+    gl.bindTexture(gl.TEXTURE_2D, null);
+    gl.activeTexture(gl.TEXTURE0);
+    gl.bindTexture(gl.TEXTURE_2D, fbo.texture);
+
+    // The DoF blur blurs the color from the transparent black background with
+    // the cubes. To get rid of the border, we can treat it as premultiplied alpha.
+    // To see the problem, try replacing unpremult with identity.
+    unpremult.apply(function(f){
+      f.uniform1i("Texture", 0);
+    });
+
+}
+
+window.addEventListener("load", init, false);
+    </script>
+
+    <script id="ppix-vert" type="x-shader/x-vertex">
+      attribute vec3 Vertex;
+      attribute vec3 Normal;
+      attribute vec2 Tex;
+
+      uniform mat4 PMatrix;
+      uniform mat4 MVMatrix;
+      uniform mat3 NMatrix;
+
+      uniform vec4 MaterialAmbient;
+      uniform vec4 MaterialDiffuse;
+
+      uniform vec4 LightAmbient;
+      uniform vec4 LightDiffuse;
+
+      uniform vec4 GlobalAmbient;
+
+      uniform vec4 LightPos;
+
+      varying vec4 diffuse, ambientGlobal, ambient;
+      varying vec3 normal, lightDir, halfVector;
+      varying float dist;
+
+      void main()
+      {
+        vec4 worldPos;
+        vec3 lightVector;
+        vec4 v = vec4(Vertex, 1.0);
+
+        /* transform vertex normal into world space and normalize */
+        normal = normalize(NMatrix * Normal);
+
+        /* transform vertex into world space and compute the vector
+          from it to the light */
+        worldPos = MVMatrix * v;
+        lightVector = vec3(LightPos - worldPos);
+        lightDir = normalize(lightVector);
+        dist = length(lightVector);
+
+        /* Half-vector used in Blinn-Phong shading due to computational efficiency */
+        halfVector = normalize(lightVector - vec3(worldPos));
+
+        diffuse = MaterialDiffuse * LightDiffuse;
+
+        /* The ambient terms have been separated since one of them */
+        /* suffers attenuation */
+        ambient = MaterialAmbient * LightAmbient;
+        ambientGlobal = GlobalAmbient * MaterialAmbient;
+
+        gl_Position = PMatrix * worldPos;
+      }
+    </script>
+
+    <script id="ppix-frag" type="x-shader/x-fragment">
+      precision mediump float;
+
+      uniform vec4 LightSpecular;
+      uniform vec4 MaterialSpecular;
+      uniform float MaterialShininess;
+
+      uniform float LightConstantAtt;
+      uniform float LightLinearAtt;
+      uniform float LightQuadraticAtt;
+
+      varying vec4 diffuse,ambientGlobal, ambient;
+      varying vec3 normal, lightDir, halfVector;
+      varying float dist;
+
+      void main()
+      {
+        vec3 n, halfV, viewV, ldir;
+        float NdotL, NdotHV;
+        vec4 color = ambientGlobal;
+        float att;
+
+        n = normalize(normal);
+
+        NdotL = max(dot(n, normalize(lightDir)), 0.0);
+
+        if (NdotL > 0.0) {
+
+          att = 1.0 / (LightConstantAtt + LightLinearAtt * dist + LightQuadraticAtt * dist * dist);
+
+          color += att * (diffuse * NdotL + ambient);
+
+          halfV = normalize(halfVector);
+          NdotHV = max( dot(normal, halfV), 0.0 );
+
+          color += att * MaterialSpecular * LightSpecular * pow(NdotHV, MaterialShininess);
+        }
+
+        gl_FragColor = color;
+      }
+    </script>
+    <script id="depth-vert" type="x-shader/x-vertex">
+      attribute vec3 Vertex;
+      uniform mat4 PMatrix;
+      uniform mat4 MVMatrix;
+      varying float depth;
+      void main()
+      {
+        gl_Position = PMatrix * (MVMatrix * vec4(Vertex, 1.0));
+        depth = 1.0-(gl_Position.z / gl_Position.w);
+      }
+    </script>
+    <script id="depth-frag" type="x-shader/x-fragment">
+      precision mediump float;
+
+      varying float depth;
+      void main()
+      {
+        vec4 c = vec4(depth, 0.0, 0.0, 1.0);
+        gl_FragColor = c;
+      }
+    </script>
+
+    <script id="identity-vert" type="x-shader/x-vertex">
+      attribute vec3 Vertex;
+      attribute vec2 Tex;
+
+      varying vec4 texCoord0;
+      void main()
+      {
+        texCoord0 = vec4(Tex,0.0,0.0);
+        gl_Position = vec4(Vertex, 1.0);
+      }
+    </script>
+    <script id="identity-frag" type="x-shader/x-fragment">
+      precision mediump float;
+
+      uniform sampler2D Texture;
+
+      varying vec4 texCoord0;
+      void main()
+      {
+        vec4 c = texture2D(Texture, texCoord0.st);
+        gl_FragColor = c;
+      }
+    </script>
+    <script id="premult-frag" type="x-shader/x-fragment">
+      precision mediump float;
+
+      uniform sampler2D Texture;
+
+      varying vec4 texCoord0;
+      void main()
+      {
+        vec4 c = texture2D(Texture, texCoord0.st);
+        float a = c.a;
+        c *= a;
+        c.a = a;
+        gl_FragColor = c;
+      }
+    </script>
+    <script id="unpremult-frag" type="x-shader/x-fragment">
+      precision mediump float;
+
+      uniform sampler2D Texture;
+
+      varying vec4 texCoord0;
+      void main()
+      {
+        vec4 c = texture2D(Texture, texCoord0.st);
+        float a = c.a;
+        c /= a;
+        c.a = a;
+        gl_FragColor = c;
+      }
+    </script>
+
+    <script id="hblur-frag" type="x-shader/x-fragment">
+      precision mediump float;
+
+      uniform sampler2D Texture;
+      uniform float step;
+      float kernel[7] = float[](0.046, 0.111, 0.202, 0.283, 0.202, 0.111, 0.046);
+
+      varying vec4 texCoord0;
+      void main()
+      {
+        int i=0;
+        if (texture2D(Texture, texCoord0.st).a > 0.0) {
+          vec4 sum = vec4(0.0);
+          for (i=0; i<7; i++) {
+            vec4 tmp = texture2D(Texture, texCoord0.st + vec2(i*step,0));
+            sum += tmp * kernel[i];
+          }
+          gl_FragColor = sum;
+        } else {
+          gl_FragColor = texture2D(Texture, texCoord0.st);
+        }
+      }
+    </script>
+    <script id="vblur-frag" type="x-shader/x-fragment">
+      precision mediump float;
+
+      uniform sampler2D Texture;
+      uniform float step;
+      float kernel[7] = float[](0.046, 0.111, 0.202, 0.283, 0.202, 0.111, 0.046);
+
+      varying vec4 texCoord0;
+      void main()
+      {
+        int i=0;
+        if (texture2D(Texture, texCoord0.st).a > 0.0) {
+          vec4 sum = vec4(0.0);
+          for (i=0; i<7; i++) {
+            vec4 tmp = texture2D(Texture, texCoord0.st + vec2(0,i*step));
+            sum += tmp * kernel[i];
+          }
+          gl_FragColor = sum;
+        } else {
+          gl_FragColor = texture2D(Texture, texCoord0.st);
+        }
+      }
+    </script>
+    <script id="hdof-frag" type="x-shader/x-fragment">
+      precision mediump float;
+
+      uniform sampler2D Texture;
+      uniform sampler2D Depth;
+      uniform float step;
+      uniform float iter;
+      float kernel[7] = { 0.046, 0.111, 0.202, 0.283, 0.202, 0.111, 0.046 };
+
+      varying vec4 texCoord0;
+      void main()
+      {
+        vec4 tmp;
+        vec4 sum = vec4(0.0);
+        bool b = (iter < -26.0+36.0*(1.0-texture2D(Depth, texCoord0.st).r) && texture2D(Texture, texCoord0.st).a > 0.0);
+        tmp = texture2D(Texture, texCoord0.st + vec2(float(0-3)*step,0));
+        sum += tmp * kernel[0];
+        tmp = texture2D(Texture, texCoord0.st + vec2(float(1-3)*step,0));
+        sum += tmp * kernel[1];
+        tmp = texture2D(Texture, texCoord0.st + vec2(float(2-3)*step,0));
+        sum += tmp * kernel[2];
+        tmp = texture2D(Texture, texCoord0.st + vec2(float(3-3)*step,0));
+        sum += tmp * kernel[3];
+        tmp = texture2D(Texture, texCoord0.st + vec2(float(4-3)*step,0));
+        sum += tmp * kernel[4];
+        tmp = texture2D(Texture, texCoord0.st + vec2(float(5-3)*step,0));
+        sum += tmp * kernel[5];
+        tmp = texture2D(Texture, texCoord0.st + vec2(float(6-3)*step,0));
+        sum += tmp * kernel[6];
+        gl_FragColor = mix(texture2D(Texture, texCoord0.st), sum, b ? 1.0 : 0.0);
+      }
+    </script>
+    <script id="vdof-frag" type="x-shader/x-fragment">
+      precision mediump float;
+
+      uniform sampler2D Texture;
+      uniform sampler2D Depth;
+      uniform float step;
+      uniform float iter;
+      float kernel[7] = float[7](0.046, 0.111, 0.202, 0.283, 0.202, 0.111, 0.046);
+
+      varying vec4 texCoord0;
+      void main()
+      {
+        vec4 tmp;
+        vec4 sum = vec4(0.0);
+        bool b = (iter < -26.0+36.0*(1.0-texture2D(Depth, texCoord0.st).r) && texture2D(Texture, texCoord0.st).a > 0.0);
+        tmp = texture2D(Texture, texCoord0.st + vec2(0,float(0-3)*step));
+        sum += tmp * kernel[0];
+        tmp = texture2D(Texture, texCoord0.st + vec2(0,float(1-3)*step));
+        sum += tmp * kernel[1];
+        tmp = texture2D(Texture, texCoord0.st + vec2(0,float(2-3)*step));
+        sum += tmp * kernel[2];
+        tmp = texture2D(Texture, texCoord0.st + vec2(0,float(3-3)*step));
+        sum += tmp * kernel[3];
+        tmp = texture2D(Texture, texCoord0.st + vec2(0,float(4-3)*step));
+        sum += tmp * kernel[4];
+        tmp = texture2D(Texture, texCoord0.st + vec2(0,float(5-3)*step));
+        sum += tmp * kernel[5];
+        tmp = texture2D(Texture, texCoord0.st + vec2(0,float(6-3)*step));
+        sum += tmp * kernel[6];
+        gl_FragColor = mix(texture2D(Texture, texCoord0.st), sum, b ? 1.0 : 0.0);
+      }
+    </script>
+
+    <style>
+      * { margin: 0px; padding: 0px; }
+      html {
+        background-color: #707888;
+        color: #222222;
+      }
+      #canvas {
+        position: absolute;
+        cursor: pointer;
+        top: 115px; left: 550px;
+      }
+      #note {
+        position: absolute;
+        top: 4px;
+        left: 4px;
+      }
+      #content {
+        margin-left: 99px;
+        padding-left: 8px;
+        padding-right: 8px;
+        padding-bottom: 16px;
+        width: 600px;
+        background-color: rgba(255,255,255,1.0);
+        text-align: center;
+        border-left: 1px solid rgba(0,0,0,0.5);
+        border-right: 2px solid rgba(0,0,0,0.75);
+      }
+      h1 {
+        padding-top: 24px;
+        padding-bottom: 16px;
+        margin-bottom: 24px;
+        border-bottom: 1px solid black;
+        font-family: Times New Roman, Serif;
+        font-weight: bold;
+        font-size: 40px;
+      }
+      #content p {
+        text-indent: 24px;
+        margin-left: 24px;
+        margin-right: 32px;
+        text-align: justify;
+        font-family: Serif;
+        padding-bottom: 16px;
+      }
+      #above {
+        position: absolute;
+        top: 300px;
+        left: 716px;
+        padding: 10px 20px;
+        background-color: rgba(0,225,0,0.5);
+        border-left: 2px solid rgba(0,64,0,0.75);
+        color: white;
+        font-size: small;
+        font-family: sans-serif;
+      }
+      #above p {
+        text-align: center;
+      }
+    </style>
+
+</head><body>
+    <canvas id="canvas" width="400" height="400" title="Click to toggle DOF shader" onclick="useDoF = !useDoF"></canvas>
+    <pre id="note"></pre>
+
+    <div id="content">
+    <h1>OpenGL for the web</h1>
+    <p>
+The WebGL specification gives web developers access to an
+OpenGL ES 2.0 drawing context for the canvas tag. What that means is
+that you can finally harness the power of the GPU for awesome visuals
+and heavy-duty number crunching in your web apps. </p><p> OpenGL ES 2.0 is a subset of OpenGL 2.0 aimed at embedded
+devices and game consoles. As such, it's a very minimalistic low-level
+API, even more so than desktop OpenGL. In fact, if you took desktop
+OpenGL and stripped out everything but shaders, vertex arrays and
+textures, you'd get something quite like OpenGL ES 2.0. </p>
+    <p>
+      As there is no fixed-function pipeline, you need to write GLSL shaders to draw <i>anything</i>.
+And you need to do your own transformation math, including keeping
+track of the transformation matrix stack. So the raw API is really not
+for the faint of heart; you do need to know your 3D math and shading
+equations. </p>
+    <p> For example, to draw the spinning cubes on the
+right - around 200 lines of application code, 250 lines of shaders and
+800 lines of library code - I had to scrounge the internet for <a href="http://www.lighthouse3d.com/opengl/glsl/index.php?pointlight">GLSL shaders</a>
+to do the transformation and lighting, write a small matrix math
+library in JavaScript and a DOF blur shader. While highly educational,
+it was also a rather steep hill to climb. </p>
+    <p> So, the intended audience of the raw context
+interface are not really end-users, but library developers who can
+write easy-to-use interfaces to the functionality, and 3D developers
+who require a high level of control over the rendering pipeline. </p>
+    <p> The really cool thing about the OpenGL Canvas is
+that it doesn't make policy decisions. There's no single set-in-stone
+use case for it: In addition to 3D graphics, you can also use it for
+filtering images, visualizing fluid dynamics, doing real-time video
+effects, or just crunching a whole lot of FP math. If you can do it on
+the GPU, you're in luck! </p>
+    </div>
+    <div id="above">
+      <p>You can also place content above the canvas</p>
+    </div>
+  </body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/demos/video.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/demos/video.html
new file mode 100644 (file)
index 0000000..c5a8da1
--- /dev/null
@@ -0,0 +1,163 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<script type="application/x-javascript" src="../util.js"></script>
+<script>
+"use strict";
+var processor = {
+  lastTime : new Date,
+  timerCallback: function() {
+    if (this.video.paused || this.video.ended) {
+      return;
+    }
+    this.computeFrame();
+    var t = new Date;
+    var elapsed = t - this.lastTime;
+    this.lastTime = t;
+    var self = this;
+    setTimeout(function () {
+        self.timerCallback();
+      }, Math.max(0, 33-elapsed));
+  },
+
+  init: function() {
+    if (this.initDone) return;
+    this.c2 = document.getElementById("c2");
+    this.ctx2 = getGLContext(this.c2);
+    this.greenScreen = new Filter(this.ctx2, 'identity-flip-vert', 'greenScreen');
+    this.ctx2.activeTexture(this.ctx2.TEXTURE0);
+    this.tex = loadTexture(this.ctx2, this.c1, false);
+    this.ctx2.activeTexture(this.ctx2.TEXTURE1);
+    this.tex2 = loadTexture(this.ctx2, document.getElementById('i'), false);
+    this.ctx2.activeTexture(this.ctx2.TEXTURE0);
+    this.initDone = true;
+  },
+
+  doLoad: function() {
+    this.video = document.getElementById("video");
+    this.c1 = document.getElementById("c1");
+    this.ctx1 = this.c1.getContext("2d");
+    this.ctx1.globalCompositeOperation = 'copy';
+    this.ctx1.fillRect(0,0,this.c1.width, this.c1.height);
+    var self = this;
+    this.video.addEventListener("play", function() {
+        self.init();
+        self.width = self.video.videoWidth;
+        self.height = self.video.videoHeight;
+        self.lastTime = new Date;
+        self.timerCallback();
+      }, false);
+  },
+
+  computeFrame: function() {
+//     this.ctx1.drawImage(this.video, 0, 0, this.width, this.height);
+    this.ctx2.texImage2D(this.ctx2.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this.video);
+    this.greenScreen.apply(function(s) {
+        s.uniform1i('Texture', 0);
+        s.uniform1i('Texture2', 1);
+    });
+
+    return;
+  }
+};
+
+</script>
+<script id="identity-flip-vert" type="x-shader/x-vertex">
+    attribute vec3 Vertex;
+    attribute vec2 Tex;
+
+    varying vec4 texCoord0;
+    void main()
+    {
+        texCoord0 = vec4(Tex.s,1.0-Tex.t,0.0,0.0);
+        gl_Position = vec4(Vertex, 1.0);
+    }
+</script>
+<script id="greenScreen" type="x-shader/x-fragment">
+    precision mediump float;
+
+    uniform sampler2D Texture;
+    uniform sampler2D Texture2;
+
+    varying vec4 texCoord0;
+    void main()
+    {
+        vec4 c = texture2D(Texture, texCoord0.st);
+        float r = c.r * 0.5;
+        float a = c.g * 6.28;
+        float x = cos(a) * r;
+        float y = sin(a) * r;
+        vec4 c2 = texture2D(Texture2, vec2(0.7+x, 0.5+y));
+        // Shaders with branches are not allowed when dealing with non-SOP content
+        // so instead of "if (b) c2.a = 0;", we use mix()
+        bool b = (c.g > 120.0/255.0 && c.r > 120.0/255.0 && c.b < 50.0/255.0);
+        c2.a = mix(c2.a, 0.0, float(b));
+        gl_FragColor = c2;
+    }
+</script>
+    <style>
+      body {
+        background: black;
+        color:#CCCCCC;
+      }
+      a {
+          color: white;
+      }
+      #c2 {
+        background-image: url(http://www.mozbox.org/pub/green/foo.png);
+        background-repeat: repeat;
+      }
+      div {
+        float: left;
+        border :1px solid #444444;
+        padding:10px;
+        margin: 10px;
+        background:#3B3B3B;
+      }
+      img { display: none; }
+    </style>
+ </head>
+  <body onload="processor.doLoad()">
+    <div>
+        This is a port of Paul Rouget's <a href="http://blog.mozbox.org/post/2009/02/25/video-canvas%3A-special-effects">Canvas+Video green screen demo</a>, plus a texture lookup from the Firefox logo based on the values of the green and red color channels.
+    </div>
+    <div>
+      <video id="video" controls="true">
+        <source src="http://www.mozbox.org/pub/green/video.ogv"></source>
+        <source src="http://cs.helsinki.fi/u/ilmarihe/c3d/demos/video.mp4"></source>
+      </video>
+      <canvas id="c1" width="320" height="192"></canvas>
+    </div>
+    <div>
+      <canvas id="c2" width="640" height="384"></canvas>
+    </div>
+    <img id="i" src="http://www.mozbox.org/pub/green/foo.png">
+  </body>
+</html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bindBuffer.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bindBuffer.html
new file mode 100644 (file)
index 0000000..75ec715
--- /dev/null
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  return [gl];
+}
+
+Tests.testBindBufferARRAY_BUFFER = function(gl) {
+  var b = gl.createBuffer();
+  assert(gl.NO_ERROR == checkError(gl, "genBuffers"));
+  gl.bindBuffer(gl.ARRAY_BUFFER, b);
+  assert(gl.NO_ERROR == checkError(gl, "bindBuffer"));
+  gl.bindBuffer(gl.ARRAY_BUFFER, null);
+  assert(gl.NO_ERROR == checkError(gl, "bindBuffer 0"));
+  gl.deleteBuffer(b);
+  assert(gl.NO_ERROR == checkError(gl, "deleteBuffers"));
+}
+
+Tests.testBindBufferELEMENT_ARRAY_BUFFER = function(gl) {
+  var b = gl.createBuffer();
+  assert(gl.NO_ERROR == checkError(gl, "genBuffers"));
+  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, b);
+  assert(gl.NO_ERROR == checkError(gl, "bindBuffer"));
+  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+  assert(gl.NO_ERROR == checkError(gl, "bindBuffer 0"));
+  gl.deleteBuffer(b);
+  assert(gl.NO_ERROR == checkError(gl, "deleteBuffers"));
+}
+
+</script>
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+  <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bindBufferBadArgs.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bindBufferBadArgs.html
new file mode 100644 (file)
index 0000000..f1286e9
--- /dev/null
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  return [gl];
+}
+
+Tests.testBindBufferARRAY_BUFFER = function(gl) {
+  var b = gl.createBuffer();
+  assertOk("bind buffer", function(){gl.bindBuffer(gl.ARRAY_BUFFER, b)});
+  assertFail("bufferData to null buffer", function() {
+    gl.bindBuffer(gl.ARRAY_BUFFER, null);
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([10]), gl.STATIC_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([10]));
+  });
+  assertFail("bind to number", function(){
+    gl.bindBuffer(gl.ARRAY_BUFFER, 1000000000);
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([10]), gl.STATIC_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([10]));
+  });
+  assertOk("bind to null", function(){gl.bindBuffer(gl.ARRAY_BUFFER, null)});
+  gl.deleteBuffer(b);
+}
+
+Tests.testBindBufferELEMENT_ARRAY_BUFFER = function(gl) {
+  var b = gl.createBuffer();
+  assertOk("bind buffer", function(){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, b)});
+  assertFail("bufferData to null buffer", function() {
+    gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Float32Array([10]), gl.STATIC_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([10]));
+  });
+  assertFail("bind to number", function(){
+    gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, 1000000000);
+    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Float32Array([10]), gl.STATIC_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([10]));
+  });
+  assertOk("bind to null",
+      function(){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null)});
+  gl.deleteBuffer(b);
+}
+Tests.testBindBuffer = function(gl) {
+    assertFail("bind ARRAY_BUFFER to number",
+        function(){gl.bindBuffer(gl.ARRAY_BUFFER, 1);});
+    assertFail("bind ELEMENT_ARRAY_BUFFER to number",
+        function(){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, 1);});
+    assertFail("bind bad target",
+        function(){gl.bindBuffer(gl.FLOAT, 0);});
+    assertFail("bind ARRAY_BUFFER to string",
+        function(){gl.bindBuffer(gl.ARRAY_BUFFER, "foo");});
+    assertFail("bind ELEMENT_ARRAY_BUFFER to string",
+        function(){gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, "foo");});
+}
+
+</script>
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+  <canvas id="gl" width="1" height="1"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bindFramebufferLeaveNonZero.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bindFramebufferLeaveNonZero.html
new file mode 100644 (file)
index 0000000..06722a1
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<title>OpenGL for the web</title>
+
+<script type="application/x-javascript" src="../util.js"></script>
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+
+    <script type="application/x-javascript">
+Tests.message = "This was segfaulting when the GL context got GC'd (in glXDestroyContext)";
+Tests.testSeg = function () {
+    var canvas = document.getElementById('canvas');
+    var gl = getGLContext(canvas);
+
+    var fbo = gl.createFramebuffer();
+    gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
+}
+</script>
+
+</head><body>
+    <canvas id="canvas" width="400" height="400"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bufferData.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bufferData.html
new file mode 100644 (file)
index 0000000..f3ca6db
--- /dev/null
@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  var buf = gl.createBuffer();
+  var ebuf = gl.createBuffer();
+  gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ebuf);
+  return [gl, buf, ebuf];
+}
+
+Tests.testBufferData = function(gl, buf, ebuf) {
+    var data = [0,0,0,0, 1,0,0,0, 0,1,0,0];
+    gl.bufferData(gl.ARRAY_BUFFER, 12, gl.STATIC_DRAW);
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([]), gl.STATIC_DRAW);
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STATIC_DRAW);
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STREAM_DRAW);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STREAM_DRAW);
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.DYNAMIC_DRAW);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.DYNAMIC_DRAW);
+
+    gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.STATIC_DRAW);
+    gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.STREAM_DRAW);
+    gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.DYNAMIC_DRAW);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*2);
+    throwError(gl, "array bufferSubData");
+}
+Tests.testBufferDataElement = function(gl, buf, ebuf) {
+    var data = [0,0,0,0, 1,0,0,0, 0,1,0,0];
+    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STATIC_DRAW);
+    assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STATIC_DRAW);
+    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STREAM_DRAW);
+    assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STREAM_DRAW);
+    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.DYNAMIC_DRAW);
+    assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_USAGE), gl.DYNAMIC_DRAW);
+    assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE), 12*2);
+    throwError(gl, "element array bufferSubData");
+}
+
+Tests.endUnit = function(gl, buf, ebuf) {
+    gl.deleteBuffer(buf);
+    gl.deleteBuffer(ebuf);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bufferSubData.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bufferSubData.html
new file mode 100644 (file)
index 0000000..fe31da0
--- /dev/null
@@ -0,0 +1,138 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+    var canvas = document.getElementById('gl');
+    var gl = getGLContext(canvas);
+    var buf = gl.createBuffer();
+    var ebuf = gl.createBuffer();
+    gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+    gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ebuf);
+    return [gl, buf, ebuf];
+}
+
+Tests.testBufferSubData = function(gl, buf, ebuf) {
+    var data = [0,0,0,0, 1,0,0,0, 0,1,0,0];
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 32, new Float32Array([1,1,1,1]));
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STATIC_DRAW);
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STREAM_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STREAM_DRAW);
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.DYNAMIC_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint32Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int32Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int16Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int8Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint8Array([1,1,1,1]));
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.DYNAMIC_DRAW);
+
+    gl.bufferData(gl.ARRAY_BUFFER, 12, gl.STATIC_DRAW);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STATIC_DRAW);
+
+    gl.bufferData(gl.ARRAY_BUFFER, 12*4, gl.STATIC_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 32, new Float32Array([1,1,1,1]));
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STATIC_DRAW);
+    gl.bufferData(gl.ARRAY_BUFFER, 12*4, gl.STREAM_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.STREAM_DRAW);
+    gl.bufferData(gl.ARRAY_BUFFER, 12*4, gl.DYNAMIC_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Float32Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3,4]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint32Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int32Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int16Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Int8Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint8Array([1,1,1,1]));
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*4);
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE), gl.DYNAMIC_DRAW);
+
+    gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.STATIC_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+    gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.STREAM_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+    gl.bufferData(gl.ARRAY_BUFFER, new Uint16Array(data), gl.DYNAMIC_DRAW);
+    gl.bufferSubData(gl.ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+    gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+    assertEquals(gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE), 12*2);
+    throwError(gl, "array bufferSubData");
+}
+Tests.testBufferSubDataElement = function(gl, buf, ebuf) {
+    var data = [0,0,0,0, 1,0,0,0, 0,1,0,0];
+    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STATIC_DRAW);
+    gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+    gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STREAM_DRAW);
+    gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+    gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.DYNAMIC_DRAW);
+    gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 16, new Uint16Array([1,1,1,1]));
+    gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array([1,2,3,4]));
+    assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE), 12*2);
+    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint8Array(data), gl.DYNAMIC_DRAW);
+    gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 4, new Uint8Array([1,1,1,1]));
+    gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint8Array([1,2,3,4]));
+    assertEquals(gl.getBufferParameter(gl.ELEMENT_ARRAY_BUFFER, gl.BUFFER_SIZE), 12);
+    throwError(gl, "element array bufferSubData");
+}
+
+Tests.endUnit = function(gl, buf, ebuf) {
+    gl.deleteBuffer(buf);
+    gl.deleteBuffer(ebuf);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bufferSubDataBadArgs.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/bufferSubDataBadArgs.html
new file mode 100644 (file)
index 0000000..1961e2f
--- /dev/null
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+    var canvas = document.getElementById('gl');
+    var gl = wrapGLContext(getGLContext(canvas));
+    var buf = gl.createBuffer();
+    var ebuf = gl.createBuffer();
+    gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+    gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ebuf);
+    return [gl, buf, ebuf];
+}
+
+Tests.testBufferData = function(gl) {
+    var data = [0,0,0,0, 1,0,0,0, 0,1,0,0];
+    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STREAM_DRAW);
+    gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STREAM_DRAW);
+    assertOk("zero length data",
+        function(){gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array(0));});
+    assertFail("number for data",
+        function(){gl.bufferSubData(gl.ARRAY_BUFFER, 0, 12);});
+    assertFail("bad target",
+        function(){gl.bufferSubData(gl.TEXTURE_2D, 0, new Float32Array([1,2,3]));});
+    assertFail("array for data",
+        function(){gl.bufferSubData(gl.ARRAY_BUFFER, 0, [1,2,3]);});
+    assertOk("floats in element buffer",
+        function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Float32Array([1,2,3]));});
+    assertFail("negative offset",
+        function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, -1, new Uint16Array([1,2,3]));});
+    assertFail("offset out of range",
+        function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 24, new Uint16Array([1,2,3]));});
+    assertFail("offset out of range",
+        function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 2400000, new Uint16Array([1,2,3]));});
+    assertFail("offset out of range",
+        function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 19, new Uint16Array([1,2,3]));});
+    assertFail("data too large",
+        function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array(data.concat([1])));});
+    assertOk("offset + data too large",
+        function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 18, new Uint16Array([1,2,3]));});
+    assertOk("good args",
+        function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array([1,2,3]));});
+    throwError(gl, 'bufferData0');
+    gl.bindBuffer(gl.ARRAY_BUFFER, null);
+    assertFail("setting buffer 0",
+      function(){gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Float32Array([1,2,3]));});
+    throwError(gl, 'bufferData1');
+    gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
+    assertFail("setting buffer 0",
+        function(){gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, 0, new Uint16Array([1,2,3]));});
+    throwError(gl, 'bufferData2');
+}
+
+Tests.endUnit = function(gl, buf, ebuf) {
+    gl.deleteBuffer(buf);
+    gl.deleteBuffer(ebuf);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/isTests.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/isTests.html
new file mode 100644 (file)
index 0000000..a5cd722
--- /dev/null
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  return [gl];
+}
+
+Tests.testIs = function(gl) {
+    var tex = loadTexture(gl, document.getElementById('2d'));
+    gl.bindTexture(gl.TEXTURE_2D, tex);
+    var fbo = new FBO(gl, 1, 1);
+    fbo.use();
+    var prog = gl.createProgram();
+    var sh1 = gl.createShader(gl.VERTEX_SHADER);
+    var sh2 = gl.createShader(gl.FRAGMENT_SHADER);
+    var buf = gl.createBuffer();
+    gl.bindBuffer(gl.ARRAY_BUFFER, buf);
+    assert("tex", gl.isTexture(tex));
+    assert("fbo", gl.isFramebuffer(fbo.fbo));
+    assert("rbo", gl.isRenderbuffer(fbo.rbo));
+    assert("prog", gl.isProgram(prog));
+    assert("sh1", gl.isShader(sh1));
+    assert("sh2", gl.isShader(sh2));
+    assert("buf", gl.isBuffer(buf));
+    gl.deleteTexture(tex);
+    gl.deleteFramebuffer(fbo.fbo);
+    gl.deleteRenderbuffer(fbo.rbo);
+    gl.deleteProgram(prog);
+    gl.deleteShader(sh1);
+    gl.deleteShader(sh2);
+    gl.deleteBuffer(buf);
+    // NOTE: we purposely do not unbind things.
+    assert("tex", !gl.isTexture(tex));
+    assert("fbo", !gl.isFramebuffer(fbo.fbo));
+    assert("rbo", !gl.isRenderbuffer(fbo.rbo));
+    assert("prog", !gl.isProgram(prog));
+    assert("sh1", !gl.isShader(sh1));
+    assert("sh2", !gl.isShader(sh2));
+    assert("buf", !gl.isBuffer(buf));
+}
+
+</script>
+
+<style>canvas{ position:absolute; }</style>
+</head><body>
+  <canvas id="gl" width="1" height="1"></canvas>
+  <canvas id="2d" width="16" height="16"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/isTestsBadArgs.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/isTestsBadArgs.html
new file mode 100644 (file)
index 0000000..93e8d81
--- /dev/null
@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
+<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../../conformance/resources/webgl-test-utils.js"></script>
+
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<canvas id="canvas_element" width="1" height="1"></canvas>
+<script type="application/x-javascript">
+
+function runTest()
+{
+    shouldThrow("gl.isBuffer(gl.createFramebuffer())");
+    shouldThrow("gl.isBuffer(gl.createProgram())");
+    shouldThrow("gl.isBuffer(gl.createRenderbuffer())");
+    shouldThrow("gl.isBuffer(gl.createShader(gl.VERTEX_SHADER))");
+    shouldThrow("gl.isBuffer(gl.createTexture())");
+
+    shouldThrow("gl.isFramebuffer(gl.createBuffer())");
+    shouldThrow("gl.isFramebuffer(gl.createProgram())");
+    shouldThrow("gl.isFramebuffer(gl.createRenderbuffer())");
+    shouldThrow("gl.isFramebuffer(gl.createShader(gl.VERTEX_SHADER))");
+    shouldThrow("gl.isFramebuffer(gl.createTexture())");
+
+    shouldThrow("gl.isProgram(gl.createBuffer())");
+    shouldThrow("gl.isProgram(gl.createFramebuffer())");
+    shouldThrow("gl.isProgram(gl.createRenderbuffer())");
+    shouldThrow("gl.isProgram(gl.createShader(gl.VERTEX_SHADER))");
+    shouldThrow("gl.isProgram(gl.createTexture())");
+
+    shouldThrow("gl.isRenderbuffer(gl.createBuffer())");
+    shouldThrow("gl.isRenderbuffer(gl.createFramebuffer())");
+    shouldThrow("gl.isRenderbuffer(gl.createProgram())");
+    shouldThrow("gl.isRenderbuffer(gl.createShader(gl.VERTEX_SHADER))");
+    shouldThrow("gl.isRenderbuffer(gl.createTexture())");
+
+    shouldThrow("gl.isShader(gl.createBuffer())");
+    shouldThrow("gl.isShader(gl.createFramebuffer())");
+    shouldThrow("gl.isShader(gl.createProgram())");
+    shouldThrow("gl.isShader(gl.createRenderbuffer())");
+    shouldThrow("gl.isShader(gl.createTexture())");
+
+    shouldThrow("gl.isTexture(gl.createBuffer())");
+    shouldThrow("gl.isTexture(gl.createFramebuffer())");
+    shouldThrow("gl.isTexture(gl.createProgram())");
+    shouldThrow("gl.isTexture(gl.createRenderbuffer())");
+    shouldThrow("gl.isTexture(gl.createShader(gl.VERTEX_SHADER))");
+
+    shouldBe("gl.isBuffer(null)",            "false");
+    shouldBe("gl.isBuffer(undefined)",       "false");
+
+    shouldBe("gl.isFramebuffer(null)",       "false");
+    shouldBe("gl.isFramebuffer(undefined)",  "false");
+
+    shouldBe("gl.isProgram(null)",           "false");
+    shouldBe("gl.isProgram(undefined)",      "false");
+
+    shouldBe("gl.isRenderbuffer(null)",      "false");
+    shouldBe("gl.isRenderbuffer(undefined)", "false");
+
+    shouldBe("gl.isShader(null)",            "false");
+    shouldBe("gl.isShader(undefined)",       "false");
+
+    shouldBe("gl.isTexture(null)",           "false");
+    shouldBe("gl.isTexture(undefined)",      "false");
+}
+
+description("Tests type checking for isX() functions");
+var gl = WebGLTestUtils.create3DContext(document.getElementById("canvas_element"));
+runTest();
+var successfullyParsed = true;
+</script>
+
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
+
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/readPixels.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/readPixels.html
new file mode 100644 (file)
index 0000000..be205cc
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  return [gl];
+}
+
+Tests.testReadPixels = function(gl) {
+  var id = new Uint8Array(16 * 16 * 4);
+  assertOk(function(){gl.readPixels(0,0,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);});
+  assertOk(function(){gl.readPixels(0,0,16,16,gl.RGBA, gl.UNSIGNED_BYTE, id);});
+  assertOk(function(){gl.readPixels(15,15,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);});
+}
+Tests.testReadPixelsRGBA = function(gl) {
+  gl.clearColor(1, 0, 1, 0);
+  gl.clear(gl.COLOR_BUFFER_BIT);
+  var id = new Uint8Array(4);
+  gl.readPixels(1,2,1,1,gl.RGBA, gl.UNSIGNED_BYTE, id);
+  assertArrayEquals([255, 0, 255, 0], id);
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texImage2D.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texImage2D.html
new file mode 100644 (file)
index 0000000..c72ac41
--- /dev/null
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  return [gl];
+}
+
+Tests.setup = function(gl) {
+  var tex = gl.createTexture();
+  gl.bindTexture(gl.TEXTURE_2D, tex);
+  var texCubeMap = gl.createTexture();
+  gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap);
+  return [gl]
+}
+
+Tests.teardown = function(gl,tex,texCubeMap) {
+  gl.bindTexture(gl.TEXTURE_2D, null);
+  gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);
+  gl.deleteTexture(tex);
+  gl.deleteTexture(texCubeMap);
+}
+
+Tests.testTexImage2D = function(gl) {
+  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0]));
+  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,2,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0]));
+  var valid_targets = [
+    gl.TEXTURE_2D,
+    gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+    gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+    gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+    gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+    gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+    gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+  ];
+  valid_targets.forEach(function(t) {
+    assertOk(function(){gl.texImage2D(t, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));});
+  });
+}
+
+Tests.testTexImage2DNull = function(gl) {
+  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, null);
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texImage2DHTMLBadArgs.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texImage2DHTMLBadArgs.html
new file mode 100644 (file)
index 0000000..75517ba
--- /dev/null
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html>
+<head>
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<meta charset="utf-8">
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  var tex = gl.createTexture();
+  gl.bindTexture(gl.TEXTURE_2D, tex);
+  return [gl, tex];
+}
+
+Tests.testTexImage2D = function(gl) {
+    var b = document.createElement('b');
+    var div = document.createElement('div');
+    var c = document.getElementById('c');
+    assertFail("bad element b",
+        function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, b); });
+    assertFail("bad element div",
+        function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, div); });
+    assertFail("no element",
+        function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, 0); });
+    assertFail("string as data",
+        function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, "foo"); });
+    assertOk("canvas as data",
+         function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+    assertFail("bad target",
+        function() {gl.texImage2D(gl.FLOAT, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+}
+
+Tests.endUnit = function(gl, tex) {
+    gl.bindTexture(gl.TEXTURE_2D, null);
+    gl.deleteTexture(tex);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+<canvas id="c" width="16" height="16"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texSubImage2D.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texSubImage2D.html
new file mode 100644 (file)
index 0000000..cab9ccf
--- /dev/null
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  return [gl];
+}
+
+Tests.setup = function(gl) {
+  var tex = gl.createTexture();
+  gl.bindTexture(gl.TEXTURE_2D, tex);
+  var texCubeMap = gl.createTexture();
+  gl.bindTexture(gl.TEXTURE_CUBE_MAP, texCubeMap);
+  return [gl]
+}
+
+Tests.teardown = function(gl,tex,texCubeMap) {
+  gl.bindTexture(gl.TEXTURE_2D, null);
+  gl.deleteTexture(tex);
+  gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);
+  gl.deleteTexture(texCubeMap);
+}
+
+Tests.testTexSubImage2D = function(gl) {
+  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 2,2,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]));
+  gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+  gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 2,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0]));
+  gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, 1,2,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0,0,0,0,0]));
+  gl.texSubImage2D(gl.TEXTURE_2D, 0, 1,0, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+  gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,1, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+  gl.texSubImage2D(gl.TEXTURE_2D, 0, 1,1, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+  gl.texImage2D(gl.TEXTURE_2D, 1,gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+  gl.texSubImage2D(gl.TEXTURE_2D, 1, 0,0, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+  var valid_targets = [
+    gl.TEXTURE_2D,
+    gl.TEXTURE_CUBE_MAP_POSITIVE_X,
+    gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
+    gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
+    gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
+    gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
+    gl.TEXTURE_CUBE_MAP_NEGATIVE_Z
+  ];
+  valid_targets.forEach(function(t) {
+    assertOk(function(){
+        gl.texImage2D(t, 0, gl.RGBA, 1,1,0,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+        gl.texSubImage2D(t, 0, 0,0, 1,1,gl.RGBA,gl.UNSIGNED_BYTE, new Uint8Array([0,0,0,0]));
+    });
+  });
+}
+
+Tests.endUnit = function(gl) {
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texSubImage2DHTMLBadArgs.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/texSubImage2DHTMLBadArgs.html
new file mode 100644 (file)
index 0000000..aa441f6
--- /dev/null
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+<link rel="stylesheet" type="text/css" href="../unit.css" />
+<script type="application/x-javascript" src="../unit.js"></script>
+<script type="application/x-javascript" src="../util.js"></script>
+<script type="application/x-javascript">
+
+Tests.startUnit = function () {
+  var canvas = document.getElementById('gl');
+  var gl = wrapGLContext(getGLContext(canvas));
+  var tex = gl.createTexture();
+  gl.bindTexture(gl.TEXTURE_2D, tex);
+  return [gl, tex];
+}
+
+Tests.testTexImage2D = function(gl) {
+    var b = document.createElement('b');
+    var div = document.createElement('div');
+    var c = document.getElementById('c');
+    assertOk("make texture",
+         function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+    assertGLError(gl, gl.INVALID_VALUE, "y + height > texture height",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 1, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+    assertGLError(gl, gl.INVALID_VALUE, "x + width > texture width",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+    assertGLError(gl, gl.INVALID_VALUE, "negative x",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, -1, 0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+    assertGLError(gl, gl.INVALID_VALUE, "negative y",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, -1, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+    assertGLError(gl, gl.INVALID_VALUE, "negative level",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, -1, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+    assertThrowNoGLError(gl, "bad element b",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, b); });
+    assertThrowNoGLError(gl, "bad element div",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, div); });
+    assertThrowNoGLError(gl, "no element",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, 0); });
+    assertThrowNoGLError(gl, "string as data",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0,0, 0, gl.RGBA, gl.UNSIGNED_BYTE, "foo"); });
+    assertGLError(gl, gl.INVALID_ENUM, "bad target",
+        function() {gl.texSubImage2D(gl.FLOAT, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+    assertOk("good args",
+         function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+    assertGLError(gl, gl.INVALID_OPERATION, "format not same as original",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_BYTE, c); });
+    assertGLError(gl, gl.INVALID_OPERATION, "type not same as original",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_SHORT_4_4_4_4, c); });
+    assertOk("make texture RGB",
+         function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, gl.RGB, gl.UNSIGNED_BYTE, c); });
+    assertOk("format same as original RGB",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_BYTE, c); });
+    assertGLError(gl, gl.INVALID_OPERATION, "format not same as original RGB",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+    assertGLError(gl, gl.INVALID_OPERATION, "type not same as original RGB",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_SHORT_5_6_5, c); });
+    assertOk("make texture RGBA 4_4_4_4",
+         function() {gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_SHORT_4_4_4_4, c); });
+    assertOk("format same as original RGBA 4_4_4_4",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_SHORT_4_4_4_4, c); });
+    assertGLError(gl, gl.INVALID_OPERATION, "format not same as original RGBA 4_4_4_4",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGB, gl.UNSIGNED_BYTE, c); });
+    assertGLError(gl, gl.INVALID_OPERATION, "type not same as original RGBA 4_4_4_4",
+        function() {gl.texSubImage2D(gl.TEXTURE_2D, 0, 0,0, gl.RGBA, gl.UNSIGNED_BYTE, c); });
+}
+
+Tests.endUnit = function(gl, tex) {
+    gl.bindTexture(gl.TEXTURE_2D, null);
+    gl.deleteTexture(tex);
+}
+
+</script>
+<style>canvas{ position:absolute; }</style>
+</head><body>
+<canvas id="gl" width="16" height="16"></canvas>
+<canvas id="c" width="16" height="16"></canvas>
+</body></html>
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/uniformMatrix.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/more/functions/uniformMatrix.html
new file mode 100644 (file)
index 0000000..f47f6f5
--- /dev/null
@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including