function assertElementTree(element, definition) {
  var onPass = null;
  if (definition.onPass) {
    onPass = definition.onPass;
    delete definition.onPass;
  }

  try {
    assertPropertiesMatch(definition, element, 0);
  }
  catch(badProp) {
    fail("Failed to match " + badProp[0] + ": " + badProp[1]);
  }

  if (onPass) {
    try {
      onPass(element);
    }
    catch(e) {
      throw new OnPassException("Failed to execute 'onPass' callback: " + e);
    }
  }
}
/**
 * Assert that the given definition matches the given element. The
 * definition is a JavaScript object whose property hierarchy matches
 * the given UIAElement.  Property names in the given definition that match a
 * method will cause that method to be invoked and the matching to be performed
 * and the result. For example, the UITableView exposes all UITableViewCells through
 * the cells() method. You only need to specify a 'cells' property to
 * cause the method to be invoked.
 */
Assert that the given definition matches the given element. The
definition is a JavaScript object whose property hierarchy matches
the given UIAElement.  Property names in the given definition that match a
method will cause that method to be invoked and the matching to be performed
and the result. For example, the UITableView exposes all UITableViewCells through
the cells() method. You only need to specify a 'cells' property to
cause the method to be invoked.
Assert that the given definition matches the given element . The definition is a JavaScript object whose property hierarchy matches the given UIAElement . Property names in the given definition that match a method will cause that method to be invoked and the matching to be performed and the result . For example the UITableView exposes all UITableViewCells through the cells () method . You only need to specify a ' cells ' property to cause the method to be invoked .
function assertElementTree(element, definition) {
  var onPass = null;
  if (definition.onPass) {
    onPass = definition.onPass;
    delete definition.onPass;
  }
  try {
    assertPropertiesMatch(definition, element, 0);
  }
  catch(badProp) {
    fail("Failed to match " + badProp[0] + ": " + badProp[1]);
  }
  if (onPass) {
    try {
      onPass(element);
    }
    catch(e) {
      throw new OnPassException("Failed to execute 'onPass' callback: " + e);
    }
  }
}
function assertElementTree ( element , definition ) { var onPass = null ; if ( definition . onPass ) { onPass = definition . onPass ; delete definition . onPass ; } try { assertPropertiesMatch ( definition , element , 0 ) ; } catch ( badProp ) { fail ( "Failed to match " + badProp [ 0 ] + ": " + badProp [ 1 ] ) ; } if ( onPass ) { try { onPass ( element ) ; } catch ( e ) { throw new OnPassException ( "Failed to execute 'onPass' callback: " + e ) ; } } }
Assert that the given definition matches the given element.
Assert that the given definition matches the given element .