blob: db01c8fb63a0f0abb729c28b35c91d56a8122716 [file] [log] [blame]
<html>
<head>
<script>
function simulateDragClick(x, y) {
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown();
eventSender.mouseMoveTo(x + 5, y + 5);
eventSender.mouseUp();
}
function runTest() {
if (!window.testRunner) {
alert('this test can only be run by DumpRenderTree.')
return;
}
if (window.testRunner)
testRunner.dumpAsText();
var checkbox = document.getElementById('checkbox');
var radio = document.getElementById('radio');
simulateDragClick(15, 15);
simulateDragClick(15, 30);
if (checkbox.value == 'on' && radio.value == 'on');
document.getElementById('result').innerHTML = "SUCCESS";
}
</script>
</head>
<body onload="runTest()">
<div><input id="checkbox" type="checkbox"></div>
<div><input name="test" id="radio" type="radio"></div>
<div>This tests that check boxes and radio buttons can be toggled even if the mouse is moved between the button press and release. If the test is successful, the text "SUCCESS" should be shown below.</div>
<div id="result">FAILURE</div>
</body>
</html>