blob: b309225183e0d2167b52eb4d9513707f34260f72 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<head>
<meta name="viewport" content="width=device-width">
<script src="/js-test-resources/ui-helper.js"></script>
<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;
UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
}
function runTest()
{
var link = document.getElementById("dl");
click(link);
}
runTest();
</script>
</body>
</html>