B2G/gecko/accessible/tests/mochitest/states.js
/**
 * Analogy of SimpleTest.is function used to compare states.
 */
Analogy of SimpleTest.is function used to compare states.
Analogy of SimpleTest . is function used to compare states .
function isState(aState1, aState2, aIsExtraStates, aMsg)
{
  if (aState1 == aState2) {
    ok(true, aMsg);
    return;
  }
  var got = "0";
  if (aState1) {
    got = statesToString(aIsExtraStates ? 0 : aState1,
                         aIsExtraStates ? aState1 : 0);
  }
  var expected = "0";
  if (aState2) {
    expected = statesToString(aIsExtraStates ? 0 : aState2,
                              aIsExtraStates ? aState2 : 0);
  }
  ok(false, aMsg + "got '" + got + "', expected '" + expected + "'");
}
function isState ( aState1 , aState2 , aIsExtraStates , aMsg ) { if ( aState1 == aState2 ) { ok ( true , aMsg ) ; return ; } var got = "0" ; if ( aState1 ) { got = statesToString ( aIsExtraStates ? 0 : aState1 , aIsExtraStates ? aState1 : 0 ) ; } var expected = "0" ; if ( aState2 ) { expected = statesToString ( aIsExtraStates ? 0 : aState2 , aIsExtraStates ? aState2 : 0 ) ; } ok ( false , aMsg + "got '" + got + "', expected '" + expected + "'" ) ; }
Analogy of SimpleTest.is function used to compare states.
Analogy of SimpleTest . is function used to compare states .