Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / netwerk / test / unit / test_cache2-21-anon-storage.js
blob1db0047475e261328044313304394af99b23d28f
1 "use strict";
3 function run_test() {
4 do_get_profile();
6 // Create and check an entry anon disk storage
7 asyncOpenCacheEntry(
8 "http://anon1/",
9 "disk",
10 Ci.nsICacheStorage.OPEN_NORMALLY,
11 Services.loadContextInfo.anonymous,
12 new OpenCallback(NEW, "an1", "an1", function () {
13 asyncOpenCacheEntry(
14 "http://anon1/",
15 "disk",
16 Ci.nsICacheStorage.OPEN_NORMALLY,
17 Services.loadContextInfo.anonymous,
18 new OpenCallback(NORMAL, "an1", "an1", function () {
19 // Create and check an entry non-anon disk storage
20 asyncOpenCacheEntry(
21 "http://anon1/",
22 "disk",
23 Ci.nsICacheStorage.OPEN_NORMALLY,
24 Services.loadContextInfo.default,
25 new OpenCallback(NEW, "na1", "na1", function () {
26 asyncOpenCacheEntry(
27 "http://anon1/",
28 "disk",
29 Ci.nsICacheStorage.OPEN_NORMALLY,
30 Services.loadContextInfo.default,
31 new OpenCallback(NORMAL, "na1", "na1", function () {
32 // check the anon entry is still there and intact
33 asyncOpenCacheEntry(
34 "http://anon1/",
35 "disk",
36 Ci.nsICacheStorage.OPEN_NORMALLY,
37 Services.loadContextInfo.anonymous,
38 new OpenCallback(NORMAL, "an1", "an1", function () {
39 finish_cache2_test();
51 do_test_pending();