Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: devtools/client/memory/test/xpcshell/xpcshell.toml
/* Any copyright is dedicated to the Public Domain.
"use strict";
// Test toggling of diffing.
const {
toggleDiffing,
} = require("resource://devtools/client/memory/actions/diffing.js");
add_task(async function () {
const front = new StubbedMemoryFront();
const heapWorker = new HeapAnalysesClient();
await front.attach();
const store = Store();
const { getState, dispatch } = store;
equal(getState().diffing, null, "not diffing by default");
dispatch(toggleDiffing());
ok(getState().diffing, "now diffing after toggling");
dispatch(toggleDiffing());
equal(getState().diffing, null, "not diffing again after toggling again");
heapWorker.destroy();
await front.detach();
});