| 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.moduleManager.registerModule("layers"); | 4 WebInspector.moduleManager.registerModule("layers"); |
| 5 var extensions = WebInspector.moduleManager.extensions(WebInspector.Panel).f
orEach(function(extension) { | 5 var extensions = WebInspector.moduleManager.extensions(WebInspector.Panel).f
orEach(function(extension) { |
| 6 if (extension.module().name() === "layers") | 6 if (extension.module().name() === "layers") |
| 7 WebInspector.inspectorView.addPanel(new WebInspector.ModuleManagerEx
tensionPanelDescriptor(extension)); | 7 WebInspector.inspectorView.addPanel(new WebInspector.ModuleManagerEx
tensionPanelDescriptor(extension)); |
| 8 }); | 8 }); |
| 9 InspectorTest._layerTreeModel = WebInspector.panel("layers")._model; | 9 InspectorTest._layerTreeModel = WebInspector.panel("layers")._model; |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 InspectorTest.requestLayers = function(callback) | 94 InspectorTest.requestLayers = function(callback) |
| 95 { | 95 { |
| 96 InspectorTest._layerTreeModel.addEventListener(WebInspector.LayerTreeMod
el.Events.LayerTreeChanged, onLayerTreeChanged); | 96 InspectorTest._layerTreeModel.addEventListener(WebInspector.LayerTreeMod
el.Events.LayerTreeChanged, onLayerTreeChanged); |
| 97 InspectorTest._layerTreeModel.enable(); | 97 InspectorTest._layerTreeModel.enable(); |
| 98 function onLayerTreeChanged() | 98 function onLayerTreeChanged() |
| 99 { | 99 { |
| 100 InspectorTest._layerTreeModel.removeEventListener(WebInspector.Layer
TreeModel.Events.LayerTreeChanged, onLayerTreeChanged); | 100 InspectorTest._layerTreeModel.removeEventListener(WebInspector.Layer
TreeModel.Events.LayerTreeChanged, onLayerTreeChanged); |
| 101 callback(); | 101 callback(); |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 |
| 105 InspectorTest.dumpViewScrollRect = function(element) |
| 106 { |
| 107 InspectorTest.addObject(element.__scrollRect, {layerId: "formatAsTypeNam
e"}, "", "scrollRect: "); |
| 108 } |
| 109 |
| 110 InspectorTest.dumpViewScrollRects = function() |
| 111 { |
| 112 InspectorTest.addResult("View elements dump"); |
| 113 var root = WebInspector.panel("layers")._layers3DView._rotatingContainer
Element; |
| 114 Array.prototype.forEach.call(root.querySelectorAll('.scroll-rect'), func
tion(element) { |
| 115 InspectorTest.dumpViewScrollRect(element); |
| 116 }); |
| 117 } |
| 118 |
| 119 InspectorTest.dumpModelScrollRects = function() |
| 120 { |
| 121 InspectorTest.addResult("Model elements dump"); |
| 122 InspectorTest.addObject(InspectorTest._layerTreeModel._scrollRectsByLaye
rId, {layerId: "formatAsTypeName"}, "", "scrollRectsByLayerId: "); |
| 123 } |
| 104 } | 124 } |
| OLD | NEW |