ladybird/Tests/LibWeb/Text/input/HTML/HTMLInputElement-invalid-time-digits.html
Glenn Skrzypczak 9c758e5f65 LibWeb/HTML: Correctly parse milliseconds in time inputs
This commit brings the way we parse time inputs closer to the spec by
no longer ignoring milliseconds in time strings.
2025-04-19 07:09:36 -04:00

13 lines
448 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
const inputElement = document.createElement("input");
inputElement.type = "time";
["invalid", "xx:34:56", "12:xx:56", "12:34:xx", "12:34:60"].forEach(value => {
inputElement.value = value;
println(`Parsed ${value} as ${inputElement.valueAsNumber}`);
});
println("PASS (didn't crash)");
});
</script>