B2G/gecko/accessible/tests/mochitest/treeview.js
/**
 * Helper method to start a single XUL tree test.
 */
Helper method to start a single XUL tree test.
Helper method to start a single XUL tree test .
function loadXULTreeAndDoTest(aDoTestFunc, aTreeID, aTreeView)
{
  var doTestFunc = aDoTestFunc ? aDoTestFunc : gXULTreeLoadContext.doTestFunc;
  var treeID = aTreeID ? aTreeID : gXULTreeLoadContext.treeID;
  var treeView = aTreeView ? aTreeView : gXULTreeLoadContext.treeView;
  function loadXULTree(aTreeID, aTreeView)
  {
    this.treeNode = getNode(aTreeID);
    this.eventSeq = [
      new invokerChecker(EVENT_REORDER, this.treeNode)
    ];
    this.invoke = function loadXULTree_invoke()
    {
      this.treeNode.treeBoxObject.view = aTreeView;
    }
    this.getID = function loadXULTree_getID()
    {
      return "Load XUL tree " + prettyName(aTreeID);
    }
  }
  gXULTreeLoadContext.queue = new eventQueue();
  gXULTreeLoadContext.queue.push(new loadXULTree(treeID, treeView));
  gXULTreeLoadContext.queue.onFinish = function()
  {
    SimpleTest.executeSoon(doTestFunc);
    return DO_NOT_FINISH_TEST;
  }
  gXULTreeLoadContext.queue.invoke();
}
function loadXULTreeAndDoTest ( aDoTestFunc , aTreeID , aTreeView ) { var doTestFunc = aDoTestFunc ? aDoTestFunc : gXULTreeLoadContext . doTestFunc ; var treeID = aTreeID ? aTreeID : gXULTreeLoadContext . treeID ; var treeView = aTreeView ? aTreeView : gXULTreeLoadContext . treeView ; function loadXULTree ( aTreeID , aTreeView ) { this . treeNode = getNode ( aTreeID ) ; this . eventSeq = [ new invokerChecker ( EVENT_REORDER , this . treeNode ) ] ; this . invoke = function loadXULTree_invoke ( ) { this . treeNode . treeBoxObject . view = aTreeView ; } this . getID = function loadXULTree_getID ( ) { return "Load XUL tree " + prettyName ( aTreeID ) ; } } gXULTreeLoadContext . queue = new eventQueue ( ) ; gXULTreeLoadContext . queue . push ( new loadXULTree ( treeID , treeView ) ) ; gXULTreeLoadContext . queue . onFinish = function ( ) { SimpleTest . executeSoon ( doTestFunc ) ; return DO_NOT_FINISH_TEST ; } gXULTreeLoadContext . queue . invoke ( ) ; }
Helper method to start a single XUL tree test.
Helper method to start a single XUL tree test .