24
|
1 |
// Copyright (c) 2005-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 "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".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#include "Te_SimPhBkSecurityCapsTest.h"
|
|
17 |
|
|
18 |
CSimPhBkSecurityCapsTest::CSimPhBkSecurityCapsTest()
|
|
19 |
{
|
|
20 |
SetTestStepName(_L("SecurityCapsTest"));
|
|
21 |
}
|
|
22 |
|
|
23 |
TVerdict CSimPhBkSecurityCapsTest::doTestStepL()
|
|
24 |
{
|
|
25 |
INFO_PRINTF1(_L("BeginPhBkSecurityCapsTest"));
|
|
26 |
|
|
27 |
CreateConfigFileL(_L("c:\\config3.txt"));
|
|
28 |
SetTestNumberL(0);
|
|
29 |
|
|
30 |
TInt ret = iPhone.Open(iTelServer,KPhoneName);
|
|
31 |
INFO_PRINTF2(_L("Result: %d"),ret);
|
|
32 |
TESTL(ret == KErrNone);
|
|
33 |
INFO_PRINTF1(_L("Opened phone object"));
|
|
34 |
TRequestStatus aReqStatus;
|
|
35 |
|
|
36 |
TUint32 secCaps;
|
|
37 |
TUint32 expectedSecCaps = RMobilePhone::KCapsLockPhone | \
|
|
38 |
RMobilePhone::KCapsLockICC | \
|
|
39 |
RMobilePhone::KCapsAccessPin1 | \
|
|
40 |
RMobilePhone::KCapsAccessPin2 | \
|
|
41 |
RMobilePhone::KCapsAccessPhonePassword | \
|
|
42 |
RMobilePhone::KCapsAccessSPC | \
|
|
43 |
RMobilePhone::KCapsAccessHiddenKey | \
|
|
44 |
RMobilePhone::KCapsAccessUSIMAppPin | \
|
|
45 |
RMobilePhone::KCapsAccessUSIMAppSecondPin | \
|
|
46 |
RMobilePhone::KCapsAccessUniversalPin;
|
|
47 |
|
|
48 |
INFO_PRINTF1(_L("GetSecurityCaps test"));
|
|
49 |
ret=iPhone.GetSecurityCaps(secCaps);
|
|
50 |
CHECKPOINTL(ret, KErrNone, CHP_APPS_CASE("H.1"));
|
|
51 |
TESTL(secCaps == expectedSecCaps);
|
|
52 |
|
|
53 |
INFO_PRINTF1(_L("Notify Security Caps change"));
|
|
54 |
iPhone.NotifySecurityCapsChange(aReqStatus,secCaps);
|
|
55 |
User::WaitForRequest(aReqStatus);
|
|
56 |
TESTL(aReqStatus == KErrNotSupported);
|
|
57 |
|
|
58 |
iPhone.Close();
|
|
59 |
ASSERT(RThread().RequestCount()==0);
|
|
60 |
|
|
61 |
return TestStepResult();
|
|
62 |
}
|
|
63 |
|