|
1 // |
|
2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 /////////////////////////////////////////////////////////////////////////////// |
|
17 //! @file |
|
18 //! @SYMTestSuiteName T_BTUserAPI |
|
19 //! @SYMScriptTestEnvironment This test script requires a basic ROM with bluetooth dongle. |
|
20 //! @SYMScriptDescription Tests all public elements of the CBluetoothSynchronousLink classe |
|
21 //! as a means of confidence that the API works as expected. |
|
22 //! The purpose is to provide a regression test suite of PublishedAll APIs for |
|
23 //! BT USER related classes. |
|
24 //! Negative testing is performed to confirm that correct errors are returned |
|
25 //! when incorrect parameters are given. The tests are fully automated. |
|
26 //! @SYMAuthor Paihung Huang |
|
27 //! @SYMCreationDate 14/03/2007 |
|
28 /////////////////////////////////////////////////////////////////////////////// |
|
29 |
|
30 RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\ |
|
31 RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\ |
|
32 |
|
33 LOAD_SUITE T_BTUserAPI |
|
34 DELAY 500 |
|
35 |
|
36 |
|
37 // **************************************************************************** |
|
38 // CBluetoothSynchronousLink |
|
39 // **************************************************************************** |
|
40 |
|
41 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0001 |
|
42 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0001 |
|
43 //! @SYMAPI CBluetoothSynchronousLink and RSocketServ |
|
44 //! @SYMTestCaseDesc Allocate and open a socket sub-session for Bluetooth SCO |
|
45 //! Uses API elements: NewL() and destructor from CBluetoothSynchronousLink |
|
46 //! RSocketServ(), Connect() and Close() from RSocketServ |
|
47 //! @SYMTestActions 1. Create and start a session on the socket server |
|
48 //! 2. Open a socket for Bluetooth SCO using NewL() function. Return KErrNone if successful |
|
49 //! 3. Delete the socket using destructor |
|
50 //! @SYMTestStatus Implemented |
|
51 //! @SYMTestPriority Low |
|
52 //! @SYMTestExpectedResults Socket for Bluetooth SCO was opened successfully |
|
53 //! @SYMTestType CIT |
|
54 |
|
55 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
56 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
57 CREATE_OBJECT RSocketServ RSocketServ1 |
|
58 COMMAND RSocketServ1 RSocketServ |
|
59 COMMAND RSocketServ1 Connect |
|
60 COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0001-0001command5NewL |
|
61 COMMAND CBluetoothSynchronousLink1 ~ |
|
62 COMMAND RSocketServ1 Close |
|
63 END_TEST_BLOCK |
|
64 |
|
65 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0001 |
|
66 |
|
67 |
|
68 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0002 |
|
69 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0002 |
|
70 //! @SYMAPI CBluetoothSynchronousLink and RSocketServ |
|
71 //! @SYMTestCaseDesc Allocate and open a socket sub-session for Bluetooth SCO |
|
72 //! Uses API elements: NewLC() and destructor from CBluetoothSynchronousLink |
|
73 //! RSocketServ(), Connect() and Close() from RSocketServ |
|
74 //! @SYMTestActions 1. Create and start a session on the socket server |
|
75 //! 2. Open a socket for Bluetooth SCO using NewLC() function. Return KErrNone if successful |
|
76 //! 3. Delete the socket using destructor |
|
77 //! @SYMTestStatus Implemented |
|
78 //! @SYMTestPriority Low |
|
79 //! @SYMTestExpectedResults Socket for Bluetooth SCO was opened successfully |
|
80 //! @SYMTestType CIT |
|
81 |
|
82 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
83 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
84 CREATE_OBJECT RSocketServ RSocketServ1 |
|
85 COMMAND RSocketServ1 RSocketServ |
|
86 COMMAND RSocketServ1 Connect |
|
87 COMMAND CBluetoothSynchronousLink1 NewLC BT-USER-BluetoothSynchronousLink-PublicApi-0002-0001command5NewLC |
|
88 COMMAND CBluetoothSynchronousLink1 ~ |
|
89 COMMAND RSocketServ1 Close |
|
90 END_TEST_BLOCK |
|
91 |
|
92 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0002 |
|
93 |
|
94 |
|
95 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0003 |
|
96 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0003 |
|
97 //! @SYMAPI CBluetoothSynchronousLink, MBluetoothPhysicalLinksNotifier and RSocketServ |
|
98 //! @SYMTestCaseDesc Return a null aObject if the extension is not implemented, or a pointer to another interface if it is |
|
99 //! Uses API elements: NewL() and destructor from CBluetoothSynchronousLink |
|
100 //! RSocketServ(), Connect() and Close() from RSocketServ |
|
101 //! MBSLN_ExtensionInterfaceL() from MBluetoothPhysicalLinksNotifier |
|
102 //! @SYMTestActions 1. Create and start a session on the socket server |
|
103 //! 2. Open a socket for Bluetooth SCO using NewL() function. Return KErrNone if successful |
|
104 //! 3. Verify the pointer returned is null using MBSLN_ExtensionInterfaceL() function. |
|
105 //! Return KErrNone if successful |
|
106 //! 4. Delete the socket using destructor |
|
107 //! @SYMTestStatus Implemented |
|
108 //! @SYMTestPriority Low |
|
109 //! @SYMTestExpectedResults A null pointer returned |
|
110 //! @SYMTestType CIT |
|
111 |
|
112 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
113 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
114 CREATE_OBJECT RSocketServ RSocketServ1 |
|
115 COMMAND RSocketServ1 RSocketServ |
|
116 COMMAND RSocketServ1 Connect |
|
117 COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0003-0001command5NewL |
|
118 COMMAND CBluetoothSynchronousLink1 MBSLN_ExtensionInterfaceL BT-USER-BluetoothSynchronousLink-PublicApi-0003-0001command6MBSLN_ExtensionInterfaceL |
|
119 COMMAND CBluetoothSynchronousLink1 ~ |
|
120 COMMAND RSocketServ1 Close |
|
121 END_TEST_BLOCK |
|
122 |
|
123 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0003 |
|
124 |
|
125 |
|
126 // **************************************************************************** |
|
127 // Negative test cases |
|
128 // **************************************************************************** |
|
129 |
|
130 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0004 |
|
131 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0004 |
|
132 //! @SYMAPI CBluetoothSynchronousLink and RSocketServ |
|
133 //! @SYMTestCaseDesc Create a synchronous link without an existing physical link |
|
134 //! Uses API elements: NewL(), SetupConnection()1 and destructor from CBluetoothSynchronousLink |
|
135 //! RSocketServ(), Connect() and Close() from RSocketServ |
|
136 //! @SYMTestActions 1. Create and start a session on the socket server |
|
137 //! 2. Open a socket for Bluetooth SCO using NewL() function |
|
138 //! 3. Create a synchronous link with a device address(22222222) using SetupConnection()1 function. |
|
139 //! Return KErrNone if successful |
|
140 //! 4. Delete the socket using destructor |
|
141 //! @SYMTestStatus Implemented |
|
142 //! @SYMTestPriority Low |
|
143 //! @SYMTestExpectedResults KErrDisconnected (-36) returned at step 3 |
|
144 //! @SYMTestType CIT |
|
145 |
|
146 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
147 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
148 CREATE_OBJECT RSocketServ RSocketServ1 |
|
149 COMMAND RSocketServ1 RSocketServ |
|
150 COMMAND RSocketServ1 Connect |
|
151 COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0004-0001command5NewL |
|
152 COMMAND !Error=-36 CBluetoothSynchronousLink1 SetupConnection BT-USER-BluetoothSynchronousLink-PublicApi-0004-0001command6SetupConnection |
|
153 OUTSTANDING |
|
154 COMMAND CBluetoothSynchronousLink1 ~ |
|
155 COMMAND RSocketServ1 Close |
|
156 END_TEST_BLOCK |
|
157 |
|
158 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0004 |
|
159 |
|
160 |
|
161 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0005 |
|
162 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0005 |
|
163 //! @SYMAPI CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, CBluetoothSynchronousLink and RSocketServ |
|
164 //! @SYMTestCaseDesc Create a synchronous link with a ACL packet types |
|
165 //! Uses API elements: NewL() and CreateConnection() from CBluetoothPhysicalLinks |
|
166 //! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier |
|
167 //! NewL() and SetupConnection()2 from CBluetoothSynchronousLink |
|
168 //! RSocketServ() and Connect() from RSocketServ |
|
169 //! @SYMTestActions 1. Create and start a session on the socket server |
|
170 //! 2. Open a Bluetooth socket using NewL() function |
|
171 //! 3. Bring in a new member to the piconet with a device address(22222222) using |
|
172 //! CreateConnection() function. Return KErrNone if successful |
|
173 //! 4. Return callback HandleCreateConnectionCompleteL() function |
|
174 //! 5. Verify that if return result (-6004) from callback function is as expected (-6004) |
|
175 //! 6. Open a socket for Bluetooth SCO using NewL() function |
|
176 //! 7. Create a synchronous link with a device address(22222222) and EPacketsDM1 using |
|
177 //! SetupConnection()2 function |
|
178 //! @SYMTestStatus Implemented |
|
179 //! @SYMTestPriority Low |
|
180 //! @SYMTestExpectedResults Panic at step 5 |
|
181 //! @SYMTestType CIT |
|
182 |
|
183 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
184 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
185 CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinks1 |
|
186 CREATE_OBJECT RSocketServ RSocketServ1 |
|
187 COMMAND RSocketServ1 RSocketServ |
|
188 COMMAND RSocketServ1 Connect |
|
189 COMMAND CBluetoothPhysicalLinks1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0005-0001command5NewL |
|
190 COMMAND !AsyncError=-6004 CBluetoothPhysicalLinks1 CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0005-0001command6CreateConnection |
|
191 OUTSTANDING |
|
192 COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0005-0001command8NewL |
|
193 COMMAND CBluetoothSynchronousLink1 SetupConnection BT-USER-BluetoothSynchronousLink-PublicApi-0005-0001command9SetupConnection |
|
194 OUTSTANDING |
|
195 END_TEST_BLOCK !PanicCode=6 !PanicString=BTSocket |
|
196 |
|
197 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0005 |
|
198 |
|
199 |
|
200 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0006 |
|
201 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0006 |
|
202 //! @SYMAPI CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, CBluetoothSynchronousLink and RSocketServ |
|
203 //! @SYMTestCaseDesc Cancel creating a synchronous link before setting up the connection |
|
204 //! Uses API elements: NewL(), CreateConnection() and destructor from CBluetoothPhysicalLinks |
|
205 //! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier |
|
206 //! NewL(), CancelSetup() and destructor from CBluetoothSynchronousLink |
|
207 //! RSocketServ(), Connect() and Close() from RSocketServ |
|
208 //! @SYMTestActions 1. Create and start a session on the socket server |
|
209 //! 2. Open a Bluetooth socket using NewL() function |
|
210 //! 3. Bring in a new member to the piconet with a device address(22222222) using |
|
211 //! CreateConnection() function. Return KErrNone if successful |
|
212 //! 4. Return callback HandleCreateConnectionCompleteL() function |
|
213 //! 5. Verify that if return result (-6004) from callback function is as expected (-6004) |
|
214 //! 6. Open a socket for Bluetooth SCO using NewL() function |
|
215 //! 7. Cancel creating a synchronous link using CancelSetup() function |
|
216 //! 8. Delete the socket using destructor |
|
217 //! @SYMTestStatus Implemented |
|
218 //! @SYMTestPriority Low |
|
219 //! @SYMTestExpectedResults Cancelled the synchronous link |
|
220 //! @SYMTestType CIT |
|
221 |
|
222 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
223 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
224 CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinks1 |
|
225 CREATE_OBJECT RSocketServ RSocketServ1 |
|
226 COMMAND RSocketServ1 RSocketServ |
|
227 COMMAND RSocketServ1 Connect |
|
228 COMMAND CBluetoothPhysicalLinks1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0006-0001command5NewL |
|
229 COMMAND !AsyncError=-6004 CBluetoothPhysicalLinks1 CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0006-0001command6CreateConnection |
|
230 OUTSTANDING |
|
231 COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0006-0001command8NewL |
|
232 COMMAND CBluetoothSynchronousLink1 CancelSetup |
|
233 COMMAND CBluetoothSynchronousLink1 ~ |
|
234 COMMAND CBluetoothPhysicalLinks1 ~ |
|
235 COMMAND RSocketServ1 Close |
|
236 END_TEST_BLOCK |
|
237 |
|
238 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0006 |
|
239 |
|
240 |
|
241 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0007 |
|
242 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0007 |
|
243 //! @SYMAPI CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, CBluetoothSynchronousLink and RSocketServ |
|
244 //! @SYMTestCaseDesc Disconnect a synchronous link before setting up the connection |
|
245 //! Uses API elements: NewL(), CreateConnection() and destructor from CBluetoothPhysicalLinks |
|
246 //! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier |
|
247 //! NewL(), Disconnect() and destructor from CBluetoothSynchronousLink |
|
248 //! RSocketServ(), Connect() and Close() from RSocketServ |
|
249 //! @SYMTestActions 1. Create and start a session on the socket server |
|
250 //! 2. Open a Bluetooth socket using NewL() function |
|
251 //! 3. Bring in a new member to the piconet with a device address(11111111) using |
|
252 //! CreateConnection() function. Return KErrNone if successful |
|
253 //! 4. Return callback HandleCreateConnectionCompleteL() function |
|
254 //! 5. Verify that if return result (-6004) from callback function is as expected (-6004) |
|
255 //! 6. Open a socket for Bluetooth SCO using NewL() function |
|
256 //! 7. Disconnect a synchronous link using Disconnect() function. Return KErrNone if successful |
|
257 //! 8. Delete the socket using destructor |
|
258 //! @SYMTestStatus Implemented |
|
259 //! @SYMTestPriority Low |
|
260 //! @SYMTestExpectedResults KErrDisconnected (-36) returned at step 5 |
|
261 //! @SYMTestType CIT |
|
262 |
|
263 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
264 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
265 CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinks1 |
|
266 CREATE_OBJECT RSocketServ RSocketServ1 |
|
267 COMMAND RSocketServ1 RSocketServ |
|
268 COMMAND RSocketServ1 Connect |
|
269 COMMAND CBluetoothPhysicalLinks1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0007-0001command5NewL |
|
270 COMMAND !AsyncError=-6004 CBluetoothPhysicalLinks1 CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0007-0001command6CreateConnection |
|
271 OUTSTANDING |
|
272 COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0007-0001command8NewL |
|
273 COMMAND !Error=-36 CBluetoothSynchronousLink1 Disconnect BT-USER-BluetoothSynchronousLink-PublicApi-0007-0001command9Disconnect |
|
274 OUTSTANDING |
|
275 COMMAND CBluetoothSynchronousLink1 ~ |
|
276 COMMAND CBluetoothPhysicalLinks1 ~ |
|
277 COMMAND RSocketServ1 Close |
|
278 END_TEST_BLOCK |
|
279 |
|
280 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0007 |
|
281 |
|
282 |
|
283 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0008 |
|
284 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0008 |
|
285 //! @SYMAPI CBluetoothSynchronousLink, CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, RSocketServ |
|
286 //! @SYMTestCaseDesc Prepare for a remote device to set up a synchronous link on the local device |
|
287 //! Uses API elements: NewL() and CreateConnection() from CBluetoothPhysicalLinks |
|
288 //! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier |
|
289 //! NewL() and AcceptConnection()2 from CBluetoothSynchronousLink |
|
290 //! RSocketServ() and Connect() from RSocketServ |
|
291 //! @SYMTestActions 1. Create and start a session on the socket server |
|
292 //! 2. Open a Bluetooth socket using NewL() function |
|
293 //! 3. Bring in a new member to the piconet with a device address(11111111) using |
|
294 //! CreateConnection() function. Return KErrNone if successful |
|
295 //! 4. Return callback HandleCreateConnectionCompleteL() function |
|
296 //! 5. Verify that if return result (-6004) from callback function is as expected (-6004) |
|
297 //! 6. Open a socket for Bluetooth SCO using NewL() function |
|
298 //! 7. Prepare for a remote device to set up a synchronous link on the local device with |
|
299 //! EPacketsHV3 using AcceptConnection()2 function |
|
300 //! @SYMTestStatus Implemented |
|
301 //! @SYMTestPriority Low |
|
302 //! @SYMTestExpectedResults KErrDisconnected (-36) returned at step 4 |
|
303 //! @SYMTestType CIT |
|
304 |
|
305 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
306 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
307 CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinks1 |
|
308 CREATE_OBJECT RSocketServ RSocketServ1 |
|
309 CREATE_OBJECT TBTSyncPackets TBTSyncPackets1 |
|
310 COMMAND RSocketServ1 RSocketServ |
|
311 COMMAND RSocketServ1 Connect |
|
312 COMMAND TBTSyncPackets1 TBTSyncPackets BT-USER-BluetoothSynchronousLink-PublicApi-0008-0001command3TBTSyncPackets |
|
313 COMMAND CBluetoothPhysicalLinks1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0008-0001command4NewL |
|
314 COMMAND !AsyncError=-6004 CBluetoothPhysicalLinks1 CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0008-0001command5CreateConnection |
|
315 OUTSTANDING |
|
316 COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0008-0001command6NewL |
|
317 COMMAND CBluetoothSynchronousLink1 AcceptConnection BT-USER-BluetoothSynchronousLink-PublicApi-0008-0001command7AcceptConnection |
|
318 END_TEST_BLOCK |
|
319 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0008 |
|
320 |
|
321 //!START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0009 |
|
322 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0009 |
|
323 //! @SYMAPI CBluetoothSynchronousLink, TBTSyncPackets |
|
324 //! @SYMTestCaseDesc Create a synchronous link on an EXISTING physical link without a connected session on the socket server |
|
325 //! Uses API elements: NewL() and SetupConnection()3 from CBluetoothSynchronousLink |
|
326 //! TBTSyncPackets() from TBTSyncPackets |
|
327 //! @SYMTestActions 1. Construct a synchronous packet type (ESyncPacketsHV1) using TBTSyncPackets() function |
|
328 //! 2. Open a socket for Bluetooth SCO using NewL() function |
|
329 //! 3. Create a synchronous link on an EXISTING physical link with a device address(11111111) |
|
330 //! and a SCO packet type(ESyncPacketsHV1) using SetupConnection()3 function |
|
331 //! @SYMTestStatus Implemented |
|
332 //! @SYMTestPriority Low |
|
333 //! @SYMTestExpectedResults Panic at step 3 |
|
334 //! @SYMTestType CIT |
|
335 |
|
336 //! START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
337 //! CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
338 //! CREATE_OBJECT RSocketServ RSocketServ1 |
|
339 //! CREATE_OBJECT TBTSyncPackets TBTSyncPackets1 |
|
340 //! COMMAND TBTSyncPackets1 TBTSyncPackets BT-USER-BluetoothSynchronousLink-PublicApi-0009-0001command2TBTSyncPackets |
|
341 //! COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0009-0001command4NewL |
|
342 //! COMMAND CBluetoothSynchronousLink1 SetupConnection BT-USER-BluetoothSynchronousLink-PublicApi-0009-0001command5SetupConnection |
|
343 //! OUTSTANDING |
|
344 //! END_TEST_BLOCK !PanicCode=3 !PanicString=KERN-EXEC |
|
345 |
|
346 //!END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0009 |
|
347 |
|
348 |
|
349 //!START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0010 |
|
350 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0010 |
|
351 //! @SYMAPI CBluetoothSynchronousLink |
|
352 //! @SYMTestCaseDesc Create a synchronous link on an EXISTING physical link without a connected session on the socket server |
|
353 //! Uses API elements: NewLC() and SetupConnection()1 |
|
354 //! @SYMTestActions 1. Open a socket for Bluetooth SCO using NewLC() function |
|
355 //! 2. Create a synchronous link on an EXISTING physical link with a device address(11111111) |
|
356 //! using SetupConnection()1 function |
|
357 //! @SYMTestStatus Implemented |
|
358 //! @SYMTestPriority Low |
|
359 //! @SYMTestExpectedResults Panic at step 2 |
|
360 //! @SYMTestType CIT |
|
361 |
|
362 //! START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
363 //! CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
364 //! CREATE_OBJECT RSocketServ RSocketServ1 |
|
365 //! COMMAND CBluetoothSynchronousLink1 NewLC BT-USER-BluetoothSynchronousLink-PublicApi-0010-0001command2NewLC |
|
366 //! COMMAND CBluetoothSynchronousLink1 SetupConnection BT-USER-BluetoothSynchronousLink-PublicApi-0010-0001command3SetupConnection |
|
367 //! OUTSTANDING |
|
368 //! END_TEST_BLOCK !PanicCode=3 !PanicString=KERN-EXEC |
|
369 |
|
370 //!END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0010 |
|
371 |
|
372 |
|
373 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0011 |
|
374 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0011 |
|
375 //! @SYMAPI CBluetoothSynchronousLink, RSocketServ, TBTSyncPackets |
|
376 //! @SYMTestCaseDesc Setup a synchronous link without creating a physical link |
|
377 //! Uses API elements: NewL(), SetupConnection()3 and destructor from CBluetoothSynchronousLink |
|
378 //! RSocketServ(), Connect() and Close() from RSocketServ |
|
379 //! TBTSyncPackets() and Connect() from TBTSyncPackets |
|
380 //! @SYMTestActions 1. Construct a synchronous packet type (ESyncAnyESCOPacket) using TBTSyncPackets() function |
|
381 //! 2. Create and start a session on the socket server |
|
382 //! 3. Open a socket for Bluetooth SCO using NewL() function |
|
383 //! 4. Create a synchronous link on an EXISTING physical link with a device address(11111111) |
|
384 //! and a SCO packet type(ESyncAnyESCOPacket) using SetupConnection()3 function |
|
385 //! 5. Delete the synchronous link using destructor |
|
386 //! 6. Close the session on the socket server |
|
387 //! @SYMTestStatus Implemented |
|
388 //! @SYMTestPriority Low |
|
389 //! @SYMTestExpectedResults KErrDisconnected (-36) returned at step 4 |
|
390 //! @SYMTestType CIT |
|
391 |
|
392 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
393 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
394 CREATE_OBJECT RSocketServ RSocketServ1 |
|
395 CREATE_OBJECT TBTSyncPackets TBTSyncPackets1 |
|
396 COMMAND TBTSyncPackets1 TBTSyncPackets BT-USER-BluetoothSynchronousLink-PublicApi-0011-0001command2TBTSyncPackets |
|
397 COMMAND RSocketServ1 RSocketServ |
|
398 COMMAND RSocketServ1 Connect |
|
399 COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0011-0001command7NewL |
|
400 COMMAND !Error=-36 CBluetoothSynchronousLink1 SetupConnection BT-USER-BluetoothSynchronousLink-PublicApi-0011-0001command8SetupConnection |
|
401 OUTSTANDING |
|
402 COMMAND CBluetoothSynchronousLink1 ~ |
|
403 COMMAND RSocketServ1 Close |
|
404 END_TEST_BLOCK |
|
405 |
|
406 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0011 |
|
407 |
|
408 |
|
409 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0012 |
|
410 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0012 |
|
411 //! @SYMAPI CBluetoothSynchronousLink, CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, RSocketServ |
|
412 //! @SYMTestCaseDesc Cancel ability to respond to a remote request without creating a synchronous link |
|
413 //! Uses API elements: NewL(), CreateConnection() and destructor from CBluetoothPhysicalLinks |
|
414 //! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier |
|
415 //! NewL(), CancelAccept() and destructor from CBluetoothSynchronousLink |
|
416 //! RSocketServ(), Connect() and Close() from RSocketServ |
|
417 //! @SYMTestActions 1. Create and start a session on the socket server |
|
418 //! 2. Open a Bluetooth socket using NewL() function |
|
419 //! 3. Bring in a new member to the piconet with a device address(11111111) using |
|
420 //! CreateConnection() function. Return KErrNone if successful |
|
421 //! 4. Return callback HandleCreateConnectionCompleteL() function |
|
422 //! 5. Verify that if return result (-6004) from callback function is as expected (-6004) |
|
423 //! 6. Open a socket for Bluetooth SCO using NewL() function |
|
424 //! 7. Cancel ability to respond to a remote request to set up a synchronous link using |
|
425 //! CancelAccept() function |
|
426 //! 8. Delete the synchronous link using destructor |
|
427 //! 9. Delete the socket using destructor |
|
428 //! 10. Close the session on the socket server |
|
429 //! @SYMTestStatus Implemented |
|
430 //! @SYMTestPriority Low |
|
431 //! @SYMTestExpectedResults Cancel succeeded |
|
432 //! @SYMTestType CIT |
|
433 |
|
434 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
435 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLink1 |
|
436 CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinks1 |
|
437 CREATE_OBJECT RSocketServ RSocketServ1 |
|
438 COMMAND RSocketServ1 RSocketServ |
|
439 COMMAND RSocketServ1 Connect |
|
440 COMMAND CBluetoothPhysicalLinks1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0012-0001command5NewL |
|
441 COMMAND !AsyncError=-6004 CBluetoothPhysicalLinks1 CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0012-0001command6CreateConnection |
|
442 OUTSTANDING |
|
443 COMMAND CBluetoothSynchronousLink1 NewL BT-USER-BluetoothSynchronousLink-PublicApi-0012-0001command8NewL |
|
444 COMMAND CBluetoothSynchronousLink1 CancelAccept |
|
445 COMMAND CBluetoothSynchronousLink1 ~ |
|
446 COMMAND CBluetoothPhysicalLinks1 ~ |
|
447 COMMAND RSocketServ1 Close |
|
448 END_TEST_BLOCK |
|
449 |
|
450 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0012 |
|
451 |
|
452 |
|
453 START_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0013 |
|
454 //! @SYMTestCaseID BT-USER-BluetoothSynchronousLink-PublicApi-0013 |
|
455 //! @SYMAPI CBluetoothPhysicalLinks, MBluetoothPhysicalLinksNotifier, CBluetoothSynchronousLink, RSocketServ |
|
456 //! @SYMTestCaseDesc Get the socket address of the remote Bluetooth device without creating a synchronous link |
|
457 //! Uses API elements: NewL() and CreateConnection() from CBluetoothPhysicalLinks |
|
458 //! HandleCreateConnectionCompleteL() from MBluetoothPhysicalLinksNotifier |
|
459 //! NewL() and RemoteName() from CBluetoothSynchronousLink |
|
460 //! RSocketServ() and Connect() from RSocketServ |
|
461 //! @SYMTestActions 1. Create and start a session on the socket server |
|
462 //! 2. Open a Bluetooth socket using NewL() function |
|
463 //! 3. Bring in a new member to the piconet with a device address(11111111) using |
|
464 //! CreateConnection() function. Return KErrNone if successful |
|
465 //! 4. Return callback HandleCreateConnectionCompleteL() function |
|
466 //! 5. Verify that if return result (-6004) from callback function is as expected (-6004) |
|
467 //! 6. Open a socket for Bluetooth SCO using NewL() function |
|
468 //! 7. Get the socket address of the remote Bluetooth device using RemoteName() function |
|
469 //! @SYMTestStatus Implemented |
|
470 //! @SYMTestPriority Low |
|
471 //! @SYMTestExpectedResults Panic at step 5 |
|
472 //! @SYMTestType CIT |
|
473 |
|
474 START_TEST_BLOCK 1000 T_BTUserAPI \bluetooth\user\BT-USER-BluetoothSynchronousLink-PublicApi.ini |
|
475 CREATE_OBJECT CBluetoothPhysicalLinks CBluetoothPhysicalLinksData |
|
476 CREATE_OBJECT RSocketServ RSocketServData |
|
477 CREATE_OBJECT CBluetoothSynchronousLink CBluetoothSynchronousLinkData |
|
478 COMMAND RSocketServData RSocketServ |
|
479 COMMAND RSocketServData Connect |
|
480 COMMAND CBluetoothPhysicalLinksData NewL BT-USER-BluetoothSynchronousLink-PublicApi-0013-0001command5NewL |
|
481 COMMAND !AsyncError=-6004 CBluetoothPhysicalLinksData CreateConnection BT-USER-BluetoothSynchronousLink-PublicApi-0013-0001command6CreateConnection |
|
482 OUTSTANDING |
|
483 COMMAND CBluetoothSynchronousLinkData NewL BT-USER-BluetoothSynchronousLink-PublicApi-0013-0001command9NewL |
|
484 COMMAND CBluetoothSynchronousLinkData RemoteName BT-USER-BluetoothSynchronousLink-PublicApi-0013-0001command10RemoteName |
|
485 END_TEST_BLOCK !PanicCode=6 !PanicString=BTSocket |
|
486 |
|
487 END_TESTCASE BT-USER-BluetoothSynchronousLink-PublicApi-0013 |
|
488 |
|
489 |
|
490 DELAY 2000 |
|
491 |