summaryrefslogtreecommitdiffstats
path: root/toolkit/components/passwordmgr/test/chrome_timeout.js
blob: 9049d0beaa66bd4abfb5e90ede6ddf62f4aa9208 (plain)
1
2
3
4
5
6
7
8
9
10
11
const Cc = Components.classes;
const Ci = Components.interfaces;

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

sendAsyncMessage('ready');