Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Side by Side Diff: third_party/webgl/sdk/tests/conformance/context/methods.html

Issue 10399113: Roll webgl conformance tests to r17874: part 2, adding r17874 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 <!--
2
3 /*
4 ** Copyright (c) 2012 The Khronos Group Inc.
5 **
6 ** Permission is hereby granted, free of charge, to any person obtaining a
7 ** copy of this software and/or associated documentation files (the
8 ** "Materials"), to deal in the Materials without restriction, including
9 ** without limitation the rights to use, copy, modify, merge, publish,
10 ** distribute, sublicense, and/or sell copies of the Materials, and to
11 ** permit persons to whom the Materials are furnished to do so, subject to
12 ** the following conditions:
13 **
14 ** The above copyright notice and this permission notice shall be included
15 ** in all copies or substantial portions of the Materials.
16 **
17 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
24 */
25
26 -->
27 <!DOCTYPE html>
28 <html>
29 <head>
30 <meta charset="utf-8">
31 <title>WebGL Methods Test</title>
32 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
33 <script src="../../resources/desktop-gl-constants.js" type="text/javascript"></s cript>
34 <script src="../../resources/js-test-pre.js"></script>
35 <script src="../resources/webgl-test.js"></script>
36 </head>
37 <body>
38 <div id="description"></div>
39 <div id="console"></div>
40 <canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
41 <script>
42 description("This test ensures that the WebGL context has all the methods in the specification.");
43
44 var methods = [
45 "canvas",
46 "getContextAttributes",
47 "activeTexture",
48 "attachShader",
49 "bindAttribLocation",
50 "bindBuffer",
51 "bindFramebuffer",
52 "bindRenderbuffer",
53 "bindTexture",
54 "blendColor",
55 "blendEquation",
56 "blendEquationSeparate",
57 "blendFunc",
58 "blendFuncSeparate",
59 "bufferData",
60 "bufferSubData",
61 "checkFramebufferStatus",
62 "clear",
63 "clearColor",
64 "clearDepth",
65 "clearStencil",
66 "colorMask",
67 "compileShader",
68 "copyTexImage2D",
69 "copyTexSubImage2D",
70 "createBuffer",
71 "createFramebuffer",
72 "createProgram",
73 "createRenderbuffer",
74 "createShader",
75 "createTexture",
76 "cullFace",
77 "deleteBuffer",
78 "deleteFramebuffer",
79 "deleteProgram",
80 "deleteRenderbuffer",
81 "deleteShader",
82 "deleteTexture",
83 "depthFunc",
84 "depthMask",
85 "depthRange",
86 "detachShader",
87 "disable",
88 "disableVertexAttribArray",
89 "drawArrays",
90 "drawElements",
91 "enable",
92 "enableVertexAttribArray",
93 "finish",
94 "flush",
95 "framebufferRenderbuffer",
96 "framebufferTexture2D",
97 "frontFace",
98 "generateMipmap",
99 "getActiveAttrib",
100 "getActiveUniform",
101 "getAttachedShaders",
102 "getAttribLocation",
103 "getParameter",
104 "getBufferParameter",
105 "getError",
106 "getFramebufferAttachmentParameter",
107 "getProgramParameter",
108 "getProgramInfoLog",
109 "getRenderbufferParameter",
110 "getShaderParameter",
111 "getShaderInfoLog",
112 "getShaderSource",
113 "getTexParameter",
114 "getUniform",
115 "getUniformLocation",
116 "getVertexAttrib",
117 "getVertexAttribOffset",
118 "hint",
119 "isBuffer",
120 "isEnabled",
121 "isFramebuffer",
122 "isProgram",
123 "isRenderbuffer",
124 "isShader",
125 "isTexture",
126 "lineWidth",
127 "linkProgram",
128 "pixelStorei",
129 "polygonOffset",
130 "readPixels",
131 "renderbufferStorage",
132 "sampleCoverage",
133 "scissor",
134 "shaderSource",
135 "stencilFunc",
136 "stencilFuncSeparate",
137 "stencilMask",
138 "stencilMaskSeparate",
139 "stencilOp",
140 "stencilOpSeparate",
141 "texImage2D",
142 "texParameterf",
143 "texParameteri",
144 "texSubImage2D",
145 "uniform1f",
146 "uniform1fv",
147 "uniform1i",
148 "uniform1iv",
149 "uniform2f",
150 "uniform2fv",
151 "uniform2i",
152 "uniform2iv",
153 "uniform3f",
154 "uniform3fv",
155 "uniform3i",
156 "uniform3iv",
157 "uniform4f",
158 "uniform4fv",
159 "uniform4i",
160 "uniform4iv",
161 "uniformMatrix2fv",
162 "uniformMatrix3fv",
163 "uniformMatrix4fv",
164 "useProgram",
165 "validateProgram",
166 "vertexAttrib1f",
167 "vertexAttrib1fv",
168 "vertexAttrib2f",
169 "vertexAttrib2fv",
170 "vertexAttrib3f",
171 "vertexAttrib3fv",
172 "vertexAttrib4f",
173 "vertexAttrib4fv",
174 "vertexAttribPointer",
175 "viewport"
176 ]
177
178 function assertProperty(v, p) {
179 try {
180 if (v[p] == null) {
181 testFailed("Property does not exist: " + p)
182 return false;
183 } else {
184 return true;
185 }
186 } catch(e) {
187 testFailed("Trying to access the property '"+p+"' threw an error: "+e.toStri ng());
188 }
189 }
190
191 debug("");
192 debug("Canvas.getContext");
193
194 var canvas = document.getElementById("canvas");
195 var gl = create3DContext(canvas);
196 var passed = true;
197 for (var i=0; i<methods.length; i++) {
198 var r = assertProperty(gl, methods[i]);
199 passed = passed && r;
200 }
201 if (passed) {
202 testPassed("All WebGL methods found.");
203 }
204 var extended = false;
205 for (var i in gl) {
206 if (i.match(/^[a-z]/) && methods.indexOf(i) == -1) {
207 if (!extended) {
208 extended = true;
209 debug("Also found the following extra methods:");
210 }
211 debug(i);
212 }
213 }
214
215 debug("");
216 successfullyParsed = true;
217 </script>
218 <script src="../../resources/js-test-post.js"></script>
219
220 </body>
221 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698