mmplugins/lib3gpunittest/scripts/tsu_3gp_compose_api_te.script
author hgs
Thu, 16 Sep 2010 18:57:38 +0100
changeset 58 b6dbf97aba93
parent 0 40261b775718
child 49 735348f59235
permissions -rw-r--r--
2010wk36_01

// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
// Unit tests for 3GP Library.
// 
//

//! @file
//! @SYMTestSuiteName tsu_3gp_compose_api
//! @SYMScriptTestEnvironment 3GP library and necessary test files should be present

LOAD_SUITE tsu_3gplibrary

RUN_UTILS DeleteDirectory C:\3gplibrary\temp\composer\
RUN_UTILS MKDir C:\3gplibrary\temp\
RUN_UTILS MKDir C:\3gplibrary\temp\composer\

START_TESTCASE MM-3GP-COMP-U-0002-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0002-CP
//! @SYMTestCaseDesc 	Create composer to write to non-existing & existing files via file path.
//!						Note that OOM test is not being done on this test as PIPS team suggest it cannot be applied.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Create composer to write to a non-existing file.  
//!               		2. Close the composer to commit the changes.
//!						3. Create composer to write to the same file via file path.
//!						4. Close the composer to commit the changes.
//! @SYMTestExpectedResults 	Test completes with no error.
RUN_UTILS MKDir C:\3gplibrary\temp\
RUN_UTILS MKDir C:\3gplibrary\temp\composer\
RUN_TEST_STEP -1 tsu_3gplibrary 3GPComposeFilename C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0002-CP-1
RUN_TEST_STEP -1 tsu_3gplibrary 3GPComposeFilename C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0002-CP-1
END_TESTCASE MM-3GP-COMP-U-0002-CP

START_TESTCASE MM-3GP-COMP-U-0003-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0003-CP
//! @SYMTestCaseDesc 	Create a 3GP Composer with QCELP audio using 3GP or MP4 format.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer
//!						2. Setup composer with QCELP audio in 3GP format.
//!						3. Add the QCELP audio data and close the composer
//!						4. Setup composer with QCELP audio in MP4 format.
//!						5. Add the QCELP audio data and close the composer
//! @SYMTestExpectedResults		Output files created with major brand of '3g2a'.  
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0003-CP-1
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0003-CP-2
END_TESTCASE MM-3GP-COMP-U-0003-CP

START_TESTCASE MM-3GP-COMP-U-0004-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0004-CP
//! @SYMTestCaseDesc 	Create a MP4 file with video and/or audio of ONLY the combinations of MPEG-4 video, MPEG-4 audio and/or AVC video.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer
//!						2. Setup composer with AMR audio and MPEG-4 video in MP4 format.
//!						3. Add both audio and video data to create the content and close the composer
//!						4. Setup composer with MPEG-4 audio and H263 video in MP4 format.
//!						5. Add both audio and video data to create the content and close the composer
//!						6. Setup composer with AMR audio and AVC video in MP4 format.
//!						7. Add both audio and video data to create the content and close the composer
//!						8. Examine the above output files and the major brand of each file should be '3gp4' instead of 'mp42'.
//!						9. Setup composer with MPEG-4 audio and AVC video in MP4 format.
//!						10. Add both audio and video data to create the content and close the composer
//!						11. Setup composer with MPEG-4 audio and MPEG-4 video in MP4 format.
//!						12. Add both audio and video data to create the content and close the composer
//!						13. Setup composer with MPEG-4 audio in MP4 format.
//!						14. Add both audio data to create the content and close the composer
//!						15. Setup composer with MPEG-4 video in MP4 format.
//!						16. Add both video data to create the content and close the composer
//!						17. Setup composer with AVC video in MP4 format.
//!						18. Add both video data to create the content and close the composer
//!						19. Examine the above output files and the major brand of each file should be of 'mp42'.
//! @SYMTestExpectedResults 	Test completes with no error.
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0004-CP-1
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0004-CP-2
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0004-CP-3
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0004-CP-4
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0004-CP-5
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0004-CP-6
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0004-CP-7
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0004-CP-8
END_TESTCASE MM-3GP-COMP-U-0004-CP

