editor/libeditor/html/crashtests/382778-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.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html class="reftest-wait">
michael@0 3 <head>
michael@0 4 <script>
michael@0 5
michael@0 6 function init1()
michael@0 7 {
michael@0 8 // Create an html:iframe in HTML mode (so designMode can be used 320092)
michael@0 9 targetIframe = document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe');
michael@0 10 targetIframe.src = "data:text/html,";
michael@0 11 targetIframe.setAttribute("style", "width: 700px; height: 500px; border: 1px dotted green;");
michael@0 12 targetIframe.addEventListener("load", init2, false);
michael@0 13 document.body.appendChild(targetIframe);
michael@0 14 }
michael@0 15
michael@0 16
michael@0 17 function init2()
michael@0 18 {
michael@0 19 targetWindow = targetIframe.contentWindow;
michael@0 20 targetDocument = targetWindow.document;
michael@0 21
michael@0 22 p = document.getElementById("p");
michael@0 23 pText = p.firstChild;
michael@0 24
michael@0 25 targetDocument.body.appendChild(targetDocument.adoptNode(p, true));
michael@0 26
michael@0 27 targetDocument.designMode = 'on';
michael@0 28
michael@0 29 setTimeout(boom, 0);
michael@0 30 }
michael@0 31
michael@0 32
michael@0 33 function boom()
michael@0 34 {
michael@0 35 var rng = targetDocument.createRange();
michael@0 36 rng.setStart(pText, 3);
michael@0 37 rng.setEnd(pText, 3);
michael@0 38
michael@0 39 targetWindow.getSelection().addRange(rng);
michael@0 40
michael@0 41 targetDocument.execCommand("insertorderedlist", false, null);
michael@0 42
michael@0 43 document.documentElement.removeAttribute("class")
michael@0 44 }
michael@0 45
michael@0 46 </script>
michael@0 47 </head>
michael@0 48
michael@0 49 <body onload="init1();">
michael@0 50 <p id="p">word word</p>
michael@0 51 </body>
michael@0 52
michael@0 53 </html>

mercurial