Index: LayoutTests/inspector/timeline/timeline-gc-event.html |
diff --git a/LayoutTests/inspector/timeline/timeline-gc-event.html b/LayoutTests/inspector/timeline/timeline-gc-event.html |
index a7d19354f6987bf40acc4dd52005d0aac06d99e1..3936a676f0c27e03cd7761adededd474d4a178d1 100644 |
--- a/LayoutTests/inspector/timeline/timeline-gc-event.html |
+++ b/LayoutTests/inspector/timeline/timeline-gc-event.html |
@@ -18,13 +18,12 @@ function test() |
function validate(records) |
{ |
- for (var i = 0; i < records.length; ++i) { |
- var record = records[i]; |
- if (record.type === WebInspector.TimelineModel.RecordType.GCEvent) { |
- InspectorTest.addResult("The expected GC event record"); |
- InspectorTest.addObject(record, InspectorTest.timelinePropertyFormatters); |
- break; |
- } |
+ var gcRecords = InspectorTest.filterTimelineRecords(WebInspector.TimelineModel.RecordType.GCEvent, true); |
+ if (gcRecords.length) { |
+ InspectorTest.addResult("The expected GC event record"); |
+ InspectorTest.addObject(gcRecords[0], InspectorTest.timelinePropertyFormatters); |
+ } else { |
+ InspectorTest.addResult("FAILED: GC event record wasn't found"); |
} |
InspectorTest.completeTest(); |