B2G/gecko/accessible/tests/mochitest/layout.js
/**
 * Test if getChildAtPoint returns the given child and grand child accessibles
 * at coordinates of child accessible (direct and deep hit test).
 */
Test if getChildAtPoint returns the given child and grand child accessibles
at coordinates of child accessible (direct and deep hit test).
Test if getChildAtPoint returns the given child and grand child accessibles at coordinates of child accessible ( direct and deep hit test ) .
function hitTest(aContainerID, aChildID, aGrandChildID)
{
  var container = getAccessible(aContainerID);
  var child = getAccessible(aChildID);
  var grandChild = getAccessible(aGrandChildID);
  var [x, y] = getBoundsForDOMElm(child);
  var actualChild = container.getChildAtPoint(x + 1, y + 1);
  isObject(actualChild, child,
           "Wrong direct child of " + prettyName(aContainerID));
  var actualGrandChild = container.getDeepestChildAtPoint(x + 1, y + 1);
  isObject(actualGrandChild, grandChild,
           "Wrong deepest child of " + prettyName(aContainerID));
}
function hitTest ( aContainerID , aChildID , aGrandChildID ) { var container = getAccessible ( aContainerID ) ; var child = getAccessible ( aChildID ) ; var grandChild = getAccessible ( aGrandChildID ) ; var [ x , y ] = getBoundsForDOMElm ( child ) ; var actualChild = container . getChildAtPoint ( x + 1 , y + 1 ) ; isObject ( actualChild , child , "Wrong direct child of " + prettyName ( aContainerID ) ) ; var actualGrandChild = container . getDeepestChildAtPoint ( x + 1 , y + 1 ) ; isObject ( actualGrandChild , grandChild , "Wrong deepest child of " + prettyName ( aContainerID ) ) ; }
Test if getChildAtPoint returns the given child and grand child accessibles
 at coordinates of child accessible (direct and deep hit test).
Test if getChildAtPoint returns the given child and grand child accessibles at coordinates of child accessible ( direct and deep hit test ) .