diff -r 000000000000 -r 6474c204b198 content/base/test/file_XHR_timeout.sjs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/base/test/file_XHR_timeout.sjs Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,15 @@ +var timer = null; + +function handleRequest(request, response) +{ + response.processAsync(); + timer = Components.classes["@mozilla.org/timer;1"] + .createInstance(Components.interfaces.nsITimer); + timer.initWithCallback(function() + { + response.setStatusLine(null, 200, "OK"); + response.setHeader("Content-Type", "text/plain", false); + response.write("hello"); + response.finish(); + }, 3000 /* milliseconds */, Components.interfaces.nsITimer.TYPE_ONE_SHOT); +}