mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
f74b4d25f0
--HG-- extra : rebase_source : 15f48894284051c2f10d9b71c94d7074f893002a
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
/**
|
|
* Tests that the js flamegraphs get rerendered when toggling `show-platform-data`
|
|
*/
|
|
function* spawnTest() {
|
|
let { panel } = yield initPerformance(SIMPLE_URL);
|
|
let { EVENTS, DetailsView, JsFlameGraphView } = panel.panelWin;
|
|
|
|
Services.prefs.setBoolPref(PLATFORM_DATA_PREF, false);
|
|
|
|
yield startRecording(panel);
|
|
yield busyWait(100);
|
|
yield stopRecording(panel);
|
|
|
|
let rendered = once(JsFlameGraphView, EVENTS.JS_FLAMEGRAPH_RENDERED);
|
|
yield DetailsView.selectView("js-flamegraph");
|
|
yield rendered;
|
|
|
|
rendered = once(JsFlameGraphView, EVENTS.JS_FLAMEGRAPH_RENDERED);
|
|
Services.prefs.setBoolPref(PLATFORM_DATA_PREF, true);
|
|
yield rendered;
|
|
ok(true, "JsFlameGraphView rerendered when toggling on show-platform-data.");
|
|
|
|
rendered = once(JsFlameGraphView, EVENTS.JS_FLAMEGRAPH_RENDERED);
|
|
Services.prefs.setBoolPref(PLATFORM_DATA_PREF, false);
|
|
yield rendered;
|
|
ok(true, "JsFlameGraphView rerendered when toggling off show-platform-data.");
|
|
|
|
yield teardown(panel);
|
|
finish();
|
|
}
|