1 Components.utils.import('resource://gre/modules/LoadContextInfo.jsm');
7 if (!newCacheBackEndUsed()) {
8 do_check_true(true, "This test checks only cache2 specific behavior.");
12 var mc = new MultipleCallbacks(2, function() {
13 var mem = getCacheStorage("memory");
14 var disk = getCacheStorage("disk");
16 do_check_true(disk.exists(createURI("http://m1/"), ""));
17 do_check_true(mem.exists(createURI("http://m1/"), ""));
18 do_check_false(mem.exists(createURI("http://m2/"), ""));
19 do_check_true(disk.exists(createURI("http://d1/"), ""));
20 do_check_throws_nsIException(() => disk.exists(createURI("http://d2/"), ""), 'NS_ERROR_NOT_AVAILABLE');
25 asyncOpenCacheEntry("http://d1/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.default,
26 new OpenCallback(NEW | WAITFORWRITE, "meta", "data", function(entry) {
31 asyncOpenCacheEntry("http://m1/", "memory", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.default,
32 new OpenCallback(NEW | WAITFORWRITE, "meta", "data", function(entry) {