code: function downloadManager_close(force) {
      var windowCount = mozmill.utils.getWindows().length;
  
      if (this._controller) {
        // Check if we should force the closing of the DM window
        if (force) {
          this._controller.window.close();
        } else {
          var cmdKey = utils.getEntity(this.getDtds(), "cmd.close.commandKey");
          this._controller.keypress(null, cmdKey, {accelKey: true});
        }
  
        this._controller.waitForEval("subject.getWindows().length == " + (windowCount - 1),
                                     gTimeout, 100, mozmill.utils);
        this._controller = null;
      }
    }
docs: Close the download manager
  
  @param {boolean} force
  Force the closing of the DM window