B2G/gecko/accessible/tests/mochitest/pivot.js
/**
 * A checker for removing the pivot root and then calling moveFirst, and
 * checking that an exception is thrown.
 */
A checker for removing the pivot root and then calling moveFirst, and
checking that an exception is thrown.
A checker for removing the pivot root and then calling moveFirst and checking that an exception is thrown .
function removeVCRootChecker(aPivot)
{
  this.__proto__ = new invokerChecker(EVENT_REORDER, aPivot.root.parent);
  this.check = function removeVCRootChecker_check(aEvent) {
    var errorResult = 0;
    try {
      aPivot.moveLast(ObjectTraversalRule);
    } catch (x) {
      errorResult = x.result;
    }
    SimpleTest.is(
      errorResult, NS_ERROR_NOT_IN_TREE,
      "Expecting NOT_IN_TREE error when moving pivot from invalid position.");
  };
}
function removeVCRootChecker ( aPivot ) { this . __proto__ = new invokerChecker ( EVENT_REORDER , aPivot . root . parent ) ; this . check = function removeVCRootChecker_check ( aEvent ) { var errorResult = 0 ; try { aPivot . moveLast ( ObjectTraversalRule ) ; } catch ( x ) { errorResult = x . result ; } SimpleTest . is ( errorResult , NS_ERROR_NOT_IN_TREE , "Expecting NOT_IN_TREE error when moving pivot from invalid position." ) ; } ; }
A checker for removing the pivot root and then calling moveFirst, and
 checking that an exception is thrown.
A checker for removing the pivot root and then calling moveFirst and checking that an exception is thrown .