sysstatemgmt/systemstateplugins/test/tunitadptplugin/src/tmisc_adaptationplugin_step.cpp
branchRCL_3
changeset 22 8cb079868133
parent 21 ccb4f6b3db21
equal deleted inserted replaced
21:ccb4f6b3db21 22:8cb079868133
     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".
    18  @test
    18  @test
    19  @internalComponent - Internal Symbian test code  
    19  @internalComponent - Internal Symbian test code  
    20 */
    20 */
    21 
    21 
    22 
    22 
    23 #include <e32property.h>
    23 
    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;
       
    33 
    30 
    34 CTestMiscAdaptationPlugin::CTestMiscAdaptationPlugin()
    31 CTestMiscAdaptationPlugin::CTestMiscAdaptationPlugin()
    35 	:CAdaptationTestBase(KTCTestMiscAdaptationPlugin)
    32 	:CAdaptationTestBase(KTCTestMiscAdaptationPlugin)
    36 	{
    33 	{
    37 	
    34 	
   175 //from CAdaptationTestBase
   172 //from CAdaptationTestBase
   176 TVerdict CTestMiscAdaptationPlugin::doTestStepL()
   173 TVerdict CTestMiscAdaptationPlugin::doTestStepL()
   177 	{
   174 	{
   178 	__UHEAP_MARK;
   175 	__UHEAP_MARK;
   179 	
   176 	
   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 		
       
   186 	TestSecurityStateChange();
   177 	TestSecurityStateChange();
   187 
   178 
   188 	TestGetGlobalStartupMode();
   179 	TestGetGlobalStartupMode();
   189 	
   180 	
   190 	TestPrepareSimLanguages();
   181 	TestPrepareSimLanguages();
   207 	
   198 	
   208 	TestGetHiddenReset();
   199 	TestGetHiddenReset();
   209 
   200 
   210 	TestCancel();
   201 	TestCancel();
   211 	//TestRelease();			// have to test this part too ...
   202 	//TestRelease();			// have to test this part too ...
   212 	
   203 
   213 	err = RProperty::Delete(KPropertyCategory, KMiscPluginPropertyKey);
       
   214 	TEST(KErrNone == err);
       
   215 	
       
   216 	__UHEAP_MARKEND;
   204 	__UHEAP_MARKEND;
   217 
   205 
   218 	return TestStepResult();
   206 	return TestStepResult();
   219 	}
   207 	}