mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-08-18 22:29:01 +00:00
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
requestLongerTimeout(2);
|
|
|
|
/**
|
|
* Tests that the js flamegraphs get rerendered when toggling `show-idle-blocks`
|
|
*/
|
|
function* spawnTest() {
|
|
let { panel } = yield initPerformance(SIMPLE_URL);
|
|
let { EVENTS, DetailsView, JsFlameGraphView } = panel.panelWin;
|
|
|
|
Services.prefs.setBoolPref(IDLE_PREF, true);
|
|
|
|
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(IDLE_PREF, false);
|
|
yield rendered;
|
|
|
|
ok(true, "JsFlameGraphView rerendered when toggling show-idle-blocks.");
|
|
|
|
rendered = once(JsFlameGraphView, EVENTS.JS_FLAMEGRAPH_RENDERED);
|
|
Services.prefs.setBoolPref(IDLE_PREF, true);
|
|
yield rendered;
|
|
|
|
ok(true, "JsFlameGraphView rerendered when toggling back show-idle-blocks.");
|
|
|
|
yield teardown(panel);
|
|
finish();
|
|
}
|