diff -r d38941471f1c -r cb32bcc88bad sysstatemgmt/systemstatemgr/test/tcmn/scripts/ssmatest_cmn_deferwocap.script --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sysstatemgmt/systemstatemgr/test/tcmn/scripts/ssmatest_cmn_deferwocap.script Fri Oct 08 14:33:25 2010 +0300 @@ -0,0 +1,57 @@ +// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// 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. +// + +//! @file +//! @SYMTestSuiteName DVS-SSMA-CMN-0015 +//! @SYMScriptTestEnvironment Details as in below:- +//! 1. testexecute framework(TEF3.0). +//! For the testing purpose define macro TEST_SSM_GRACEFUL_SHUTDOWN(For power off request feature) and SYMBIAN_INCLUDE_APP_CENTRIC(for transition monitoring feature). +//! 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. +//! So this test has to be executed separately or at the end on overnight build machines. +//! @SYMScriptPurpose Test whether a client deferring without required capabilities results in an error +//! @SYMScriptCreationDate 18/08/2010 + +RUN_PROGRAM -1 setcap tcmn_transitionmonitor.exe 00004 tcmn_transitionmonitor_wocap.exe +LOAD_SUITE tcmn_transitionmonitor_wocap + +START_TESTCASE DVS-SSMA-CMN-0015 +//! @SYMTestCaseID DVS-SSMA-CMN-0015 +//! @SYMPREQ SUB 405-5490 +//! @SYMTestType CIT +//! @SYMTestPriority Critical +//! @SYMTestStatus Implemented +//! @SYMTestCaseDesc Test the behaviour of a server which tries to defer state notification without appropriate capabilities +//! @SYMTestActions 1.Create a thread and connect to the server with a domain Id and request for shutdown state change notification +//! 2.Request state change to ESsmShutdown +//! 3.Defer acknowledgement, upon receiving state change notification to shutdown state, without WriteDeviceData and ProtServ capabilities +//! @SYMTestExpectedResults Request to defer acknowledgement should fail with KErrPermissionDenied + +START_TEST_BLOCK 100 tcmn_transitionmonitor_wocap z:\ssmatest\ssmatest_cmn_transitionmonitor.ini + CREATE_OBJECT RSsmStateAwareSession1 RSsmStateAwareSession1 + CREATE_OBJECT RSsmStateManager RSsmStateManager + COMMAND RSsmStateAwareSession1 NewL + COMMAND RSsmStateManager NewL + COMMAND RSsmStateAwareSession1 Connect Domain + COMMAND RSsmStateManager Connect + COMMAND RSsmStateAwareSession1 ReadIniData DeferWoCap + COMMAND !AsyncError=-46 RSsmStateAwareSession1 RequestStateNotification + COMMAND RSsmStateManager RequestStateTransition ShutdownTransitionCriticalSubState + OUTSTANDING + COMMAND RSsmStateAwareSession1 Close + COMMAND RSsmStateManager Close + COMMAND RSsmStateAwareSession1 ~ + COMMAND RSsmStateManager ~ +END_TEST_BLOCK +END_TESTCASE DVS-SSMA-CMN-0015