darin@chromium.org | cb4788a | 2010-03-22 18:17:18 +0000 | [diff] [blame] | 1 | <script> |
| 2 | if (parent == window) { |
rniwa@webkit.org | 03b9c6d | 2012-07-16 01:41:53 +0000 | [diff] [blame] | 3 | if (window.testRunner) { |
| 4 | testRunner.dumpAsText(); |
| 5 | testRunner.waitUntilDone(); |
darin@chromium.org | cb4788a | 2010-03-22 18:17:18 +0000 | [diff] [blame] | 6 | } |
| 7 | function replaceHash(frag) { |
| 8 | frames[0].location.replace('#' + frag); |
| 9 | } |
| 10 | onload = function() { |
| 11 | var f = document.createElement("iframe"); |
| 12 | f.src = location; |
| 13 | f.onload = function() { |
| 14 | delete f.onload; |
| 15 | replaceHash('bar'); |
rniwa@webkit.org | 03b9c6d | 2012-07-16 01:41:53 +0000 | [diff] [blame] | 16 | if (window.testRunner) |
| 17 | testRunner.notifyDone(); |
darin@chromium.org | cb4788a | 2010-03-22 18:17:18 +0000 | [diff] [blame] | 18 | } |
| 19 | document.body.appendChild(f); |
| 20 | replaceHash('foo'); |
| 21 | } |
| 22 | } |
| 23 | </script> |
| 24 | <!-- If we do not crash, then this test was successful. --> |
| 25 | <body>PASS</body> |