editor/libeditor/html/crashtests/382778-1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/editor/libeditor/html/crashtests/382778-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,53 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html class="reftest-wait">
     1.6 +<head>
     1.7 +<script>
     1.8 +
     1.9 +function init1()
    1.10 +{
    1.11 +  // Create an html:iframe in HTML mode (so designMode can be used 320092)
    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: 700px; height: 500px; 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 +  p = document.getElementById("p");
    1.26 +  pText = p.firstChild;
    1.27 +
    1.28 +  targetDocument.body.appendChild(targetDocument.adoptNode(p, true));
    1.29 +
    1.30 +  targetDocument.designMode = 'on';
    1.31 +
    1.32 +  setTimeout(boom, 0);
    1.33 +}
    1.34 +
    1.35 +
    1.36 +function boom()
    1.37 +{
    1.38 +  var rng = targetDocument.createRange(); 
    1.39 +  rng.setStart(pText, 3);
    1.40 +  rng.setEnd(pText, 3);
    1.41 +  
    1.42 +  targetWindow.getSelection().addRange(rng); 
    1.43 +
    1.44 +  targetDocument.execCommand("insertorderedlist", false, null);
    1.45 +  
    1.46 +  document.documentElement.removeAttribute("class")
    1.47 +}
    1.48 +
    1.49 +</script>
    1.50 +</head>
    1.51 +
    1.52 +<body onload="init1();">
    1.53 +<p id="p">word word</p>
    1.54 +</body>
    1.55 +
    1.56 +</html>

mercurial