mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
ad68417609
From 2b0d8712c363893515e181de147ac3c8e0c51890 Mon Sep 17 00:00:00 2001 stops current recording. r=vp
35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
/**
|
|
* Tests that clearing recordings empties out the recordings list and stops
|
|
* a current recording if recording.
|
|
*/
|
|
|
|
let test = Task.async(function*() {
|
|
let { target, panel, toolbox } = yield initPerformance(SIMPLE_URL);
|
|
let { EVENTS, PerformanceController, PerformanceView, RecordingsView } = panel.panelWin;
|
|
|
|
yield startRecording(panel);
|
|
yield stopRecording(panel);
|
|
|
|
yield startRecording(panel);
|
|
|
|
let stopped = Promise.all([
|
|
once(PerformanceController, EVENTS.RECORDING_STOPPED),
|
|
once(PerformanceController, EVENTS.RECORDINGS_CLEARED)
|
|
]);
|
|
PerformanceController.clearRecordings();
|
|
yield stopped;
|
|
|
|
is(RecordingsView.itemCount, 0,
|
|
"RecordingsView should be empty.");
|
|
is(PerformanceView.getState(), "empty",
|
|
"PerformanceView should be in an empty state.");
|
|
is(PerformanceController.getCurrentRecording(), null,
|
|
"There should be no current recording.");
|
|
|
|
yield teardown(panel);
|
|
finish();
|
|
});
|