3 function print(message
)
5 var paragraph
= document
.createElement("li");
6 paragraph
.appendChild(document
.createTextNode(message
));
7 document
.getElementById("console").appendChild(paragraph
);
11 if (window
.testRunner
)
12 testRunner
.dumpAsText();
14 var canvas
= document
.getElementById("bigCanvas");
15 var width
= canvas
.width
;
16 // We need to perform a context fetch to force allocation of
18 if (canvas
.getContext
)
20 var ctx
= canvas
.getContext("2d");
23 print("Canvas 2d context = null!");
27 print("Survived canvas creation attempt. Width = " + width
);
31 <body onload=
"test();">
32 <canvas id=
"bigCanvas" width=
"134217728" height=
"1"></canvas>
33 <p>This test checks to see if the browser survives the attempted creation
34 of an excessively large canvas.
</p>
36 <p><ol id=console
></ol></p>