Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / netwerk / test / unit / test_cache2-18-not-valid.js
blob8cbe37be4a56ddcf730997d30b6e08f038333d60
1 "use strict";
3 function run_test() {
4 do_get_profile();
6 // Open for write, write but expect it to fail, since other callback will recreate (and doom)
7 // the first entry before it opens output stream (note: in case of problems the DOOMED flag
8 // can be removed, it is not the test failure when opening the output stream on recreated entry.
9 asyncOpenCacheEntry(
10 "http://nv/",
11 "disk",
12 Ci.nsICacheStorage.OPEN_NORMALLY,
13 null,
14 new OpenCallback(NEW | DOOMED, "v1m", "v1d", function () {
15 // Open for rewrite (don't validate), write different meta and data
16 asyncOpenCacheEntry(
17 "http://nv/",
18 "disk",
19 Ci.nsICacheStorage.OPEN_NORMALLY,
20 null,
21 new OpenCallback(NOTVALID | RECREATE, "v2m", "v2d", function () {
22 // And check...
23 asyncOpenCacheEntry(
24 "http://nv/",
25 "disk",
26 Ci.nsICacheStorage.OPEN_NORMALLY,
27 null,
28 new OpenCallback(NORMAL, "v2m", "v2d", function () {
29 finish_cache2_test();
37 do_test_pending();