B2G/gecko/toolkit/mozapps/update/test/chrome/utils.js
/**
 * Default callback that can be used by most tests.
 */
Default callback that can be used by most tests.
Default callback that can be used by most tests .
function defaultCallback(aEvent) {
  if (!gTimeoutTimer) {
    debugDump("gTimeoutTimer is null... returning early");
    return;
  }
  debugDump("entering - TESTS[" + gTestCounter + "], pageid: " + gTest.pageid +
            ", aEvent.originalTarget.nodeName: " +
            aEvent.originalTarget.nodeName);
  if (gTest && gTest.extraStartFunction) {
    debugDump("calling extraStartFunction " + gTest.extraStartFunction.name);
    if (gTest.extraStartFunction(aEvent)) {
      debugDump("extraStartFunction early return");
      return;
    }
  }
  is(gDocElem.currentPage.pageid, gTest.pageid,
     "Checking currentPage.pageid equals " + gTest.pageid + " in pageshow");
  if (gTest.extraCheckFunction) {
    debugDump("calling extraCheckFunction " + gTest.extraCheckFunction.name);
    gTest.extraCheckFunction();
  }
  SimpleTest.executeSoon(delayedDefaultCallback);
}
function defaultCallback ( aEvent ) { if ( ! gTimeoutTimer ) { debugDump ( "gTimeoutTimer is null... returning early" ) ; return ; } debugDump ( "entering - TESTS[" + gTestCounter + "], pageid: " + gTest . pageid + ", aEvent.originalTarget.nodeName: " + aEvent . originalTarget . nodeName ) ; if ( gTest && gTest . extraStartFunction ) { debugDump ( "calling extraStartFunction " + gTest . extraStartFunction . name ) ; if ( gTest . extraStartFunction ( aEvent ) ) { debugDump ( "extraStartFunction early return" ) ; return ; } } is ( gDocElem . currentPage . pageid , gTest . pageid , "Checking currentPage.pageid equals " + gTest . pageid + " in pageshow" ) ; if ( gTest . extraCheckFunction ) { debugDump ( "calling extraCheckFunction " + gTest . extraCheckFunction . name ) ; gTest . extraCheckFunction ( ) ; } SimpleTest . executeSoon ( delayedDefaultCallback ) ; }
Default callback that can be used by most tests.
Default callback that can be used by most tests .
// Perform extra checks if specified by the test // The wizard page buttons' disabled and hidden attributes are set after the // pageshow event so use executeSoon to allow them to be set so their disabled // and hidden attribute values can be checked.