mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-07-15 03:29:01 +00:00
33 lines
931 B
JavaScript
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();
|
||
|
}
|