Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / setWidthResetAfterForcedRender.html
blob47990bc6c67e96b0b639a6544fef6887fb14b1f3
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5 <script src="../../resources/run-after-layout-and-paint.js"></script>
6 <script>
7 if (window.testRunner) {
8 testRunner.dumpAsTextWithPixelResults();
9 testRunner.waitUntilDone();
12 function repaintTest()
14 var canvas = document.getElementById('c1');
15 var offset = document.body.offsetLeft; // Forces layout
16 canvas.width = canvas.width; // Should wipe canvas clean
17 if (window.testRunner)
18 testRunner.notifyDone();
20 </script>
21 </head>
22 <body onload="runAfterLayoutAndPaint(repaintTest);">
23 <p><b>BUG ID:</b> <a href="https://bugs.webkit.org/show_bug.cgi?id=43341">Bugzilla bug 43341</a>
24 Setting canvas width after canvas already rendered resets canvas data appropriately, but doesn't repaint immediately.
25 <p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b>
26 The canvas should go blank due to setting on the canvas width.
27 </p>
29 <hr>
31 <p class="output">Actual output: (blank canvas)</p>
32 <canvas id="c1" class="output" width="100" height="50" ></canvas>
34 <script>
36 var canvas = document.getElementById('c1');
37 var ctx = canvas.getContext('2d');
38 ctx.fillStyle = '#0f0';
39 ctx.fillRect(0, 0, 100, 50);
41 </script>
43 </body>
44 </html>