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.selectMainExecutionContext = function() | 6 InspectorTest.selectMainExecutionContext = function() |
7 { | 7 { |
8 var executionContexts = InspectorTest.mainTarget.runtimeModel.executionConte
xts(); | 8 var executionContexts = InspectorTest.mainTarget.runtimeModel.executionConte
xts(); |
9 for (var context of executionContexts) { | 9 for (var context of executionContexts) { |
10 if (context.isDefault) { | 10 if (context.isDefault) { |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 } | 280 } |
281 InspectorTest.deprecatedRunAfterPendingDispatches(callback); | 281 InspectorTest.deprecatedRunAfterPendingDispatches(callback); |
282 } | 282 } |
283 } | 283 } |
284 | 284 |
285 InspectorTest.expandGettersInConsoleMessages = function(callback) | 285 InspectorTest.expandGettersInConsoleMessages = function(callback) |
286 { | 286 { |
287 var messageViews = Console.ConsoleView.instance()._visibleViewMessages; | 287 var messageViews = Console.ConsoleView.instance()._visibleViewMessages; |
288 var properties = []; | 288 var properties = []; |
289 var propertiesCount = 0; | 289 var propertiesCount = 0; |
290 InspectorTest.addSniffer(Components.ObjectPropertyTreeElement.prototype, "_u
pdateExpandable", propertyExpandableUpdated); | 290 InspectorTest.addSniffer(ObjectUI.ObjectPropertyTreeElement.prototype, "_upd
ateExpandable", propertyExpandableUpdated); |
291 for (var i = 0; i < messageViews.length; ++i) { | 291 for (var i = 0; i < messageViews.length; ++i) { |
292 var element = messageViews[i].element(); | 292 var element = messageViews[i].element(); |
293 for (var node = element; node; node = node.traverseNextNode(element)) { | 293 for (var node = element; node; node = node.traverseNextNode(element)) { |
294 if (node.classList && node.classList.contains("object-value-calculat
e-value-button")) { | 294 if (node.classList && node.classList.contains("object-value-calculat
e-value-button")) { |
295 ++propertiesCount; | 295 ++propertiesCount; |
296 node.click(); | 296 node.click(); |
297 properties.push(node.parentElement.parentElement); | 297 properties.push(node.parentElement.parentElement); |
298 } | 298 } |
299 } | 299 } |
300 } | 300 } |
301 | 301 |
302 function propertyExpandableUpdated() | 302 function propertyExpandableUpdated() |
303 { | 303 { |
304 --propertiesCount; | 304 --propertiesCount; |
305 if (propertiesCount === 0) { | 305 if (propertiesCount === 0) { |
306 for (var i = 0; i < properties.length; ++i) | 306 for (var i = 0; i < properties.length; ++i) |
307 properties[i].click(); | 307 properties[i].click(); |
308 InspectorTest.deprecatedRunAfterPendingDispatches(callback); | 308 InspectorTest.deprecatedRunAfterPendingDispatches(callback); |
309 } else { | 309 } else { |
310 InspectorTest.addSniffer(Components.ObjectPropertyTreeElement.protot
ype, "_updateExpandable", propertyExpandableUpdated); | 310 InspectorTest.addSniffer(ObjectUI.ObjectPropertyTreeElement.prototyp
e, "_updateExpandable", propertyExpandableUpdated); |
311 } | 311 } |
312 } | 312 } |
313 } | 313 } |
314 | 314 |
315 InspectorTest.expandConsoleMessagesErrorParameters = function(callback) | 315 InspectorTest.expandConsoleMessagesErrorParameters = function(callback) |
316 { | 316 { |
317 var messageViews = Console.ConsoleView.instance()._visibleViewMessages; | 317 var messageViews = Console.ConsoleView.instance()._visibleViewMessages; |
318 // Initiate round-trips to fetch necessary data for further rendering. | 318 // Initiate round-trips to fetch necessary data for further rendering. |
319 for (var i = 0; i < messageViews.length; ++i) | 319 for (var i = 0; i < messageViews.length; ++i) |
320 messageViews[i].element(); | 320 messageViews[i].element(); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 if (consoleView._visibleViewMessages.length === expectedCount) { | 419 if (consoleView._visibleViewMessages.length === expectedCount) { |
420 InspectorTest.addResult("Message count: " + expectedCount); | 420 InspectorTest.addResult("Message count: " + expectedCount); |
421 callback(); | 421 callback(); |
422 } else { | 422 } else { |
423 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch
eckAndReturn); | 423 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch
eckAndReturn); |
424 } | 424 } |
425 } | 425 } |
426 } | 426 } |
427 | 427 |
428 } | 428 } |
OLD | NEW |