summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/input-step-as-double.html
blob: 19cd4d630b407a0405669f468b22691b674fcfa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
description('Test for a capturing spec change to consider .2 as valid real number for step');

var parent = document.createElement('div');
document.body.appendChild(parent);
parent.innerHTML = '<input type=number id=number value=0 step=".5">';
var numberInput = document.getElementById('number');
numberInput.focus();

if (window.eventSender) {
    // Move the cursor on the upper button of the input field.
    eventSender.mouseMoveTo(numberInput.offsetLeft + numberInput.offsetWidth - 10, numberInput.offsetTop + numberInput.offsetHeight / 4);

    eventSender.mouseDown();
    eventSender.mouseUp();
    shouldBe('numberInput.value', '"0.5"');

    parent.innerHTML = '';
} else {
    document.getElementById('console').innerHTML = '<p>No eventSender. <p>Manual test instruction: Click the upper button of the input field.  Confirm that the input field value is 0.5';
}

</script>
</body>
</html>