OLD | NEW |
1 <body onload="test()"> | 1 <body onload="test()"> |
2 <iframe src="http://localhost:8000/security/resources/innocent-victim-with-notif
y.html"></iframe> | 2 <iframe src="http://localhost:8000/security/resources/innocent-victim.html"></if
rame> |
3 <p>There should be no alert displayed.</p> | 3 <p>There should be no alert displayed.</p> |
4 <script> | 4 <script> |
5 if (window.testRunner) { | 5 if (window.testRunner) { |
6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
7 testRunner.waitUntilDone(); | 7 testRunner.waitUntilDone(); |
8 } | 8 } |
9 | 9 |
10 function test() | 10 function test() |
11 { | 11 { |
12 var i = document.getElementsByTagName("iframe")[0]; | 12 var i = document.getElementsByTagName("iframe")[0]; |
13 i.src = new Array(100).join('\x20') + 'javascript:alert(document.body.innerH
TML)'; | 13 i.src = new Array(100).join('\x20') + 'javascript:alert(document.body.innerH
TML)'; |
14 setTimeout(function() { | 14 setTimeout(function() { |
15 if (window.testRunner) | 15 if (window.testRunner) |
16 testRunner.notifyDone(); | 16 testRunner.notifyDone(); |
17 }, 0); | 17 }, 0); |
18 } | 18 } |
19 </script> | 19 </script> |
20 </body> | 20 </body> |
OLD | NEW |