| OLD | NEW |
| 1 description("Series of tests to ensure clip() works with path and winding rule p
arameters."); | 1 description("Series of tests to ensure clip() works with path and winding rule p
arameters."); |
| 2 | 2 |
| 3 var ctx = document.getElementById('canvas').getContext('2d'); | 3 var ctx = document.getElementById('canvas').getContext('2d'); |
| 4 | 4 |
| 5 function pixelDataAtPoint() { | 5 function pixelDataAtPoint() { |
| 6 return ctx.getImageData(50, 50, 1, 1).data; | 6 return ctx.getImageData(50, 50, 1, 1).data; |
| 7 } | 7 } |
| 8 | 8 |
| 9 function checkResult(expectedColors, sigma) { | 9 function checkResult(expectedColors, sigma) { |
| 10 for (var i = 0; i < 4; i++) | 10 for (var i = 0; i < 4; i++) |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 shouldThrow("ctx.clip(null, null)"); | 68 shouldThrow("ctx.clip(null, null)"); |
| 69 shouldThrow("ctx.clip(null, 'nonzero')"); | 69 shouldThrow("ctx.clip(null, 'nonzero')"); |
| 70 shouldThrow("ctx.clip(path, null)"); | 70 shouldThrow("ctx.clip(path, null)"); |
| 71 shouldThrow("ctx.clip([], 'nonzero')"); | 71 shouldThrow("ctx.clip([], 'nonzero')"); |
| 72 shouldThrow("ctx.clip({}, 'nonzero')"); | 72 shouldThrow("ctx.clip({}, 'nonzero')"); |
| 73 shouldThrow("ctx.clip(null, 'evenodd')"); | 73 shouldThrow("ctx.clip(null, 'evenodd')"); |
| 74 shouldThrow("ctx.clip([], 'evenodd')"); | 74 shouldThrow("ctx.clip([], 'evenodd')"); |
| 75 shouldThrow("ctx.clip({}, 'evenodd')"); | 75 shouldThrow("ctx.clip({}, 'evenodd')"); |
| 76 shouldThrow("ctx.clip('gazonk')"); | 76 shouldThrow("ctx.clip('gazonk')"); |
| 77 shouldThrow("ctx.clip(path, 'gazonk')"); | 77 shouldThrow("ctx.clip(path, 'gazonk')"); |
| 78 shouldThrow("ctx.clip(undefined)"); | |
| 79 shouldThrow("ctx.clip(undefined, undefined)"); | 78 shouldThrow("ctx.clip(undefined, undefined)"); |
| 80 shouldThrow("ctx.clip(undefined, 'nonzero')"); | 79 shouldThrow("ctx.clip(undefined, 'nonzero')"); |
| 81 shouldThrow("ctx.clip(path, undefined)"); | |
| 82 } | 80 } |
| 83 | 81 |
| 84 // Run test and allow variation of results. | 82 // Run test and allow variation of results. |
| 85 prepareTestScenario(); | 83 prepareTestScenario(); |
| OLD | NEW |