parser/htmlparser/tests/mochitest/file_bug534293-slow.sjs
author Michael Wu <mwu@mozilla.com>
Sat, 06 Aug 2011 22:03:32 -0700
changeset 73984 f7dc94e1b75cb1a755a4872176602433bb33c2ba
parent 69593 5ae6761e175bcffa4428335fe515081cba0afdf7
permissions -rw-r--r--
Bug 676465 - Replace PRBool with boolean in IDL files, r=bsmedberg

var timer;

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();
  timer = Components.classes["@mozilla.org/timer;1"]
    .createInstance(Components.interfaces.nsITimer);
  timer.initWithCallback(function() {
      response.finish();
    }, 500, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
}