editor/libeditor/base/crashtests/772282.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4 <script>
     6 function boom()
     7 {
     8   var root = document.documentElement;
     9   while(root.firstChild) { root.removeChild(root.firstChild); }
    10   var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
    11   body.setAttributeNS(null, "contenteditable", "true");
    12   var img = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
    13   body.appendChild(img);
    14   root.appendChild(body);
    15   document.removeChild(root);
    16   document.appendChild(root);
    17   document.execCommand("insertText", false, "5");
    18   document.execCommand("selectAll", false, null);
    19   document.execCommand("insertParagraph", false, null);
    20   document.execCommand("increasefontsize", false, null);
    21 }
    23 </script>
    24 </head>
    26 <body onload="boom();"></body>
    27 </html>

mercurial