Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / netwerk / test / unit / test_cache2-02-open-non-existing.js
blob2ee0efa687318105898427f7c77b84bb05ab7770
1 "use strict";
3 function run_test() {
4 do_get_profile();
6 // Open non-existing for read, should fail
7 asyncOpenCacheEntry(
8 "http://b/",
9 "disk",
10 Ci.nsICacheStorage.OPEN_READONLY,
11 null,
12 new OpenCallback(NOTFOUND, null, null, function () {
13 // Open the same non-existing for read again, should fail second time
14 asyncOpenCacheEntry(
15 "http://b/",
16 "disk",
17 Ci.nsICacheStorage.OPEN_READONLY,
18 null,
19 new OpenCallback(NOTFOUND, null, null, function () {
20 // Try it again normally, should go
21 asyncOpenCacheEntry(
22 "http://b/",
23 "disk",
24 Ci.nsICacheStorage.OPEN_NORMALLY,
25 null,
26 new OpenCallback(NEW, "b1m", "b1d", function () {
27 // ...and check
28 asyncOpenCacheEntry(
29 "http://b/",
30 "disk",
31 Ci.nsICacheStorage.OPEN_NORMALLY,
32 null,
33 new OpenCallback(NORMAL, "b1m", "b1d", function () {
34 finish_cache2_test();
44 do_test_pending();