OLD | NEW |
| (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 content='text/html; charset=UTF-8' http-equiv='Content-Type'/> | |
11 <title>WebGL getShaderSource conformance test.</title> | |
12 <link rel="stylesheet" href="../resources/js-test-style.css"/> | |
13 <script src="../resources/js-test-pre.js"></script> | |
14 <script src="resources/webgl-test.js"> </script> | |
15 <script src="resources/webgl-test-utils.js"> </script> | |
16 </head> | |
17 <body> | |
18 <canvas id="example" width="4" height="4" style="width: 40px; height: 30px;"></c
anvas> | |
19 <div id="description"></div> | |
20 <div id="console"></div> | |
21 <script id="vshader" type="x-shader/x-vertex">abc//defNOTASCII</script> | |
22 <script> | |
23 description("Tests that the source that goes into a shader is what comes out."); | |
24 var wtu = WebGLTestUtils; | |
25 var canvas = document.getElementById("example"); | |
26 var gl = wtu.create3DContext(canvas); | |
27 var original = document.getElementById("vshader").text; | |
28 var shader = gl.createShader(gl.VERTEX_SHADER); | |
29 gl.shaderSource(shader, original); | |
30 var source = gl.getShaderSource(shader); | |
31 shouldBe("source", "original"); | |
32 glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors."); | |
33 successfullyParsed = true; | |
34 </script> | |
35 </body> | |
36 </body> | |
37 <script src="../resources/js-test-post.js"></script> | |
38 | |
39 <script> | |
40 </script> | |
41 | |
42 </body> | |
43 </html> | |
44 | |
45 | |
OLD | NEW |