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

Side by Side Diff: conformance/misc/error-reporting.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, 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
## -0,0 +1 ##
+LF
\ No newline at end of property
OLDNEW
(Empty)
1 <!--
2 /*
3 ** Copyright (c) 2012 The Khronos Group Inc.
4 **
5 ** Permission is hereby granted, free of charge, to any person obtaining a
6 ** copy of this software and/or associated documentation files (the
7 ** "Materials"), to deal in the Materials without restriction, including
8 ** without limitation the rights to use, copy, modify, merge, publish,
9 ** distribute, sublicense, and/or sell copies of the Materials, and to
10 ** permit persons to whom the Materials are furnished to do so, subject to
11 ** the following conditions:
12 **
13 ** The above copyright notice and this permission notice shall be included
14 ** in all copies or substantial portions of the Materials.
15 **
16 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
23 */
24 -->
25 <!DOCTYPE html>
26 <html>
27 <head>
28 <meta charset="utf-8">
29 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
30 <script src="../../resources/js-test-pre.js"></script>
31 <script src="../resources/webgl-test.js"></script>
32 <script src="../resources/webgl-test-utils.js"></script>
33 </head>
34 <body>
35 <div id="description"></div>
36 <div id="console"></div>
37
38 <script>
39 "use strict";
40 description("Tests generation of synthetic and real GL errors");
41
42 var wtu = WebGLTestUtils;
43 var context = wtu.create3DContext();
44 var program = wtu.loadStandardProgram(context);
45
46 // Other tests in this directory like getActiveTest and
47 // incorrect-context-object-behaviour already test the raising of many
48 // synthetic GL errors. This test verifies the raising of certain
49 // known real GL errors, and contains a few regression tests for bugs
50 // discovered in the synthetic error generation and in the WebGL
51 // implementation itself.
52
53 glErrorShouldBe(context, context.NO_ERROR);
54
55 debug("Testing getActiveAttrib");
56 // Synthetic OpenGL error
57 shouldBeNull("context.getActiveAttrib(null, 2)");
58 glErrorShouldBe(context, context.INVALID_VALUE);
59 // Error state should be clear by this point
60 glErrorShouldBe(context, context.NO_ERROR);
61 // Real OpenGL error
62 shouldBeNull("context.getActiveAttrib(program, 2)");
63 glErrorShouldBe(context, context.INVALID_VALUE);
64 // Error state should be clear by this point
65 glErrorShouldBe(context, context.NO_ERROR);
66
67 debug("Testing getActiveUniform");
68 // Synthetic OpenGL error
69 shouldBeNull("context.getActiveUniform(null, 0)");
70 glErrorShouldBe(context, context.INVALID_VALUE);
71 // Error state should be clear by this point
72 glErrorShouldBe(context, context.NO_ERROR);
73 // Real OpenGL error
74 shouldBeNull("context.getActiveUniform(program, 50)");
75 glErrorShouldBe(context, context.INVALID_VALUE);
76 // Error state should be clear by this point
77 glErrorShouldBe(context, context.NO_ERROR);
78
79 debug("Testing attempts to manipulate the default framebuffer");
80 shouldBeUndefined("context.bindFramebuffer(context.FRAMEBUFFER, null)");
81 glErrorShouldBe(context, context.NO_ERROR);
82 shouldBeUndefined("context.framebufferRenderbuffer(context.FRAMEBUFFER, context. DEPTH_ATTACHMENT, context.RENDERBUFFER, null)");
83 // Synthetic OpenGL error
84 glErrorShouldBe(context, context.INVALID_OPERATION);
85 // Error state should be clear by this point
86 glErrorShouldBe(context, context.NO_ERROR);
87 shouldBeUndefined("context.framebufferTexture2D(context.FRAMEBUFFER, context.COL OR_ATTACHMENT0, context.TEXTURE_2D, null, 0)");
88 // Synthetic OpenGL error
89 glErrorShouldBe(context, context.INVALID_OPERATION);
90 // Error state should be clear by this point
91 glErrorShouldBe(context, context.NO_ERROR);
92
93 var successfullyParsed = true;
94 </script>
95
96 <script src="../../resources/js-test-post.js"></script>
97 </body>
98 </html>
OLDNEW
« no previous file with comments | « conformance/misc/delayed-drawing.html ('k') | conformance/misc/functions-returning-strings.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698