B2G/gecko/toolkit/components/places/tests/unit/test_bookmarks_restore_notification.js
/**
 * Runs the next test or if all tests have been run, finishes.
 */
Runs the next test or if all tests have been run, finishes.
Runs the next test or if all tests have been run finishes .
function doNextTest() {
  currTestIndex++;
  if (currTestIndex >= tests.length) {
    obssvc.removeObserver(beginObserver, NSIOBSERVER_TOPIC_BEGIN);
    obssvc.removeObserver(successAndFailedObserver, NSIOBSERVER_TOPIC_SUCCESS);
    obssvc.removeObserver(successAndFailedObserver, NSIOBSERVER_TOPIC_FAILED);
    do_test_finished();
  }
  else {
    var test = tests[currTestIndex];
    print("Running test: " + test.desc);
    test.run();
  }
}
function doNextTest ( ) { currTestIndex ++ ; if ( currTestIndex >= tests . length ) { obssvc . removeObserver ( beginObserver , NSIOBSERVER_TOPIC_BEGIN ) ; obssvc . removeObserver ( successAndFailedObserver , NSIOBSERVER_TOPIC_SUCCESS ) ; obssvc . removeObserver ( successAndFailedObserver , NSIOBSERVER_TOPIC_FAILED ) ; do_test_finished ( ) ; } else { var test = tests [ currTestIndex ] ; print ( "Running test: " + test . desc ) ; test . run ( ) ; } }
Runs the next test or if all tests have been run, finishes.
Runs the next test or if all tests have been run finishes .