2bc496315a83a899771140172c83a4ba3ada2042
[WebKit-https.git] / LayoutTests / fast / frames / frame-set-same-location.html
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     
7     if (window.layoutTestController)
8         layoutTestController.waitUntilDone();
9
10     function reportSuccess() {
11                 console = document.getElementById("left_frame").contentWindow.document.getElementById("console");
12                 if (console.firstChild.nodeValue == "FAILURE") {
13             console.firstChild.nodeValue = "PROCESSING...";
14             document.getElementById("right_frame").contentWindow.location.href = "resources/purple.html";
15         } else {
16             console.firstChild.nodeValue = "SUCCESS";
17             if (window.layoutTestController)
18                 layoutTestController.notifyDone();
19         }
20     }
21     
22 </script>
23 </head>
24 <frameset cols="50%,*">
25 <frame id="left_frame" src="data:text/html,<body><p>Test for <a href='http://bugzilla.opendarwin.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>">
26 <frame id="right_frame" onload="javascript:reportSuccess()" src="resources/purple.html"></iframe>
27 </frameset>
28 </html>