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 interceptedRequestDict = { |
| 17 "redirect-iframe.html": InspectorTest.allowRequest, |
| 18 "redirect1.pl": function(event) { |
| 19 InspectorTest.modifyRequest(event, { |
| 20 "url": "post-echo.pl", |
| 21 "method": "POST", |
| 22 "postData": "console.log('POST MODIFICATION SUCCESS!');" |
| 23 }); |
| 24 }, |
| 25 }; |
| 26 |
| 27 InspectorTest.startInterceptionTest(interceptedRequestDict, {}, 1); |
| 28 } |
| 29 </script> |
| 30 </head> |
| 31 <body onload="runTest();"> |
| 32 <p>Tests modifying a GET into a POST.</a> |
| 33 </p> |
| 34 </body> |
| 35 </html> |
OLD | NEW |