| <script src="../resources/magnitude-perf.js"></script> |
| var sandbox = document.getElementById('sandbox'); |
| // Check that table.rows.length is properly cached. |
| function setupTableRows(magnitude) |
| sandbox.removeChild(sandbox.firstChild); |
| table = document.createElement('table'); |
| for (var i = 0; i < magnitude; ++i) { |
| var tr = document.createElement('tr'); |
| sandbox.appendChild(table); |
| // Make sure we have cached the length before testing! |
| function testTableRows(magnitude) |
| Magnitude.description('Tests that check that table.row.length is properly cached'); |
| Magnitude.run(setupTableRows, testTableRows, Magnitude.CONSTANT); |
| sandbox.removeChild(sandbox.firstChild); |