OLD | NEW |
(Empty) | |
| 1 Test the behavior of isPointInStroke in Canvas with path object |
| 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 |
| 5 |
| 6 Initial behavior: lineWidth = 1.0 |
| 7 PASS ctx.isPointInStroke(path,20,20) is true |
| 8 PASS ctx.isPointInStroke(path,120,20) is true |
| 9 PASS ctx.isPointInStroke(path,20,120) is true |
| 10 PASS ctx.isPointInStroke(path,120,120) is true |
| 11 PASS ctx.isPointInStroke(path,70,20) is true |
| 12 PASS ctx.isPointInStroke(path,20,70) is true |
| 13 PASS ctx.isPointInStroke(path,120,70) is true |
| 14 PASS ctx.isPointInStroke(path,70,120) is true |
| 15 PASS ctx.isPointInStroke(path,22,22) is false |
| 16 PASS ctx.isPointInStroke(path,118,22) is false |
| 17 PASS ctx.isPointInStroke(path,22,118) is false |
| 18 PASS ctx.isPointInStroke(path,118,118) is false |
| 19 PASS ctx.isPointInStroke(path,70,18) is false |
| 20 PASS ctx.isPointInStroke(path,122,70) is false |
| 21 PASS ctx.isPointInStroke(path,70,122) is false |
| 22 PASS ctx.isPointInStroke(path,18,70) is false |
| 23 PASS ctx.isPointInStroke(path,NaN,122) is false |
| 24 PASS ctx.isPointInStroke(path,18,NaN) is false |
| 25 |
| 26 Check null and invalid type |
| 27 PASS ctx.isPointInStroke(null,70,20) threw exception TypeMismatchError: Failed t
o execute 'isPointInStroke' on 'CanvasRenderingContext2D': The 1st argument prov
ided is either null, or an invalid Path object.. |
| 28 PASS ctx.isPointInStroke([],20,70) threw exception TypeError: Failed to execute
'isPointInStroke' on 'CanvasRenderingContext2D': No function was found that matc
hed the signature provided.. |
| 29 PASS ctx.isPointInStroke({},120,70) threw exception TypeError: Failed to execute
'isPointInStroke' on 'CanvasRenderingContext2D': No function was found that mat
ched the signature provided.. |
| 30 |
| 31 Set lineWidth = 10.0 |
| 32 PASS ctx.isPointInStroke(path,22,22) is true |
| 33 PASS ctx.isPointInStroke(path,118,22) is true |
| 34 PASS ctx.isPointInStroke(path,22,118) is true |
| 35 PASS ctx.isPointInStroke(path,118,118) is true |
| 36 PASS ctx.isPointInStroke(path,70,18) is true |
| 37 PASS ctx.isPointInStroke(path,122,70) is true |
| 38 PASS ctx.isPointInStroke(path,70,122) is true |
| 39 PASS ctx.isPointInStroke(path,18,70) is true |
| 40 PASS ctx.isPointInStroke(path,26,70) is false |
| 41 PASS ctx.isPointInStroke(path,70,26) is false |
| 42 PASS ctx.isPointInStroke(path,70,114) is false |
| 43 PASS ctx.isPointInStroke(path,114,70) is false |
| 44 |
| 45 Check lineJoin = 'bevel' |
| 46 PASS ctx.isPointInStroke(path,113,20) is false |
| 47 |
| 48 Check lineJoin = 'miter' |
| 49 PASS ctx.isPointInStroke(path,113,20) is true |
| 50 |
| 51 Check miterLimit = 2.0 |
| 52 PASS ctx.isPointInStroke(path,113,20) is false |
| 53 |
| 54 Check lineCap = 'butt' |
| 55 PASS ctx.isPointInStroke(path,112,10) is false |
| 56 |
| 57 Check lineCap = 'round' |
| 58 PASS ctx.isPointInStroke(path,112,10) is true |
| 59 PASS ctx.isPointInStroke(path,117,10) is false |
| 60 |
| 61 Check lineCap = 'square' |
| 62 PASS ctx.isPointInStroke(path,112,10) is true |
| 63 PASS ctx.isPointInStroke(path,117,10) is false |
| 64 |
| 65 Check setLineDash([10,10]) |
| 66 PASS ctx.isPointInStroke(path,15,10) is true |
| 67 PASS ctx.isPointInStroke(path,25,10) is false |
| 68 PASS ctx.isPointInStroke(path,35,10) is true |
| 69 |
| 70 Check dashOffset = 10 |
| 71 PASS ctx.isPointInStroke(path,15,10) is false |
| 72 PASS ctx.isPointInStroke(path,25,10) is true |
| 73 PASS ctx.isPointInStroke(path,35,10) is false |
| 74 PASS successfullyParsed is true |
| 75 |
| 76 TEST COMPLETE |
| 77 |
OLD | NEW |