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.

     1 <html class="reftest-wait">
     2 <head>
     4 <script>
     5 function boom()
     6 {
     7   document.body.offsetHeight;
     9   var fourehdiv = document.getElementById("foureh");
    10   var parent = fourehdiv.parentNode;
    12   for (var i = 2; i <= 3; i++) {
    13     var newdiv = document.createElement("div");
    14     newdiv.appendChild(document.createTextNode(i + "a"));
    15     parent.insertBefore(newdiv, fourehdiv);
    16   }
    18   var fourbeediv = document.getElementById("fourbee");
    19   parent = fourbeediv.parentNode;
    21   for (var i = 2; i <= 3; i++) {
    22     var newdiv = document.createElement("div");
    23     newdiv.appendChild(document.createTextNode(i + "b"));
    24     parent.insertBefore(newdiv, fourbeediv);
    25   }
    27   document.body.offsetHeight;
    28   document.documentElement.className = "";
    29 }
    30 </script>
    32 </head>
    33 <body onload="boom();">
    34 <div>
    35   <div>1a</div>
    36   <div id="foureh">4a</div>
    37   <div>5a</div>
    38 </div>
    39 <div>
    40   <div>1b</div>
    41   <div id="fourbee">4b</div>
    42   <div>5b</div>
    43 </div>
    44 </body>
    45 </html>

mercurial