mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
f74b4d25f0
--HG-- extra : rebase_source : 15f48894284051c2f10d9b71c94d7074f893002a
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
/**
|
|
* Tests that the details view utility functions work as advertised.
|
|
*/
|
|
function* spawnTest() {
|
|
let { panel } = yield initPerformance(SIMPLE_URL);
|
|
let { EVENTS, DetailsView } = panel.panelWin;
|
|
let { PerformanceController, WaterfallView, JsCallTreeView } = panel.panelWin;
|
|
|
|
yield startRecording(panel);
|
|
yield stopRecording(panel);
|
|
|
|
ok(DetailsView.isViewSelected(WaterfallView),
|
|
"The waterfall view is selected by default in the details view.");
|
|
|
|
let selected = DetailsView.whenViewSelected(JsCallTreeView);
|
|
let notified = DetailsView.once(EVENTS.DETAILS_VIEW_SELECTED);
|
|
yield DetailsView.selectView("js-calltree");
|
|
yield Promise.all([selected, notified]);
|
|
|
|
ok(DetailsView.isViewSelected(JsCallTreeView),
|
|
"The jscalltree view is now selected in the details view.");
|
|
|
|
yield PerformanceController.clearRecordings();
|
|
|
|
yield startRecording(panel);
|
|
let render = once(JsCallTreeView, EVENTS.JS_CALL_TREE_RENDERED);
|
|
yield stopRecording(panel);
|
|
yield render;
|
|
|
|
ok(DetailsView.isViewSelected(JsCallTreeView),
|
|
"The jscalltree view is still selected in the details view");
|
|
|
|
yield teardown(panel);
|
|
finish();
|
|
}
|