| <!DOCTYPE html> |
| <html> |
| <head> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| 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> |