| OLD | NEW |
| 1 if (window.GCController) | 1 if (window.GCController) |
| 2 GCController.collectAll(); | 2 GCController.collectAll(); |
| 3 var initialize_InspectorTest = function() { | 3 var initialize_InspectorTest = function() { |
| 4 | 4 |
| 5 var results = []; | 5 var results = []; |
| 6 | 6 |
| 7 function consoleOutputHook(messageType) | 7 function consoleOutputHook(messageType) |
| 8 { | 8 { |
| 9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); | 9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu
ments, 1)); |
| 10 } | 10 } |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 } | 350 } |
| 351 callback(); | 351 callback(); |
| 352 } | 352 } |
| 353 | 353 |
| 354 if (force) | 354 if (force) |
| 355 listenersArrived(); | 355 listenersArrived(); |
| 356 else | 356 else |
| 357 InspectorTest.addSniffer(Components.EventListenersView.prototype, "_even
tListenersArrivedForTest", listenersArrived); | 357 InspectorTest.addSniffer(Components.EventListenersView.prototype, "_even
tListenersArrivedForTest", listenersArrived); |
| 358 } | 358 } |
| 359 | 359 |
| 360 InspectorTest.dumpNavigatorView = function(navigatorView) | 360 InspectorTest.dumpNavigatorView = function(navigatorView, dumpIcons) |
| 361 { | 361 { |
| 362 dumpNavigatorTreeOutline(navigatorView._scriptsTree); | 362 dumpNavigatorTreeOutline(navigatorView._scriptsTree); |
| 363 | 363 |
| 364 function dumpNavigatorTreeElement(prefix, treeElement) | 364 function dumpNavigatorTreeElement(prefix, treeElement) |
| 365 { | 365 { |
| 366 var titleText = treeElement.title; | 366 var titleText = ''; |
| 367 if (treeElement._trailingIconsElement) { | 367 if (treeElement._leadingIconsElement && dumpIcons) { |
| 368 var iconTypes = []; | 368 var icons = treeElement._leadingIconsElement.querySelectorAll('[is=u
i-icon]'); |
| 369 for (var icon = treeElement._trailingIconsElement.firstChild; icon;
icon = icon.nextSibling) { | 369 icons = Array.prototype.slice.call(icons); |
| 370 iconTypes.push(icon._iconType); | 370 var iconTypes = icons.map(icon => icon._iconType); |
| 371 } | |
| 372 if (iconTypes.length) | 371 if (iconTypes.length) |
| 373 titleText = titleText + " [" + iconTypes.join(", ") + "]"; | 372 titleText = titleText + "[" + iconTypes.join(", ") + "] "; |
| 374 } | 373 } |
| 374 titleText += treeElement.title; |
| 375 if (treeElement._nodeType === Sources.NavigatorView.Types.FileSystem ||
treeElement._nodeType === Sources.NavigatorView.Types.FileSystemFolder) { | 375 if (treeElement._nodeType === Sources.NavigatorView.Types.FileSystem ||
treeElement._nodeType === Sources.NavigatorView.Types.FileSystemFolder) { |
| 376 var hasMappedFiles = treeElement.listItemElement.classList.contains(
"has-mapped-files"); | 376 var hasMappedFiles = treeElement.listItemElement.classList.contains(
"has-mapped-files"); |
| 377 if (!hasMappedFiles) | 377 if (!hasMappedFiles) |
| 378 titleText += " [dimmed]"; | 378 titleText += " [dimmed]"; |
| 379 } | 379 } |
| 380 InspectorTest.addResult(prefix + titleText); | 380 InspectorTest.addResult(prefix + titleText); |
| 381 treeElement.expand(); | 381 treeElement.expand(); |
| 382 var children = treeElement.children(); | 382 var children = treeElement.children(); |
| 383 for (var i = 0; i < children.length; ++i) | 383 for (var i = 0; i < children.length; ++i) |
| 384 dumpNavigatorTreeElement(prefix + " ", children[i]); | 384 dumpNavigatorTreeElement(prefix + " ", children[i]); |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 _output("[page] " + text); | 1225 _output("[page] " + text); |
| 1226 } | 1226 } |
| 1227 | 1227 |
| 1228 function _output(result) | 1228 function _output(result) |
| 1229 { | 1229 { |
| 1230 if (!outputElement) | 1230 if (!outputElement) |
| 1231 createOutputElement(); | 1231 createOutputElement(); |
| 1232 outputElement.appendChild(document.createTextNode(result)); | 1232 outputElement.appendChild(document.createTextNode(result)); |
| 1233 outputElement.appendChild(document.createElement("br")); | 1233 outputElement.appendChild(document.createElement("br")); |
| 1234 } | 1234 } |
| OLD | NEW |