START_TESTCASE MM-3GP-COMP-U-0005-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0005-CP
//! @SYMTestCaseDesc 	Set video stream properties of MP4/3GP/3G2 file with different video properties for different video types.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer 
//!						2. Setup the composer with 3GP/MP4/3G2 file format with one of the supported video types w/ different video properties.  Close the composer.
//!						3. Repeat with clips of different video properties: video length of 1 and big value, low frame rate & high frame rate, small video width -1 or large video width, small video height or large video height, small timescale or large.
//! @SYMTestExpectedResults 	Test completes with no error.
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeVideoProperties C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0005-CP-1
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeVideoProperties C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0005-CP-2
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeVideoProperties C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0005-CP-3
END_TESTCASE MM-3GP-COMP-U-0005-CP

START_TESTCASE MM-3GP-COMP-U-0006-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0006-CP
//! @SYMTestCaseDesc 	Create MP4 file with AVC video types specifying video frame dependencies.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer object with MP4 file format & AVC video source.
//!						2. Write each video frame with different combinations of dependencies & redundancies available.
//! @SYMTestExpectedResults 	Test completes with no error.	
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFrameDependency C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0006-CP-1
END_TESTCASE MM-3GP-COMP-U-0006-CP

START_TESTCASE MM-3GP-COMP-U-0007-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0007-CP
//! @SYMTestCaseDesc 	Set audio stream properties of MP4/3GP/3G2 file with different audio properties for different audio types.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer 
//!						2. Setup the composer with 3GP/MP4/3G2 file format with one of the supported audio types w/ different audio properties.  Close the composer.
//!						3. Repeat with clips of different audio properties: audio length of 1 and big value, low frame rate & high frame rate, etc ...
//! @SYMTestExpectedResults 	Test completes with no error.	
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeAudioProperties C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0007-CP-1
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeAudioProperties C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0007-CP-2
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeAudioProperties C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0007-CP-3
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeAudioProperties C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0007-CP-4
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeAudioProperties C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0007-CP-5
END_TESTCASE MM-3GP-COMP-U-0007-CP

START_TESTCASE MM-3GP-COMP-U-0008-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0008-CP
//! @SYMTestCaseDesc	Set user atoms for mp4/3gp files. 
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer object with a 3GP/MP4/3G2 file.
//!						2. Set the user atom for all 3 locations: movie, video track & audio track.
//! @SYMTestExpectedResults 	Test completes with no error.
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeUserData C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0008-CP-1
END_TESTCASE MM-3GP-COMP-U-0008-CP

START_TESTCASE MM-3GP-COMP-U-0009-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0009-CP
//! @SYMTestCaseDesc 	Set file buffer for the 3GP Composer.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer with data buffer of size 20000 and buffer count to 200
//!						2. Instantiate a 3GP Composer with data buffer of size 100 and buffer count to 10
//! @SYMTestExpectedResults 	Test completes with no error. 
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeWithSpecificBufferSize C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0009-CP-1
END_TESTCASE MM-3GP-COMP-U-0009-CP

START_TESTCASE MM-3GP-COMP-U-0010-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0010-CP
//! @SYMTestCaseDesc 	Use composer flags to compose file.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions		1. Instantiate a 3GP Composer object supplying a composer flag, and compose a file.
//!						2. Try the test with all possible composer flag combinations. 
//! @SYMTestExpectedResults 	Test completes with no error. 
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeWithFlag C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0010-CP-1
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeWithFlag C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0010-CP-2
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeWithFlag C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0010-CP-3
END_TESTCASE MM-3GP-COMP-U-0010-CP

