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.

michael@0 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>
michael@0 2 <script>
michael@0 3 function reallyClear()
michael@0 4 {
michael@0 5 var par = document.getElementById("par");
michael@0 6 var range = document.createRange();
michael@0 7 range.selectNodeContents(par);
michael@0 8 range.deleteContents();
michael@0 9 document.documentElement.removeAttribute("class");
michael@0 10 }
michael@0 11
michael@0 12 function clear()
michael@0 13 {
michael@0 14 document.body.removeEventListener("DOMNodeRemoved", clear, false);
michael@0 15 reallyClear();
michael@0 16 }
michael@0 17
michael@0 18 function init()
michael@0 19 {
michael@0 20 document.body.addEventListener("DOMNodeRemoved", clear, false);
michael@0 21 }
michael@0 22
michael@0 23 </script>
michael@0 24 <body onload="init(); setTimeout(reallyClear, 10);">
michael@0 25 <div id="par"><span>1</span><span>2</span></div>
michael@0 26 </body></html>

mercurial