| <!-- Check that resizing a (potentially accelerated) canvas properly clears its |
| contents even if the layout size of the canvas does not change. Expected |
| output is a blank canvas. |
| https://bugs.webkit.org/show_bug.cgi?id=80871 --> |
| outline: solid 1px black; |
| <script src="resources/repaint.js"></script> |
| testRunner.dumpAsText(true); |
| var canvas = document.getElementById('canvas'); |
| var ctx = canvas.getContext('2d'); |
| ctx.fillRect(0, 0, 300, 300); |
| var canvas = document.getElementById('canvas'); |
| // This changes the resolution of the canvas but keeps its layout size constant. |
| canvas.width = canvas.width / 2; |
| <body onload="runTest();"> |
| <canvas id="canvas" width="300" height="300"/> |