/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ /* vim: set sts=2 sw=2 et tw=80 ft=javascript: */ "use strict"; // This script slows the load of an HTML document so that we can reliably test // all phases of the load cycle supported by the extension API. /* eslint-disable no-unused-vars */ const URL = "file_slowed_document.sjs"; const DELAY = 2 * 1000; // Delay two seconds before completing the request. let nsTimer = Components.Constructor( "@mozilla.org/timer;1", "nsITimer", "initWithCallback" ); let timer; function handleRequest(request, response) { response.processAsync(); response.setHeader("Content-Type", "text/html", false); response.setHeader("Cache-Control", "no-cache", false); response.write(`