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

Side by Side Diff: conformance/misc/is-object.html

Issue 41503006: Add ToT WebGL conformance tests : part 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/webgl/sdk/tests/
Patch Set: Created 7 years, 1 month 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
## -0,0 +1 ##
+LF
\ No newline at end of property
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 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
32 <script src="../../resources/js-test-pre.js"></script>
33 <script src="../resources/webgl-test.js"></script>
34 <script src="../resources/webgl-test-utils.js"></script>
35 </head>
36 <body>
37 <div id="description"></div>
38 <div id="console"></div>
39 <canvas id="canvas">
40 <script>
41 "use strict";
42 var wtu;
43 var canvas;
44 var gl;
45 var shouldGenerateGLError;
46
47 var buffer;
48 var framebuffer;
49 var program;
50 var renderbuffer;
51 var shader;
52 var texture;
53
54 description("Tests 'is' calls against non-bound and deleted objects");
55
56 wtu = WebGLTestUtils;
57 var gl = wtu.create3DContext("canvas");
58 shouldGenerateGLError = wtu.shouldGenerateGLError;
59
60 shouldGenerateGLError(gl, gl.NO_ERROR, "buffer = gl.createBuffer()");
61 shouldBeFalse("gl.isBuffer(buffer)");
62 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, buffer)") ;
63 shouldBeTrue("gl.isBuffer(buffer)");
64 debug("");
65
66 shouldGenerateGLError(gl, gl.NO_ERROR, "framebuffer = gl.createFramebuffer()");
67 shouldBeFalse("gl.isFramebuffer(framebuffer)");
68 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, frame buffer)");
69 shouldBeTrue("gl.isFramebuffer(framebuffer)");
70 debug("");
71
72 shouldGenerateGLError(gl, gl.NO_ERROR, "renderbuffer = gl.createRenderbuffer()") ;
73 shouldBeFalse("gl.isRenderbuffer(renderbuffer)");
74 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, ren derbuffer)");
75 shouldBeTrue("gl.isRenderbuffer(renderbuffer)");
76 debug("");
77
78 shouldGenerateGLError(gl, gl.NO_ERROR, "texture = gl.createTexture()");
79 shouldBeFalse("gl.isTexture(texture)");
80 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, texture)") ;
81 shouldBeTrue("gl.isTexture(texture)");
82 debug("");
83
84 shouldGenerateGLError(gl, gl.NO_ERROR, "program = gl.createProgram()");
85 shouldBeTrue("gl.isProgram(program)");
86 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteProgram(program)");
87 shouldBeFalse("gl.isProgram(program)");
88 debug("");
89
90 shouldGenerateGLError(gl, gl.NO_ERROR, "shader = gl.createShader(gl.VERTEX_SHADE R)");
91 shouldBeTrue("gl.isShader(shader)");
92 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteShader(shader)");
93 shouldBeFalse("gl.isShader(shader)");
94 debug("");
95
96 var successfullyParsed = true;
97 </script>
98 <script src="../../resources/js-test-post.js"></script>
99 </body>
100 </html>
OLDNEW
« no previous file with comments | « conformance/misc/invalid-passed-params.html ('k') | conformance/misc/null-object-behaviour.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698