| OLD | NEW |
| 1 function initialize_LayerTreeTests() | 1 function initialize_LayerTreeTests() |
| 2 { | 2 { |
| 3 // FIXME: remove once out of experimental. | 3 // FIXME: remove once out of experimental. |
| 4 WebInspector.inspectorView.addPanel(new WebInspector.LayersPanelDescriptor()
); | 4 WebInspector.inspectorView.addPanel(new WebInspector.LayersPanelDescriptor()
); |
| 5 InspectorTest._layerTreeModel = WebInspector.panel("layers")._model; | 5 InspectorTest._layerTreeModel = WebInspector.panel("layers")._model; |
| 6 | 6 |
| 7 InspectorTest.labelForLayer = function(layer) | 7 InspectorTest.labelForLayer = function(layer) |
| 8 { | 8 { |
| 9 var node = WebInspector.domAgent.nodeForId(layer.nodeIdForSelfOrAncestor
()); | 9 var node = WebInspector.domAgent.nodeForId(layer.nodeIdForSelfOrAncestor
()); |
| 10 var label = node.appropriateSelectorFor(false); | 10 var label = WebInspector.DOMPresentationUtils.appropriateSelectorFor(nod
e, false); |
| 11 var height = layer.height(); | 11 var height = layer.height(); |
| 12 var width = layer.width(); | 12 var width = layer.width(); |
| 13 if (height <= 200 && width <= 200) | 13 if (height <= 200 && width <= 200) |
| 14 label += " " + height + "x" + width; | 14 label += " " + height + "x" + width; |
| 15 if (typeof layer.__extraData !== "undefined") | 15 if (typeof layer.__extraData !== "undefined") |
| 16 label += " (" + layer.__extraData + ")"; | 16 label += " (" + layer.__extraData + ")"; |
| 17 return label; | 17 return label; |
| 18 } | 18 } |
| 19 | 19 |
| 20 InspectorTest.dumpLayerTree = function(prefix, root) | 20 InspectorTest.dumpLayerTree = function(prefix, root) |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 InspectorTest._layerTreeModel.addEventListener(WebInspector.LayerTreeMod
el.Events.LayerTreeChanged, onLayerTreeChanged); | 91 InspectorTest._layerTreeModel.addEventListener(WebInspector.LayerTreeMod
el.Events.LayerTreeChanged, onLayerTreeChanged); |
| 92 InspectorTest._layerTreeModel.enable(); | 92 InspectorTest._layerTreeModel.enable(); |
| 93 function onLayerTreeChanged() | 93 function onLayerTreeChanged() |
| 94 { | 94 { |
| 95 InspectorTest._layerTreeModel.removeEventListener(WebInspector.Layer
TreeModel.Events.LayerTreeChanged, onLayerTreeChanged); | 95 InspectorTest._layerTreeModel.removeEventListener(WebInspector.Layer
TreeModel.Events.LayerTreeChanged, onLayerTreeChanged); |
| 96 callback(); | 96 callback(); |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 | 99 |
| 100 } | 100 } |
| OLD | NEW |