layout/reftests/table-dom/insertCaptionsAndRows3.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">
     2 <head>
     4 <style>
     5  caption { color: green }
     6 </style>
     8 <script>
     9 function boom()
    10 {
    11   document.body.offsetHeight;
    13   var table = document.getElementById("table");
    14   var cap = document.getElementById("cap");
    16   var newtbody = document.createElement("tbody");
    17   var newrow = document.createElement("tr");
    18   var newcell = document.createElement("td");
    19   newcell.appendChild(document.createTextNode("a new row 1"));
    20   newrow.appendChild(newcell);
    21   newtbody.appendChild(newrow);
    22   table.insertBefore(newtbody, cap);
    24   var caption = document.createElement("caption");
    25   caption.appendChild(document.createTextNode("this is the caption"));
    26   table.insertBefore(caption, cap);
    28   newtbody = document.createElement("tbody");
    29   newrow = document.createElement("tr");
    30   newcell = document.createElement("td");
    31   newcell.appendChild(document.createTextNode("a new row 2"));
    32   newrow.appendChild(newcell);
    33   newtbody.appendChild(newrow);
    34   table.insertBefore(newtbody, cap);
    36   document.body.offsetHeight;
    37   document.documentElement.className = "";
    38 }
    39 </script>
    41 </head>
    42 <body onload="boom();">
    43 <table id="table">
    44 <caption id="cap">this is a caption that you shouldn't see</caption>
    45 <tbody><tr><td>a row</td></tr></tbody>
    46 </table>
    47 </body>
    48 </html>

mercurial