<html> | |
<head> | |
<script> | |
function test() | |
{ | |
document.getElementById('sp').focus(); | |
if (window.testRunner) { | |
testRunner.dumpAsText(); | |
} | |
document.execCommand("InsertText", false, 'Test'); | |
if (document.getElementById('sp').value == "Test") { | |
document.getElementById('result').innerHTML = "Passed"; | |
} | |
} | |
</script> | |
</head> | |
<body onload="test()"> | |
This test changes the value of the text field by simulating typing, and then gets the value. | |
<br><br> | |
<input type="text" id="sp" style="-khtml-appearance:textfield"></input> | |
<div id="result"> | |
Failed | |
</div> | |
</body> | |
</html> |