5 <script src='/tests/SimpleTest/SimpleTest.js'
></script>
10 ok
= window
.ok
|| function(e
, s
) {
11 e_out
.textContent
+= `\n${!e ? 'FAIL' : 'pass'}: ${s}`;
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}`);