Bug 1178196 Fix race in Cache API orphaned data tests. r=ehsan

This commit is contained in:
Ben Kelly 2015-06-30 08:31:00 -07:00
parent c9d4d45a02
commit e90a4f225d
2 changed files with 14 additions and 0 deletions

View File

@ -110,6 +110,13 @@ SpecialPowers.pushPrefEnv({
return caches.delete(name);
}).then(function(deleted) {
ok(deleted, 'cache should be deleted');
// This is a bit superfluous, but its necessary to make sure the Cache is
// fully deleted before we proceed. The deletion actually takes place in
// two async steps. We don't want to resetStorage() until the second step
// has taken place. This extra Cache operation ensure that all the
// runnables have been flushed through the threads, etc.
return caches.has(name);
})
// Now measure initial disk usage

View File

@ -109,6 +109,13 @@ SpecialPowers.pushPrefEnv({
return caches.delete(name);
}).then(function(deleted) {
ok(deleted, 'cache should be deleted');
// This is a bit superfluous, but its necessary to make sure the Cache is
// fully deleted before we proceed. The deletion actually takes place in
// two async steps. We don't want to resetStorage() until the second step
// has taken place. This extra Cache operation ensure that all the
// runnables have been flushed through the threads, etc.
return caches.has(name);
})
// Now measure initial disk usage