B2G/gecko/xpfe/test/winopen.js
// close some, none, or all open windows in the list
close some, none, or all open windows in the list
close some none or all open windows in the list
function reapWindows() {
    var modIndex = currentIndex % CYCLE_SIZE;
    if (modIndex < PHASE_ONE-1) {
	closeOneWindow(currentIndex);
    } 
    else if (PHASE_ONE-1 <= modIndex && modIndex < PHASE_ONE+PHASE_TWO-1) {
	closeOneWindow(currentIndex - OVERLAP_COUNT);
    }
    else if (modIndex == PHASE_ONE+PHASE_TWO-1) {
	closeAllWindows(false);
    }
    else if (PHASE_ONE+PHASE_TWO <= modIndex && modIndex < CYCLE_SIZE-1) {
    }
    else if (modIndex == CYCLE_SIZE-1) {
	closeAllWindows(true);
    }
}
function reapWindows ( ) { var modIndex = currentIndex % CYCLE_SIZE ; if ( modIndex < PHASE_ONE - 1 ) { closeOneWindow ( currentIndex ) ; } else if ( PHASE_ONE - 1 <= modIndex && modIndex < PHASE_ONE + PHASE_TWO - 1 ) { closeOneWindow ( currentIndex - OVERLAP_COUNT ) ; } else if ( modIndex == PHASE_ONE + PHASE_TWO - 1 ) { closeAllWindows ( false ) ; } else if ( PHASE_ONE + PHASE_TWO <= modIndex && modIndex < CYCLE_SIZE - 1 ) { } else if ( modIndex == CYCLE_SIZE - 1 ) { closeAllWindows ( true ) ; } }
close some, none, or all open windows in the list
close some none or all open windows in the list
// first phase in each "cycle", are single open/close sequences // next phase in each "cycle", keep N windows concurrently open // end overlapping windows cycle; close all windows // do nothing; keep adding windows // end open-all/close-all phase; close windows, recording time to close