sysstatemgmt/systemstateplugins/test/tunitgsapolicy/src/tgsa_step_shutdown.cpp
branchRCL_3
changeset 21 ccb4f6b3db21
parent 0 4e1aa6a622a0
child 22 8cb079868133
equal deleted inserted replaced
20:1ddbe54d0645 21:ccb4f6b3db21
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    25 #include <e32uid.h>
    25 #include <e32uid.h>
    26 #include <ssm/ssmsubstates.hrh>
    26 #include <ssm/ssmsubstates.hrh>
    27 #include <ssm/ssmcommandlist.h>
    27 #include <ssm/ssmcommandlist.h>
    28 #include <ssm/ssmcmd.hrh>
    28 #include <ssm/ssmcmd.hrh>
    29 #include <ssm/ssmcommand.h>
    29 #include <ssm/ssmcommand.h>
       
    30 #include <ssmsubstateext.hrh> 
    30 
    31 
    31 #include "tgsa_step_shutdown.h"
    32 #include "tgsa_step_shutdown.h"
    32 
    33 
    33 TSsmCommandType ArrCriticalShutdown[] = { ESsmCmdPublishSystemState};
    34 TSsmCommandType ArrCriticalShutdown[] = {   ESsmCmdCustomCommand,       //r_cmd_sastate
    34 TSsmCommandType ArrNonCriticalShutdown[] = { ESsmCmdPublishSystemState, ESsmCmdPersistHalAttributes, ESsmCmdFinaliseDrives};
    35                                             ESsmCmdPublishSystemState,  //r_cmd_publishstate
    35 TSsmCommandType ArrPowerOffShutdown[] = { ESsmCmdPublishSystemState, ESsmCmdPowerOff };
    36                                             ESsmCmdSetPAndSKey,         //r_cmd_psstate
       
    37                                             ESsmCmdCustomCommand,       //r_cmd_cancelmonitoring
       
    38                                             ESsmCmdCustomCommand        //r_cmd_shutdownapps
       
    39                                             };
       
    40 TSsmCommandType ArrNonCriticalShutdown[] = {ESsmCmdPublishSystemState,  //r_cmd_publishstate 
       
    41                                             ESsmCmdSetPAndSKey,         //r_cmd_killsplash
       
    42                                             ESsmCmdCustomCommand,       //r_cmd_sashutdown
       
    43                                             ESsmCmdFinaliseDrives       //r_cmd_finalisedrives
       
    44                                             };
       
    45 TSsmCommandType ArrPowerOffShutdown[] = {   ESsmCmdPublishSystemState,  //r_cmd_publishstate
       
    46                                             ESsmCmdPowerOff             //r_cmd_poweroff 
       
    47                                             };
    36 
    48 
    37 const TUint16 KUnknownState = 100;
    49 const TUint16 KUnknownState = 100;
    38 
    50 
    39 CGsaShutdownTest::~CGsaShutdownTest()
    51 CGsaShutdownTest::~CGsaShutdownTest()
    40 	{
    52 	{
   130  */
   142  */
   131 void CGsaShutdownTest::doTestCommandListL()
   143 void CGsaShutdownTest::doTestCommandListL()
   132 	{
   144 	{
   133 	INFO_PRINTF1(_L("> CGsaShutdownTest::doTestCommandListL"));
   145 	INFO_PRINTF1(_L("> CGsaShutdownTest::doTestCommandListL"));
   134 
   146 
   135 	TestCommandListL(ESsmShutdown, ESsmShutdownSubStateCritical, 1);
   147 	TestCommandListL(ESsmShutdown, ESsmShutdownSubStateCritical, (sizeof(ArrCriticalShutdown)/sizeof(ArrCriticalShutdown[0])));
   136 	// KSsmAnySubState
   148 	// KSsmAnySubState
   137 	TestCommandListL(ESsmShutdown, KSsmAnySubState, 1);
   149 	TestCommandListL(ESsmShutdown, KSsmAnySubState, (sizeof(ArrCriticalShutdown)/sizeof(ArrCriticalShutdown[0])));
   138 	TestCommandListL(ESsmShutdown, ESsmShutdownSubStateNonCritical, 3);
   150 	TestCommandListL(ESsmShutdown, ESsmShutdownSubStateNonCritical, (sizeof(ArrNonCriticalShutdown)/sizeof(ArrNonCriticalShutdown[0])));
   139 	TestCommandListL(ESsmShutdown, ESsmShutdownSubStatePowerOff, 2);
   151 	TestCommandListL(ESsmShutdown, ESsmShutdownSubStatePowerOff, (sizeof(ArrPowerOffShutdown)/sizeof(ArrPowerOffShutdown[0])));
   140 	}
   152 	}
   141 
   153 
   142 /**
   154 /**
   143 Old Test CaseID 		AFSS-GSA-0024
   155 Old Test CaseID 		AFSS-GSA-0024
   144 New Test CaseID 		DEVSRVS-SSPLUGINS-GSA-0020
   156 New Test CaseID 		DEVSRVS-SSPLUGINS-GSA-0020