| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Canvas Hit Regions: basic test</title> | 4 <title>Canvas Hit Regions: basic test</title> |
| 5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <canvas id="canvas" width="400" height="400"> | 8 <canvas id="canvas" width="400" height="400"> |
| 9 <button id="face"></button> | 9 <button id="face"></button> |
| 10 <button id="eyes"></button> | 10 <button id="eyes"></button> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 shouldBe("clickCanvas(127, 242)", "'mouth'"); | 70 shouldBe("clickCanvas(127, 242)", "'mouth'"); |
| 71 shouldBe("clickCanvas(150, 125)", "'eye'"); | 71 shouldBe("clickCanvas(150, 125)", "'eye'"); |
| 72 shouldBe("clickCanvas(250, 125)", "'eye'"); | 72 shouldBe("clickCanvas(250, 125)", "'eye'"); |
| 73 shouldBe("clickCanvas(200, 125)", "'face'"); | 73 shouldBe("clickCanvas(200, 125)", "'face'"); |
| 74 shouldBe("clickCanvas(20, 10)", "null"); | 74 shouldBe("clickCanvas(20, 10)", "null"); |
| 75 debug(""); | 75 debug(""); |
| 76 | 76 |
| 77 debug("NotSupportedError exception tests"); | 77 debug("NotSupportedError exception tests"); |
| 78 shouldThrow("context.addHitRegion()"); | 78 shouldThrow("context.addHitRegion()"); |
| 79 shouldThrow("context.addHitRegion({ id : '' })"); | 79 shouldThrow("context.addHitRegion({ id : '' })"); |
| 80 shouldThrow("context.addHitRegion({ id : null })"); | |
| 81 shouldThrow("context.addHitRegion({ id : undefined })"); | 80 shouldThrow("context.addHitRegion({ id : undefined })"); |
| 82 shouldThrow("context.addHitRegion({ control : {} })"); | 81 shouldThrow("context.addHitRegion({ control : {} })"); |
| 83 shouldThrow("context.addHitRegion({ control : null })"); | 82 shouldThrow("context.addHitRegion({ control : null })"); |
| 84 shouldThrow("context.addHitRegion({ control : undefined })"); | 83 shouldThrow("context.addHitRegion({ control : undefined })"); |
| 85 shouldThrow("context.addHitRegion({ id : '', control : {} })"); | 84 shouldThrow("context.addHitRegion({ id : '', control : {} })"); |
| 86 shouldThrow("context.addHitRegion({ id : null, control : {} })"); | |
| 87 shouldThrow("context.addHitRegion({ id : undefined, control : {} })"); | 85 shouldThrow("context.addHitRegion({ id : undefined, control : {} })"); |
| 88 shouldThrow("context.addHitRegion({ id : '', control : null })"); | 86 shouldThrow("context.addHitRegion({ id : '', control : null })"); |
| 89 shouldThrow("context.addHitRegion({ id : null, control : null })"); | |
| 90 shouldThrow("context.addHitRegion({ id : undefined, control : null })"); | 87 shouldThrow("context.addHitRegion({ id : undefined, control : null })"); |
| 91 shouldThrow("context.addHitRegion({ id : '', control : undefined })"); | 88 shouldThrow("context.addHitRegion({ id : '', control : undefined })"); |
| 92 shouldThrow("context.addHitRegion({ id : null, control : undefined })"); | |
| 93 shouldThrow("context.addHitRegion({ id : undefined, control : undefined })"); | 89 shouldThrow("context.addHitRegion({ id : undefined, control : undefined })"); |
| 94 debug(""); | 90 debug(""); |
| 95 | 91 |
| 96 </script> | 92 </script> |
| 97 </body> | 93 </body> |
| 98 </html> | 94 </html> |
| OLD | NEW |