4 <title>Resizing a canvas
</title>
7 <p>There should be nothing below. Bug
8994.
</p>
8 <p><canvas width=
"200" height=
"100">FAIL
</canvas></p>
10 var canvas
= document
.getElementsByTagName('canvas')[0];
11 var context
= canvas
.getContext('2d');
13 // This should get nuked by the resize below
14 context
.fillStyle
= 'red';
15 context
.fillRect(0, 0, 200, 100);
18 context
.fillStyle
= 'red';
19 context
.strokeStyle
= 'red';
20 context
.lineWidth
= 25;
22 context
.moveTo(25, 25);
23 context
.moveTo(125, 25);
24 context
.moveTo(125, 125);
25 context
.moveTo(25, 125);
26 canvas
.setAttribute('height', '200'); // this should wipe the red away and blow away all the other state
27 context
.fill(); // so this should do nothing
28 context
.strokeRect(0, 201, 200, 201); // this should draw nothing