blob: eb48cc059d78f0c0197ee12f61f1f5508a2c788b [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 the filename from the Content-Disposition header is used even if a download attribute is specified in HTML.</p>
<p>The suggested filename above should be "PASS.txt" (with extension) and the download should succeed.</p>
<a id="download-url" href="resources/content-disposition-pass-no-extension-text-plain.py" download="FAIL.txt">Link with download attribute.</a>
<script>
function click(elmt)
{
if (!window.eventSender) {
alert('Click the link to run the test.');
return;
}
UIHelper.activateAt(elmt.offsetLeft + 5, elmt.offsetTop + 5);
}
function runTest()
{
var link = document.getElementById("download-url");
click(link);
}
runTest();
</script>
</body>
</html>