B2G/gecko/accessible/tests/mochitest/role.js
/**
 * Analogy of SimpleTest.is function used to check the role.
 */
Analogy of SimpleTest.is function used to check the role.
Analogy of SimpleTest . is function used to check the role .
function isRole(aIdentifier, aRole, aMsg)
{
  var role = getRole(aIdentifier);
  if (role == - 1)
    return;
  if (role == aRole) {
    ok(true, aMsg);
    return;
  }
  var got = roleToString(role);
  var expected = roleToString(aRole);
  ok(false, aMsg + "got '" + got + "', expected '" + expected + "'");
}
function isRole ( aIdentifier , aRole , aMsg ) { var role = getRole ( aIdentifier ) ; if ( role == - 1 ) return ; if ( role == aRole ) { ok ( true , aMsg ) ; return ; } var got = roleToString ( role ) ; var expected = roleToString ( aRole ) ; ok ( false , aMsg + "got '" + got + "', expected '" + expected + "'" ) ; }
Analogy of SimpleTest.is function used to check the role.
Analogy of SimpleTest . is function used to check the role .