OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script type="text/javascript"> | 3 <script type="text/javascript"> |
4 var tab; | 4 var tab; |
5 function openWinIFrame() | 5 function openWinIFrame() |
6 { | 6 { |
7 tab = window.open("iframe_redirect_malware.html"); | 7 tab = window.open("iframe_redirect_malware.html"); |
8 } | 8 } |
9 | 9 |
10 function openMalware() | |
11 { | |
12 window.open("http://localhost"); | |
13 } | |
14 | |
15 function openWin() | 10 function openWin() |
16 { | 11 { |
17 tab = window.open("/server-redirect?http://localhost/files/safe_browsing/malwa
re.html"); | 12 tab = window.open("redirect_to_malware.html"); |
18 } | 13 } |
19 | 14 |
20 function stopWin() | 15 function stopWin() |
21 { | 16 { |
22 tab.stop(); | 17 tab.stop(); |
23 // This will trigger a navigation event. | 18 // This will trigger a navigation event. |
24 window.location = "http://localhost"; | 19 window.location = "/"; |
25 } | 20 } |
26 | 21 |
27 </script> | 22 </script> |
28 </head> | 23 </head> |
29 | 24 |
30 <body> | 25 <body> |
31 <form> | 26 <form> |
32 <input type=button value="Open Redirect Window" onclick="openWin()"> | 27 <input type=button value="Open Redirect Window" onclick="openWin()"> |
33 </form> | 28 </form> |
34 | 29 |
35 <form> | 30 <form> |
36 <input type=button value="Stop Window" onclick="stopWin()"> | 31 <input type=button value="Stop Window" onclick="stopWin()"> |
37 </form> | 32 </form> |
38 | |
39 <form> | |
40 <input type=button value="Open malware in tab" onclick="openMalware()"> | |
41 </form> | |
42 </body> | 33 </body> |
43 | 34 |
44 </html> | 35 </html> |
OLD | NEW |