1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/libeditor/base/crashtests/382527-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,58 @@ 1.4 +<!DOCTYPE html> 1.5 +<html class="reftest-wait"> 1.6 +<head> 1.7 +<script> 1.8 + 1.9 + 1.10 +function init1() 1.11 +{ 1.12 + targetIframe = document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe'); 1.13 + targetIframe.src = "data:text/html,"; 1.14 + targetIframe.setAttribute("style", "width: 300px; height: 200px; border: 1px dotted green;"); 1.15 + targetIframe.addEventListener("load", init2, false); 1.16 + document.body.appendChild(targetIframe); 1.17 +} 1.18 + 1.19 + 1.20 +function init2() 1.21 +{ 1.22 + targetWindow = targetIframe.contentWindow; 1.23 + targetDocument = targetWindow.document; 1.24 + 1.25 + var div = document.getElementById("div"); 1.26 + textNode = div.firstChild; 1.27 + 1.28 + targetDocument.body.appendChild(targetDocument.adoptNode(div, true)); 1.29 + 1.30 + targetDocument.designMode = 'on'; 1.31 + setTimeout(init3, 0); 1.32 +} 1.33 + 1.34 + 1.35 +function init3() 1.36 +{ 1.37 + var rng = targetDocument.createRange(); 1.38 + rng.setStart(textNode, 1); 1.39 + rng.setEnd(textNode, 1); 1.40 + targetWindow.getSelection().addRange(rng); 1.41 + 1.42 + try { 1.43 + targetDocument.execCommand("inserthtml", false, "<p>"); 1.44 + } catch(e) {} 1.45 + 1.46 + document.documentElement.removeAttribute("class"); 1.47 +} 1.48 + 1.49 + 1.50 +</script> 1.51 + 1.52 +</head> 1.53 + 1.54 +<body onload="init1();"> 1.55 + 1.56 +<div id="div"> </div> 1.57 + 1.58 +<script> 1.59 +</script> 1.60 +</body> 1.61 +</html>