Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / elements / expand-recursively.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <script>
6
7 function test()
8 {
9     var treeOutline = InspectorTest.firstElementsTreeOutline();
10     InspectorTest.findNode(function() { return false; }, firstStep);
11         
12     function firstStep()
13     {
14         InspectorTest.addResult("===== Initial state of tree outline =====\n");
15         dump();
16
17         var topNode = treeOutline.children[0].children[1].children[1];
18         topNode.expandRecursively();
19         InspectorTest.runAfterPendingDispatches(secondStep);
20     };
21         
22     function secondStep()
23     {
24         InspectorTest.addResult("\n===== State of tree outline after calling .expandRecursively() =====\n");
25         dump();
26
27         InspectorTest.completeTest();
28     };
29
30     function dump()
31     {
32         var node = InspectorTest.expandedNodeWithId("depth-1");
33         InspectorTest.dumpElementsTree(node);
34     };
35 }
36
37 </script>
38 </head>
39
40 <body onload="runTest()">
41 <p>
42 Tests that expanding elements recursively works.
43 </p>
44
45 <div id="depth-1">
46     <div id="depth-2">
47         <div id="depth-3">
48             <div id="depth-4">
49                 <div id="depth-5">
50                     <div id="depth-6">
51                         <div id="depth-7">
52                             <div id="depth-8">
53                                 <div id="depth-9">
54                                     <div id="depth-10"></div>
55                                 </div>
56                             </div>
57                         </div>
58                     </div>
59                 </div>
60             </div>
61         </div>
62     </div>
63 </div>
64
65 </body>
66 </html>