mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
f74b4d25f0
--HG-- extra : rebase_source : 15f48894284051c2f10d9b71c94d7074f893002a
33 lines
1.0 KiB
JavaScript
33 lines
1.0 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
/**
|
|
* Test basic functionality of PerformanceFront
|
|
*/
|
|
|
|
let WAIT_TIME = 1000;
|
|
|
|
function* spawnTest() {
|
|
let { target, front } = yield initBackend(SIMPLE_URL);
|
|
|
|
let startModel = yield front.startRecording();
|
|
let { profilerStartTime, timelineStartTime, memoryStartTime } = startModel;
|
|
|
|
ok(startModel._profilerStartTime !== undefined,
|
|
"A `_profilerStartTime` property exists in the recording model.");
|
|
ok(startModel._timelineStartTime !== undefined,
|
|
"A `_timelineStartTime` property exists in the recording model.");
|
|
is(startModel._memoryStartTime, 0,
|
|
"A `_memoryStartTime` property exists in the recording model, but it's 0.");
|
|
|
|
yield busyWait(WAIT_TIME);
|
|
|
|
let stopModel = yield front.stopRecording(startModel);
|
|
|
|
ok(stopModel.getProfile(), "recording model has a profile after stopping.");
|
|
ok(stopModel.getDuration(), "recording model has a duration after stopping.");
|
|
|
|
yield removeTab(target.tab);
|
|
finish();
|
|
}
|