B2G/gecko/accessible/tests/mochitest/layout.js
/**
 * Tests if the given child and grand child accessibles at the given point are
 * expected.
 *
 * @param aID            [in] accessible identifier
 * @param aX             [in] x coordinate of the point relative accessible
 * @param aY             [in] y coordinate of the point relative accessible
 * @param aChildID       [in] expected child accessible
 * @param aGrandChildID  [in] expected child accessible
 */
Tests if the given child and grand child accessibles at the given point are
expected.


Tests if the given child and grand child accessibles at the given point are expected .
function testChildAtPoint(aID, aX, aY, aChildID, aGrandChildID)
{
  var child = getChildAtPoint(aID, aX, aY, false);
  var expectedChild = getAccessible(aChildID);
  var msg = "Wrong direct child accessible at the point (" + aX + ", " + aY +
    ") of " + prettyName(aID);
  isObject(child, expectedChild, msg);
  var grandChild = getChildAtPoint(aID, aX, aY, true);
  var expectedGrandChild = getAccessible(aGrandChildID);
  msg = "Wrong deepest child accessible at the point (" + aX + ", " + aY +
    ") of " + prettyName(aID);
  isObject(grandChild, expectedGrandChild, msg);
}
function testChildAtPoint ( aID , aX , aY , aChildID , aGrandChildID ) { var child = getChildAtPoint ( aID , aX , aY , false ) ; var expectedChild = getAccessible ( aChildID ) ; var msg = "Wrong direct child accessible at the point (" + aX + ", " + aY + ") of " + prettyName ( aID ) ; isObject ( child , expectedChild , msg ) ; var grandChild = getChildAtPoint ( aID , aX , aY , true ) ; var expectedGrandChild = getAccessible ( aGrandChildID ) ; msg = "Wrong deepest child accessible at the point (" + aX + ", " + aY + ") of " + prettyName ( aID ) ; isObject ( grandChild , expectedGrandChild , msg ) ; }
Tests if the given child and grand child accessibles at the given point are
 expected.
Tests if the given child and grand child accessibles at the given point are expected .