blob: 234d58d2e36b18da817e3d1d0e6c5f47203b2dd3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.waitUntilDone();
}
</script>
</head>
<body>
<p>Clicking the download link link and then the non-download link should not cause a second download.</p>
<p>This test passes if it does not time out.</p>
<a id="download-url" href='data:text/html,HelloWorld!' download="test.html">Link with download attribute.</a>
<a id="non-download-url" href="/misc/resources/success-notify-done.html" target="_blank">Link without download attribute.</a>
<script>
function runTest()
{
var downloadLink = document.getElementById("download-url");
var nonDownloadLink = document.getElementById("non-download-url");
downloadLink.click();
setTimeout(function() {
nonDownloadLink.click();
}, 0);
}
runTest();
</script>
</body>
</html>