From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../checkout/conformance/more/00_test_list.txt | 54 + .../webgl-conf/checkout/conformance/more/README.md | 53 + .../checkout/conformance/more/all_tests.html | 378 ++++++ .../conformance/more/all_tests_linkonly.html | 378 ++++++ .../conformance/more/all_tests_sequential.html | 378 ++++++ .../more/conformance/argGenerators-A.js | 69 ++ .../more/conformance/argGenerators-B1.js | 61 + .../more/conformance/argGenerators-B2.js | 154 +++ .../more/conformance/argGenerators-B3.js | 68 ++ .../more/conformance/argGenerators-B4.js | 71 ++ .../more/conformance/argGenerators-C.js | 119 ++ .../more/conformance/argGenerators-D_G.js | 235 ++++ .../more/conformance/argGenerators-G_I.js | 124 ++ .../more/conformance/argGenerators-L_S.js | 122 ++ .../more/conformance/argGenerators-S_V.js | 212 ++++ .../more/conformance/badArgsArityLessThanArgc.html | 576 +++++++++ .../conformance/more/conformance/constants.html | 350 ++++++ .../conformance/more/conformance/fuzzTheAPI.html | 116 ++ .../conformance/more/conformance/getContext.html | 38 + .../conformance/more/conformance/methods.html | 180 +++ .../more/conformance/quickCheckAPI-A.html | 63 + .../more/conformance/quickCheckAPI-B1.html | 63 + .../more/conformance/quickCheckAPI-B2.html | 63 + .../more/conformance/quickCheckAPI-B3.html | 63 + .../more/conformance/quickCheckAPI-B4.html | 63 + .../more/conformance/quickCheckAPI-C.html | 63 + .../more/conformance/quickCheckAPI-D_G.html | 63 + .../more/conformance/quickCheckAPI-G_I.html | 63 + .../more/conformance/quickCheckAPI-L_S.html | 63 + .../more/conformance/quickCheckAPI-S_V.html | 63 + .../conformance/more/conformance/quickCheckAPI.js | 414 +++++++ .../more/conformance/quickCheckAPIBadArgs.html | 82 ++ .../conformance/more/conformance/webGLArrays.html | 165 +++ .../conformance/more/functions/bindBuffer.html | 48 + .../more/functions/bindBufferBadArgs.html | 73 ++ .../functions/bindFramebufferLeaveNonZero.html | 29 + .../conformance/more/functions/bufferData.html | 66 + .../more/functions/bufferDataBadArgs.html | 58 + .../conformance/more/functions/bufferSubData.html | 117 ++ .../more/functions/bufferSubDataBadArgs.html | 79 ++ .../conformance/more/functions/copyTexImage2D.html | 109 ++ .../more/functions/copyTexImage2DBadArgs.html | 88 ++ .../more/functions/copyTexSubImage2D.html | 121 ++ .../more/functions/copyTexSubImage2DBadArgs.html | 96 ++ .../more/functions/deleteBufferBadArgs.html | 44 + .../conformance/more/functions/drawArrays.html | 110 ++ .../conformance/more/functions/drawElements.html | 122 ++ .../conformance/more/functions/isTests.html | 61 + .../conformance/more/functions/isTestsBadArgs.html | 87 ++ .../conformance/more/functions/readPixels.html | 42 + .../more/functions/readPixelsBadArgs.html | 113 ++ .../conformance/more/functions/texImage2D.html | 65 + .../more/functions/texImage2DBadArgs.html | 105 ++ .../conformance/more/functions/texImage2DHTML.html | 149 +++ .../more/functions/texImage2DHTMLBadArgs.html | 51 + .../conformance/more/functions/texSubImage2D.html | 70 ++ .../more/functions/texSubImage2DBadArgs.html | 114 ++ .../more/functions/texSubImage2DHTML.html | 160 +++ .../more/functions/texSubImage2DHTMLBadArgs.html | 83 ++ .../conformance/more/functions/uniformMatrix.html | 69 ++ .../more/functions/uniformMatrixBadArgs.html | 143 +++ .../conformance/more/functions/uniformf.html | 74 ++ .../more/functions/uniformfArrayLen1.html | 100 ++ .../more/functions/uniformfBadArgs.html | 105 ++ .../conformance/more/functions/uniformi.html | 74 ++ .../more/functions/uniformiBadArgs.html | 101 ++ .../conformance/more/functions/vertexAttrib.html | 121 ++ .../more/functions/vertexAttribBadArgs.html | 97 ++ .../more/functions/vertexAttribPointer.html | 85 ++ .../more/functions/vertexAttribPointerBadArgs.html | 71 ++ .../conformance/more/glsl/arrayOutOfBounds.html | 258 ++++ .../conformance/more/glsl/uniformOutOfBounds.html | 196 +++ .../checkout/conformance/more/index.html | 75 ++ .../webgl-conf/checkout/conformance/more/unit.css | 66 + .../webgl-conf/checkout/conformance/more/unit.js | 970 +++++++++++++++ .../webgl-conf/checkout/conformance/more/util.js | 1287 ++++++++++++++++++++ 76 files changed, 11179 insertions(+) create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/00_test_list.txt create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/README.md create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_linkonly.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_sequential.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-A.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-B1.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-B2.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-B3.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-B4.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-C.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-D_G.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-G_I.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-L_S.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-S_V.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/badArgsArityLessThanArgc.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/constants.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/fuzzTheAPI.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/getContext.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/methods.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-A.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B1.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B2.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B3.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B4.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-C.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-D_G.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-G_I.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-L_S.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-S_V.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPIBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/webGLArrays.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindBuffer.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindBufferBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindFramebufferLeaveNonZero.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferData.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferDataBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferSubData.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferSubDataBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexImage2D.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexImage2DBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexSubImage2D.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexSubImage2DBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/deleteBufferBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/drawArrays.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/drawElements.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/isTests.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/isTestsBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/readPixels.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/readPixelsBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2D.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DHTML.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DHTMLBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2D.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DHTML.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DHTMLBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformMatrix.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformMatrixBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformf.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformfArrayLen1.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformfBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformi.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformiBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttrib.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribPointer.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribPointerBadArgs.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/glsl/arrayOutOfBounds.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/glsl/uniformOutOfBounds.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/index.html create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/unit.css create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/unit.js create mode 100644 dom/canvas/test/webgl-conf/checkout/conformance/more/util.js (limited to 'dom/canvas/test/webgl-conf/checkout/conformance/more') diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/00_test_list.txt b/dom/canvas/test/webgl-conf/checkout/conformance/more/00_test_list.txt new file mode 100644 index 0000000000..f202776ac5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/00_test_list.txt @@ -0,0 +1,54 @@ +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/drawElements.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/uniformOutOfBounds.html + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/README.md b/dom/canvas/test/webgl-conf/checkout/conformance/more/README.md new file mode 100644 index 0000000000..01937147f6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/README.md @@ -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. Install a browser with WebGL support + 2. Run ruby gen_tests.rb if you have modified the tests. + 3. Run ruby test_server.rb 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 gen_tests.rb + 3. Look into templates/ to see which functions lack tests (also see methods.txt and nsICanvasRenderingContextWebGL.idl): + 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: Tests.autorun = false; Tests.message = "Caution: this may crash your browser"; + 4. For each performance test: + 1. Write a performance/myTestName.html and set Tests.autorun = false; + 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. for f in $(git status | grep -e "^#\\s*functions/\\S*$" | sed "s/^#\s*//"); do git add $f; git commit -m $f; done) + 7. Send me a pull request. + 8. Congratulations, you're now a contributor! + + +For more information on WebGL: + + * Planet WebGL + * Learning WebGL + * WebGL on Khronos Message Boards + +Developer links: + + * WebGL on Mozilla Bugzilla + * WebGL on WebKit Bugzilla + * WebGL on Chromium Bugzilla + +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/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests.html new file mode 100644 index 0000000000..d089c716f4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests.html @@ -0,0 +1,378 @@ + + + + + + OpenGL ES 2.0 <canvas> context tests + + + + + +
+ +