START_TESTCASE MM-3GP-COMP-U-0101-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0101-CP
//! @SYMTestCaseDesc 	Use of Composer API before the Composer has been initialised.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer without calling Open to setup the output destination.
//!						2. Call all composer API available except C3GPCompose::Open
//! @SYMTestExpectedResults 	All calls should fail with error KErrNotReady except C3GPCompose::Complete returns KErrNone.
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeWithoutOpen
END_TESTCASE MM-3GP-COMP-U-0101-CP

START_TESTCASE MM-3GP-COMP-U-0102-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0102-CP
//! @SYMTestCaseDesc 	Create composer to write to a file location with invalid file names.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer object
//!						2. Attempt to Open composer by supplying an empty file name.
//!						3. Attempt to Open composer by supplying a file name containing > max file path length.
//!						4. Attempt to Open composer by supplying a file name containing wildcards in the drive or in any directory name.
//!						5. Attempt to Open composer by supplying a file name containing double backslashes in the path.
//!						6. Attempt to Open composer by supplying a file name containing the following characters anywhere in the path: < > " / |	
//!						7. Attempt to Open composer by supplying a file name containing a colon not between the drive and path
//! 					8. Attempt to Open composer by supplying a file name containing solely of space characters, or of a single or double dot.
//! 					9. Attempt to Open composer by supplying a file name containing spaces between the drive, if specified, and the first directory in the path are illegal, although there may be spaces between other path components, for instance between directories. 
//! @SYMTestExpectedResults 	Setup fails with errors KErrUnderflow(-10) for the first case, and KErrAccessDenied(-21) for the rest.
RUN_TEST_STEP  !Error=-10 -1 tsu_3gplibrary 3GPComposeFilename C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0102-CP-1
RUN_TEST_STEP  !Error=-21 -1 tsu_3gplibrary 3GPComposeFilename C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0102-CP-2
RUN_TEST_STEP  !Error=-21 -1 tsu_3gplibrary 3GPComposeFilename C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0102-CP-3
RUN_TEST_STEP  !Error=-21 -1 tsu_3gplibrary 3GPComposeFilename C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0102-CP-4
RUN_TEST_STEP  !Error=-21 -1 tsu_3gplibrary 3GPComposeFilename C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0102-CP-5
RUN_TEST_STEP  !Error=-21 -1 tsu_3gplibrary 3GPComposeFilename C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0102-CP-6
RUN_TEST_STEP  !Error=-21 -1 tsu_3gplibrary 3GPComposeFilename C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0102-CP-7
RUN_TEST_STEP  !Error=-21 -1 tsu_3gplibrary 3GPComposeFilename C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0102-CP-8
END_TESTCASE MM-3GP-COMP-U-0102-CP

START_TESTCASE MM-3GP-COMP-U-0103-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0103-CP
//! @SYMTestCaseDesc 	Setup composer with an invalid file format.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	Supply an invalid file format value when setup a composer.
//! @SYMTestExpectedResults 	Open panics with error KErrArgument.
RUN_TEST_STEP  !PanicCode=-6 -1 tsu_3gplibrary 3GPComposeUserData C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0103-CP-1
END_TESTCASE MM-3GP-COMP-U-0103-CP

START_TESTCASE MM-3GP-COMP-U-0106-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0106-CP
//! @SYMTestCaseDesc 	Setup 3GP Composer with read-only access to the output file.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Initialise a RFile with ReadOnly access
//!						2. Setup a 3GP Composer using the file handle in Step 1 with no composer flag specified
//!						3. Write a video frame 
//!						4. Close the 3GP Composer
//!						5. Repeat the test using different composer flags
//! @SYMTestExpectedResults 	All tests failed with error codes specified in the test scripts.
RUN_TEST_STEP !Result=106 -1 tsu_3gplibrary 3GPComposeOpenReadOnlyFile C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0106-CP-1
RUN_TEST_STEP !Result=106 -1 tsu_3gplibrary 3GPComposeOpenReadOnlyFile C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0106-CP-2
RUN_TEST_STEP !Result=106 -1 tsu_3gplibrary 3GPComposeOpenReadOnlyFile C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0106-CP-3
RUN_TEST_STEP !Result=106 -1 tsu_3gplibrary 3GPComposeOpenReadOnlyFile C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0106-CP-4
END_TESTCASE MM-3GP-COMP-U-0106-CP

