6 image-rendering: pixelated;
10 <!-- The resulting image should be 100x100, consisting of 4 50x50 blocks of solid color, with no blurring of edges -->
11 <canvas width=
"2" height=
"2"></canvas>
14 // Ignore the render tree.
15 if (window
.testRunner
)
16 window
.testRunner
.dumpAsTextWithPixelResults();
20 canvas
= document
.getElementsByTagName("canvas")[0].getContext("2d");
23 imageHandle
= canvas
.createImageData(2, 2);
26 var length
= imageHandle
.data
.length
;
28 imageHandle
.data
[index
++] = 255;
29 imageHandle
.data
[index
++] = 0;
30 imageHandle
.data
[index
++] = 0;
31 imageHandle
.data
[index
++] = 255;
33 imageHandle
.data
[index
++] = 0;
34 imageHandle
.data
[index
++] = 255;
35 imageHandle
.data
[index
++] = 0;
36 imageHandle
.data
[index
++] = 255;
38 imageHandle
.data
[index
++] = 0;
39 imageHandle
.data
[index
++] = 0;
40 imageHandle
.data
[index
++] = 255;
41 imageHandle
.data
[index
++] = 255;
43 imageHandle
.data
[index
++] = 0;
44 imageHandle
.data
[index
++] = 0;
45 imageHandle
.data
[index
++] = 0;
46 imageHandle
.data
[index
++] = 255;
48 canvas
.putImageData(imageHandle
, 0, 0);