B2G/gecko/accessible/tests/mochitest/attributes.js
/**
 * Test text attributes for wrong offset.
 */
Test text attributes for wrong offset.
Test text attributes for wrong offset .
function testTextAttrsWrongOffset(aID, aOffset)
{
  var res = false;
  try {
  var s = {}, e = {};
  var acc = getAccessible(ID, [nsIAccessibleText]);
    acc.getTextAttributes(false, 157, s, e);
  } catch (e) {
    res = true;
  }
  ok(res,
     "text attributes are calculated successfully at wrong offset " + aOffset + " for " + prettyName(aID));
}
function testTextAttrsWrongOffset ( aID , aOffset ) { var res = false ; try { var s = { } , e = { } ; var acc = getAccessible ( ID , [ nsIAccessibleText ] ) ; acc . getTextAttributes ( false , 157 , s , e ) ; } catch ( e ) { res = true ; } ok ( res , "text attributes are calculated successfully at wrong offset " + aOffset + " for " + prettyName ( aID ) ) ; }
Test text attributes for wrong offset.
Test text attributes for wrong offset .