| <html> |
| <head> |
| <script type="text/javascript" src="../inspector-protocol-test.js"></script> |
| <script type="text/javascript" src="interception-test.js"></script> |
| |
| <script> |
| function appendIframe() |
| { |
| var iframe = document.createElement("iframe"); |
| iframe.src = "resources/redirect-iframe.html"; |
| document.body.appendChild(iframe); |
| } |
| |
| function test() |
| { |
| var requestInterceptedDict = { |
| "redirect-iframe.html": InspectorTest.allowRequest, |
| "redirect1.pl": InspectorTest.allowRequest, |
| "redirect2.pl": InspectorTest.allowRequest, |
| "redirect3.pl": function(event) { |
| var rawResponse = |
| "HTTP/1.1 200 OK\r\n" + |
| "Content-Type: application/javascript\r\n\r\n" + |
| "console.log('Hello from the mock resource');"; |
| InspectorTest.mockResponse(event, rawResponse); |
| } |
| }; |
| |
| InspectorTest.startInterceptionTest(requestInterceptedDict, 1); |
| } |
| </script> |
| </head> |
| <body onload="runTest();"> |
| <p>Tests interception of redirects.</a> |
| </p> |
| </body> |
| </html> |