blob: 09e2233bb8f2eceeec786ce8b01bdda9a38e9447 [file] [log] [blame]
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<div></div>
<script>
description("This tests resolving the decode() promise when decoding non bitmap images.");
jsTestIsAsync = true;
var image = new Image;
image.src = "resources/green-100x100.svg";
image.decode()
.then(() => {
debug("Promise for decoding an SVG image was resolved.");
image.src = "data:image/svg+xml;utf8, \
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' width='100' height='100'> \
<rect width='100%' height='100%' fill='green'/> \
</svg>";
return image.decode();
})
.then(() => {
debug("Promise for decoding an SVG data url image was resolved.");
finishJSTest();
});
</script>
<script src="../../resources/js-test-post.js"></script>
</body>