Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / webgl / compressed-tex-image.html
bloba15a2848d9a39814110c6a168078531d1065f229
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>WebGL CompressedTexImage and CompressedTexSubImage Tests</title>
6 <script src="../../../resources/js-test.js"></script>
7 <script src="resources/webgl-test.js"></script>
8 <script src="resources/webgl-test-utils.js"></script>
9 </head>
10 <body>
11 <div id="description"></div>
12 <div id="console"></div>
13 <script>
14 description("This test ensures WebGL implementations correctly implement compressedTexImage2D and compressedTexSubImage2D.");
16 debug("");
18 if (window.internals)
19 window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
21 var wtu = WebGLTestUtils;
22 var canvas = document.createElement("canvas");
23 var gl = wtu.create3DContext(canvas);
25 const COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
26 const COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
27 const COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3;
28 const ETC1_RGB8_OES = 0x8D64;
29 const COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00;
30 const COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02;
32 if (!gl) {
33 testFailed("context does not exist");
34 } else {
35 testPassed("context exists");
37 var tex = gl.createTexture();
38 gl.bindTexture(gl.TEXTURE_2D, tex);
40 shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, new Uint8Array(8))");
41 shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGBA_S3TC_DXT1_EXT, 4, 4, 0, new Uint8Array(8))");
42 shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGBA_S3TC_DXT5_EXT, 4, 4, 0, new Uint8Array(16))");
43 shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, ETC1_RGB8_OES, 4, 4, 0, new Uint8Array(8))");
44 shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_PVRTC_4BPPV1_IMG, 8, 8, 0, new Uint8Array(8))");
45 shouldGenerateGLError(gl, gl.INVALID_ENUM, "gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, 8, 8, 0, new Uint8Array(8))");
47 </script>
48 </body>
49 </html>