1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/sessionstore/test/browser_637020_slow.sjs Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,21 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + * http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +const Cc = Components.classes; 1.8 +const Ci = Components.interfaces; 1.9 + 1.10 +const DELAY_MS = "2000"; 1.11 + 1.12 +let timer; 1.13 + 1.14 +function handleRequest(req, resp) { 1.15 + resp.processAsync(); 1.16 + resp.setHeader("Cache-Control", "no-cache", false); 1.17 + resp.setHeader("Content-Type", "text/html;charset=utf-8", false); 1.18 + 1.19 + timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); 1.20 + timer.init(() => { 1.21 + resp.write("hi"); 1.22 + resp.finish(); 1.23 + }, DELAY_MS, Ci.nsITimer.TYPE_ONE_SHOT); 1.24 +}