conformance/badArgsArityLessThanArgc.html

+
+ + +
+ +

conformance/constants.html

+
+ + +
+ +

conformance/fuzzTheAPI.html

+
+ + +
+ +

conformance/getContext.html

+
+ + +
+ +

conformance/methods.html

+
+ + +
+ +

conformance/quickCheckAPI.html

+
+ + +
+ +

conformance/quickCheckAPIBadArgs.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/getImageData.html

+
+ + +
+ +

functions/getImageDataBadArgs.html

+
+ + +
+ +

functions/isTests.html

+
+ + +
+ +

functions/linkProgramBadArgs.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/uniformMatrix.html

+
+ + +
+ +

functions/uniformMatrixBadArgs.html

+
+ + +
+ +

functions/uniformf.html

+
+ + +
+ +

functions/uniformfBadArgs.html

+
+ + +
+ +

functions/uniformi.html

+
+ + +
+ +

functions/uniformiBadArgs.html

+
+ + +
+ +

functions/vertexAttrib.html

+
+ + +
+ +

functions/vertexAttribBadArgs.html

+
+ + +
+ +

functions/vertexAttribPointer.html

+
+ + +
+ +

functions/vertexAttribPointerBadArgs.html

+
+ + +
+ +

performance/CPUvsGPU.html

