Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: third_party/webgl/conformance-suites/1.0.0/conformance/gl-getstring.html

Issue 9360034: Remove everthing except conformance tests in the deps/third_party/webgl (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!--
2 Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
7 "http://www.w3.org/TR/html4/loose.dtd">
8 <html>
9 <head>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11 <title>WebGL gl.getParameter Strings Conformance Tests</title>
12 <link rel="stylesheet" href="../resources/js-test-style.css"/>
13 <script src="../resources/desktop-gl-constants.js" type="text/javascript"></scri pt>
14 <script src="../resources/js-test-pre.js"></script>
15 <script src="resources/webgl-test.js"></script>
16 </head>
17 <body>
18 <div id="description"></div>
19 <div id="console"></div>
20 <canvas id="canvas" width="2" height="2"> </canvas>
21 <script>
22 description("This test checks getParameter returns strings in the correct format ");
23
24 debug("");
25 debug("Canvas.getContext");
26
27 var gl = create3DContext(document.getElementById("canvas"));
28 if (!gl) {
29 testFailed("context does not exist");
30 } else {
31 testPassed("context exists");
32
33 debug("");
34 checkPrefix("WebGL 1.0", "VERSION");
35 checkPrefix("WebGL GLSL ES 1.0", "SHADING_LANGUAGE_VERSION");
36 shouldBeNonNull("gl.getParameter(gl.VENDOR)");
37 shouldBeNonNull("gl.getParameter(gl.RENDERER)");
38 shouldBe("gl.getError()", "gl.NO_ERROR");
39 }
40
41 function checkPrefix(expected, enum_val) {
42 var s = gl.getParameter(gl[enum_val]);
43 if (s != null &&
44 s.length >= expected.length &&
45 s.substring(0, expected.length) == expected) {
46 testPassed("getParameter(gl." + enum_val + ") correctly started with " + exp ected);
47 } else {
48 testFailed("getParameter(gl." + enum_val + ") did not start with " + expecte d);
49 }
50 }
51
52 debug("");
53 successfullyParsed = true;
54
55 </script>
56 <script src="../resources/js-test-post.js"></script>
57
58 <script>
59 </script>
60
61 </body>
62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698