blob: c7e48103e0f5705577fd36cfa07d0a54098aa5a6 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
<style type="text/css">
#box {
background-color:blue;
width:100px;
height:100px;
}
</style>
</head>
<body>
<div id="box" ontouchstart=""></div>
<div><input type="number" id="number" value="1"></div>
<script>
description('Test if a spin-button works correctly after touch events.');
if (window.eventSender) {
eventSender.addTouchPoint(50, 50);
eventSender.touchStart();
var numberInput = document.getElementById('number');
eventSender.mouseMoveTo(numberInput.offsetLeft + numberInput.offsetWidth - 10, numberInput.offsetTop + numberInput.offsetHeight / 4);
eventSender.mouseDown();
eventSender.mouseUp();
shouldBe('numberInput.value', '"2"');
} else {
debug('Needs eventSender.');
}
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>