START_TESTCASE MM-3GP-COMP-U-0107-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0107-CP
//! @SYMTestCaseDesc	Composer setup by filepath writes to a file use exclusive mode.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Use RFile to open a file with EFileShareAny
//!						2. Initialise a 3GP Composer with file path pointing at the file opened in Step 1
//!						3. Close RFile in Step 1.  Reopen with EFileShareReadersOrWriters
//!						4. Repeat Step 2.
//! @SYMTestExpectedResults 	Composition fails with error -21.
RUN_TEST_STEP  !Error=-21 -1 tsu_3gplibrary 3GPComposeOpenedFile C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0106-CP-1
END_TESTCASE MM-3GP-COMP-U-0107-CP

START_TESTCASE MM-3GP-COMP-U-0108-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0108-CP
//! @SYMTestCaseDesc	Create composer to create a MP4/3GP/3G2 file specifying no video or audio type. 
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions		1. Instantiate a composer
//!						2. Call C3GPCompose::Open passing NULL for both video & audio input parameter. 
//! @SYMTestExpectedResults 	Fails with error .
RUN_TEST_STEP  !Error=-6 -1 tsu_3gplibrary 3GPComposeWithNoAudioVideo C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0108-CP-1
END_TESTCASE MM-3GP-COMP-U-0108-CP

START_TESTCASE MM-3GP-COMP-U-0109-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0109-CP
//! @SYMTestCaseDesc 	Write Audio Frames with invalid input parameters.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Initialise a 3GP Composer with file path / file handle
//!						2. Attempt to add audio frame with NULL frame data.
//!						3. Attempt to add audio frame to a video only composer setup.
//! @SYMTestExpectedResults 	The first 3 tests fails with KErrUnderFlow, and the last one fails with KErrNotSupported.
RUN_TEST_STEP  !Error=-10 -1 tsu_3gplibrary 3GPComposeAudioFrames C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0109-CP-1
RUN_TEST_STEP  !Error=-5 -1 tsu_3gplibrary 3GPComposeAudioFrames C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0109-CP-4
END_TESTCASE MM-3GP-COMP-U-0109-CP

START_TESTCASE MM-3GP-COMP-U-0110-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0110-CP
//! @SYMTestCaseDesc 	Write video frame with invalid input parameters.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Initialise a 3GP Composer with file path / file handle
//!						2. Attempt to add video frame with NULL frame data without any dependency info
//!						3. Attempt to add video frame with NULL frame data with  dependency info
//!						4. Attempt to add video frame with invalid dependency values
//!						5. Attempt to add video frame to an audio-only file.
//! @SYMTestExpectedResults 	All test cases fails.
RUN_TEST_STEP !Error=-10 -1 tsu_3gplibrary 3GPComposeVideoFrame C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0110-CP-1
RUN_TEST_STEP !Error=-10 -1 tsu_3gplibrary 3GPComposeVideoFrame C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0110-CP-3
RUN_TEST_STEP !Error=-2 -1 tsu_3gplibrary 3GPComposeVideoFrame C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0110-CP-5
RUN_TEST_STEP !Error=-5 -1 tsu_3gplibrary 3GPComposeVideoFrame C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0110-CP-6
RUN_TEST_STEP !Error=-5 -1 tsu_3gplibrary 3GPComposeVideoFrame C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0110-CP-7
END_TESTCASE MM-3GP-COMP-U-0110-CP

