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": function(event) { |
| 18 var rawResponse = |
| 19 "HTTP/1.1 200 OK\r\n" + |
| 20 "Content-Type: text/html; charset=UTF-8\r\n\r\n" + |
| 21 "<html><head><script>" + |
| 22 "console.log('Hello from the mocked iframe.')" + |
| 23 "</" + "script></head></html>"; |
| 24 testRunner.logToStderr('rawResponse ' + rawResponse); |
| 25 InspectorTest.mockResponse(event, rawResponse); |
| 26 }, |
| 27 }; |
| 28 |
| 29 InspectorTest.startInterceptionTest(requestInterceptedDict, 1); |
| 30 } |
| 31 </script> |
| 32 </head> |
| 33 <body onload="runTest();"> |
| 34 <p>Tests a mocking of a navigation fetch.</a> |
| 35 </p> |
| 36 </body> |
| 37 </html> |
OLD | NEW |