layout/reftests/dom/inserttwoparents.html

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
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">
michael@0 2 <head>
michael@0 3
michael@0 4 <script>
michael@0 5 function boom()
michael@0 6 {
michael@0 7 document.body.offsetHeight;
michael@0 8
michael@0 9 var fourehdiv = document.getElementById("foureh");
michael@0 10 var parent = fourehdiv.parentNode;
michael@0 11
michael@0 12 for (var i = 2; i <= 3; i++) {
michael@0 13 var newdiv = document.createElement("div");
michael@0 14 newdiv.appendChild(document.createTextNode(i + "a"));
michael@0 15 parent.insertBefore(newdiv, fourehdiv);
michael@0 16 }
michael@0 17
michael@0 18 var fourbeediv = document.getElementById("fourbee");
michael@0 19 parent = fourbeediv.parentNode;
michael@0 20
michael@0 21 for (var i = 2; i <= 3; i++) {
michael@0 22 var newdiv = document.createElement("div");
michael@0 23 newdiv.appendChild(document.createTextNode(i + "b"));
michael@0 24 parent.insertBefore(newdiv, fourbeediv);
michael@0 25 }
michael@0 26
michael@0 27 document.body.offsetHeight;
michael@0 28 document.documentElement.className = "";
michael@0 29 }
michael@0 30 </script>
michael@0 31
michael@0 32 </head>
michael@0 33 <body onload="boom();">
michael@0 34 <div>
michael@0 35 <div>1a</div>
michael@0 36 <div id="foureh">4a</div>
michael@0 37 <div>5a</div>
michael@0 38 </div>
michael@0 39 <div>
michael@0 40 <div>1b</div>
michael@0 41 <div id="fourbee">4b</div>
michael@0 42 <div>5b</div>
michael@0 43 </div>
michael@0 44 </body>
michael@0 45 </html>

mercurial