Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / edit / insert-node-collapsed.html
blobeef301b64acb55234fbbd3199b1dd4a05313fc00
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/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>
8 function appendChild()
10 var container = document.getElementById("container");
11 var child = document.createElement("div");
12 child.setAttribute("id", "appended");
13 container.appendChild(child);
16 function test()
18 var containerNode;
20 InspectorTest.runTestSuite([
21 function testDumpInitial(next)
23 function callback(node)
25 containerNode = node;
26 InspectorTest.addResult("========= Original ========");
27 InspectorTest.dumpElementsTree(containerNode);
28 next();
30 InspectorTest.selectNodeWithId("container", callback);
33 function testAppend(next) {
34 function callback()
36 InspectorTest.firstElementsTreeOutline().runPendingUpdates();
37 InspectorTest.runAfterPendingDispatches(function() {
38 InspectorTest.addResult("======== Appended =========");
39 InspectorTest.dumpElementsTree(containerNode);
40 next();
43 InspectorTest.evaluateInPage("appendChild()", callback);
45 ]);
48 </script>
49 </head>
51 <body onload="runTest()">
52 <p>
53 Tests that elements panel updates hasChildren flag upon adding children to collapsed nodes.
54 </p>
56 <div id="container"></div>
58 </body>
59 </html>