| <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> |
| <html> |
| <meta name="viewport" content="width=device-width"> |
| <head> |
| <script src="../../../resources/js-test.js"></script> |
| <script src="../../../resources/ui-helper.js"></script> |
| <script> |
| jsTestIsAsync = true; |
| |
| async function runTest() { |
| description(`This test verifies that the time picker is presented and can be used to choose a time. To manually run the test, tap the time input to show the time picker, and then select '9:41 am'.`); |
| |
| time = document.querySelector("input"); |
| time.addEventListener("change", () => testPassed("Handled change event")); |
| time.addEventListener("blur", () => testPassed("Handled blur event")); |
| |
| if (!window.testRunner) |
| return; |
| |
| await UIHelper.activateElementAndWaitForInputSession(time); |
| await UIHelper.setTimePickerValue(9, 41); |
| await UIHelper.waitForKeyboardToHide(); |
| shouldBe("time.value", "'09:41'"); |
| finishJSTest(); |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <input type="time" value="04:01" style="width: 320px; height: 100px;"></input> |
| </body> |
| </html> |