OLD | NEW |
| (Empty) |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or
g/TR/html4/loose.dtd"> | |
2 <html> | |
3 <head> | |
4 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
5 <script src="../../http/tests/inspector/elements-test.js"></script> | |
6 <script> | |
7 | |
8 function appendChild() | |
9 { | |
10 var container = document.getElementById("container"); | |
11 var child = document.createElement("div"); | |
12 child.setAttribute("id", "appended"); | |
13 container.appendChild(child); | |
14 } | |
15 | |
16 function test() | |
17 { | |
18 var containerNode; | |
19 | |
20 InspectorTest.runTestSuite([ | |
21 function testDumpInitial(next) | |
22 { | |
23 function callback(node) | |
24 { | |
25 containerNode = node; | |
26 InspectorTest.addResult("========= Original ========"); | |
27 InspectorTest.dumpElementsTree(containerNode); | |
28 next(); | |
29 } | |
30 InspectorTest.selectNodeWithId("container", callback); | |
31 }, | |
32 | |
33 function testAppend(next) { | |
34 function callback() | |
35 { | |
36 InspectorTest.firstElementsTreeOutline().runPendingUpdates(); | |
37 InspectorTest.runAfterPendingDispatches(function() { | |
38 InspectorTest.addResult("======== Appended ========="); | |
39 InspectorTest.dumpElementsTree(containerNode); | |
40 next(); | |
41 }) | |
42 } | |
43 InspectorTest.evaluateInPage("appendChild()", callback); | |
44 } | |
45 ]); | |
46 } | |
47 | |
48 </script> | |
49 </head> | |
50 | |
51 <body onload="runTest()"> | |
52 <p> | |
53 Tests that elements panel updates hasChildren flag upon adding children to colla
psed nodes. | |
54 </p> | |
55 | |
56 <div id="container"></div> | |
57 | |
58 </body> | |
59 </html> | |
OLD | NEW |