Backed out changeset b462e7b742d8 (bug 1908261) for causing multiple reftest failures...
[gecko.git] / dom / canvas / test / webgl-conf / checkout / conformance / programs / program-infolog.html
blob02fa19d91247541ca4e263a36546a78ea4060766
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 Program Conformance Tests</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 <div id="description"></div>
18 <div id="console"></div>
19 <canvas id="canvas" width="2" height="2"> </canvas>
20 <script id="vertexShader" language="x-shader/x-vertex">
21 void main()
23 gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
25 </script>
26 <script id="fragmentShader" language="x-shader/x-fragment">
27 precision mediump float;
28 void main()
30 gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
32 </script>
33 <script>
34 "use strict";
35 description('getProgramInfoLog should not return \\0');
37 debug("");
39 var wtu = WebGLTestUtils;
40 var gl = wtu.create3DContext("canvas");
41 if (!gl) {
42 testFailed("context does not exist");
43 } else {
44 testPassed("context exists");
47 debug("");
49 var program = wtu.loadProgramFromScript(gl, 'vertexShader', 'fragmentShader');
50 var infolog = gl.getProgramInfoLog(program);
51 if (infolog === '\0') {
52 testFailed("getProgramInfoLog should not return '\\0'");
53 } else {
54 testPassed("getProgramInfoLog didn't return '\\0'");
57 var successfullyParsed = true;
58 </script>
59 <script src="../../js/js-test-post.js"></script>
61 </body>
62 </html>