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

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