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

Side by Side Diff: conformance/state/gl-enable-enum-test.html

Issue 8342021: Add webgl conformance tests r15841. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/webgl/sdk/tests/
Patch Set: Created 9 years, 2 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
« no previous file with comments | « conformance/state/00_test_list.txt ('k') | conformance/state/gl-enum-tests.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 <!--
2 Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6 <!DOCTYPE html>
7 <html>
8 <head>
9 <meta charset="utf-8">
10 <title>WebGL gl.ENABLE enums Conformance Tests</title>
11 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
12 <script src="../../resources/desktop-gl-constants.js" type="text/javascript"></s cript>
13 <script src="../../resources/js-test-pre.js"></script>
14 <script src="../resources/webgl-test.js"></script>
15 </head>
16 <body>
17 <div id="description"></div>
18 <div id="console"></div>
19 <canvas id="canvas" width="2" height="2"> </canvas>
20 <script>
21 description("This test ensures WebGL implementations allow OpenGL ES 2.0 feature s to be turned on but not non OpenGL ES 2.0 features.");
22
23 debug("");
24 debug("Canvas.getContext");
25
26 var gl = create3DContext(document.getElementById("canvas"));
27 if (!gl) {
28 testFailed("context does not exist");
29 } else {
30 testPassed("context exists");
31
32 debug("");
33 debug("Checking gl.ENABLE enums.");
34
35 var invalidEnums = [
36 'ALPHA_TEST',
37 'AUTO_NORMAL',
38 'CLIP_PLANE0',
39 'CLIP_PLANE1',
40 'COLOR_LOGIC_OP',
41 'COLOR_MATERIAL',
42 'COLOR_SUM',
43 'COLOR_TABLE',
44 // 'CONVOLUTION_1D',
45 // 'CONVOLUTION_2D',
46 'FOG',
47 'HISTOGRAM',
48 'INDEX_LOGIC_OP',
49 'LIGHT0',
50 'LIGHT1',
51 'LIGHTING',
52 'LINE_SMOOTH',
53 'LINE_STIPPLE',
54 'MAP1_COLOR_4',
55 'MAP1_INDEX',
56 'MAP1_NORMAL',
57 'MAP1_TEXTURE_COORD_1',
58 'MAP1_TEXTURE_COORD_2',
59 'MAP1_TEXTURE_COORD_3',
60 'MAP1_TEXTURE_COORD_4',
61 'MAP1_VERTEX_3',
62 'MAP1_VERTEX_4',
63 'MAP2_COLOR_4',
64 'MAP2_INDEX',
65 'MAP2_NORMAL',
66 'MAP2_TEXTURE_COORD_1',
67 'MAP2_TEXTURE_COORD_2',
68 'MAP2_TEXTURE_COORD_3',
69 'MAP2_TEXTURE_COORD_4',
70 'MAP2_VERTEX_3',
71 'MAP2_VERTEX_4',
72 'MINMAX',
73 'MULTISAMPLE',
74 'NORMALIZE',
75 'POINT_SMOOTH',
76 'POINT_SPRITE',
77 'POLYGON_OFFSET_LINE',
78 'POLYGON_OFFSET_POINT',
79 'POLYGON_SMOOTH',
80 'POLYGON_STIPPLE',
81 'POST_COLOR_MATRIX_COLOR_TABLE',
82 'POST_CONVOLUTION_COLOR_TABLE',
83 'RESCALE_NORMAL',
84 'SAMPLE_ALPHA_TO_ONE',
85 // 'SEPARABLE_2D',
86 'TEXTURE_1D',
87 'TEXTURE_2D',
88 'TEXTURE_3D',
89 'TEXTURE_CUBE_MAP',
90 'TEXTURE_GEN_Q',
91 'TEXTURE_GEN_R',
92 'TEXTURE_GEN_S',
93 'TEXTURE_GEN_T',
94 'VERTEX_PROGRAM_POINT_SIZE',
95 'VERTEX_PROGRAM_TWO_SIDE'
96 ];
97
98 for (var ii = 0; ii < invalidEnums.length; ++ii) {
99 var name = invalidEnums[ii];
100 gl.enable(desktopGL[name]);
101 glErrorShouldBe(gl, gl.INVALID_ENUM,
102 "gl.enable must set INVALID_ENUM when passed GL_" + name );
103 }
104
105 var validEnums = [
106 'BLEND',
107 'CULL_FACE',
108 'DEPTH_TEST',
109 'DITHER',
110 'POLYGON_OFFSET_FILL',
111 'SAMPLE_ALPHA_TO_COVERAGE',
112 'SAMPLE_COVERAGE',
113 'SCISSOR_TEST',
114 'STENCIL_TEST'
115 ];
116
117 for (var ii = 0; ii < validEnums.length; ++ii) {
118 var name = validEnums[ii];
119 gl.enable(gl[name]);
120 glErrorShouldBe(gl, gl.NO_ERROR,
121 "gl.enable must succeed when passed gl." + name );
122 }
123
124 }
125
126 debug("");
127 successfullyParsed = true;
128
129 </script>
130 <script src="../../resources/js-test-post.js"></script>
131
132 </body>
133 </html>
OLDNEW
« no previous file with comments | « conformance/state/00_test_list.txt ('k') | conformance/state/gl-enum-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698