5 <script src='/tests/SimpleTest/SimpleTest.js'
></script>
6 <link rel='stylesheet' href='/tests/SimpleTest/test.css'
>
11 const ab
= new ArrayBuffer(4);
12 const ta
= new Uint8ClampedArray(ab
);
13 const idata
= new ImageData(ta
, 1);
14 const canvas
= document
.createElement('canvas');
15 const gl
= canvas
.getContext('webgl2');
16 const worker
= new Worker('worker.js');
17 worker
.postMessage([ab
], [ab
]);
18 gl
.texImage2D(gl
.TEXTURE_CUBE_MAP_NEGATIVE_X
, 1, gl
.RGB
, idata
.width
, idata
.height
, 0, gl
.RGB
, gl
.UNSIGNED_SHORT_5_6_5
, idata
);
19 const err
= gl
.getError();
20 window
.ok
= window
.ok
|| console
.log
;
21 ok(err
== gl
.INVALID_VALUE
, 'texImage2D(ImageData) with Transferred ArrayBuffer is INVALID_VALUE');