First public contribution.
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32\estart\estart.cpp
18 //! @SYMTestCaseID FSBASE/ESTART/PREQ808/001
20 //! @SYMTestCaseDesc Test start-up mode property's availability and validity
22 //! @SYMTestStatus Implemented
23 //! @SYMTestActions Read and write the property.
24 //! @SYMTestExpectedResults Pass read operation and fail write operation if no correct permission.
25 //! @SYMTestPriority Low
26 //! @SYMAuthor Ying Shi
27 //! @SYMCreationDate 03/11/2004
28 //! @See Estart component
31 #include <e32property.h>
35 #include <f32file_private.h>
37 RTest gTest(_L("T_StartupMode"));
43 gTest.Next(_L("Read startup mode"));
45 r = RProperty::Get(KUidSystemCategory, KSystemStartupModeKey, sysStartupMode);
46 gTest(r == KErrNone); // Read operation should be successful
47 RDebug::Printf("System startup mode: %d", sysStartupMode);
49 gTest.Next(_L("write startup mode"));
50 r = RProperty::Set(KUidSystemCategory, KSystemStartupModeKey, 1);
51 if (PlatSec::ConfigSetting(PlatSec::EPlatSecEnforcement))
52 gTest(r == KErrPermissionDenied); // Should have no permission to write
54 gTest(r == KErrNone); // Should have no permission to write
59 TInt r = gRFs.SetStartupConfiguration(ELoaderPriority, (TAny*)EPriorityNormal, 0);
60 gTest(r == KErrPermissionDenied);
66 gTest.Start(_L("Start-up mode test sets"));
67 gTest.SetLogged(ETrue);
69 TInt r = gRFs.Connect();