blob: 070b108e36f76d8be2e0ae433e4dee088ca59890 [file] [log] [blame]
<script>
function log(msg)
{
document.getElementById("console").appendChild(document.createTextNode(msg + "\n"));
}
if (window.testRunner)
testRunner.dumpEditingCallbacks();
</script>
This tests to see that a caret is placed inside an editable document that is entirely editable even when no caret is requested programmatically. We do this as a convenience. Right now, we only do this convenience when a document's frame becomes first responder or when a document's window becomes key.
<pre id="console"></pre>
<script>
document.designMode = "on";
if (window.testRunner) {
window.testRunner.waitUntilDone();
window.testRunner.setMainFrameIsFirstResponder(false);
window.testRunner.setMainFrameIsFirstResponder(true);
var sel = window.getSelection();
if (sel.anchorNode && sel.anchorNode == sel.focusNode && sel.anchorOffset == sel.focusOffset)
log("Test Passed");
else
log("Test Failed - there should be a caret\n");
window.testRunner.notifyDone();
}
</script>