OLD | NEW |
| (Empty) |
1 description("Series of tests to ensure that currentPath does not take non-Path v
alues."); | |
2 var ctx = document.createElement('canvas').getContext('2d'); | |
3 ctx.fillStyle = "green"; | |
4 ctx.beginPath(); | |
5 ctx.rect(0,0,100,100); | |
6 | |
7 ctx.currentPath = null; | |
8 ctx.currentPath = 0; | |
9 ctx.currentPath = {}; | |
10 ctx.currentPath = new Array(); | |
11 ctx.currentPath = undefined; | |
12 | |
13 ctx.fill(); | |
14 var imageData = ctx.getImageData(50, 50, 1, 1); | |
15 var imgdata = imageData.data; | |
16 shouldBe("imgdata[0]", "0"); | |
17 shouldBe("imgdata[1]", "128"); | |
18 shouldBe("imgdata[2]", "0"); | |
OLD | NEW |