content/canvas/test/webgl-conformance/conformance/programs/gl-shader-test.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/canvas/test/webgl-conformance/conformance/programs/gl-shader-test.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +<!--
     1.5 +Copyright (c) 2011 The Chromium Authors. All rights reserved.
     1.6 +Use of this source code is governed by a BSD-style license that can be
     1.7 +found in the LICENSE file.
     1.8 +-->
     1.9 +<!DOCTYPE html>
    1.10 +<html>
    1.11 +<head>
    1.12 +<meta charset="utf-8">
    1.13 +<title>WebGL ShaderL Conformance Tests</title>
    1.14 +<link rel="stylesheet" href="../../resources/js-test-style.css"/>
    1.15 +<script src="../../resources/desktop-gl-constants.js" type="text/javascript"></script>
    1.16 +<script src="../../resources/js-test-pre.js"></script>
    1.17 +<script src="../resources/webgl-test.js"></script>
    1.18 +</head>
    1.19 +<body>
    1.20 +<div id="description"></div>
    1.21 +<div id="console"></div>
    1.22 +<canvas id="canvas" width="2" height="2"> </canvas>
    1.23 +<script>
    1.24 +description("This test checks a few things about WebGL Shaders.");
    1.25 +
    1.26 +debug("");
    1.27 +debug("Canvas.getContext");
    1.28 +
    1.29 +var gl = create3DContext(document.getElementById("canvas"));
    1.30 +if (!gl) {
    1.31 +  testFailed("context does not exist");
    1.32 +} else {
    1.33 +  testPassed("context exists");
    1.34 +
    1.35 +  debug("");
    1.36 +  debug("Checking shaders.");
    1.37 +
    1.38 +  // Create the shader object
    1.39 +  var shader = gl.createShader(desktopGL['GEOMETRY_SHADER_ARB']);
    1.40 +  assertMsg(shader == null,
    1.41 +            "should not be able to create GEOMETRY shader");
    1.42 +}
    1.43 +
    1.44 +debug("");
    1.45 +successfullyParsed = true;
    1.46 +
    1.47 +</script>
    1.48 +<script>finishTest();</script>
    1.49 +
    1.50 +</body>
    1.51 +</html>

mercurial