dom/xhr/tests/sync_xhr_unload.sjs
author moz-wptsync-bot <wptsync@mozilla.com>
Mon, 16 Apr 2018 18:38:41 +0000
changeset 1486024 3a644abd5eaa108f67471c0aae4fb4a424ea41bf
parent 869342 94f47e1077442d749f7fe7de027fcbdfeacf3daf
child 1702735 dd3558a8f7ae3211ac8a9ad5f87196d6a00e7a95
permissions -rw-r--r--
Bug 1454380 [wpt PR 8508] - Update wpt metadata, a=testonly wpt-pr: 8508 wpt-type: metadata

var timer = null;

function handleRequest(request, response)
{
  response.processAsync();
  timer = Components.classes["@mozilla.org/timer;1"]
                    .createInstance(Components.interfaces.nsITimer);
  timer.initWithCallback(function()
  {
    response.setStatusLine(null, 200, "OK");
    response.setHeader("Content-Type", "text/plain", false);
    response.write("hello");
    response.finish();
  }, 30000 /* milliseconds */, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
}