OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script type="text/javascript" src="../inspector-protocol-test.js"></script> |
| 4 <script type="text/javascript" src="interception-test.js"></script> |
| 5 |
| 6 <script> |
| 7 function appendIframe() |
| 8 { |
| 9 var iframe = document.createElement("iframe"); |
| 10 iframe.src = "resources/redirect-iframe.html"; |
| 11 document.body.appendChild(iframe); |
| 12 } |
| 13 |
| 14 function test() |
| 15 { |
| 16 var requestInterceptedDict = { |
| 17 "redirect-iframe.html": InspectorTest.allowRequest, |
| 18 "redirect1.pl": function(event) { |
| 19 var rawResponse = |
| 20 "HTTP/1.1 302 Found\r\n" + |
| 21 "Location: final.js\r\n\r\n"; |
| 22 InspectorTest.mockResponse(event, rawResponse); |
| 23 }, |
| 24 "final.js": InspectorTest.allowRequest, |
| 25 }; |
| 26 |
| 27 InspectorTest.startInterceptionTest(requestInterceptedDict, 1); |
| 28 } |
| 29 </script> |
| 30 </head> |
| 31 <body onload="runTest();"> |
| 32 <p>Tests a mock 302 resource.</a> |
| 33 </p> |
| 34 </body> |
| 35 </html> |
OLD | NEW |