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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/gl-getstring.html

Issue 1601093008: Remove duplicated WebGL layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>WebGL gl.getParameter Strings Conformance Tests</title>
7 <script src="resources/desktop-gl-constants.js" type="text/javascript"></script>
8 <script src="../../../resources/js-test.js"></script>
9 <script src="resources/webgl-test.js"></script>
10 </head>
11 <body>
12 <div id="description"></div>
13 <div id="console"></div>
14 <canvas id="canvas" width="2" height="2"> </canvas>
15 <script>
16 description("This test checks getParameter returns strings in the correct format ");
17
18 debug("");
19 debug("Canvas.getContext");
20
21 var gl = create3DContext(document.getElementById("canvas"));
22 if (!gl) {
23 testFailed("context does not exist");
24 } else {
25 testPassed("context exists");
26
27 debug("");
28 checkPrefix("WebGL 1.0", "VERSION");
29 checkPrefix("WebGL GLSL ES 1.0", "SHADING_LANGUAGE_VERSION");
30 shouldBeNonNull("gl.getParameter(gl.VENDOR)");
31 shouldBeNonNull("gl.getParameter(gl.RENDERER)");
32 shouldBe("gl.getError()", "gl.NO_ERROR");
33 }
34
35 function checkPrefix(expected, enum_val) {
36 var s = gl.getParameter(gl[enum_val]);
37 if (s != null &&
38 s.length >= expected.length &&
39 s.substring(0, expected.length) == expected) {
40 testPassed("getParameter(gl." + enum_val + ") correctly started with " + exp ected);
41 } else {
42 testFailed("getParameter(gl." + enum_val + ") did not start with " + expecte d);
43 }
44 }
45
46 debug("");
47
48 </script>
49
50 <script>
51 </script>
52
53 </body>
54 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698