Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / webgl / gl-vertex-attrib.html
blob87310dbad5833126ce4267470db32a4a7567b711
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 vertexAttrib Conformance Tests</title>
7 <script src="../../../resources/js-test.js"></script>
8 <script src="resources/webgl-test.js"></script>
9 </head>
10 <body>
11 <div id="description"></div>
12 <div id="console"></div>
13 <canvas id="canvas" width="2" height="2"> </canvas>
14 <script>
15 description("This test ensures WebGL implementations vertexAttrib can be set and read.");
17 debug("");
18 debug("Canvas.getContext");
20 var gl = create3DContext(document.getElementById("canvas"));
21 if (!gl) {
22 testFailed("context does not exist");
23 } else {
24 testPassed("context exists");
26 debug("");
27 debug("Checking gl.vertexAttrib.");
29 gl.vertexAttrib4fv(0, [1, 2, 3, 4]);
30 shouldBe('gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB)[0]', '1');
31 shouldBe('gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB)[1]', '2');
32 shouldBe('gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB)[2]', '3');
33 shouldBe('gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB)[3]', '4');
35 gl.vertexAttrib1f(0, 5);
36 shouldBe('gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB)[0]', '5');
37 shouldBe('gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB)[1]', '0');
38 shouldBe('gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB)[2]', '0');
39 shouldBe('gl.getVertexAttrib(0, gl.CURRENT_VERTEX_ATTRIB)[3]', '1');
42 debug("");
44 </script>
46 </body>
47 </html>