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

33 lines
931 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Tests that the controller handles recording via the `stopwatch` button
* in the UI.
*/
var WAIT_TIME = 10;
function* spawnTest() {
let { panel } = yield initPerformance(SIMPLE_URL);
let { EVENTS, PerformanceController } = panel.panelWin;
let front = panel.panelWin.gFront;
PMM_loadFrameScripts(gBrowser);
ok(!(yield PMM_isProfilerActive()),
"The built-in profiler module should not have been automatically started.");
yield startRecording(panel);
busyWait(WAIT_TIME); // allow the profiler module to sample some cpu activity
ok((yield PMM_isProfilerActive()),
"The built-in profiler module should now be active.");
yield stopRecording(panel);
ok((yield PMM_isProfilerActive()),
"The built-in profiler module should still be active.");
yield teardown(panel);
finish();
}