<script>
if (window.testRunner) {
    testRunner.waitUntilDone();
    testRunner.dumpAsText();
}

addEventListener('change', function(e) {
    document.body.appendChild(document.getElementById('frame1'));
}, false);

var didStartTest = false;
function startTest() {
    if (didStartTest)
        return;
    didStartTest = true;;
    frame1.innerInput.focus();
    outerInput.focus();
    document.execCommand('inserttext', false, 'abc');
    frame1.innerInput.focus();
    document.body.appendChild(document.createTextNode('PASS'));
    testRunner.notifyDone();
}
</script>
<div>
 <input value="foo" id="outerInput">
 <iframe onload="startTest()" id="frame1" name="frame1" height="100" width="540" srcdoc="&lt;input id='innerInput'>"></iframe>
</div>
