| <script src="resources/repaint.js"></script> |
| <body onload="runRepaintTest();"> |
| <canvas id="canvas-source-in" width="100" height="100"></canvas> |
| <canvas id="canvas-copy" width="100" height="100"></canvas> |
| var compositeTypes = ['source-in','copy']; |
| testRunner.dumpAsText(true); |
| for (i = 0; i < compositeTypes.length; i++) { |
| var canvas = document.getElementById('canvas-' + compositeTypes[i]); |
| var ctx = canvas.getContext('2d'); |
| ctx.fillRect(0, 0, 100, 100); |
| for (i = 0; i < compositeTypes.length; i++) { |
| var canvas = document.getElementById('canvas-' + compositeTypes[i]); |
| var ctx = canvas.getContext('2d'); |
| ctx.globalCompositeOperation = compositeTypes[i]; |
| ctx.fillRect(40, 40, 20, 20); |