function addAfter(next)
{
- executeAndDumpTree("addAfterRule()", WebInspector.DOMModel.Events.NodeInserted, next);
+ executeAndDumpTree("addAfterRule()", WebInspector.DOMModel.Events.NodeInserted, expandAndDumpTree.bind(this, next));
},
function addBefore(next)
function domCallback()
{
WebInspector.domModel.removeEventListener(eventName, domCallback, this);
- WebInspector.inspectorView.panel("elements").treeOutline.addEventListener(WebInspector.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallback, this);
+ InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallback, this);
}
function treeCallback()
{
- WebInspector.inspectorView.panel("elements").treeOutline.removeEventListener(WebInspector.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallback, this);
+ InspectorTest.firstElementsTreeOutline().removeEventListener(WebInspector.ElementsTreeOutline.Events.ElementsTreeUpdated, treeCallback, this);
InspectorTest.dumpElementsTree(containerNode);
next();
}
}
+ function expandAndDumpTree(next)
+ {
+ InspectorTest.addResult("== Expanding: ==");
+ InspectorTest.expandElementsTree(callback);
+ function callback()
+ {
+ InspectorTest.dumpElementsTree(containerNode);
+ next();
+ }
+ }
+
function selectNodeAndDumpStyles(id, pseudoTypeName, callback)
{
if (pseudoTypeName)