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 21 matching lines...) Expand all Loading... |
32 // lineNumber and columnNumber are 0-based | 32 // lineNumber and columnNumber are 0-based |
33 ++lineNumber; | 33 ++lineNumber; |
34 ++columnNumber; | 34 ++columnNumber; |
35 InspectorTest.addResult("Function location revealed: [" + lineNu
mber + ":" + columnNumber + "]"); | 35 InspectorTest.addResult("Function location revealed: [" + lineNu
mber + ":" + columnNumber + "]"); |
36 next(); | 36 next(); |
37 } | 37 } |
38 }, | 38 }, |
39 | 39 |
40 function testDumpFunctionDefinition(next) | 40 function testDumpFunctionDefinition(next) |
41 { | 41 { |
42 InspectorTest.addSniffer(Components.ObjectPropertiesSection, "format
ObjectAsFunction", onConsoleMessagesReceived); | 42 InspectorTest.addSniffer(ObjectUI.ObjectPropertiesSection, "formatOb
jectAsFunction", onConsoleMessagesReceived); |
43 SDK.ConsoleModel.evaluateCommandInConsole(UI.context.flavor(SDK.Exec
utionContext), "jumpToMe"); | 43 SDK.ConsoleModel.evaluateCommandInConsole(UI.context.flavor(SDK.Exec
utionContext), "jumpToMe"); |
44 | 44 |
45 function onConsoleMessagesReceived() | 45 function onConsoleMessagesReceived() |
46 { | 46 { |
47 InspectorTest.deprecatedRunAfterPendingDispatches(function() { | 47 InspectorTest.deprecatedRunAfterPendingDispatches(function() { |
48 var messages = []; | 48 var messages = []; |
49 InspectorTest.disableConsoleViewport(); | 49 InspectorTest.disableConsoleViewport(); |
50 var viewMessages = Console.ConsoleView.instance()._visibleVi
ewMessages; | 50 var viewMessages = Console.ConsoleView.instance()._visibleVi
ewMessages; |
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]; |
(...skipping 11 matching lines...) Expand all Loading... |
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 |