6 image-rendering: pixelated;
10 <!-- Test drawing a canvas off-screen then appending it to the DOM. -->
11 <!-- The resulting image should be 100x100, consisting of 4 50x50 blocks of solid color, with no blurring of edges -->
14 // Ignore the render tree.
15 if (window
.testRunner
)
16 window
.testRunner
.dumpAsTextWithPixelResults();
18 var canvas
= document
.createElement('canvas');
22 var context
= canvas
.getContext("2d");
23 var imageHandle
= context
.createImageData(canvas
.width
, canvas
.height
);
27 imageHandle
.data
[index
++] = 255;
28 imageHandle
.data
[index
++] = 0;
29 imageHandle
.data
[index
++] = 0;
30 imageHandle
.data
[index
++] = 255;
32 imageHandle
.data
[index
++] = 0;
33 imageHandle
.data
[index
++] = 255;
34 imageHandle
.data
[index
++] = 0;
35 imageHandle
.data
[index
++] = 255;
37 imageHandle
.data
[index
++] = 0;
38 imageHandle
.data
[index
++] = 0;
39 imageHandle
.data
[index
++] = 255;
40 imageHandle
.data
[index
++] = 255;
42 imageHandle
.data
[index
++] = 0;
43 imageHandle
.data
[index
++] = 0;
44 imageHandle
.data
[index
++] = 0;
45 imageHandle
.data
[index
++] = 255;
47 context
.putImageData(imageHandle
, 0, 0);
48 document
.getElementsByTagName("body")[0].appendChild(canvas
);