<!DOCTYPE html> | |
<html> | |
<body> | |
<p>This test checks that clicking on an file input field opens up a file picker.<br> | |
To manually test, click on the button below. WebKit should open a file picker.</p> | |
<input type=file> | |
<script> | |
if (window.internals && window.eventSender) { | |
testRunner.dumpAsText(); | |
document.write('Test passes if "OPEN FILE PANEL" is logged above.'); | |
var input = document.querySelector('input'); | |
var shadow = internals.shadowRoot(input); | |
var button = shadow.querySelector('input'); | |
eventSender.mouseMoveTo(button.offsetLeft + 10, button.offsetTop + 10); | |
eventSender.mouseDown(); | |
eventSender.mouseUp(); | |
} | |
</script> | |
</body> | |
</html> |