tenfourfox/devtools/client/performance/test/browser_perf-options-profiler.js
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

27 lines
753 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Tests that setting the `devtools.performance.profiler.` prefs propagate to the profiler actor.
*/
function* spawnTest() {
let { panel } = yield initPerformance(SIMPLE_URL);
let { gFront } = panel.panelWin;
Services.prefs.setIntPref(PROFILER_BUFFER_SIZE_PREF, 1000);
Services.prefs.setIntPref(PROFILER_SAMPLE_RATE_PREF, 2);
yield startRecording(panel);
let { entries, interval } = yield gFront.getConfiguration();
yield stopRecording(panel);
is(entries, 1000, "profiler entries option is set on profiler");
is(interval, 0.5, "profiler interval option is set on profiler");
yield teardown(panel);
finish();
}