mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1152631 - We no longer display category data for platform data in call tree, r=jsantell
This commit is contained in:
parent
2c5cee2634
commit
93cfa3156c
@ -15,6 +15,7 @@ support-files =
|
||||
[browser_markers-parse-html.js]
|
||||
[browser_markers-timestamp.js]
|
||||
[browser_perf-allocations-to-samples.js]
|
||||
[browser_perf-categories-js-calltree.js]
|
||||
[browser_perf-compatibility-01.js]
|
||||
[browser_perf-compatibility-02.js]
|
||||
[browser_perf-compatibility-03.js]
|
||||
|
@ -0,0 +1,38 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* Tests that the categories are shown in the js call tree when platform data
|
||||
* is enabled.
|
||||
*/
|
||||
function spawnTest () {
|
||||
let { panel } = yield initPerformance(SIMPLE_URL);
|
||||
let { EVENTS, $, DetailsView, JsCallTreeView } = panel.panelWin;
|
||||
|
||||
// Enable platform data to show the categories.
|
||||
Services.prefs.setBoolPref(PLATFORM_DATA_PREF, true);
|
||||
|
||||
yield startRecording(panel);
|
||||
yield busyWait(100);
|
||||
|
||||
let rendered = once(JsCallTreeView, EVENTS.JS_CALL_TREE_RENDERED);
|
||||
yield stopRecording(panel);
|
||||
yield DetailsView.selectView("js-calltree");
|
||||
yield rendered;
|
||||
|
||||
is($(".call-tree-cells-container").hasAttribute("categories-hidden"), false,
|
||||
"The call tree cells container should show the categories now.");
|
||||
ok($(".call-tree-category[value=Gecko]"),
|
||||
"A category node with the label `Gecko` is displayed in the tree.");
|
||||
|
||||
// Disable platform data to show the categories.
|
||||
Services.prefs.setBoolPref(PLATFORM_DATA_PREF, false);
|
||||
|
||||
is($(".call-tree-cells-container").getAttribute("categories-hidden"), "",
|
||||
"The call tree cells container should hide the categories now.");
|
||||
ok(!$(".call-tree-category[value=Gecko]"),
|
||||
"A category node with the label `Gecko` doesn't exist in the tree anymore.");
|
||||
|
||||
yield teardown(panel);
|
||||
finish();
|
||||
}
|
@ -123,8 +123,8 @@ let JsCallTreeView = Heritage.extend(DetailsSubview, {
|
||||
root.attachTo(this.container);
|
||||
|
||||
// When platform data isn't shown, hide the cateogry labels, since they're
|
||||
// only available for C++ frames.
|
||||
root.toggleCategories(options.contentOnly);
|
||||
// only available for C++ frames. Pass *false* to make them invisible.
|
||||
root.toggleCategories(!options.contentOnly);
|
||||
|
||||
// Return the CallView for tests
|
||||
return root;
|
||||
|
Loading…
Reference in New Issue
Block a user