|
1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: Testing for Transition Monitoring feature implemented as part of Staged Shutdown REQ for AppCentric architecture. This feature allows clients to defer acknowledgement to state change notifications during shutdown. |
|
14 // |
|
15 |
|
16 //! @file |
|
17 //! @SYMTestSuiteName DVS-SSMA-CMN-0010 |
|
18 //! @SYMScriptTestEnvironment Details as in below:- |
|
19 //! 1. testexecute framework(TEF3.0). |
|
20 //! For the testing purpose define macro TEST_SSM_GRACEFUL_SHUTDOWN(For power off request feature) and SYMBIAN_INCLUDE_APP_CENTRIC(for transition monitoring feature). |
|
21 //! Note: The system is going to be in shutdown state after executing this test and can not be restored to normal for executing other tests. |
|
22 //! So this test has to be executed separately or at the end on overnight build machines. |
|
23 //! @SYMScriptPurpose Test if cancelling a deferral after submitting a deferral call indeed cancels the deferral. |
|
24 //! @SYMScriptCreationDate 18/08/2010 |
|
25 |
|
26 LOAD_SUITE tcmn_transitionmonitor |
|
27 |
|
28 START_TESTCASE DVS-SSMA-CMN-0010 |
|
29 //! @SYMTestCaseID DVS-SSMA-CMN-0010 |
|
30 //! @SYMPREQ SUB 405-5490 |
|
31 //! @SYMTestType CIT |
|
32 //! @SYMTestPriority Critical |
|
33 //! @SYMTestStatus Implemented |
|
34 //! @SYMTestCaseDesc Test the behaviour of a server which defers acknowledgement to the shutdown state change notification and then cancels the deferral |
|
35 //! @SYMTestActions 1.Create a thread and connect to the server with a domain Id and request for shutdown state change notification |
|
36 //! 2.Request state change to ESsmShutdown |
|
37 //! 3.Defer acknowledgement upon receiving state change notification to shutdown state |
|
38 //! 4.Cancel the deferral and acknowledge state change notification |
|
39 //! @SYMTestExpectedResults The call to defer completes with KErrCancel |
|
40 |
|
41 START_TEST_BLOCK 100 tcmn_transitionmonitor z:\ssmatest\ssmatest_cmn_transitionmonitor.ini |
|
42 CREATE_OBJECT RSsmStateAwareSession1 RSsmStateAwareSession1 |
|
43 CREATE_OBJECT RSsmStateManager RSsmStateManager |
|
44 COMMAND RSsmStateAwareSession1 NewL |
|
45 COMMAND RSsmStateManager NewL |
|
46 COMMAND RSsmStateAwareSession1 Connect Domain |
|
47 COMMAND RSsmStateManager Connect |
|
48 COMMAND RSsmStateAwareSession1 ReadIniData CancelDeferral |
|
49 COMMAND !AsyncError=-3 RSsmStateAwareSession1 RequestStateNotification |
|
50 COMMAND RSsmStateManager RequestStateTransition ShutdownTransitionCriticalSubState |
|
51 OUTSTANDING |
|
52 COMMAND RSsmStateAwareSession1 ReturnCount CancelDeferral |
|
53 COMMAND RSsmStateAwareSession1 Close |
|
54 COMMAND RSsmStateManager Close |
|
55 COMMAND RSsmStateAwareSession1 ~ |
|
56 COMMAND RSsmStateManager ~ |
|
57 END_TEST_BLOCK |
|
58 END_TESTCASE DVS-SSMA-CMN-0010 |