chromium/content/test/data/download/download-link.html

<!DOCTYPE html>
<html>
<body>
<a href="">link</a>
<script>
  var anchorElement = document.querySelector('a');
  url = window.location.href;
  anchorElement.href = url.substr(url.indexOf('=') + 1);
  anchorElement.click();
</script>
</body>
</html>