Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 function run_test()
2 {
3 do_get_profile();
5 var storage = getCacheStorage("memory");
6 var mc = new MultipleCallbacks(3, function() {
7 storage.asyncEvictStorage(
8 new EvictionCallback(true, function() {
9 storage.asyncVisitStorage(
10 new VisitCallback(0, 0, [], function() {
11 var storage = getCacheStorage("disk");
12 storage.asyncVisitStorage(
13 new VisitCallback(2, 24, ["http://a/", "http://b/"], function() {
14 finish_cache2_test();
15 }),
16 true
17 );
18 }),
19 true
20 );
21 })
22 );
23 }, !newCacheBackEndUsed());
25 asyncOpenCacheEntry("http://mem1/", "memory", Ci.nsICacheStorage.OPEN_NORMALLY, null,
26 new OpenCallback(NEW, "m2m", "m2d", function(entry) {
27 asyncOpenCacheEntry("http://mem1/", "memory", Ci.nsICacheStorage.OPEN_NORMALLY, null,
28 new OpenCallback(NORMAL, "m2m", "m2d", function(entry) {
29 mc.fired();
30 })
31 );
32 })
33 );
35 asyncOpenCacheEntry("http://a/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
36 new OpenCallback(NEW, "a1m", "a1d", function(entry) {
37 asyncOpenCacheEntry("http://a/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
38 new OpenCallback(NORMAL, "a1m", "a1d", function(entry) {
39 mc.fired();
40 })
41 );
42 })
43 );
45 asyncOpenCacheEntry("http://b/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
46 new OpenCallback(NEW, "a1m", "a1d", function(entry) {
47 asyncOpenCacheEntry("http://b/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
48 new OpenCallback(NORMAL, "a1m", "a1d", function(entry) {
49 mc.fired();
50 })
51 );
52 })
53 );
55 do_test_pending();
56 }