third_party/js/mozmill/shared-modules/software-update.js
function softwareUpdate_download(channel, waitForFinish, timeout) {
    waitForFinish = waitForFinish ? waitForFinish : true;

    // Check that the correct channel has been set
    this._controller.assert(function() {
      return channel == this.channel;
    }, "The current update channel is identical to the specified one.", this);

    // Click the next button
    var next = this.getElement({type: "button", subtype: "next"});
    this._controller.click(next);

    // Wait for the download page - if it fails the update was already cached
    try {
      this.waitForWizardPage(WIZARD_PAGES.downloading);

      if (waitForFinish)
        this.waitforDownloadFinished(timeout);
    } catch (ex) {
      this.waitForWizardPage(WIZARD_PAGES.finished);
    }
  }
function softwareUpdate_download(channel, waitForFinish, timeout) {
    waitForFinish = waitForFinish ? waitForFinish : true;

    // Check that the correct channel has been set
    this._controller.assert(function() {
      return channel == this.channel;
    }, "The current update channel is identical to the specified one.", this);

    // Click the next button
    var next = this.getElement({type: "button", subtype: "next"});
    this._controller.click(next);

    // Wait for the download page - if it fails the update was already cached
    try {
      this.waitForWizardPage(WIZARD_PAGES.downloading);

      if (waitForFinish)
        this.waitforDownloadFinished(timeout);
    } catch (ex) {
      this.waitForWizardPage(WIZARD_PAGES.finished);
    }
  }
function softwareUpdate_download ( channel , waitForFinish , timeout ) { waitForFinish = waitForFinish ? waitForFinish : true ; // Check that the correct channel has been set this . _controller . assert ( function ( ) { return channel == this . channel ; } , "The current update channel is identical to the specified one." , this ) ; // Click the next button var next = this . getElement ( { type : "button" , subtype : "next" } ) ; this . _controller . click ( next ) ; // Wait for the download page - if it fails the update was already cached try { this . waitForWizardPage ( WIZARD_PAGES . downloading ) ; if ( waitForFinish ) this . waitforDownloadFinished ( timeout ) ; } catch ( ex ) { this . waitForWizardPage ( WIZARD_PAGES . finished ) ; } }
Download the update of the given channel and type
@param {string} channel
Update channel to use
@param {boolean} waitForFinish
Sets if the function should wait until the download has been finished
@param {number} timeout
Timeout the download has to stop
Download the update of the given channel and type