1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/libeditor/base/crashtests/768765.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 +<head> 1.7 +<script> 1.8 + 1.9 +function boom() 1.10 +{ 1.11 + var root = document.documentElement; 1.12 + 1.13 + while (root.firstChild) { root.removeChild(root.firstChild); } 1.14 + 1.15 + var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body"); 1.16 + var div = document.createElementNS("http://www.w3.org/1999/xhtml", "div"); 1.17 + root.contentEditable = "true"; 1.18 + root.appendChild(div); 1.19 + root.removeChild(div); 1.20 + root.insertBefore(body, root.firstChild); 1.21 + 1.22 + window.getSelection().removeAllRanges(); 1.23 + var r0 = document.createRange(); 1.24 + r0.setStart(body, 0); 1.25 + r0.setEnd(body, 0); 1.26 + window.getSelection().addRange(r0); 1.27 + var r1 = document.createRange(); 1.28 + r1.setStart(div, 0); 1.29 + r1.setEnd(div, 0); 1.30 + window.getSelection().addRange(r1); 1.31 + 1.32 + document.execCommand("inserthtml", false, "1"); 1.33 +} 1.34 + 1.35 +</script> 1.36 +</head> 1.37 + 1.38 +<body onload="boom();"></body> 1.39 +</html>