mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-01 18:58:55 +00:00
43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
/**
|
|
* Rough test that the recording still continues after a refresh.
|
|
*/
|
|
function spawnTest () {
|
|
let { panel, target } = yield initPerformance(SIMPLE_URL);
|
|
let { EVENTS, PerformanceController } = panel.panelWin;
|
|
|
|
// Enable memory to test all the overview graphs.
|
|
Services.prefs.setBoolPref(MEMORY_PREF, true);
|
|
|
|
yield startRecording(panel);
|
|
|
|
yield reload(target)
|
|
|
|
let rec = PerformanceController.getCurrentRecording();
|
|
let { markers, memory, ticks } = rec.getAllData();
|
|
// Store current length of items
|
|
let markersLength = markers.length;
|
|
let memoryLength = memory.length;
|
|
let ticksLength = ticks.length;
|
|
|
|
ok(rec.isRecording(), "RecordingModel should still be recording after reload");
|
|
|
|
yield busyWait(100);
|
|
yield waitUntil(() => rec.getMarkers().length > markersLength);
|
|
yield waitUntil(() => rec.getMemory().length > memoryLength);
|
|
yield waitUntil(() => rec.getTicks().length > ticksLength);
|
|
ok("Markers, memory and ticks continue after reload");
|
|
|
|
yield stopRecording(panel);
|
|
|
|
let { allocations, profile, frames } = rec.getAllData();
|
|
ok(allocations, "allocations exist after refresh");
|
|
ok(profile, "profile exists after refresh");
|
|
ok(frames, "frames exist after refresh");
|
|
|
|
yield teardown(panel);
|
|
finish();
|
|
}
|