Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / dom / canvas / test / test_toBlob_zero_dimension.html
blob227757e68203776f584db96a0529f9dc48ec0b76
1 <!DOCTYPE HTML>
2 <title>Canvas test: toBlob</title>
3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
4 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
5 <body>
6 <canvas id="c" width="100" height="0"></canvas>
7 <script>
9 function testblob(blob) {
10 is(blob, null, "Null blob expected");
13 function test1(canvas)
15 canvas.toBlob(function(blob) {
16 testblob(blob);
17 test2(canvas);
18 }, "image/png");
21 function test2(canvas)
23 canvas.width = 0;
24 canvas.height = 100;
25 canvas.toBlob(function(blob) {
26 testblob(blob);
27 SimpleTest.finish();
28 }, "image/png");
31 SimpleTest.waitForExplicitFinish();
33 addLoadEvent(function () {
35 var canvas = document.getElementById('c');
36 var ctx = canvas.getContext('2d');
37 test1(canvas);
39 });
40 </script>