chromium/third_party/blink/web_tests/http/tests/security/anchor-download-allow-data.html

<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
<script type='text/javascript'>
if (window.testRunner) {
  // The test will end when loadURLExternally() is invoked.
  testRunner.waitUntilExternalURLLoad();
}
</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.
<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>