Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / devtools / client / netmonitor / test / sjs_slow-test-server.sjs
blob9e996384e6060c86008ac082b3fb962c75d591b9
1 "use strict";
3 let timer;
5 const DELAY_MS = 1000;
6 function handleRequest(request, response) {
7   response.processAsync();
8   timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
9   timer.init(
10     () => {
11       response.setHeader("Content-Type", "text/html", false);
12       response.write(
13         "<body>Slow loading page for netmonitor test. You should never see this.</body>"
14       );
15       response.finish();
16     },
17     DELAY_MS,
18     Ci.nsITimer.TYPE_ONE_SHOT
19   );