| 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); |  | 
|  25     iframe.setAttribute("height", "90px"); |  24     iframe.setAttribute("height", "90px"); | 
|  26     document.body.appendChild(iframe); |  25     document.body.appendChild(iframe); | 
|  27     iframe.src="resources/redirect-methods-form.html"; |  26     iframe.src="resources/redirect-methods-form.html"; | 
|  28     iframe.setAttribute("onload", "iframeLoaded(" + index + ");"); |  27     iframe.setAttribute("onload", "iframeLoaded(" + index + ");"); | 
|  29 } |  28 } | 
|  30  |  29  | 
|  31 function iframeLoaded(frameID) |  30 function iframeLoaded(frameID) | 
|  32 { |  31 { | 
|  33     var iframe = document.getElementById(frameID); |  32     var iframe = document.getElementById(frameID); | 
|  34     if (iframe.hasAttribute("submitted")) { |  33     if (iframe.hasAttribute("submitted")) { | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
|  53 } |  52 } | 
|  54  |  53  | 
|  55 </script> |  54 </script> | 
|  56 </head> |  55 </head> | 
|  57 <body onload="startTest();"> |  56 <body onload="startTest();"> | 
|  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> |  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> | 
|  59 301, 302, 303, and 307 http redirects are all tested.<br> |  58 301, 302, 303, and 307 http redirects are all tested.<br> | 
|  60  |  59  | 
|  61 </body> |  60 </body> | 
|  62 </html> |  61 </html> | 
| OLD | NEW |