Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: LayoutTests/http/tests/inspector/timeline-test.js

Issue 337023004: Don't create TimelineModel.RecordImpl in TimelinePresentationModel.js (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/timeline/timeline-coalescing.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9d4933ec41042d116fc3529d7c413095582d3a73..17df7afac81285c259a12c657e8fd4045b8c2018 100644
--- a/LayoutTests/http/tests/inspector/timeline-test.js
+++ b/LayoutTests/http/tests/inspector/timeline-test.js
@@ -207,7 +207,7 @@ InspectorTest.dumpTimelineRecord = function(record, detailsCallback, level, filt
// Dump just the record name, indenting output on separate lines for subrecords
InspectorTest.dumpPresentationRecord = function(presentationRecord, detailsCallback, level, filterTypes)
{
- var record = presentationRecord.record();
+ var record = !presentationRecord.presentationParent() ? null : presentationRecord.record();
if (typeof level !== "number")
level = 0;
var prefix = "";
@@ -218,13 +218,14 @@ InspectorTest.dumpPresentationRecord = function(presentationRecord, detailsCallb
prefix = prefix + "> ";
if (presentationRecord.coalesced()) {
suffix = " x " + presentationRecord.presentationChildren().length;
- } else if (record.type() === WebInspector.TimelineModel.RecordType.TimeStamp
- || record.type() === WebInspector.TimelineModel.RecordType.ConsoleTime) {
+ } else if (record && (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);
+ suffix += " " + detailsCallback(presentationRecord);
+ var typeString = record ? InspectorTest._timelineAgentTypeToString(record.type()) : "Root";
+ InspectorTest.addResult(prefix + typeString + suffix);
var numChildren = presentationRecord.presentationChildren() ? presentationRecord.presentationChildren().length : 0;
for (var i = 0; i < numChildren; ++i) {
« no previous file with comments | « no previous file | LayoutTests/inspector/timeline/timeline-coalescing.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698