sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tmisc_adaptationplugin_step.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".
    18  @test
    18  @test
    19  @internalComponent - Internal Symbian test code  
    19  @internalComponent - Internal Symbian test code  
    20 */
    20 */
    21 
    21 
    22 
    22 
    23 
    23 #include <e32property.h>
    24 #include <s32mem.h>
    24 #include <s32mem.h>
    25 #include "tmisc_adaptationplugin_step.h"
    25 #include "tmisc_adaptationplugin_step.h"
    26 
    26 
    27 //
    27 //
    28 // Run the tests
    28 // Run the tests
    29 //
    29 //
       
    30 
       
    31 const TUid KPropertyCategory={0x2000D75B};              // tcustomcmd_server SID = KSsmServerName SID (changed in tcustomcmd_server.mmp file)
       
    32 const TUint32 KMiscPluginPropertyKey = 0x2000E658;
    30 
    33 
    31 CTestMiscAdaptationPlugin::CTestMiscAdaptationPlugin()
    34 CTestMiscAdaptationPlugin::CTestMiscAdaptationPlugin()
    32 	:CAdaptationTestBase(KTCTestMiscAdaptationPlugin)
    35 	:CAdaptationTestBase(KTCTestMiscAdaptationPlugin)
    33 	{
    36 	{
    34 	
    37 	
   172 //from CAdaptationTestBase
   175 //from CAdaptationTestBase
   173 TVerdict CTestMiscAdaptationPlugin::doTestStepL()
   176 TVerdict CTestMiscAdaptationPlugin::doTestStepL()
   174 	{
   177 	{
   175 	__UHEAP_MARK;
   178 	__UHEAP_MARK;
   176 	
   179 	
       
   180 	TInt err = RProperty::Define(KPropertyCategory, KMiscPluginPropertyKey, RProperty::EInt);
       
   181 	INFO_PRINTF2(_L("Defining KMiscPluginPropertyKey returns %d"), err);
       
   182 	TEST((KErrNone == err) || (KErrAlreadyExists == err));
       
   183 	err = RProperty::Set(KPropertyCategory, KMiscPluginPropertyKey, 1);
       
   184 	TEST(KErrNone == err);
       
   185 		
   177 	TestSecurityStateChange();
   186 	TestSecurityStateChange();
   178 
   187 
   179 	TestGetGlobalStartupMode();
   188 	TestGetGlobalStartupMode();
   180 	
   189 	
   181 	TestPrepareSimLanguages();
   190 	TestPrepareSimLanguages();
   198 	
   207 	
   199 	TestGetHiddenReset();
   208 	TestGetHiddenReset();
   200 
   209 
   201 	TestCancel();
   210 	TestCancel();
   202 	//TestRelease();			// have to test this part too ...
   211 	//TestRelease();			// have to test this part too ...
   203 
   212 	
       
   213 	err = RProperty::Delete(KPropertyCategory, KMiscPluginPropertyKey);
       
   214 	TEST(KErrNone == err);
       
   215 	
   204 	__UHEAP_MARKEND;
   216 	__UHEAP_MARKEND;
   205 
   217 
   206 	return TestStepResult();
   218 	return TestStepResult();
   207 	}
   219 	}