1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2009 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> |
|
31 |
30 |
32 #include "tgsa_step_shutdown.h" |
31 #include "tgsa_step_shutdown.h" |
33 |
32 |
34 TSsmCommandType ArrCriticalShutdown[] = { ESsmCmdCustomCommand, //r_cmd_sastate |
33 TSsmCommandType ArrCriticalShutdown[] = { ESsmCmdPublishSystemState}; |
35 ESsmCmdPublishSystemState, //r_cmd_publishstate |
34 TSsmCommandType ArrNonCriticalShutdown[] = { ESsmCmdPublishSystemState, ESsmCmdPersistHalAttributes, ESsmCmdFinaliseDrives}; |
36 ESsmCmdSetPAndSKey, //r_cmd_psstate |
35 TSsmCommandType ArrPowerOffShutdown[] = { ESsmCmdPublishSystemState, ESsmCmdPowerOff }; |
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 }; |
|
48 |
36 |
49 const TUint16 KUnknownState = 100; |
37 const TUint16 KUnknownState = 100; |
50 |
38 |
51 CGsaShutdownTest::~CGsaShutdownTest() |
39 CGsaShutdownTest::~CGsaShutdownTest() |
52 { |
40 { |
142 */ |
130 */ |
143 void CGsaShutdownTest::doTestCommandListL() |
131 void CGsaShutdownTest::doTestCommandListL() |
144 { |
132 { |
145 INFO_PRINTF1(_L("> CGsaShutdownTest::doTestCommandListL")); |
133 INFO_PRINTF1(_L("> CGsaShutdownTest::doTestCommandListL")); |
146 |
134 |
147 TestCommandListL(ESsmShutdown, ESsmShutdownSubStateCritical, (sizeof(ArrCriticalShutdown)/sizeof(ArrCriticalShutdown[0]))); |
135 TestCommandListL(ESsmShutdown, ESsmShutdownSubStateCritical, 1); |
148 // KSsmAnySubState |
136 // KSsmAnySubState |
149 TestCommandListL(ESsmShutdown, KSsmAnySubState, (sizeof(ArrCriticalShutdown)/sizeof(ArrCriticalShutdown[0]))); |
137 TestCommandListL(ESsmShutdown, KSsmAnySubState, 1); |
150 TestCommandListL(ESsmShutdown, ESsmShutdownSubStateNonCritical, (sizeof(ArrNonCriticalShutdown)/sizeof(ArrNonCriticalShutdown[0]))); |
138 TestCommandListL(ESsmShutdown, ESsmShutdownSubStateNonCritical, 3); |
151 TestCommandListL(ESsmShutdown, ESsmShutdownSubStatePowerOff, (sizeof(ArrPowerOffShutdown)/sizeof(ArrPowerOffShutdown[0]))); |
139 TestCommandListL(ESsmShutdown, ESsmShutdownSubStatePowerOff, 2); |
152 } |
140 } |
153 |
141 |
154 /** |
142 /** |
155 Old Test CaseID AFSS-GSA-0024 |
143 Old Test CaseID AFSS-GSA-0024 |
156 New Test CaseID DEVSRVS-SSPLUGINS-GSA-0020 |
144 New Test CaseID DEVSRVS-SSPLUGINS-GSA-0020 |