summaryrefslogtreecommitdiffstats
path: root/toolkit/components/passwordmgr/test/mochitest/chrome_timeout.js
blob: 25a797e1d2e8fc947dadcd90fab5bb96f254172c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* eslint-env mozilla/chrome-script */

const timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
addMessageListener("setTimeout", msg => {
  timer.init(
    _ => {
      sendAsyncMessage("timeout");
    },
    msg.delay,
    Ci.nsITimer.TYPE_ONE_SHOT
  );
});

sendAsyncMessage("ready");