Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <body> | |
| 4 <script> | |
| 5 window.onload = function(){ | |
| 6 var oSelection=window.getSelection(); | |
|
yosin_UTC9
2013/10/03 01:41:19
nit: indentation of JavaScript should be four spac
yosin_UTC9
2013/10/03 01:41:19
Could you populate Range object by script rather t
Stephen Chennney
2013/10/03 20:38:28
Done.
| |
| 7 document.execCommand("SelectAll", false); | |
| 8 var oRange = oSelection.getRangeAt(0); | |
| 9 var aoElements = document.getElementsByTagName("*"); | |
| 10 var oParentElement = aoElements[5]; | |
|
ojan
2013/10/03 02:15:15
It would be easier to understand what this test is
Stephen Chennney
2013/10/03 20:38:28
Done.
| |
| 11 oRange.surroundContents(oParentElement); | |
| 12 | |
| 13 var descriptionNode = document.createElement("p"); | |
| 14 descriptionNode.id = "description"; | |
| 15 descriptionNode.innerHTML = "Test that there is no crash when surroundCo ntents is called with a node preceding the current selection."; | |
| 16 var buttonNode = document.getElementById("root"); | |
| 17 buttonNode.insertBefore(descriptionNode, buttonNode.firstChild); | |
| 18 Markup.dump("root"); | |
|
ojan
2013/10/03 02:15:15
Can you call Markup.dump before you insert the des
Stephen Chennney
2013/10/03 20:38:28
Switched to js-tests.
| |
| 19 }; | |
| 20 </script> | |
| 21 <button id="root"> | |
| 22 <div></div> | |
| 23 <div></div> | |
| 24 <table></table> | |
| 25 </button> | |
| 26 <script src="../../resources/dump-as-markup.js"></script> | |
|
yosin_UTC9
2013/10/03 01:41:19
It is better to use js-test-pre.js rather than dum
Stephen Chennney
2013/10/03 20:38:28
Done.
| |
| 27 </body> | |
| 28 </html> | |
| OLD | NEW |