Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLAnchorElement / anchor-nodownload-set.html
blobdd561e796188f0f41a77d0a079fdc7083e274003
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 link.setAttribute('download', '');
32 click(link);
34 runTest();
35 </script>
36 </body>
37 </html>