| 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 testRunner.dumpResourceLoadCallbacks(); | 5 testRunner.dumpResourceLoadCallbacks(); |
| 6 testRunner.waitUntilDone(); | 6 testRunner.waitUntilDone(); |
| 7 } | 7 } |
| 8 | 8 |
| 9 function startTest() | 9 function startTest() |
| 10 { | 10 { |
| 11 window.setTimeout("createFrame(0);", 0); | 11 window.setTimeout("createFrame(0);", 0); |
| 12 } | 12 } |
| 13 | 13 |
| 14 var testCodes = [301, 302, 303, 307]; | 14 var testCodes = [301, 302, 303, 307]; |
| 15 | 15 |
| 16 function createFrame(index) | 16 function createFrame(index) |
| 17 { | 17 { |
| 18 var h4 = document.createElement("h4"); | 18 var h4 = document.createElement("h4"); |
| 19 h4.innerHTML = testCodes[index] + " redirect"; | 19 h4.innerHTML = testCodes[index] + " redirect"; |
| 20 document.body.appendChild(h4); | 20 document.body.appendChild(h4); |
| 21 var iframe = document.createElement("iframe"); | 21 var iframe = document.createElement("iframe"); |
| 22 iframe.setAttribute("testCode", testCodes[index]); | 22 iframe.setAttribute("testCode", testCodes[index]); |
| 23 iframe.setAttribute("id", index); | 23 iframe.setAttribute("id", index); |
| 24 iframe.setAttribute("name", index); |
| 24 iframe.setAttribute("height", "90px"); | 25 iframe.setAttribute("height", "90px"); |
| 25 document.body.appendChild(iframe); | 26 document.body.appendChild(iframe); |
| 26 iframe.src="resources/redirect-methods-form.html"; | 27 iframe.src="resources/redirect-methods-form.html"; |
| 27 iframe.setAttribute("onload", "iframeLoaded(" + index + ");"); | 28 iframe.setAttribute("onload", "iframeLoaded(" + index + ");"); |
| 28 } | 29 } |
| 29 | 30 |
| 30 function iframeLoaded(frameID) | 31 function iframeLoaded(frameID) |
| 31 { | 32 { |
| 32 var iframe = document.getElementById(frameID); | 33 var iframe = document.getElementById(frameID); |
| 33 if (iframe.hasAttribute("submitted")) { | 34 if (iframe.hasAttribute("submitted")) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 52 } | 53 } |
| 53 | 54 |
| 54 </script> | 55 </script> |
| 55 </head> | 56 </head> |
| 56 <body onload="startTest();"> | 57 <body onload="startTest();"> |
| 57 This test checks to see what HTTP method is used to fetch the final resource in
the case where the first request results in a redirect.<br> | 58 This test checks to see what HTTP method is used to fetch the final resource in
the case where the first request results in a redirect.<br> |
| 58 301, 302, 303, and 307 http redirects are all tested.<br> | 59 301, 302, 303, and 307 http redirects are all tested.<br> |
| 59 | 60 |
| 60 </body> | 61 </body> |
| 61 </html> | 62 </html> |
| OLD | NEW |