chang.shu@nokia.com | d5cb910 | 2010-05-21 20:47:13 +0000 | [diff] [blame^] | 1 | <!DOCTYPE html> |
| 2 | <title>Canvas test: 2d.pattern.repeat.unrecognised</title> |
| 3 | <script src="../tests.js"></script> |
| 4 | <link rel="stylesheet" href="../tests.css"> |
| 5 | <link rel="prev" href="2d.pattern.repeat.undefined.html" title="2d.pattern.repeat.undefined"> |
| 6 | <link rel="next" href="2d.pattern.repeat.case.html" title="2d.pattern.repeat.case"> |
| 7 | <body class="show_output"> |
| 8 | <p> |
| 9 | <a href="2d.pattern.repeat.undefined.html" accesskey="p" title="[p] 2d.pattern.repeat.undefined"><</a> |
| 10 | <a href="index.html">[index]</a> |
| 11 | <a href="2d.pattern.repeat.case.html" accesskey="n" title="[n] 2d.pattern.repeat.case">></a> |
| 12 | <h1><a href="index.2d.html">2d</a>.<a href="index.2d.pattern.html">pattern</a>.<a href="index.2d.pattern.repeat.html">repeat</a>.unrecognised</h1> |
| 13 | <p class="desc"></p> |
| 14 | <div class="refs">References: |
| 15 | <ul> |
| 16 | <li><a href="spec.html#testrefs.2d.pattern.unrecognised">2d.pattern.unrecognised</a> |
| 17 | |
| 18 | </ul> |
| 19 | </div> |
| 20 | |
| 21 | <p class="output">Actual output:</p> |
| 22 | <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> |
| 23 | |
| 24 | <ul id="d"></ul> |
| 25 | <script> |
| 26 | _addTest(function(canvas, ctx) { |
| 27 | |
| 28 | try { var _thrown = false; |
| 29 | ctx.createPattern(canvas, "invalid"); |
| 30 | } catch (e) { if (e.code != DOMException.SYNTAX_ERR) _fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type SYNTAX_ERR: ctx.createPattern(canvas, \"invalid\")"); } |
| 31 | |
| 32 | |
| 33 | }); |
| 34 | </script> |
| 35 | |