OLD | NEW |
1 var initialize_ConsoleTest = function() { | 1 var initialize_ConsoleTest = function() { |
2 | 2 |
3 InspectorTest.preloadModule("source_frame"); | 3 InspectorTest.preloadModule("source_frame"); |
4 InspectorTest.preloadPanel("console"); | 4 InspectorTest.preloadPanel("console"); |
5 | 5 |
6 InspectorTest.evaluateInConsole = function(code, callback) | 6 InspectorTest.evaluateInConsole = function(code, callback) |
7 { | 7 { |
8 callback = InspectorTest.safeWrap(callback); | 8 callback = InspectorTest.safeWrap(callback); |
9 | 9 |
10 var consoleView = WebInspector.ConsolePanel._view(); | 10 var consoleView = WebInspector.ConsolePanel._view(); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 if (InspectorTest.dumpConsoleTableMessage(uiMessage, false, result)) { | 109 if (InspectorTest.dumpConsoleTableMessage(uiMessage, false, result)) { |
110 if (dumpClassNames) | 110 if (dumpClassNames) |
111 result.push(classNames.join(" > ")); | 111 result.push(classNames.join(" > ")); |
112 } else { | 112 } else { |
113 var messageText = formatter(element, message); | 113 var messageText = formatter(element, message); |
114 result.push(messageText + (dumpClassNames ? " " + classNames.join("
> ") : "")); | 114 result.push(messageText + (dumpClassNames ? " " + classNames.join("
> ") : "")); |
115 } | 115 } |
116 | 116 |
117 if (printOriginatingCommand && uiMessage.consoleMessage().originatingMes
sage()) | 117 if (printOriginatingCommand && uiMessage.consoleMessage().relatedMessage
()) |
118 result.push("Originating from: " + uiMessage.consoleMessage().origin
atingMessage().messageText); | 118 result.push("Originating from: " + uiMessage.consoleMessage().relate
dMessage().messageText); |
119 } | 119 } |
120 return result; | 120 return result; |
121 } | 121 } |
122 | 122 |
123 InspectorTest.formatterIgnoreStackFrameUrls = function(messageFormatter, node) | 123 InspectorTest.formatterIgnoreStackFrameUrls = function(messageFormatter, node) |
124 { | 124 { |
125 function isNotEmptyLine(string) | 125 function isNotEmptyLine(string) |
126 { | 126 { |
127 return string.trim().length > 0; | 127 return string.trim().length > 0; |
128 } | 128 } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 if (consoleView._visibleViewMessages.length === expectedCount) { | 320 if (consoleView._visibleViewMessages.length === expectedCount) { |
321 InspectorTest.addResult("Message count: " + expectedCount); | 321 InspectorTest.addResult("Message count: " + expectedCount); |
322 callback(); | 322 callback(); |
323 } else { | 323 } else { |
324 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch
eckAndReturn); | 324 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch
eckAndReturn); |
325 } | 325 } |
326 } | 326 } |
327 } | 327 } |
328 | 328 |
329 } | 329 } |
OLD | NEW |