diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/canvas/test/webgl-conf/checkout/conformance2/state | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/conformance2/state')
5 files changed, 380 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/conformance2/state/00_test_list.txt b/dom/canvas/test/webgl-conf/checkout/conformance2/state/00_test_list.txt new file mode 100644 index 000000000..5bbd184e4 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance2/state/00_test_list.txt @@ -0,0 +1,4 @@ +gl-enum-tests.html +gl-get-calls.html +gl-getstring.html +gl-object-get-calls.html diff --git a/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-enum-tests.html b/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-enum-tests.html new file mode 100644 index 000000000..d87fcfe66 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-enum-tests.html @@ -0,0 +1,50 @@ +<!-- + +/* +** Copyright (c) 2015 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. +*/ + +--> + +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL gl enums Conformance Tests</title> +<link rel="stylesheet" href="../../resources/js-test-style.css"/> +<script src="../../js/desktop-gl-constants.js"></script> +<script src="../../js/js-test-pre.js"></script> +<script src="../../js/webgl-test-utils.js"></script> +<script src="../../js/test-eval.js"></script> +</head> +<body> +<div id="description"></div> +<div id="console"></div> +<canvas id="canvas" width="2" height="2"> </canvas> +<script> +var contextVersion = 2; +</script> +<script src="../../js/tests/gl-enum-tests.js"></script> +<script src="../../js/js-test-post.js"></script> + +</body> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-get-calls.html b/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-get-calls.html new file mode 100644 index 000000000..c47b6a754 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-get-calls.html @@ -0,0 +1,198 @@ +<!-- + +/* +** Copyright (c) 2015 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. +*/ + +--> + +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL gl calls Conformance Tests</title> +<link rel="stylesheet" href="../../resources/js-test-style.css"/> +<script src="../../js/js-test-pre.js"></script> +<script src="../../js/webgl-test-utils.js"></script> +</head> +<body> +<div id="description"></div> +<div id="console"></div> +<canvas id="canvas" width="2" height="2"> </canvas> +<script> +"use strict"; +description("This test ensures getParameter is working correct with WebGL 2 pnames"); + +debug(""); +debug("Canvas.getContext"); + +var minimumRequiredStencilMask = 0; +var wtu = WebGLTestUtils; +var context = wtu.create3DContext("canvas", null, 2); +if (!context) + testFailed("context does not exist"); +else { + testPassed("context exists"); + + debug(""); + debug("Context contains getError"); + if ("getError" in context) + testPassed("context contains getError"); + else + testFailed("context does not contains getError"); + + debug(""); + debug("Check default values"); + + shouldBe('context.getParameter(context.COPY_READ_BUFFER_BINDING)', 'null'); + shouldBe('context.getParameter(context.COPY_WRITE_BUFFER_BINDING)', 'null'); + shouldBe('context.getParameter(context.DRAW_BUFFER0)', 'context.BACK'); + shouldBe('context.getParameter(context.DRAW_FRAMEBUFFER_BINDING)', 'null'); + shouldBe('context.getParameter(context.FRAGMENT_SHADER_DERIVATIVE_HINT)', 'context.DONT_CARE'); + shouldBe('context.getParameter(context.PACK_ROW_LENGTH)', '0'); + shouldBe('context.getParameter(context.PACK_SKIP_PIXELS)', '0'); + shouldBe('context.getParameter(context.PACK_SKIP_ROWS)', '0'); + shouldBe('context.getParameter(context.PIXEL_PACK_BUFFER_BINDING)', 'null'); + + shouldBe('context.getParameter(context.PIXEL_UNPACK_BUFFER_BINDING)', 'null'); + shouldBe('context.getParameter(context.RASTERIZER_DISCARD)', 'false'); + shouldBe('context.getParameter(context.READ_BUFFER)', 'context.BACK'); + shouldBe('context.getParameter(context.READ_FRAMEBUFFER_BINDING)', 'null'); + shouldBe('context.getParameter(context.SAMPLE_ALPHA_TO_COVERAGE)', 'false'); + shouldBe('context.getParameter(context.SAMPLE_COVERAGE)', 'false'); + shouldBe('context.getParameter(context.SAMPLER_BINDING)', 'null'); + shouldBe('context.getParameter(context.TEXTURE_BINDING_2D_ARRAY)', 'null'); + shouldBe('context.getParameter(context.TEXTURE_BINDING_3D)', 'null'); + shouldBe('context.getParameter(context.TRANSFORM_FEEDBACK_ACTIVE)', 'false'); + shouldBe('context.getParameter(context.TRANSFORM_FEEDBACK_BINDING)', 'null'); + shouldBe('context.getParameter(context.TRANSFORM_FEEDBACK_BUFFER_BINDING)', 'null'); + shouldBe('context.getParameter(context.TRANSFORM_FEEDBACK_PAUSED)', 'false'); + shouldBe('context.getParameter(context.UNIFORM_BUFFER_BINDING)', 'null'); + + shouldBe('context.getParameter(context.UNPACK_IMAGE_HEIGHT)', '0'); + shouldBe('context.getParameter(context.UNPACK_ROW_LENGTH)', '0'); + shouldBe('context.getParameter(context.UNPACK_SKIP_IMAGES)', '0'); + shouldBe('context.getParameter(context.UNPACK_SKIP_PIXELS)', '0'); + shouldBe('context.getParameter(context.UNPACK_SKIP_ROWS)', '0'); + shouldBe('context.getParameter(context.VERTEX_ARRAY_BINDING)', 'null'); + + debug(""); + debug("Check minimum values"); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_3D_TEXTURE_SIZE)', '256'); + shouldBeType('context.getParameter(context.MAX_3D_TEXTURE_SIZE)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_ARRAY_TEXTURE_LAYERS)', '256'); + shouldBeType('context.getParameter(context.MAX_ARRAY_TEXTURE_LAYERS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_CLIENT_WAIT_TIMEOUT_WEBGL)', '0'); + shouldBeType('context.getParameter(context.MAX_CLIENT_WAIT_TIMEOUT_WEBGL)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_COLOR_ATTACHMENTS)', '4'); + shouldBeType('context.getParameter(context.MAX_COLOR_ATTACHMENTS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_COMBINED_UNIFORM_BLOCKS)', '24'); + shouldBeType('context.getParameter(context.MAX_COMBINED_UNIFORM_BLOCKS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_DRAW_BUFFERS)', '4'); + shouldBeType('context.getParameter(context.MAX_DRAW_BUFFERS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_ELEMENT_INDEX)', '16777215'); // 2^24 - 1 + shouldBeType('context.getParameter(context.MAX_ELEMENT_INDEX)', 'Number'); + + shouldBeType('context.getParameter(context.MAX_ELEMENTS_INDICES)', 'Number'); + shouldBeType('context.getParameter(context.MAX_ELEMENTS_VERTICES)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_FRAGMENT_INPUT_COMPONENTS)', '60'); + shouldBeType('context.getParameter(context.MAX_FRAGMENT_INPUT_COMPONENTS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_FRAGMENT_UNIFORM_BLOCKS)', '12'); + shouldBeType('context.getParameter(context.MAX_FRAGMENT_INPUT_COMPONENTS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_FRAGMENT_UNIFORM_COMPONENTS)', '896'); + shouldBeType('context.getParameter(context.MAX_FRAGMENT_UNIFORM_COMPONENTS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_PROGRAM_TEXEL_OFFSET)', '7'); + shouldBeType('context.getParameter(context.MAX_PROGRAM_TEXEL_OFFSET)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_SAMPLES)', '4'); + shouldBeType('context.getParameter(context.MAX_PROGRAM_TEXEL_OFFSET)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_SERVER_WAIT_TIMEOUT)', '0'); + shouldBeType('context.getParameter(context.MAX_SERVER_WAIT_TIMEOUT)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_TEXTURE_LOD_BIAS)', '2.0'); + shouldBeType('context.getParameter(context.MAX_TEXTURE_LOD_BIAS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS)', '64'); + shouldBeType('context.getParameter(context.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS)', '4'); + shouldBeType('context.getParameter(context.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS)', '4'); + shouldBeType('context.getParameter(context.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_UNIFORM_BLOCK_SIZE)', '16384'); + shouldBeType('context.getParameter(context.MAX_UNIFORM_BLOCK_SIZE)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_UNIFORM_BUFFER_BINDINGS)', '24'); + shouldBeType('context.getParameter(context.MAX_UNIFORM_BUFFER_BINDINGS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_VARYING_COMPONENTS)', '60'); + shouldBeType('context.getParameter(context.MAX_VARYING_COMPONENTS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_VERTEX_OUTPUT_COMPONENTS)', '64'); + shouldBeType('context.getParameter(context.MAX_VERTEX_OUTPUT_COMPONENTS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_VERTEX_UNIFORM_BLOCKS)', '12'); + shouldBeType('context.getParameter(context.MAX_VERTEX_UNIFORM_BLOCKS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_VERTEX_UNIFORM_COMPONENTS)', '1024'); + shouldBeType('context.getParameter(context.MAX_VERTEX_UNIFORM_COMPONENTS)', 'Number'); + + shouldBeLessThanOrEqual('context.getParameter(context.MIN_PROGRAM_TEXEL_OFFSET)', '-8'); + shouldBeType('context.getParameter(context.MIN_PROGRAM_TEXEL_OFFSET)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.UNIFORM_BUFFER_OFFSET_ALIGNMENT)', '1'); + shouldBeType('context.getParameter(context.UNIFORM_BUFFER_OFFSET_ALIGNMENT)', 'Number'); + + var minCombinedFragmentUniformComponents = context.getParameter(context.MAX_FRAGMENT_UNIFORM_BLOCKS) * context.getParameter(context.MAX_UNIFORM_BLOCK_SIZE) / 4 + context.getParameter(context.MAX_FRAGMENT_UNIFORM_COMPONENTS); + var minCombinedVertexUniformComponents = context.getParameter(context.MAX_VERTEX_UNIFORM_BLOCKS) * context.getParameter(context.MAX_UNIFORM_BLOCK_SIZE) / 4 + context.getParameter(context.MAX_VERTEX_UNIFORM_COMPONENTS); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS)', minCombinedFragmentUniformComponents + ''); + shouldBeType('context.getParameter(context.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS)', 'Number'); + + shouldBeGreaterThanOrEqual('context.getParameter(context.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS)', minCombinedVertexUniformComponents + ''); + shouldBeType('context.getParameter(context.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS)', 'Number'); + + shouldBe('context.getError()', 'context.NO_ERROR'); +} + +debug(""); +var successfullyParsed = true; + +</script> +<script src="../../js/js-test-post.js"></script> + +</body> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-getstring.html b/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-getstring.html new file mode 100644 index 000000000..74782437f --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-getstring.html @@ -0,0 +1,81 @@ +<!-- + +/* +** Copyright (c) 2015 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. +*/ + +--> + +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>WebGL gl.getParameter Strings Conformance Tests</title> +<link rel="stylesheet" href="../../resources/js-test-style.css"/> +<script src="../../js/js-test-pre.js"></script> +<script src="../../js/webgl-test-utils.js"></script> +</head> +<body> +<div id="description"></div> +<div id="console"></div> +<canvas id="canvas" width="2" height="2"> </canvas> +<script> +"use strict"; +description("This test checks getParameter returns strings in the correct format"); + +debug(""); +debug("Canvas.getContext"); + +var wtu = WebGLTestUtils; +var gl = wtu.create3DContext("canvas", null, 2); +if (!gl) { + testFailed("context does not exist"); +} else { + testPassed("context exists"); + + debug(""); + checkPrefix("WebGL 2.0", "VERSION"); + checkPrefix("WebGL GLSL ES 3.00", "SHADING_LANGUAGE_VERSION"); + shouldBeNonNull("gl.getParameter(gl.VENDOR)"); + shouldBeNonNull("gl.getParameter(gl.RENDERER)"); + shouldBe("gl.getError()", "gl.NO_ERROR"); +} + +function checkPrefix(expected, enum_val) { + var s = gl.getParameter(gl[enum_val]); + if (s != null && + s.length >= expected.length && + s.substring(0, expected.length) == expected) { + testPassed("getParameter(gl." + enum_val + ") correctly started with " + expected); + } else { + testFailed("getParameter(gl." + enum_val + ") did not start with " + expected); + } +} + +debug(""); +var successfullyParsed = true; + +</script> +<script src="../../js/js-test-post.js"></script> + +</body> +</html> diff --git a/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-object-get-calls.html b/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-object-get-calls.html new file mode 100644 index 000000000..4647da958 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/conformance2/state/gl-object-get-calls.html @@ -0,0 +1,47 @@ +<!-- + +/* +** Copyright (c) 2015 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. +*/ + +--> + +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<link rel="stylesheet" href="../../resources/js-test-style.css"/> +<script src="../../js/js-test-pre.js"></script> +<script src="../../js/webgl-test-utils.js"></script> +</head> +<body> +<div id="description"></div> +<div id="console"></div> + +<script> +var contextVersion = 2; +</script> +<script src="../../js/tests/gl-object-get-calls.js"></script> + +<script src="../../js/js-test-post.js"></script> +</body> +</html> |