michael@0: function run_test() michael@0: { michael@0: do_get_profile(); michael@0: michael@0: // Open non-existing for read, should fail michael@0: asyncOpenCacheEntry("http://b/", "disk", Ci.nsICacheStorage.OPEN_READONLY, null, michael@0: new OpenCallback(NOTFOUND, null, null, function(entry) { michael@0: // Open the same non-existing for read again, should fail second time michael@0: asyncOpenCacheEntry("http://b/", "disk", Ci.nsICacheStorage.OPEN_READONLY, null, michael@0: new OpenCallback(NOTFOUND, null, null, function(entry) { michael@0: // Try it again normally, should go michael@0: asyncOpenCacheEntry("http://b/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null, michael@0: new OpenCallback(NEW, "b1m", "b1d", function(entry) { michael@0: // ...and check michael@0: asyncOpenCacheEntry("http://b/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null, michael@0: new OpenCallback(NORMAL, "b1m", "b1d", function(entry) { michael@0: finish_cache2_test(); michael@0: }) michael@0: ); michael@0: }) michael@0: ); michael@0: }) michael@0: ); michael@0: }) michael@0: ); michael@0: michael@0: do_test_pending(); michael@0: }