B2G/gecko/toolkit/mozapps/update/test_svc/unit/test_0202_app_launch_apply_update_dirlocked_svc.js
/**
 * Checks if the update has failed being applied in the background.
 */
Checks if the update has failed being applied in the background.
Checks if the update has failed being applied in the background .
function checkUpdateApplied() {
  if (gUpdateManager.activeUpdate.state != STATE_PENDING) {
    if (++gTimeoutRuns > MAX_TIMEOUT_RUNS)
      do_throw("Exceeded MAX_TIMEOUT_RUNS whist waiting for pending state to finish");
    else
      do_timeout(CHECK_TIMEOUT_MILLI, checkUpdateApplied);
    return;
  }
  do_timeout(CHECK_TIMEOUT_MILLI, finishTest);
}
function checkUpdateApplied ( ) { if ( gUpdateManager . activeUpdate . state != STATE_PENDING ) { if ( ++ gTimeoutRuns > MAX_TIMEOUT_RUNS ) do_throw ( "Exceeded MAX_TIMEOUT_RUNS whist waiting for pending state to finish" ) ; else do_timeout ( CHECK_TIMEOUT_MILLI , checkUpdateApplied ) ; return ; } do_timeout ( CHECK_TIMEOUT_MILLI , finishTest ) ; }
Checks if the update has failed being applied in the background.
Checks if the update has failed being applied in the background .
// Don't proceed until the update has failed, and reset to pending.