START_TESTCASE MM-3GP-COMP-U-0111-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0111-CP
//! @SYMTestCaseDesc 	Write user data with invalid input parameters.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer with only audio data.
//!						2. Attempt to add NULL user data in MOOV, Audio & video track.
//!						3. Attempt to add user data in the audio track for a video-only file.
//!						4. Attempt to add user data in the video track for a audio-only file.
//!						5. Attempt to add user data specifying an invalid location
//! @SYMTestExpectedResults 	all test cases fails.
RUN_TEST_STEP !Error=-10 -1 tsu_3gplibrary 3GPComposeUserData  C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0111-CP-1
RUN_TEST_STEP !Error=-5 -1 tsu_3gplibrary 3GPComposeUserData  C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0111-CP-2
RUN_TEST_STEP !Error=-5 -1 tsu_3gplibrary 3GPComposeUserData C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0111-CP-3
RUN_TEST_STEP !PanicCode=-6 -1 tsu_3gplibrary 3GPComposeUserData C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0111-CP-4
END_TESTCASE MM-3GP-COMP-U-0111-CP

START_TESTCASE MM-3GP-COMP-U-0112-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0112-CP
//! @SYMTestCaseDesc 	Set the custom file buffer size to invalid values.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer with file path / file handle
//!						2. Set customer media write buffer to size 0 and max count to 10.  This should result in error.
//!						3. Set customer media write buffer to size 1000 and max count to 0.  This should result in error.
//!						4. Set customer media write buffer to size 1000 and max count to 5.  This should result in error."
//! @SYMTestExpectedResults 	Test should panic w/ error KErrArgument.
RUN_TEST_STEP  !PanicCode=-6 -1 tsu_3gplibrary 3GPComposeWithSpecificBufferSize C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0112-CP-1
RUN_TEST_STEP  !PanicCode=-6 -1 tsu_3gplibrary 3GPComposeWithSpecificBufferSize C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0112-CP-2
RUN_TEST_STEP  !PanicCode=-6 -1 tsu_3gplibrary 3GPComposeWithSpecificBufferSize C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0112-CP-3
END_TESTCASE MM-3GP-COMP-U-0112-CP

START_TESTCASE MM-3GP-COMP-U-0104-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0104-CP
//! @SYMTestCaseDesc 	Setup composer w/ invalid audio properties. 
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Attempt to setup composer w/ audio timescale > 65536
//!						2. Attempt to setup composer w/ FPS > 256.
//! @SYMTestExpectedResults 	Both test should panic with KErrOverFlow
RUN_TEST_STEP  !PanicCode=-9 -1 tsu_3gplibrary 3GPComposeAudioProperties C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0104-CP-1
RUN_TEST_STEP  !PanicCode=-9 -1 tsu_3gplibrary 3GPComposeAudioProperties C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0104-CP-2
END_TESTCASE MM-3GP-COMP-U-0104-CP

START_TESTCASE MM-3GP-COMP-U-0105-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0105-CP
//! @SYMTestCaseDesc 	Use an opened Composer to compose another file.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer with file path / file handle with one of the supported audio and/or video types.
//!						2. Attempt to use the same composer to compose another file without closing it first.
//! @SYMTestExpectedResults 	Test should failed w/ error KErrInUse.
RUN_TEST_STEP  !Error=-14 -1 tsu_3gplibrary 3GPComposeOpenAgain C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0105-CP-1
END_TESTCASE MM-3GP-COMP-U-0105-CP

START_TESTCASE MM-3GP-COMP-U-0113-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0113-CP
//! @SYMTestCaseDesc 	Write to single 3GP/MP4/3G2 file by multiple instances of Composer.
//!						Note that OOM test is not being done on this test as PIPS team suggest it cannot be applied.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate 2 3GP Composer 
//!						2. Setup both composers with same file path 
//! @SYMTestExpectedResults 	Test should failed w/ error KErrInUse.
RUN_TEST_STEP !Error=-21 -1 tsu_3gplibrary 3GPComposeMultiComposeOnSameFile C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0113-CP-1
END_TESTCASE MM-3GP-COMP-U-0113-CP

