summaryrefslogtreecommitdiffstats
path: root/docshell/test/navigation/slow.sjs
blob: 6e9d8b570e646a2775c9b4e095da01fd6a74c00d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function handleRequest(request, response) {
  response.processAsync();

  let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
  timer.init(
    function() {
      response.finish();
    },
    5000,
    Ci.nsITimer.TYPE_ONE_SHOT
  );

  response.setStatusLine(null, 200, "OK");
  response.setHeader("Content-Type", "text/plain", false);
  response.write("Start of the content.");
}