Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / dom / canvas / test / crash / file_1251091-1.html
blob520a393b43e575ed2bdcc7354f9a63eb2e81373b
1 <!doctype html>
2 <html class="reftest-wait">
3 <head>
4 <script type="text/javascript">
5 var gl;
7 function start() {
8 var canvas = document.getElementById("glcanvas");
9 gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
11 if (gl) {
12 initTextures();
13 } else {
14 finish();
18 function initTextures() {
19 var cubeTexture = gl.createTexture();
20 var cubeImage = document.getElementById("i");
21 cubeImage.onload = function() { handleTextureLoaded(cubeImage, cubeTexture); }
22 cubeImage.onerror = function() { finish(); }
23 cubeImage.src = "1251091-1.png";
26 function handleTextureLoaded(image, texture) {
27 gl.bindTexture(gl.TEXTURE_2D, texture);
28 gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
29 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
30 gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
31 gl.generateMipmap(gl.TEXTURE_2D);
32 gl.bindTexture(gl.TEXTURE_2D, null);
33 setTimeout(showit,0);
36 function showit() {
37 document.getElementById("i").style.display = "";
38 finish();
41 function finish() {
42 document.documentElement.removeAttribute("class");
44 </script>
45 </head>
47 <body onload="start()">
48 <canvas id="glcanvas" width="640" height="480"></canvas>
49 <img id="i" style="display: none;">
50 </body>
51 </html>