<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner)
    testRunner.dumpAsText(true); // Dump pixel test result.
</script>
</head>
<body>
<!-- The output of this test is only meaningful as a pixel test result because form controls have a platform-specific look-and-feel. -->
<!-- You can run this test either in DRT as a pixel test or by hand. -->
<div id="description">
<p>This tests that pressing on the file input button visually changes its appearance. For instance, when pressed, the button will have an Aqua background color when using the Blue appearance (System Preferences > General) on OS X.</p>
<p>To run this test manually, click and hold on the input file button (below). This test PASSED if the button visually highlights when pressed. Otherwise, it FAILED.</p>
</div>
<input type="file" id="file">
<script>
if (window.eventSender) {
    // Remove the descriptive text so as minimize pixel differences due to discrepancies in font rendering.
    document.body.removeChild(document.getElementById("description"));

    var file = document.getElementById("file");
    var x = file.offsetLeft + 10;
    var y = file.offsetTop + 10;
    eventSender.mouseMoveTo(x, y);
    eventSender.mouseDown();
}
</script>
</body>
</html>
