1 description("Series of tests to ensure correct behaviour of composite on a fully transparent color.");
2 var ctx = document.createElement('canvas').getContext('2d');
4 ctx.globalCompositeOperation = "source-over";
5 ctx.fillStyle = 'rgba(0,0,0,0)';
6 ctx.fillRect(0,0,100,100);
11 ctx.fillStyle = 'green';
12 ctx.fillRect(0,0,100,100);
15 var imageData = ctx.getImageData(1, 1, 98, 98);
16 var imgdata = imageData.data;
17 shouldBe("imgdata[4]", "0");
18 shouldBe("imgdata[5]", "128");
19 shouldBe("imgdata[6]", "0");