test_idle_maintenance.js (561B)
1 /** 2 * Any copyright is dedicated to the Public Domain. 3 * http://creativecommons.org/publicdomain/zero/1.0/ 4 */ 5 6 const { TestUtils } = ChromeUtils.importESModule( 7 "resource://testing-common/TestUtils.sys.mjs" 8 ); 9 10 /* exported testSteps */ 11 async function testSteps() { 12 info("Sending fake 'idle-daily' notification to QuotaManager"); 13 14 let observer = Services.qms.QueryInterface(Ci.nsIObserver); 15 16 observer.observe(null, "idle-daily", ""); 17 18 info("Waiting for maintenance to start"); 19 20 await TestUtils.topicObserved("QuotaManager::MaintenanceStarted"); 21 }