7 testRunner
.dumpAsText();
9 var ta
= document
.getElementById('ta');
11 ta
.setSelectionRange(4, 16);
14 if (window
.eventSender
) {
15 eventSender
.keyDown("pageDown",["shiftKey"]);
16 lastSelectedLine
= (ta
.value
).substring(ta
.selectionEnd
- 4, ta
.selectionEnd
);
17 eventSender
.keyDown("upArrow",["shiftKey"]);
21 var selectedText
= (ta
.value
).substring(ta
.selectionStart
, ta
.selectionEnd
);
22 if ((selectedText
.indexOf(lastSelectedLine
) == -1) && (selectedText
.indexOf('L01') == -1))
23 result
= "SUCCESS: The selection shrunk correctly";
25 result
= "SUCCESS: The selected text is \"" + selectedText
+ "\".";
26 document
.getElementById("result").firstChild
.data
= result
;
30 <body onload=
"runTest()">
31 <p>This tests shrinking a selection with shift-up after extending it with shift-PageDown.
</p>
32 <p style=
"color:green">
33 This test does not run interactively.
34 It uses the event sender to do mouse clicks.
35 To run it manually, press shift-PagDown. Then press shift-up.
36 The selection should shrink by one line from the bottom after shift-up.
38 <textarea rows=
10 id=
"ta">
56 <p id=
"result">TEST HAS NOT RUN
</p>