24
|
1 |
// Copyright (c) 2008-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 |
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file The TEFUnit test suite for CallControl in the Common TSY.
|
|
20 |
*/
|
|
21 |
|
|
22 |
#include <etel.h>
|
|
23 |
#include <etelmm.h>
|
|
24 |
#include <et_clsvr.h>
|
|
25 |
#include <ctsy/mmtsy_names.h>
|
|
26 |
#include <ctsy/serviceapi/mmtsy_ipcdefs.h>
|
|
27 |
#include <test/tmockltsydata.h>
|
|
28 |
#include <ctsy/serviceapi/gsmerror.h>
|
|
29 |
|
|
30 |
#include <ctsy/ltsy/mltsydispatchpacketservicesinterface.h>
|
|
31 |
#include "config.h"
|
|
32 |
#include "mockltsyindicatorids.h"
|
|
33 |
#include <in_sock.h>
|
|
34 |
|
|
35 |
#include "cctsypacketservicesfunegative.h"
|
|
36 |
|
|
37 |
void CCTsyPacketServicesFUNegative::ConvertDNSToPCOBuffer
|
|
38 |
(const TDes8& aPrimaryDNS, const TDes8& aSecondaryDNS, const TUint8 aRequestID, TDes8& aFormatPcoBufferAddr)
|
|
39 |
{
|
|
40 |
// Handle Primary DNS address
|
|
41 |
TInetAddr netPrimaryDNS;
|
|
42 |
TBuf<KDnsLength> netPrimaryDNSConv;
|
|
43 |
netPrimaryDNSConv.Copy(aPrimaryDNS);
|
|
44 |
netPrimaryDNS.Input(netPrimaryDNSConv);
|
|
45 |
TUint32 primDNSaddr = netPrimaryDNS.Address();
|
|
46 |
|
|
47 |
// Handle Secondary DNS address
|
|
48 |
TInetAddr netSecondaryDNS;
|
|
49 |
TBuf<KDnsLength> netSecondaryDNSConv;
|
|
50 |
netSecondaryDNSConv.Copy(aSecondaryDNS);
|
|
51 |
netSecondaryDNS.Input(netSecondaryDNSConv);
|
|
52 |
TUint32 secondaryDNSaddr = netSecondaryDNS.Address();
|
|
53 |
|
|
54 |
aFormatPcoBufferAddr[0] = KPrimaryAndSecondaryDNSLength; // Length
|
|
55 |
aFormatPcoBufferAddr[1] = KIPCRequestCode; // IPC PRequest Code
|
|
56 |
aFormatPcoBufferAddr[2] = aRequestID; // Request ID (CHAP challenge)
|
|
57 |
aFormatPcoBufferAddr[3] = KPacketLengthMSB; // Packet length MSB (always zero)
|
|
58 |
aFormatPcoBufferAddr[4] = KPrimaryAndSecondaryDNSLength; // Packet length LSB
|
|
59 |
aFormatPcoBufferAddr[5] = KIndicatePrimaryAddress; // Indicate Primary address
|
|
60 |
aFormatPcoBufferAddr[6] = KDnsAddressLength; // Length of address (inc header)
|
|
61 |
aFormatPcoBufferAddr[7] = (primDNSaddr >> 24) & 0xff; // Primary DNS
|
|
62 |
aFormatPcoBufferAddr[8] = (primDNSaddr >> 16) & 0xff; // Primary DNS
|
|
63 |
aFormatPcoBufferAddr[9] = (primDNSaddr >> 8) & 0xff; // Primary DNS
|
|
64 |
aFormatPcoBufferAddr[10] = primDNSaddr & 0xff; // Primary DNS
|
|
65 |
aFormatPcoBufferAddr[11] = KIndicateSecondaryAddress; // Indicate Secondary address
|
|
66 |
aFormatPcoBufferAddr[12] = KDnsAddressLength; // Length of address (inc header)
|
|
67 |
aFormatPcoBufferAddr[13] = (secondaryDNSaddr >> 24) & 0xff; // Secondary DNS
|
|
68 |
aFormatPcoBufferAddr[14] = (secondaryDNSaddr >> 16) & 0xff; // Secondary DNS
|
|
69 |
aFormatPcoBufferAddr[15] = (secondaryDNSaddr >> 8) & 0xff; // Secondary DNS
|
|
70 |
aFormatPcoBufferAddr[16] = secondaryDNSaddr & 0xff; // Secondary DNS
|
|
71 |
aFormatPcoBufferAddr.SetLength(KPrimaryAndSecondaryDNSLength + 1);
|
|
72 |
}
|
|
73 |
|
|
74 |
// Generates the username, password and requestID buffer as described in 3GPP specification 3G TS 24.008
|
|
75 |
void CCTsyPacketServicesFUNegative::ConvertUsernameAndPasswordToPCOBuffer(const TDes8& aUsername,
|
|
76 |
const TDes8& aPassword, const TUint8 aRequestID, TDes8& aFormatedBuffer)
|
|
77 |
{
|
|
78 |
TInt usernameLen = aUsername.Length();
|
|
79 |
TInt passwordLen = aPassword.Length();
|
|
80 |
TInt dataLen = usernameLen + passwordLen + KPasswordUsernameHeaderLength;
|
|
81 |
TInt i = 0;
|
|
82 |
|
|
83 |
aFormatedBuffer[i++] = dataLen; // Length
|
|
84 |
aFormatedBuffer[i++] = KIPCRequestCode; // IPC PRequest Codeio
|
|
85 |
aFormatedBuffer[i++] = aRequestID; // Request ID (CHAP challenge)
|
|
86 |
aFormatedBuffer[i++] = KPacketLengthMSB; // Packet length MSB (always zero)
|
|
87 |
aFormatedBuffer[i++] = dataLen; // Packet length LSB
|
|
88 |
aFormatedBuffer[i++] = usernameLen; // Length of username
|
|
89 |
aFormatedBuffer.SetLength(i);
|
|
90 |
aFormatedBuffer.Append(aUsername); // Username
|
|
91 |
aFormatedBuffer.SetLength(i + usernameLen + 1);
|
|
92 |
aFormatedBuffer[i + usernameLen] = passwordLen; // Length of password
|
|
93 |
aFormatedBuffer.Append(aPassword); // Password
|
|
94 |
}
|
|
95 |
|
|
96 |
/***
|
|
97 |
* PCO - Description
|
|
98 |
*
|
|
99 |
* The purpose of the protocol configuration options (PCO) is to transfer external network protocol options
|
|
100 |
* associated with a PDP context activation, and transfer additional (protocol) data
|
|
101 |
* (e.g. configuration parameters, error codes or messages/events) associated with an external protocol
|
|
102 |
* or an application.
|
|
103 |
* The protocol configuration options (PCO) is a type 4 information element with a minimum length of 3
|
|
104 |
* octets and a maximum length of 253 octets
|
|
105 |
* In order to generate the PCO buffer a TTlvStruct object is being used. The TTlvStruct wraps the buffers
|
|
106 |
* inserted to the PCO and identifies the buffers with given IDs.
|
|
107 |
*
|
|
108 |
* In the following test the PCO buffer is initiated with the username, password, requestID,
|
|
109 |
* primary DNS and secondary DNS. In addition the PCO contains a Misc Buffer which has the
|
|
110 |
* same structure and the same characteristics as the PCO buffer and can contain
|
|
111 |
* Miscellaneous protocol information. The main risk with the Misc Buffer is an overflow
|
|
112 |
* (The dispatcher handles the overflow scenario).
|
|
113 |
*
|
|
114 |
* Following is an example of a PCO buffer outline:
|
|
115 |
*
|
|
116 |
* PcoBuffer[0] == 0x80); // Config options ext bit
|
|
117 |
* PcoBuffer[1] == 0xC0); // Header 1
|
|
118 |
* PcoBuffer[2] == 0x23); // Header 2
|
|
119 |
* PcoBuffer[3] == 0xC); // Length
|
|
120 |
* PcoBuffer[4] == 0x1); // IPC PRequest Code
|
|
121 |
* PcoBuffer[5] == 0x0); // Request ID (CHAP challenge)
|
|
122 |
* PcoBuffer[6] == 0x0); // Packet length MSB (always zero)
|
|
123 |
* PcoBuffer[7] == 0xC); // Packet length LSB
|
|
124 |
* PcoBuffer[8] == 0x3); // Length of username
|
|
125 |
* PcoBuffer[9] == 119); // Username
|
|
126 |
* PcoBuffer[10] == 101); // Username
|
|
127 |
* PcoBuffer[11] == 98); // Username
|
|
128 |
* PcoBuffer[12] == 0x3); // Length of password
|
|
129 |
* PcoBuffer[13] == 119); // Password
|
|
130 |
* PcoBuffer[14] == 101); // Password
|
|
131 |
* PcoBuffer[15] == 98); // Password
|
|
132 |
* PcoBuffer[16] == 0x80); // DNS HeaderId 1
|
|
133 |
* PcoBuffer[17] == 0x21); // DNS HeaderId 2
|
|
134 |
* PcoBuffer[18] == 0x10); // Length
|
|
135 |
* PcoBuffer[19] == 0x1); // IPC PRequest Code
|
|
136 |
* PcoBuffer[20] == 0x1); // Request ID (CHAP challenge)
|
|
137 |
* PcoBuffer[21] == 0x0); // Packet length MSB (always zero)
|
|
138 |
* PcoBuffer[22] == 0x10); // Packet length LSB
|
|
139 |
* PcoBuffer[23] == 0x81); // Indicate Primary address
|
|
140 |
* PcoBuffer[24] == 0x6); // Length of address (inc header)
|
|
141 |
* PcoBuffer[25] == 0xBE); // Primary DNS
|
|
142 |
* PcoBuffer[26] == 0x0); // Primary DNS
|
|
143 |
* PcoBuffer[27] == 0x65); // Primary DNS
|
|
144 |
* PcoBuffer[28] == 0xBD); // Primary DNS
|
|
145 |
* PcoBuffer[29] == 0x83); // Indicate Secondary address
|
|
146 |
* PcoBuffer[30] == 0x6); // Length of address (inc header)
|
|
147 |
* PcoBuffer[31] == 0x19); // Secondary DNS
|
|
148 |
* PcoBuffer[32] == 0x5); // Secondary DNS
|
|
149 |
* PcoBuffer[33] == 0x28); // Secondary DNS
|
|
150 |
* PcoBuffer[34] == 0xBF); // Secondary DNS
|
|
151 |
*
|
|
152 |
* The Misc buffer should be added after the secondary DNS value (i.e. location 35 in the
|
|
153 |
* example above).
|
|
154 |
*/
|
|
155 |
|
|
156 |
//
|
|
157 |
//
|
|
158 |
//
|
|
159 |
// Generates a PCO buffer out of a PCO object.
|
|
160 |
void CCTsyPacketServicesFUNegative::PCOGeneratorL(RPacketContext::TProtocolConfigOptionV2& aPco, RPacketContext::TMiscProtocolBuffer& aPcoBuffer)
|
|
161 |
{
|
|
162 |
|
|
163 |
TBuf8<KMaxUserAndPassLength> userAndPasswordBuffer(KMaxUserAndPassLength);
|
|
164 |
|
|
165 |
// Generates the username, password and requestID buffer as described in 3GPP specification 3G TS 24.008
|
|
166 |
ConvertUsernameAndPasswordToPCOBuffer(aPco.iAuthInfo.iUsername, aPco.iAuthInfo.iPassword, aPco.iId++, userAndPasswordBuffer);
|
|
167 |
|
|
168 |
TPtr8 userAndPasswordParamDataPtr(const_cast<TUint8*>(userAndPasswordBuffer.Ptr()),
|
|
169 |
userAndPasswordBuffer.Length(), userAndPasswordBuffer.Length());
|
|
170 |
|
|
171 |
TBuf8<KMaxPdpAddressLength> primaryAndSecondaryDNSBuffer(KPrimaryAndSecondaryDNSLength + 1);
|
|
172 |
|
|
173 |
// Generates the primary and secondary DNS buffer as described in 3GPP specification 3G TS 24.008
|
|
174 |
ConvertDNSToPCOBuffer(aPco.iDnsAddresses.iPrimaryDns, aPco.iDnsAddresses.iSecondaryDns, aPco.iId++, primaryAndSecondaryDNSBuffer);
|
|
175 |
|
|
176 |
// Setting the configurations buffers
|
|
177 |
TPtr8 primaryAndSecondaryDNSParamDataPtr(const_cast<TUint8*>(primaryAndSecondaryDNSBuffer.Ptr()),
|
|
178 |
primaryAndSecondaryDNSBuffer.Length(), primaryAndSecondaryDNSBuffer.Length());
|
|
179 |
|
|
180 |
TPtr8 pcoPtr (const_cast<TUint8*> (aPcoBuffer.Ptr()), RPacketContext::KMiscProtocolBufferLength);
|
|
181 |
TTlvStruct<RPacketContext::TPcoId, RPacketContext::TPcoItemDataLength> pcoTlv(pcoPtr,0);
|
|
182 |
|
|
183 |
RPacketContext::TPcoId usenameAndPasswordID(KUsenamePasswordDNSID);
|
|
184 |
RPacketContext::TPcoId primaryAndSecondaryDNSID(KPrimaryAndSecondaryDNSID);
|
|
185 |
|
|
186 |
pcoTlv.AppendItemL(usenameAndPasswordID, userAndPasswordParamDataPtr);
|
|
187 |
pcoTlv.AppendItemL(primaryAndSecondaryDNSID, primaryAndSecondaryDNSParamDataPtr);
|
|
188 |
|
|
189 |
aPcoBuffer.SetLength(primaryAndSecondaryDNSParamDataPtr.Length() + userAndPasswordParamDataPtr.Length() + 2 * KIDLength);
|
|
190 |
|
|
191 |
// Append the misc buffer which is alread in TLV structure
|
|
192 |
aPcoBuffer.Append(aPco.iMiscBuffer);
|
|
193 |
}
|
|
194 |
|
|
195 |
void CCTsyPacketServicesFUNegative::DriverDeleteContextL(TInfoName aContextName)
|
|
196 |
{
|
|
197 |
RBuf8 data;
|
|
198 |
CleanupClosePushL(data);
|
|
199 |
TMockLtsyData1<TInfoName> contextNameData(aContextName);
|
|
200 |
data.Close();
|
|
201 |
contextNameData.SerialiseL(data);
|
|
202 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesDeletePdpContext::KLtsyDispatchPacketServicesDeletePdpContextApiId, data, KErrNone);
|
|
203 |
CleanupStack::PopAndDestroy(1, &data); // data
|
|
204 |
}
|
|
205 |
|
|
206 |
void CCTsyPacketServicesFUNegative::DriverAttachPacketServiceL()
|
|
207 |
{
|
|
208 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesPacketAttach::KLtsyDispatchPacketServicesPacketAttachApiId);
|
|
209 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesPacketAttach::KLtsyDispatchPacketServicesPacketAttachApiId, KErrNone);
|
|
210 |
}
|
|
211 |
|
|
212 |
void CCTsyPacketServicesFUNegative::DriverDetachPacketServiceL()
|
|
213 |
{
|
|
214 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesPacketDetach::KLtsyDispatchPacketServicesPacketDetachApiId);
|
|
215 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesPacketDetach::KLtsyDispatchPacketServicesPacketDetachApiId, KErrNone);
|
|
216 |
|
|
217 |
// SetAttachModeL being called as part of the detach completion process
|
|
218 |
RBuf8 dataExpect;
|
|
219 |
CleanupClosePushL(dataExpect);
|
|
220 |
RPacketService::TAttachMode attachMode = RPacketService::EAttachWhenPossible;
|
|
221 |
TMockLtsyData1<RPacketService::TAttachMode> ltsyData(attachMode);
|
|
222 |
dataExpect.Close();
|
|
223 |
ltsyData.SerialiseL(dataExpect);
|
|
224 |
|
|
225 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesSetPacketAttachMode::KLtsyDispatchPacketServicesSetPacketAttachModeApiId, dataExpect, KErrNone);
|
|
226 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesSetPacketAttachMode::KLtsyDispatchPacketServicesSetPacketAttachModeApiId, KErrNone);
|
|
227 |
|
|
228 |
CleanupStack::PopAndDestroy(1, &dataExpect); // dataExpect
|
|
229 |
}
|
|
230 |
|
|
231 |
void CCTsyPacketServicesFUNegative::DriverInitialiseContextL()
|
|
232 |
{
|
|
233 |
RBuf8 data;
|
|
234 |
CleanupClosePushL(data);
|
|
235 |
|
|
236 |
TInfoName primaryContext;
|
|
237 |
TInfoName secondaryContext;
|
|
238 |
primaryContext.Copy(KFirstAllocatedContextName);
|
|
239 |
secondaryContext.Copy(KDefaultContextName);
|
|
240 |
|
|
241 |
//-------------------------------------------------------------------------
|
|
242 |
// Successful completion request of
|
|
243 |
// RPacketContext::InitialiseContext
|
|
244 |
//-------------------------------------------------------------------------
|
|
245 |
|
|
246 |
TMockLtsyData2<TInfoName, TInfoName> expLtsyContextNamesData3(primaryContext, secondaryContext);
|
|
247 |
data.Close();
|
|
248 |
expLtsyContextNamesData3.SerialiseL(data);
|
|
249 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesInitialisePdpContext::KLtsyDispatchPacketServicesInitialisePdpContextApiId, data);
|
|
250 |
|
|
251 |
TDesC* contextNamePtr = &primaryContext;
|
|
252 |
TDesC* channelIdPtr = const_cast<TDesC*>(&KDefaultChannelId);
|
|
253 |
TMockLtsyData2<TDesC*, TDesC*> expLtsyContextNameAndChannelIdData(contextNamePtr, channelIdPtr);
|
|
254 |
data.Close();
|
|
255 |
expLtsyContextNameAndChannelIdData.SerialiseL(data);
|
|
256 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesInitialisePdpContext::KLtsyDispatchPacketServicesInitialisePdpContextApiId, KErrNone, data);
|
|
257 |
|
|
258 |
CleanupStack::PopAndDestroy(1, &data); // data
|
|
259 |
}
|
|
260 |
|
|
261 |
void CCTsyPacketServicesFUNegative::DriverInitialiseContextL(const TInfoName& aPrimaryContextId, const TInfoName& aSecondaryContextId)
|
|
262 |
{
|
|
263 |
RBuf8 data;
|
|
264 |
CleanupClosePushL(data);
|
|
265 |
|
|
266 |
TInfoName& primaryContext = const_cast<TInfoName&>(aPrimaryContextId);
|
|
267 |
TInfoName& secondaryContext = const_cast<TInfoName&>(aSecondaryContextId);
|
|
268 |
|
|
269 |
//-------------------------------------------------------------------------
|
|
270 |
// Successful completion request of
|
|
271 |
// RPacketContext::InitialiseContext
|
|
272 |
//-------------------------------------------------------------------------
|
|
273 |
|
|
274 |
TMockLtsyData2<TInfoName, TInfoName> expLtsyContextNamesData(primaryContext, secondaryContext);
|
|
275 |
data.Close();
|
|
276 |
expLtsyContextNamesData.SerialiseL(data);
|
|
277 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesInitialisePdpContext::KLtsyDispatchPacketServicesInitialisePdpContextApiId, data);
|
|
278 |
|
|
279 |
|
|
280 |
// Check if a secondary context is being initialise and if it is then compelte initialisation for secondary context.
|
|
281 |
TDesC* contextNamePtr = (aSecondaryContextId == KDefaultContextName) ? &primaryContext : &secondaryContext;
|
|
282 |
|
|
283 |
TDesC* channelIdPtr = const_cast<TDesC*>(&KSecondaryContextChannelId);
|
|
284 |
TMockLtsyData2<TDesC*, TDesC*> expLtsyContextNameAndPortData2(contextNamePtr, channelIdPtr);
|
|
285 |
data.Close();
|
|
286 |
expLtsyContextNameAndPortData2.SerialiseL(data);
|
|
287 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesInitialisePdpContext::KLtsyDispatchPacketServicesInitialisePdpContextApiId, KErrNone, data);
|
|
288 |
|
|
289 |
CleanupStack::PopAndDestroy(&data); // data
|
|
290 |
}
|
|
291 |
|
|
292 |
void CCTsyPacketServicesFUNegative::DriverSetConfigContextL(TInfoName aContextId,
|
|
293 |
RPacketContext::TGSNAddress aAccessPoint, RPacketContext::TProtocolType aPdpType,
|
|
294 |
RPacketContext::TProtocolAddress aPdpAddress,
|
|
295 |
RPacketContext::TMiscProtocolBuffer aPcoBuffer)
|
|
296 |
{
|
|
297 |
|
|
298 |
RBuf8 data;
|
|
299 |
CleanupClosePushL(data);
|
|
300 |
|
|
301 |
TMockLtsyData5<TInfoName, RPacketContext::TGSNAddress, RPacketContext::TProtocolType, RPacketContext::TProtocolAddress, RPacketContext::TMiscProtocolBuffer>
|
|
302 |
packetSetConfigData(aContextId, aAccessPoint, aPdpType, aPdpAddress, aPcoBuffer);
|
|
303 |
data.Close();
|
|
304 |
packetSetConfigData.SerialiseL(data);
|
|
305 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesSetPdpContextConfig::KLtsyDispatchPacketServicesSetPdpContextConfigApiId, data, KErrNone);
|
|
306 |
|
|
307 |
// Indicate that the context name is due to comeback from the SetConfig callback
|
|
308 |
TInfoName callbackContextId = aContextId;
|
|
309 |
TMockLtsyData1<TInfoName> callbackContextIdData(callbackContextId);
|
|
310 |
data.Close();
|
|
311 |
callbackContextIdData.SerialiseL(data);
|
|
312 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesSetPdpContextConfig::KLtsyDispatchPacketServicesSetPdpContextConfigApiId, KErrNone, data);
|
|
313 |
|
|
314 |
CleanupStack::PopAndDestroy(1, &data); // data
|
|
315 |
}
|
|
316 |
|
|
317 |
void CCTsyPacketServicesFUNegative::DriverModifyActiveContextL(TInt8 aRejectionCode, TInt aError)
|
|
318 |
{
|
|
319 |
RBuf8 data;
|
|
320 |
CleanupClosePushL(data);
|
|
321 |
|
|
322 |
TInfoName modifyActiveContextName;
|
|
323 |
modifyActiveContextName.Copy(KFirstAllocatedContextName);
|
|
324 |
TMockLtsyData1<TInfoName>
|
|
325 |
modifyActiveContextNameData(modifyActiveContextName);
|
|
326 |
data.Close();
|
|
327 |
modifyActiveContextNameData.SerialiseL(data);
|
|
328 |
|
|
329 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesModifyActivePdpContext::KLtsyDispatchPacketServicesModifyActivePdpContextApiId, data, KErrNone);
|
|
330 |
|
|
331 |
TMockLtsyData2<TInfoName, TInt8 >
|
|
332 |
completeModifyActiveContextData(modifyActiveContextName, aRejectionCode); // Context name and rejection code
|
|
333 |
data.Close();
|
|
334 |
completeModifyActiveContextData.SerialiseL(data);
|
|
335 |
|
|
336 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesModifyActivePdpContext::KLtsyDispatchPacketServicesModifyActivePdpContextApiId, aError, data);
|
|
337 |
|
|
338 |
CleanupStack::PopAndDestroy(1, &data); // data
|
|
339 |
}
|
|
340 |
|
|
341 |
void CCTsyPacketServicesFUNegative::OpenInitialiseMbmsContextLC(RPacketService& aPacketService, RPacketMbmsContext& aPacketContext, TDes& aContextName, const TDesC& aChannelId, TInt aCompError)
|
|
342 |
{
|
|
343 |
aPacketContext.OpenNewContext(aPacketService, aContextName);
|
|
344 |
CleanupClosePushL(aPacketContext);
|
|
345 |
|
|
346 |
RBuf8 data;
|
|
347 |
CleanupClosePushL(data);
|
|
348 |
|
|
349 |
TDesC* contextNamePtr = &aContextName;
|
|
350 |
TMockLtsyData1<TDesC*> initMbmdContextExpData(contextNamePtr);
|
|
351 |
initMbmdContextExpData.SerialiseL(data);
|
|
352 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesInitialiseMbmsContext::KLtsyDispatchPacketServicesInitialiseMbmsContextApiId, data);
|
|
353 |
data.Close();
|
|
354 |
|
|
355 |
|
|
356 |
TDesC* channelPtr = const_cast<TDesC*>(&aChannelId);
|
|
357 |
TMockLtsyData2<TDesC*,TDesC*> initMbmdContextCompData(contextNamePtr, channelPtr);
|
|
358 |
initMbmdContextCompData.SerialiseL(data);
|
|
359 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesInitialiseMbmsContext::KLtsyDispatchPacketServicesInitialiseMbmsContextApiId, aCompError, data);
|
|
360 |
data.Close();
|
|
361 |
|
|
362 |
//initialisation of the context
|
|
363 |
RPacketContext::TDataChannelV2 dataChannel;
|
|
364 |
RPacketContext::TDataChannelV2Pckg dataChannelPckg(dataChannel);
|
|
365 |
|
|
366 |
TRequestStatus requestStatus;
|
|
367 |
aPacketContext.InitialiseContext(requestStatus, dataChannelPckg);
|
|
368 |
User::WaitForRequest(requestStatus);
|
|
369 |
ASSERT_EQUALS(requestStatus.Int(), aCompError);
|
|
370 |
ASSERT_TRUE((aCompError != KErrNone) || (dataChannel.iChannelId == aChannelId));
|
|
371 |
|
|
372 |
AssertMockLtsyStatusL();
|
|
373 |
|
|
374 |
CleanupStack::PopAndDestroy(&data);
|
|
375 |
}
|
|
376 |
|
|
377 |
CTestSuite* CCTsyPacketServicesFUNegative::CreateSuiteL(const TDesC& aName)
|
|
378 |
{
|
|
379 |
SUB_SUITE;
|
|
380 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0001L);
|
|
381 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0002L);
|
|
382 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0003L);
|
|
383 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0004L);
|
|
384 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0005L);
|
|
385 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0006L);
|
|
386 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0007L);
|
|
387 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0008L);
|
|
388 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0009L);
|
|
389 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0010L);
|
|
390 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0011L);
|
|
391 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0012L);
|
|
392 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0013L);
|
|
393 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0014L);
|
|
394 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0015L);
|
|
395 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0016L);
|
|
396 |
|
|
397 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0018L);
|
|
398 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0019L);
|
|
399 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0020L);
|
|
400 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0021L);
|
|
401 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0022L);
|
|
402 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0023L);
|
|
403 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0024L);
|
|
404 |
ADD_TEST_STEP_ISO_CPP(CCTsyPacketServicesFUNegative, TestUnit0025L);
|
|
405 |
END_SUITE;
|
|
406 |
}
|
|
407 |
|
|
408 |
//
|
|
409 |
// 'Negative' unit tests
|
|
410 |
//
|
|
411 |
|
|
412 |
/**
|
|
413 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0001
|
|
414 |
@SYMComponent telephony_ctsy
|
|
415 |
@SYMTestCaseDesc Test returned value if EPacketAttach is not supported by LTSY
|
|
416 |
@SYMTestPriority High
|
|
417 |
@SYMTestActions Invokes RPacketService::Attach()
|
|
418 |
@SYMTestExpectedResults Pass
|
|
419 |
@SYMTestType UT
|
|
420 |
*/
|
|
421 |
void CCTsyPacketServicesFUNegative::TestUnit0001L()
|
|
422 |
{
|
|
423 |
TConfig config;
|
|
424 |
config.SetSupportedValue(MLtsyDispatchPacketServicesPacketAttach::KLtsyDispatchPacketServicesPacketAttachApiId, EFalse);
|
|
425 |
|
|
426 |
OpenEtelServerL(EUseExtendedError);
|
|
427 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
428 |
OpenPhoneL();
|
|
429 |
|
|
430 |
TRequestStatus requestStatus;
|
|
431 |
RPacketService packetService;
|
|
432 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
433 |
|
|
434 |
packetService.Attach(requestStatus);
|
|
435 |
User::WaitForRequest(requestStatus);
|
|
436 |
|
|
437 |
ASSERT_EQUALS(KErrGsmMMNetworkFailure, requestStatus.Int());
|
|
438 |
|
|
439 |
packetService.Close();
|
|
440 |
AssertMockLtsyStatusL();
|
|
441 |
config.Reset();
|
|
442 |
CleanupStack::PopAndDestroy(2, this); // packetService, this
|
|
443 |
}
|
|
444 |
|
|
445 |
/**
|
|
446 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0002
|
|
447 |
@SYMComponent telephony_ctsy
|
|
448 |
@SYMTestCaseDesc Test returned value if EPacketGetAttachMode is not supported by LTSY
|
|
449 |
@SYMTestPriority High
|
|
450 |
@SYMTestActions Invokes RPacketService::GetAttachMode()
|
|
451 |
@SYMTestExpectedResults Pass
|
|
452 |
@SYMTestType UT
|
|
453 |
*/
|
|
454 |
void CCTsyPacketServicesFUNegative::TestUnit0002L()
|
|
455 |
{
|
|
456 |
TConfig config;
|
|
457 |
config.SetSupportedValue(MLtsyDispatchPacketServicesGetPacketAttachMode::KLtsyDispatchPacketServicesGetPacketAttachModeApiId, EFalse);
|
|
458 |
|
|
459 |
OpenEtelServerL(EUseExtendedError);
|
|
460 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
461 |
OpenPhoneL();
|
|
462 |
|
|
463 |
TRequestStatus requestStatus;
|
|
464 |
RPacketService packetService;
|
|
465 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
466 |
|
|
467 |
RPacketService::TAttachMode completedAttachMode;
|
|
468 |
|
|
469 |
packetService.GetAttachMode(requestStatus, completedAttachMode);
|
|
470 |
User::WaitForRequest(requestStatus);
|
|
471 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
472 |
|
|
473 |
packetService.Close();
|
|
474 |
AssertMockLtsyStatusL();
|
|
475 |
config.Reset();
|
|
476 |
CleanupStack::PopAndDestroy(2, this); // packetService, this
|
|
477 |
}
|
|
478 |
|
|
479 |
/**
|
|
480 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0003
|
|
481 |
@SYMComponent telephony_ctsy
|
|
482 |
@SYMTestCaseDesc Test returned value if EPacketGetNtwkRegStatus is not supported by LTSY
|
|
483 |
@SYMTestPriority High
|
|
484 |
@SYMTestActions Invokes RPacketService::GetNtwkRegStatus()
|
|
485 |
@SYMTestExpectedResults Pass
|
|
486 |
@SYMTestType UT
|
|
487 |
*/
|
|
488 |
void CCTsyPacketServicesFUNegative::TestUnit0003L()
|
|
489 |
{
|
|
490 |
TConfig config;
|
|
491 |
config.SetSupportedValue(MLtsyDispatchPacketServicesGetPacketNetworkRegistrationStatus::KLtsyDispatchPacketServicesGetPacketNetworkRegistrationStatusApiId, EFalse);
|
|
492 |
|
|
493 |
OpenEtelServerL(EUseExtendedError);
|
|
494 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
495 |
OpenPhoneL();
|
|
496 |
|
|
497 |
TRequestStatus requestStatus;
|
|
498 |
RPacketService packetService;
|
|
499 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
500 |
|
|
501 |
RPacketService::TRegistrationStatus registrationStatus;
|
|
502 |
|
|
503 |
packetService.GetNtwkRegStatus(requestStatus, registrationStatus);
|
|
504 |
User::WaitForRequest(requestStatus);
|
|
505 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
506 |
|
|
507 |
packetService.Close();
|
|
508 |
AssertMockLtsyStatusL();
|
|
509 |
config.Reset();
|
|
510 |
CleanupStack::PopAndDestroy(2, this); // packetService, this
|
|
511 |
}
|
|
512 |
|
|
513 |
/**
|
|
514 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0004
|
|
515 |
@SYMComponent telephony_ctsy
|
|
516 |
@SYMTestCaseDesc Test returned value if EPacketDetach is not supported by LTSY
|
|
517 |
@SYMTestPriority High
|
|
518 |
@SYMTestActions Invokes RPacketService::Detach()
|
|
519 |
@SYMTestExpectedResults Pass
|
|
520 |
@SYMTestType UT
|
|
521 |
*/
|
|
522 |
void CCTsyPacketServicesFUNegative::TestUnit0004L()
|
|
523 |
{
|
|
524 |
TConfig config;
|
|
525 |
config.SetSupportedValue(MLtsyDispatchPacketServicesPacketDetach::KLtsyDispatchPacketServicesPacketDetachApiId, EFalse);
|
|
526 |
|
|
527 |
OpenEtelServerL(EUseExtendedError);
|
|
528 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
529 |
OpenPhoneL();
|
|
530 |
|
|
531 |
RPacketService packetService;
|
|
532 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
533 |
|
|
534 |
TRequestStatus mockLtsyStatus;
|
|
535 |
iMockLTSY.NotifyTerminated(mockLtsyStatus);
|
|
536 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesPacketAttach::KLtsyDispatchPacketServicesPacketAttachApiId, KErrNone);
|
|
537 |
User::WaitForRequest(mockLtsyStatus);
|
|
538 |
AssertMockLtsyStatusL();
|
|
539 |
|
|
540 |
TRequestStatus requestStatus;
|
|
541 |
packetService.Detach(requestStatus);
|
|
542 |
User::WaitForRequest(requestStatus);
|
|
543 |
AssertMockLtsyStatusL();
|
|
544 |
ASSERT_EQUALS(KErrGsmMMNetworkFailure, requestStatus.Int());
|
|
545 |
|
|
546 |
packetService.Close();
|
|
547 |
AssertMockLtsyStatusL();
|
|
548 |
config.Reset();
|
|
549 |
CleanupStack::PopAndDestroy(2, this); // packetService, this
|
|
550 |
}
|
|
551 |
|
|
552 |
/**
|
|
553 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0005
|
|
554 |
@SYMComponent telephony_ctsy
|
|
555 |
@SYMTestCaseDesc Test returned value if EPacketContextSetConfig is not supported by LTSY
|
|
556 |
@SYMTestPriority High
|
|
557 |
@SYMTestActions Invokes RPacketContext::SetConfig()
|
|
558 |
@SYMTestExpectedResults Pass
|
|
559 |
@SYMTestType UT
|
|
560 |
*/
|
|
561 |
void CCTsyPacketServicesFUNegative::TestUnit0005L()
|
|
562 |
{
|
|
563 |
TConfig config;
|
|
564 |
config.SetSupportedValue(MLtsyDispatchPacketServicesSetPdpContextConfig::KLtsyDispatchPacketServicesSetPdpContextConfigApiId, EFalse);
|
|
565 |
|
|
566 |
OpenEtelServerL(EUseExtendedError);
|
|
567 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
568 |
OpenPhoneL();
|
|
569 |
|
|
570 |
RPacketService packetService;
|
|
571 |
OpenPacketServiceLC(packetService,RPacketService::EStatusUnattached);
|
|
572 |
|
|
573 |
// Prepare context configuration fo GPRS
|
|
574 |
RPacketContext::TContextConfigGPRS setConfigGPRS;
|
|
575 |
setConfigGPRS.iAccessPointName.Copy(KPointNameGPRS);
|
|
576 |
setConfigGPRS.iPdpType = RPacketContext::EPdpTypeIPv4;
|
|
577 |
setConfigGPRS.iPdpAddress.Copy(KPdpAddGPRS);
|
|
578 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iPrimaryDns.Copy(KPrimaryDns);
|
|
579 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(KSecondaryDns);
|
|
580 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iProtocol = RPacketContext::EProtocolCHAP;
|
|
581 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iUsername.Copy(KUsername);
|
|
582 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iPassword.Copy(KPassword);
|
|
583 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
584 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRS(setConfigGPRS);
|
|
585 |
|
|
586 |
// Create the PCO buffer
|
|
587 |
RPacketContext::TMiscProtocolBuffer gprsMiscBuffer;
|
|
588 |
gprsMiscBuffer.Zero();
|
|
589 |
|
|
590 |
// Generate a PCO buffer
|
|
591 |
PCOGeneratorL(setConfigGPRS.iProtocolConfigOption, gprsMiscBuffer);
|
|
592 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
593 |
|
|
594 |
//
|
|
595 |
|
|
596 |
DriverInitialiseContextL();
|
|
597 |
|
|
598 |
// GPRS Configuration
|
|
599 |
TInfoName contextName;
|
|
600 |
contextName.Copy(KFirstAllocatedContextName);
|
|
601 |
|
|
602 |
DriverDeleteContextL(contextName);
|
|
603 |
|
|
604 |
//
|
|
605 |
|
|
606 |
// client side test
|
|
607 |
RPacketContext packetContext;
|
|
608 |
|
|
609 |
// Open a new context
|
|
610 |
TInt err = packetContext.OpenNewContext(packetService, contextName);
|
|
611 |
CleanupClosePushL(packetContext);
|
|
612 |
ASSERT_EQUALS(KErrNone, err);
|
|
613 |
|
|
614 |
RPacketContext::TDataChannelV2 dataChannel;
|
|
615 |
RPacketContext::TDataChannelV2Pckg dataChannelPk(dataChannel);
|
|
616 |
TRequestStatus initialiseContextStatus;
|
|
617 |
|
|
618 |
packetContext.InitialiseContext(initialiseContextStatus,dataChannelPk);
|
|
619 |
User::WaitForRequest(initialiseContextStatus);
|
|
620 |
|
|
621 |
ASSERT_EQUALS(KErrNone, initialiseContextStatus.Int());
|
|
622 |
ASSERT_TRUE(dataChannel.iChannelId == KDefaultChannelId);
|
|
623 |
|
|
624 |
TRequestStatus setConfigStatus;
|
|
625 |
|
|
626 |
packetContext.SetConfig(setConfigStatus, pckgConfigGPRS);
|
|
627 |
User::WaitForRequest(setConfigStatus);
|
|
628 |
ASSERT_EQUALS(KErrNotSupported, setConfigStatus.Int());
|
|
629 |
|
|
630 |
packetContext.Close();
|
|
631 |
packetService.Close();
|
|
632 |
AssertMockLtsyStatusL();
|
|
633 |
config.Reset();
|
|
634 |
CleanupStack::PopAndDestroy(3, this); // packetContext, packetService, this
|
|
635 |
}
|
|
636 |
|
|
637 |
/**
|
|
638 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0006
|
|
639 |
@SYMComponent telephony_ctsy
|
|
640 |
@SYMTestCaseDesc Test returned value if EPacketContextModifyActiveContext is not supported by LTSY
|
|
641 |
@SYMTestPriority High
|
|
642 |
@SYMTestActions Invokes RPacketContext::ModifyActiveContext()
|
|
643 |
@SYMTestExpectedResults Pass
|
|
644 |
@SYMTestType UT
|
|
645 |
*/
|
|
646 |
void CCTsyPacketServicesFUNegative::TestUnit0006L()
|
|
647 |
{
|
|
648 |
TConfig config;
|
|
649 |
config.SetSupportedValue(MLtsyDispatchPacketServicesModifyActivePdpContext::KLtsyDispatchPacketServicesModifyActivePdpContextApiId, EFalse);
|
|
650 |
|
|
651 |
OpenEtelServerL(EUseExtendedError);
|
|
652 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
653 |
OpenPhoneL();
|
|
654 |
|
|
655 |
RPacketService packetService;
|
|
656 |
OpenPacketServiceLC(packetService,RPacketService::EStatusUnattached);
|
|
657 |
|
|
658 |
// Prepare context configuration fo GPRS
|
|
659 |
RPacketContext::TContextConfigGPRS setConfigGPRS;
|
|
660 |
setConfigGPRS.iAccessPointName.Copy(KPointNameGPRS);
|
|
661 |
setConfigGPRS.iPdpType = RPacketContext::EPdpTypeIPv4;
|
|
662 |
setConfigGPRS.iPdpAddress.Copy(KPdpAddGPRS);
|
|
663 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iPrimaryDns.Copy(KPrimaryDns);
|
|
664 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(KSecondaryDns);
|
|
665 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iProtocol = RPacketContext::EProtocolCHAP;
|
|
666 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iUsername.Copy(KUsername);
|
|
667 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iPassword.Copy(KPassword);
|
|
668 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
669 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRS(setConfigGPRS);
|
|
670 |
|
|
671 |
// Create the PCO buffer
|
|
672 |
RPacketContext::TMiscProtocolBuffer gprsMiscBuffer;
|
|
673 |
gprsMiscBuffer.Zero();
|
|
674 |
|
|
675 |
// Generate a PCO buffer
|
|
676 |
PCOGeneratorL(setConfigGPRS.iProtocolConfigOption, gprsMiscBuffer);
|
|
677 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
678 |
|
|
679 |
//
|
|
680 |
|
|
681 |
DriverInitialiseContextL();
|
|
682 |
|
|
683 |
// GPRS Configuration
|
|
684 |
TInfoName contextName;
|
|
685 |
contextName.Copy(KFirstAllocatedContextName);
|
|
686 |
|
|
687 |
DriverSetConfigContextL(contextName, setConfigGPRS.iAccessPointName, setConfigGPRS.iPdpType,
|
|
688 |
setConfigGPRS.iPdpAddress, gprsMiscBuffer);
|
|
689 |
|
|
690 |
RPacketQoS::TQoSGPRSRequested qosExpectedRequestedGPRSProfile;
|
|
691 |
|
|
692 |
qosExpectedRequestedGPRSProfile.iReqPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
693 |
qosExpectedRequestedGPRSProfile.iMinPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
694 |
qosExpectedRequestedGPRSProfile.iReqDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
695 |
qosExpectedRequestedGPRSProfile.iMinDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
696 |
qosExpectedRequestedGPRSProfile.iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
697 |
qosExpectedRequestedGPRSProfile.iMinReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
698 |
qosExpectedRequestedGPRSProfile.iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
699 |
qosExpectedRequestedGPRSProfile.iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
700 |
qosExpectedRequestedGPRSProfile.iReqMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
701 |
qosExpectedRequestedGPRSProfile.iMinMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
702 |
|
|
703 |
RBuf8 data;
|
|
704 |
CleanupClosePushL(data);
|
|
705 |
TMockLtsyData2<TInfoName, RPacketQoS::TQoSGPRSRequested> packetSetConfigGPRSData(contextName,
|
|
706 |
qosExpectedRequestedGPRSProfile);
|
|
707 |
data.Close();
|
|
708 |
packetSetConfigGPRSData.SerialiseL(data);
|
|
709 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, data, KErrNone);
|
|
710 |
|
|
711 |
TMockLtsyData1<TInfoName> callbackSetPdpGPRSContextNameData(contextName);
|
|
712 |
data.Close();
|
|
713 |
callbackSetPdpGPRSContextNameData.SerialiseL(data);
|
|
714 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, KErrNone, data);
|
|
715 |
|
|
716 |
//Activate
|
|
717 |
TMockLtsyData1<TInfoName> expectedActivateContextNameData(contextName);
|
|
718 |
data.Close();
|
|
719 |
expectedActivateContextNameData.SerialiseL(data);
|
|
720 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesActivatePdpContext::KLtsyDispatchPacketServicesActivatePdpContextApiId, data, KErrNone);
|
|
721 |
|
|
722 |
TMockLtsyData3<TInfoName, RPacketContext::TGSNAddress, RPacketContext::TProtocolType>
|
|
723 |
completedActivateContextNameData(contextName, setConfigGPRS.iAccessPointName, setConfigGPRS.iPdpType);
|
|
724 |
data.Close();
|
|
725 |
completedActivateContextNameData.SerialiseL(data);
|
|
726 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesActivatePdpContext::KLtsyDispatchPacketServicesActivatePdpContextApiId, KErrNone, data);
|
|
727 |
|
|
728 |
RPacketQoS::TQoSGPRSNegotiated completedProfile;
|
|
729 |
TMockLtsyData2<TInfoName, RPacketQoS::TQoSGPRSNegotiated>
|
|
730 |
expLtsyQosProfileChangedInd(contextName, completedProfile);
|
|
731 |
data.Close();
|
|
732 |
expLtsyQosProfileChangedInd.SerialiseL(data);
|
|
733 |
iMockLTSY.CompleteL(KMockLtsyDispatchPacketServicesNotifyQosProfileChangedIndId, KErrNone, data);
|
|
734 |
|
|
735 |
// Prepare context configuration for GPRS
|
|
736 |
RPacketContext::TContextConfigGPRS setConfigGPRSActive;
|
|
737 |
setConfigGPRSActive.iAccessPointName.Copy(KPointNameGPRS);
|
|
738 |
setConfigGPRSActive.iPdpType = RPacketContext::EPdpTypeIPv6;
|
|
739 |
setConfigGPRSActive.iPdpAddress.Copy(KPdpAddGPRS);
|
|
740 |
setConfigGPRSActive.iProtocolConfigOption.iDnsAddresses.iPrimaryDns.Copy(KPrimaryDns);
|
|
741 |
setConfigGPRSActive.iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(KSecondaryDns);
|
|
742 |
setConfigGPRSActive.iProtocolConfigOption.iAuthInfo.iProtocol = RPacketContext::EProtocolCHAP;
|
|
743 |
setConfigGPRSActive.iProtocolConfigOption.iAuthInfo.iUsername.Copy(KUsername);
|
|
744 |
setConfigGPRSActive.iProtocolConfigOption.iAuthInfo.iPassword.Copy(KPassword);
|
|
745 |
|
|
746 |
TMockLtsyData5<TInfoName, RPacketContext::TGSNAddress, RPacketContext::TProtocolAddress, TUint, RPacketContext::TMiscProtocolBuffer>
|
|
747 |
expLtsyProfileChangedInd(contextName, setConfigGPRS.iAccessPointName,
|
|
748 |
setConfigGPRS.iPdpAddress, setConfigGPRS.iPdpCompression, gprsMiscBuffer);
|
|
749 |
data.Close();
|
|
750 |
expLtsyProfileChangedInd.SerialiseL(data);
|
|
751 |
|
|
752 |
iMockLTSY.CompleteL(KMockLtsyDispatchPacketServicesNotifyPdpContextConfigChangedIndId, KErrNone, data);
|
|
753 |
|
|
754 |
DriverSetConfigContextL(contextName, setConfigGPRSActive.iAccessPointName, setConfigGPRSActive.iPdpType,
|
|
755 |
setConfigGPRSActive.iPdpAddress, gprsMiscBuffer);
|
|
756 |
|
|
757 |
TMockLtsyData1<TInfoName> deactivateContextNameData(contextName);
|
|
758 |
data.Close();
|
|
759 |
deactivateContextNameData.SerialiseL(data);
|
|
760 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesDeactivatePdpContext::KLtsyDispatchPacketServicesDeactivatePdpContextApiId, data, KErrNone);
|
|
761 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesDeactivatePdpContext::KLtsyDispatchPacketServicesDeactivatePdpContextApiId, KErrNone, data);
|
|
762 |
|
|
763 |
DriverDeleteContextL(contextName);
|
|
764 |
|
|
765 |
//
|
|
766 |
|
|
767 |
// client side test
|
|
768 |
RPacketContext packetContext;
|
|
769 |
|
|
770 |
// Open a new context
|
|
771 |
TInt err = packetContext.OpenNewContext(packetService, contextName);
|
|
772 |
CleanupClosePushL(packetContext);
|
|
773 |
ASSERT_EQUALS(KErrNone, err);
|
|
774 |
|
|
775 |
RPacketContext::TDataChannelV2 dataChannel;
|
|
776 |
RPacketContext::TDataChannelV2Pckg dataChannelPk(dataChannel);
|
|
777 |
TRequestStatus initialiseContextStatus;
|
|
778 |
|
|
779 |
packetContext.InitialiseContext(initialiseContextStatus,dataChannelPk);
|
|
780 |
User::WaitForRequest(initialiseContextStatus);
|
|
781 |
|
|
782 |
ASSERT_EQUALS(KErrNone, initialiseContextStatus.Int());
|
|
783 |
ASSERT_TRUE(dataChannel.iChannelId == KDefaultChannelId);
|
|
784 |
|
|
785 |
TRequestStatus setConfigStatus;
|
|
786 |
packetContext.SetConfig(setConfigStatus, pckgConfigGPRS);
|
|
787 |
|
|
788 |
User::WaitForRequest(setConfigStatus);
|
|
789 |
ASSERT_EQUALS(KErrNone, setConfigStatus.Int());
|
|
790 |
|
|
791 |
TName qosName;
|
|
792 |
RPacketQoS packetQoS;
|
|
793 |
packetQoS.OpenNewQoS(packetContext, qosName);
|
|
794 |
CleanupClosePushL(packetQoS);
|
|
795 |
|
|
796 |
//
|
|
797 |
// SetProfileParameters for GPRS Configurations
|
|
798 |
//
|
|
799 |
|
|
800 |
RPacketQoS::TQoSGPRSRequested qosGPRSRequestedProfile;
|
|
801 |
qosGPRSRequestedProfile.iReqPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
802 |
qosGPRSRequestedProfile.iMinPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
803 |
qosGPRSRequestedProfile.iReqDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
804 |
qosGPRSRequestedProfile.iMinDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
805 |
qosGPRSRequestedProfile.iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
806 |
qosGPRSRequestedProfile.iMinReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
807 |
qosGPRSRequestedProfile.iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
808 |
qosGPRSRequestedProfile.iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
809 |
qosGPRSRequestedProfile.iReqMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
810 |
qosGPRSRequestedProfile.iMinMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
811 |
TPckg< RPacketQoS::TQoSGPRSRequested > profilePckgGPRS(qosGPRSRequestedProfile);
|
|
812 |
|
|
813 |
TRequestStatus notifyProfileChangeStatus;
|
|
814 |
RPacketQoS::TQoSGPRSNegotiated profile;
|
|
815 |
TPckg<RPacketQoS::TQoSGPRSNegotiated> qosGPRSNegotiatedProfilePk(profile);
|
|
816 |
packetQoS.NotifyProfileChanged(notifyProfileChangeStatus, qosGPRSNegotiatedProfilePk);
|
|
817 |
|
|
818 |
TRequestStatus requestStatusGPRS;
|
|
819 |
packetQoS.SetProfileParameters(requestStatusGPRS, profilePckgGPRS);
|
|
820 |
User::WaitForRequest(requestStatusGPRS);
|
|
821 |
ASSERT_EQUALS(KErrNone, requestStatusGPRS.Int());
|
|
822 |
|
|
823 |
//
|
|
824 |
|
|
825 |
RPacketContext::TContextConfigGPRS setConfigGPRSActiveNotifyConfigChanged;
|
|
826 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRSNotifyConfigChanged(setConfigGPRSActiveNotifyConfigChanged);
|
|
827 |
|
|
828 |
TRequestStatus contextConfigStatus;
|
|
829 |
packetContext.NotifyConfigChanged(contextConfigStatus, pckgConfigGPRSNotifyConfigChanged);
|
|
830 |
|
|
831 |
TRequestStatus contextActivatingRequestStatus;
|
|
832 |
RPacketContext::TContextStatus contextStatus;
|
|
833 |
packetContext.NotifyStatusChange(contextActivatingRequestStatus, contextStatus);
|
|
834 |
|
|
835 |
TRequestStatus activateStatus;
|
|
836 |
packetContext.Activate(activateStatus);
|
|
837 |
User::WaitForRequest(activateStatus);
|
|
838 |
User::WaitForRequest(contextActivatingRequestStatus);
|
|
839 |
ASSERT_EQUALS(KErrNone, activateStatus.Int());
|
|
840 |
ASSERT_EQUALS(RPacketContext::EStatusActivating, contextStatus);
|
|
841 |
|
|
842 |
// Complete NotifyProfileChanged
|
|
843 |
User::WaitForRequest(notifyProfileChangeStatus);
|
|
844 |
ASSERT_EQUALS(KErrNone, notifyProfileChangeStatus.Int());
|
|
845 |
|
|
846 |
// Status change from RPacketContext::EStatusActivating to RPacketContext::EStatusActive
|
|
847 |
TRequestStatus contextActivateRequestStatus;
|
|
848 |
RPacketContext::TContextStatus contextActiveStatus;
|
|
849 |
packetContext.NotifyStatusChange(contextActivateRequestStatus, contextActiveStatus);
|
|
850 |
|
|
851 |
User::WaitForRequest(contextActivateRequestStatus);
|
|
852 |
ASSERT_EQUALS(KErrNone, contextActivateRequestStatus.Int());
|
|
853 |
ASSERT_EQUALS(RPacketContext::EStatusActive, contextActiveStatus);
|
|
854 |
|
|
855 |
// Prepare context configuration for GPRS
|
|
856 |
setConfigGPRS.iAccessPointName.Copy(KPointNameGPRS);
|
|
857 |
setConfigGPRS.iPdpType = RPacketContext::EPdpTypeIPv6;
|
|
858 |
setConfigGPRS.iPdpAddress.Copy(KPdpAddGPRS);
|
|
859 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRS2(setConfigGPRS);
|
|
860 |
|
|
861 |
packetContext.SetConfig(setConfigStatus, pckgConfigGPRS2);
|
|
862 |
User::WaitForRequest(setConfigStatus);
|
|
863 |
ASSERT_EQUALS(KErrNone, setConfigStatus.Int());
|
|
864 |
|
|
865 |
/* Request modification, modification should be successful */
|
|
866 |
TRequestStatus modifyActiveContextStatus;
|
|
867 |
packetContext.ModifyActiveContext(modifyActiveContextStatus);
|
|
868 |
User::WaitForRequest(modifyActiveContextStatus);
|
|
869 |
ASSERT_EQUALS(KErrNotSupported, modifyActiveContextStatus.Int());
|
|
870 |
|
|
871 |
TRequestStatus deactivateContextStatus;
|
|
872 |
packetContext.Deactivate(deactivateContextStatus);
|
|
873 |
User::WaitForRequest(deactivateContextStatus);
|
|
874 |
ASSERT_EQUALS(KErrNone, deactivateContextStatus.Int())
|
|
875 |
|
|
876 |
packetQoS.Close();
|
|
877 |
packetContext.Close();
|
|
878 |
packetService.Close();
|
|
879 |
AssertMockLtsyStatusL();
|
|
880 |
config.Reset();
|
|
881 |
CleanupStack::PopAndDestroy(5, this); // data, packetQoS, packetService, packetContext, this
|
|
882 |
}
|
|
883 |
|
|
884 |
/**
|
|
885 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0007
|
|
886 |
@SYMComponent telephony_ctsy
|
|
887 |
@SYMTestCaseDesc Test returned value if EPacketContextInitialiseContext is not supported by LTSY
|
|
888 |
@SYMTestPriority High
|
|
889 |
@SYMTestActions Invokes RPacketContext::InitialiseContext()
|
|
890 |
@SYMTestExpectedResults Pass
|
|
891 |
@SYMTestType UT
|
|
892 |
*/
|
|
893 |
void CCTsyPacketServicesFUNegative::TestUnit0007L()
|
|
894 |
{
|
|
895 |
TConfig config;
|
|
896 |
config.SetSupportedValue(MLtsyDispatchPacketServicesInitialisePdpContext::KLtsyDispatchPacketServicesInitialisePdpContextApiId, EFalse);
|
|
897 |
|
|
898 |
OpenEtelServerL(EUseExtendedError);
|
|
899 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
900 |
OpenPhoneL();
|
|
901 |
|
|
902 |
RPacketService packetService;
|
|
903 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
904 |
|
|
905 |
TInfoName contextName;
|
|
906 |
contextName.Copy(KFirstAllocatedContextName);
|
|
907 |
|
|
908 |
DriverDeleteContextL(contextName);
|
|
909 |
|
|
910 |
//Open a New Packet Context
|
|
911 |
RPacketContext packetContext;
|
|
912 |
CleanupClosePushL(packetContext);
|
|
913 |
|
|
914 |
TInt err = packetContext.OpenNewContext(packetService,contextName);
|
|
915 |
ASSERT_EQUALS(KErrNone, err);
|
|
916 |
|
|
917 |
TRequestStatus requestStatus;
|
|
918 |
RPacketContext::TDataChannelV2 dataChannel;
|
|
919 |
RPacketContext::TDataChannelV2Pckg dataChannelPk(dataChannel);
|
|
920 |
|
|
921 |
packetContext.InitialiseContext(requestStatus,dataChannelPk);
|
|
922 |
User::WaitForRequest(requestStatus);
|
|
923 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
924 |
|
|
925 |
packetContext.Close();
|
|
926 |
AssertMockLtsyStatusL();
|
|
927 |
config.Reset();
|
|
928 |
CleanupStack::PopAndDestroy(3, this); // packetService, packetContext, this
|
|
929 |
}
|
|
930 |
|
|
931 |
/**
|
|
932 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0008
|
|
933 |
@SYMComponent telephony_ctsy
|
|
934 |
@SYMTestCaseDesc Test returned value if EPacketContextDelete is not supported by LTSY
|
|
935 |
@SYMTestPriority High
|
|
936 |
@SYMTestActions Invokes RPacketContext::Delete()
|
|
937 |
@SYMTestExpectedResults Pass
|
|
938 |
@SYMTestType UT
|
|
939 |
*/
|
|
940 |
void CCTsyPacketServicesFUNegative::TestUnit0008L()
|
|
941 |
{
|
|
942 |
TConfig config;
|
|
943 |
config.SetSupportedValue(MLtsyDispatchPacketServicesDeletePdpContext::KLtsyDispatchPacketServicesDeletePdpContextApiId, EFalse);
|
|
944 |
|
|
945 |
OpenEtelServerL(EUseExtendedError);
|
|
946 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
947 |
OpenPhoneL();
|
|
948 |
|
|
949 |
|
|
950 |
RPacketService packetService;
|
|
951 |
OpenPacketServiceLC(packetService,RPacketService::EStatusUnattached);
|
|
952 |
|
|
953 |
// Prepare context configuration fo GPRS
|
|
954 |
RPacketContext::TContextConfigGPRS setConfigGPRS;
|
|
955 |
setConfigGPRS.iAccessPointName.Copy(KPointNameGPRS);
|
|
956 |
setConfigGPRS.iPdpType = RPacketContext::EPdpTypeIPv4;
|
|
957 |
setConfigGPRS.iPdpAddress.Copy(KPdpAddGPRS);
|
|
958 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iPrimaryDns.Copy(KPrimaryDns);
|
|
959 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(KSecondaryDns);
|
|
960 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iProtocol = RPacketContext::EProtocolCHAP;
|
|
961 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iUsername.Copy(KUsername);
|
|
962 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iPassword.Copy(KPassword);
|
|
963 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
964 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRS(setConfigGPRS);
|
|
965 |
|
|
966 |
// Create the PCO buffer
|
|
967 |
RPacketContext::TMiscProtocolBuffer gprsMiscBuffer;
|
|
968 |
gprsMiscBuffer.Zero();
|
|
969 |
|
|
970 |
// Generate a PCO buffer
|
|
971 |
PCOGeneratorL(setConfigGPRS.iProtocolConfigOption, gprsMiscBuffer);
|
|
972 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
973 |
|
|
974 |
//
|
|
975 |
|
|
976 |
DriverInitialiseContextL();
|
|
977 |
|
|
978 |
// GPRS Configuration
|
|
979 |
TInfoName contextName;
|
|
980 |
contextName.Copy(KFirstAllocatedContextName);
|
|
981 |
|
|
982 |
//
|
|
983 |
|
|
984 |
// client side test
|
|
985 |
RPacketContext packetContext;
|
|
986 |
|
|
987 |
// Open a new context
|
|
988 |
TInt err = packetContext.OpenNewContext(packetService, contextName);
|
|
989 |
CleanupClosePushL(packetContext);
|
|
990 |
ASSERT_EQUALS(KErrNone, err);
|
|
991 |
|
|
992 |
RPacketContext::TDataChannelV2 dataChannel;
|
|
993 |
RPacketContext::TDataChannelV2Pckg dataChannelPk(dataChannel);
|
|
994 |
TRequestStatus initialiseContextStatus;
|
|
995 |
|
|
996 |
packetContext.InitialiseContext(initialiseContextStatus,dataChannelPk);
|
|
997 |
User::WaitForRequest(initialiseContextStatus);
|
|
998 |
|
|
999 |
ASSERT_EQUALS(KErrNone, initialiseContextStatus.Int());
|
|
1000 |
ASSERT_TRUE(dataChannel.iChannelId == KDefaultChannelId);
|
|
1001 |
|
|
1002 |
TRequestStatus setConfigStatus;
|
|
1003 |
|
|
1004 |
packetContext.Delete(setConfigStatus);
|
|
1005 |
User::WaitForRequest(setConfigStatus);
|
|
1006 |
ASSERT_EQUALS(KErrNotSupported, setConfigStatus.Int());
|
|
1007 |
|
|
1008 |
// Close is not called since it invokes EPacketContextDelete
|
|
1009 |
// packetContext.Close();
|
|
1010 |
// packetService.Close();
|
|
1011 |
AssertMockLtsyStatusL();
|
|
1012 |
config.Reset();
|
|
1013 |
CleanupStack::PopAndDestroy(3, this); // packetService, packetContext, this
|
|
1014 |
}
|
|
1015 |
|
|
1016 |
/**
|
|
1017 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0009
|
|
1018 |
@SYMComponent telephony_ctsy
|
|
1019 |
@SYMTestCaseDesc Test returned value if EPacketSetAttachMode is not supported by LTSY
|
|
1020 |
@SYMTestPriority High
|
|
1021 |
@SYMTestActions Invokes RPacketService::SetAttachMode()
|
|
1022 |
@SYMTestExpectedResults Pass
|
|
1023 |
@SYMTestType UT
|
|
1024 |
*/
|
|
1025 |
void CCTsyPacketServicesFUNegative::TestUnit0009L()
|
|
1026 |
{
|
|
1027 |
TConfig config;
|
|
1028 |
config.SetSupportedValue(MLtsyDispatchPacketServicesSetPacketAttachMode::KLtsyDispatchPacketServicesSetPacketAttachModeApiId, EFalse);
|
|
1029 |
|
|
1030 |
OpenEtelServerL(EUseExtendedError);
|
|
1031 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1032 |
OpenPhoneL();
|
|
1033 |
|
|
1034 |
RPacketService packetService;
|
|
1035 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
1036 |
|
|
1037 |
TRequestStatus requestStatus;
|
|
1038 |
RPacketService::TAttachMode attachMode = RPacketService::EAttachWhenPossible;
|
|
1039 |
|
|
1040 |
packetService.SetAttachMode(requestStatus, attachMode);
|
|
1041 |
User::WaitForRequest(requestStatus);
|
|
1042 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
1043 |
|
|
1044 |
AssertMockLtsyStatusL();
|
|
1045 |
config.Reset();
|
|
1046 |
CleanupStack::PopAndDestroy(2, this); // packetService, this
|
|
1047 |
}
|
|
1048 |
|
|
1049 |
/**
|
|
1050 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0010
|
|
1051 |
@SYMComponent telephony_ctsy
|
|
1052 |
@SYMTestCaseDesc Test returned value if EPacketNotifyStatusChange - *Notify* NOT NEEDED
|
|
1053 |
@SYMTestPriority High
|
|
1054 |
@SYMTestActions Invokes
|
|
1055 |
@SYMTestExpectedResults Pass
|
|
1056 |
@SYMTestType UT
|
|
1057 |
*/
|
|
1058 |
void CCTsyPacketServicesFUNegative::TestUnit0010L()
|
|
1059 |
{
|
|
1060 |
TConfig config;
|
|
1061 |
config.SetSupportedValue(MLtsyDispatchPacketServicesNotifyPacketStatusChange::KLtsyDispatchPacketServicesNotifyPacketStatusChangeApiId, EFalse);
|
|
1062 |
|
|
1063 |
OpenEtelServerL(EUseExtendedError);
|
|
1064 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1065 |
OpenPhoneL();
|
|
1066 |
|
|
1067 |
AssertMockLtsyStatusL();
|
|
1068 |
config.Reset();
|
|
1069 |
CleanupStack::PopAndDestroy(this); // , this
|
|
1070 |
}
|
|
1071 |
|
|
1072 |
/**
|
|
1073 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0011
|
|
1074 |
@SYMComponent telephony_ctsy
|
|
1075 |
@SYMTestCaseDesc Test returned value if EPacketSetDefaultContextParams is not supported by LTSY
|
|
1076 |
@SYMTestPriority High
|
|
1077 |
@SYMTestActions Invokes RPacketService::SetDefaultContextParams()
|
|
1078 |
@SYMTestExpectedResults Pass
|
|
1079 |
@SYMTestType UT
|
|
1080 |
*/
|
|
1081 |
void CCTsyPacketServicesFUNegative::TestUnit0011L()
|
|
1082 |
{
|
|
1083 |
TConfig config;
|
|
1084 |
config.SetSupportedValue(MLtsyDispatchPacketServicesSetDefaultPdpContextGprsParams::KLtsyDispatchPacketServicesSetDefaultPdpContextGprsParamsApiId, EFalse);
|
|
1085 |
// or MLtsyDispatchPacketServicesSetDefaultPdpContextR99R4Params::KLtsyDispatchPacketServicesSetDefaultPdpContextR99R4ParamsApiId
|
|
1086 |
|
|
1087 |
OpenEtelServerL(EUseExtendedError);
|
|
1088 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1089 |
OpenPhoneL();
|
|
1090 |
|
|
1091 |
RPacketService packetService;
|
|
1092 |
OpenPacketServiceLC(packetService,RPacketService::EStatusUnattached);
|
|
1093 |
|
|
1094 |
RPacketContext::TContextConfigGPRS defaultGprsContextConfig;
|
|
1095 |
defaultGprsContextConfig.iAccessPointName = KDefaultAccessPoint;
|
|
1096 |
defaultGprsContextConfig.iPdpType = KDefaultPdpType;
|
|
1097 |
TPckg<RPacketContext::TContextConfigGPRS> defaultContextGprsConfigPckg(defaultGprsContextConfig);
|
|
1098 |
|
|
1099 |
TRequestStatus requestStatus;
|
|
1100 |
packetService.SetDefaultContextParams(requestStatus, defaultContextGprsConfigPckg);
|
|
1101 |
User::WaitForRequest(requestStatus);
|
|
1102 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
1103 |
|
|
1104 |
AssertMockLtsyStatusL();
|
|
1105 |
config.Reset();
|
|
1106 |
CleanupStack::PopAndDestroy(2, this); // packetService, this
|
|
1107 |
}
|
|
1108 |
|
|
1109 |
/**
|
|
1110 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0012
|
|
1111 |
@SYMComponent telephony_ctsy
|
|
1112 |
@SYMTestCaseDesc Test returned value if EPacketContextActivate is not supported by LTSY
|
|
1113 |
@SYMTestPriority High
|
|
1114 |
@SYMTestActions Invokes RPacketContext::Activate()
|
|
1115 |
@SYMTestExpectedResults Pass
|
|
1116 |
@SYMTestType UT
|
|
1117 |
*/
|
|
1118 |
void CCTsyPacketServicesFUNegative::TestUnit0012L()
|
|
1119 |
{
|
|
1120 |
TConfig config;
|
|
1121 |
config.SetSupportedValue(MLtsyDispatchPacketServicesActivatePdpContext::KLtsyDispatchPacketServicesActivatePdpContextApiId, EFalse);
|
|
1122 |
|
|
1123 |
OpenEtelServerL(EUseExtendedError);
|
|
1124 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1125 |
OpenPhoneL();
|
|
1126 |
|
|
1127 |
RPacketService packetService;
|
|
1128 |
OpenPacketServiceLC(packetService,RPacketService::EStatusUnattached);
|
|
1129 |
|
|
1130 |
// Prepare context configuration fo GPRS
|
|
1131 |
RPacketContext::TContextConfigGPRS setConfigGPRS;
|
|
1132 |
setConfigGPRS.iAccessPointName.Copy(KPointNameGPRS);
|
|
1133 |
setConfigGPRS.iPdpType = RPacketContext::EPdpTypeIPv4;
|
|
1134 |
setConfigGPRS.iPdpAddress.Copy(KPdpAddGPRS);
|
|
1135 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iPrimaryDns.Copy(KPrimaryDns);
|
|
1136 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(KSecondaryDns);
|
|
1137 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iProtocol = RPacketContext::EProtocolCHAP;
|
|
1138 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iUsername.Copy(KUsername);
|
|
1139 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iPassword.Copy(KPassword);
|
|
1140 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
1141 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRS(setConfigGPRS);
|
|
1142 |
|
|
1143 |
// Create the PCO buffer
|
|
1144 |
RPacketContext::TMiscProtocolBuffer gprsMiscBuffer;
|
|
1145 |
gprsMiscBuffer.Zero();
|
|
1146 |
|
|
1147 |
// Generate a PCO buffer
|
|
1148 |
PCOGeneratorL(setConfigGPRS.iProtocolConfigOption, gprsMiscBuffer);
|
|
1149 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
1150 |
|
|
1151 |
//
|
|
1152 |
|
|
1153 |
DriverInitialiseContextL();
|
|
1154 |
|
|
1155 |
// GPRS Configuration
|
|
1156 |
TInfoName contextName;
|
|
1157 |
contextName.Copy(KFirstAllocatedContextName);
|
|
1158 |
|
|
1159 |
DriverSetConfigContextL(contextName, setConfigGPRS.iAccessPointName, setConfigGPRS.iPdpType,
|
|
1160 |
setConfigGPRS.iPdpAddress, gprsMiscBuffer);
|
|
1161 |
|
|
1162 |
RPacketQoS::TQoSGPRSRequested qosExpectedRequestedGPRSProfile;
|
|
1163 |
|
|
1164 |
qosExpectedRequestedGPRSProfile.iReqPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1165 |
qosExpectedRequestedGPRSProfile.iMinPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1166 |
qosExpectedRequestedGPRSProfile.iReqDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1167 |
qosExpectedRequestedGPRSProfile.iMinDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1168 |
qosExpectedRequestedGPRSProfile.iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1169 |
qosExpectedRequestedGPRSProfile.iMinReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1170 |
qosExpectedRequestedGPRSProfile.iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1171 |
qosExpectedRequestedGPRSProfile.iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1172 |
qosExpectedRequestedGPRSProfile.iReqMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1173 |
qosExpectedRequestedGPRSProfile.iMinMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1174 |
|
|
1175 |
RBuf8 data;
|
|
1176 |
CleanupClosePushL(data);
|
|
1177 |
TMockLtsyData2<TInfoName, RPacketQoS::TQoSGPRSRequested> packetSetConfigGPRSData(contextName,
|
|
1178 |
qosExpectedRequestedGPRSProfile);
|
|
1179 |
data.Close();
|
|
1180 |
packetSetConfigGPRSData.SerialiseL(data);
|
|
1181 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, data, KErrNone);
|
|
1182 |
|
|
1183 |
TMockLtsyData1<TInfoName> callbackSetPdpGPRSContextNameData(contextName);
|
|
1184 |
data.Close();
|
|
1185 |
callbackSetPdpGPRSContextNameData.SerialiseL(data);
|
|
1186 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, KErrNone, data);
|
|
1187 |
|
|
1188 |
DriverDeleteContextL(contextName);
|
|
1189 |
|
|
1190 |
//
|
|
1191 |
|
|
1192 |
// client side test
|
|
1193 |
RPacketContext packetContext;
|
|
1194 |
|
|
1195 |
// Open a new context
|
|
1196 |
TInt err = packetContext.OpenNewContext(packetService, contextName);
|
|
1197 |
CleanupClosePushL(packetContext);
|
|
1198 |
ASSERT_EQUALS(KErrNone, err);
|
|
1199 |
|
|
1200 |
RPacketContext::TDataChannelV2 dataChannel;
|
|
1201 |
RPacketContext::TDataChannelV2Pckg dataChannelPk(dataChannel);
|
|
1202 |
TRequestStatus initialiseContextStatus;
|
|
1203 |
|
|
1204 |
packetContext.InitialiseContext(initialiseContextStatus,dataChannelPk);
|
|
1205 |
User::WaitForRequest(initialiseContextStatus);
|
|
1206 |
|
|
1207 |
ASSERT_EQUALS(KErrNone, initialiseContextStatus.Int());
|
|
1208 |
ASSERT_TRUE(dataChannel.iChannelId == KDefaultChannelId);
|
|
1209 |
|
|
1210 |
TRequestStatus setConfigStatus;
|
|
1211 |
packetContext.SetConfig(setConfigStatus, pckgConfigGPRS);
|
|
1212 |
|
|
1213 |
User::WaitForRequest(setConfigStatus);
|
|
1214 |
ASSERT_EQUALS(KErrNone, setConfigStatus.Int());
|
|
1215 |
|
|
1216 |
TName qosName;
|
|
1217 |
RPacketQoS packetQoS;
|
|
1218 |
packetQoS.OpenNewQoS(packetContext, qosName);
|
|
1219 |
CleanupClosePushL(packetQoS);
|
|
1220 |
|
|
1221 |
//
|
|
1222 |
// SetProfileParameters for GPRS Configurations
|
|
1223 |
//
|
|
1224 |
|
|
1225 |
RPacketQoS::TQoSGPRSRequested qosGPRSRequestedProfile;
|
|
1226 |
qosGPRSRequestedProfile.iReqPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1227 |
qosGPRSRequestedProfile.iMinPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1228 |
qosGPRSRequestedProfile.iReqDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1229 |
qosGPRSRequestedProfile.iMinDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1230 |
qosGPRSRequestedProfile.iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1231 |
qosGPRSRequestedProfile.iMinReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1232 |
qosGPRSRequestedProfile.iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1233 |
qosGPRSRequestedProfile.iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1234 |
qosGPRSRequestedProfile.iReqMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1235 |
qosGPRSRequestedProfile.iMinMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1236 |
TPckg< RPacketQoS::TQoSGPRSRequested > profilePckgGPRS(qosGPRSRequestedProfile);
|
|
1237 |
|
|
1238 |
TRequestStatus requestStatusGPRS;
|
|
1239 |
packetQoS.SetProfileParameters(requestStatusGPRS, profilePckgGPRS);
|
|
1240 |
User::WaitForRequest(requestStatusGPRS);
|
|
1241 |
ASSERT_EQUALS(KErrNone, requestStatusGPRS.Int());
|
|
1242 |
|
|
1243 |
TRequestStatus requestStatus;
|
|
1244 |
packetContext.Activate(requestStatus);
|
|
1245 |
User::WaitForRequest(requestStatus);
|
|
1246 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
1247 |
|
|
1248 |
packetQoS.Close();
|
|
1249 |
packetContext.Close();
|
|
1250 |
packetService.Close();
|
|
1251 |
AssertMockLtsyStatusL();
|
|
1252 |
config.Reset();
|
|
1253 |
CleanupStack::PopAndDestroy(5, this); // data, packetQoS, packetService, packetContext, this
|
|
1254 |
}
|
|
1255 |
|
|
1256 |
/**
|
|
1257 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0013
|
|
1258 |
@SYMComponent telephony_ctsy
|
|
1259 |
@SYMTestCaseDesc Test returned value if EPacketQoSSetProfileParams is not supported by LTSY
|
|
1260 |
@SYMTestPriority High
|
|
1261 |
@SYMTestActions Invokes RPacketQoS::SetProfileParameters()
|
|
1262 |
@SYMTestExpectedResults Pass
|
|
1263 |
@SYMTestType UT
|
|
1264 |
*/
|
|
1265 |
void CCTsyPacketServicesFUNegative::TestUnit0013L()
|
|
1266 |
{
|
|
1267 |
TConfig config;
|
|
1268 |
config.SetSupportedValue(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, EFalse);
|
|
1269 |
// or MLtsyDispatchPacketServicesSetPdpContextQosR99R4::KLtsyDispatchPacketServicesSetPdpContextQosR99R4ApiId
|
|
1270 |
// or MLtsyDispatchPacketServicesSetPdpContextQosR5::KLtsyDispatchPacketServicesSetPdpContextQosR5ApiId
|
|
1271 |
|
|
1272 |
OpenEtelServerL(EUseExtendedError);
|
|
1273 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1274 |
OpenPhoneL();
|
|
1275 |
RPacketService packetService;
|
|
1276 |
OpenPacketServiceLC(packetService,RPacketService::EStatusUnattached);
|
|
1277 |
|
|
1278 |
// Prepare context configuration fo GPRS
|
|
1279 |
RPacketContext::TContextConfigGPRS setConfigGPRS;
|
|
1280 |
setConfigGPRS.iAccessPointName.Copy(KPointNameGPRS);
|
|
1281 |
setConfigGPRS.iPdpType = RPacketContext::EPdpTypeIPv4;
|
|
1282 |
setConfigGPRS.iPdpAddress.Copy(KPdpAddGPRS);
|
|
1283 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iPrimaryDns.Copy(KPrimaryDns);
|
|
1284 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(KSecondaryDns);
|
|
1285 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iProtocol = RPacketContext::EProtocolCHAP;
|
|
1286 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iUsername.Copy(KUsername);
|
|
1287 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iPassword.Copy(KPassword);
|
|
1288 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
1289 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRS(setConfigGPRS);
|
|
1290 |
|
|
1291 |
// Create the PCO buffer
|
|
1292 |
RPacketContext::TMiscProtocolBuffer gprsMiscBuffer;
|
|
1293 |
gprsMiscBuffer.Zero();
|
|
1294 |
|
|
1295 |
// Generate a PCO buffer
|
|
1296 |
PCOGeneratorL(setConfigGPRS.iProtocolConfigOption, gprsMiscBuffer);
|
|
1297 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
1298 |
|
|
1299 |
//
|
|
1300 |
|
|
1301 |
DriverInitialiseContextL();
|
|
1302 |
|
|
1303 |
// GPRS Configuration
|
|
1304 |
TInfoName contextName;
|
|
1305 |
contextName.Copy(KFirstAllocatedContextName);
|
|
1306 |
|
|
1307 |
DriverSetConfigContextL(contextName, setConfigGPRS.iAccessPointName, setConfigGPRS.iPdpType,
|
|
1308 |
setConfigGPRS.iPdpAddress, gprsMiscBuffer);
|
|
1309 |
|
|
1310 |
RPacketQoS::TQoSGPRSRequested qosExpectedRequestedGPRSProfile;
|
|
1311 |
|
|
1312 |
qosExpectedRequestedGPRSProfile.iReqPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1313 |
qosExpectedRequestedGPRSProfile.iMinPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1314 |
qosExpectedRequestedGPRSProfile.iReqDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1315 |
qosExpectedRequestedGPRSProfile.iMinDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1316 |
qosExpectedRequestedGPRSProfile.iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1317 |
qosExpectedRequestedGPRSProfile.iMinReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1318 |
qosExpectedRequestedGPRSProfile.iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1319 |
qosExpectedRequestedGPRSProfile.iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1320 |
qosExpectedRequestedGPRSProfile.iReqMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1321 |
qosExpectedRequestedGPRSProfile.iMinMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1322 |
|
|
1323 |
RBuf8 data;
|
|
1324 |
CleanupClosePushL(data);
|
|
1325 |
TMockLtsyData2<TInfoName, RPacketQoS::TQoSGPRSRequested> packetSetConfigGPRSData(contextName,
|
|
1326 |
qosExpectedRequestedGPRSProfile);
|
|
1327 |
data.Close();
|
|
1328 |
packetSetConfigGPRSData.SerialiseL(data);
|
|
1329 |
// iMockLTSY.ExpectL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, data, KErrNone);
|
|
1330 |
|
|
1331 |
TMockLtsyData1<TInfoName> callbackSetPdpGPRSContextNameData(contextName);
|
|
1332 |
data.Close();
|
|
1333 |
callbackSetPdpGPRSContextNameData.SerialiseL(data);
|
|
1334 |
// iMockLTSY.CompleteL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, KErrNone, data);
|
|
1335 |
|
|
1336 |
DriverDeleteContextL(contextName);
|
|
1337 |
|
|
1338 |
//
|
|
1339 |
|
|
1340 |
// client side test
|
|
1341 |
RPacketContext packetContext;
|
|
1342 |
|
|
1343 |
// Open a new context
|
|
1344 |
TInt err = packetContext.OpenNewContext(packetService, contextName);
|
|
1345 |
CleanupClosePushL(packetContext);
|
|
1346 |
ASSERT_EQUALS(KErrNone, err);
|
|
1347 |
|
|
1348 |
RPacketContext::TDataChannelV2 dataChannel;
|
|
1349 |
RPacketContext::TDataChannelV2Pckg dataChannelPk(dataChannel);
|
|
1350 |
TRequestStatus initialiseContextStatus;
|
|
1351 |
|
|
1352 |
packetContext.InitialiseContext(initialiseContextStatus,dataChannelPk);
|
|
1353 |
User::WaitForRequest(initialiseContextStatus);
|
|
1354 |
|
|
1355 |
ASSERT_EQUALS(KErrNone, initialiseContextStatus.Int());
|
|
1356 |
ASSERT_TRUE(dataChannel.iChannelId == KDefaultChannelId);
|
|
1357 |
|
|
1358 |
TRequestStatus setConfigStatus;
|
|
1359 |
packetContext.SetConfig(setConfigStatus, pckgConfigGPRS);
|
|
1360 |
|
|
1361 |
User::WaitForRequest(setConfigStatus);
|
|
1362 |
ASSERT_EQUALS(KErrNone, setConfigStatus.Int());
|
|
1363 |
|
|
1364 |
TName qosName;
|
|
1365 |
RPacketQoS packetQoS;
|
|
1366 |
packetQoS.OpenNewQoS(packetContext, qosName);
|
|
1367 |
CleanupClosePushL(packetQoS);
|
|
1368 |
|
|
1369 |
//
|
|
1370 |
// SetProfileParameters for GPRS Configurations
|
|
1371 |
//
|
|
1372 |
|
|
1373 |
RPacketQoS::TQoSGPRSRequested qosGPRSRequestedProfile;
|
|
1374 |
qosGPRSRequestedProfile.iReqPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1375 |
qosGPRSRequestedProfile.iMinPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1376 |
qosGPRSRequestedProfile.iReqDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1377 |
qosGPRSRequestedProfile.iMinDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1378 |
qosGPRSRequestedProfile.iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1379 |
qosGPRSRequestedProfile.iMinReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1380 |
qosGPRSRequestedProfile.iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1381 |
qosGPRSRequestedProfile.iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1382 |
qosGPRSRequestedProfile.iReqMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1383 |
qosGPRSRequestedProfile.iMinMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1384 |
TPckg< RPacketQoS::TQoSGPRSRequested > profilePckgGPRS(qosGPRSRequestedProfile);
|
|
1385 |
|
|
1386 |
// in CMmPacketQoSGsmWcdmaExt::SetProfileParametersL()
|
|
1387 |
// resullt of iMmPacketService->MessageManager()->HandleRequestL()
|
|
1388 |
// is never checked
|
|
1389 |
TRequestStatus requestStatusGPRS;
|
|
1390 |
packetQoS.SetProfileParameters(requestStatusGPRS, profilePckgGPRS);
|
|
1391 |
User::WaitForRequest(requestStatusGPRS);
|
|
1392 |
ASSERT_EQUALS(KErrNotSupported, requestStatusGPRS.Int());
|
|
1393 |
|
|
1394 |
packetQoS.Close();
|
|
1395 |
packetContext.Close();
|
|
1396 |
packetService.Close();
|
|
1397 |
AssertMockLtsyStatusL();
|
|
1398 |
config.Reset();
|
|
1399 |
CleanupStack::PopAndDestroy(5, this); // data, packetQoS, packetService, packetContext, this
|
|
1400 |
}
|
|
1401 |
|
|
1402 |
/**
|
|
1403 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0014
|
|
1404 |
@SYMComponent telephony_ctsy
|
|
1405 |
@SYMTestCaseDesc Test returned value if EPacketRejectActivationRequest is not supported by LTSY
|
|
1406 |
@SYMTestPriority High
|
|
1407 |
@SYMTestActions Invokes RPacketService::RejectActivationRequest()
|
|
1408 |
@SYMTestExpectedResults Pass
|
|
1409 |
@SYMTestType UT
|
|
1410 |
*/
|
|
1411 |
void CCTsyPacketServicesFUNegative::TestUnit0014L()
|
|
1412 |
{
|
|
1413 |
TConfig config;
|
|
1414 |
config.SetSupportedValue(MLtsyDispatchPacketServicesRejectNetworkInitiatedContextActivationRequest::KLtsyDispatchPacketServicesRejectNetworkInitiatedContextActivationRequestApiId, EFalse);
|
|
1415 |
|
|
1416 |
OpenEtelServerL(EUseExtendedError);
|
|
1417 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1418 |
OpenPhoneL();
|
|
1419 |
|
|
1420 |
RPacketService packetService;
|
|
1421 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
1422 |
|
|
1423 |
TRequestStatus requestStatus;
|
|
1424 |
|
|
1425 |
packetService.RejectActivationRequest(requestStatus);
|
|
1426 |
User::WaitForRequest(requestStatus);
|
|
1427 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
1428 |
|
|
1429 |
packetService.Close();
|
|
1430 |
AssertMockLtsyStatusL();
|
|
1431 |
config.Reset();
|
|
1432 |
CleanupStack::PopAndDestroy(2, this); // packetService, data
|
|
1433 |
}
|
|
1434 |
|
|
1435 |
/**
|
|
1436 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0015
|
|
1437 |
@SYMComponent telephony_ctsy
|
|
1438 |
@SYMTestCaseDesc Test returned value if EPacketContextDeactivate is not supported by LTSY
|
|
1439 |
@SYMTestPriority High
|
|
1440 |
@SYMTestActions Invokes RPacketContext::Deactivate()
|
|
1441 |
@SYMTestExpectedResults Pass
|
|
1442 |
@SYMTestType UT
|
|
1443 |
*/
|
|
1444 |
void CCTsyPacketServicesFUNegative::TestUnit0015L()
|
|
1445 |
{
|
|
1446 |
TConfig config;
|
|
1447 |
config.SetSupportedValue(MLtsyDispatchPacketServicesDeactivatePdpContext::KLtsyDispatchPacketServicesDeactivatePdpContextApiId, EFalse);
|
|
1448 |
|
|
1449 |
OpenEtelServerL(EUseExtendedError);
|
|
1450 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1451 |
OpenPhoneL();
|
|
1452 |
RPacketService packetService;
|
|
1453 |
OpenPacketServiceLC(packetService,RPacketService::EStatusUnattached);
|
|
1454 |
|
|
1455 |
// Prepare context configuration fo GPRS
|
|
1456 |
RPacketContext::TContextConfigGPRS setConfigGPRS;
|
|
1457 |
setConfigGPRS.iAccessPointName.Copy(KPointNameGPRS);
|
|
1458 |
setConfigGPRS.iPdpType = RPacketContext::EPdpTypeIPv4;
|
|
1459 |
setConfigGPRS.iPdpAddress.Copy(KPdpAddGPRS);
|
|
1460 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iPrimaryDns.Copy(KPrimaryDns);
|
|
1461 |
setConfigGPRS.iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(KSecondaryDns);
|
|
1462 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iProtocol = RPacketContext::EProtocolCHAP;
|
|
1463 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iUsername.Copy(KUsername);
|
|
1464 |
setConfigGPRS.iProtocolConfigOption.iAuthInfo.iPassword.Copy(KPassword);
|
|
1465 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
1466 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRS(setConfigGPRS);
|
|
1467 |
|
|
1468 |
// Create the PCO buffer
|
|
1469 |
RPacketContext::TMiscProtocolBuffer gprsMiscBuffer;
|
|
1470 |
gprsMiscBuffer.Zero();
|
|
1471 |
|
|
1472 |
// Generate a PCO buffer
|
|
1473 |
PCOGeneratorL(setConfigGPRS.iProtocolConfigOption, gprsMiscBuffer);
|
|
1474 |
setConfigGPRS.iProtocolConfigOption.iId = KRequestID;
|
|
1475 |
|
|
1476 |
//
|
|
1477 |
|
|
1478 |
DriverInitialiseContextL();
|
|
1479 |
|
|
1480 |
// GPRS Configuration
|
|
1481 |
TInfoName contextName;
|
|
1482 |
contextName.Copy(KFirstAllocatedContextName);
|
|
1483 |
|
|
1484 |
DriverSetConfigContextL(contextName, setConfigGPRS.iAccessPointName, setConfigGPRS.iPdpType,
|
|
1485 |
setConfigGPRS.iPdpAddress, gprsMiscBuffer);
|
|
1486 |
|
|
1487 |
RPacketQoS::TQoSGPRSRequested qosExpectedRequestedGPRSProfile;
|
|
1488 |
|
|
1489 |
qosExpectedRequestedGPRSProfile.iReqPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1490 |
qosExpectedRequestedGPRSProfile.iMinPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1491 |
qosExpectedRequestedGPRSProfile.iReqDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1492 |
qosExpectedRequestedGPRSProfile.iMinDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1493 |
qosExpectedRequestedGPRSProfile.iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1494 |
qosExpectedRequestedGPRSProfile.iMinReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1495 |
qosExpectedRequestedGPRSProfile.iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1496 |
qosExpectedRequestedGPRSProfile.iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1497 |
qosExpectedRequestedGPRSProfile.iReqMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1498 |
qosExpectedRequestedGPRSProfile.iMinMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1499 |
|
|
1500 |
RBuf8 data;
|
|
1501 |
CleanupClosePushL(data);
|
|
1502 |
TMockLtsyData2<TInfoName, RPacketQoS::TQoSGPRSRequested> packetSetConfigGPRSData(contextName,
|
|
1503 |
qosExpectedRequestedGPRSProfile);
|
|
1504 |
data.Close();
|
|
1505 |
packetSetConfigGPRSData.SerialiseL(data);
|
|
1506 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, data, KErrNone);
|
|
1507 |
|
|
1508 |
TMockLtsyData1<TInfoName> callbackSetPdpGPRSContextNameData(contextName);
|
|
1509 |
data.Close();
|
|
1510 |
callbackSetPdpGPRSContextNameData.SerialiseL(data);
|
|
1511 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, KErrNone, data);
|
|
1512 |
|
|
1513 |
//Activate
|
|
1514 |
TMockLtsyData1<TInfoName> expectedActivateContextNameData(contextName);
|
|
1515 |
data.Close();
|
|
1516 |
expectedActivateContextNameData.SerialiseL(data);
|
|
1517 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesActivatePdpContext::KLtsyDispatchPacketServicesActivatePdpContextApiId, data, KErrNone);
|
|
1518 |
|
|
1519 |
TMockLtsyData3<TInfoName, RPacketContext::TGSNAddress, RPacketContext::TProtocolType>
|
|
1520 |
completedActivateContextNameData(contextName, setConfigGPRS.iAccessPointName, setConfigGPRS.iPdpType);
|
|
1521 |
data.Close();
|
|
1522 |
completedActivateContextNameData.SerialiseL(data);
|
|
1523 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesActivatePdpContext::KLtsyDispatchPacketServicesActivatePdpContextApiId, KErrNone, data);
|
|
1524 |
|
|
1525 |
RPacketQoS::TQoSGPRSNegotiated completedProfile;
|
|
1526 |
TMockLtsyData2<TInfoName, RPacketQoS::TQoSGPRSNegotiated>
|
|
1527 |
expLtsyQosProfileChangedInd(contextName, completedProfile);
|
|
1528 |
data.Close();
|
|
1529 |
expLtsyQosProfileChangedInd.SerialiseL(data);
|
|
1530 |
iMockLTSY.CompleteL(KMockLtsyDispatchPacketServicesNotifyQosProfileChangedIndId, KErrNone, data);
|
|
1531 |
|
|
1532 |
// Prepare context configuration for GPRS
|
|
1533 |
RPacketContext::TContextConfigGPRS setConfigGPRSActive;
|
|
1534 |
setConfigGPRSActive.iAccessPointName.Copy(KPointNameGPRS);
|
|
1535 |
setConfigGPRSActive.iPdpType = RPacketContext::EPdpTypeIPv6;
|
|
1536 |
setConfigGPRSActive.iPdpAddress.Copy(KPdpAddGPRS);
|
|
1537 |
setConfigGPRSActive.iProtocolConfigOption.iDnsAddresses.iPrimaryDns.Copy(KPrimaryDns);
|
|
1538 |
setConfigGPRSActive.iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(KSecondaryDns);
|
|
1539 |
setConfigGPRSActive.iProtocolConfigOption.iAuthInfo.iProtocol = RPacketContext::EProtocolCHAP;
|
|
1540 |
setConfigGPRSActive.iProtocolConfigOption.iAuthInfo.iUsername.Copy(KUsername);
|
|
1541 |
setConfigGPRSActive.iProtocolConfigOption.iAuthInfo.iPassword.Copy(KPassword);
|
|
1542 |
|
|
1543 |
TMockLtsyData5<TInfoName, RPacketContext::TGSNAddress, RPacketContext::TProtocolAddress, TUint, RPacketContext::TMiscProtocolBuffer>
|
|
1544 |
expLtsyProfileChangedInd(contextName, setConfigGPRS.iAccessPointName,
|
|
1545 |
setConfigGPRS.iPdpAddress, setConfigGPRS.iPdpCompression, gprsMiscBuffer);
|
|
1546 |
data.Close();
|
|
1547 |
expLtsyProfileChangedInd.SerialiseL(data);
|
|
1548 |
|
|
1549 |
iMockLTSY.CompleteL(KMockLtsyDispatchPacketServicesNotifyPdpContextConfigChangedIndId, KErrNone, data);
|
|
1550 |
|
|
1551 |
|
|
1552 |
DriverSetConfigContextL(contextName, setConfigGPRSActive.iAccessPointName, setConfigGPRSActive.iPdpType,
|
|
1553 |
setConfigGPRSActive.iPdpAddress, gprsMiscBuffer);
|
|
1554 |
|
|
1555 |
DriverDeleteContextL(contextName);
|
|
1556 |
|
|
1557 |
//
|
|
1558 |
|
|
1559 |
// client side test
|
|
1560 |
RPacketContext packetContext;
|
|
1561 |
|
|
1562 |
// Open a new context
|
|
1563 |
TInt err = packetContext.OpenNewContext(packetService, contextName);
|
|
1564 |
CleanupClosePushL(packetContext);
|
|
1565 |
ASSERT_EQUALS(KErrNone, err);
|
|
1566 |
|
|
1567 |
RPacketContext::TDataChannelV2 dataChannel;
|
|
1568 |
RPacketContext::TDataChannelV2Pckg dataChannelPk(dataChannel);
|
|
1569 |
TRequestStatus initialiseContextStatus;
|
|
1570 |
|
|
1571 |
packetContext.InitialiseContext(initialiseContextStatus,dataChannelPk);
|
|
1572 |
User::WaitForRequest(initialiseContextStatus);
|
|
1573 |
|
|
1574 |
ASSERT_EQUALS(KErrNone, initialiseContextStatus.Int());
|
|
1575 |
ASSERT_TRUE(dataChannel.iChannelId == KDefaultChannelId);
|
|
1576 |
|
|
1577 |
TRequestStatus setConfigStatus;
|
|
1578 |
packetContext.SetConfig(setConfigStatus, pckgConfigGPRS);
|
|
1579 |
|
|
1580 |
User::WaitForRequest(setConfigStatus);
|
|
1581 |
ASSERT_EQUALS(KErrNone, setConfigStatus.Int());
|
|
1582 |
|
|
1583 |
TName qosName;
|
|
1584 |
RPacketQoS packetQoS;
|
|
1585 |
packetQoS.OpenNewQoS(packetContext, qosName);
|
|
1586 |
CleanupClosePushL(packetQoS);
|
|
1587 |
|
|
1588 |
//
|
|
1589 |
// SetProfileParameters for GPRS Configurations
|
|
1590 |
//
|
|
1591 |
|
|
1592 |
RPacketQoS::TQoSGPRSRequested qosGPRSRequestedProfile;
|
|
1593 |
qosGPRSRequestedProfile.iReqPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1594 |
qosGPRSRequestedProfile.iMinPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1595 |
qosGPRSRequestedProfile.iReqDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1596 |
qosGPRSRequestedProfile.iMinDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1597 |
qosGPRSRequestedProfile.iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1598 |
qosGPRSRequestedProfile.iMinReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1599 |
qosGPRSRequestedProfile.iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1600 |
qosGPRSRequestedProfile.iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1601 |
qosGPRSRequestedProfile.iReqMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1602 |
qosGPRSRequestedProfile.iMinMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1603 |
TPckg< RPacketQoS::TQoSGPRSRequested > profilePckgGPRS(qosGPRSRequestedProfile);
|
|
1604 |
|
|
1605 |
TRequestStatus notifyProfileChangeStatus;
|
|
1606 |
RPacketQoS::TQoSGPRSNegotiated profile;
|
|
1607 |
TPckg<RPacketQoS::TQoSGPRSNegotiated> qosGPRSNegotiatedProfilePk(profile);
|
|
1608 |
packetQoS.NotifyProfileChanged(notifyProfileChangeStatus, qosGPRSNegotiatedProfilePk);
|
|
1609 |
|
|
1610 |
TRequestStatus requestStatusGPRS;
|
|
1611 |
packetQoS.SetProfileParameters(requestStatusGPRS, profilePckgGPRS);
|
|
1612 |
User::WaitForRequest(requestStatusGPRS);
|
|
1613 |
ASSERT_EQUALS(KErrNone, requestStatusGPRS.Int());
|
|
1614 |
|
|
1615 |
//
|
|
1616 |
|
|
1617 |
RPacketContext::TContextConfigGPRS setConfigGPRSActiveNotifyConfigChanged;
|
|
1618 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRSNotifyConfigChanged(setConfigGPRSActiveNotifyConfigChanged);
|
|
1619 |
|
|
1620 |
TRequestStatus contextConfigStatus;
|
|
1621 |
packetContext.NotifyConfigChanged(contextConfigStatus, pckgConfigGPRSNotifyConfigChanged);
|
|
1622 |
|
|
1623 |
TRequestStatus contextActivatingRequestStatus;
|
|
1624 |
RPacketContext::TContextStatus contextStatus;
|
|
1625 |
packetContext.NotifyStatusChange(contextActivatingRequestStatus, contextStatus);
|
|
1626 |
|
|
1627 |
TRequestStatus activateStatus;
|
|
1628 |
packetContext.Activate(activateStatus);
|
|
1629 |
User::WaitForRequest(activateStatus);
|
|
1630 |
User::WaitForRequest(contextActivatingRequestStatus);
|
|
1631 |
ASSERT_EQUALS(KErrNone, activateStatus.Int());
|
|
1632 |
ASSERT_EQUALS(RPacketContext::EStatusActivating, contextStatus);
|
|
1633 |
|
|
1634 |
// Complete NotifyProfileChanged
|
|
1635 |
User::WaitForRequest(notifyProfileChangeStatus);
|
|
1636 |
ASSERT_EQUALS(KErrNone, notifyProfileChangeStatus.Int());
|
|
1637 |
|
|
1638 |
// Status change from RPacketContext::EStatusActivating to RPacketContext::EStatusActive
|
|
1639 |
TRequestStatus contextActivateRequestStatus;
|
|
1640 |
RPacketContext::TContextStatus contextActiveStatus;
|
|
1641 |
packetContext.NotifyStatusChange(contextActivateRequestStatus, contextActiveStatus);
|
|
1642 |
|
|
1643 |
User::WaitForRequest(contextActivateRequestStatus);
|
|
1644 |
ASSERT_EQUALS(KErrNone, contextActivateRequestStatus.Int());
|
|
1645 |
ASSERT_EQUALS(RPacketContext::EStatusActive, contextActiveStatus);
|
|
1646 |
|
|
1647 |
// Prepare context configuration for GPRS
|
|
1648 |
setConfigGPRS.iAccessPointName.Copy(KPointNameGPRS);
|
|
1649 |
setConfigGPRS.iPdpType = RPacketContext::EPdpTypeIPv6;
|
|
1650 |
setConfigGPRS.iPdpAddress.Copy(KPdpAddGPRS);
|
|
1651 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRS2(setConfigGPRS);
|
|
1652 |
|
|
1653 |
packetContext.SetConfig(setConfigStatus, pckgConfigGPRS2);
|
|
1654 |
User::WaitForRequest(setConfigStatus);
|
|
1655 |
ASSERT_EQUALS(KErrNone, setConfigStatus.Int());
|
|
1656 |
|
|
1657 |
TRequestStatus requestStatus;
|
|
1658 |
packetContext.Deactivate(requestStatus);
|
|
1659 |
User::WaitForRequest(requestStatus);
|
|
1660 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
1661 |
|
|
1662 |
packetQoS.Close();
|
|
1663 |
packetContext.Close();
|
|
1664 |
packetService.Close();
|
|
1665 |
AssertMockLtsyStatusL();
|
|
1666 |
config.Reset();
|
|
1667 |
CleanupStack::PopAndDestroy(5, this); // data, packetQoS, packetService, packetContext, this
|
|
1668 |
}
|
|
1669 |
|
|
1670 |
/**
|
|
1671 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0016
|
|
1672 |
@SYMComponent telephony_ctsy
|
|
1673 |
@SYMTestCaseDesc Test returned value if EPacketContextAddPacketFilter is not supported by LTSY
|
|
1674 |
@SYMTestPriority High
|
|
1675 |
@SYMTestActions Invokes RPacketContext::AddPacketFilter()
|
|
1676 |
@SYMTestExpectedResults Pass
|
|
1677 |
@SYMTestType UT
|
|
1678 |
*/
|
|
1679 |
void CCTsyPacketServicesFUNegative::TestUnit0016L()
|
|
1680 |
{
|
|
1681 |
TConfig config;
|
|
1682 |
config.SetSupportedValue(MLtsyDispatchPacketServicesAddPacketFilter::KLtsyDispatchPacketServicesAddPacketFilterApiId, EFalse);
|
|
1683 |
|
|
1684 |
OpenEtelServerL(EUseExtendedError);
|
|
1685 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
1686 |
OpenPhoneL();
|
|
1687 |
|
|
1688 |
RPacketService packetService;
|
|
1689 |
OpenPacketServiceLC(packetService,RPacketService::EStatusUnattached);
|
|
1690 |
|
|
1691 |
RPacketContext packetContext;
|
|
1692 |
|
|
1693 |
// Open the primary context
|
|
1694 |
TInfoName contextId;
|
|
1695 |
TInt err = packetContext.OpenNewContext(packetService, contextId);
|
|
1696 |
CleanupClosePushL(packetContext);
|
|
1697 |
ASSERT_EQUALS(KErrNone, err);
|
|
1698 |
|
|
1699 |
TName qosName;
|
|
1700 |
RPacketQoS packetQoS;
|
|
1701 |
packetQoS.OpenNewQoS(packetContext, qosName);
|
|
1702 |
CleanupClosePushL(packetQoS);
|
|
1703 |
|
|
1704 |
AssertMockLtsyStatusL();
|
|
1705 |
|
|
1706 |
// Prepare context configuration for GPRS
|
|
1707 |
RPacketContext::TContextConfigGPRS* setConfigGPRS = new (ELeave) RPacketContext::TContextConfigGPRS();
|
|
1708 |
CleanupStack::PushL(setConfigGPRS);
|
|
1709 |
setConfigGPRS->iAccessPointName.Copy(KPointNameGPRS);
|
|
1710 |
setConfigGPRS->iPdpType = RPacketContext::EPdpTypeIPv4;
|
|
1711 |
setConfigGPRS->iPdpAddress.Copy(KPdpAddGPRS);
|
|
1712 |
setConfigGPRS->iProtocolConfigOption.iDnsAddresses.iPrimaryDns.Copy(KPrimaryDns);
|
|
1713 |
setConfigGPRS->iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(KSecondaryDns);
|
|
1714 |
setConfigGPRS->iProtocolConfigOption.iAuthInfo.iProtocol = RPacketContext::EProtocolCHAP;
|
|
1715 |
setConfigGPRS->iProtocolConfigOption.iAuthInfo.iUsername.Copy(KUsername);
|
|
1716 |
setConfigGPRS->iProtocolConfigOption.iAuthInfo.iPassword.Copy(KPassword);
|
|
1717 |
setConfigGPRS->iProtocolConfigOption.iId = KRequestID;
|
|
1718 |
setConfigGPRS->iProtocolConfigOption.iMiscBuffer.Copy(KDummyMiscBuffer);
|
|
1719 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRS(*setConfigGPRS);
|
|
1720 |
|
|
1721 |
// Create the PCO buffer
|
|
1722 |
RPacketContext::TMiscProtocolBuffer pcoBuffer;
|
|
1723 |
pcoBuffer.Zero();
|
|
1724 |
|
|
1725 |
// Generate a PCO buffer
|
|
1726 |
PCOGeneratorL(setConfigGPRS->iProtocolConfigOption, pcoBuffer);
|
|
1727 |
setConfigGPRS->iProtocolConfigOption.iId = KRequestID;
|
|
1728 |
|
|
1729 |
DriverInitialiseContextL();
|
|
1730 |
|
|
1731 |
RPacketContext::TDataChannelV2 dataChannel;
|
|
1732 |
RPacketContext::TDataChannelV2Pckg dataChannelPk(dataChannel);
|
|
1733 |
TRequestStatus initialiseContextStatus;
|
|
1734 |
|
|
1735 |
// Initialise primary context
|
|
1736 |
packetContext.InitialiseContext(initialiseContextStatus,dataChannelPk);
|
|
1737 |
User::WaitForRequest(initialiseContextStatus);
|
|
1738 |
|
|
1739 |
ASSERT_EQUALS(KErrNone, initialiseContextStatus.Int());
|
|
1740 |
ASSERT_TRUE(dataChannel.iPort == KFirstAllocatedContextName);
|
|
1741 |
ASSERT_TRUE(dataChannel.iChannelId == KDefaultChannelId); // Now deprecated
|
|
1742 |
|
|
1743 |
AssertMockLtsyStatusL();
|
|
1744 |
|
|
1745 |
// Setting default GPRS context parameters.
|
|
1746 |
RPacketContext::TContextConfigGPRS expContextConfigGprs;
|
|
1747 |
expContextConfigGprs.iAccessPointName = KDefaultAccessPoint;
|
|
1748 |
expContextConfigGprs.iPdpType = KDefaultPdpType;
|
|
1749 |
|
|
1750 |
TMockLtsyData1<RPacketContext::TContextConfigGPRS> expLtsyGprsData(expContextConfigGprs);
|
|
1751 |
RBuf8 data;
|
|
1752 |
CleanupClosePushL(data);
|
|
1753 |
|
|
1754 |
expLtsyGprsData.SerialiseL(data);
|
|
1755 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesSetDefaultPdpContextGprsParams::KLtsyDispatchPacketServicesSetDefaultPdpContextGprsParamsApiId, data);
|
|
1756 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesSetDefaultPdpContextGprsParams::KLtsyDispatchPacketServicesSetDefaultPdpContextGprsParamsApiId, KErrNone);
|
|
1757 |
|
|
1758 |
RPacketContext::TContextConfigGPRS defaultGprsContextConfig;
|
|
1759 |
defaultGprsContextConfig.iAccessPointName = KDefaultAccessPoint;
|
|
1760 |
defaultGprsContextConfig.iPdpType = KDefaultPdpType;
|
|
1761 |
TPckg<RPacketContext::TContextConfigGPRS> defaultContextGprsConfigPckg(defaultGprsContextConfig);
|
|
1762 |
TRequestStatus setDefaultContextParamsStatus;
|
|
1763 |
packetService.SetDefaultContextParams(setDefaultContextParamsStatus, defaultContextGprsConfigPckg);
|
|
1764 |
User::WaitForRequest(setDefaultContextParamsStatus);
|
|
1765 |
|
|
1766 |
ASSERT_EQUALS(KErrNone, setDefaultContextParamsStatus.Int());
|
|
1767 |
|
|
1768 |
AssertMockLtsyStatusL();
|
|
1769 |
|
|
1770 |
DriverSetConfigContextL(contextId, setConfigGPRS->iAccessPointName, setConfigGPRS->iPdpType, setConfigGPRS->iPdpAddress, pcoBuffer);
|
|
1771 |
|
|
1772 |
TRequestStatus setConfigStatus;
|
|
1773 |
packetContext.SetConfig(setConfigStatus, pckgConfigGPRS);
|
|
1774 |
User::WaitForRequest(setConfigStatus);
|
|
1775 |
ASSERT_EQUALS(KErrNone, setConfigStatus.Int());
|
|
1776 |
|
|
1777 |
|
|
1778 |
//
|
|
1779 |
// SetProfileParameters for GPRS Configurations
|
|
1780 |
//
|
|
1781 |
|
|
1782 |
RPacketQoS::TQoSGPRSRequested* qosExpectedRequestedGPRSProfile = new (ELeave) RPacketQoS::TQoSGPRSRequested();
|
|
1783 |
qosExpectedRequestedGPRSProfile->iReqPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1784 |
qosExpectedRequestedGPRSProfile->iMinPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1785 |
qosExpectedRequestedGPRSProfile->iReqDelay = RPacketQoS::EDelayClass1;
|
|
1786 |
qosExpectedRequestedGPRSProfile->iMinDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1787 |
qosExpectedRequestedGPRSProfile->iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1788 |
qosExpectedRequestedGPRSProfile->iMinReliability = RPacketQoS::EReliabilityClass1;
|
|
1789 |
qosExpectedRequestedGPRSProfile->iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1790 |
qosExpectedRequestedGPRSProfile->iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1791 |
qosExpectedRequestedGPRSProfile->iReqMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1792 |
qosExpectedRequestedGPRSProfile->iMinMeanThroughput = RPacketQoS::EMeanThroughput500;
|
|
1793 |
|
|
1794 |
TMockLtsyData2<TInfoName, RPacketQoS::TQoSGPRSRequested> packetSetConfigGPRSData(contextId, *qosExpectedRequestedGPRSProfile);
|
|
1795 |
data.Close();
|
|
1796 |
packetSetConfigGPRSData.SerialiseL(data);
|
|
1797 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, data, KErrNone);
|
|
1798 |
|
|
1799 |
TMockLtsyData1<TInfoName> callbackSetPdpGPRSContextNameData(contextId);
|
|
1800 |
callbackSetPdpGPRSContextNameData.SerialiseL(data);
|
|
1801 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, KErrNone, data);
|
|
1802 |
|
|
1803 |
RPacketQoS::TQoSGPRSRequested* qosGPRSRequestedProfile = new (ELeave) RPacketQoS::TQoSGPRSRequested();
|
|
1804 |
qosGPRSRequestedProfile->iReqPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1805 |
qosGPRSRequestedProfile->iMinPrecedence = RPacketQoS::EUnspecifiedPrecedence;
|
|
1806 |
qosGPRSRequestedProfile->iReqDelay = RPacketQoS::EDelayClass1;
|
|
1807 |
qosGPRSRequestedProfile->iMinDelay = RPacketQoS::EUnspecifiedDelayClass;
|
|
1808 |
qosGPRSRequestedProfile->iReqReliability = RPacketQoS::EUnspecifiedReliabilityClass;
|
|
1809 |
qosGPRSRequestedProfile->iMinReliability = RPacketQoS::EReliabilityClass1;
|
|
1810 |
qosGPRSRequestedProfile->iReqPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1811 |
qosGPRSRequestedProfile->iMinPeakThroughput = RPacketQoS::EUnspecifiedPeakThroughput;
|
|
1812 |
qosGPRSRequestedProfile->iReqMeanThroughput = RPacketQoS::EUnspecifiedMeanThroughput;
|
|
1813 |
qosGPRSRequestedProfile->iMinMeanThroughput = RPacketQoS::EMeanThroughput500;
|
|
1814 |
TPckg< RPacketQoS::TQoSGPRSRequested > profilePckgGPRS(*qosGPRSRequestedProfile);
|
|
1815 |
|
|
1816 |
TRequestStatus notifyProfileChangeStatus;
|
|
1817 |
RPacketQoS::TQoSGPRSNegotiated profile;
|
|
1818 |
TPckg<RPacketQoS::TQoSGPRSNegotiated> qosGPRSNegotiatedProfilePk(profile);
|
|
1819 |
packetQoS.NotifyProfileChanged(notifyProfileChangeStatus, qosGPRSNegotiatedProfilePk);
|
|
1820 |
|
|
1821 |
TRequestStatus requestStatusGPRS;
|
|
1822 |
packetQoS.SetProfileParameters(requestStatusGPRS, profilePckgGPRS);
|
|
1823 |
User::WaitForRequest(requestStatusGPRS);
|
|
1824 |
ASSERT_EQUALS(KErrNone, requestStatusGPRS.Int());
|
|
1825 |
|
|
1826 |
AssertMockLtsyStatusL();
|
|
1827 |
|
|
1828 |
TRequestStatus contextConfigStatus;
|
|
1829 |
RPacketContext::TContextConfigGPRS* setConfigGPRSActiveNotifyConfigChanged = new (ELeave) RPacketContext::TContextConfigGPRS();
|
|
1830 |
CleanupStack::PushL(setConfigGPRSActiveNotifyConfigChanged);
|
|
1831 |
TPckg<RPacketContext::TContextConfigGPRS> pckgConfigGPRSNotifyConfigChanged(*setConfigGPRSActiveNotifyConfigChanged);
|
|
1832 |
packetContext.NotifyConfigChanged(contextConfigStatus, pckgConfigGPRSNotifyConfigChanged);
|
|
1833 |
|
|
1834 |
TRequestStatus contextActivatingRequestStatus;
|
|
1835 |
RPacketContext::TContextStatus contextStatus;
|
|
1836 |
packetContext.NotifyStatusChange(contextActivatingRequestStatus, contextStatus);
|
|
1837 |
|
|
1838 |
TMockLtsyData1<TInfoName> expectedActivateContextNameData(contextId);
|
|
1839 |
data.Close();
|
|
1840 |
expectedActivateContextNameData.SerialiseL(data);
|
|
1841 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesActivatePdpContext::KLtsyDispatchPacketServicesActivatePdpContextApiId, data, KErrNone);
|
|
1842 |
|
|
1843 |
TMockLtsyData3<TInfoName, RPacketContext::TGSNAddress, RPacketContext::TProtocolType>
|
|
1844 |
completedActivateContextNameData(contextId, setConfigGPRS->iAccessPointName, setConfigGPRS->iPdpType);
|
|
1845 |
data.Close();
|
|
1846 |
completedActivateContextNameData.SerialiseL(data);
|
|
1847 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesActivatePdpContext::KLtsyDispatchPacketServicesActivatePdpContextApiId, KErrNone, data);
|
|
1848 |
|
|
1849 |
RPacketQoS::TQoSGPRSNegotiated completedProfile;
|
|
1850 |
TMockLtsyData2<TInfoName, RPacketQoS::TQoSGPRSNegotiated>
|
|
1851 |
expLtsyQosProfileChangedInd(contextId, completedProfile);
|
|
1852 |
data.Close();
|
|
1853 |
expLtsyQosProfileChangedInd.SerialiseL(data);
|
|
1854 |
iMockLTSY.CompleteL(KMockLtsyDispatchPacketServicesNotifyQosProfileChangedIndId, KErrNone, data);
|
|
1855 |
|
|
1856 |
// Prepare context configuration for GPRS
|
|
1857 |
RPacketContext::TContextConfigGPRS* setConfigGPRSActive = new (ELeave) RPacketContext::TContextConfigGPRS();
|
|
1858 |
setConfigGPRSActive->iAccessPointName.Copy(KPointNameGPRS);
|
|
1859 |
setConfigGPRSActive->iPdpType = RPacketContext::EPdpTypeIPv4;
|
|
1860 |
setConfigGPRSActive->iPdpCompression = 0;
|
|
1861 |
setConfigGPRSActive->iPdpAddress.Copy(KPdpAddGPRSActive);
|
|
1862 |
setConfigGPRSActive->iProtocolConfigOption.iDnsAddresses.iSecondaryDns.Copy(KSecondaryDns);
|
|
1863 |
setConfigGPRSActive->iProtocolConfigOption.iAuthInfo.iProtocol = RPacketContext::EProtocolCHAP;
|
|
1864 |
setConfigGPRSActive->iProtocolConfigOption.iAuthInfo.iUsername.Copy(KUsername);
|
|
1865 |
setConfigGPRSActive->iProtocolConfigOption.iAuthInfo.iPassword.Copy(KPassword);
|
|
1866 |
setConfigGPRSActive->iProtocolConfigOption.iId = KRequestID;
|
|
1867 |
|
|
1868 |
TMockLtsyData5<TInfoName, RPacketContext::TGSNAddress, RPacketContext::TProtocolAddress, TUint, RPacketContext::TMiscProtocolBuffer>
|
|
1869 |
expLtsyProfileChangedInd(contextId, setConfigGPRSActive->iAccessPointName,
|
|
1870 |
setConfigGPRSActive->iPdpAddress, setConfigGPRSActive->iPdpCompression, pcoBuffer);
|
|
1871 |
data.Close();
|
|
1872 |
expLtsyProfileChangedInd.SerialiseL(data);
|
|
1873 |
iMockLTSY.CompleteL(KMockLtsyDispatchPacketServicesNotifyPdpContextConfigChangedIndId, KErrNone, data);
|
|
1874 |
|
|
1875 |
// Activate primary context
|
|
1876 |
TRequestStatus activateStatus;
|
|
1877 |
packetContext.Activate(activateStatus);
|
|
1878 |
User::WaitForRequest(activateStatus);
|
|
1879 |
|
|
1880 |
// Complete NotifyProfileChanged
|
|
1881 |
User::WaitForRequest(notifyProfileChangeStatus);
|
|
1882 |
ASSERT_EQUALS(KErrNone, notifyProfileChangeStatus.Int());
|
|
1883 |
|
|
1884 |
User::WaitForRequest(contextActivatingRequestStatus);
|
|
1885 |
ASSERT_EQUALS(KErrNone, activateStatus.Int());
|
|
1886 |
ASSERT_EQUALS(RPacketContext::EStatusActivating, contextStatus);
|
|
1887 |
|
|
1888 |
packetContext.NotifyStatusChange(contextActivatingRequestStatus, contextStatus);
|
|
1889 |
|
|
1890 |
User::WaitForRequest(contextActivatingRequestStatus);
|
|
1891 |
ASSERT_EQUALS(RPacketContext::EStatusActive, contextStatus);
|
|
1892 |
|
|
1893 |
AssertMockLtsyStatusL();
|
|
1894 |
|
|
1895 |
//Open Secondary Packet Context
|
|
1896 |
TInfoName secondaryContextId;
|
|
1897 |
RPacketContext secondaryContext;
|
|
1898 |
err = secondaryContext.OpenNewSecondaryContext(packetService, contextId, secondaryContextId);
|
|
1899 |
CleanupClosePushL(secondaryContext);
|
|
1900 |
ASSERT_EQUALS(KErrNone, err);
|
|
1901 |
|
|
1902 |
AssertMockLtsyStatusL();
|
|
1903 |
|
|
1904 |
DriverInitialiseContextL(contextId, secondaryContextId);
|
|
1905 |
|
|
1906 |
RPacketContext::TDataChannelV2* secondDataChannel = new (ELeave) RPacketContext::TDataChannelV2();
|
|
1907 |
RPacketContext::TDataChannelV2Pckg secondDataChannelPk(*secondDataChannel);
|
|
1908 |
TRequestStatus secondInitialiseContextStatus;
|
|
1909 |
|
|
1910 |
// Initialise secondary context
|
|
1911 |
secondaryContext.InitialiseContext(secondInitialiseContextStatus, secondDataChannelPk);
|
|
1912 |
User::WaitForRequest(secondInitialiseContextStatus);
|
|
1913 |
ASSERT_EQUALS(KErrNone, secondInitialiseContextStatus.Int());
|
|
1914 |
ASSERT_TRUE(dataChannel.iPort == KFirstAllocatedContextName);
|
|
1915 |
ASSERT_TRUE(secondDataChannel->iChannelId == KSecondaryContextChannelId); // Now deprecated
|
|
1916 |
|
|
1917 |
AssertMockLtsyStatusL();
|
|
1918 |
|
|
1919 |
// Open QoS for secondaty context
|
|
1920 |
RPacketQoS secondaryPacketQoS;
|
|
1921 |
secondaryPacketQoS.OpenNewQoS(secondaryContext, secondaryContextId);
|
|
1922 |
CleanupClosePushL(secondaryPacketQoS);
|
|
1923 |
|
|
1924 |
RPacketQoS::TQoSGPRSRequested* qosExpectedRequestedGPRSProfileSecondaryContext = new (ELeave) RPacketQoS::TQoSGPRSRequested();
|
|
1925 |
qosExpectedRequestedGPRSProfileSecondaryContext->iMinMeanThroughput = RPacketQoS::EMeanThroughput500;
|
|
1926 |
|
|
1927 |
TMockLtsyData2<TInfoName, RPacketQoS::TQoSGPRSRequested> packetSetConfigGPRSDataSecondaryContext(secondaryContextId, *qosExpectedRequestedGPRSProfileSecondaryContext);
|
|
1928 |
data.Close();
|
|
1929 |
packetSetConfigGPRSDataSecondaryContext.SerialiseL(data);
|
|
1930 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, data, KErrNone);
|
|
1931 |
|
|
1932 |
TMockLtsyData1<TInfoName> callbackSetPdpGPRSContextNameDataSecondaryContext(secondaryContextId);
|
|
1933 |
callbackSetPdpGPRSContextNameDataSecondaryContext.SerialiseL(data);
|
|
1934 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesSetPdpContextQosGprs::KLtsyDispatchPacketServicesSetPdpContextQosGprsApiId, KErrNone, data);
|
|
1935 |
|
|
1936 |
//Define qos params for secondaty context
|
|
1937 |
RPacketQoS::TQoSGPRSRequested* qosGPRSRequestedProfilesecondaryPacket = new (ELeave) RPacketQoS::TQoSGPRSRequested();
|
|
1938 |
qosGPRSRequestedProfilesecondaryPacket->iMinMeanThroughput = RPacketQoS::EMeanThroughput500;
|
|
1939 |
TPckg<RPacketQoS::TQoSGPRSRequested> qosGPRSRequestedProfilePk(*qosGPRSRequestedProfilesecondaryPacket);
|
|
1940 |
|
|
1941 |
//Set QoS Params GPRS for secondaty context
|
|
1942 |
TRequestStatus setProfileParametersSt;
|
|
1943 |
secondaryPacketQoS.SetProfileParameters(setProfileParametersSt, qosGPRSRequestedProfilePk);
|
|
1944 |
User::WaitForRequest(setProfileParametersSt);
|
|
1945 |
ASSERT_EQUALS(KErrNone, setProfileParametersSt.Int());
|
|
1946 |
|
|
1947 |
AssertMockLtsyStatusL();
|
|
1948 |
|
|
1949 |
// Configure packet filter secondary context
|
|
1950 |
RPacketContext::TPacketFilterV2* packetFilterV2 = new (ELeave) RPacketContext::TPacketFilterV2();
|
|
1951 |
packetFilterV2->iId = 1;
|
|
1952 |
packetFilterV2->iEvaluationPrecedenceIndex = 100;
|
|
1953 |
packetFilterV2->iDestPortMax = 4001;
|
|
1954 |
packetFilterV2->iDestPortMin = 4000;
|
|
1955 |
packetFilterV2->iIPSecSPI = 1;
|
|
1956 |
packetFilterV2->iProtocolNumberOrNextHeader = 0;
|
|
1957 |
packetFilterV2->iSrcAddr[12] = 0;
|
|
1958 |
memcpy(&(packetFilterV2->iSrcAddr[0]), "200.12.13.19", 12);
|
|
1959 |
packetFilterV2->iSrcAddrSubnetMask[13] = 0;
|
|
1960 |
memcpy(&(packetFilterV2->iSrcAddrSubnetMask[0]), "255.255.255.0", 13);
|
|
1961 |
packetFilterV2->iSrcPortMin = 5000;
|
|
1962 |
packetFilterV2->iSrcPortMax = 5001;
|
|
1963 |
packetFilterV2->iTOSorTrafficClass = 0;
|
|
1964 |
RPacketContext::TPacketFilterV2Pckg packetFilterV2Pckg(*packetFilterV2);
|
|
1965 |
CArrayFixFlat<RPacketContext::TPacketFilterV2>* filterTemporaryArray = new ( ELeave ) CArrayFixFlat<RPacketContext::TPacketFilterV2>( 1 );
|
|
1966 |
CleanupStack::PushL(filterTemporaryArray);
|
|
1967 |
filterTemporaryArray->AppendL( *packetFilterV2 );
|
|
1968 |
|
|
1969 |
TRequestStatus addPacketFilterStatus;
|
|
1970 |
|
|
1971 |
// Add filter to secondary context.
|
|
1972 |
secondaryContext.AddPacketFilter(addPacketFilterStatus, packetFilterV2Pckg);
|
|
1973 |
User::WaitForRequest(addPacketFilterStatus);
|
|
1974 |
ASSERT_EQUALS(KErrNotSupported, addPacketFilterStatus.Int());
|
|
1975 |
|
|
1976 |
TRequestStatus requestStatus;
|
|
1977 |
iMockLTSY.NotifyTerminated(requestStatus);
|
|
1978 |
|
|
1979 |
DriverDeleteContextL(secondaryContextId);
|
|
1980 |
DriverDeleteContextL(contextId);
|
|
1981 |
|
|
1982 |
secondaryPacketQoS.Close();
|
|
1983 |
packetQoS.Close();
|
|
1984 |
|
|
1985 |
secondaryContext.Close();
|
|
1986 |
packetContext.Close();
|
|
1987 |
packetService.Close();
|
|
1988 |
|
|
1989 |
User::WaitForRequest(requestStatus);
|
|
1990 |
ASSERT_EQUALS(requestStatus.Int(), KErrNone);
|
|
1991 |
|
|
1992 |
AssertMockLtsyStatusL();
|
|
1993 |
config.Reset();
|
|
1994 |
CleanupStack::PopAndDestroy(10, this); // setSecondaryConfigGPRSActiveNotifyConfigChanged, secondarySetConfigGPRSActive, secondarysetConfigGPRSActiveNotifyConfigChanged,
|
|
1995 |
//filterTemporaryArray, secondPacketContext, setConfigGPRSActiveNotifyConfigChanged, data, setConfigGPRS, packetQoS, packetService, packetContext, this
|
|
1996 |
}
|
|
1997 |
|
|
1998 |
/**
|
|
1999 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0018
|
|
2000 |
@SYMComponent telephony_ctsy
|
|
2001 |
@SYMTestCaseDesc Test returned value if EPacketInitProxiesIPC is not supported by LTSY
|
|
2002 |
@SYMTestPriority High
|
|
2003 |
@SYMTestActions Invokes RPacketService::Open()
|
|
2004 |
@SYMTestExpectedResults Pass
|
|
2005 |
@SYMTestType UT
|
|
2006 |
*/
|
|
2007 |
void CCTsyPacketServicesFUNegative::TestUnit0018L()
|
|
2008 |
{
|
|
2009 |
TConfig config;
|
|
2010 |
config.SetSupportedValue(MLtsyDispatchPacketServicesGetStatus::KLtsyDispatchPacketServicesGetStatusApiId, EFalse);
|
|
2011 |
|
|
2012 |
OpenEtelServerL(EUseExtendedError);
|
|
2013 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
2014 |
OpenPhoneL();
|
|
2015 |
|
|
2016 |
RPacketService packetService;
|
|
2017 |
TRequestStatus requestStatus;
|
|
2018 |
iMockLTSY.NotifyTerminated(requestStatus);
|
|
2019 |
|
|
2020 |
RBuf8 data;
|
|
2021 |
CleanupClosePushL(data);
|
|
2022 |
|
|
2023 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetStaticCapabilities::KLtsyDispatchPacketServicesGetStaticCapabilitiesApiId);
|
|
2024 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetMaxNoMonitoredServiceLists::KLtsyDispatchPacketServicesGetMaxNoMonitoredServiceListsApiId);
|
|
2025 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetMaxNoActiveServices::KLtsyDispatchPacketServicesGetMaxNoActiveServicesApiId);
|
|
2026 |
|
|
2027 |
TUint staticCapabilities
|
|
2028 |
= RPacketService::KCapsSuspendSupported
|
|
2029 |
| RPacketService::KCapsNetworkAvailabilitySupported
|
|
2030 |
| RPacketService::KCapsSetDefaultContextSupported
|
|
2031 |
| RPacketService::KCapsChangeAttachModeSupported
|
|
2032 |
| RPacketService::KCapsGetDataTransferredSupported
|
|
2033 |
| RPacketService::KCapsPreferredBearerSupported
|
|
2034 |
| RPacketService::KCapsPdpDataCompSupported
|
|
2035 |
| RPacketService::KCapsPdpHeaderCompSupported
|
|
2036 |
| RPacketService::KCapsMSClassSupported
|
|
2037 |
| RPacketService::KCapsNotifyMSClassSupported;
|
|
2038 |
|
|
2039 |
TMockLtsyData1<TUint> packetServiceStaticCapabilities(staticCapabilities);
|
|
2040 |
packetServiceStaticCapabilities.SerialiseL(data);
|
|
2041 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetStaticCapabilities::KLtsyDispatchPacketServicesGetStaticCapabilitiesApiId, KErrNone, data);
|
|
2042 |
data.Close();
|
|
2043 |
|
|
2044 |
TInt maxNoMonitoredServiceLists = 32;
|
|
2045 |
TMockLtsyData1<TInt> maxNoMonitoredServiceListsData(maxNoMonitoredServiceLists);
|
|
2046 |
maxNoMonitoredServiceListsData.SerialiseL(data);
|
|
2047 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetMaxNoMonitoredServiceLists::KLtsyDispatchPacketServicesGetMaxNoMonitoredServiceListsApiId, KErrNone, data);
|
|
2048 |
data.Close();
|
|
2049 |
|
|
2050 |
TInt maxNoActiveServices = 64;
|
|
2051 |
TMockLtsyData1<TInt> maxNoActiveServicesData(maxNoActiveServices);
|
|
2052 |
maxNoActiveServicesData.SerialiseL(data);
|
|
2053 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetMaxNoActiveServices::KLtsyDispatchPacketServicesGetMaxNoActiveServicesApiId, KErrNone, data);
|
|
2054 |
|
|
2055 |
CleanupClosePushL(packetService);
|
|
2056 |
|
|
2057 |
ASSERT_EQUALS(packetService.Open(iPhone), KErrNone);
|
|
2058 |
User::WaitForRequest(requestStatus);
|
|
2059 |
ASSERT_EQUALS(requestStatus.Int(), KErrNone);
|
|
2060 |
|
|
2061 |
AssertMockLtsyStatusL();
|
|
2062 |
config.Reset();
|
|
2063 |
CleanupStack::PopAndDestroy(3, this); // packetService, data, this
|
|
2064 |
}
|
|
2065 |
|
|
2066 |
/**
|
|
2067 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0019
|
|
2068 |
@SYMComponent telephony_ctsy
|
|
2069 |
@SYMTestCaseDesc Test returned value if EPacketGetStaticCaps is not supported by LTSY
|
|
2070 |
@SYMTestPriority High
|
|
2071 |
@SYMTestActions Invokes RPacketService::GetStaticCaps()
|
|
2072 |
@SYMTestExpectedResults Pass
|
|
2073 |
@SYMTestType UT
|
|
2074 |
*/
|
|
2075 |
void CCTsyPacketServicesFUNegative::TestUnit0019L()
|
|
2076 |
{
|
|
2077 |
TConfig config;
|
|
2078 |
config.SetSupportedValue(MLtsyDispatchPacketServicesGetStaticCapabilities::KLtsyDispatchPacketServicesGetStaticCapabilitiesApiId, EFalse);
|
|
2079 |
|
|
2080 |
OpenEtelServerL(EUseExtendedError);
|
|
2081 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
2082 |
OpenPhoneL();
|
|
2083 |
|
|
2084 |
RPacketService packetService;
|
|
2085 |
TRequestStatus requestStatus;
|
|
2086 |
iMockLTSY.NotifyTerminated(requestStatus);
|
|
2087 |
|
|
2088 |
RBuf8 data;
|
|
2089 |
CleanupClosePushL(data);
|
|
2090 |
|
|
2091 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetStatus::KLtsyDispatchPacketServicesGetStatusApiId);
|
|
2092 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetMaxNoMonitoredServiceLists::KLtsyDispatchPacketServicesGetMaxNoMonitoredServiceListsApiId);
|
|
2093 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetMaxNoActiveServices::KLtsyDispatchPacketServicesGetMaxNoActiveServicesApiId);
|
|
2094 |
|
|
2095 |
TBool resumed = EFalse; // Flag indicating whether packet service has been resumed from suspended state.
|
|
2096 |
RPacketService::TStatus packetServiceStatus = RPacketService::EStatusUnattached;
|
|
2097 |
TMockLtsyData2<RPacketService::TStatus, TBool> packetServiceStatusData(packetServiceStatus, resumed);
|
|
2098 |
packetServiceStatusData.SerialiseL(data);
|
|
2099 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetStatus::KLtsyDispatchPacketServicesGetStatusApiId, KErrNone, data);
|
|
2100 |
data.Close();
|
|
2101 |
|
|
2102 |
TInt maxNoMonitoredServiceLists = 32;
|
|
2103 |
TMockLtsyData1<TInt> maxNoMonitoredServiceListsData(maxNoMonitoredServiceLists);
|
|
2104 |
maxNoMonitoredServiceListsData.SerialiseL(data);
|
|
2105 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetMaxNoMonitoredServiceLists::KLtsyDispatchPacketServicesGetMaxNoMonitoredServiceListsApiId, KErrNone, data);
|
|
2106 |
data.Close();
|
|
2107 |
|
|
2108 |
TInt maxNoActiveServices = 64;
|
|
2109 |
TMockLtsyData1<TInt> maxNoActiveServicesData(maxNoActiveServices);
|
|
2110 |
maxNoActiveServicesData.SerialiseL(data);
|
|
2111 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetMaxNoActiveServices::KLtsyDispatchPacketServicesGetMaxNoActiveServicesApiId, KErrNone, data);
|
|
2112 |
|
|
2113 |
CleanupClosePushL(packetService);
|
|
2114 |
ASSERT_EQUALS(packetService.Open(iPhone),KErrNone);
|
|
2115 |
|
|
2116 |
User::WaitForRequest(requestStatus);
|
|
2117 |
ASSERT_EQUALS(requestStatus.Int(),KErrNone);
|
|
2118 |
AssertMockLtsyStatusL();
|
|
2119 |
|
|
2120 |
//check the capabilities
|
|
2121 |
TUint caps = 0;
|
|
2122 |
TInt ret = packetService.GetStaticCaps(caps,RPacketContext::EPdpTypeIPv4); // still returns KErrNone
|
|
2123 |
ASSERT_EQUALS(ret, KErrNone);
|
|
2124 |
|
|
2125 |
AssertMockLtsyStatusL();
|
|
2126 |
config.Reset();
|
|
2127 |
CleanupStack::PopAndDestroy(3, this); // packetService, data, this
|
|
2128 |
}
|
|
2129 |
|
|
2130 |
/**
|
|
2131 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0020
|
|
2132 |
@SYMComponent telephony_ctsy
|
|
2133 |
@SYMTestCaseDesc Test returned value if EPacketEnumerateMbmsMonitorServiceList is not supported by LTSY
|
|
2134 |
@SYMTestPriority High
|
|
2135 |
@SYMTestActions Invokes RPacketService::EnumerateMbmsMonitorServiceList()
|
|
2136 |
@SYMTestExpectedResults Pass
|
|
2137 |
@SYMTestType UT
|
|
2138 |
*/
|
|
2139 |
void CCTsyPacketServicesFUNegative::TestUnit0020L()
|
|
2140 |
{
|
|
2141 |
TConfig config;
|
|
2142 |
config.SetSupportedValue(MLtsyDispatchPacketServicesGetMaxNoMonitoredServiceLists::KLtsyDispatchPacketServicesGetMaxNoMonitoredServiceListsApiId, EFalse);
|
|
2143 |
|
|
2144 |
OpenEtelServerL(EUseExtendedError);
|
|
2145 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
2146 |
OpenPhoneL();
|
|
2147 |
|
|
2148 |
RPacketService packetService;
|
|
2149 |
TRequestStatus requestStatus;
|
|
2150 |
iMockLTSY.NotifyTerminated(requestStatus);
|
|
2151 |
|
|
2152 |
RBuf8 data;
|
|
2153 |
CleanupClosePushL(data);
|
|
2154 |
|
|
2155 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetStaticCapabilities::KLtsyDispatchPacketServicesGetStaticCapabilitiesApiId);
|
|
2156 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetStatus::KLtsyDispatchPacketServicesGetStatusApiId);
|
|
2157 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetMaxNoActiveServices::KLtsyDispatchPacketServicesGetMaxNoActiveServicesApiId);
|
|
2158 |
|
|
2159 |
TUint staticCapabilities
|
|
2160 |
= RPacketService::KCapsSuspendSupported
|
|
2161 |
| RPacketService::KCapsNetworkAvailabilitySupported
|
|
2162 |
| RPacketService::KCapsSetDefaultContextSupported
|
|
2163 |
| RPacketService::KCapsChangeAttachModeSupported
|
|
2164 |
| RPacketService::KCapsGetDataTransferredSupported
|
|
2165 |
| RPacketService::KCapsPreferredBearerSupported
|
|
2166 |
| RPacketService::KCapsPdpDataCompSupported
|
|
2167 |
| RPacketService::KCapsPdpHeaderCompSupported
|
|
2168 |
| RPacketService::KCapsMSClassSupported
|
|
2169 |
| RPacketService::KCapsNotifyMSClassSupported;
|
|
2170 |
|
|
2171 |
TMockLtsyData1<TUint> packetServiceStaticCapabilities(staticCapabilities);
|
|
2172 |
packetServiceStaticCapabilities.SerialiseL(data);
|
|
2173 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetStaticCapabilities::KLtsyDispatchPacketServicesGetStaticCapabilitiesApiId, KErrNone, data);
|
|
2174 |
data.Close();
|
|
2175 |
|
|
2176 |
TBool resumed = EFalse; // Flag indicating whether packet service has been resumed from suspended state.
|
|
2177 |
RPacketService::TStatus packetServiceStatus = RPacketService::EStatusUnattached;
|
|
2178 |
TMockLtsyData2<RPacketService::TStatus, TBool> packetServiceStatusData(packetServiceStatus, resumed);
|
|
2179 |
packetServiceStatusData.SerialiseL(data);
|
|
2180 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetStatus::KLtsyDispatchPacketServicesGetStatusApiId, KErrNone, data);
|
|
2181 |
data.Close();
|
|
2182 |
|
|
2183 |
TInt maxNoActiveServices = 64;
|
|
2184 |
TMockLtsyData1<TInt> maxNoActiveServicesData(maxNoActiveServices);
|
|
2185 |
maxNoActiveServicesData.SerialiseL(data);
|
|
2186 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetMaxNoActiveServices::KLtsyDispatchPacketServicesGetMaxNoActiveServicesApiId, KErrNone, data);
|
|
2187 |
|
|
2188 |
CleanupClosePushL(packetService);
|
|
2189 |
ASSERT_EQUALS(packetService.Open(iPhone),KErrNone);
|
|
2190 |
|
|
2191 |
User::WaitForRequest(requestStatus);
|
|
2192 |
ASSERT_EQUALS(requestStatus.Int(),KErrNone);
|
|
2193 |
AssertMockLtsyStatusL();
|
|
2194 |
|
|
2195 |
//check the max no monitored service lists
|
|
2196 |
TInt count = 0;
|
|
2197 |
TInt maxAllowed = 0;
|
|
2198 |
packetService.EnumerateMbmsMonitorServiceList(requestStatus,count,maxAllowed);
|
|
2199 |
User::WaitForRequest(requestStatus); // still KErrNone
|
|
2200 |
ASSERT_EQUALS(requestStatus.Int(), KErrNone);
|
|
2201 |
|
|
2202 |
AssertMockLtsyStatusL();
|
|
2203 |
config.Reset();
|
|
2204 |
CleanupStack::PopAndDestroy(3, this); // packetService, data, this
|
|
2205 |
}
|
|
2206 |
|
|
2207 |
/**
|
|
2208 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0021
|
|
2209 |
@SYMComponent telephony_ctsy
|
|
2210 |
@SYMTestCaseDesc Test returned value if EPacketEnumerateMbmsActiveServiceList is not supported by LTSY
|
|
2211 |
@SYMTestPriority High
|
|
2212 |
@SYMTestActions Invokes RPacketService::EnumerateMbmsActiveServiceList()
|
|
2213 |
@SYMTestExpectedResults Pass
|
|
2214 |
@SYMTestType UT
|
|
2215 |
*/
|
|
2216 |
void CCTsyPacketServicesFUNegative::TestUnit0021L()
|
|
2217 |
{
|
|
2218 |
TConfig config;
|
|
2219 |
config.SetSupportedValue(MLtsyDispatchPacketServicesGetMaxNoActiveServices::KLtsyDispatchPacketServicesGetMaxNoActiveServicesApiId, EFalse);
|
|
2220 |
|
|
2221 |
OpenEtelServerL(EUseExtendedError);
|
|
2222 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
2223 |
OpenPhoneL();
|
|
2224 |
|
|
2225 |
RPacketService packetService;
|
|
2226 |
TRequestStatus requestStatus;
|
|
2227 |
iMockLTSY.NotifyTerminated(requestStatus);
|
|
2228 |
|
|
2229 |
RBuf8 data;
|
|
2230 |
CleanupClosePushL(data);
|
|
2231 |
|
|
2232 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetStaticCapabilities::KLtsyDispatchPacketServicesGetStaticCapabilitiesApiId);
|
|
2233 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetStatus::KLtsyDispatchPacketServicesGetStatusApiId);
|
|
2234 |
iMockLTSY.ExpectL(MLtsyDispatchPacketServicesGetMaxNoMonitoredServiceLists::KLtsyDispatchPacketServicesGetMaxNoMonitoredServiceListsApiId);
|
|
2235 |
|
|
2236 |
TUint staticCapabilities
|
|
2237 |
= RPacketService::KCapsSuspendSupported
|
|
2238 |
| RPacketService::KCapsNetworkAvailabilitySupported
|
|
2239 |
| RPacketService::KCapsSetDefaultContextSupported
|
|
2240 |
| RPacketService::KCapsChangeAttachModeSupported
|
|
2241 |
| RPacketService::KCapsGetDataTransferredSupported
|
|
2242 |
| RPacketService::KCapsPreferredBearerSupported
|
|
2243 |
| RPacketService::KCapsPdpDataCompSupported
|
|
2244 |
| RPacketService::KCapsPdpHeaderCompSupported
|
|
2245 |
| RPacketService::KCapsMSClassSupported
|
|
2246 |
| RPacketService::KCapsNotifyMSClassSupported;
|
|
2247 |
|
|
2248 |
TMockLtsyData1<TUint> packetServiceStaticCapabilities(staticCapabilities);
|
|
2249 |
packetServiceStaticCapabilities.SerialiseL(data);
|
|
2250 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetStaticCapabilities::KLtsyDispatchPacketServicesGetStaticCapabilitiesApiId, KErrNone, data);
|
|
2251 |
data.Close();
|
|
2252 |
|
|
2253 |
TBool resumed = EFalse; // Flag indicating whether packet service has been resumed from suspended state.
|
|
2254 |
RPacketService::TStatus packetServiceStatus = RPacketService::EStatusUnattached;
|
|
2255 |
TMockLtsyData2<RPacketService::TStatus, TBool> packetServiceStatusData(packetServiceStatus, resumed);
|
|
2256 |
packetServiceStatusData.SerialiseL(data);
|
|
2257 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetStatus::KLtsyDispatchPacketServicesGetStatusApiId, KErrNone, data);
|
|
2258 |
data.Close();
|
|
2259 |
|
|
2260 |
TInt maxNoMonitoredServiceLists = 32;
|
|
2261 |
TMockLtsyData1<TInt> maxNoMonitoredServiceListsData(maxNoMonitoredServiceLists);
|
|
2262 |
maxNoMonitoredServiceListsData.SerialiseL(data);
|
|
2263 |
iMockLTSY.CompleteL(MLtsyDispatchPacketServicesGetMaxNoMonitoredServiceLists::KLtsyDispatchPacketServicesGetMaxNoMonitoredServiceListsApiId, KErrNone, data);
|
|
2264 |
data.Close();
|
|
2265 |
|
|
2266 |
CleanupClosePushL(packetService);
|
|
2267 |
ASSERT_EQUALS(packetService.Open(iPhone),KErrNone);
|
|
2268 |
|
|
2269 |
User::WaitForRequest(requestStatus);
|
|
2270 |
ASSERT_EQUALS(requestStatus.Int(),KErrNone);
|
|
2271 |
AssertMockLtsyStatusL();
|
|
2272 |
|
|
2273 |
//check the max no monitored service lists
|
|
2274 |
TInt count = 0;
|
|
2275 |
TInt maxAllowed = 0;
|
|
2276 |
|
|
2277 |
packetService.EnumerateMbmsActiveServiceList(requestStatus, count, maxAllowed);
|
|
2278 |
User::WaitForRequest(requestStatus); // still KErrNone
|
|
2279 |
ASSERT_EQUALS(requestStatus.Int(),KErrNone);
|
|
2280 |
|
|
2281 |
AssertMockLtsyStatusL();
|
|
2282 |
config.Reset();
|
|
2283 |
CleanupStack::PopAndDestroy(3, this); // packetService, data, this
|
|
2284 |
}
|
|
2285 |
|
|
2286 |
/**
|
|
2287 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0022
|
|
2288 |
@SYMComponent telephony_ctsy
|
|
2289 |
@SYMTestCaseDesc Test returned value if ECtsyPacketMbmsInitialiseContextReq is not supported by LTSY
|
|
2290 |
@SYMTestPriority High
|
|
2291 |
@SYMTestActions Invokes RPacketContext::InitialiseContext()
|
|
2292 |
@SYMTestExpectedResults Pass
|
|
2293 |
@SYMTestType UT
|
|
2294 |
*/
|
|
2295 |
void CCTsyPacketServicesFUNegative::TestUnit0022L()
|
|
2296 |
{
|
|
2297 |
TConfig config;
|
|
2298 |
config.SetSupportedValue(MLtsyDispatchPacketServicesInitialiseMbmsContext::KLtsyDispatchPacketServicesInitialiseMbmsContextApiId, EFalse);
|
|
2299 |
|
|
2300 |
OpenEtelServerL(EUseExtendedError);
|
|
2301 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
2302 |
OpenPhoneL();
|
|
2303 |
|
|
2304 |
RPacketService packetService;
|
|
2305 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
2306 |
|
|
2307 |
TInfoName contextName;
|
|
2308 |
RPacketMbmsContext packetContext;
|
|
2309 |
|
|
2310 |
packetContext.OpenNewContext(packetService, contextName);
|
|
2311 |
CleanupClosePushL(packetContext);
|
|
2312 |
|
|
2313 |
TRequestStatus requestStatus;
|
|
2314 |
RPacketContext::TDataChannelV2 dataChannel1;
|
|
2315 |
RPacketContext::TDataChannelV2Pckg dataChannelPckg1(dataChannel1);
|
|
2316 |
|
|
2317 |
packetContext.InitialiseContext(requestStatus, dataChannelPckg1);
|
|
2318 |
User::WaitForRequest(requestStatus);
|
|
2319 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
2320 |
|
|
2321 |
AssertMockLtsyStatusL();
|
|
2322 |
config.Reset();
|
|
2323 |
CleanupStack::PopAndDestroy(3, this); // packetContext, packetService, this
|
|
2324 |
}
|
|
2325 |
|
|
2326 |
/**
|
|
2327 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0023
|
|
2328 |
@SYMComponent telephony_ctsy
|
|
2329 |
@SYMTestCaseDesc Test returned value if EPacketGetMbmsNetworkServiceStatus is not supported by LTSY
|
|
2330 |
@SYMTestPriority High
|
|
2331 |
@SYMTestActions Invokes RPacketService::GetMbmsNetworkServiceStatus()
|
|
2332 |
@SYMTestExpectedResults Pass
|
|
2333 |
@SYMTestType UT
|
|
2334 |
*/
|
|
2335 |
void CCTsyPacketServicesFUNegative::TestUnit0023L()
|
|
2336 |
{
|
|
2337 |
TConfig config;
|
|
2338 |
config.SetSupportedValue(MLtsyDispatchPacketServicesGetMbmsNetworkServiceStatus::KLtsyDispatchPacketServicesGetMbmsNetworkServiceStatusApiId, EFalse);
|
|
2339 |
|
|
2340 |
OpenEtelServerL(EUseExtendedError);
|
|
2341 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
2342 |
OpenPhoneL();
|
|
2343 |
|
|
2344 |
RPacketService packetService;
|
|
2345 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
2346 |
|
|
2347 |
TRequestStatus requestStatus;
|
|
2348 |
TMbmsNetworkServiceStatus mbmsNetworkServiceStatus;
|
|
2349 |
|
|
2350 |
packetService.GetMbmsNetworkServiceStatus(requestStatus, ETrue, mbmsNetworkServiceStatus);
|
|
2351 |
User::WaitForRequest(requestStatus);
|
|
2352 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
2353 |
|
|
2354 |
AssertMockLtsyStatusL();
|
|
2355 |
config.Reset();
|
|
2356 |
CleanupStack::PopAndDestroy(2, this); // packetService, this
|
|
2357 |
}
|
|
2358 |
|
|
2359 |
/**
|
|
2360 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0024
|
|
2361 |
@SYMComponent telephony_ctsy
|
|
2362 |
@SYMTestCaseDesc Test returned value if EPacketUpdateMbmsMonitorServiceList is not supported by LTSY
|
|
2363 |
@SYMTestPriority High
|
|
2364 |
@SYMTestActions Invokes RPacketService::UpdateMbmsMonitorServiceListL()
|
|
2365 |
@SYMTestExpectedResults Pass
|
|
2366 |
@SYMTestType UT
|
|
2367 |
*/
|
|
2368 |
void CCTsyPacketServicesFUNegative::TestUnit0024L()
|
|
2369 |
{
|
|
2370 |
TConfig config;
|
|
2371 |
config.SetSupportedValue(MLtsyDispatchPacketServicesUpdateMbmsMonitorServiceList::KLtsyDispatchPacketServicesUpdateMbmsMonitorServiceListApiId, EFalse);
|
|
2372 |
|
|
2373 |
OpenEtelServerL(EUseExtendedError);
|
|
2374 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
2375 |
OpenPhoneL();
|
|
2376 |
|
|
2377 |
RPacketService packetService;
|
|
2378 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
2379 |
|
|
2380 |
TRequestStatus requestStatus;
|
|
2381 |
CPcktMbmsMonitoredServiceList* multipleEntries = CPcktMbmsMonitoredServiceList ::NewL();
|
|
2382 |
CleanupStack::PushL(multipleEntries);
|
|
2383 |
RPacketService::TMbmsServiceAvailabilityV1 entry1, entry2;
|
|
2384 |
TInt MBMS_MONITORSERVICECOUNTMULTIPLE = 3;
|
|
2385 |
|
|
2386 |
for(TInt i=0;i < MBMS_MONITORSERVICECOUNTMULTIPLE ;i++)
|
|
2387 |
{
|
|
2388 |
entry1.iTmgi.SetServiceId(i);
|
|
2389 |
entry1.iTmgi.SetMCC(i);
|
|
2390 |
entry1.iTmgi.SetMNC(i);
|
|
2391 |
entry1.iMbmsServiceMode = KBroadcast;
|
|
2392 |
entry1.iMbmsAccessBearer = E2GBearer;
|
|
2393 |
entry1.iMbmsAvailabilityStatus = EMbmsUnavailable;
|
|
2394 |
multipleEntries->AddEntryL( entry1 );
|
|
2395 |
}
|
|
2396 |
|
|
2397 |
packetService.UpdateMbmsMonitorServiceListL(requestStatus, EAddEntries, multipleEntries);
|
|
2398 |
User::WaitForRequest(requestStatus);
|
|
2399 |
AssertMockLtsyStatusL();
|
|
2400 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
2401 |
|
|
2402 |
AssertMockLtsyStatusL();
|
|
2403 |
config.Reset();
|
|
2404 |
CleanupStack::PopAndDestroy(3, this); // multipleEntries, packetService, this
|
|
2405 |
}
|
|
2406 |
|
|
2407 |
/**
|
|
2408 |
@SYMTestCaseID BA-CTSYD-DIS-PACKETSERVICES-NEGATIVE-UN0025
|
|
2409 |
@SYMComponent telephony_ctsy
|
|
2410 |
@SYMTestCaseDesc Test returned value if EPacketContextUpdateMbmsSessionList is not supported by LTSY
|
|
2411 |
@SYMTestPriority High
|
|
2412 |
@SYMTestActions Invokes RPacketMbmsContext::UpdateMbmsSessionList()
|
|
2413 |
@SYMTestExpectedResults Pass
|
|
2414 |
@SYMTestType UT
|
|
2415 |
*/
|
|
2416 |
void CCTsyPacketServicesFUNegative::TestUnit0025L()
|
|
2417 |
{
|
|
2418 |
TConfig config;
|
|
2419 |
config.SetSupportedValue(MLtsyDispatchPacketServicesUpdateMbmsSessionList::KLtsyDispatchPacketServicesUpdateMbmsSessionListApiId, EFalse);
|
|
2420 |
|
|
2421 |
OpenEtelServerL(EUseExtendedError);
|
|
2422 |
CleanupStack::PushL(TCleanupItem(Cleanup, this));
|
|
2423 |
OpenPhoneL();
|
|
2424 |
|
|
2425 |
RPacketService packetService;
|
|
2426 |
OpenPacketServiceLC(packetService, RPacketService::EStatusUnattached);
|
|
2427 |
|
|
2428 |
TInfoName contextId;
|
|
2429 |
RPacketMbmsContext mbmsContext;
|
|
2430 |
mbmsContext.OpenNewContext(packetService, contextId);
|
|
2431 |
CleanupClosePushL( mbmsContext );
|
|
2432 |
|
|
2433 |
TRequestStatus requestStatus;
|
|
2434 |
TMbmsSessionId session = 0;
|
|
2435 |
|
|
2436 |
mbmsContext.UpdateMbmsSessionList(requestStatus, EAddEntries, session);
|
|
2437 |
User::WaitForRequest(requestStatus);
|
|
2438 |
AssertMockLtsyStatusL();
|
|
2439 |
ASSERT_EQUALS(requestStatus.Int(), KErrNotSupported);
|
|
2440 |
|
|
2441 |
AssertMockLtsyStatusL();
|
|
2442 |
config.Reset();
|
|
2443 |
CleanupStack::PopAndDestroy(3, this); // mbmsContext, packetService, this
|
|
2444 |
}
|