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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html

Issue 2244783004: DevTools: Refactor Profiler domain interface (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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-large-tree-search.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html
index 2df66b4aa33fdef4f08a0b106bff6dae67509b70..c66013ee8d0f4ecc9e03e1d6ce557d1859f32c39 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html
@@ -46,22 +46,15 @@ function test()
function checkInnerProfile(profile)
{
InspectorTest.log("SUCCESS: retrieved '42' profile");
- var root = profile.head;
- if (!findFunctionInProfile(root, "collectProfiles"))
+ if (!findFunctionInProfile(profile.nodes, "collectProfiles"))
return InspectorTest.fail("collectProfiles function not found in the profile: " + JSON.stringify(profile, null, 4));
InspectorTest.log("SUCCESS: found 'collectProfiles' function in the profile");
InspectorTest.completeTest();
}
- function findFunctionInProfile(node, functionName)
+ function findFunctionInProfile(nodes, functionName)
{
- if (node.callFrame.functionName === functionName)
- return true;
- var children = node.children;
- for (var i = 0; i < children.length; ++i)
- if (findFunctionInProfile(children[i], functionName))
- return true;
- return false;
+ return nodes.some(n => n.callFrame.functionName === functionName);
}
}
</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-bottom-up-large-tree-search.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698