B2G/gecko/toolkit/mozapps/update/test/chrome/utils.js
/**
 * Default test finish function that can be used by most tests. This function
 * uses protective measures to prevent the next test from failing provided by
 * |finishTestDefaultWaitForWindowClosed| helper functions to prevent failure
 * due to an update window being left open.
 */
Default test finish function that can be used by most tests. This function
uses protective measures to prevent the next test from failing provided by
|finishTestDefaultWaitForWindowClosed| helper functions to prevent failure
due to an update window being left open.
Default test finish function that can be used by most tests . This function uses protective measures to prevent the next test from failing provided by |finishTestDefaultWaitForWindowClosed| helper functions to prevent failure due to an update window being left open .
function finishTestDefault() {
  debugDump("entering");
  if (gTimeoutTimer) {
    gTimeoutTimer.cancel();
    gTimeoutTimer = null;
  }
  if (gChannel) {
    debugDump("channel = " + gChannel);
    gChannel = null;
    gPrefRoot.removeObserver(PREF_APP_UPDATE_CHANNEL, observer);
  }
  verifyTestsRan();
  resetPrefs();
  removeUpdateDirsAndFiles();
  reloadUpdateManagerData();
  Services.ww.unregisterNotification(gWindowObserver);
  if (gDocElem) {
    gDocElem.removeEventListener("pageshow", onPageShowDefault, false);
  }
  finishTestDefaultWaitForWindowClosed();
}
function finishTestDefault ( ) { debugDump ( "entering" ) ; if ( gTimeoutTimer ) { gTimeoutTimer . cancel ( ) ; gTimeoutTimer = null ; } if ( gChannel ) { debugDump ( "channel = " + gChannel ) ; gChannel = null ; gPrefRoot . removeObserver ( PREF_APP_UPDATE_CHANNEL , observer ) ; } verifyTestsRan ( ) ; resetPrefs ( ) ; removeUpdateDirsAndFiles ( ) ; reloadUpdateManagerData ( ) ; Services . ww . unregisterNotification ( gWindowObserver ) ; if ( gDocElem ) { gDocElem . removeEventListener ( "pageshow" , onPageShowDefault , false ) ; } finishTestDefaultWaitForWindowClosed ( ) ; }
Default test finish function that can be used by most tests.
Default test finish function that can be used by most tests .