1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/libeditor/base/crashtests/766413.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 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 + while (root.firstChild) { 1.13 + root.removeChild(root.firstChild); 1.14 + } 1.15 + 1.16 + var space = document.createTextNode(" "); 1.17 + var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body"); 1.18 + root.contentEditable = "true"; 1.19 + root.focus(); 1.20 + document.execCommand("contentReadOnly", false, null); 1.21 + root.appendChild(body); 1.22 + root.contentEditable = "false"; 1.23 + root.appendChild(space); 1.24 + root.removeChild(body); 1.25 + root.contentEditable = "true"; 1.26 + 1.27 + window.getSelection().removeAllRanges(); 1.28 + var r1 = document.createRange(); 1.29 + r1.setStart(root, 0); 1.30 + r1.setEnd(root, 0); 1.31 + window.getSelection().addRange(r1); 1.32 + looseText = document.createTextNode("c"); 1.33 + var r2 = document.createRange(); 1.34 + r2.setStart(looseText, 0); 1.35 + r2.setEnd(looseText, 0); 1.36 + window.getSelection().addRange(r2); 1.37 + 1.38 + document.execCommand("forwardDelete", false, null); 1.39 +} 1.40 + 1.41 +</script> 1.42 +</head> 1.43 + 1.44 +<body onload="boom();"></body> 1.45 +</html>