gecko-dev/browser/devtools/performance/test/browser_perf-options-profiler.js
Patrick Brosset f74b4d25f0 Bug 1168077 - Remove remaining spidermonkey js specific syntax from browser/devtools; r=miker
--HG--
extra : rebase_source : 15f48894284051c2f10d9b71c94d7074f893002a
2015-05-25 14:42:51 +02:00

27 lines
774 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._request("profiler", "getStartOptions");
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();
}