2020-04-07 19:00:03 +03:00
|
|
|
"use strict";
|
|
|
|
|
2013-09-20 13:11:25 +04:00
|
|
|
function run_test() {
|
|
|
|
do_get_profile();
|
|
|
|
|
2017-08-24 11:25:38 +03:00
|
|
|
var mc = new MultipleCallbacks(2, function() {
|
2018-01-31 20:46:46 +03:00
|
|
|
var storage = getCacheStorage("disk", Services.loadContextInfo.default);
|
2013-09-20 13:11:25 +04:00
|
|
|
storage.asyncVisitStorage(
|
2014-05-01 15:28:12 +04:00
|
|
|
new VisitCallback(1, 1024, ["http://an2/"], function() {
|
2018-01-31 20:46:46 +03:00
|
|
|
storage = getCacheStorage("disk", Services.loadContextInfo.anonymous);
|
2013-09-20 13:11:25 +04:00
|
|
|
storage.asyncVisitStorage(
|
2014-05-01 15:28:12 +04:00
|
|
|
new VisitCallback(1, 1024, ["http://an2/"], function() {
|
2013-09-20 13:11:25 +04:00
|
|
|
finish_cache2_test();
|
|
|
|
}),
|
|
|
|
true
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
true
|
|
|
|
);
|
2017-08-24 11:25:38 +03:00
|
|
|
});
|
2013-09-20 13:11:25 +04:00
|
|
|
|
2018-01-31 20:46:46 +03:00
|
|
|
asyncOpenCacheEntry(
|
|
|
|
"http://an2/",
|
|
|
|
"disk",
|
|
|
|
Ci.nsICacheStorage.OPEN_NORMALLY,
|
|
|
|
Services.loadContextInfo.default,
|
2013-09-20 13:11:25 +04:00
|
|
|
new OpenCallback(NEW | WAITFORWRITE, "an2", "an2", function(entry) {
|
|
|
|
mc.fired();
|
|
|
|
})
|
|
|
|
);
|
|
|
|
|
2018-01-31 20:46:46 +03:00
|
|
|
asyncOpenCacheEntry(
|
|
|
|
"http://an2/",
|
|
|
|
"disk",
|
|
|
|
Ci.nsICacheStorage.OPEN_NORMALLY,
|
|
|
|
Services.loadContextInfo.anonymous,
|
2013-09-20 13:11:25 +04:00
|
|
|
new OpenCallback(NEW | WAITFORWRITE, "an2", "an2", function(entry) {
|
|
|
|
mc.fired();
|
|
|
|
})
|
|
|
|
);
|
|
|
|
|
|
|
|
do_test_pending();
|
|
|
|
}
|