1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/canvas/test/webgl-conformance/conformance/glsl/misc/shader-with-line-directive.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 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 GLSL Conformance Tests</title> 1.14 +<link rel="stylesheet" href="../../../resources/js-test-style.css"/> 1.15 +<link rel="stylesheet" href="../../resources/glsl-feature-tests.css"/> 1.16 +<script src="../../../resources/desktop-gl-constants.js" type="text/javascript"></script> 1.17 +<script src="../../../resources/js-test-pre.js"></script> 1.18 +<script src="../../resources/webgl-test-utils.js"></script> 1.19 +<script src="../../resources/glsl-conformance-test.js"></script> 1.20 +</head> 1.21 +<body> 1.22 +<div id="description"></div> 1.23 +<div id="console"></div> 1.24 +<script id="vshaderWithLineDirective" type="text/something-not-javascript"> 1.25 +#line 123 1.26 +foo 1.27 +</script> 1.28 +<script> 1.29 +description("shader with line directive returns error at proper line"); 1.30 + 1.31 +var wtu = WebGLTestUtils; 1.32 +GLSLConformanceTester.runTests([ 1.33 + { vShaderId: 'vshaderWithLineDirective', 1.34 + vShaderSuccess: false, 1.35 + vShaderTest: (function() { return wtu.getLastError().indexOf("124") >= 0; }), 1.36 + fShaderId: undefined, 1.37 + fShaderSuccess: true, 1.38 + linkSuccess: false, 1.39 + passMsg: 'vertex shader uses #line directive should report correct line', 1.40 + }]); 1.41 + 1.42 +debug(""); 1.43 +successfullyParsed = true; 1.44 +</script> 1.45 +</body> 1.46 +</html>