+
+ + +
+ +

performance/bandwidth.html

+
+ + +
+ +

performance/jsGCPause.html

+
+ + +
+ +

performance/jsMatrixMult.html

+
+ + +
+ +

performance/jsToGLOverhead.html

+
+ + +
+ +

glsl/arrayOutOfBounds.html

+
+ + +
+ +

glsl/longLoops.html

+
+ + +
+ +

glsl/uniformOutOfBounds.html

+
+ + +
+ +

glsl/unusedAttribsUniforms.html

+
+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_linkonly.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_linkonly.html new file mode 100644 index 0000000000..0ec563b028 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_linkonly.html @@ -0,0 +1,378 @@ + + + + + + OpenGL ES 2.0 <canvas> context tests + + + + + +
+ +

conformance/badArgsArityLessThanArgc.html

+
+ + +
+ +

conformance/constants.html

+
+ + +
+ +

conformance/fuzzTheAPI.html

+
+ + +
+ +

conformance/getContext.html

+
+ + +
+ +

conformance/methods.html

+
+ + +
+ +

conformance/quickCheckAPI.html

+
+ + +
+ +

conformance/quickCheckAPIBadArgs.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/getImageData.html

+
+ + +
+ +

functions/getImageDataBadArgs.html

+
+ + +
+ +

functions/isTests.html

+
+ + +
+ +

functions/linkProgramBadArgs.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/uniformMatrix.html

+
+ + +
+ +

functions/uniformMatrixBadArgs.html

+
+ + +
+ +

functions/uniformf.html

+
+ + +
+ +

functions/uniformfBadArgs.html

+
+ + +
+ +

functions/uniformi.html

+
+ + +
+ +

functions/uniformiBadArgs.html

+
+ + +
+ +

functions/vertexAttrib.html

+
+ + +
+ +

functions/vertexAttribBadArgs.html

+
+ + +
+ +

functions/vertexAttribPointer.html

+
+ + +
+ +

functions/vertexAttribPointerBadArgs.html

+
+ + +
+ +

performance/CPUvsGPU.html

+
+ + +
+ +

performance/bandwidth.html

+
+ + +
+ +

performance/jsGCPause.html

+
+ + +
+ +

performance/jsMatrixMult.html

+
+ + +
+ +

performance/jsToGLOverhead.html

+
+ + +
+ +

glsl/arrayOutOfBounds.html

+
+ + +
+ +

glsl/longLoops.html

+
+ + +
+ +

glsl/uniformOutOfBounds.html

+
+ + +
+ +

glsl/unusedAttribsUniforms.html

+
+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_sequential.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_sequential.html new file mode 100644 index 0000000000..5ebf8382ba --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/all_tests_sequential.html @@ -0,0 +1,378 @@ + + + + + + OpenGL ES 2.0 <canvas> context tests + + + + + +
+ +

conformance/badArgsArityLessThanArgc.html

+
+ + +
+ +

conformance/constants.html

+
+ + +
+ +

conformance/fuzzTheAPI.html

+
+ + +
+ +

conformance/getContext.html

+
+ + +
+ +

conformance/methods.html

+
+ + +
+ +

conformance/quickCheckAPI.html

+
+ + +
+ +

conformance/quickCheckAPIBadArgs.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/getImageData.html

+
+ + +
+ +

functions/getImageDataBadArgs.html

+
+ + +
+ +

functions/isTests.html

+
+ + +
+ +

functions/linkProgramBadArgs.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/uniformMatrix.html

+
+ + +
+ +

functions/uniformMatrixBadArgs.html

+
+ + +
+ +

functions/uniformf.html

+
+ + +
+ +

functions/uniformfBadArgs.html

+
+ + +
+ +

functions/uniformi.html

+
+ + +
+ +

functions/uniformiBadArgs.html

