diff -r 1ddbe54d0645 -r ccb4f6b3db21 sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_deactivaterfforemergencycall.cpp --- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_deactivaterfforemergencycall.cpp Thu Aug 19 11:09:10 2010 +0300 +++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/tcmd_step_deactivaterfforemergencycall.cpp Tue Aug 31 16:29:05 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2007-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" @@ -22,6 +22,9 @@ #include "tcmd_step_deactivaterfforemergencycall.h" #include "ssmcustomcmdfactory.h" #include "cmddeactivaterfforemergencycall.h" +#include +const TUint32 KEmergencyCallRfAdaptationPluginPropertyKey = 0x2000E657; +const TUid KPropertyCategory={0x2000D75B}; CCustomCmdTestDeactivateRfForEmergencyCall::~CCustomCmdTestDeactivateRfForEmergencyCall() { @@ -41,6 +44,11 @@ { _LIT(KTESTLOG, "TestCustomCmdDeactivateRfForEmergencyCallL"); INFO_PRINTF1(KTESTLOG); + // Setting the P and S key will route the request to the reference plugins instead of the actual plugins + TInt err = RProperty::Define(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, RProperty::EInt); + TEST(KErrNone == err || KErrAlreadyExists == err); + err = RProperty::Set(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey, 1); + TEST(KErrNone == err); //Create Deactivate Rf For Emergency Call custom command MSsmCustomCommand* customCmdDeactivateRfForEmergencyCall = CCustomCmdDeactivateRfForEmergencyCall::NewL(); @@ -56,12 +64,12 @@ //Command parameter is not used inside the Execute. So passing any dummy data should be fine //Execute the command customCmdDeactivateRfForEmergencyCall->Execute(dummy, status); - TEST(KRequestPending == status.Int()); + //Wait for the request to be completed User::WaitForRequest(status); TEST(KErrNone == status.Int()); - + //Execute the command once again customCmdDeactivateRfForEmergencyCall->Execute(dummy, status); @@ -72,12 +80,14 @@ //is called it might have completed executing Execute() function. Thats is the reason for //checking the status to KErrNone instead of KErrCancel. TEST(KErrNone == status.Int()); - + //Close the command customCmdDeactivateRfForEmergencyCall->Close(); //Releasing the comand will delete itself. customCmdDeactivateRfForEmergencyCall->Release(); + err = RProperty::Delete(KPropertyCategory, KEmergencyCallRfAdaptationPluginPropertyKey); + TEST(KErrNone == err); } TVerdict CCustomCmdTestDeactivateRfForEmergencyCall::doTestStepL()