START_TESTCASE MM-3GP-COMP-U-0114-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0114-CP
//! @SYMTestCaseDesc 	Compose a file and destroy the composer without calling C3GPCompose::Complete.
//!						Note that OOM test is not being done on this test as PIPS team suggest it cannot be applied.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Create a composer with audio & video stream.  Add some dummy data as video & audio data.  
//!						2. Destroy the composer without calling C3GPCompose::Complete.
//! @SYMTestExpectedResults 	File composed should not be of size 0.
RUN_TEST_STEP -1 tsu_3gplibrary 3GPComposeCloseComposerWithoutComplete C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0114-CP-1
END_TESTCASE MM-3GP-COMP-U-0114-CP

START_TESTCASE MM-3GP-COMP-U-0115-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0115-CP
//! @SYMTestCaseDesc 	Handling of temporary files with multiple composer instances.
//!						Note that OOM test is not being done on this test as PIPS team suggest it cannot be applied.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Create multiple composers all pointing at different files but contained in the same directory.
//! 					2. Add data into each of the opened files.
//! 					3. Close one of the composers
//!						4. Create a parser to read the file composed by the closed composer 
//! 					5. Add data into the rest of the opened files.
//!                     6. Close the parser
//! 					7. Add some more data to the rest of the composer.
//!                     8. Close one of composers.
//!						9. Repeat Step 7 - 8 until all composers are closed. 
//! @SYMTestExpectedResults 	Test should complete without any error
RUN_TEST_STEP  !Heap=0xC00000 -1 tsu_3gplibrary 3GPComposeMultiComposers C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0115-CP-1
END_TESTCASE MM-3GP-COMP-U-0115-CP

RUN_UTILS DeleteDirectory C:\3gplibrary\temp\MM-3GP-COMP-U-0116-CP\
RUN_UTILS MKDir C:\3gplibrary\temp\MM-3GP-COMP-U-0116-CP\
START_TESTCASE MM-3GP-COMP-U-0116-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0116-CP
//! @SYMTestCaseDesc 	Cleanup of temporary files when composer panics.
//!						Note that OOM test is not being done on this test as PIPS team suggest it cannot be applied.
//! @SYMPREQ 			PREQ2050
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Create a composer with audio & video stream using file path to force the creation of temporary files.  
//!						2. Add some dummy data as video & audio data.  
//!						3. Panics composer.						
//!						4. Check the number of files within the current folder.  It should be more than 0.
//!						5. Create a new composer with audio & video stream using the same file path.  
//!						6. Add some dummy data as video & audio data.  
//!						7. Complete the composition and then destroy the composer.
//! @SYMTestExpectedResults 	Number of files contained within the directory should be 1 AFTER the 2nd composition. 
RUN_TEST_STEP !PanicCode=-6 -1 tsu_3gplibrary 3GPComposePanic C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0116-CP-1
RUN_TEST_STEP -1 tsu_3gplibrary 3GPComposePanic C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0116-CP-2
END_TESTCASE MM-3GP-COMP-U-0116-CP
RUN_UTILS DeleteDirectory C:\3gplibrary\temp\MM-3GP-COMP-U-0116-CP\

