Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / dom / canvas / test / test_toDataURL_lowercase_ascii.html
blob4f0061e90bc3b9697b6b37a0a4c543cfa29ea284
1 <!DOCTYPE HTML>
2 <title>Canvas test: toDataURL.lowercase.ascii</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="50"><p class="fallback">FAIL (fallback content)</p></canvas>
7 <script>
8 var canvas = document.getElementById('c');
9 var ctx = canvas.getContext("2d");
11 var data = canvas.toDataURL('ImAgE/PnG');
12 ok(data.match(/^data:image\/png[;,]/), "data =~ /^data:image\\/png[;,]/");
14 // If JPEG is supported at all, it must be supported case-insensitively
15 data = canvas.toDataURL('image/jpeg');
16 if (data.match(/^data:image\/jpeg[;,]/)) {
17 data = canvas.toDataURL('ImAgE/JpEg');
18 ok(data.match(/^data:image\/jpeg[;,]/), "data =~ /^data:image\\/jpeg[;,]/");
20 </script>