| <script src="../resources/magnitude-perf.js"></script> |
| document.designMode = 'on'; |
| function placeSelectionAfterFirstBr() |
| var children = document.body.childNodes; |
| for (var i = 0, len = children.length; i < len; i++) { |
| if (children[i].localName == 'br') { |
| window.getSelection().setBaseAndExtent(document.body, i, document.body, i); |
| function setupFunction(magnitude) |
| document.body.innerHTML = new Array(magnitude + 1).join('a<br>'); |
| placeSelectionAfterFirstBr(); |
| eventSender.keyDown('z'); |
| Magnitude.description("Tests that typing at the end of a line where the line-breaks are all BRs is linear in the number of lines."); |
| Magnitude.run(setupFunction, test, Magnitude.LINEAR); |