All pastes #2051560 Raw Edit

Mine

public text v1 · immutable
#2051560 ·published 2011-04-28 13:59 UTC
rendered paste body
* Contributor(s):
*
* 	Shriram Kunchanapalli <kshriram18@gmail.com>

var setupModule = function(module){
	module.controller  = mozmill.getBrowserController();
}

var setupTest = function(test) {
	//controller.window.alert('setupTest');
	controller.click(new elementslib.Elem(controller.menus['file-menu']['menu_newNavigatorTab']));
	controller.open('http://www.nytimes.com');
	//create a contextMenu instance
	contextMenu = controller.getMenu("#tabContextMenu");
}

var teardownTest = function(test) {
	//controller.window.alert('teardownTest');
	contextMenu.close();
	controller.click(new elementslib.Elem(controller.menus['file-menu']['menu_close']));
	//Close the tab
	
}

//Check with the documentation or Mozmill Forum posts regarding  he improvised principle or standard to not use it

var testForPinningTab = function() {
	//select the tab
	controller.tabs.selectTabIndex(0);
	//get the context menu of the tab
	contextMenu = controller.getMenu('#tabContextmenu');
	//right click to pin it as app tab by passing active tab to it
	contextMenu.select('#context_pinTab');
}