| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../http/tests/inspector/elements-test.js"></script> |
| <script> |
| |
| function appendChild() |
| { |
| var container = document.getElementById("container"); |
| var child = document.createElement("div"); |
| child.setAttribute("id", "appended"); |
| container.appendChild(child); |
| } |
| |
| function test() |
| { |
| var containerNode; |
| |
| InspectorTest.runTestSuite([ |
| function testDumpInitial(next) |
| { |
| function callback(node) |
| { |
| containerNode = node; |
| InspectorTest.addResult("========= Original ========"); |
| InspectorTest.dumpElementsTree(containerNode); |
| next(); |
| } |
| InspectorTest.selectNodeWithId("container", callback); |
| }, |
| |
| function testAppend(next) { |
| function callback() |
| { |
| InspectorTest.addResult("======== Appended ========="); |
| InspectorTest.dumpElementsTree(containerNode); |
| next(); |
| } |
| InspectorTest.evaluateInPage("appendChild()", callback); |
| } |
| ]); |
| } |
| |
| </script> |
| </head> |
| |
| <body onload="runTest()"> |
| <p> |
| Tests that elements panel updates hasChildren flag upon adding children to collapsed nodes. |
| </p> |
| |
| <div id="container"></div> |
| |
| </body> |
| </html> |