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

Unified Diff: third_party/WebKit/LayoutTests/inspector/tracing/decode-resize.html

Issue 2486853002: Timeline: remove TimelineModel inferred properties from TracingModel.Event (Closed)
Patch Set: addressed comments and rebased Created 4 years, 1 month 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
Index: third_party/WebKit/LayoutTests/inspector/tracing/decode-resize.html
diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/decode-resize.html b/third_party/WebKit/LayoutTests/inspector/tracing/decode-resize.html
index 830f37bc95067d29a134f937e94a900fac1148db..eb2df3825ab803cc0abaaf24655a43ea7b4bf283 100644
--- a/third_party/WebKit/LayoutTests/inspector/tracing/decode-resize.html
+++ b/third_party/WebKit/LayoutTests/inspector/tracing/decode-resize.html
@@ -86,20 +86,24 @@ function test()
}
function compareImageURLs(a, b)
{
- var urlA = InspectorTest.formatters.formatAsURL(a.url || "<missing>");
- var urlB = InspectorTest.formatters.formatAsURL(b.url || "<missing>");
+ var urlA = WebInspector.TimelineData.forEvent(a).url;
+ var urlB = WebInspector.TimelineData.forEvent(b).url;
+ urlA = InspectorTest.formatters.formatAsURL(urlA || "<missing>");
+ urlB = InspectorTest.formatters.formatAsURL(urlB || "<missing>");
return urlA.localeCompare(urlB);
}
var events = InspectorTest.timelineModel().inspectedTargetEvents();
var sortedDecodeEvents = events.filter(isDecodeImageEvent).sort(compareImageURLs);
for (var i = 0; i < sortedDecodeEvents.length; ++i) {
var event = sortedDecodeEvents[i];
+ var timlelineData = WebInspector.TimelineData.forEvent(event);
+ var url = timlelineData.url;
// Skip duplicate events, as long as they have the imageURL
- if (i && event.url && event.url === sortedDecodeEvents[i - 1].url)
+ if (i && url && url === WebInspector.TimelineData.forEvent(sortedDecodeEvents[i - 1]).url)
continue;
InspectorTest.addResult("event: " + event.name);
- InspectorTest.addResult("imageURL: " + InspectorTest.formatters.formatAsURL(event.url));
- InspectorTest.addResult("backendNodeId: " + (event.backendNodeId > 0 ? "present" : "absent"));
+ InspectorTest.addResult("imageURL: " + InspectorTest.formatters.formatAsURL(url));
+ InspectorTest.addResult("backendNodeId: " + (timlelineData.backendNodeId > 0 ? "present" : "absent"));
}
InspectorTest.completeTest();
}

Powered by Google App Engine
This is Rietveld 408576698