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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 var element = messageViews[i].contentElement(); | 205 var element = messageViews[i].contentElement(); |
206 var messageText = InspectorTest.prepareConsoleMessageText(element); | 206 var messageText = InspectorTest.prepareConsoleMessageText(element); |
207 result.push(messageText + " " + messageViews[i].toMessageElement().getAt
tribute("class") + " > " + element.getAttribute("class")); | 207 result.push(messageText + " " + messageViews[i].toMessageElement().getAt
tribute("class") + " > " + element.getAttribute("class")); |
208 } | 208 } |
209 if (sortMessages) | 209 if (sortMessages) |
210 result.sort(); | 210 result.sort(); |
211 for (var i = 0; i < result.length; ++i) | 211 for (var i = 0; i < result.length; ++i) |
212 InspectorTest.addResult(result[i]); | 212 InspectorTest.addResult(result[i]); |
213 } | 213 } |
214 | 214 |
215 InspectorTest.dumpConsoleClassesBrief = function() | |
216 { | |
217 var messageViews = WebInspector.ConsolePanel._view()._visibleViewMessages; | |
218 for (var i = 0; i < messageViews.length; ++i) | |
219 InspectorTest.addResult(messageViews[i].toMessageElement().className); | |
220 } | |
221 | |
222 InspectorTest.expandConsoleMessages = function(callback, deepFilter, sectionFilt
er) | 215 InspectorTest.expandConsoleMessages = function(callback, deepFilter, sectionFilt
er) |
223 { | 216 { |
224 var messageViews = WebInspector.ConsolePanel._view()._visibleViewMessages; | 217 var messageViews = WebInspector.ConsolePanel._view()._visibleViewMessages; |
225 | 218 |
226 // Initiate round-trips to fetch necessary data for further rendering. | 219 // Initiate round-trips to fetch necessary data for further rendering. |
227 for (var i = 0; i < messageViews.length; ++i) | 220 for (var i = 0; i < messageViews.length; ++i) |
228 messageViews[i].contentElement(); | 221 messageViews[i].contentElement(); |
229 | 222 |
230 InspectorTest.runAfterPendingDispatches(expandTreeElements); | 223 InspectorTest.runAfterPendingDispatches(expandTreeElements); |
231 | 224 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 if (consoleView._visibleViewMessages.length === expectedCount) { | 320 if (consoleView._visibleViewMessages.length === expectedCount) { |
328 InspectorTest.addResult("Message count: " + expectedCount); | 321 InspectorTest.addResult("Message count: " + expectedCount); |
329 callback(); | 322 callback(); |
330 } else { | 323 } else { |
331 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch
eckAndReturn); | 324 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch
eckAndReturn); |
332 } | 325 } |
333 } | 326 } |
334 } | 327 } |
335 | 328 |
336 } | 329 } |
OLD | NEW |