Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / canvas / test / webgl-mochitest / test_cubemap_must_be_square.html
blobf2bc2914b2861cf9d060ea12471f8c84b407cbed
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta http-equiv='content-type' content='text/html; charset=utf-8'/>
6 <script src='/tests/SimpleTest/SimpleTest.js'></script>
7 <link rel='stylesheet' href='/tests/SimpleTest/test.css'>
8 <script src='webgl-util.js'></script>
9 </head>
11 <body>
12 <script>
13 'use strict';
15 (function() {
16 var c = document.createElement('canvas');
17 var gl = c.getContext('webgl');
19 ok(!gl.getError(), 'No error before.');
21 var tex = gl.createTexture();
22 gl.bindTexture(gl.TEXTURE_CUBE_MAP, tex);
23 gl.texImage2D(gl.TEXTURE_CUBE_MAP_NEGATIVE_X, 0, gl.RGBA, 4, 3, 0, gl.RGBA,
24 gl.UNSIGNED_BYTE, null);
26 var err = gl.getError();
27 ok(err == gl.INVALID_VALUE,
28 'Should be INVALID_VALUE (0x501) after, was 0x' + err.toString(16) + '.');
29 })();
31 ok(true, 'Test complete.');
33 </script>
34 </body>
35 </html>