OLD | NEW |
1 <html> | 1 <html> |
2 <script> | 2 <script> |
3 if (window.testRunner) | 3 if (window.testRunner) |
4 testRunner.dumpAsText(); | 4 testRunner.dumpAsText(); |
5 | 5 |
6 window.onmessage = function(evt) | 6 window.onmessage = function(evt) |
7 { | 7 { |
8 if (evt.data == "setHistoryLength") { | 8 if (evt.data == "setHistoryLength") { |
9 setHistoryLength(); | 9 setHistoryLength(); |
10 return; | 10 return; |
11 } else | 11 } else |
12 alert("Unknown message."); | 12 alert("Unknown message."); |
13 } | 13 } |
14 | 14 |
15 function setHistoryLength() | 15 function setHistoryLength() |
16 { | 16 { |
17 alert("Attempting to clear parent window's history object:"); | 17 alert("Attempting to clear parent window's history object:"); |
18 parent.window.history = ""; | 18 try { |
| 19 parent.window.history = ""; |
| 20 } catch (e) { |
| 21 alert("PASS: access to parent.window.history threw an exception."); |
| 22 } |
19 parent.window.postMessage("done", "*"); | 23 parent.window.postMessage("done", "*"); |
20 } | 24 } |
21 | 25 |
22 </script> | 26 </script> |
23 <body> | 27 <body> |
24 HELLO THERE | 28 HELLO THERE |
25 </body> | 29 </body> |
26 </html> | 30 </html> |
OLD | NEW |