content/base/crashtests/293388-1.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <html class="reftest-wait"><head><title>Testcase bug 293388 - Overwriting of div innerHTML cause starting of the loading icon(circle) and some times browser can crash [@ nsRange::DeleteContents]</title></head>
     2 <script>
     3 function reallyClear()
     4 {
     5   var par = document.getElementById("par");
     6   var range = document.createRange();
     7   range.selectNodeContents(par);
     8   range.deleteContents();
     9   document.documentElement.removeAttribute("class");
    10 }
    12 function clear()
    13 {
    14   document.body.removeEventListener("DOMNodeRemoved", clear, false);
    15   reallyClear();
    16 }
    18 function init()
    19 {
    20   document.body.addEventListener("DOMNodeRemoved", clear, false);
    21 }
    23 </script>
    24 <body onload="init(); setTimeout(reallyClear, 10);">
    25 <div id="par"><span>1</span><span>2</span></div>
    26 </body></html>

mercurial