зеркало из https://github.com/mozilla/gecko-dev.git
Bug 847100 - Make sure dummy thumbnails aren't expired too early when testing thumbnail expiration; r=yoric
This commit is contained in:
Родитель
414d887fff
Коммит
ccae75cc95
|
@ -51,6 +51,14 @@ function runTests() {
|
||||||
urls.forEach(createDummyThumbnail);
|
urls.forEach(createDummyThumbnail);
|
||||||
ok(urls.every(thumbnailExists), "all dummy thumbnails created");
|
ok(urls.every(thumbnailExists), "all dummy thumbnails created");
|
||||||
|
|
||||||
|
// Make sure our dummy thumbnails aren't expired too early.
|
||||||
|
let dontExpireDummyURLs = function (cb) cb(urls);
|
||||||
|
PageThumbs.addExpirationFilter(dontExpireDummyURLs);
|
||||||
|
|
||||||
|
registerCleanupFunction(function () {
|
||||||
|
PageThumbs.removeExpirationFilter(dontExpireDummyURLs);
|
||||||
|
});
|
||||||
|
|
||||||
// Expire thumbnails and expect 10 remaining.
|
// Expire thumbnails and expect 10 remaining.
|
||||||
yield expireThumbnails([]);
|
yield expireThumbnails([]);
|
||||||
let remainingURLs = [u for (u of urls) if (thumbnailExists(u))];
|
let remainingURLs = [u for (u of urls) if (thumbnailExists(u))];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче