editor/libeditor/base/crashtests/382527-1.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE html>
     2 <html class="reftest-wait">
     3 <head>
     4 <script>
     7 function init1()
     8 {
     9   targetIframe = document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe');
    10   targetIframe.src = "data:text/html,";
    11   targetIframe.setAttribute("style", "width: 300px; height: 200px; border: 1px dotted green;");
    12   targetIframe.addEventListener("load", init2, false);
    13   document.body.appendChild(targetIframe);
    14 }
    17 function init2()
    18 {
    19   targetWindow = targetIframe.contentWindow;
    20   targetDocument = targetWindow.document;
    22   var div = document.getElementById("div");
    23   textNode = div.firstChild;
    25   targetDocument.body.appendChild(targetDocument.adoptNode(div, true));
    27   targetDocument.designMode = 'on';
    28   setTimeout(init3, 0);
    29 }
    32 function init3()
    33 {
    34   var rng = targetDocument.createRange(); 
    35   rng.setStart(textNode, 1);
    36   rng.setEnd(textNode, 1);
    37   targetWindow.getSelection().addRange(rng);
    39   try {
    40     targetDocument.execCommand("inserthtml", false, "<p>");
    41   } catch(e) {}
    43   document.documentElement.removeAttribute("class");
    44 }
    47 </script>
    49 </head>
    51 <body onload="init1();">
    53 <div id="div"> </div>
    55 <script>
    56 </script>
    57 </body>
    58 </html>

mercurial