B2G/gecko/accessible/tests/mochitest/text.js
/**
 * Test removeSelection method.
 *
 * @param aID               [in] Id, DOM node, or acc obj
 * @param aSelectionIndex   [in] index of the selection to be removed
 * @param aSelectionsCount  [in] expected number of selections after
 *                               removeSelection
 */
Test removeSelection method.
@param aID               [in] Id, DOM node, or acc obj
@param aSelectionIndex   [in] index of the selection to be removed
@param aSelectionsCount  [in] expected number of selections after
removeSelection
Test removeSelection method . @param aID [ in ] Id DOM node or acc obj @param aSelectionIndex [ in ] index of the selection to be removed @param aSelectionsCount [ in ] expected number of selections after removeSelection
function testTextRemoveSelection(aID, aSelectionIndex, aSelectionsCount)
{
  var acc = getAccessible(aID, [nsIAccessibleText]);
  var text = acc.getText(0, -1);
  acc.removeSelection(aSelectionIndex);
  ok(acc.selectionCount, aSelectionsCount, 
     text + ": failed to remove selection at index '" + 
     aSelectionIndex + "': selectionCount after");
}
function testTextRemoveSelection ( aID , aSelectionIndex , aSelectionsCount ) { var acc = getAccessible ( aID , [ nsIAccessibleText ] ) ; var text = acc . getText ( 0 , - 1 ) ; acc . removeSelection ( aSelectionIndex ) ; ok ( acc . selectionCount , aSelectionsCount , text + ": failed to remove selection at index '" + aSelectionIndex + "': selectionCount after" ) ; }
Test removeSelection method.
Test removeSelection method .