ap | 4e77b91 | 2006-02-11 10:48:56 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 2 | "http://www.w3.org/TR/html4/loose.dtd"> |
| 3 | <html> |
| 4 | <head> |
| 5 | <script> |
| 6 | |
rniwa@webkit.org | ea3cf92 | 2012-06-22 06:52:33 +0000 | [diff] [blame] | 7 | if (window.testRunner) |
| 8 | testRunner.waitUntilDone(); |
ap | 4e77b91 | 2006-02-11 10:48:56 +0000 | [diff] [blame] | 9 | |
andersca | f92698c6 | 2007-07-06 17:08:50 +0000 | [diff] [blame] | 10 | function rightFrameLoaded() { |
| 11 | rightFrameLoadCount++; |
| 12 | if (rightFrameLoadCount == 2) { |
| 13 | // Console is set by runTest |
ap | 4e77b91 | 2006-02-11 10:48:56 +0000 | [diff] [blame] | 14 | console.firstChild.nodeValue = "SUCCESS"; |
andersca | f92698c6 | 2007-07-06 17:08:50 +0000 | [diff] [blame] | 15 | |
rniwa@webkit.org | ea3cf92 | 2012-06-22 06:52:33 +0000 | [diff] [blame] | 16 | if (window.testRunner) { |
andersca | f92698c6 | 2007-07-06 17:08:50 +0000 | [diff] [blame] | 17 | // Put the test result in the main document so we can dump as text |
| 18 | var text = console.ownerDocument.documentElement.innerHTML; |
| 19 | document.open(); |
| 20 | document.write(text); |
| 21 | document.close(); |
| 22 | |
rniwa@webkit.org | ea3cf92 | 2012-06-22 06:52:33 +0000 | [diff] [blame] | 23 | testRunner.dumpAsText(); |
| 24 | testRunner.notifyDone(); |
andersca | f92698c6 | 2007-07-06 17:08:50 +0000 | [diff] [blame] | 25 | } |
ap | 4e77b91 | 2006-02-11 10:48:56 +0000 | [diff] [blame] | 26 | } |
| 27 | } |
| 28 | |
andersca | f92698c6 | 2007-07-06 17:08:50 +0000 | [diff] [blame] | 29 | function runTest() { |
| 30 | console = document.getElementById("left_frame").contentWindow.document.getElementById("console"); |
| 31 | if (console.firstChild.nodeValue == "FAILURE") { |
| 32 | console.firstChild.nodeValue = "PROCESSING..."; |
| 33 | document.getElementById("right_frame").contentWindow.location.href = "resources/purple.html"; |
| 34 | } else { |
| 35 | alert('TEST FAILURE: Unexpected onload call') |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | rightFrameLoadCount = 0; |
ap | 4e77b91 | 2006-02-11 10:48:56 +0000 | [diff] [blame] | 40 | </script> |
| 41 | </head> |
andersca | f92698c6 | 2007-07-06 17:08:50 +0000 | [diff] [blame] | 42 | <frameset onload="runTest()" cols="50%,*"> |
eric@webkit.org | b5c7993 | 2009-09-29 19:15:13 +0000 | [diff] [blame] | 43 | <frame id="left_frame" src="data:text/html,<body><p>Test for <a href='https://bugs.webkit.org/show_bug.cgi?id=3400'>bug 3400</a>: setting the .src of an iframe to the same value does not reload page.</p><p>Testing that setting contentWindow.location.href of a frame to the same value works</p><p id=console>FAILURE</p></body>"> |
andersca | f92698c6 | 2007-07-06 17:08:50 +0000 | [diff] [blame] | 44 | <frame id="right_frame" onload="javascript:rightFrameLoaded()" src="resources/purple.html"></frame> |
ap | 4e77b91 | 2006-02-11 10:48:56 +0000 | [diff] [blame] | 45 | </frameset> |
| 46 | </html> |