зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1440073 - Clear images from cache to fix --verify testing of browser_no_mcb_for_loopback.js r=johannh
MozReview-Commit-ID: 4z8aJizVUNm --HG-- extra : rebase_source : d57f0edea4997d6d522e78aa18da923c5a620665
This commit is contained in:
Родитель
c9df10baff
Коммит
7d46db21ed
|
@ -24,7 +24,16 @@ const PREF_BLOCK_DISPLAY = "security.mixed_content.block_display_content";
|
|||
const PREF_UPGRADE_DISPLAY = "security.mixed_content.upgrade_display_content";
|
||||
const PREF_BLOCK_ACTIVE = "security.mixed_content.block_active_content";
|
||||
|
||||
function clearAllImageCaches() {
|
||||
let tools = Cc["@mozilla.org/image/tools;1"]
|
||||
.getService(Ci.imgITools);
|
||||
let imageCache = tools.getImgCacheForDocument(window.document);
|
||||
imageCache.clearCache(true); // true=chrome
|
||||
imageCache.clearCache(false); // false=content
|
||||
}
|
||||
|
||||
registerCleanupFunction(function() {
|
||||
clearAllImageCaches();
|
||||
Services.prefs.clearUserPref(PREF_BLOCK_DISPLAY);
|
||||
Services.prefs.clearUserPref(PREF_UPGRADE_DISPLAY);
|
||||
Services.prefs.clearUserPref(PREF_BLOCK_ACTIVE);
|
||||
|
|
Загрузка…
Ссылка в новой задаче