blob: 2c66327cdee3c359c51820e7b7928ff036a24f6c [file] [log] [blame]
ap4e77b912006-02-11 10:48:56 +00001<!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.orgea3cf922012-06-22 06:52:33 +00007 if (window.testRunner)
8 testRunner.waitUntilDone();
ap4e77b912006-02-11 10:48:56 +00009
anderscaf92698c62007-07-06 17:08:50 +000010 function rightFrameLoaded() {
11 rightFrameLoadCount++;
12 if (rightFrameLoadCount == 2) {
13 // Console is set by runTest
ap4e77b912006-02-11 10:48:56 +000014 console.firstChild.nodeValue = "SUCCESS";
anderscaf92698c62007-07-06 17:08:50 +000015
rniwa@webkit.orgea3cf922012-06-22 06:52:33 +000016 if (window.testRunner) {
anderscaf92698c62007-07-06 17:08:50 +000017 // 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.orgea3cf922012-06-22 06:52:33 +000023 testRunner.dumpAsText();
24 testRunner.notifyDone();
anderscaf92698c62007-07-06 17:08:50 +000025 }
ap4e77b912006-02-11 10:48:56 +000026 }
27 }
28
anderscaf92698c62007-07-06 17:08:50 +000029 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;
ap4e77b912006-02-11 10:48:56 +000040</script>
41</head>
anderscaf92698c62007-07-06 17:08:50 +000042<frameset onload="runTest()" cols="50%,*">
eric@webkit.orgb5c79932009-09-29 19:15:13 +000043<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>">
anderscaf92698c62007-07-06 17:08:50 +000044<frame id="right_frame" onload="javascript:rightFrameLoaded()" src="resources/purple.html"></frame>
ap4e77b912006-02-11 10:48:56 +000045</frameset>
46</html>