| OLD | NEW |
| 1 <body> | 1 <body> |
| 2 This test passes if alert() is not called. | 2 This test passes if alert() is not called. |
| 3 <script> | 3 <script> |
| 4 if (window.layoutTestController) { | 4 if (window.layoutTestController) { |
| 5 layoutTestController.dumpAsText(); | 5 layoutTestController.dumpAsText(); |
| 6 layoutTestController.waitUntilDone(); | 6 layoutTestController.waitUntilDone(); |
| 7 } | 7 } |
| 8 | 8 |
| 9 i = document.body.appendChild(document.createElement("iframe")); | 9 i = document.body.appendChild(document.createElement("iframe")); |
| 10 f = frames[0].eval('(function(){location="javascript:alert(location)"})'); | 10 f = frames[0].eval('(function(){location="javascript:alert(location)"})'); |
| 11 i.src = "http://localhost:8000/security/resources/innocent-victim.html"; | 11 i.src = "http://localhost:8000/security/resources/innocent-victim.html"; |
| 12 i.addEventListener("load", f); | 12 i.addEventListener("load", f); |
| 13 i.addEventListener("load", function() { | 13 i.addEventListener("load", function() { |
| 14 if (window.layoutTestController) | 14 if (window.layoutTestController) |
| 15 layoutTestController.notifyDone(); | 15 layoutTestController.notifyDone(); |
| 16 }); | 16 }); |
| 17 </script> | 17 </script> |
| OLD | NEW |