layout/reftests/table-dom/insertCaptionsAndRows1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/table-dom/insertCaptionsAndRows1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,45 @@
     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 +
    1.18 +  var newtbody = document.createElement("tbody");
    1.19 +  var newrow = document.createElement("tr");
    1.20 +  var newcell = document.createElement("td");
    1.21 +  newcell.appendChild(document.createTextNode("a new row 2"));
    1.22 +  newrow.appendChild(newcell);
    1.23 +  newtbody.appendChild(newrow);
    1.24 +  table.insertBefore(newtbody, table.firstChild);
    1.25 +
    1.26 +  var caption = document.createElement("caption");
    1.27 +  caption.appendChild(document.createTextNode("this is the caption"));
    1.28 +  table.insertBefore(caption, table.firstChild);
    1.29 +
    1.30 +  newtbody = document.createElement("tbody");
    1.31 +  newrow = document.createElement("tr");
    1.32 +  newcell = document.createElement("td");
    1.33 +  newcell.appendChild(document.createTextNode("a new row 1"));
    1.34 +  newrow.appendChild(newcell);
    1.35 +  newtbody.appendChild(newrow);
    1.36 +  table.insertBefore(newtbody, table.firstChild);
    1.37 +
    1.38 +  document.body.offsetHeight;
    1.39 +  document.documentElement.className = "";
    1.40 +}
    1.41 +</script>
    1.42 +
    1.43 +</head>
    1.44 +<body onload="boom();">
    1.45 +<table id="table">
    1.46 +</table>
    1.47 +</body>
    1.48 +</html>

mercurial