Backed out changeset 7272b7396c78 (bug 1932758) for causing fenix debug failures...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance2 / context / methods-2.html
bloba389329aa33663de2b5c0ce86e0e39da1239ae56
1 <!--
2 Copyright (c) 2019 The Khronos Group Inc.
3 Use of this source code is governed by an MIT-style license that can be
4 found in the LICENSE.txt file.
5 -->
6 <!DOCTYPE html>
7 <html>
8 <head>
9 <meta charset="utf-8">
10 <title>WebGL2 Methods Test</title>
11 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
12 <script src="../../js/js-test-pre.js"></script>
13 <script src="../../js/webgl-test-utils.js"></script>
14 <script src="../../js/tests/context-methods.js"></script>
15 </head>
16 <body>
17 <div id="description"></div>
18 <div id="console"></div>
19 <canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
20 <script>
21 "use strict";
22 description("This test ensures that the WebGL context has all the methods in the specification.");
24 const methods = [
25 "getContextAttributes",
26 "activeTexture",
27 "attachShader",
28 "bindAttribLocation",
29 "bindBuffer",
30 "bindFramebuffer",
31 "bindRenderbuffer",
32 "bindTexture",
33 "blendColor",
34 "blendEquation",
35 "blendEquationSeparate",
36 "blendFunc",
37 "blendFuncSeparate",
38 "bufferData",
39 "bufferSubData",
40 "checkFramebufferStatus",
41 "clear",
42 "clearColor",
43 "clearDepth",
44 "clearStencil",
45 "colorMask",
46 "compileShader",
47 "compressedTexImage2D",
48 "compressedTexSubImage2D",
49 "copyTexImage2D",
50 "copyTexSubImage2D",
51 "createBuffer",
52 "createFramebuffer",
53 "createProgram",
54 "createRenderbuffer",
55 "createShader",
56 "createTexture",
57 "cullFace",
58 "deleteBuffer",
59 "deleteFramebuffer",
60 "deleteProgram",
61 "deleteRenderbuffer",
62 "deleteShader",
63 "deleteTexture",
64 "depthFunc",
65 "depthMask",
66 "depthRange",
67 "detachShader",
68 "disable",
69 "disableVertexAttribArray",
70 "drawArrays",
71 "drawElements",
72 "enable",
73 "enableVertexAttribArray",
74 "finish",
75 "flush",
76 "framebufferRenderbuffer",
77 "framebufferTexture2D",
78 "frontFace",
79 "generateMipmap",
80 "getActiveAttrib",
81 "getActiveUniform",
82 "getAttachedShaders",
83 "getAttribLocation",
84 "getParameter",
85 "getBufferParameter",
86 "getError",
87 "getExtension",
88 "getFramebufferAttachmentParameter",
89 "getProgramParameter",
90 "getProgramInfoLog",
91 "getRenderbufferParameter",
92 "getShaderParameter",
93 "getShaderInfoLog",
94 "getShaderPrecisionFormat",
95 "getShaderSource",
96 "getSupportedExtensions",
97 "getTexParameter",
98 "getUniform",
99 "getUniformLocation",
100 "getVertexAttrib",
101 "getVertexAttribOffset",
102 "hint",
103 "isBuffer",
104 "isContextLost",
105 "isEnabled",
106 "isFramebuffer",
107 "isProgram",
108 "isRenderbuffer",
109 "isShader",
110 "isTexture",
111 "lineWidth",
112 "linkProgram",
113 "pixelStorei",
114 "polygonOffset",
115 "readPixels",
116 "renderbufferStorage",
117 "sampleCoverage",
118 "scissor",
119 "shaderSource",
120 "stencilFunc",
121 "stencilFuncSeparate",
122 "stencilMask",
123 "stencilMaskSeparate",
124 "stencilOp",
125 "stencilOpSeparate",
126 "texImage2D",
127 "texParameterf",
128 "texParameteri",
129 "texSubImage2D",
130 "uniform1f",
131 "uniform1fv",
132 "uniform1i",
133 "uniform1iv",
134 "uniform2f",
135 "uniform2fv",
136 "uniform2i",
137 "uniform2iv",
138 "uniform3f",
139 "uniform3fv",
140 "uniform3i",
141 "uniform3iv",
142 "uniform4f",
143 "uniform4fv",
144 "uniform4i",
145 "uniform4iv",
146 "uniformMatrix2fv",
147 "uniformMatrix3fv",
148 "uniformMatrix4fv",
149 "useProgram",
150 "validateProgram",
151 "vertexAttrib1f",
152 "vertexAttrib1fv",
153 "vertexAttrib2f",
154 "vertexAttrib2fv",
155 "vertexAttrib3f",
156 "vertexAttrib3fv",
157 "vertexAttrib4f",
158 "vertexAttrib4fv",
159 "vertexAttribPointer",
160 "viewport",
162 // WebGL2 methods
163 "getBufferSubData",
164 "copyBufferSubData",
165 "blitFramebuffer",
166 "framebufferTextureLayer",
167 "getInternalformatParameter",
168 "invalidateFramebuffer",
169 "invalidateSubFramebuffer",
170 "readBuffer",
171 "renderbufferStorageMultisample",
172 "texImage3D",
173 "texStorage2D",
174 "texStorage3D",
175 "texSubImage3D",
176 "copyTexSubImage3D",
177 "compressedTexImage3D",
178 "compressedTexSubImage3D",
179 "getFragDataLocation",
180 "uniform1ui",
181 "uniform2ui",
182 "uniform3ui",
183 "uniform4ui",
184 "uniform1uiv",
185 "uniform2uiv",
186 "uniform3uiv",
187 "uniform4uiv",
188 "uniformMatrix2x3fv",
189 "uniformMatrix3x2fv",
190 "uniformMatrix2x4fv",
191 "uniformMatrix4x2fv",
192 "uniformMatrix3x4fv",
193 "uniformMatrix4x3fv",
194 "vertexAttribI4i",
195 "vertexAttribI4iv",
196 "vertexAttribI4ui",
197 "vertexAttribI4uiv",
198 "vertexAttribIPointer",
199 "vertexAttribDivisor",
200 "drawArraysInstanced",
201 "drawElementsInstanced",
202 "drawRangeElements",
203 "drawBuffers",
204 "clearBufferiv",
205 "clearBufferuiv",
206 "clearBufferfv",
207 "clearBufferfi",
208 "createQuery",
209 "deleteQuery",
210 "isQuery",
211 "beginQuery",
212 "endQuery",
213 "getQuery",
214 "getQueryParameter",
215 "createSampler",
216 "deleteSampler",
217 "isSampler",
218 "bindSampler",
219 "samplerParameteri",
220 "samplerParameterf",
221 "getSamplerParameter",
222 "fenceSync",
223 "isSync",
224 "deleteSync",
225 "clientWaitSync",
226 "waitSync",
227 "getSyncParameter",
228 "createTransformFeedback",
229 "deleteTransformFeedback",
230 "isTransformFeedback",
231 "bindTransformFeedback",
232 "beginTransformFeedback",
233 "endTransformFeedback",
234 "transformFeedbackVaryings",
235 "getTransformFeedbackVarying",
236 "pauseTransformFeedback",
237 "resumeTransformFeedback",
238 "bindBufferBase",
239 "bindBufferRange",
240 "getIndexedParameter",
241 "getUniformIndices",
242 "getActiveUniforms",
243 "getUniformBlockIndex",
244 "getActiveUniformBlockParameter",
245 "getActiveUniformBlockName",
246 "uniformBlockBinding",
247 "createVertexArray",
248 "deleteVertexArray",
249 "isVertexArray",
250 "bindVertexArray",
253 debug("");
254 debug("Canvas.getContext");
256 const wtu = WebGLTestUtils;
257 const canvas = document.getElementById("canvas");
258 const gl = wtu.create3DContext(canvas, null, 2);
260 testContextMethods(gl, methods);
262 debug("");
263 var successfullyParsed = true;
264 </script>
265 <script src="../../js/js-test-post.js"></script>
267 </body>
268 </html>