| Index: LayoutTests/http/tests/inspector/timeline-test.js
|
| diff --git a/LayoutTests/http/tests/inspector/timeline-test.js b/LayoutTests/http/tests/inspector/timeline-test.js
|
| index d340854654ef387d168b96ca23ff0a09914b0581..d52200438f9f0ec64a6d1efa1a35484d61ffac24 100644
|
| --- a/LayoutTests/http/tests/inspector/timeline-test.js
|
| +++ b/LayoutTests/http/tests/inspector/timeline-test.js
|
| @@ -280,13 +280,23 @@ InspectorTest.printTimelineRecordProperties = function(record)
|
|
|
| InspectorTest.findFirstTimelineRecord = function(type)
|
| {
|
| + return InspectorTest.findTimelineRecord(type, 0);
|
| +}
|
| +
|
| +// Find the (n+1)th timeline record of a specific type.
|
| +InspectorTest.findTimelineRecord = function(type, n)
|
| +{
|
| var result;
|
| function findByType(record)
|
| {
|
| if (record.type() !== type)
|
| return false;
|
| - result = record;
|
| - return true;
|
| + if (n === 0) {
|
| + result = record;
|
| + return true;
|
| + }
|
| + n--;
|
| + return false;
|
| }
|
| InspectorTest.timelineModel().forAllRecords(findByType);
|
| return result;
|
|
|