1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/file_XHR_timeout.sjs Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,15 @@ 1.4 +var timer = null; 1.5 + 1.6 +function handleRequest(request, response) 1.7 +{ 1.8 + response.processAsync(); 1.9 + timer = Components.classes["@mozilla.org/timer;1"] 1.10 + .createInstance(Components.interfaces.nsITimer); 1.11 + timer.initWithCallback(function() 1.12 + { 1.13 + response.setStatusLine(null, 200, "OK"); 1.14 + response.setHeader("Content-Type", "text/plain", false); 1.15 + response.write("hello"); 1.16 + response.finish(); 1.17 + }, 3000 /* milliseconds */, Components.interfaces.nsITimer.TYPE_ONE_SHOT); 1.18 +}