| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <script src="../../resources/js-test-pre.js"></script> |
| description("Test that toDataURL(mimeType) ignores the case of 'mimeType'."); |
| canvas = document.createElement('canvas'); |
| function tryMimeType(mimeType) { |
| re = new RegExp("^data:([^;,]+)[;,].*"); |
| data = canvas.toDataURL(mimeType); |
| shouldBe("tryMimeType('image/png')", "'image/png'"); |
| shouldBe("tryMimeType('iMAge/Png')", "'image/png'"); |
| shouldBe("tryMimeType('IMAGE/PNG')", "'image/png'"); |
| if (tryMimeType("image/jpeg") == "image/jpeg") { |
| shouldBe("tryMimeType('image/jpeg')", "'image/jpeg'"); |
| shouldBe("tryMimeType('imAgE/jPEg')", "'image/jpeg'"); |
| shouldBe("tryMimeType('IMAGE/JPEG')", "'image/jpeg'"); |
| <script src="../../resources/js-test-post.js"></script> |