blob: 5310879d1a301c778c2307a2f712ab4e406ca802 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setShouldLogDownloadCallbacks(true);
testRunner.waitUntilDownloadFinished();
}
</script>
</head>
<body>
<p>
Tests that a suggested filename on a download attribute is allowed if
<a id="dl" href="/media/resources/test.pdf" download="foo.pdf">the link</a> is in the same origin.
<p>
The suggested filename at the top should be foo.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>