| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 | 5 |
| 6 function deleteConsole() | 6 function deleteConsole() |
| 7 { | 7 { |
| 8 window.console = undefined; | 8 window.console = undefined; |
| 9 } | 9 } |
| 10 | 10 |
| 11 function substituteConsole() | 11 function substituteConsole() |
| 12 { | 12 { |
| 13 window.console = { | 13 Object.defineProperty(window, "__commandLineAPI", { enumerable: false, confi
gurable: false, get: function() { throw "Substituted" }}); |
| 14 get _commandLineAPI() { return undefined; }, | |
| 15 set _commandLineAPI() {} | |
| 16 }; | |
| 17 } | 14 } |
| 18 | 15 |
| 19 var test = function() | 16 var test = function() |
| 20 { | 17 { |
| 21 InspectorTest.evaluateInConsole("deleteConsole()", step1); | 18 InspectorTest.evaluateInConsole("deleteConsole()", step1); |
| 22 | 19 |
| 23 function step1() | 20 function step1() |
| 24 { | 21 { |
| 25 InspectorTest.evaluateInConsole("1", step2); | 22 InspectorTest.evaluateInConsole("1", step2); |
| 26 } | 23 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 47 </head> | 44 </head> |
| 48 | 45 |
| 49 <body onload="runTest()"> | 46 <body onload="runTest()"> |
| 50 <p> | 47 <p> |
| 51 Tests that evaluate in console works even if window.console is substituted or de
leted. | 48 Tests that evaluate in console works even if window.console is substituted or de
leted. |
| 52 <a href="https://bugs.webkit.org/show_bug.cgi?id=53072">Bug 53072</a> | 49 <a href="https://bugs.webkit.org/show_bug.cgi?id=53072">Bug 53072</a> |
| 53 </p> | 50 </p> |
| 54 | 51 |
| 55 </body> | 52 </body> |
| 56 </html> | 53 </html> |
| OLD | NEW |