Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / zero-size-fill-rect.html
blob44170c930f3114266042c8d5009087f1a4e80830
1 <!--
2 Creates a canvas which is filled red, then attempts to
3 fill a number of 0 size rects, finally fills with green.
5 Fill of a 0-sized rect should not throw an exception, so
6 we expected the output to be a green rect.
7 -->
8 <html>
9 <head>
10 <script type="text/javascript">
11 window.onload = function() {
12 if (window.testRunner)
13 testRunner.dumpAsText();
14 var canvas = document.getElementById("test");
15 var context = canvas.getContext("2d");
16 context.fillStyle = '#f00';
17 context.fillRect(0, 0, canvas.width, canvas.height);
18 try {
19 context.fillRect(0, 0, 0, 0);
20 context.fillRect(0, 0, canvas.width, 0);
21 context.fillRect(0, 0, 0, canvas.height);
22 } catch (e) {
23 var node = document.createTextNode("FAIL -- an exception was thrown when drawing a 0 sized rect");
24 document.getElementById("body").appendChild(node);
25 return;
27 context.fillStyle = '#0f0';
28 context.fillRect(0, 0, canvas.width, canvas.height);
29 var node = document.createTextNode("PASS -- 0 sized rects did not trigger an exception");
30 document.getElementById("body").appendChild(node);
32 </script>
33 <title>borkedness</title>
34 </head>
35 <body id="body">
36 <canvas id="test" width="100" height="100"></canvas>
37 <br>
38 </body>
39 </html>