kerneltest/e32test/property/t_basic.cpp
changeset 271 dc268b18d709
parent 0 a41df078684a
equal deleted inserted replaced
269:d57b86b1867a 271:dc268b18d709
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2002-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 the License "Eclipse Public License v1.0"
     4 // under the terms of the License "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".
    50 		r = prop.Define(mySid, iKey, iType, KFailPolicy, KFailPolicy);
    50 		r = prop.Define(mySid, iKey, iType, KFailPolicy, KFailPolicy);
    51 		TF_ERROR(r, r == KErrAlreadyExists);
    51 		TF_ERROR(r, r == KErrAlreadyExists);
    52 		r = prop.Delete(mySid, iKey);
    52 		r = prop.Delete(mySid, iKey);
    53 		TF_ERROR(r, r == KErrNone);
    53 		TF_ERROR(r, r == KErrNone);
    54 
    54 
       
    55 		// Test deprecated method without policies
       
    56 		r = prop.Define(iCategory, iKey, iType);
       
    57 		TF_ERROR(r, r == KErrNone);
       
    58 		r = prop.Define(iCategory, iKey, iType);
       
    59 		TF_ERROR(r, r == KErrAlreadyExists);
       
    60 		r = prop.Delete(iCategory, iKey);
       
    61 		TF_ERROR(r, r == KErrNone);
       
    62 
    55 		// Test re-definition doesn't change security settings
    63 		// Test re-definition doesn't change security settings
    56 		// Defect DEF050961 - Re-defining an RProperty causes the security policy to be overwritten
    64 		// Defect DEF050961 - Re-defining an RProperty causes the security policy to be overwritten
    57 		{
    65 		{
    58 		TInt expectedResult = PlatSec::ConfigSetting(PlatSec::EPlatSecEnforcement)?KErrPermissionDenied:KErrNone;
    66 		TInt expectedResult = PlatSec::ConfigSetting(PlatSec::EPlatSecEnforcement)?KErrPermissionDenied:KErrNone;
    59 		_LIT(KTestBytes,"abcd");
    67 		_LIT(KTestBytes,"abcd");