OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
4 <script src="heap-snapshot-test.js"></script> | |
5 <script> | |
6 | |
7 function test() | |
8 { | |
9 var instanceCount = 25; | |
10 function createHeapSnapshot() | |
11 { | |
12 return InspectorTest.createHeapSnapshot(instanceCount); | |
13 } | |
14 | |
15 InspectorTest.runHeapSnapshotTestSuite([ | |
16 function testExpansionPreservedWhenSorting(next) | |
17 { | |
18 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1); | |
19 | |
20 function step1() | |
21 { | |
22 InspectorTest.switchToView("Dominators", step2); | |
23 } | |
24 | |
25 var columns; | |
26 function step2() | |
27 { | |
28 columns = InspectorTest.viewColumns(); | |
29 InspectorTest.clickColumn(columns[0], step3); | |
30 } | |
31 | |
32 function step3() | |
33 { | |
34 InspectorTest.findAndExpandWindow(step4); | |
35 } | |
36 | |
37 function step4(row) | |
38 { | |
39 var buttonsNode = InspectorTest.findButtonsNode(row); | |
40 InspectorTest.assertEquals(true, !!buttonsNode, "no buttons node
found!"); | |
41 InspectorTest.clickShowMoreButton("showAll", buttonsNode, step5)
; | |
42 } | |
43 | |
44 function step5(row) | |
45 { | |
46 var row = row.children[0]; | |
47 InspectorTest.assertEquals(true, !!row, "\"B\" instance row"); | |
48 InspectorTest.expandRow(row, step6); | |
49 } | |
50 | |
51 var columnContents; | |
52 function step6() | |
53 { | |
54 columnContents = InspectorTest.columnContents(columns[0]); | |
55 InspectorTest.clickColumn(columns[0], clickTwice); | |
56 function clickTwice() | |
57 { | |
58 InspectorTest.clickColumn(columns[0], step7); | |
59 } | |
60 } | |
61 | |
62 function step7() | |
63 { | |
64 var newColumnContents = InspectorTest.columnContents(columns[0])
; | |
65 InspectorTest.assertColumnContentsEqual(columnContents, newColum
nContents); | |
66 setTimeout(next, 0); | |
67 } | |
68 } | |
69 ]); | |
70 } | |
71 | |
72 </script> | |
73 </head> | |
74 <body onload="runTest()"> | |
75 <p> | |
76 Tests Dominators view of detailed heap snapshots. | |
77 Expanded nodes must be preserved after sorting. | |
78 </p> | |
79 </body> | |
80 </html> | |
OLD | NEW |