First public contribution.
2 // Copyright (c) 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 the License "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".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
21 //! @SYMTestCaseID SEC-CAF-CONS-0001
22 //! @SYMTestCaseDesc Get an attribute for a content object within a file
24 //! @SYMTestStatus Implemented
25 //! @SYMTestPriority Normal
26 //! @SYMTestActions Get a single attribute for a content object within a file
27 //! @SYMTestExpectedResults Should return KErrNone
29 START_TESTCASE SEC-CAF-CONS-0001
30 RUN_TEST_STEP 100 tcaf CAFDataAttributeStep c:\tcaf\attributes.ini Attribute
31 END_TESTCASE SEC-CAF-CONS-0001
34 //! @SYMTestCaseID SEC-CAF-CONS-0002
35 //! @SYMTestCaseDesc Get a set of attributes for a content object within a file
37 //! @SYMTestStatus Implemented
38 //! @SYMTestPriority Normal
39 //! @SYMTestActions Get a set of attributes for a content object within a file
40 //! @SYMTestExpectedResults Should return KErrNone
42 START_TESTCASE SEC-CAF-CONS-0002
43 RUN_TEST_STEP 100 tcaf CAFDataAttributeSetStep c:\tcaf\attributes.ini AttributeSet
44 END_TESTCASE SEC-CAF-CONS-0002
47 //! @SYMTestCaseID SEC-CAF-CONS-0003
48 //! @SYMTestCaseDesc Get a string attribute for a content object within a file
50 //! @SYMTestStatus Implemented
51 //! @SYMTestPriority Normal
52 //! @SYMTestActions Get a single string attribute for a content object within a file
53 //! @SYMTestExpectedResults Should return KErrNone
55 START_TESTCASE SEC-CAF-CONS-0003
56 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeStep c:\tcaf\attributes.ini StringAttribute
57 END_TESTCASE SEC-CAF-CONS-0003
60 //! @SYMTestCaseID SEC-CAF-CONS-0004
61 //! @SYMTestCaseDesc Get a string attribute for a content object within a file
63 //! @SYMTestStatus Implemented
64 //! @SYMTestPriority Normal
65 //! @SYMTestActions Get a single string attribute for a content object within a file
66 //! @SYMTestExpectedResults Should return KErrCANotSupported
68 START_TESTCASE SEC-CAF-CONS-0004
69 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeStep c:\tcaf\attributes.ini StringAttributeECoverURI
70 END_TESTCASE SEC-CAF-CONS-0004
73 //! @SYMTestCaseID SEC-CAF-CONS-3443
74 //! @SYMTestCaseDesc Get a string attribute for a data object within a valid gif file
75 //! @SYMDEF PDEF104571
76 //! @SYMTestStatus Implemented
77 //! @SYMTestPriority Normal
78 //! @SYMTestActions Get a single string attribute for a data object within a valid gif file
79 //! @SYMTestExpectedResults A string attribute should successfully be returned
81 START_TESTCASE SEC-CAF-CONS-3443
82 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeStep c:\tcaf\attributes.ini StringAttributeGoodGif
83 END_TESTCASE SEC-CAF-CONS-3443
86 //! @SYMTestCaseID SEC-CAF-CONS-3444
87 //! @SYMTestCaseDesc Failure to return a string attribute for a data object within an invalid gif file
88 //! @SYMDEF PDEF104571
89 //! @SYMTestStatus Implemented
90 //! @SYMTestPriority Normal
91 //! @SYMTestActions Attempt to get a single string attribute for a data object within an invalid gif file
92 //! @SYMTestExpectedResults An error should be returned
94 START_TESTCASE SEC-CAF-CONS-3444
95 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeStep c:\tcaf\attributes.ini StringAttributeErrorGif
96 END_TESTCASE SEC-CAF-CONS-3444
99 //! @SYMTestCaseID SEC-CAF-CONS-0005
100 //! @SYMTestCaseDesc Get a set of string attributes for a content object within a file
102 //! @SYMTestStatus Implemented
103 //! @SYMTestPriority Normal
104 //! @SYMTestActions Get a set of string attributes for a content object within a file
105 //! @SYMTestExpectedResults Should return KErrNone
107 START_TESTCASE SEC-CAF-CONS-0005
108 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeSetStep c:\tcaf\attributes.ini StringAttributeSet
109 END_TESTCASE SEC-CAF-CONS-0005
112 //! @SYMTestCaseID SEC-CAF-CONS-3445
113 //! @SYMTestCaseDesc Get a set of string attributes for a data object within a valid gif file
114 //! @SYMDEF PDEF104571
115 //! @SYMTestStatus Implemented
116 //! @SYMTestPriority Normal
117 //! @SYMTestActions Get a set of string attributes for a data object within a valid gif file
118 //! @SYMTestExpectedResults A set of string attributes should successfully be returned
120 START_TESTCASE SEC-CAF-CONS-3445
121 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeSetStep c:\tcaf\attributes.ini StringAttributeSetGoodGif
122 END_TESTCASE SEC-CAF-CONS-3445
125 //! @SYMTestCaseID SEC-CAF-CONS-3446
126 //! @SYMTestCaseDesc Get a set of string attributes for a data object within an invalid gif file
127 //! @SYMDEF PDEF104571
128 //! @SYMTestStatus Implemented
129 //! @SYMTestPriority Normal
130 //! @SYMTestActions Get a set of string attributes for a data object within an invalid gif file
131 //! @SYMTestExpectedResults An error should be returned for the invalid gif file within the set
133 START_TESTCASE SEC-CAF-CONS-3446
134 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeSetStep c:\tcaf\attributes.ini StringAttributeSetErrorGif
135 END_TESTCASE SEC-CAF-CONS-3446
138 //! @SYMTestCaseID SEC-CAF-CONS-0006
139 //! @SYMTestCaseDesc Plaintext File Size
140 //! @SYMPREQ PREQ1951
141 //! @SYMTestStatus Implemented
142 //! @SYMTestPriority Critical
143 //! @SYMTestActions Checks that the size of the file reported by RFile is the same as the size reported by CAF (F32Agent). CAF opens the file using the given filename
144 //! @SYMTestExpectedResults Sizes are equal
146 START_TESTCASE SEC-CAF-CONS-0006
147 RUN_TEST_STEP 100 tcaf CAFSizeStep c:\tcaf\consumerstep.ini CompareContentF32Agent
148 END_TESTCASE SEC-CAF-CONS-0006
151 //! @SYMTestCaseID SEC-CAF-CONS-0007
152 //! @SYMTestCaseDesc Plaintext File Size
154 //! @SYMTestStatus Implemented
155 //! @SYMTestPriority Critical
156 //! @SYMTestActions Checks that the size of the file reported by RFile is the same as the size reported by CAF (F32Agent). CAF opens the file using the given filename, split the construction and evaluation of CData
157 //! @SYMTestExpectedResults Sizes are equal
159 START_TESTCASE SEC-CAF-CONS-0007
160 RUN_TEST_STEP 100 tcaf CAFSizeStep c:\tcaf\consumerstep.ini CompareContentF32AgentWithoutIntent
161 END_TESTCASE SEC-CAF-CONS-0007
164 //! @SYMTestCaseID SEC-CAF-CONS-0008
165 //! @SYMTestCaseDesc Plaintext File Read and Seek
166 //! @SYMPREQ PREQ1951
167 //! @SYMTestStatus Implemented
168 //! @SYMTestPriority Critical
169 //! @SYMTestActions Checks that the data read from an RFile is the same as the data read from CAF (F32Agent). Caf opens the file using the given filename.
170 //! @SYMTestExpectedResults Data read is the same for both
172 START_TESTCASE SEC-CAF-CONS-0008
173 RUN_TEST_STEP 100 tcaf CAFSeekReadStep c:\tcaf\consumerstep.ini CompareContentF32Agent
174 END_TESTCASE SEC-CAF-CONS-0008
177 //! @SYMTestCaseID SEC-CAF-CONS-0009
178 //! @SYMTestCaseDesc Plaintext File Handle Size
180 //! @SYMTestStatus Implemented
181 //! @SYMTestPriority Critical
182 //! @SYMTestActions Checks that the size of the file reported by RFile is the same as the size reported by CAF (F32Agent). CAF is supplied with a handle to the open file.
183 //! @SYMTestExpectedResults Sizes are equal
185 START_TESTCASE SEC-CAF-CONS-0009
186 RUN_TEST_STEP 100 tcaf CAFHandleSizeStep c:\tcaf\consumerstep.ini CompareContentF32Agent
187 END_TESTCASE SEC-CAF-CONS-0009
191 //! @SYMTestCaseID SEC-CAF-CONS-0010
192 //! @SYMTestCaseDesc Plaintext File Handle Read and Seek
194 //! @SYMTestStatus Implemented
195 //! @SYMTestPriority Critical
196 //! @SYMTestActions Checks that the data read from an RFile is the same as the data read from CAF (F32Agent). Caf is supplied with a handle to an open file.
197 //! @SYMTestExpectedResults Data read is the same for both
199 START_TESTCASE SEC-CAF-CONS-0010
200 RUN_TEST_STEP 100 tcaf CAFHandleSeekReadStep c:\tcaf\consumerstep.ini CompareContentF32Agent
201 END_TESTCASE SEC-CAF-CONS-0010
204 //! @SYMTestCaseID SEC-CAF-CONS-0011
205 //! @SYMTestCaseDesc DRM File Size
206 //! @SYMPREQ PREQ1951
207 //! @SYMTestStatus Implemented
208 //! @SYMTestPriority Critical
209 //! @SYMTestActions Checks that the size of a plaintext file reported by RFile is the same as the size of the content within a DRM file reported by CAF (TestAgent). CAF opens the file using the given filename
210 //! @SYMTestExpectedResults Sizes are equal
212 START_TESTCASE SEC-CAF-CONS-0011
213 RUN_TEST_STEP 100 tcaf CAFSizeStep c:\tcaf\consumerstep.ini CompareContentTestAgent
214 END_TESTCASE SEC-CAF-CONS-0011
217 //! @SYMTestCaseID SEC-CAF-CONS-0012
218 //! @SYMTestCaseDesc DRM File Read and Seek
219 //! @SYMPREQ PREQ1951
220 //! @SYMTestStatus Implemented
221 //! @SYMTestPriority Critical
222 //! @SYMTestActions Checks that data read from a plaintext file by RFile is the same as data read from the content within a DRM file by CAF (TestAgent). CAF opens the file using the given filename
223 //! @SYMTestExpectedResults data read is the same for both
225 START_TESTCASE SEC-CAF-CONS-0012
226 RUN_TEST_STEP 100 tcaf CAFSeekReadStep c:\tcaf\consumerstep.ini CompareContentTestAgent
227 END_TESTCASE SEC-CAF-CONS-0012
230 //! @SYMTestCaseID SEC-CAF-CONS-0013
231 //! @SYMTestCaseDesc DRM File Size with file handle
233 //! @SYMTestStatus Implemented
234 //! @SYMTestPriority Critical
235 //! @SYMTestActions Checks that the size of a plaintext file reported by RFile is the same as the size of the content within a DRM file reported by CAF (TestAgent). CAF opens is passed an open file handle
236 //! @SYMTestExpectedResults Sizes are equal
238 START_TESTCASE SEC-CAF-CONS-0013
239 RUN_TEST_STEP 100 tcaf CAFHandleSizeStep c:\tcaf\consumerstep.ini CompareContentTestAgent
240 END_TESTCASE SEC-CAF-CONS-0013
243 //! @SYMTestCaseID SEC-CAF-CONS-0014
244 //! @SYMTestCaseDesc DRM File Read and Seek with file handle
246 //! @SYMTestStatus Implemented
247 //! @SYMTestPriority Critical
248 //! @SYMTestActions Checks that data read from a plaintext file by RFile is the same as data read from the content within a DRM file by CAF (TestAgent). CAF is passed an open file handle
249 //! @SYMTestExpectedResults Data read is the same for both
251 START_TESTCASE SEC-CAF-CONS-0014
252 RUN_TEST_STEP 100 tcaf CAFHandleSeekReadStep c:\tcaf\consumerstep.ini CompareContentTestAgent
253 END_TESTCASE SEC-CAF-CONS-0014
256 //! @SYMTestCaseID SEC-CAF-CONS-0015
257 //! @SYMTestCaseDesc Compare the size of the entire file opened with TestAgent vs RFile entire file
259 //! @SYMTestStatus Implemented
260 //! @SYMTestPriority Critical
261 //! @SYMTestActions Checks that the size of the file reported by RFile is the same as the size reported by CAF (F32Agent). Caf opens the file using a concatenated URI and UniqueId
262 //! @SYMTestExpectedResults Sizes are equal
264 START_TESTCASE SEC-CAF-CONS-0015
265 RUN_TEST_STEP 100 tcaf CAFSizeStep c:\tcaf\consumerstep.ini CompareContentCombinedURI
266 END_TESTCASE SEC-CAF-CONS-0015
269 //! @SYMTestCaseID SEC-CAF-CONS-0016
270 //! @SYMTestCaseDesc Read and Seek through the entire file opened with TestAgent vs RFile entire file
272 //! @SYMTestStatus Implemented
273 //! @SYMTestPriority Critical
274 //! @SYMTestActions Checks that the data read from an RFile is the same as the data read from CAF (TestAgent). Caf opens the file using a concatenated URI and UniqueId
275 //! @SYMTestExpectedResults Data read is the same for both
277 START_TESTCASE SEC-CAF-CONS-0016
278 RUN_TEST_STEP 100 tcaf CAFSeekReadStep c:\tcaf\consumerstep.ini CompareContentCombinedURI
279 END_TESTCASE SEC-CAF-CONS-0016
282 //! @SYMTestCaseID SEC-CAF-CONS-0017
283 //! @SYMTestCaseDesc Plaintext multithread read
284 //! @SYMPREQ PREQ1951
285 //! @SYMTestStatus Implemented
286 //! @SYMTestPriority Critical
287 //! @SYMTestActions Checks that a CAF session can be shared between multiple threads
288 //! @SYMTestExpectedResults Data read sucessfully
290 START_TESTCASE SEC-CAF-CONS-0017
291 RUN_TEST_STEP 100 tcaf CAFMultiThreadCDataStep c:\tcaf\consumerstep.ini F32AgentThreadSharing
292 END_TESTCASE SEC-CAF-CONS-0017
295 //! @SYMTestCaseID SEC-CAF-CONS-0018
296 //! @SYMTestCaseDesc Plaintext multithread read from handle
298 //! @SYMTestStatus Implemented
299 //! @SYMTestPriority Critical
300 //! @SYMTestActions Checks that a CAF session can be shared between multiple threads, open file handle is supplied to CAF
301 //! @SYMTestExpectedResults Data read sucessfully
303 START_TESTCASE SEC-CAF-CONS-0018
304 RUN_TEST_STEP 100 tcaf CAFHandleMultiThreadCDataStep c:\tcaf\consumerstep.ini F32AgentThreadSharing
305 END_TESTCASE SEC-CAF-CONS-0018
308 //! @SYMTestCaseID SEC-CAF-CONS-0019
309 //! @SYMTestCaseDesc DRM multithread read
310 //! @SYMPREQ PREQ1951
311 //! @SYMTestStatus Implemented
312 //! @SYMTestPriority Critical
313 //! @SYMTestActions Checks that a CAF session can be shared between multiple threads
314 //! @SYMTestExpectedResults Data read sucessfully
316 START_TESTCASE SEC-CAF-CONS-0019
317 RUN_TEST_STEP 100 tcaf CAFMultiThreadCDataStep c:\tcaf\consumerstep.ini TestAgentThreadSharing
318 END_TESTCASE SEC-CAF-CONS-0019
321 //! @SYMTestCaseID SEC-CAF-CONS-0020
322 //! @SYMTestCaseDesc DRM multithread read
324 //! @SYMTestStatus Implemented
325 //! @SYMTestPriority Critical
326 //! @SYMTestActions Checks that a CAF session can be shared between multiple threads, open file handle is supplied to CAF
327 //! @SYMTestExpectedResults Data read sucessfully
329 START_TESTCASE SEC-CAF-CONS-0020
330 RUN_TEST_STEP 100 tcaf CAFHandleMultiThreadCDataStep c:\tcaf\consumerstep.ini TestAgentThreadSharing
331 END_TESTCASE SEC-CAF-CONS-0020
334 //! @SYMTestCaseID SEC-CAF-CONS-0021
335 //! @SYMTestCaseDesc Plaintext mime type
336 //! @SYMPREQ PREQ1951
337 //! @SYMTestStatus Implemented
338 //! @SYMTestPriority Critical
339 //! @SYMTestActions Asks CAF for the mime type of a file handled by F32Agent
340 //! @SYMTestExpectedResults F32Agent uses Apparc to find out the mime type
342 START_TESTCASE SEC-CAF-CONS-0021
343 RUN_TEST_STEP 100 tcaf CAFMimeTypeCDataStep c:\tcaf\consumerstep.ini UnprotectedContentMimeType
344 END_TESTCASE SEC-CAF-CONS-0021
347 //! @SYMTestCaseID SEC-CAF-CONS-0022
348 //! @SYMTestCaseDesc DRM mime type
349 //! @SYMPREQ PREQ1951
350 //! @SYMTestStatus Implemented
351 //! @SYMTestPriority Critical
352 //! @SYMTestActions Asks CAF for the mime type of a file handled by TestAgent
353 //! @SYMTestExpectedResults TestAgent returns the mimetype of the content
355 START_TESTCASE SEC-CAF-CONS-0022
356 RUN_TEST_STEP 100 tcaf CAFMimeTypeCDataStep c:\tcaf\consumerstep.ini ProtectedContentMimeType
357 END_TESTCASE SEC-CAF-CONS-0022
360 //! @SYMTestCaseID SEC-CAF-CONS-0023
361 //! @SYMTestCaseDesc DRM ShareMode
362 //! @SYMPREQ PREQ1951
363 //! @SYMTestStatus Implemented
364 //! @SYMTestPriority Critical
365 //! @SYMTestActions Opens a DRM file using all share modes
366 //! @SYMTestExpectedResults TestAgent sucessfully opens the file using all share modes
368 START_TESTCASE SEC-CAF-CONS-0023
369 RUN_UTILS MAKEREADWRITE C:\TCAF\testdata\TEST.DRM
370 RUN_TEST_STEP 100 tcaf CAFShareModeStep c:\tcaf\consumerstep.ini TestAgentShareMode
371 END_TESTCASE SEC-CAF-CONS-0023
374 //! @SYMTestCaseID SEC-CAF-CONS-0024
375 //! @SYMTestCaseDesc Plaintext ShareMode
376 //! @SYMPREQ PREQ1951
377 //! @SYMTestStatus Implemented
378 //! @SYMTestPriority Critical
379 //! @SYMTestActions Opens a plaintext file using all share modes
380 //! @SYMTestExpectedResults F32Agent sucessfully opens the file using all share modes
382 START_TESTCASE SEC-CAF-CONS-0024
383 RUN_UTILS MAKEREADWRITE C:\tcaf\testdata\dummydata.txt
384 RUN_TEST_STEP 100 tcaf CAFShareModeStep c:\tcaf\consumerstep.ini F32AgentShareMode
385 END_TESTCASE SEC-CAF-CONS-0024
388 //! @SYMTestCaseID SEC-CAF-CONS-0025
389 //! @SYMTestCaseDesc Checks that implemented attributes are returned correctly
391 //! @SYMTestStatus Implemented
392 //! @SYMTestPriority Critical
393 //! @SYMTestActions Requests EIsMediaPlayerOnly for an unprotected file
394 //! @SYMTestExpectedResults EFalse is returned
396 START_TESTCASE SEC-CAF-CONS-0025
397 RUN_TEST_STEP 100 tcaf CAFDataAttributeStep c:\tcaf\attributes.ini IsMediaPlayerOnlyAttribute
398 END_TESTCASE SEC-CAF-CONS-0025
401 //! @SYMTestCaseID SEC-CAF-CONS-0026
402 //! @SYMTestCaseDesc Checks that implemented attributes are returned correctly
404 //! @SYMTestStatus Implemented
405 //! @SYMTestPriority Critical
406 //! @SYMTestActions Requests EIsAutomated for an unprotected file
407 //! @SYMTestExpectedResults EFalse is returned
409 START_TESTCASE SEC-CAF-CONS-0026
410 RUN_TEST_STEP 100 tcaf CAFDataAttributeStep c:\tcaf\attributes.ini IsAutomatedOnlyAttribute
411 END_TESTCASE SEC-CAF-CONS-0026
414 //! @SYMTestCaseID SEC-CAF-CONS-0027
415 //! @SYMTestCaseDesc Checks that for non-implemented attributes a correct error code is returned
417 //! @SYMTestStatus Implemented
418 //! @SYMTestPriority Critical
419 //! @SYMTestActions Requests EObjectNumber for an unprotected file
420 //! @SYMTestExpectedResults KErrCaNotSupported is returned
422 START_TESTCASE SEC-CAF-CONS-0027
423 RUN_TEST_STEP !Result=-17450 100 tcaf CAFDataAttributeStep c:\tcaf\attributes.ini TrackNumberAttribute
424 END_TESTCASE SEC-CAF-CONS-0027
427 //! @SYMTestCaseID SEC-CAF-CONS-0028
428 //! @SYMTestCaseDesc Checks that for non-implemented attributes a correct error code is returned
430 //! @SYMTestStatus Implemented
431 //! @SYMTestPriority Critical
432 //! @SYMTestActions Requests EGenre for an unprotected file
433 //! @SYMTestExpectedResults KErrCaNotSupported is returned
435 START_TESTCASE SEC-CAF-CONS-0028
436 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeStep c:\tcaf\attributes.ini GenreStringAttribute
437 END_TESTCASE SEC-CAF-CONS-0028
440 //! @SYMTestCaseID SEC-CAF-CONS-0029
441 //! @SYMTestCaseDesc Checks that for non-implemented attributes a correct error code is returned
443 //! @SYMTestStatus Implemented
444 //! @SYMTestPriority Critical
445 //! @SYMTestActions Requests EUserRating for an unprotected file
446 //! @SYMTestExpectedResults KErrCaNotSupported is returned
448 START_TESTCASE SEC-CAF-CONS-0029
449 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeStep c:\tcaf\attributes.ini UserRatingStringAttribute
450 END_TESTCASE SEC-CAF-CONS-0029
453 //! @SYMTestCaseID SEC-CAF-CONS-0030
454 //! @SYMTestCaseDesc Checks that for non-implemented attributes a correct error code is returned
456 //! @SYMTestStatus Implemented
457 //! @SYMTestPriority Critical
458 //! @SYMTestActions Requests EAuthoredDate for an unprotected file
459 //! @SYMTestExpectedResults KErrCaNotSupported is returned
461 START_TESTCASE SEC-CAF-CONS-0030
462 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeStep c:\tcaf\attributes.ini AuthoredDateStringAttribute
463 END_TESTCASE SEC-CAF-CONS-0030