| 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 src="../../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../../http/tests/inspector/console-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function jumpToMe() | 7 function jumpToMe() |
| 8 { | 8 { |
| 9 var result = 12345; | 9 var result = 12345; |
| 10 return window.foo || result; | 10 return window.foo || result; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 }, | 38 }, |
| 39 | 39 |
| 40 function testDumpFunctionDefinition(next) | 40 function testDumpFunctionDefinition(next) |
| 41 { | 41 { |
| 42 InspectorTest.addSniffer(WebInspector.ObjectPropertiesSection, "form
atObjectAsFunction", onConsoleMessagesReceived); | 42 InspectorTest.addSniffer(WebInspector.ObjectPropertiesSection, "form
atObjectAsFunction", onConsoleMessagesReceived); |
| 43 WebInspector.ConsoleModel.evaluateCommandInConsole(WebInspector.cont
ext.flavor(WebInspector.ExecutionContext), "jumpToMe"); | 43 WebInspector.ConsoleModel.evaluateCommandInConsole(WebInspector.cont
ext.flavor(WebInspector.ExecutionContext), "jumpToMe"); |
| 44 | 44 |
| 45 function onConsoleMessagesReceived() | 45 function onConsoleMessagesReceived() |
| 46 { | 46 { |
| 47 InspectorTest.runAfterPendingDispatches(function() { | 47 InspectorTest.deprecatedRunAfterPendingDispatches(function() { |
| 48 var messages = []; | 48 var messages = []; |
| 49 InspectorTest.disableConsoleViewport(); | 49 InspectorTest.disableConsoleViewport(); |
| 50 var viewMessages = WebInspector.ConsoleView.instance()._visi
bleViewMessages; | 50 var viewMessages = WebInspector.ConsoleView.instance()._visi
bleViewMessages; |
| 51 for (var i = 0; i < viewMessages.length; ++i) { | 51 for (var i = 0; i < viewMessages.length; ++i) { |
| 52 var uiMessage = viewMessages[i]; | 52 var uiMessage = viewMessages[i]; |
| 53 var element = uiMessage.contentElement(); | 53 var element = uiMessage.contentElement(); |
| 54 messages.push(element.deepTextContent()); | 54 messages.push(element.deepTextContent()); |
| 55 } | 55 } |
| 56 InspectorTest.addResult(messages.join("\n")); | 56 InspectorTest.addResult(messages.join("\n")); |
| 57 next(); | 57 next(); |
| 58 }); | 58 }); |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 ]); | 61 ]); |
| 62 } | 62 } |
| 63 | 63 |
| 64 </script> | 64 </script> |
| 65 </head> | 65 </head> |
| 66 | 66 |
| 67 <body onload="runTest()"> | 67 <body onload="runTest()"> |
| 68 <p> | 68 <p> |
| 69 Tests that "Show Function Definition" jumps to the correct location. | 69 Tests that "Show Function Definition" jumps to the correct location. |
| 70 </p> | 70 </p> |
| 71 | 71 |
| 72 </body> | 72 </body> |
| 73 </html> | 73 </html> |
| OLD | NEW |