Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encodi...
[WebKit-https.git] / LayoutTests / fast / dom / dir-no-body.html
1 <html>
2 <head>
3 <script>
4 function print(message, color) 
5 {
6     var paragraph = document.createElement("div");
7     paragraph.appendChild(document.createTextNode(message));
8     paragraph.style.fontFamily = "monospace";
9     if (color)
10         paragraph.style.color = color;
11     document.getElementById("console").appendChild(paragraph);
12 }
13
14 function test() 
15 {
16     if (window.testRunner)
17         testRunner.dumpAsText();
18         
19     var doc = document.implementation.createHTMLDocument("");
20     doc.body.parentNode.removeChild(doc.body);
21     doc.dir = 1;
22     
23     print("PASS: you didn't crash.", "green");
24 }
25 </script>
26 </head>
27
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>
31 <hr>
32
33 <div id='console'></div>
34
35 </body>
36 </html>