OLD | NEW |
| (Empty) |
1 description("Series of tests to ensure correct behaviour on an invalid strokeSty
le()"); | |
2 var ctx = document.getElementById('canvas').getContext('2d'); | |
3 ctx.strokeStyle = 'rgb(0, 255, 0)'; | |
4 ctx.strokeStyle = 'nonsense'; | |
5 ctx.lineWidth = 200; | |
6 ctx.moveTo(0,100); | |
7 ctx.lineTo(200,100); | |
8 ctx.stroke(); | |
9 var imageData = ctx.getImageData(0, 0, 200, 200); | |
10 var imgdata = imageData.data; | |
11 shouldBe("imgdata[4]", "0"); | |
12 shouldBe("imgdata[5]", "255"); | |
13 shouldBe("imgdata[6]", "0"); | |
OLD | NEW |