| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="heap-snapshot-test.js"></script> | 4 <script src="heap-snapshot-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 var instanceCount = 25; | 9 var instanceCount = 25; |
| 10 function createHeapSnapshot() | 10 function createHeapSnapshot() |
| 11 { | 11 { |
| 12 return InspectorTest.createHeapSnapshot(instanceCount); | 12 return InspectorTest.createHeapSnapshot(instanceCount); |
| 13 } | 13 } |
| 14 | 14 |
| 15 InspectorTest.runHeapSnapshotTestSuite([ | 15 InspectorTest.runHeapSnapshotTestSuite([ |
| 16 function testShowNext(next) | 16 function testShowNext(next) |
| 17 { | 17 { |
| 18 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1); | 18 InspectorTest.takeAndOpenSnapshot(createHeapSnapshot, step1); |
| 19 | 19 |
| 20 function step1() | 20 function step1() |
| 21 { | 21 { |
| 22 InspectorTest.switchToView("Summary", step2); | 22 InspectorTest.switchToView("Summary", step2); |
| 23 } | 23 } |
| 24 | 24 |
| 25 function step2() | 25 function step2() |
| 26 { | 26 { |
| 27 var row = InspectorTest.findRow("object", "A"); | 27 var row = InspectorTest.findRow("A"); |
| 28 InspectorTest.assertEquals(true, !!row, "\"A\" row"); | 28 InspectorTest.assertEquals(true, !!row, "\"A\" row"); |
| 29 InspectorTest.expandRow(row, step3); | 29 InspectorTest.expandRow(row, step3); |
| 30 } | 30 } |
| 31 | 31 |
| 32 function step3(row) | 32 function step3(row) |
| 33 { | 33 { |
| 34 var rowsShown = InspectorTest.countDataRows(row); | 34 var rowsShown = InspectorTest.countDataRows(row); |
| 35 InspectorTest.assertEquals(true, rowsShown <= instanceCount, "sh
own more instances than created: " + rowsShown + " > " + instanceCount); | 35 InspectorTest.assertEquals(true, rowsShown <= instanceCount, "sh
own more instances than created: " + rowsShown + " > " + instanceCount); |
| 36 if (rowsShown < instanceCount) { | 36 if (rowsShown < instanceCount) { |
| 37 var buttonsNode = InspectorTest.findButtonsNode(row); | 37 var buttonsNode = InspectorTest.findButtonsNode(row); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 49 | 49 |
| 50 </script> | 50 </script> |
| 51 </head> | 51 </head> |
| 52 <body onload="runTest()"> | 52 <body onload="runTest()"> |
| 53 <p> | 53 <p> |
| 54 Tests Summary view of detailed heap snapshots. | 54 Tests Summary view of detailed heap snapshots. |
| 55 Repeated clicks on "Show Next" button must show all nodes. | 55 Repeated clicks on "Show Next" button must show all nodes. |
| 56 </p> | 56 </p> |
| 57 </body> | 57 </body> |
| 58 </html> | 58 </html> |
| OLD | NEW |