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 testShownNodeCountPreservedWhenSorting(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("showNext", buttonsNode, step5
); | |
42 } | |
43 | |
44 var nodeCount; | |
45 function step5(row) | |
46 { | |
47 // There must be enough nodes to have some unrevealed. | |
48 var buttonsNode = InspectorTest.findButtonsNode(row); | |
49 InspectorTest.assertEquals(true, !!buttonsNode, "no buttons node
found!"); | |
50 | |
51 nodeCount = InspectorTest.columnContents(columns[0]).length; | |
52 InspectorTest.assertEquals(true, nodeCount > 0, "nodeCount > 0")
; | |
53 | |
54 InspectorTest.clickColumn(columns[0], clickTwice); | |
55 function clickTwice() | |
56 { | |
57 InspectorTest.clickColumn(columns[0], step6); | |
58 } | |
59 } | |
60 | |
61 function step6() | |
62 { | |
63 var newNodeCount = InspectorTest.columnContents(columns[0]).leng
th; | |
64 InspectorTest.assertEquals(nodeCount, newNodeCount); | |
65 setTimeout(next, 0); | |
66 } | |
67 } | |
68 ]); | |
69 } | |
70 | |
71 </script> | |
72 </head> | |
73 <body onload="runTest()"> | |
74 <p> | |
75 Tests Dominators view of detailed heap snapshots. | |
76 Shown node count must be preserved after sorting. | |
77 </p> | |
78 </body> | |
79 </html> | |
OLD | NEW |