gecko-dev/toolkit/components/cleardata/tests/unit/test_basic.js
Johann Hofmann 4f767264a5 Bug 1532203 - Add a basic test for clearing network cache with ClearDataService. r=baku
This also moves SiteDataTestUtils to have it available in toolkit.

Differential Revision: https://phabricator.services.mozilla.com/D26248

--HG--
rename : browser/base/content/test/sanitize/SiteDataTestUtils.jsm => toolkit/components/cleardata/SiteDataTestUtils.jsm
extra : moz-landing-system : lando
2019-04-05 09:57:00 +00:00

19 lines
433 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Basic test for nsIClearDataService module.
*/
"use strict";
add_task(async function test_basic() {
Assert.ok(!!Services.clearData);
await new Promise(aResolve => {
Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => {
Assert.equal(value, 0);
aResolve();
});
});
});