START_TESTCASE MM-3GP-COMP-U-0119-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0119-CP
//! @SYMTestCaseDesc 	Create 3GP & MP4 file with video and possibly audio using various AVC profiles. For each file check that
//!						it has the appropriate brand value.
//! @SYMPREQ 			PREQ2692
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer
//!
//!			2. Setup composer with AMR audio & AVC baseline profile video in 3GP format.
//!			3. Add both audio and video data to create the content and close the composer.
//!
//!			4. Setup composer with AMR audio & AVC main profile video in 3GP format.
//!			5. Add both audio and video data to create the content and close the composer.
//!
//!			6. Setup composer with AMR audio & AVC extended profile video in 3GP format.
//!			7. Add both audio and video data to create the content and close the composer.
//!
//!			8. Setup composer with AMR audio & AVC high profile video in 3GP format.
//!			9. Add both audio and video data to create the content and close the composer.
//!
//!			10. Setup composer with no audio & AVC baseline profile video in 3GP format.
//!			11. Add video data to create the content and close the composer.
//!
//!			12. Setup composer with no audio & AVC main profile video in 3GP format.
//!			13. Add video data to create the content and close the composer.
//!
//!			14. Setup composer with no audio & AVC extended profile video in 3GP format.
//!			15. Add video data to create the content and close the composer.
//!
//!			16. Setup composer with no audio & AVC high profile video in 3GP format.
//!			17. Add video data to create the content and close the composer.
//!
//!			18. Examine the above output files and the major brand of each file should be '3gp4' instead of 'mp42'.
//!
//!			19. Setup composer with MPEG-4 audio & AVC baseline profile video in MP4 format.
//!			20. Add both audio and video data to create the content and close the composer.
//!
//!			21. Setup composer with MPEG-4 audio & AVC main profile video in MP4 format.
//!			22. Add both audio and video data to create the content and close the composer.
//!
//!			23. Setup composer with MPEG-4 audio & AVC extended profile video in MP4 format.
//!			24. Add both audio and video data to create the content and close the composer.
//!
//!			25. Setup composer with MPEG-4 audio & AVC high profile video in MP4 format.
//!			26. Add both audio and video data to create the content and close the composer.
//!
//!			27. Setup composer with no audio & AVC baseline profile video in MP4 format.
//!			28. Add video data to create the content and close the composer.
//!
//!			29. Setup composer with no audio & AVC main profile video in MP4 format.
//!			30. Add video data to create the content and close the composer.
//!
//!			31. Setup composer with no audio & AVC extended profile video in MP4 format.
//!			32. Add video data to create the content and close the composer.
//!
//!			33. Setup composer with no audio & AVC high profile video in MP4 format.
//!			34. Add video data to create the content and close the composer.
//!
//!			35. Examine the above output files and the major brand of each file should be of 'mp42'.
//! @SYMTestExpectedResults 	Test completes with no error.
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-01
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-02
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-03
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-04
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-05
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-06
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-07
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-08
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-09
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-10
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-11
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-12
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-13
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-14
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-15
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithFileFormatCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0119-CP-16
END_TESTCASE MM-3GP-COMP-U-0119-CP

START_TESTCASE MM-3GP-COMP-U-0120-CP
//! @SYMTestCaseID 		MM-3GP-COMP-U-0120-CP
//! @SYMTestCaseDesc 	Create MP4 files with various AVC profiles for the video data. For each file check that
//!						the data in the avcC box indicates the correct AVC profile.
//! @SYMPREQ 			PREQ2692
//! @SYMTestPriority 	3
//! @SYMTestActions 	1. Instantiate a 3GP Composer
//!
//!			2. Setup composer with MPEG-4 audio & AVC baseline profile video in MP4 format.
//!			3. Add both audio and video data to create the content and close the composer.
//!
//!			4. Setup composer with MPEG-4 audio & AVC main profile video in MP4 format.
//!			5. Add both audio and video data to create the content and close the composer.
//!
//!			6. Setup composer with MPEG-4 audio & AVC extended profile video in MP4 format.
//!			7. Add both audio and video data to create the content and close the composer.
//!
//!			8. Setup composer with MPEG-4 audio & AVC high profile video in MP4 format.
//!			9. Add both audio and video data to create the content and close the composer.
//!
//!			10. Examine the above output files and check that the avcC box has the correct profile indication.
//! @SYMTestExpectedResults 	Test completes with no error.
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithAvcProfileCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0120-CP-01
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithAvcProfileCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0120-CP-02
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithAvcProfileCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0120-CP-03
RUN_TEST_STEP  -1 tsu_3gplibrary 3GPComposeFileWithAvcProfileCheck C:\mm\tsu_3gp_compose_api_te.ini MM-3GP-COMP-U-0120-CP-04
END_TESTCASE MM-3GP-COMP-U-0120-CP


RUN_UTILS DeleteDirectory C:\3gplibrary\temp\composer\