2 Copyright (c) 2019 The Khronos Group Inc.
3 Use of this source code is governed by an MIT-style license that can be
4 found in the LICENSE.txt file.
10 <meta charset=
"utf-8">
11 <title>WebGL getShaderSource conformance test.
</title>
12 <link rel=
"stylesheet" href=
"../../resources/js-test-style.css"/>
13 <script src=
"../../js/js-test-pre.js"></script>
14 <script src=
"../../js/webgl-test-utils.js"> </script>
17 <canvas id=
"example" width=
"4" height=
"4" style=
"width: 40px; height: 30px;"></canvas>
18 <div id=
"description"></div>
19 <div id=
"console"></div>
20 <script id=
"vshader" type=
"x-shader/x-vertex">abc//defNOTASCII
</script>
23 description("Tests that the source that goes into a shader is what comes out.");
24 var wtu
= WebGLTestUtils
;
25 var gl
= wtu
.create3DContext("example");
26 var original
= document
.getElementById("vshader").text
;
27 var shader
= gl
.createShader(gl
.VERTEX_SHADER
);
28 gl
.shaderSource(shader
, original
);
29 var source
= gl
.getShaderSource(shader
);
30 shouldBe("source", "original");
31 wtu
.glErrorShouldBe(gl
, gl
.NO_ERROR
, "Should be no errors.");
32 var successfullyParsed
= true;
34 <script src=
"../../js/js-test-post.js"></script>