blob: a0fc8b8d7f2635819afe000703ffd2e924c26070 [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/elements-test.js"></script>
<script>
function test()
{
WebInspector.showPanel("elements");
var treeOutline = WebInspector.panels.elements.treeOutline;
InspectorTest.findNode(function() { return false; }, firstStep);
function firstStep()
{
InspectorTest.addResult("===== Initial state of tree outline =====\n");
dump();
var topNode = treeOutline.children[0].children[1].children[1];
topNode.expandRecursively();
InspectorTest.runAfterPendingDispatches(secondStep);
};
function secondStep()
{
InspectorTest.addResult("\n===== State of tree outline after calling .expandRecursively() =====\n");
dump();
InspectorTest.completeTest();
};
function dump()
{
var node = InspectorTest.expandedNodeWithId("depth-1");
InspectorTest.dumpElementsTree(node);
};
}
</script>
</head>
<body onload="runTest()">
<p>
Tests that expanding elements recursively works.
</p>
<div id="depth-1">
<div id="depth-2">
<div id="depth-3">
<div id="depth-4">
<div id="depth-5">
<div id="depth-6">
<div id="depth-7">
<div id="depth-8">
<div id="depth-9">
<div id="depth-10"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>