blob: 8ec78049048e8ec991ac72d1ec3db42ee70868cd [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setShouldLogDownloadCallbacks(true);
testRunner.waitUntilDownloadFinished();
}
</script>
</head>
<body>
<p>The suggested filename above should be "image.png" and the download should succeed.</p>
<a id="download-url" href="/css/resources/abe.png" download="image">Link with download attribute.</a>
<script>
function click(elmt)
{
if (!window.eventSender) {
alert('Click the link to run the test.');
return;
}
eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
eventSender.mouseDown();
eventSender.mouseUp();
}
function runTest()
{
var link = document.getElementById("download-url");
click(link);
}
runTest();
</script>
</body>
</html>