| testRunner.dumpEditingCallbacks(); |
| var li = document.createElement("li"); |
| li.appendChild(document.createTextNode(str)); |
| var console = document.getElementById("console"); |
| window.testRunner.dumpAsText(); |
| var selection = window.getSelection(); |
| var bodyElement = document.getElementById("test"); |
| var htmlElement = bodyElement.parentNode; |
| if (selection.setBaseAndExtent) |
| selection.setBaseAndExtent(bodyElement, 1, htmlElement, 2); |
| throw("Couldn't set a selection."); |
| if (selection.toString) { |
| var string = selection.toString(); |
| throw("toString returned unexpected result: \"" + string.replace("\n", "\\n") + "\""); |
| throw("Selection::toString() not supported"); |
| log("Test Failed. Error was: " + e); |
| <body id="test" contenteditable>aaaa<object></object><div>bbbb</div> |
| <script>runTest();</script> |