Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / canvas / test / webgl-mochitest / test_read_pixels_no_format.html
blobd953058181012aef06ed94d0a2955bbb0a4c3c4d
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset=utf-8>
5 <script src='/tests/SimpleTest/SimpleTest.js'></script>
6 </head>
7 <body>
8 <pre id=e_out></pre>
9 <script>
10 ok = window.ok || function(e, s) {
11 e_out.textContent += `\n${!e ? 'FAIL' : 'pass'}: ${s}`;
14 // -
16 const canvas = document.createElement('canvas')
17 document.documentElement.appendChild(canvas)
18 const gl = canvas.getContext('webgl2')
19 gl.bindBuffer(gl.PIXEL_PACK_BUFFER, gl.createBuffer())
20 gl.readPixels(0, 0, 0, 0, gl.getParameter(gl.IMPLEMENTATION_COLOR_READ_FORMAT), 0, 0);
21 const err = gl.getError();
22 ok(err == gl.INVALID_ENUM, `err: ${err}`);
24 ok(true, 'done');
25 </script>
26 </body>
27 </html>