stackTrace: "formatAsTypeName",
url: "formatAsURL",
scriptName: "formatAsTypeName",
+ scriptId: "formatAsTypeName",
usedHeapSizeDelta: "skip",
mimeType: "formatAsTypeName",
id: "formatAsTypeName",
scriptLine: "formatAsTypeName",
layerId: "formatAsTypeName",
lineNumber: "formatAsTypeName",
+ columnNumber: "formatAsTypeName",
frameId: "formatAsTypeName",
encodedDataLength: "formatAsTypeName",
identifier: "formatAsTypeName",
clip: "formatAsTypeName",
root: "formatAsTypeName",
- rootNode: "formatAsTypeName",
- layerRootNode: "formatAsTypeName",
- elementId: "formatAsTypeName",
+ backendNodeId: "formatAsTypeName",
networkTime: "formatAsTypeName",
thread: "formatAsTypeName"
};
}
}
+InspectorTest.invokeAsyncWithTimeline = function(functionName, doneCallback)
+{
+ InspectorTest.startTimeline(step1);
+ function step1()
+ {
+ InspectorTest.invokePageFunctionAsync(functionName, step2);
+ }
+
+ function step2()
+ {
+ InspectorTest.stopTimeline(doneCallback);
+ }
+}
+
InspectorTest.loadTimelineRecords = function(records)
{
var model = WebInspector.inspectorView.showPanel("timeline")._model;
}
InspectorTest.completeTest();
}
- InspectorTest.evaluateWithTimeline(actions, callback)
+ InspectorTest.evaluateWithTimeline(actions, callback);
};
InspectorTest.printTimelineRecords = function(typeName, formatter)
InspectorTest.innerPrintTimelineRecords(InspectorTest._timelineRecords, typeName, formatter);
};
+InspectorTest.printTimelinePresentationRecords = function(typeName, formatter)
+{
+ InspectorTest.innerPrintTimelinePresentationRecords(WebInspector.panels.timeline._model.records(), typeName, formatter);
+};
+
InspectorTest.printTimestampRecords = function(typeName, formatter)
{
InspectorTest.innerPrintTimelineRecords(InspectorTest.timelineModel().eventDividerRecords(), typeName, formatter);
InspectorTest.innerPrintTimelineRecords = function(records, typeName, formatter)
{
for (var i = 0; i < records.length; ++i) {
- if (typeName && records[i].type === WebInspector.TimelineModel.RecordType[typeName])
+ var recordTypeName = (typeof records[i].type === "string") ? records[i].type : records[i].type();
+ if (typeName && recordTypeName === WebInspector.TimelineModel.RecordType[typeName])
+ InspectorTest.printTimelineRecordProperties(records[i]);
+ if (formatter)
+ formatter(records[i]);
+ }
+};
+
+InspectorTest.innerPrintTimelinePresentationRecords = function(records, typeName, formatter)
+{
+ for (var i = 0; i < records.length; ++i) {
+ if (typeName && records[i].type() === WebInspector.TimelineModel.RecordType[typeName])
InspectorTest.printTimelineRecordProperties(records[i]);
if (formatter)
formatter(records[i]);
+ InspectorTest.innerPrintTimelinePresentationRecords(records[i].children(), typeName, formatter);
}
};
prefix = prefix + "> ";
if (presentationRecord.coalesced()) {
suffix = " x " + presentationRecord.presentationChildren().length;
- } else if (record.type === WebInspector.TimelineModel.RecordType.TimeStamp
- || record.type === WebInspector.TimelineModel.RecordType.ConsoleTime) {
- suffix = " : " + record.data.message;
+ } else if (record.type() === WebInspector.TimelineModel.RecordType.TimeStamp
+ || record.type() === WebInspector.TimelineModel.RecordType.ConsoleTime) {
+ suffix = " : " + record.data().message;
}
if (detailsCallback)
suffix += " " + detailsCallback(record);
- InspectorTest.addResult(prefix + InspectorTest._timelineAgentTypeToString(record.type) + suffix);
+ InspectorTest.addResult(prefix + InspectorTest._timelineAgentTypeToString(record.type()) + suffix);
var numChildren = presentationRecord.presentationChildren() ? presentationRecord.presentationChildren().length : 0;
for (var i = 0; i < numChildren; ++i) {
- if (filterTypes && filterTypes.indexOf(presentationRecord.presentationChildren()[i].record().type) == -1)
+ if (filterTypes && filterTypes.indexOf(presentationRecord.presentationChildren()[i].record().type()) == -1)
continue;
InspectorTest.dumpPresentationRecord(presentationRecord.presentationChildren()[i], detailsCallback, level + 1, filterTypes);
}
InspectorTest.printTimelineRecordProperties = function(record)
{
- InspectorTest.addResult(InspectorTest._timelineAgentTypeToString(record.type) + " Properties:");
+ var recordType = (typeof record.type === "string") ? record.type : record.type();
+ InspectorTest.addResult(InspectorTest._timelineAgentTypeToString(recordType) + " Properties:");
// Use this recursive routine to print the properties
- if (record instanceof WebInspector.TimelineModel.Record)
+ if (record instanceof WebInspector.TimelineModel.RecordImpl)
record = record._record;
InspectorTest.addObject(record, InspectorTest.timelinePropertyFormatters);
};
var result;
function findByType(record)
{
- if (record.type !== type)
+ if (record.type() !== type)
return false;
result = record;
return true;