chang.shu@nokia.com | d5cb910 | 2010-05-21 20:47:13 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <title>Canvas test: 2d.line.width.valid</title> |
| 3 | <script src="../tests.js"></script> |
| 4 | <link rel="stylesheet" href="../tests.css"> |
andreas.kling@nokia.com | 7817c16 | 2010-11-07 13:49:39 +0000 | [diff] [blame] | 5 | <body> |
| 6 | <p id="passtext">Pass</p> |
| 7 | <p id="failtext">Fail</p> |
| 8 | <p class="output">These images should be identical:</p> |
chang.shu@nokia.com | d5cb910 | 2010-05-21 20:47:13 +0000 | [diff] [blame] | 9 | <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> |
| 10 | |
| 11 | <ul id="d"></ul> |
| 12 | <script> |
| 13 | _addTest(function(canvas, ctx) { |
| 14 | |
| 15 | ctx.lineWidth = 1.5; |
| 16 | _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5"); |
| 17 | |
| 18 | ctx.lineWidth = "1e1"; |
| 19 | _assertSame(ctx.lineWidth, 10, "ctx.lineWidth", "10"); |
| 20 | |
| 21 | ctx.lineWidth = 1/1024; |
| 22 | _assertSame(ctx.lineWidth, 1/1024, "ctx.lineWidth", "1/1024"); |
| 23 | |
| 24 | ctx.lineWidth = 1000; |
| 25 | _assertSame(ctx.lineWidth, 1000, "ctx.lineWidth", "1000"); |
| 26 | |
| 27 | |
| 28 | }); |
| 29 | </script> |
| 30 | |