| <p>This tests Selection::rangeCount. You should see "Hello World" selected below. You should not see any failures below.</p> |
| <div id="div" contenteditable="true">Hello World</div> |
| var li = document.createElement("li"); |
| li.appendChild(document.createTextNode(str)); |
| var console = document.getElementById("console"); |
| window.testRunner.dumpAsText(); |
| var div = document.getElementById("div"); |
| var text = div.firstChild; |
| var sel = window.getSelection(); |
| if (sel.rangeCount == undefined) { |
| log("Selection::rangeCount not implemented."); |
| log("Failure. Expected: rangeCount == 0, Found: " + sel.rangeCount); |
| sel.setPosition(text, 0); |
| log("Failure. Expected: rangeCount == 1, Found: " + sel.rangeCount); |
| document.execCommand("SelectAll"); |
| log("Failure. Expected: rangeCount == 1, Found: " + sel.rangeCount); |