4 function print(message
, color
)
6 var paragraph
= document
.createElement("div");
7 paragraph
.appendChild(document
.createTextNode(message
));
8 paragraph
.style
.fontFamily
= "monospace";
10 paragraph
.style
.color
= color
;
11 document
.getElementById("console").appendChild(paragraph
);
16 if (window
.testRunner
)
17 testRunner
.dumpAsText();
19 var doc
= document
.implementation
.createHTMLDocument("");
20 doc
.body
.parentNode
.removeChild(doc
.body
);
23 print("PASS: you didn't crash.", "green");
28 <body onload=
"test();">
29 <p>This page test for a crash when setting the dir property of an HTML document with no body.
</p>
30 <p>If the test passes, you'll see a 'PASS' message below.
</p>
33 <div id='console'
></div>