2011-02-17 Ilya Tikhonovsky <loislo@chromium.org>
[WebKit-https.git] / LayoutTests / http / tests / inspector / elements-test.js
index e8383fda84d01d6666277ed5c8bd03f504a5d4ed..3e7f7c38e7ef973c8b8eaf23d2930f4e0ce8f3ce 100755 (executable)
@@ -193,14 +193,14 @@ InspectorTest.expandElementsTree = function(callback)
 
 InspectorTest.dumpDOMAgentTree = function()
 {
 
 InspectorTest.dumpDOMAgentTree = function()
 {
-    function dump(node, prefix)
+    function dump(node, prefix, startIndex)
     {
     {
-        InspectorTest.addResult(prefix + node.nodeName + "[" + node.id + "]");
+        InspectorTest.addResult(prefix + node.nodeName + "[" + (node.id - startIndex)+ "]");
         var children = node.children;
         for (var i = 0; children && i < children.length; ++i)
         var children = node.children;
         for (var i = 0; children && i < children.length; ++i)
-            dump(children[i], prefix + "    ");
+            dump(children[i], prefix + "    ", startIndex);
     }
     }
-    dump(WebInspector.domAgent.document, "");
+    dump(WebInspector.domAgent.document, "", WebInspector.domAgent.document.id - 1);
 };
 
 };
\ No newline at end of file
 };
 
 };
\ No newline at end of file