| OLD | NEW |
| 1 description("Series of tests to ensure correct results of the winding rule in is
PointInPath."); | 1 description("Series of tests to ensure correct results of the winding rule in is
PointInPath."); |
| 2 | 2 |
| 3 var tmpimg = document.createElement('canvas'); | 3 var tmpimg = document.createElement('canvas'); |
| 4 tmpimg.width = 200; | 4 tmpimg.width = 200; |
| 5 tmpimg.height = 200; | 5 tmpimg.height = 200; |
| 6 ctx = tmpimg.getContext('2d'); | 6 ctx = tmpimg.getContext('2d'); |
| 7 | 7 |
| 8 // Execute test. | 8 // Execute test. |
| 9 function prepareTestScenario() { | 9 function prepareTestScenario() { |
| 10 debug('Testing default isPointInPath'); | 10 debug('Testing default isPointInPath'); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 debug('Testing invalid type isPointInPath with Path object'); | 64 debug('Testing invalid type isPointInPath with Path object'); |
| 65 shouldThrow("ctx.isPointInPath(null, 50, 50)"); | 65 shouldThrow("ctx.isPointInPath(null, 50, 50)"); |
| 66 shouldThrow("ctx.isPointInPath(null, 50, 50, 'nonzero')"); | 66 shouldThrow("ctx.isPointInPath(null, 50, 50, 'nonzero')"); |
| 67 shouldThrow("ctx.isPointInPath(null, 50, 50, 'evenodd')"); | 67 shouldThrow("ctx.isPointInPath(null, 50, 50, 'evenodd')"); |
| 68 shouldThrow("ctx.isPointInPath(null, 50, 50, null)"); | 68 shouldThrow("ctx.isPointInPath(null, 50, 50, null)"); |
| 69 shouldThrow("ctx.isPointInPath(path, 50, 50, null)"); | 69 shouldThrow("ctx.isPointInPath(path, 50, 50, null)"); |
| 70 shouldThrow("ctx.isPointInPath(undefined, 50, 50)"); | 70 shouldThrow("ctx.isPointInPath(undefined, 50, 50)"); |
| 71 shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'nonzero')"); | 71 shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'nonzero')"); |
| 72 shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'evenodd')"); | 72 shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'evenodd')"); |
| 73 shouldThrow("ctx.isPointInPath(undefined, 50, 50, undefined)"); | 73 shouldThrow("ctx.isPointInPath(undefined, 50, 50, undefined)"); |
| 74 shouldThrow("ctx.isPointInPath(path, 50, 50, undefined)"); | |
| 75 shouldThrow("ctx.isPointInPath([], 50, 50)"); | 74 shouldThrow("ctx.isPointInPath([], 50, 50)"); |
| 76 shouldThrow("ctx.isPointInPath([], 50, 50, 'nonzero')"); | 75 shouldThrow("ctx.isPointInPath([], 50, 50, 'nonzero')"); |
| 77 shouldThrow("ctx.isPointInPath([], 50, 50, 'evenodd')"); | 76 shouldThrow("ctx.isPointInPath([], 50, 50, 'evenodd')"); |
| 78 shouldThrow("ctx.isPointInPath({}, 50, 50)"); | 77 shouldThrow("ctx.isPointInPath({}, 50, 50)"); |
| 79 shouldThrow("ctx.isPointInPath({}, 50, 50, 'nonzero')"); | 78 shouldThrow("ctx.isPointInPath({}, 50, 50, 'nonzero')"); |
| 80 shouldThrow("ctx.isPointInPath({}, 50, 50, 'evenodd')"); | 79 shouldThrow("ctx.isPointInPath({}, 50, 50, 'evenodd')"); |
| 81 debug(''); | 80 debug(''); |
| 82 } | 81 } |
| 83 | 82 |
| 84 // Run test and allow variation of results. | 83 // Run test and allow variation of results. |
| 85 prepareTestScenario(); | 84 prepareTestScenario(); |
| OLD | NEW |