Backed out changeset b462e7b742d8 (bug 1908261) for causing multiple reftest failures...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance / programs / gl-getshadersource.html
blob3461537d4b707640174b8934763a84cda59b4f5e
1 <!--
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.
5 -->
7 <!DOCTYPE html>
8 <html>
9 <head>
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>
15 </head>
16 <body>
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>
21 <script>
22 "use strict";
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;
33 </script>
34 <script src="../../js/js-test-post.js"></script>
36 </body>
37 </html>