<!DOCTYPE html>
<meta name=fuzzy content="maxDifference=0-3; totalPixels=0-1000">
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../resources/testdriver.js"></script>
<script src="../../../resources/testdriver-vendor.js"></script>
<script src="../resources/common.js"></script>
<script src="../resources/picker-common.js"></script>
<script src="../calendar-picker/resources/calendar-picker-common.js"></script>
<input type="time" id="time" value="23:15" step="2">
<script>
let t = async_test('Test select invalid 12PM value in time popup');
function selectValue() {
let timeElement = document.getElementById("time");
timeElement.addEventListener("change", t.step_func_done(() => {
assert_equals(timeElement.value, "12:17:05");
assert_true(timeElement.validity.stepMismatch);
assert_false(timeElement.validity.valid);
}));
clickTimeCellAt(0, 1);
clickTimeCellAt(1, 2);
clickTimeCellAt(2, 5);
eventSender.keyDown('Enter');
}
t.step(() => {
openPicker(document.getElementById('time'))
.then(t.step_func(selectValue));
});
</script>