<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(function(t) {
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
ctx.lineWidth = 10;
ctx.beginPath();
ctx.strokeStyle = 'green';
ctx.strokeRect(0, 0, 100, 100);
var ctx2 = document.createElement('canvas').getContext('2d');
ctx2.fillStyle = 'red';
ctx2.fillRect(0, 0, 100, 100);
ctx2.drawImage(canvas, 0, 0);
assert_array_equals(ctx2.getImageData(0, 0, 1, 1).data.slice(0,3), [0, 128, 0]);
}, "Test to ensure that canvas-to-canvas drawImage after a stroked rect works correctly.");
</script>