mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 19:07:31 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
58
netwerk/test/unit/test_cache2-22-anon-visit.js
Normal file
58
netwerk/test/unit/test_cache2-22-anon-visit.js
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
Components.utils.import('resource://gre/modules/LoadContextInfo.jsm');
|
||||
|
||||
function run_test()
|
||||
{
|
||||
do_get_profile();
|
||||
|
||||
function checkNewBackEnd()
|
||||
{
|
||||
var storage = getCacheStorage("disk", LoadContextInfo.default);
|
||||
storage.asyncVisitStorage(
|
||||
new VisitCallback(1, 1024, ["http://an2/"], function() {
|
||||
storage = getCacheStorage("disk", LoadContextInfo.anonymous);
|
||||
storage.asyncVisitStorage(
|
||||
new VisitCallback(1, 1024, ["http://an2/"], function() {
|
||||
finish_cache2_test();
|
||||
}),
|
||||
true
|
||||
);
|
||||
}),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
function checkOldBackEnd()
|
||||
{
|
||||
syncWithCacheIOThread(function() {
|
||||
var storage = getCacheStorage("disk", LoadContextInfo.default);
|
||||
storage.asyncVisitStorage(
|
||||
new VisitCallback(2, 24, ["http://an2/"], function() {
|
||||
storage = getCacheStorage("disk", LoadContextInfo.anonymous);
|
||||
storage.asyncVisitStorage(
|
||||
new VisitCallback(0, 0, ["http://an2/"], function() {
|
||||
finish_cache2_test();
|
||||
}),
|
||||
true
|
||||
);
|
||||
}),
|
||||
true
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
var mc = new MultipleCallbacks(2, newCacheBackEndUsed() ? checkNewBackEnd : checkOldBackEnd, !newCacheBackEndUsed());
|
||||
|
||||
asyncOpenCacheEntry("http://an2/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.default,
|
||||
new OpenCallback(NEW|WAITFORWRITE, "an2", "an2", function(entry) {
|
||||
mc.fired();
|
||||
})
|
||||
);
|
||||
|
||||
asyncOpenCacheEntry("http://an2/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.anonymous,
|
||||
new OpenCallback(NEW|WAITFORWRITE, "an2", "an2", function(entry) {
|
||||
mc.fired();
|
||||
})
|
||||
);
|
||||
|
||||
do_test_pending();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue