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

Side by Side Diff: conformance/misc/is-object.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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
6 <script src="../../resources/js-test-pre.js"></script>
7 <script src="../resources/webgl-test.js"></script>
8 <script src="../resources/webgl-test-utils.js"></script>
9 </head>
10 <body>
11 <div id="description"></div>
12 <div id="console"></div>
13 <canvas id="canvas">
14 <script>
15 var wtu;
16 var canvas;
17 var gl;
18 var shouldGenerateGLError;
19
20 var buffer;
21 var framebuffer;
22 var program;
23 var renderbuffer;
24 var shader;
25 var texture;
26
27 description("Tests 'is' calls against non-bound and deleted objects");
28
29 wtu = WebGLTestUtils;
30 canvas = document.getElementById("canvas");
31 gl = wtu.create3DContext(canvas);
32 shouldGenerateGLError = wtu.shouldGenerateGLError;
33
34 shouldGenerateGLError(gl, gl.NO_ERROR, "buffer = gl.createBuffer()");
35 shouldBeFalse("gl.isBuffer(buffer)");
36 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindBuffer(gl.ARRAY_BUFFER, buffer)") ;
37 shouldBeTrue("gl.isBuffer(buffer)");
38 debug("");
39
40 shouldGenerateGLError(gl, gl.NO_ERROR, "framebuffer = gl.createFramebuffer()");
41 shouldBeFalse("gl.isFramebuffer(framebuffer)");
42 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindFramebuffer(gl.FRAMEBUFFER, frame buffer)");
43 shouldBeTrue("gl.isFramebuffer(framebuffer)");
44 debug("");
45
46 shouldGenerateGLError(gl, gl.NO_ERROR, "renderbuffer = gl.createRenderbuffer()") ;
47 shouldBeFalse("gl.isRenderbuffer(renderbuffer)");
48 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindRenderbuffer(gl.RENDERBUFFER, ren derbuffer)");
49 shouldBeTrue("gl.isRenderbuffer(renderbuffer)");
50 debug("");
51
52 shouldGenerateGLError(gl, gl.NO_ERROR, "texture = gl.createTexture()");
53 shouldBeFalse("gl.isTexture(texture)");
54 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.bindTexture(gl.TEXTURE_2D, texture)") ;
55 shouldBeTrue("gl.isTexture(texture)");
56 debug("");
57
58 shouldGenerateGLError(gl, gl.NO_ERROR, "program = gl.createProgram()");
59 shouldBeTrue("gl.isProgram(program)");
60 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteProgram(program)");
61 shouldBeFalse("gl.isProgram(program)");
62 debug("");
63
64 shouldGenerateGLError(gl, gl.NO_ERROR, "shader = gl.createShader(gl.VERTEX_SHADE R)");
65 shouldBeTrue("gl.isShader(shader)");
66 shouldGenerateGLError(gl, gl.NO_ERROR, "gl.deleteShader(shader)");
67 shouldBeFalse("gl.isShader(shader)");
68 debug("");
69
70 successfullyParsed = true;
71 </script>
72 <script src="../../resources/js-test-post.js"></script>
73 </body>
74 </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