Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // 3GP library parser OOM Unit Testing script
15 // testexecute.exe [path]\[this script name]. 3GP library and necessary test files should be present.
16 // It requires no exceptional network support.
21 //! @SYMTestSuiteName tsu_3gp_parse_oom
22 //! @SYMScriptTestEnvironment This test runs using Symbian test execution with the following test list entry:
23 //! @SYMScriptInfo All tests contained in this suite are duplicates of OOM-applicable test cases from test suite tsu_3gp_parse_api (tsu_3gp_parse_api_te.script). This allows the test suite tsu_3gp_parse_api to focus solely on functional testing.
26 PRINT Run all the 3GP library parser api Unit
29 LOAD_SUITE tsu_3gplibrary
33 START_TESTCASE MM-3GP-PARSE-U-0301-CP
34 //! @SYMTestCaseID MM-3GP-PARSE-U-0301-CP
36 //! @SYMTestCaseDesc Create 3GP Parser to read zero size file content and call all APIs.
37 //! Pre-Condition A zero size file must be present
38 //! @SYMTestPriority High
39 //! @SYMTestActions Create 3GP Parser to read zero size file content, read file again
40 when it is in used and call all APIs.
41 //! @SYMTestExpectedResults All calls to retrieve video clip properties, video and/or audio
42 source & properties should fail with KErrCorrupt. Calling parser open when it is in used, should fail with KErrInUse.
43 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0101-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-EMPTY
44 END_TESTCASE MM-3GP-PARSE-U-0301-CP
46 START_TESTCASE MM-3GP-PARSE-U-0302-CP
47 //! @SYMTestCaseID MM-3GP-PARSE-U-0302-CP
49 //! @SYMTestCaseDesc Initialise a 3GP file parse with an empty filename and file path pointing at non-existent files.
50 //! @SYMTestPriority High
51 //! @SYMTestActions Initialise a 3GP file parse with an empty filename and file path pointing at non-existent files.
52 //! @SYMTestExpectedResults Setup fails with error KErrUnderflow with an empty file name, KErrAccessDenied when
53 file path pointing at non-existent files.
54 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0102-CP
55 END_TESTCASE MM-3GP-PARSE-U-0302-CP
57 START_TESTCASE MM-3GP-PARSE-U-0304-CP
58 //! @SYMTestCaseID MM-3GP-PARSE-U-0304-CP
60 //! @SYMTestCaseDesc Create parser by passing in a file path of a file already opened in EFileShareExclusive mode.
61 //! Pre-Condition Any file.
62 //! @SYMTestPriority High
63 //! @SYMTestActions Create parser by passing in a file path of a file already opened in EFileShareExclusive mode.
64 //! @SYMTestExpectedResults Setup fails with KErrAccessDenied.
65 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0104-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-H264-MP4
66 END_TESTCASE MM-3GP-PARSE-U-0304-CP
68 START_TESTCASE MM-3GP-PARSE-U-0306-CP
69 //! @SYMTestCaseID MM-3GP-PARSE-U-0306-CP
71 //! @SYMTestCaseDesc Use 3GP Parser to parse file before it has been setup.
72 //! Pre-Condition Any file.
73 //! @SYMTestPriority High
74 //! @SYMTestActions Instantiate a 3GP Parser and call all the Parser API except Close & Open
75 //! @SYMTestExpectedResults Test fails with KErrNotReady.
76 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0106-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-H264-MP4
77 END_TESTCASE MM-3GP-PARSE-U-0306-CP
79 START_TESTCASE MM-3GP-PARSE-U-0307-CP
80 //! @SYMTestCaseID MM-3GP-PARSE-U-0307-CP
82 //! @SYMTestCaseDesc Use invalid frame type for all frame type API.
83 //! Pre-Condition A valid mp4/3gp file with supported audio and video stream must be present
84 //! @SYMTestPriority High
85 //! @SYMTestActions Instantiate a 3GP Parser and Call all Parser API that get frame type.
86 //! @SYMTestExpectedResults Test with no error.
87 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0107-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-VIDEO-MORE
88 END_TESTCASE MM-3GP-PARSE-U-0307-CP
90 START_TESTCASE MM-3GP-PARSE-U-0308-CP
91 //! @SYMTestCaseID MM-3GP-PARSE-U-0308-CP
93 //! @SYMTestCaseDesc Use invalid frame index for video frame APIs and Get video frame properties for more
94 than the total number of video frames in the video clip
95 //! Pre-Condition A valid mp4/3gp file with supported video/audio stream must be present
96 //! @SYMTestPriority High
97 //! @SYMTestActions Use invalid frame index for video frame APIs and Get video frame properties for more
98 than the total number of video frames in the video clip
99 //! @SYMTestExpectedResults All APIs returns with KErrGeneral.
100 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0108-CP c:\mm\tsu_3gp_parse_api_te.ini MP4-VIDEO-ONLY-KEYFRAME
101 END_TESTCASE MM-3GP-PARSE-U-0308-CP
103 START_TESTCASE MM-3GP-PARSE-U-0311-CP
104 //! @SYMTestCaseID MM-3GP-PARSE-U-0311-CP
106 //! @SYMTestCaseDesc Retrieve video related information in an audio-only mp4/3gp file.
107 //! Pre-Condition A valid mp4/3gp file with only supported audio stream must be present
108 //! @SYMTestPriority High
109 //! @SYMTestActions Retrieve video related information in an audio-only mp4/3gp file.
110 //! @SYMTestExpectedResults Test Step 1 should fail with KErrNotSupported. Test Step 2 completes with no error.
111 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0111-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-AUDIO-ONLY
112 RUN_TEST_STEP !OOM -1 tsu_3gplibrary 3GPSingleDataSourceTest c:\mm\tsu_3gp_parse_api_te.ini MM-3GP-PARSE-U-0111-CP-2
113 END_TESTCASE MM-3GP-PARSE-U-0311-CP
115 START_TESTCASE MM-3GP-PARSE-U-0312-CP
116 //! @SYMTestCaseID MM-3GP-PARSE-U-0312-CP
118 //! @SYMTestCaseDesc Retrieve audio related information in a video-only mp4/3gp file.
119 //! Pre-Condition A valid mp4/3gp file with only supported video stream must be present
120 //! @SYMTestPriority High
121 //! @SYMTestActions Retrieve audio related information in a video-only mp4/3gp file.
122 //! @SYMTestExpectedResults Test Step 1 should fail with KErrNotSupported. Test Step 2 completes with no error.
123 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0111-CP c:\mm\tsu_3gp_parse_api_te.ini MP4-VIDEO-ONLY
124 RUN_TEST_STEP !OOM -1 tsu_3gplibrary 3GPSingleDataSourceTest c:\mm\tsu_3gp_parse_api_te.ini MM-3GP-PARSE-U-0112-CP-2
125 END_TESTCASE MM-3GP-PARSE-U-0312-CP
127 START_TESTCASE MM-3GP-PARSE-U-0313-CP
128 //! @SYMTestCaseID MM-3GP-PARSE-U-0313-CP
130 //! @SYMTestCaseDesc Call all parser API in a mp4/3gp file with no audio nor video.
131 //! Pre-Condition A valid mp4/3gp file with no audio nor video must be present
132 //! @SYMTestPriority High
133 //! @SYMTestActions Call all parser API in a mp4/3gp file with no audio nor video.
134 //! @SYMTestExpectedResults Test fails with KErrNotSupported for all audio and video related API, KErrGeneral for others.
135 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0111-CP c:\mm\tsu_3gp_parse_api_te.ini MP4-NO-A-V
136 END_TESTCASE MM-3GP-PARSE-U-0313-CP
138 START_TESTCASE MM-3GP-PARSE-U-0315-CP
139 //! @SYMTestCaseID MM-3GP-PARSE-U-0315-CP
141 //! @SYMTestCaseDesc Parse file of unsupported file format (WMA) and attempt to retrieve audio/video information.
142 //! Pre-Condition A valid WMA must be present
143 //! @SYMTestPriority High
144 //! @SYMTestActions Retrieve audio and video attributes.
145 //! @SYMTestExpectedResults test fails with KErrCorrupt.
146 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0111-CP c:\mm\tsu_3gp_parse_api_te.ini WMA
147 END_TESTCASE MM-3GP-PARSE-U-0315-CP
149 START_TESTCASE MM-3GP-PARSE-U-0316-CP
150 //! @SYMTestCaseID MM-3GP-PARSE-U-0316-CP
152 //! @SYMTestCaseDesc Parse file of supported file format and unsupported video stream.
153 //! Pre-Condition A file of supported file format and unsupported video stream must be present
154 //! @SYMTestPriority High
155 //! @SYMTestActions Retrieve video attributes.
156 //! @SYMTestExpectedResults Test fails with KErrNotSupported.
157 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0111-CP c:\mm\tsu_3gp_parse_api_te.ini UNSUPPORTED-VIDEO
158 END_TESTCASE MM-3GP-PARSE-U-0316-CP
160 START_TESTCASE MM-3GP-PARSE-U-0317-CP
161 //! @SYMTestCaseID MM-3GP-PARSE-U-0317-CP
163 //! @SYMTestCaseDesc Parse file of supported file format and unsupported audio stream
164 //! Pre-Condition A file of supported file format and unsupported audio stream must be present
165 //! @SYMTestPriority High
166 //! @SYMTestActions Retrieve audio attributes.
167 //! @SYMTestExpectedResults Test fails with KErrNotSupported.
168 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0111-CP c:\mm\tsu_3gp_parse_api_te.ini UNSUPORTED-AUDIO-STREAM
169 END_TESTCASE MM-3GP-PARSE-U-0317-CP
171 START_TESTCASE MM-3GP-PARSE-U-0318-CP
172 //! @SYMTestCaseID MM-3GP-PARSE-U-0318-CP
174 //! @SYMTestCaseDesc Parse file.
175 //! Pre-Condition A file of supported file format and audio/video streams but with mis-matching file extension must be present
176 //! @SYMTestPriority High
177 //! @SYMTestActions Parse file.
178 //! @SYMTestExpectedResults Test with no error.
179 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0111-CP c:\mm\tsu_3gp_parse_api_te.ini MISMATCHED
180 END_TESTCASE MM-3GP-PARSE-U-0318-CP
182 START_TESTCASE MM-3GP-PARSE-U-0319-CP
183 //! @SYMTestCaseID MM-3GP-PARSE-U-0319-CP
185 //! @SYMTestCaseDesc Seek position of a file with no audio nor video.
186 //! Pre-Condition A file with no audio nor video must be present
187 //! @SYMTestPriority High
188 //! @SYMTestActions Seek position of a file with no audio nor video.
189 //! @SYMTestExpectedResults Test fails with KErrGeneral.
190 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0119-CP c:\mm\tsu_3gp_parse_api_te.ini MP4-NO-A-V
191 END_TESTCASE MM-3GP-PARSE-U-0319-CP
193 START_TESTCASE MM-3GP-PARSE-U-0320-CP
194 //! @SYMTestCaseID MM-3GP-PARSE-U-0320-CP
196 //! @SYMTestCaseDesc Read Video Decoder Info.
197 //! Pre-Condition A valid mp4/3gp/3g2 file containing H263 video must be present
198 //! @SYMTestPriority High
199 //! @SYMTestActions Read Video Decoder Info.
200 //! @SYMTestExpectedResults Expect Read Video Decoder Info fails with KErrNotSupported.
201 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0120-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-H263-ARMNB
202 END_TESTCASE MM-3GP-PARSE-U-0320-CP
204 START_TESTCASE MM-3GP-PARSE-U-0322-CP
205 //! @SYMTestCaseID MM-3GP-PARSE-U-0322-CP
207 //! @SYMTestCaseDesc Retrieve user atoms
208 //! Pre-Condition A valid mp4/3gp file containing user atoms only in location movie must be present/ no user atom
209 //! @SYMTestPriority High
210 //! @SYMTestActions Retrieve user atoms
211 //! @SYMTestExpectedResults Test fails with KErrNotFound.
212 RUN_TEST_STEP !OOM !Error=-1 -1 tsu_3gplibrary MM-3GP-PARSE-U-0036-CP c:\mm\tsu_3gp_parse_api_te.ini MP4-USER-ATOM
213 RUN_TEST_STEP !OOM !Error=-1 -1 tsu_3gplibrary MM-3GP-PARSE-U-0036-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-MP4-MP4
214 END_TESTCASE MM-3GP-PARSE-U-0322-CP
216 START_TESTCASE MM-3GP-PARSE-U-0324-CP
217 //! @SYMTestCaseID MM-3GP-PARSE-U-0324-CP
219 //! @SYMTestCaseDesc Seek to an invalid position of the file.
220 //! Pre-Condition A valid mp4/3gp/3g2 file with both audio and video must be present
221 //! @SYMTestPriority High
222 //! @SYMTestActions Seek to an invalid position of the file.
223 //! @SYMTestExpectedResults Test with no error.
224 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0119-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-H263-ARMNB
225 END_TESTCASE MM-3GP-PARSE-U-0324-CP
227 START_TESTCASE MM-3GP-PARSE-U-0325-CP
228 //! @SYMTestCaseID MM-3GP-PARSE-U-0325-CP
230 //! @SYMTestCaseDesc Seek to an invalid position of the file.
231 //! Pre-Condition A valid mp4/3gp/3g2 file with audio or video only must be present
232 //! @SYMTestPriority High
233 //! @SYMTestActions Seek to an invalid position of the file.
234 //! @SYMTestExpectedResults Test with no error.
235 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0119-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-AUDIO-ONLY
236 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0119-CP c:\mm\tsu_3gp_parse_api_te.ini MP4-VIDEO-ONLY
237 END_TESTCASE MM-3GP-PARSE-U-0325-CP
239 START_TESTCASE MM-3GP-PARSE-U-0327-CP
240 //! @SYMTestCaseID MM-3GP-PARSE-U-0327-CP
242 //! @SYMTestCaseDesc Retrieve video and audio info using empty buffer for all buffer related API.
243 //! Pre-Condition A valid mp4/3gp/3g2 file with audio or video must be present
244 //! @SYMTestPriority High
245 //! @SYMTestActions Retrieve video and audio info using empty buffer for all buffer related API.
246 //! @SYMTestExpectedResults Test fails with KErrOverflow except InsertData fails with KErrUnderflow.
247 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0127-CP c:\mm\tsu_3gp_parse_api_te.ini USER-ATOM-ALL
248 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0127-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-AUDIO-MORE
249 END_TESTCASE MM-3GP-PARSE-U-0327-CP
251 START_TESTCASE MM-3GP-PARSE-U-0329-CP
252 //! @SYMTestCaseID MM-3GP-PARSE-U-0329-CP
254 //! @SYMTestCaseDesc Get H263 video leve
255 //! Pre-Condition A valid mp4/3gp file without H263 video source/an invalid file must be present
256 //! @SYMTestPriority High
257 //! @SYMTestActions Get H263 video leve in file path and buffer mode.
258 //! @SYMTestExpectedResults test failed with KErrNotSupported.
259 RUN_TEST_STEP !OOM !Error=-5 -1 tsu_3gplibrary MM-3GP-PARSE-U-0021-CP c:\mm\tsu_3gp_parse_api_te.ini UNSUPPORTED-VIDEO
260 RUN_TEST_STEP !OOM !Error=-5 -1 tsu_3gplibrary MM-3GP-PARSE-U-0021-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-H264-MP4
261 END_TESTCASE MM-3GP-PARSE-U-0329-CP
263 START_TESTCASE MM-3GP-PARSE-U-0330-CP
264 //! @SYMTestCaseID MM-3GP-PARSE-U-0330-CP
266 //! @SYMTestCaseDesc Async read before the parser has been setup.
267 //! Pre-Condition A valid mp4/3gp/3g2 file must be present
268 //! @SYMTestPriority High
269 //! @SYMTestActions Without open parser, do Async read for both audio and video. Should fail with KErrNotReady.
270 //! @SYMTestExpectedResults Test fails with expected results.
271 RUN_TEST_STEP !OOM -1 tsu_3gplibrary MM-3GP-PARSE-U-0130-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-EMPTY
272 END_TESTCASE MM-3GP-PARSE-U-0330-CP
274 START_TESTCASE MM-3GP-PARSE-U-0331-CP
275 //! @SYMTestCaseID MM-3GP-PARSE-U-0331-CP
277 //! @SYMTestCaseDesc Async read negative test after the parser has been setup.
278 //! Pre-Condition N/A
279 //! @SYMTestPriority High
280 //! @SYMTestActions Open parser with an empty file and do Async read for both audio and video, both of them
281 should fail with KErrCorrupt; Open parser with an valid 3gp file without audio nor video, do Async read for both
282 audio and video, both of them should fail with KErrNotSupported; open parser with an audio only file, and do Async video
283 read or Open parser with a video only file, and do Async audio read , Should fail with KErrNotSupported.
284 //! @SYMTestExpectedResults Test fails with expected results.
285 RUN_TEST_STEP !OOM !Error=-20 -1 tsu_3gplibrary MM-3GP-PARSE-U-0131-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-EMPTY
286 RUN_TEST_STEP !OOM !Error=-5 -1 tsu_3gplibrary MM-3GP-PARSE-U-0131-CP c:\mm\tsu_3gp_parse_api_te.ini MP4-NO-A-V
287 RUN_TEST_STEP !OOM !Error=-5 -1 tsu_3gplibrary MM-3GP-PARSE-U-0131-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-AUDIO-ONLY
288 RUN_TEST_STEP !OOM !Error=-5 -1 tsu_3gplibrary MM-3GP-PARSE-U-0131-CP c:\mm\tsu_3gp_parse_api_te.ini MP4-VIDEO-ONLY
289 END_TESTCASE MM-3GP-PARSE-U-0331-CP
291 START_TESTCASE MM-3GP-PARSE-U-0332-CP
292 //! @SYMTestCaseID MM-3GP-PARSE-U-0332-CP
294 //! @SYMTestCaseDesc Get the QCELP storage mode when the file is not of QCELP info
295 //! Pre-Condition A valid mp4/3gp file without containing QCELP encoded audio stored must be present
296 //! @SYMTestPriority High
297 //! @SYMTestActions Get the QCELP storage mode in file and buffer mode.
298 //! @SYMTestExpectedResults The QCELP storage mode retrieved returns KErrNotSupported
299 RUN_TEST_STEP !OOM !Error=-5 -1 tsu_3gplibrary MM-3GP-PARSE-U-0017-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-H263-ARMNB
300 END_TESTCASE MM-3GP-PARSE-U-0332-CP
302 START_TESTCASE MM-3GP-PARSE-U-0335-CP
303 //! @SYMTestCaseID MM-3GP-PARSE-U-0335-CP
305 //! @SYMTestCaseDesc Get frame type
306 //! Pre-Condition Different files which contain audio or video or both must be present
307 //! @SYMTestPriority High
308 //! @SYMTestActions Get frame type when the frames have been read in file path.
309 //! @SYMTestExpectedResults Test fails with KErrNotFound.
310 RUN_TEST_STEP !OOM !Error=-1 -1 tsu_3gplibrary MM-3GP-PARSE-U-0135-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-AUDIO-ONLY
311 RUN_TEST_STEP !OOM !Error=-1 -1 tsu_3gplibrary MM-3GP-PARSE-U-0135-CP c:\mm\tsu_3gp_parse_api_te.ini MP4-VIDEO-ONLY
312 RUN_TEST_STEP !OOM !Error=-1 -1 tsu_3gplibrary MM-3GP-PARSE-U-0135-CP c:\mm\tsu_3gp_parse_api_te.ini 3GP-MP4-MP4
313 END_TESTCASE MM-3GP-PARSE-U-0335-CP
315 START_TESTCASE MM-3GP-PARSE-U-0336-CP
316 //! @SYMTestCaseID MM-3GP-PARSE-U-0336-CP
318 //! @SYMTestCaseDesc Async read of video / audio frame when the parser is in buffer mode.
319 //! Pre-Condition File with audio & video.
320 //! @SYMTestPriority High
321 //! @SYMTestActions 1. Setup a 3GP Parser object in buffer mode supplied with a 3GP/MP4/3G2 file with both audio & video.
322 //! 2. Attempt to read a video frame asynchronously.
323 //! 3. Attempt to read a audio frame asynchronously.
324 //! @SYMTestExpectedResults Both async read attempt should fail with KErrNotSupported.
325 RUN_TEST_STEP !OOM !Error=-21 -1 tsu_3gplibrary MM-3GP-PARSE-U-0136-CP c:\mm\tsu_3gp_parse_api_te.ini MM-3GP-PARSE-U-0136-CP
326 END_TESTCASE MM-3GP-PARSE-U-0336-CP
328 // End of negative tests