2020-04-07 16:00:03 +00:00
|
|
|
"use strict";
|
|
|
|
|
2013-09-20 09:11:25 +00:00
|
|
|
function run_test() {
|
|
|
|
do_get_profile();
|
|
|
|
|
|
|
|
// Open but let OCEA throw
|
|
|
|
asyncOpenCacheEntry(
|
|
|
|
"http://d/",
|
|
|
|
"disk",
|
|
|
|
Ci.nsICacheStorage.OPEN_NORMALLY,
|
|
|
|
null,
|
2023-08-28 13:30:37 +00:00
|
|
|
new OpenCallback(NEW | THROWAVAIL, null, null, function () {
|
2013-09-20 09:11:25 +00:00
|
|
|
// Open but let OCEA throw ones again
|
|
|
|
asyncOpenCacheEntry(
|
|
|
|
"http://d/",
|
|
|
|
"disk",
|
|
|
|
Ci.nsICacheStorage.OPEN_NORMALLY,
|
|
|
|
null,
|
2023-08-28 13:30:37 +00:00
|
|
|
new OpenCallback(NEW | THROWAVAIL, null, null, function () {
|
2013-09-20 09:11:25 +00:00
|
|
|
// Try it again, should go
|
|
|
|
asyncOpenCacheEntry(
|
|
|
|
"http://d/",
|
|
|
|
"disk",
|
|
|
|
Ci.nsICacheStorage.OPEN_NORMALLY,
|
|
|
|
null,
|
2023-08-28 13:30:37 +00:00
|
|
|
new OpenCallback(NEW, "d1m", "d1d", function () {
|
2013-09-20 09:11:25 +00:00
|
|
|
// ...and check
|
|
|
|
asyncOpenCacheEntry(
|
|
|
|
"http://d/",
|
|
|
|
"disk",
|
|
|
|
Ci.nsICacheStorage.OPEN_NORMALLY,
|
|
|
|
null,
|
2023-08-28 13:30:37 +00:00
|
|
|
new OpenCallback(NORMAL, "d1m", "d1d", function () {
|
2013-09-20 09:11:25 +00:00
|
|
|
finish_cache2_test();
|
|
|
|
})
|
|
|
|
);
|
|
|
|
})
|
|
|
|
);
|
|
|
|
})
|
|
|
|
);
|
|
|
|
})
|
|
|
|
);
|
|
|
|
|
|
|
|
do_test_pending();
|
|
|
|
}
|