/*
* Helper functions for Tree_dnd.html and Tree_dnd_multiParent.html tests
*/
function setup(){
// Disable auto-scrolling because otherwise the viewport scrolls as doh.robot.mouseMoveAt()
// moves the mouse, literally making the the drop target a moving target
// (and mouseMoveAt() doesn't take this possibility into account).
dojo.global.dojo.dnd.autoScrollNodes = function(){};
// Scroll viewport to (try to) make sure that both tree and drag-source
// are simultaneously in view.
var scroll = dojo.position("1001").y;
dojo.body().parentNode.scrollTop = scroll; // works on FF
dojo.body().scrollTop = scroll; // works on safari
}
function findTreeNode(/*String*/ treeId, /*String*/ label){
// summary:
// Find the TreeNode with the specified label in the given tree.
// Assumes that there's only one TreeNode w/that label (i.e. it
// breaks if certain items have multiple parents and appear in the
// tree multiple times)
var nodes = dojo.query(".dijitTreeLabel", treeId);
for(var i=0; i