function initialize_LayerTreeTests()
{
- // FIXME: remove once out of experimental.
- InspectorTest.registerModule("layers");
- var extensions = runtime.extensions(WebInspector.Panel).forEach(function(extension) {
- if (extension.module().name() === "layers")
- WebInspector.inspectorView.addPanel(new WebInspector.RuntimeExtensionPanelDescriptor(extension));
- });
+
+ InspectorTest.preloadPanel("layers");
+
InspectorTest.layerTreeModel = WebInspector.targetManager.mainTarget().layerTreeModel;
- InspectorTest.layers3DView = WebInspector.inspectorView.panel("layers")._layers3DView;
InspectorTest.labelForLayer = function(layer)
{
if (!prefix)
prefix = "";
if (!root)
- root = WebInspector.inspectorView.panel("layers")._layerTree._treeOutline;
+ root = WebInspector.panels.layers._layerTree._treeOutline;
if (root.representedObject)
InspectorTest.addResult(prefix + InspectorTest.labelForLayer(root.representedObject));
root.children.forEach(InspectorTest.dumpLayerTreeOutline.bind(InspectorTest, prefix + " "));
if (!prefix)
prefix = "";
if (!root)
- root = InspectorTest.layers3DView._rotatingContainerElement;
+ root = WebInspector.panels.layers._layers3DView._rotatingContainerElement;
if (root.__layer)
InspectorTest.addResult(prefix + InspectorTest.labelForLayer(root.__layer));
for (var element = root.firstElementChild; element; element = element.nextSibling)