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 Components.utils.import('resource://gre/modules/LoadContextInfo.jsm');
3 function run_test()
4 {
5 do_get_profile();
7 if (!newCacheBackEndUsed()) {
8 do_check_true(true, "This test doesn't run when the old cache back end is used since the behavior is different");
9 return;
10 }
12 // Create and check an entry anon disk storage
13 asyncOpenCacheEntry("http://anon1/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.anonymous,
14 new OpenCallback(NEW, "an1", "an1", function(entry) {
15 asyncOpenCacheEntry("http://anon1/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.anonymous,
16 new OpenCallback(NORMAL, "an1", "an1", function(entry) {
17 // Create and check an entry non-anon disk storage
18 asyncOpenCacheEntry("http://anon1/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.default,
19 new OpenCallback(NEW, "na1", "na1", function(entry) {
20 asyncOpenCacheEntry("http://anon1/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.default,
21 new OpenCallback(NORMAL, "na1", "na1", function(entry) {
22 // check the anon entry is still there and intact
23 asyncOpenCacheEntry("http://anon1/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, LoadContextInfo.anonymous,
24 new OpenCallback(NORMAL, "an1", "an1", function(entry) {
25 finish_cache2_test();
26 })
27 );
28 })
29 );
30 })
31 );
32 })
33 );
34 })
35 );
37 do_test_pending();
38 }