summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/script/slow.sjs
blob: 39a75acd8670c494e6a1426f4b1d04c28a4a7865 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function handleRequest(request, response) {
  response.processAsync();

  timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
  timer.init(
    function () {
      response.write("Here the content. But slowly.");
      response.finish();
    },
    5000,
    Ci.nsITimer.TYPE_ONE_SHOT
  );
}