| 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 = 24; | 9 var instanceCount = 24; |
| 10 function createHeapSnapshotA() | 10 function createHeapSnapshotA() |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 InspectorTest.takeAndOpenSnapshot(createHeapSnapshotB, step1); | 24 InspectorTest.takeAndOpenSnapshot(createHeapSnapshotB, step1); |
| 25 } | 25 } |
| 26 | 26 |
| 27 function step1() | 27 function step1() |
| 28 { | 28 { |
| 29 InspectorTest.switchToView("Comparison", step2); | 29 InspectorTest.switchToView("Comparison", step2); |
| 30 } | 30 } |
| 31 | 31 |
| 32 function step2() | 32 function step2() |
| 33 { | 33 { |
| 34 var row = InspectorTest.findRow("object", "A"); | 34 var row = InspectorTest.findRow("A"); |
| 35 InspectorTest.assertEquals(true, !!row, "\"A\" row"); | 35 InspectorTest.assertEquals(true, !!row, "\"A\" row"); |
| 36 InspectorTest.expandRow(row, step3); | 36 InspectorTest.expandRow(row, step3); |
| 37 } | 37 } |
| 38 | 38 |
| 39 function step3(row) | 39 function step3(row) |
| 40 { | 40 { |
| 41 var expectedRowCountA = parseInt(row.data["addedCount"]); | 41 var expectedRowCountA = parseInt(row.data["addedCount"]); |
| 42 var rowsShown = InspectorTest.countDataRows(row, function(node)
{ return node.data.addedCount; }); | 42 var rowsShown = InspectorTest.countDataRows(row, function(node)
{ return node.data.addedCount; }); |
| 43 InspectorTest.assertEquals(true, rowsShown <= expectedRowCountA,
"shown more instances than created: " + rowsShown + " > " + expectedRowCountA); | 43 InspectorTest.assertEquals(true, rowsShown <= expectedRowCountA,
"shown more instances than created: " + rowsShown + " > " + expectedRowCountA); |
| 44 if (rowsShown < expectedRowCountA) { | 44 if (rowsShown < expectedRowCountA) { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 70 | 70 |
| 71 </script> | 71 </script> |
| 72 </head> | 72 </head> |
| 73 <body onload="runTest()"> | 73 <body onload="runTest()"> |
| 74 <p> | 74 <p> |
| 75 Tests Comparison view of detailed heap snapshots. | 75 Tests Comparison view of detailed heap snapshots. |
| 76 Repeated clicks on "Show Next" button must show all nodes. | 76 Repeated clicks on "Show Next" button must show all nodes. |
| 77 </p> | 77 </p> |
| 78 </body> | 78 </body> |
| 79 </html> | 79 </html> |
| OLD | NEW |