blob: 752e5ff3783c1087226fe7570f474bc34a342092 [file] [log] [blame]
description("Series of tests to ensure correct behaviour on an invalid fillStyle()");
var ctx = document.getElementById('canvas').getContext('2d');
ctx.fillStyle = 'rgb(0, 255, 0)';
ctx.fillStyle = 'nonsense';
ctx.fillRect(0, 0, 200, 200);
var imageData = ctx.getImageData(0, 0, 200, 200);
var imgdata = imageData.data;
shouldBe("imgdata[4]", "0");
shouldBe("imgdata[5]", "255");
shouldBe("imgdata[6]", "0");