blob: 591e0a8079e1a84abc1d1cf2c6ef915a234afc18 [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="data:application/octet-stream,Hello" download="foo.pdf">the link</a> is a data URL.
<p>The suggested filename at the top should be foo.pdf.</p>
<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>