Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLAnchorElement / anchor-nodownload.html
blobde2e98d2f40a5660408438456d3470d84fe8f516
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script type='text/javascript'>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
9 </script>
10 </head>
11 <body>
12 <a id="blob-url">Blob URL</a>
13 <script>
14 function click(elmt)
16 if (!window.eventSender) {
17 alert('Click the link to run the test.');
18 return;
20 eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
21 eventSender.mouseDown();
22 eventSender.mouseUp();
25 function runTest()
27 var string = "<!doctype html><html><head><title>Title</title><script>if (window.testRunner) testRunner.dumpAsText(); </" + "script></head><body>PASS</body><script>if (window.testRunner) testRunner.notifyDone();</scr" + "ipt></html>";
28 var blob = new Blob([string], {type: "text/html"});
29 var link = document.getElementById("blob-url");
30 link.href = window.URL.createObjectURL(blob);
31 click(link);
33 runTest();
34 </script>
35 </body>
36 </html>