third_party/js/mozmill/shared-modules/software-update.js
function softwareUpdate_assertUpdateApplied(updateData) {
    // Get the information from the last update
    var info = updateData.updates[updateData.updateIndex];

    // The upgraded version should be identical with the version given by
    // the update and we shouldn't have run a downgrade
    var check = this._vc.compare(info.build_post.version, info.build_pre.version);
    this._controller.assert(function() {
      return check >= 0;
    }, "The version number of the upgraded build is higher or equal.");

    // The build id should be identical with the one from the update
    this._controller.assert(function() {
      return info.build_post.buildid == info.patch.buildid;
    }, "The build id is equal to the build id of the update.");

    // An upgrade should not change the builds locale
    this._controller.assert(function() {
      return info.build_post.locale == info.build_pre.locale;
    }, "The locale of the updated build is identical to the original locale.");
  }
function softwareUpdate_assertUpdateApplied(updateData) {
    // Get the information from the last update
    var info = updateData.updates[updateData.updateIndex];

    // The upgraded version should be identical with the version given by
    // the update and we shouldn't have run a downgrade
    var check = this._vc.compare(info.build_post.version, info.build_pre.version);
    this._controller.assert(function() {
      return check >= 0;
    }, "The version number of the upgraded build is higher or equal.");

    // The build id should be identical with the one from the update
    this._controller.assert(function() {
      return info.build_post.buildid == info.patch.buildid;
    }, "The build id is equal to the build id of the update.");

    // An upgrade should not change the builds locale
    this._controller.assert(function() {
      return info.build_post.locale == info.build_pre.locale;
    }, "The locale of the updated build is identical to the original locale.");
  }
function softwareUpdate_assertUpdateApplied ( updateData ) { // Get the information from the last update var info = updateData . updates [ updateData . updateIndex ] ; // The upgraded version should be identical with the version given by // the update and we shouldn't have run a downgrade var check = this . _vc . compare ( info . build_post . version , info . build_pre . version ) ; this . _controller . assert ( function ( ) { return check >= 0 ; } , "The version number of the upgraded build is higher or equal." ) ; // The build id should be identical with the one from the update this . _controller . assert ( function ( ) { return info . build_post . buildid == info . patch . buildid ; } , "The build id is equal to the build id of the update." ) ; // An upgrade should not change the builds locale this . _controller . assert ( function ( ) { return info . build_post . locale == info . build_pre . locale ; } , "The locale of the updated build is identical to the original locale." ) ; }
Checks if an update has been applied correctly

@param {object} updateData
All the data collected during the update process
Checks if an update has been applied correctly