code: function softwareUpdate_waitForDownloadFinished(timeout) {
      timeout = timeout ? timeout : gTimeoutUpdateDownload;
  
      var progress =  this.getElement({type: "download_progress"});
      this._controller.waitFor(function() {
        return progress.getNode().value == 100;
      }, "Update has been finished downloading.", timeout);
  
      this.waitForWizardPage(WIZARD_PAGES.finished);
    }
docs: Wait until the download has been finished
  
  @param {number} timeout
  Timeout the download has to stop