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

Unified Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details.html

Issue 2872853002: DevTools: Support grouping by Product in performance tree views. (Closed)
Patch Set: Created 3 years, 7 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/tracing/timeline-misc/timeline-aggregated-details.html
diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details.html
index fdf683f188ac9c92a8ac23f14901549f47cc1150..29f57adf7ecad9943fc8cad827f4f3522b3c049c 100644
--- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details.html
+++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details.html
@@ -4,7 +4,7 @@
<script src="../../../http/tests/inspector/timeline-test.js"></script>
<script>
-function test()
+async function test()
{
var sessionId = "6.23";
var rawTraceEvents = [
@@ -469,10 +469,10 @@ function test()
"args": {
"data": {
"stackTrace": [
- { "functionName": "recursive_b", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" },
- { "functionName": "recursive_a", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" },
- { "functionName": "recursive_b", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" },
- { "functionName": "recursive_a", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" }
+ { "functionName": "recursive_b", "scriptId": 1, "url": "http://www.google.com/rec.js" },
+ { "functionName": "recursive_a", "scriptId": 1, "url": "http://www.google.com/rec.js" },
+ { "functionName": "recursive_b", "scriptId": 1, "url": "http://www.google.com/rec.js" },
+ { "functionName": "recursive_a", "scriptId": 1, "url": "http://www.google.com/rec.js" }
]
}
},
@@ -487,9 +487,9 @@ function test()
"args": {
"data": {
"stackTrace": [
- { "functionName": "recursive_a", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" },
- { "functionName": "recursive_b", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" },
- { "functionName": "recursive_a", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" }
+ { "functionName": "recursive_a", "scriptId": 1, "url": "http://www.google.com/rec.js" },
+ { "functionName": "recursive_b", "scriptId": 1, "url": "http://www.google.com/rec.js" },
+ { "functionName": "recursive_a", "scriptId": 1, "url": "http://www.google.com/rec.js" }
]
}
},
@@ -504,8 +504,8 @@ function test()
"args": {
"data": {
"stackTrace": [
- { "functionName": "recursive_b", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" },
- { "functionName": "recursive_a", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" }
+ { "functionName": "recursive_b", "scriptId": 1, "url": "http://www.google.com/rec.js" },
+ { "functionName": "recursive_a", "scriptId": 1, "url": "http://www.google.com/rec.js" }
]
}
},
@@ -520,7 +520,7 @@ function test()
"args": {
"data": {
"stackTrace": [
- { "functionName": "recursive_a", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" }
+ { "functionName": "recursive_a", "scriptId": 1, "url": "http://www.google.com/rec.js" }
]
}
},
@@ -549,8 +549,8 @@ function test()
"args": {
"data": {
"stackTrace": [
- { "functionName": "recursive_b", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" },
- { "functionName": "recursive_a", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" }
+ { "functionName": "recursive_b", "scriptId": 1, "url": "http://www.google.com/rec.js" },
+ { "functionName": "recursive_a", "scriptId": 1, "url": "http://www.google.com/rec.js" }
]
}
},
@@ -565,7 +565,7 @@ function test()
"args": {
"data": {
"stackTrace": [
- { "functionName": "recursive_a", "scriptId": 1, "url": "http://xyz.abc.com/rec.js" }
+ { "functionName": "recursive_a", "scriptId": 1, "url": "http://www.google.com/rec.js" }
]
}
},
@@ -606,31 +606,33 @@ function test()
timeline._setModel(InspectorTest.createPerformanceModelWithEvents(rawTraceEvents));
timeline.requestWindowTimes(0, Infinity);
+ await getTreeView("CallTree")._productRegistryPromiseForTest;
+ await getTreeView("BottomUp")._productRegistryPromiseForTest;
var groupByEnum = Timeline.AggregatedTimelineTreeView.GroupBy;
- for (var grouping in groupByEnum) {
- var groupingValue = groupByEnum[grouping];
- testEventTree("CallTree", groupingValue);
- testEventTree("BottomUp", groupingValue);
+ for (var grouping of Object.values(groupByEnum)) {
+ testEventTree("CallTree", grouping);
+ testEventTree("BottomUp", grouping);
}
-
testEventTree("EventLog");
InspectorTest.completeTest();
- function testEventTree(type, grouping)
+ function getTreeView(type)
{
- InspectorTest.addResult("");
- var tree;
if (timeline._tabbedPane) {
timeline._tabbedPane.selectTab(type, true);
- tree = timeline._currentView._treeView;
- } else {
- timeline._currentView._detailsView._tabbedPane.selectTab(type, true);
- tree = timeline._currentView._detailsView._tabbedPane.visibleView;
+ return timeline._currentView._treeView;
}
+ timeline._currentView._detailsView._tabbedPane.selectTab(type, true);
+ return timeline._currentView._detailsView._tabbedPane.visibleView;
+ }
+
+ function testEventTree(type, grouping)
+ {
+ InspectorTest.addResult("");
+ var tree = getTreeView(type);
if (grouping) {
InspectorTest.addResult(type + " Group by: " + grouping);
- tree._groupByCombobox.select(tree._groupByCombobox.options().find(x => x.value === grouping));
- tree._onGroupByChanged();
+ tree._groupBySetting.set(grouping);
} else {
InspectorTest.addResult(type);
}
@@ -643,9 +645,9 @@ function test()
{
var name;
if (node.isGroupNode()) {
- name = treeView._displayInfoForGroupNode(node).name;
+ name = treeView._displayInfoForGroupNode(node).name;
} else {
- name = node.event.name === TimelineModel.TimelineModel.RecordType.JSFrame
+ name = node.event.name === TimelineModel.TimelineModel.RecordType.JSFrame
? UI.beautifyFunctionName(node.event.args["data"]["functionName"])
: Timeline.TimelineUIUtils.eventTitle(node.event);
}

Powered by Google App Engine
This is Rietveld 408576698