Index: LayoutTests/inspector/timeline/timeline-test.js |
=================================================================== |
--- LayoutTests/inspector/timeline/timeline-test.js (revision 95841) |
+++ LayoutTests/inspector/timeline/timeline-test.js (working copy) |
@@ -31,6 +31,24 @@ |
}); |
}; |
+ |
+InspectorTest.waitForRecordType = function(recordType, callback) |
+{ |
+ WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineEventRecorded, function(event) { |
+ addRecord(event.data); |
+ }); |
+ |
+ function addRecord(record) |
+ { |
+ if (record.type !== WebInspector.TimelineAgent.RecordType[recordType]) { |
+ for (var i = 0; record.children && i < record.children.length; ++i) |
+ addRecord(record.children[i]); |
+ return ; |
+ } |
+ callback(record); |
+ } |
+} |
+ |
InspectorTest.stopTimeline = function(callback) |
{ |
function didStop() |