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

Unified Diff: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter.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-native-nodes-filter.html
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter.html b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter.html
index f715e10c0dc142f62249e357056f55a32646126b..0d963fb3e1f4815d86eab061134fee70a127d3f0 100644
--- a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter.html
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-native-nodes-filter.html
@@ -128,7 +128,6 @@ function test()
"endTime": 100000 + 111.110 + 22.220 + 1.000,
"samples": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
};
- profile.nodes = flattenNodes(profile.head);
var model = new WebInspector.CPUProfileDataModel(profile);
printTree("", model.profileHead);
function printTree(padding, node)
@@ -138,20 +137,14 @@ function test()
}
InspectorTest.addResult(model.samples.join(", "));
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 filtering of native nodes.
+Tests filtering of native nodes.<br/>
+Also tests loading of a legacy nodes format, where nodes were represented as a tree.
</p>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698