mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 01:47:31 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
|
|
@ -0,0 +1,38 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Test clearSnapshots deletes snapshots with READ censuses
|
||||
|
||||
let { takeSnapshotAndCensus, clearSnapshots } = require("devtools/client/memory/actions/snapshot");
|
||||
let { snapshotState: states, actions } = require("devtools/client/memory/constants");
|
||||
const { treeMapState } = require("devtools/client/memory/constants");
|
||||
|
||||
function run_test() {
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
add_task(function* () {
|
||||
let front = new StubbedMemoryFront();
|
||||
let heapWorker = new HeapAnalysesClient();
|
||||
yield front.attach();
|
||||
let store = Store();
|
||||
const { getState, dispatch } = store;
|
||||
|
||||
dispatch(takeSnapshotAndCensus(front, heapWorker));
|
||||
yield waitUntilCensusState(store, s => s.treeMap, [treeMapState.SAVED]);
|
||||
ok(true, "snapshot created");
|
||||
|
||||
ok(true, "dispatch clearSnapshots action");
|
||||
let deleteEvents = Promise.all([
|
||||
waitUntilAction(store, actions.DELETE_SNAPSHOTS_START),
|
||||
waitUntilAction(store, actions.DELETE_SNAPSHOTS_END)
|
||||
]);
|
||||
dispatch(clearSnapshots(heapWorker));
|
||||
yield deleteEvents;
|
||||
ok(true, "received delete snapshots events");
|
||||
|
||||
equal(getState().snapshots.length, 0, "no snapshot remaining");
|
||||
|
||||
heapWorker.destroy();
|
||||
yield front.detach();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue