function QuickTestSuccessAssistant()
{
}

QuickTestSuccessAssistant.prototype.handleCommand = function(event) {
	if(event.type == Mojo.Event.command) {
		if (event.command == Mojo.Menu.helpCmd) {
			Event.stop(event);
			var openParams = {
				target: 'http://help.palm.com/device_info/index.html'
			};
			this.controller.serviceRequest('palm://com.palm.applicationManager', {
				method: 'open',
				parameters: {
					id: 'com.palm.app.help',
					params: openParams
				}
			});
		}else if (typeof this[event.command] == "function") {
			this[event.command](event);
		}
	} else if (event.type == Mojo.Event.commandEnable && 
		 (event.command == Mojo.Menu.helpCmd)) {
		event.stopPropagation();
	}
}

QuickTestSuccessAssistant.prototype.setup = function()
{
	this.appMenuModel = {
		visible: true,
		items: [Mojo.Menu.editItem, Mojo.Menu.helpItem]
	};
	this.controller.setupWidget(Mojo.Menu.appMenu, {omitDefaultItems: true}, this.appMenuModel);
	this.commandMenuModel = {
			visible:true,
			items: [{ }] 
    }; 
	var commandMenuItems = new Array();
    
  
	
	var cmdmenuItem1 = new Object();
    commandMenuItems.push(cmdmenuItem1);
	var cmdmenuItem2 = new Object();
    commandMenuItems.push(cmdmenuItem2);
	var cmdmenuItemDone = new Object();
    cmdmenuItemDone.label = $L("Done");
    cmdmenuItemDone.command = "handleDone";
    commandMenuItems.push(cmdmenuItemDone);
	this.commandMenuModel.items = commandMenuItems;

	
    this.controller.setupWidget(Mojo.Menu.commandMenu, {}, this.commandMenuModel);
	//this.controller.get('done').observe(Mojo.Event.tap, this.handleDone.bindAsEventListener(this));
}

QuickTestSuccessAssistant.prototype.handleDone = function()
{
	//pop back to deviceinfo more scene
	this.controller.stageController.popScenesTo("automatedtests");
	this.controller.stageController.popScene();
	
}