+
+ + +
+ +

functions/vertexAttrib.html

+
+ + +
+ +

functions/vertexAttribBadArgs.html

+
+ + +
+ +

functions/vertexAttribPointer.html

+
+ + +
+ +

functions/vertexAttribPointerBadArgs.html

+
+ + +
+ +

performance/CPUvsGPU.html

+
+ + +
+ +

performance/bandwidth.html

+
+ + +
+ +

performance/jsGCPause.html

+
+ + +
+ +

performance/jsMatrixMult.html

+
+ + +
+ +

performance/jsToGLOverhead.html

+
+ + +
+ +

glsl/arrayOutOfBounds.html

+
+ + +
+ +

glsl/longLoops.html

+
+ + +
+ +

glsl/uniformOutOfBounds.html

+
+ + +
+ +

glsl/unusedAttribsUniforms.html

+
+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-A.js b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-A.js new file mode 100644 index 0000000000..c3e301ce14 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-A.js @@ -0,0 +1,69 @@ +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + +// 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 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/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-B3.js b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-B3.js new file mode 100644 index 0000000000..2a4796d914 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-B3.js @@ -0,0 +1,68 @@ +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + +// 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= 0 && data.byteLength >= 0 && offset + data.byteLength <= 256; + }, + teardown : function(buf, ebuf) { + GL.deleteBuffer(buf); + GL.deleteBuffer(ebuf); + }, + } + +}; diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-C.js b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-C.js new file mode 100644 index 0000000000..fbe1c2a5c5 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-C.js @@ -0,0 +1,119 @@ +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + +// 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 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/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-D_G.js b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-D_G.js new file mode 100644 index 0000000000..00e602002f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-D_G.js @@ -0,0 +1,235 @@ +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + +// 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= 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/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-S_V.js b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-S_V.js new file mode 100644 index 0000000000..d08310001c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/argGenerators-S_V.js @@ -0,0 +1,212 @@ +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + +// 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 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/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/badArgsArityLessThanArgc.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/badArgsArityLessThanArgc.html new file mode 100644 index 0000000000..5ee9727a6e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/badArgsArityLessThanArgc.html @@ -0,0 +1,576 @@ + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/constants.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/constants.html new file mode 100644 index 0000000000..61997afae6 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/constants.html @@ -0,0 +1,350 @@ + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/fuzzTheAPI.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/fuzzTheAPI.html new file mode 100644 index 0000000000..c1090aeb4b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/fuzzTheAPI.html @@ -0,0 +1,116 @@ + + + + + + + + + + + + + +

Optional: Enter a comma-separated list of functions to fuzz (leave blank for full API)

+ +

