Skip to content

Commit

Permalink
Merge pull request servo#953 from cabanier/master
Browse files Browse the repository at this point in the history
Added test for createPattern with 'null' string
  • Loading branch information
Ms2ger committed Apr 30, 2014
2 parents c3cb4dd + 9607007 commit 819158d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.pattern.repeat.unrecognisednull</title>
<meta name="author" content="Philip Taylor">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">

<h1>2d.pattern.repeat.unrecognisednull</h1>
<p class="desc"></p>


<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>

<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {

_assert_throws("SYNTAX_ERR", function() { ctx.createPattern(canvas, "null"); });


});
</script>

6 changes: 6 additions & 0 deletions 2dcontext/tools/tests2d.yaml
Expand Up @@ -2858,6 +2858,12 @@
code: |
@assert throws SYNTAX_ERR ctx.createPattern(canvas, "invalid");
- name: 2d.pattern.repeat.unrecognisednull
testing:
- 2d.pattern.unrecognised
code: |
@assert throws SYNTAX_ERR ctx.createPattern(canvas, "null");
- name: 2d.pattern.repeat.case
testing:
- 2d.pattern.exact
Expand Down

0 comments on commit 819158d

Please sign in to comment.