third_party/js/mozmill/shared-modules/software-update.js
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);
  }
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);
  }
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 ) ; }
Wait until the download has been finished

@param {number} timeout
Timeout the download has to stop
Wait until the download has been finished