blob: 5ad0dd337687d8466649a942c0f5c8b9649801c3 [file] [log] [blame] [edit]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.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');
onload = async () => {
if (!window.testRunner)
return;
testRunner.waitUntilDone();
if (window.eventSender) {
// Move the cursor on the upper button of the input field.
await eventSender.asyncMouseMoveTo(numberInput.offsetLeft + numberInput.offsetWidth - 10, numberInput.offsetTop + numberInput.offsetHeight / 4);
await eventSender.asyncMouseDown();
await eventSender.asyncMouseUp();
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';
}
testRunner.notifyDone();
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>