2 <script src="../resources/magnitude-perf.js"></script>
4 document.designMode = 'on';
6 function placeSelectionAfterFirstBr()
8 var children = document.body.childNodes;
9 for (var i = 0, len = children.length; i < len; i++) {
10 if (children[i].localName == 'br') {
11 window.getSelection().setBaseAndExtent(document.body, i, document.body, i);
17 function setupFunction(magnitude)
19 document.body.innerHTML = new Array(magnitude + 1).join('a<br>');
20 placeSelectionAfterFirstBr();
23 function test(magnitude)
25 if (window.eventSender)
26 eventSender.keyDown('z');
29 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.");
30 Magnitude.run(setupFunction, test, Magnitude.LINEAR);