Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / netwerk / test / unit / test_cache2-01-basic.js
blob6b02bd0d9110175f876ee4e0686103980f25a34e
1 "use strict";
3 function run_test() {
4 do_get_profile();
6 // Open for write, write
7 asyncOpenCacheEntry(
8 "http://a/",
9 "disk",
10 Ci.nsICacheStorage.OPEN_NORMALLY,
11 null,
12 new OpenCallback(NEW, "a1m", "a1d", function () {
13 // Open for read and check
14 asyncOpenCacheEntry(
15 "http://a/",
16 "disk",
17 Ci.nsICacheStorage.OPEN_NORMALLY,
18 null,
19 new OpenCallback(NORMAL, "a1m", "a1d", function () {
20 // Open for rewrite (truncate), write different meta and data
21 asyncOpenCacheEntry(
22 "http://a/",
23 "disk",
24 Ci.nsICacheStorage.OPEN_TRUNCATE,
25 null,
26 new OpenCallback(NEW, "a2m", "a2d", function () {
27 // Open for read and check
28 asyncOpenCacheEntry(
29 "http://a/",
30 "disk",
31 Ci.nsICacheStorage.OPEN_NORMALLY,
32 null,
33 new OpenCallback(NORMAL, "a2m", "a2d", function () {
34 finish_cache2_test();
44 do_test_pending();