parser/htmlparser/tests/mochitest/file_bug534293-slow.sjs
author Robert Sayre <sayrer@gmail.com>
Thu, 06 Jan 2011 21:36:24 -0500
changeset 60185 042f7e48aae93c254c2b1130adea27c365fda16f
parent 48404 e278b19aa8cad518c842729c4a0bb7bde035a3e6
child 69593 5ae6761e175bcffa4428335fe515081cba0afdf7
permissions -rw-r--r--
Backed out changeset d56f9c2057ed

function handleRequest(request, response)
{
  response.setHeader("Cache-Control", "no-cache", false);
  response.setHeader("Content-Type", "text/javascript", false);
  response.write("ok(true, 'Slow script ran.');");
  response.processAsync();
  var timer = Components.classes["@mozilla.org/timer;1"]
    .createInstance(Components.interfaces.nsITimer);
  timer.initWithCallback(function() {
      response.finish();
    }, 500, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
}