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

Unified Diff: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html

Issue 2248963005: DevTools: Support loading of legacy CPU profile format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
Index: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
index b0c93b7bba53e2fd61986ada2129e62fe597de22..693cdc8cbf76374ad3c5f4a01189ea334b01174b 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-flame-chart-overview.html
@@ -931,7 +931,6 @@ function test()
var profile = profileAndExpectations._profile;
var startTime = profile.startTime * 1000;
var endTime = profile.endTime * 1000;
- profile.nodes = flattenNodes(profile.head);
profile.startTime /= 1000;
profile.endTime /= 1000;
var samplingInterval = (endTime - startTime) / (profile.samples.length - 1);
@@ -950,21 +949,14 @@ function test()
console.log(Object.values(overviewPane._calculateDrawData(2)));
console.log(Object.values(overviewPane._calculateDrawData(1)));
InspectorTest.completeTest();
-
- function flattenNodes(node)
- {
- var childrenIds = node.children.map(n => n.id);
- var result = node.children.reduce((res, n) => res.concat(flattenNodes(n)), [node]);
- node.children = childrenIds;
- return result;
- }
}
</script>
</head>
<body onload="runTest()">
<p>
-Tests Overview pane calculation in FlameChart for different width = 2^n with n in range 4 - 0.
+Tests Overview pane calculation in FlameChart for different width = 2^n with n in range 4 - 0.<br/>
+Also tests loading of a legacy nodes format, where nodes were represented as a tree.
</p>
</body>

Powered by Google App Engine
This is Rietveld 408576698