parser/htmlparser/tests/mochitest/file_bug534293-slow.sjs
author Csoregi Natalia <ncsoregi@mozilla.com>
Tue, 24 May 2022 00:32:06 +0300
changeset 618554 db8bb8422d1fdfb2cd32d6ec3a60ec0743f93aed
parent 618082 0323be8b513282415340f97285835abf0a85eff7
permissions -rw-r--r--
Merge autoland to mozilla-central. a=merge

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