blob: e5d5530f1c4a6abdf45753e7f4658eeded22919f [file] [edit]
<!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');
window.jsTestIsAsync = true;
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;
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';
}
finishJSTest();
}
</script>
</body>
</html>