diff options
Diffstat (limited to 'devtools/client/netmonitor/test/sjs_slow-test-server.sjs')
-rw-r--r-- | devtools/client/netmonitor/test/sjs_slow-test-server.sjs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/devtools/client/netmonitor/test/sjs_slow-test-server.sjs b/devtools/client/netmonitor/test/sjs_slow-test-server.sjs new file mode 100644 index 0000000000..9e996384e6 --- /dev/null +++ b/devtools/client/netmonitor/test/sjs_slow-test-server.sjs @@ -0,0 +1,20 @@ +"use strict"; + +let timer; + +const DELAY_MS = 1000; +function handleRequest(request, response) { + response.processAsync(); + timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + timer.init( + () => { + response.setHeader("Content-Type", "text/html", false); + response.write( + "<body>Slow loading page for netmonitor test. You should never see this.</body>" + ); + response.finish(); + }, + DELAY_MS, + Ci.nsITimer.TYPE_ONE_SHOT + ); +} |