nsICacheTesting.idl (1331B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 #include "nsISupports.idl" 6 7 interface nsIObserver; 8 9 /** 10 * This is an internal interface used only for testing purposes. 11 * 12 * THIS IS NOT AN API TO BE USED BY EXTENSIONS! ONLY USED BY MOZILLA TESTS. 13 */ 14 [scriptable, builtinclass, uuid(4e8ba935-92e1-4a74-944b-b1a2f02a7480)] 15 interface nsICacheTesting : nsISupports 16 { 17 void suspendCacheIOThread(in uint32_t aLevel); 18 void resumeCacheIOThread(); 19 void flush(in nsIObserver aObserver); 20 /** 21 * Clear the in-memory DictionaryCache but keep disk data intact. 22 * This forces dictionary entries to be reloaded from disk on next access. 23 */ 24 void clearDictionaryCacheMemory(); 25 26 /** 27 * Corrupt the hash of a stored dictionary for testing hash mismatch handling. 28 * @param aURI The URI of the dictionary to corrupt 29 */ 30 void corruptDictionaryHash(in ACString aURI); 31 32 /** 33 * Clear the loaded dictionary data for a specific entry while keeping the 34 * entry metadata (including hash). This forces the data to be reloaded from 35 * disk on next prefetch. 36 * @param aURI The URI of the dictionary 37 */ 38 void clearDictionaryDataForTesting(in ACString aURI); 39 };