| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script> |
| |
| function deleteConsole() |
| { |
| window.console = undefined; |
| } |
| |
| function substituteConsole() |
| { |
| window.console = { |
| get _commandLineAPI() { return undefined; }, |
| set _commandLineAPI() {} |
| }; |
| } |
| |
| var test = function() |
| { |
| InspectorTest.evaluateInConsole("deleteConsole()", step1); |
| |
| function step1() |
| { |
| InspectorTest.evaluateInConsole("1", step2); |
| } |
| |
| function step2(result) |
| { |
| InspectorTest.addResult(result); |
| InspectorTest.evaluateInConsole("substituteConsole()", step3); |
| } |
| |
| function step3(result) |
| { |
| InspectorTest.evaluateInConsole("2", step4); |
| } |
| |
| function step4(result) |
| { |
| InspectorTest.addResult(result); |
| InspectorTest.completeTest(); |
| } |
| } |
| |
| </script> |
| </head> |
| |
| <body onload="runTest()"> |
| <p> |
| Tests that evaluate in console works even if window.console is substituted or deleted. |
| <a href="https://bugs.webkit.org/show_bug.cgi?id=53072">Bug 53072</a> |
| </p> |
| |
| </body> |
| </html> |