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

Side by Side Diff: third_party/webgl/sdk/tests/conformance/misc/error-reporting.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 ** 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 </head>
33 <body>
34 <div id="description"></div>
35 <div id="console"></div>
36
37 <script>
38 description("Tests generation of synthetic and real GL errors");
39
40 var context = create3DContext();
41 var program = loadStandardProgram(context);
42
43 // Other tests in this directory like getActiveTest and
44 // incorrect-context-object-behaviour already test the raising of many
45 // synthetic GL errors. This test verifies the raising of certain
46 // known real GL errors, and contains a few regression tests for bugs
47 // discovered in the synthetic error generation and in the WebGL
48 // implementation itself.
49
50 glErrorShouldBe(context, context.NO_ERROR);
51
52 debug("Testing getActiveAttrib");
53 // Synthetic OpenGL error
54 shouldBeNull("context.getActiveAttrib(null, 2)");
55 glErrorShouldBe(context, context.INVALID_VALUE);
56 // Error state should be clear by this point
57 glErrorShouldBe(context, context.NO_ERROR);
58 // Real OpenGL error
59 shouldBeNull("context.getActiveAttrib(program, 2)");
60 glErrorShouldBe(context, context.INVALID_VALUE);
61 // Error state should be clear by this point
62 glErrorShouldBe(context, context.NO_ERROR);
63
64 debug("Testing getActiveUniform");
65 // Synthetic OpenGL error
66 shouldBeNull("context.getActiveUniform(null, 0)");
67 glErrorShouldBe(context, context.INVALID_VALUE);
68 // Error state should be clear by this point
69 glErrorShouldBe(context, context.NO_ERROR);
70 // Real OpenGL error
71 shouldBeNull("context.getActiveUniform(program, 50)");
72 glErrorShouldBe(context, context.INVALID_VALUE);
73 // Error state should be clear by this point
74 glErrorShouldBe(context, context.NO_ERROR);
75
76 debug("Testing attempts to manipulate the default framebuffer");
77 shouldBeUndefined("context.bindFramebuffer(context.FRAMEBUFFER, null)");
78 glErrorShouldBe(context, context.NO_ERROR);
79 shouldBeUndefined("context.framebufferRenderbuffer(context.FRAMEBUFFER, context. DEPTH_ATTACHMENT, context.RENDERBUFFER, null)");
80 // Synthetic OpenGL error
81 glErrorShouldBe(context, context.INVALID_OPERATION);
82 // Error state should be clear by this point
83 glErrorShouldBe(context, context.NO_ERROR);
84 shouldBeUndefined("context.framebufferTexture2D(context.FRAMEBUFFER, context.COL OR_ATTACHMENT0, context.TEXTURE_2D, null, 0)");
85 // Synthetic OpenGL error
86 glErrorShouldBe(context, context.INVALID_OPERATION);
87 // Error state should be clear by this point
88 glErrorShouldBe(context, context.NO_ERROR);
89
90 successfullyParsed = true;
91 </script>
92
93 <script src="../../resources/js-test-post.js"></script>
94 </body>
95 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698