blob: 32d3d21ac8aaffaecf49fa7679cb3c0bcc708f55 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setShouldLogDownloadCallbacks(true);
testRunner.waitUntilDownloadFinished();
}
</script>
</head>
<body>
<p>
Tests that download redirects are reported to the client.
<a id="dl" href="/resources/redirect.php?url=/media/resources/test.pdf" download="foo.pdf">the link</a>.
<p>
The suggested filename at the top should be foo.pdf and you should see a redirect to /media/resources/test.pdf.
<script>
function click(elmt)
{
if (!window.eventSender)
return;
eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
eventSender.mouseDown();
eventSender.mouseUp();
}
function runTest()
{
var link = document.getElementById("dl");
click(link);
}
runTest();
</script>
</body>
</html>