4 body { margin: 10; padding: 0 }
9 <script type="text/javascript">
11 var console_messages = document.createElement("ol");
15 var item = document.createElement("li");
16 item.appendChild(document.createTextNode(message));
17 console_messages.appendChild(item);
20 if (window.layoutTestController) {
24 layoutTestController.dumpAsText();
26 window.getSelection().setPosition(document.body, 0);
28 log(textInputController.firstRectForCharacterRange(0, 0)); // caret at the beginning
29 log(textInputController.firstRectForCharacterRange(1, 0)); // caret after the first character
30 log(textInputController.firstRectForCharacterRange(6, 0)); // caret at the end of line
31 log(textInputController.firstRectForCharacterRange(6, 100)); // -"-
32 log(textInputController.firstRectForCharacterRange(0, 1)); // first character
33 log(textInputController.firstRectForCharacterRange(5, 1)); // last character
34 log(textInputController.firstRectForCharacterRange(5, 2)); // -"-
35 log(textInputController.firstRectForCharacterRange(5, 100)); // -"-
36 log(textInputController.firstRectForCharacterRange(0, 6)); // first line
37 log(textInputController.firstRectForCharacterRange(0, 7)); // -"-
38 log(textInputController.firstRectForCharacterRange(0, 4294967295)); // -"-
39 log(textInputController.firstRectForCharacterRange(1, 4294967295)); // first line without the first character
40 log(textInputController.firstRectForCharacterRange(7, 0)); // out of bounds, should be zero rect
41 log(textInputController.firstRectForCharacterRange(1000, 0)); // -"-
42 log(textInputController.firstRectForCharacterRange(7, 1)); // -"-
43 log(textInputController.firstRectForCharacterRange(7, 4294967295)); // -"-
46 log("Exception: " + ex.description);
49 var console = document.createElement("p");
50 console.appendChild(console_messages);
51 document.body.appendChild(console);
54 document.write("(cannot run interactively)");