4 <div id='sandbox'></div>
5 <div id="console"></div>
6 <script src="../resources/magnitude-perf.js"></script>
10 testRunner.dumpAsText();
13 var sandbox = document.getElementById('sandbox');
15 // Check that table.rows.length is properly cached.
17 function setupTableRows(magnitude)
19 if (sandbox.firstChild)
20 sandbox.removeChild(sandbox.firstChild);
21 table = document.createElement('table');
23 for (var i = 0; i < magnitude; ++i) {
24 var tr = document.createElement('tr');
25 table.appendChild(tr);
27 sandbox.appendChild(table);
29 // Make sure we have cached the length before testing!
33 function testTableRows(magnitude)
38 Magnitude.description('Tests that check that table.row.length is properly cached');
39 Magnitude.run(setupTableRows, testTableRows, Magnitude.CONSTANT);
40 sandbox.removeChild(sandbox.firstChild);