test_bug725069.html (1315B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=725069 5 --> 6 <head> 7 <title>Test for Bug 725069</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <script src="/tests/SimpleTest/EventUtils.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 </head> 12 <body contenteditable>abc<!-- XXX -->def<span></span> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=725069">Mozilla Bug 725069</a> 14 <p id="display"></p> 15 <pre id="test"> 16 <script type="application/javascript"> 17 18 /** Test for Bug 725069 */ 19 SimpleTest.waitForExplicitFinish(); 20 addLoadEvent(function() { 21 var body = document.querySelector("body"); 22 is(body.firstChild.nodeType, body.TEXT_NODE, "The first node is a text node"); 23 is(body.firstChild.nodeValue, "abc", "The first text node is there"); 24 is(body.firstChild.nextSibling.nodeType, body.COMMENT_NODE, "The second node is a comment node"); 25 is(body.firstChild.nextSibling.nodeValue, " XXX ", "The value of the comment node is not changed"); 26 is(body.firstChild.nextSibling.nextSibling.nodeType, body.TEXT_NODE, "The last text node is a text node"); 27 is(body.firstChild.nextSibling.nextSibling.nodeValue, "def", "The last next node is there"); 28 SimpleTest.finish(); 29 }); 30 31 </script> 32 </pre> 33 </body> 34 </html>