chromium/third_party/blink/web_tests/fast/forms/calendar-picker/date-picker-open-without-focus.html

<!DOCTYPE html>
<meta name=fuzzy content="maxDifference=0-3; totalPixels=0-1000">

<script src="../../../resources/js-test.js"></script>
<script src="../resources/picker-common.js"></script>
<div id="parent"><input type="date" id="input"></div>
<script>
description('Calender picker should not open when the owner element has no focus.');
var input = document.getElementById('input');
input.focus();
eventSender.keyDown("ArrowDown", ["altKey"]);
input.blur();
if (internals.pagePopupWindow) {
    testFailed('Popup is still open after blur().');
} else {
    testPassed('Popup was closed by blur().');
}
input.focus();
input.remove();
input.offsetTop;
eventSender.keyDown("ArrowDown", ["altKey"]);
if (internals.pagePopupWindow) {
    testFailed('Popup was opened.');
    finishJSTest();
} else {
    testPassed('Popup did not open.');
    finishJSTest();
}
</script>