tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / dom / HTMLAnchorElement / anchor-nodownload-set.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script type='text/javascript'>
5 if (window.layoutTestController) {
6   layoutTestController.dumpAsText();
7   layoutTestController.waitUntilDone();
8 }
9 </script>
10 </head>
11 <body>
12 <a id="blob-url">Blob URL</a>
13 <script>
14 function click(elmt)
15 {
16     if (!window.eventSender) {
17         alert('Click the link to run the test.');
18         return;
19     }
20     eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
21     eventSender.mouseDown();
22     eventSender.mouseUp();
23 }
24
25 function runTest()
26 {
27     var bb = new WebKitBlobBuilder();
28     bb.append("<!doctype html><html><head><title>Title</title><script>if (window.layoutTestController) layoutTestController.dumpAsText(); </" + "script></head><body>PASS</body><script>if (window.layoutTestController) layoutTestController.notifyDone();</scr" + "ipt></html>");
29     var blob = bb.getBlob("text/html", "inline");
30     var link = document.getElementById("blob-url");
31     link.href = window.webkitURL.createObjectURL(blob);
32     link.setAttribute('download');
33     click(link);
34 }
35 runTest();
36 </script>
37 </body>
38 </html>
39