24
|
1 |
// Copyright (c) 2007-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 <e32test.h>
|
|
17 |
|
|
18 |
#include "TE_EtelMMTestStepBase.h"
|
|
19 |
#include "te_mmsetpriorityclient.h"
|
|
20 |
#include "testdef.h"
|
|
21 |
|
|
22 |
CTestMMSetPrClientPreallocHeap::CTestMMSetPrClientPreallocHeap()
|
|
23 |
/** Each test step initialises it's own name
|
|
24 |
*/
|
|
25 |
{
|
|
26 |
// store the name of this test case
|
|
27 |
// this is the name that is used by the script file
|
|
28 |
SetTestStepName(_L("TestMMSetPrClientPreallocHeap"));
|
|
29 |
}
|
|
30 |
|
|
31 |
enum TVerdict CTestMMSetPrClientPreallocHeap::doTestStepL()
|
|
32 |
//
|
|
33 |
// To check even under low memory condition of default Etel process heap ,the APIs using
|
|
34 |
// reserved heap doesn't fail
|
|
35 |
//
|
|
36 |
{
|
|
37 |
INFO_PRINTF1(_L("To check even under low memory condition of default Etel process heap ,the APIs using reserved heap doesn't fail"));
|
|
38 |
#ifdef _DEBUG
|
|
39 |
TInt ret=iTelServer.SetPriorityClient();
|
|
40 |
TEST(ret==KErrNone);
|
|
41 |
OOMTest_DialEmergencyCall();
|
|
42 |
#else
|
|
43 |
INFO_PRINTF1(_L("Test disabled on release builds."));
|
|
44 |
#endif // _DEBUG
|
|
45 |
return TestStepResult();
|
|
46 |
}
|
|
47 |
|
|
48 |
CTestMMSetPrClientAndSetEmgClient::CTestMMSetPrClientAndSetEmgClient()
|
|
49 |
/** Each test step initialises it's own name
|
|
50 |
*/
|
|
51 |
{
|
|
52 |
// store the name of this test case
|
|
53 |
// this is the name that is used by the script file
|
|
54 |
SetTestStepName(_L("TestMMSetPrClientAndSetEmgClient"));
|
|
55 |
}
|
|
56 |
|
|
57 |
enum TVerdict CTestMMSetPrClientAndSetEmgClient::doTestStepL()
|
|
58 |
//
|
|
59 |
// To test a combination of SetPriorityClient API and SetEmergencyClient API.
|
|
60 |
//
|
|
61 |
{
|
|
62 |
INFO_PRINTF1(_L("To test a combination of SetPriorityClient API and SetEmergencyClient API."));
|
|
63 |
#ifdef _DEBUG
|
|
64 |
TInt ret=iTelServer.SetPriorityClient();
|
|
65 |
TEST(ret==KErrNone);
|
|
66 |
TInt setemergency;
|
|
67 |
setemergency=iPhone.SetEmergencyClient(RPhone::EEmergencyCSVoiceCallRequest);
|
|
68 |
TEST(setemergency==KErrAlreadyExists);
|
|
69 |
INFO_PRINTF2(_L("Test %d - iPhone.SetEmergencyClient(RPhone::EEmergencyCSVoiceCallRequest); "), setemergency);
|
|
70 |
OOMTest_DialEmergencyCall();
|
|
71 |
#else
|
|
72 |
INFO_PRINTF1(_L("Test disabled on release builds."));
|
|
73 |
#endif // _DEBUG
|
|
74 |
return TestStepResult();
|
|
75 |
}
|
|
76 |
|
|
77 |
CTestMMSetPrClientV2AndSetEmgClientVoiceReq::CTestMMSetPrClientV2AndSetEmgClientVoiceReq()
|
|
78 |
/** Each test step initialises it's own name
|
|
79 |
*/
|
|
80 |
{
|
|
81 |
// store the name of this test case
|
|
82 |
// this is the name that is used by the script file
|
|
83 |
SetTestStepName(_L("TestMMSetPrClientV2AndSetEmgClientVoiceReq"));
|
|
84 |
}
|
|
85 |
|
|
86 |
enum TVerdict CTestMMSetPrClientV2AndSetEmgClientVoiceReq::doTestStepL()
|
|
87 |
//
|
|
88 |
// To check even under low memory condition of default Etel process heap ,the APIs using
|
|
89 |
// reserved heap doesn't fail
|
|
90 |
//
|
|
91 |
{
|
|
92 |
INFO_PRINTF1(_L("To check even under low memory condition of default Etel process heap ,the APIs using reserved heap doesn't fail"));
|
|
93 |
#ifdef _DEBUG
|
|
94 |
TInt ret=iTelServer.SetPriorityClientV2();
|
|
95 |
TEST(ret==KErrNone);
|
|
96 |
TInt setemergency;
|
|
97 |
setemergency=iPhone.SetEmergencyClient(RPhone::EEmergencyCSVoiceCallRequest);
|
|
98 |
TEST(setemergency==KErrNone);
|
|
99 |
INFO_PRINTF2(_L("Test %d - iPhone.SetEmergencyClient(RPhone::EEmergencyCSVoiceCallRequest); "), setemergency);
|
|
100 |
OOMTest_DialEmergencyCall();
|
|
101 |
#else
|
|
102 |
INFO_PRINTF1(_L("Test disabled on release builds."));
|
|
103 |
#endif // _DEBUG
|
|
104 |
return TestStepResult();
|
|
105 |
}
|
|
106 |
|
|
107 |
CTestMMSetPrClientV2AndSetEmgClientLcsReq::CTestMMSetPrClientV2AndSetEmgClientLcsReq()
|
|
108 |
/** Each test step initialises it's own name
|
|
109 |
*/
|
|
110 |
{
|
|
111 |
// store the name of this test case
|
|
112 |
// this is the name that is used by the script file
|
|
113 |
SetTestStepName(_L("TestMMSetPrClientV2AndSetEmgClientLcsReq"));
|
|
114 |
}
|
|
115 |
|
|
116 |
enum TVerdict CTestMMSetPrClientV2AndSetEmgClientLcsReq::doTestStepL()
|
|
117 |
//
|
|
118 |
// To test a combination of SetPriorityClient API and SetEmergencyClient(LCSRequest) API.
|
|
119 |
//
|
|
120 |
{
|
|
121 |
INFO_PRINTF1(_L("To test a combination of SetPriorityClient API and SetEmergencyClient(LCSRequest) API."));
|
|
122 |
#ifdef _DEBUG
|
|
123 |
TInt ret=iTelServer.SetPriorityClientV2();
|
|
124 |
TEST(ret==KErrNone);
|
|
125 |
TInt setemergency;
|
|
126 |
setemergency=iPhone.SetEmergencyClient(RPhone::EEmergencyLCSRequest);
|
|
127 |
TEST(setemergency==KErrNone);
|
|
128 |
INFO_PRINTF2(_L("Test %d - iPhone.SetEmergencyClient(RPhone::EEmergencyLCSRequest); "), setemergency);
|
|
129 |
OOMTest_LBS();
|
|
130 |
#else
|
|
131 |
INFO_PRINTF1(_L("Test disabled on release builds."));
|
|
132 |
#endif // _DEBUG
|
|
133 |
return TestStepResult();
|
|
134 |
}
|
|
135 |
|
|
136 |
CTestMMSetPrClientV2AndSetEmgClientVoiceOrLbsReq::CTestMMSetPrClientV2AndSetEmgClientVoiceOrLbsReq()
|
|
137 |
/** Each test step initialises it's own name
|
|
138 |
*/
|
|
139 |
{
|
|
140 |
// store the name of this test case
|
|
141 |
// this is the name that is used by the script file
|
|
142 |
SetTestStepName(_L("TestMMSetPrClientV2AndSetEmgClientVoiceOrLbsReq"));
|
|
143 |
}
|
|
144 |
|
|
145 |
enum TVerdict CTestMMSetPrClientV2AndSetEmgClientVoiceOrLbsReq::doTestStepL()
|
|
146 |
//
|
|
147 |
// To test a combination of SetPriorityClient API and SetEmergencyClient(LCSRequest or Voice request) API.
|
|
148 |
//
|
|
149 |
{
|
|
150 |
INFO_PRINTF1(_L("To test a combination of SetPriorityClient API and SetEmergencyClient(LCSRequest or Voice request) API"));
|
|
151 |
#ifdef _DEBUG
|
|
152 |
TInt ret=iTelServer.SetPriorityClientV2();
|
|
153 |
TEST(ret==KErrNone);
|
|
154 |
TInt setemergency;
|
|
155 |
setemergency=iPhone.SetEmergencyClient(RPhone::EEmergencyCSVoiceCallRequest | RPhone::EEmergencyLCSRequest);
|
|
156 |
TEST(setemergency==KErrNone);
|
|
157 |
INFO_PRINTF2(_L("Test %d - iPhone.SetEmergencyClient(RPhone::EEmergencyCSVoiceCallRequest| RPhone::EEmergencyLCSRequest); "), setemergency);
|
|
158 |
OOMTest_DialEmergencyCall();
|
|
159 |
#else
|
|
160 |
INFO_PRINTF1(_L("Test disabled on release builds."));
|
|
161 |
#endif // _DEBUG
|
|
162 |
return TestStepResult();
|
|
163 |
}
|