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

Side by Side Diff: third_party/webgl/conformance-suites/1.0.0/conformance/gl-unknown-uniform.html

Issue 9360034: Remove everthing except conformance tests in the deps/third_party/webgl (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 8 years, 10 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
OLDNEW
(Empty)
1 <!--
2 Copyright (c) 2009 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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
7 "http://www.w3.org/TR/html4/loose.dtd">
8 <html>
9 <head>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11 <title>WebGL Unknown Uniform Conformance Test</title>
12 <link rel="stylesheet" href="../resources/js-test-style.css"/>
13 <script src="../resources/desktop-gl-constants.js" type="text/javascript"></scri pt>
14 <script src="../resources/js-test-pre.js"></script>
15 <script src="resources/webgl-test.js"></script>
16 </head>
17 <body>
18 <div id="description"></div>
19 <div id="console"></div>
20 <canvas id="canvas" width="2" height="2"> </canvas>
21 <script id="vshader" type="x-shader/x-vertex">
22 attribute vec4 vPosition;
23 void main()
24 {
25 gl_Position = vPosition;
26 }
27 </script>
28
29 <script id="fshader" type="x-shader/x-fragment">
30 void main()
31 {
32 gl_FragColor = vec4(1.0,0.0,0.0,1.0);
33 }
34 </script>
35 <script>
36 description("Tests that unknown uniforms don't cause errors.");
37
38 debug("");
39 debug("Canvas.getContext");
40
41 var gl = initWebGL("example", "vshader", "fshader", [ "vPosition"], [ 0, 0, 0, 1 ], 1);
42 if (!gl) {
43 testFailed("context does not exist");
44 } else {
45 testPassed("context exists");
46
47 debug("");
48
49 // Get the location of an unknown uniform.
50 var loc = gl.getUniformLocation(gl.program, "someUnknownUniform");
51 assertMsg(loc === null, "location of unknown uniform should be null");
52 glErrorShouldBe(gl, gl.NO_ERROR,
53 "there should be no error from getting an unknown uniform");
54 gl.uniform1f(loc, 1);
55 glErrorShouldBe(gl, gl.NO_ERROR,
56 "there should be no error from trying to set an unknown uniform");
57 }
58
59 debug("");
60 successfullyParsed = true;
61
62 </script>
63 <script src="../resources/js-test-post.js"></script>
64
65 <script>
66 </script>
67
68 </body>
69 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698