OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="/js-test-resources/js-test.js"></script> |
| 5 <script type='text/javascript'> |
| 6 if (window.testRunner) { |
| 7 // The test will end when loadURLExternally() is invoked. |
| 8 testRunner.waitUntilExternalURLLoad(); |
| 9 } |
| 10 </script> |
| 11 </head> |
| 12 <body> |
| 13 <p> |
| 14 Tests that a suggested filename on a download attribute is ignored if |
| 15 <a id="dl" href="http://localhost:8080/security/resources/attachment.php" downlo
ad="foo.pdf">the link</a> is cross origin. |
| 16 <p> |
| 17 The suggested filename at the top should be empty. |
| 18 <script> |
| 19 function click(elmt) |
| 20 { |
| 21 if (!window.eventSender) { |
| 22 return; |
| 23 } |
| 24 eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5); |
| 25 eventSender.mouseDown(); |
| 26 eventSender.mouseUp(); |
| 27 } |
| 28 |
| 29 function runTest() |
| 30 { |
| 31 var link = document.getElementById("dl"); |
| 32 click(link); |
| 33 } |
| 34 runTest(); |
| 35 </script> |
| 36 </body> |
| 37 </html> |
OLD | NEW |