summaryrefslogtreecommitdiffstats
path: root/netwerk/test/unit_ipc/test_alt-data_closeWithStatus_wrap.js
blob: d2beb0fa17c0672c768d96b65d7afec89a1f2ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");

// needs to be rooted
var cacheFlushObserver = {
  observe() {
    cacheFlushObserver = null;
    do_send_remote_message("flushed");
  },
};

var currentThread = Services.tm.currentThread;

function run_test() {
  do_get_profile();
  do_await_remote_message("flush").then(() => {
    Services.cache2
      .QueryInterface(Ci.nsICacheTesting)
      .flush(cacheFlushObserver);
  });
  run_test_in_child("../unit/test_alt-data_closeWithStatus.js");
}