Bug 1807268 - Re-enable verifyShowClipboardSuggestionsToggleTest UI test r=jajohnson
[gecko.git] / netwerk / test / unit / test_cache2-26-no-outputstream-open.js
blobbdb116436c1a12a151d73ef75989df4ad318d832
1 "use strict";
3 function run_test() {
4   do_get_profile();
6   // Open for write, but never write and never mark valid
7   asyncOpenCacheEntry(
8     "http://no-data/",
9     "disk",
10     Ci.nsICacheStorage.OPEN_NORMALLY,
11     null,
12     new OpenCallback(
13       NEW | METAONLY | DONTSETVALID | WAITFORWRITE,
14       "meta",
15       "",
16       function () {
17         // Open again, we must get the callback and zero-length data
18         executeSoon(() => {
19           Cu.forceGC(); // invokes OnHandleClosed on the entry
21           asyncOpenCacheEntry(
22             "http://no-data/",
23             "disk",
24             Ci.nsICacheStorage.OPEN_NORMALLY,
25             null,
26             new OpenCallback(NORMAL, "meta", "", function () {
27               finish_cache2_test();
28             })
29           );
30         });
31       }
32     )
33   );
35   do_test_pending();