no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / layout / reftests / canvas / evenodd-fill-sanity.html
blob863a79c14824fefc95fe5b955cbc09f3cb4eb2f8
1 <html>
2 <head>
3 <script type="text/javascript">
4 function assert(cond, msg) { if (!cond) { throw msg; } }
5 window.onload = function() {
6 try {
7 var ctx = document.getElementById("c1").getContext("2d");
9 assert("nonzero" == ctx.mozFillRule,
10 "Default fillRule is 'nonzero'");
12 ctx.mozFillRule = "evenodd";
13 assert("evenodd" == ctx.mozFillRule,
14 "fillRule understands 'evenodd'");
15 ctx.mozFillRule = "nonzero";
17 ctx.mozFillRule = "garbageLSKJDF 29879234";
18 assert("nonzero" == ctx.mozFillRule,
19 "Garbage fillRule string has no effect");
21 ctx.mozFillRule = "evenodd";
22 ctx.mozFillRule = "garbageLSKJDF 29879234";
23 assert("evenodd" == ctx.mozFillRule,
24 "Garbage fillRule string has no effect");
25 ctx.mozFillRule = "nonzero";
27 ctx.save();
28 ctx.mozFillRule = "evenodd";
29 ctx.restore();
30 assert("nonzero" == ctx.mozFillRule,
31 "fillRule was saved then restored");
32 } catch (e) {
33 document.body.innerHTML = "FAIL: "+ e.toString();
34 return;
36 document.body.innerHTML = "Pass";
38 </script>
39 </head>
40 <body>
41 <div><canvas id="c1" width="300" height="300"></canvas></div>
42 </body>
43 </html>