+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/getContext.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/getContext.html
new file mode 100644
index 0000000000..14c0559123
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/getContext.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+  
+  
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/methods.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/methods.html
new file mode 100644
index 0000000000..d6d14bd827
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/methods.html
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+
+
+
+
+  
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-A.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-A.html
new file mode 100644
index 0000000000..fe453457c3
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-A.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B1.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B1.html
new file mode 100644
index 0000000000..6d34f27795
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B1.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B2.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B2.html
new file mode 100644
index 0000000000..2a1ddd9bd9
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B2.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B3.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B3.html
new file mode 100644
index 0000000000..08e85dbc04
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B3.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B4.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B4.html
new file mode 100644
index 0000000000..9ee5228e78
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-B4.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-C.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-C.html
new file mode 100644
index 0000000000..3717e41e77
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-C.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-D_G.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-D_G.html
new file mode 100644
index 0000000000..c692db331b
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-D_G.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-G_I.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-G_I.html
new file mode 100644
index 0000000000..1f474892fb
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-G_I.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-L_S.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-L_S.html
new file mode 100644
index 0000000000..698e1c93d9
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-L_S.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-S_V.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-S_V.html
new file mode 100644
index 0000000000..84e60151e1
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI-S_V.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI.js b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI.js
new file mode 100644
index 0000000000..50e74963e2
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPI.js
@@ -0,0 +1,414 @@
+/*
+Copyright (c) 2019 The Khronos Group Inc.
+Use of this source code is governed by an MIT-style license that can be
+found in the LICENSE.txt file.
+*/
+
+/*
+  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= 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 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.25) {
+    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.muted = true;
+    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 31 && c < 128) ? str[ii] : "?");
+  }
+  return newStr.join('');
+};
+
+argsToString = function(args) {
+  return sanitize(args.map(function(a){return Object.toSource(a)}).join(","));
+};
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPIBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPIBadArgs.html
new file mode 100644
index 0000000000..fb65bf2ad1
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/quickCheckAPIBadArgs.html
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/webGLArrays.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/webGLArrays.html
new file mode 100644
index 0000000000..bd3eba036d
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/conformance/webGLArrays.html
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindBuffer.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindBuffer.html
new file mode 100644
index 0000000000..9011d76168
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindBuffer.html
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindBufferBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindBufferBadArgs.html
new file mode 100644
index 0000000000..09797cb3d0
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindBufferBadArgs.html
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindFramebufferLeaveNonZero.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindFramebufferLeaveNonZero.html
new file mode 100644
index 0000000000..1c0bab8e00
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bindFramebufferLeaveNonZero.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+OpenGL for the web
+
+
+
+
+
+    
+
+
+    
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferData.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferData.html
new file mode 100644
index 0000000000..25d53e6b7e
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferData.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferDataBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferDataBadArgs.html
new file mode 100644
index 0000000000..4a473be0d8
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferDataBadArgs.html
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferSubData.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferSubData.html
new file mode 100644
index 0000000000..df03cf2835
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferSubData.html
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferSubDataBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferSubDataBadArgs.html
new file mode 100644
index 0000000000..a12adf8ff8
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/bufferSubDataBadArgs.html
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexImage2D.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexImage2D.html
new file mode 100644
index 0000000000..8aaebf396d
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexImage2D.html
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexImage2DBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexImage2DBadArgs.html
new file mode 100644
index 0000000000..802fbc971f
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexImage2DBadArgs.html
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexSubImage2D.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexSubImage2D.html
new file mode 100644
index 0000000000..82262e3d68
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexSubImage2D.html
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexSubImage2DBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexSubImage2DBadArgs.html
new file mode 100644
index 0000000000..a170c6c78e
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/copyTexSubImage2DBadArgs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/deleteBufferBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/deleteBufferBadArgs.html
new file mode 100644
index 0000000000..a373448631
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/deleteBufferBadArgs.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/drawArrays.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/drawArrays.html
new file mode 100644
index 0000000000..7fdefbb636
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/drawArrays.html
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/drawElements.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/drawElements.html
new file mode 100644
index 0000000000..f0c3bb3d27
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/drawElements.html
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/isTests.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/isTests.html
new file mode 100644
index 0000000000..54c1cb0603
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/isTests.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+  
+  
+
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/isTestsBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/isTestsBadArgs.html
new file mode 100644
index 0000000000..4d7548140b
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/isTestsBadArgs.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/readPixels.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/readPixels.html new file mode 100644 index 0000000000..61589b0a80 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/readPixels.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/readPixelsBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/readPixelsBadArgs.html new file mode 100644 index 0000000000..3d155ed61b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/readPixelsBadArgs.html @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2D.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2D.html new file mode 100644 index 0000000000..5da8b6313f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2D.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DBadArgs.html new file mode 100644 index 0000000000..c818d1b1a3 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DBadArgs.html @@ -0,0 +1,105 @@ + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DHTML.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DHTML.html new file mode 100644 index 0000000000..5cc78d1635 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DHTML.html @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DHTMLBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DHTMLBadArgs.html new file mode 100644 index 0000000000..0953cd8884 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texImage2DHTMLBadArgs.html @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2D.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2D.html new file mode 100644 index 0000000000..ef0912aa8f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2D.html @@ -0,0 +1,70 @@ + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DBadArgs.html new file mode 100644 index 0000000000..9573607b3b --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DBadArgs.html @@ -0,0 +1,114 @@ + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DHTML.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DHTML.html new file mode 100644 index 0000000000..4f8ec2aa09 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DHTML.html @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DHTMLBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DHTMLBadArgs.html new file mode 100644 index 0000000000..0d860bcaaa --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/texSubImage2DHTMLBadArgs.html @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformMatrix.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformMatrix.html new file mode 100644 index 0000000000..cae388fd4f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformMatrix.html @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformMatrixBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformMatrixBadArgs.html new file mode 100644 index 0000000000..1355cd547f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformMatrixBadArgs.html @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformf.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformf.html new file mode 100644 index 0000000000..3c968c7a0c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformf.html @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformfArrayLen1.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformfArrayLen1.html new file mode 100644 index 0000000000..3b210f1f1e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformfArrayLen1.html @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformfBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformfBadArgs.html new file mode 100644 index 0000000000..32b2c4babc --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformfBadArgs.html @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformi.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformi.html new file mode 100644 index 0000000000..252626a735 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformi.html @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformiBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformiBadArgs.html new file mode 100644 index 0000000000..4741ffebac --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/uniformiBadArgs.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttrib.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttrib.html new file mode 100644 index 0000000000..866c95da1c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttrib.html @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribBadArgs.html new file mode 100644 index 0000000000..67e44a5b87 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribBadArgs.html @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribPointer.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribPointer.html new file mode 100644 index 0000000000..838f7d61e1 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribPointer.html @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribPointerBadArgs.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribPointerBadArgs.html new file mode 100644 index 0000000000..124d0258e3 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/functions/vertexAttribPointerBadArgs.html @@ -0,0 +1,71 @@ + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/glsl/arrayOutOfBounds.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/glsl/arrayOutOfBounds.html new file mode 100644 index 0000000000..195b224a9e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/glsl/arrayOutOfBounds.html @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/glsl/uniformOutOfBounds.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/glsl/uniformOutOfBounds.html new file mode 100644 index 0000000000..c53347e604 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/glsl/uniformOutOfBounds.html @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/index.html b/dom/canvas/test/webgl-conf/checkout/conformance/more/index.html new file mode 100644 index 0000000000..2be2bd3a8d --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/index.html @@ -0,0 +1,75 @@ + + + + + + WebGL tests + + + +

Tests for the WebGL canvas context

+ +

These tests are intended to serve the following purposes:

+
    +
  • Assert spec conformance (so that WebGL pages work the same across browsers and hardware)
  • +
  • Check the safety of the GL binding (bounds checking, same origin policy)
  • +
  • Provide performance numbers for developers
  • +
+ +

Test runners

+ + + +

Demos

+ + +

Running the tests

+ +
    +
  1. Install a browser with WebGL support
  2. +
  3. Open one of the test runners linked above in your browser.
  4. +
  5. For more control over the tests, go the GitHub page, see the readme, and clone the repo.
  6. +
+ +

Want to contribute?

+ +

See the README.

+

See the GitHub page.

+

Mail me at ilmari.heikkinen@gmail.com

+ + +

For more information on WebGL

+ + + +

Developer links

+ + + +

License

+ +

+ These tests are released under the BSD license. The images and videos used in the tests are the respective property of their authors. +

+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/unit.css b/dom/canvas/test/webgl-conf/checkout/conformance/more/unit.css new file mode 100644 index 0000000000..0758b43bd9 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/unit.css @@ -0,0 +1,66 @@ +/* +Tests for the OpenGL ES 2.0 HTML Canvas context + +Copyright (C) 2009 Ilmari Heikkinen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is 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 Software. + +THE SOFTWARE IS 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 SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +*/ +.ok { + color: green; +} +.fail { + color: red; +} +canvas { + display: none; +} +#test-status { + font-size: large; +} + +#test-log { + padding-left: 0.5em; + padding-right: 0.5em; + background: white; + color: black; +} +#test-log > div { + padding-bottom: 0.5em; +} +#test-log h2 { + font-size: 1em; + margin-bottom: 0em; + padding-top: 0.5em; +} +#test-log h3 { + font-size: small; + margin-left: 1.5em; + margin-bottom: 0em; + margin-top: 0.5em; +} +#test-log p { + margin-left: 4em; + font-size: small; + margin-top: 0em; + margin-bottom: 0.2em; +} diff --git a/dom/canvas/test/webgl-conf/checkout/conformance/more/unit.js b/dom/canvas/test/webgl-conf/checkout/conformance/more/unit.js new file mode 100644 index 0000000000..3ca21c4cae --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance/more/unit.js @@ -0,0 +1,970 @@ +/* +Unit testing library for the OpenGL ES 2.0 HTML Canvas context +*/ + +/* +Copyright (c) 2019 The Khronos Group Inc. +Use of this source code is governed by an MIT-style license that can be +found in the LICENSE.txt file. +*/ + +/* -- plaform specific code -- */ + +// WebKit +if (window.testRunner && !window.layoutTestController) { + window.layoutTestController = window.testRunner; +} + +if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); + + // The WebKit testing system compares console output. + // Because the output of the WebGL Tests is GPU dependent + // we turn off console messages. + window.console.log = function() { }; + window.console.error = function() { }; + + // RAF doesn't work in LayoutTests. Disable it so the tests will + // use setTimeout instead. + window.requestAnimationFrame = undefined; + window.webkitRequestAnimationFrame = undefined; +} + +if (window.internals) { + window.internals.settings.setWebGLErrorsToConsoleEnabled(false); +} + +/* -- end platform specific code --*/ +Tests = { + autorun : true, + message : null, + delay : 0, + autoinit: true, + + startUnit : function(){ return []; }, + setup : function() { return arguments; }, + teardown : function() {}, + endUnit : function() {} +} + +var __testSuccess__ = true; +var __testFailCount__ = 0; +var __testLog__; +var __backlog__ = []; + +var getUrlOptions = (function() { + var _urlOptionsParsed = false; + var _urlOptions = {}; + return function() { + if (!_urlOptionsParsed) { + var s = window.location.href; + var q = s.indexOf("?"); + var e = s.indexOf("#"); + if (e < 0) { + e = s.length; + } + var query = s.substring(q + 1, e); + var pairs = query.split("&"); + for (var ii = 0; ii < pairs.length; ++ii) { + var keyValue = pairs[ii].split("="); + var key = keyValue[0]; + var value = decodeURIComponent(keyValue[1]); + _urlOptions[key] = value; + } + _urlOptionsParsed = true; + } + + return _urlOptions; + } +})(); + +if (typeof quietMode == 'undefined') { + var quietMode = (function() { + var _quietModeChecked = false; + var _isQuiet = false; + return function() { + if (!_quietModeChecked) { + _isQuiet = (getUrlOptions().quiet == 1); + _quietModeChecked = true; + } + return _isQuiet; + } + })(); +} + +Object.toSource = function(a, seen){ + if (a == null) return "null"; + if (typeof a == 'boolean') return a ? "true" : "false"; + if (typeof a == 'string') return '"' + a.replace(/"/g, '\\"') + '"'; + if (a instanceof HTMLElement) return a.toString(); + if (a.width && a.height && a.data) return "[ImageData]"; + if (a instanceof Array) { + if (!seen) seen = []; + var idx = seen.indexOf(a); + if (idx != -1) return '#'+(idx+1)+'#'; + seen.unshift(a); + var srcs = a.map(function(o){ return Object.toSource(o,seen) }); + var prefix = ''; + idx = seen.indexOf(a); + if (idx != -1) prefix = '#'+(idx+1)+'='; + return prefix + '[' + srcs.join(", ") + ']'; + } + if (typeof a == 'object') { + if (!seen) seen = []; + var idx = seen.indexOf(a); + if (idx != -1) return '#'+(idx+1)+'#'; + seen.unshift(a); + var members = []; + var name; + try { + for (var i in a) { + if (i.search(/^[a-zA-Z0-9]+$/) != -1) + name = i; + else + name = '"' + i.replace(/"/g, '\\"') + '"'; + var ai; + try { ai = a[i]; } + catch(e) { ai = 'null /*ERROR_ACCESSING*/'; } + var s = name + ':' + Object.toSource(ai, seen); + members.push(s); + } + } catch (e) {} + var prefix = ''; + idx = seen.indexOf(a); + if (idx != -1) prefix = '#'+(idx+1)+'='; + return prefix + '{' + members.join(", ") + '}' + } + if (typeof a == 'function') + return '('+a.toString().replace(/\n/g, " ").replace(/\s+/g, " ")+')'; + return a.toString(); +} + +function formatError(e) { + if (window.console) console.log(e); + var pathSegs = location.href.toString().split("/"); + var currentDoc = e.lineNumber != null ? pathSegs[pathSegs.length - 1] : null; + var trace = (e.filename || currentDoc) + ":" + e.lineNumber + (e.trace ? "\n"+e.trace : ""); + return e.message + "\n" + trace; +} + +function runTests() { + var h = document.getElementById('test-status'); + if (h == null) { + h = document.createElement('h1'); + h.id = 'test-status'; + document.body.appendChild(h); + } + h.textContent = ""; + var log = document.getElementById('test-log'); + if (log == null) { + log = document.createElement('div'); + log.id = 'test-log'; + document.body.appendChild(log); + } + while (log.childNodes.length > 0) + log.removeChild(log.firstChild); + + var setup_args = []; + + if (Tests.startUnit != null) { + __testLog__ = document.createElement('div'); + try { + setup_args = Tests.startUnit(); + if (__testLog__.childNodes.length > 0) + log.appendChild(__testLog__); + } catch(e) { + testFailed("startUnit", formatError(e)); + log.appendChild(__testLog__); + printTestStatus(); + return; + } + } + + var testsRun = false; + var allTestsSuccessful = true; + + for (var i in Tests) { + if (i.substring(0,4) != "test") continue; + __testLog__ = document.createElement('div'); + __testSuccess__ = true; + try { + doTestNotify (i); + var args = setup_args; + if (Tests.setup != null) + args = Tests.setup.apply(Tests, setup_args); + Tests[i].apply(Tests, args); + if (Tests.teardown != null) + Tests.teardown.apply(Tests, args); + } + catch (e) { + testFailed(i, e.name, formatError(e)); + } + if (__testSuccess__ == false) { + ++__testFailCount__; + } + var h = document.createElement('h2'); + h.textContent = i; + __testLog__.insertBefore(h, __testLog__.firstChild); + log.appendChild(__testLog__); + allTestsSuccessful = allTestsSuccessful && __testSuccess__ == true; + reportTestResultsToHarness(__testSuccess__, i); + doTestNotify (i+"--"+(__testSuccess__?"OK":"FAIL")); + testsRun = true; + } + + printTestStatus(testsRun); + if (Tests.endUnit != null) { + __testLog__ = document.createElement('div'); + try { + Tests.endUnit.apply(Tests, setup_args); + if (__testLog__.childNodes.length > 0) + log.appendChild(__testLog__); + } catch(e) { + testFailed("endUnit", e.name, formatError(e)); + log.appendChild(__testLog__); + } + } + notifyFinishedToHarness(allTestsSuccessful, "finished tests"); +} + +function doTestNotify(name) { + //try { + // var xhr = new XMLHttpRequest(); + // xhr.open("GET", "http://localhost:8888/"+name, true); + // xhr.send(null); + //} catch(e) {} +} + +function testFailed(assertName, name) { + var d = document.createElement('div'); + var h = document.createElement('h3'); + var d1 = document.createElement("span"); + h.appendChild(d1); + d1.appendChild(document.createTextNode("FAIL: ")); + d1.style.color = "red"; + h.appendChild(document.createTextNode( + name==null ? assertName : name + " (in " + assertName + ")")); + d.appendChild(h); + var args = [] + for (var i=2; il[ii]) { + testFailed("assertArrayEqualsWithEpsilon", name, v, p, l); + return false; + } + } + testPassed("assertArrayEqualsWithEpsilon", name, v, p, l); + return true; +} + +function assertNotEquals(name, v, p) { + if (p == null) { p = v; v = name; name = null; } + if (compare(v, p)) { + testFailed("assertNotEquals", name, v, p) + return false; + } else { + testPassed("assertNotEquals", name, v, p) + return true; + } +} + +function time(elementId, f) { + var s = document.getElementById(elementId); + var t0 = new Date().getTime(); + f(); + var t1 = new Date().getTime(); + s.textContent = 'Elapsed: '+(t1-t0)+' ms'; +} + +function randomFloat () { + // note that in fuzz-testing, this can used as the size of a buffer to allocate. + // so it shouldn't return astronomic values. The maximum value 10000000 is already quite big. + var fac = 1.0; + var r = Math.random(); + if (r < 0.25) + fac = 10; + else if (r < 0.4) + fac = 100; + else if (r < 0.5) + fac = 1000; + else if (r < 0.6) + fac = 100000; + else if (r < 0.7) + fac = 10000000; + else if (r < 0.8) + fac = NaN; + return -0.5*fac + Math.random() * fac; +} +function randomFloatFromRange(lo, hi) { + var r = Math.random(); + if (r < 0.05) + return lo; + else if (r > 0.95) + return hi; + else + return lo + Math.random()*(hi-lo); +} +function randomInt (sz) { + if (sz != null) + return Math.floor(Math.random()*sz); + else + return Math.floor(randomFloat()); +} +function randomIntFromRange(lo, hi) { + return Math.floor(randomFloatFromRange(lo, hi)); +} +function randomLength () { + var l = Math.floor(Math.random() * 256); + if (Math.random < 0.5) l = l / 10; + if (Math.random < 0.3) l = l / 10; + return l; +} +function randomSmallIntArray () { + var l = randomLength(); + var s = new Array(l); + for (var i=0; i