blob: f711783736577410974b7c98af9c7db39da37ff4 [file] [log] [blame]
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<body>
<script>
test(function(t) {
var ctx = document.createElement('canvas').getContext('2d');
ctx.globalCompositeOperation = "source-over";
ctx.fillStyle = 'rgba(0, 0, 0, 0)';
ctx.fillRect(0, 0, 100, 100);
ctx.save();
ctx.translate(0, 100);
ctx.scale(1, -1);
ctx.fillStyle = 'green';
ctx.fillRect(0, 0, 100, 100);
ctx.restore();
assert_array_equals(ctx.getImageData(2, 1, 1, 1).data.slice(0, 3), [0, 128, 0]);
}, "Series of tests to ensure correct behaviour of composite on a fully transparent color.");
</script>
</body>