038.html (562B)
1 <!doctype html> 2 <title>document.write</title> 3 <script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script> 4 <script> 5 var t = async_test(); 6 t.step(function() { 7 var s = "<body><"; 8 for (var i=0; i<s.length; i++) { 9 document.write(s[i]); 10 } 11 }); 12 </script>!DOCTYPE html><script> 13 t.step(function() { 14 //Nothing should be inserted into the DOM for the doctype node so 15 //just checking nothing odd happens 16 assert_equals(document.body.childNodes[0].localName, "script"); 17 } 18 ); 19 t.done(); 20 </script> 21 <div id="log"></div>