| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource
s/inspector-protocol-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 | 5 |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 var swapConsoleAndRemoveIframe = "\n\ | 8 var swapConsoleAndRemoveIframe = "\n\ |
| 9 var a = window.console;\n\ | 9 var a = window.console;\n\ |
| 10 window.console = iframe.contentWindow.console;\n\ | 10 window.console = iframe.contentWindow.console;\n\ |
| 11 iframe.contentWindow.console = a;\n\ | 11 iframe.contentWindow.console = a;\n\ |
| 12 document.getElementById(\"iframe\").remove();\n\ | 12 document.getElementById(\"iframe\").remove();\n\ |
| 13 "; | 13 "; |
| 14 | 14 |
| 15 InspectorTest.sendCommand("Runtime.evaluate", { "expression": swapConsoleAnd
RemoveIframe }, runConsoleLog); | 15 InspectorTest.sendCommand("Runtime.evaluate", { "expression": swapConsoleAnd
RemoveIframe }, runConsoleLog); |
| 16 function runConsoleLog(result) | 16 function runConsoleLog(result) |
| 17 { | 17 { |
| 18 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "console.l
og(239);" }, () => InspectorTest.completeTest()); | 18 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "console.l
og(239);" }, () => InspectorTest.completeTest()); |
| 19 } | 19 } |
| 20 } | 20 } |
| 21 </script> | 21 </script> |
| 22 </head> | 22 </head> |
| 23 <iframe id="iframe"></iframe> | 23 <iframe id="iframe"></iframe> |
| 24 <body onLoad="runTest();"> | 24 <body onLoad="runTest();"> |
| 25 Tests that call to console after inspected context was destroyed shouldn't produ
ce crash. | 25 Tests that call to console after inspected context was destroyed shouldn't produ
ce crash. |
| 26 </body> | 26 </body> |
| 27 </html> | 27 </html> |
| OLD | NEW |