layout/reftests/table-dom/insertCaptionsAndRows4.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/table-dom/insertCaptionsAndRows4.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +<html class="reftest-wait">
     1.5 +<head>
     1.6 +
     1.7 +<style>
     1.8 + caption { color: green }
     1.9 +</style>
    1.10 +
    1.11 +<script>
    1.12 +function boom()
    1.13 +{
    1.14 +  document.body.offsetHeight;
    1.15 +
    1.16 +  var table = document.getElementById("table");
    1.17 +  var tbody = document.getElementById("tbody");
    1.18 +
    1.19 +  var newtbody = document.createElement("tbody");
    1.20 +  var newrow = document.createElement("tr");
    1.21 +  var newcell = document.createElement("td");
    1.22 +  newcell.appendChild(document.createTextNode("a new row 1"));
    1.23 +  newrow.appendChild(newcell);
    1.24 +  newtbody.appendChild(newrow);
    1.25 +  table.insertBefore(newtbody, tbody);
    1.26 +
    1.27 +  var caption = document.createElement("caption");
    1.28 +  caption.appendChild(document.createTextNode("this is a caption that you shouldn't see"));
    1.29 +  table.insertBefore(caption, tbody);
    1.30 +
    1.31 +  newtbody = document.createElement("tbody");
    1.32 +  newrow = document.createElement("tr");
    1.33 +  newcell = document.createElement("td");
    1.34 +  newcell.appendChild(document.createTextNode("a new row 2"));
    1.35 +  newrow.appendChild(newcell);
    1.36 +  newtbody.appendChild(newrow);
    1.37 +  table.insertBefore(newtbody, tbody);
    1.38 +
    1.39 +  document.body.offsetHeight;
    1.40 +  document.documentElement.className = "";
    1.41 +}
    1.42 +</script>
    1.43 +
    1.44 +</head>
    1.45 +<body onload="boom();">
    1.46 +<table id="table">
    1.47 +<caption>this is the caption</caption>
    1.48 +<tbody id="tbody"><tr><td>a row</td></tr></tbody>
    1.49 +</table>
    1.50 +</body>
    1.51 +</html>

mercurial