| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script> | 2 <script> |
| 3 function key(evt) | 3 function key(evt) |
| 4 { | 4 { |
| 5 window.open("about:blank"); | 5 window.open("about:blank"); |
| 6 evt.preventDefault(); | 6 evt.preventDefault(); |
| 7 } | 7 } |
| 8 | 8 |
| 9 function test() | 9 function test() |
| 10 { | 10 { |
| 11 if (window.testRunner) { | 11 if (window.testRunner) { |
| 12 testRunner.dumpAsText(); | 12 testRunner.dumpAsText(); |
| 13 testRunner.dumpNavigationPolicy(); | 13 testRunner.dumpNavigationPolicy(); |
| 14 var a = document.querySelector("#link"); | 14 var a = document.querySelector("#link"); |
| 15 a.addEventListener('click', key); | 15 a.addEventListener('click', key); |
| 16 a.focus(); | 16 a.focus(); |
| 17 eventSender.keyDown("\n", ["altKey"]); | 17 eventSender.keyDown("Enter", ["altKey"]); |
| 18 } | 18 } |
| 19 } | 19 } |
| 20 </script> | 20 </script> |
| 21 <body onload="test()"> | 21 <body onload="test()"> |
| 22 <p>Tests that hitting alt-enter doesn't force a download if the navigation is tr
iggered by script.</p> | 22 <p>Tests that hitting alt-enter doesn't force a download if the navigation is tr
iggered by script.</p> |
| 23 <a href="about:blank" id="link">link</a> | 23 <a href="about:blank" id="link">link</a> |
| 24 </body> | 24 </body> |
| OLD | NEW |