// Copyright (c) 2005-2010 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:
// Video Client Utility Integration tests for Video Controller and XviD Codec
// Video Play Tests for AVI files encoded using XviD Codec
// 
//

LOAD_SUITE tsi_mmf_vclntavi.dll

/////////////////////////////// POSITIVE TESTS /////////////////////////////////////

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0001-CP
//!@SYMTestCaseDesc           Play video file (AVI - Xvid)
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Initialise video utility with a video file and play.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0001-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 10000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0002-CP
//!@SYMTestCaseDesc           Play video descriptor
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Initialise video utility with a video descriptor and play.
//!@SYMTestExpectedResults    KErrNotSupported
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0002-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0003-CP
//!@SYMTestCaseDesc           Play video from URL
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           1
//!@SYMTestActions            Initialise video utility with a URL of a video file and play.
//!@SYMTestExpectedResults    KErrNotSupported
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0003-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0004-HP
//!@SYMTestCaseDesc           Set and enquire framerate
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Change the frame rate and check.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0004-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 10000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0005-HP
//!@SYMTestCaseDesc           Set position and play from this position.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set a position to start playing from within the video.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0005-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0007-HP
//!@SYMTestCaseDesc           Enquire video duration
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Open a video file of known duration and then enquire this files duration checking against the stored duration.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0007-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0008-HP
//!@SYMTestCaseDesc           Set the volume to the maximum.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Open two video clients. Change the volume for one of these video clients to the maximum volume. Check that the correct client
//! and only this client has changed its volume correctly.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0008-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0009-HP
//!@SYMTestCaseDesc           Open a clip, close the clip and open a new clip.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Open a file based clip, close the clip and then open a new file based clip.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0009-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0010-HP
//!@SYMTestCaseDesc           Pause a clip
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Open a file based clip. Start playing the clip and then pause play. Check that when playing the clip, that it continues
//! from the halted position.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0010-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0011-HP
//!@SYMTestCaseDesc           Set and Enquire balance
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set the balance to a legal value and then check via tha API that the balance has been set to this value.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0011-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0012-HP
//!@SYMTestCaseDesc           Set the play window, delete the play window.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set the play window for the current clip. Check that this has been correctly set, then delete the play window. Check that
//! the window has been reset correctly.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0012-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0013-HP
//!@SYMTestCaseDesc           Get meta information
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Retrieve the meta information and compare with known values
//!@SYMTestExpectedResults    KErrNotSupported
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0013-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0014-HP
//!@SYMTestCaseDesc           Query the framesize
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Enquire the current clips framsize and compare with a nkown value.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0014-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0015-HP
//!@SYMTestCaseDesc           Set number of time to repeat play
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Open a file based clip and set the number of times to repeat play the clip.
//!@SYMTestExpectedResults    KErrNotSupported
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0015-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0016-HP
//!@SYMTestCaseDesc           Query the MIME type
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Enquire the current clip's mime type.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0016-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0017-HP
//!@SYMTestCaseDesc           Set and enquire the scale factor
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set the scale factor for the opened clip. Then attempt to retrieve the value for scale factor.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0017-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0018-HP
//!@SYMTestCaseDesc           Set and enquire the crop region
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set the crop region for the opened clip. Then attempt to retrieve the value for crop region.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0018-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0019-HP
//!@SYMTestCaseDesc           Get a frame.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Get a frame.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0019-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0020-HP
//!@SYMTestCaseDesc           Get a frame, specifying EPlay Intent
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Get a frame, specifying EPlay Intent
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0020-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0021-HP
//!@SYMTestCaseDesc           Register a player for rebuffering notification
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Register a player for rebuffering notification
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0021-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0022-HP
//!@SYMTestCaseDesc           Open Video file using File handle and Play
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Initialise video utility with a video file and play.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0022-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0030-HP
//!@SYMTestCaseDesc           Check for capabilities, default PlayVelocity and try to set different play velocities.
//!@SYMREQ                    REQ8287, REQ8066
//!@SYMTestPriority           2
//!@SYMTestActions            Initialise video utility with a video file and play with differne velocities set.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0030-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0032-HP
//!@SYMTestCaseDesc           Try to step to different frames forward and backward on dummy test controller.
//!@SYMREQ                    REQ8286
//!@SYMTestPriority           2
//!@SYMTestActions            Initialise video utility with a video file, pause and try stepping to diferent frames.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0032-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0034-HP
//!@SYMTestCaseDesc           Make sure that by default video and audio is enabled, and try disabling audio and video.
//!@SYMREQ                    REQ8068, REQ8069
//!@SYMTestPriority           2
//!@SYMTestActions            Initialise video utility with a video file disable audio, video one at a time and play.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0034-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-0036-HP
//!@SYMTestCaseDesc           Test auto scale functionality with different modes and alignments.
//!@SYMREQ                    REQ8288
//!@SYMTestPriority           2
//!@SYMTestActions            Initialise video utility,try playing a clip enabling auto scaling with different values.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0036-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

/////////////////////////////// NEGATIVE TESTS /////////////////////////////////////

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1001-HP
//!@SYMTestCaseDesc           Video utility - Delete object before play operation has completed.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            While video is playing, destroy the video utility object.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1001-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1002-HP
//!@SYMTestCaseDesc           Set invalid framerate
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set framerate a million frames a second. Then play a video.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1002-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 10000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1003-HP
//!@SYMTestCaseDesc           Set invalid video position and play (above maximum).
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set position beyond the end of the video's duration and attempt to play.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1003-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1004-HP
//!@SYMTestCaseDesc           Set invalid video position and play (below minimum).
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set position below the minimum position of the video clip and attempt to play.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1004-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1005-HP
//!@SYMTestCaseDesc           Set invalid volume (above maximum).
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set volume to a value greater than the maximum, check that this value has been set to the maximum.Set volume to a value
//! less than zero, check that this value has been set correctly to zero.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1005-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1006-HP
//!@SYMTestCaseDesc           Set invalid volume (below minimum).
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set volume to a value greater than the maximum, check that this value has been set to the maximum.Set volume to a value
//! less than zero, check that this value has been set correctly to zero.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1006-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1007-HP
//!@SYMTestCaseDesc           Set invalid balance (above maximum)
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set balance to a value greater than the 100, check that this value has been set to 100.Set volume to a value less than -100,
//! check that this value has been set correctly to -100.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1007-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1008-HP
//!@SYMTestCaseDesc           Set invalid balance (below minimum).
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set balance to a value greater than the 100, check that this value has been set to 100.Set volume to a value less than -100,
//! check that this value has been set correctly to -100.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1008-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1009-HP
//!@SYMTestCaseDesc           Set invalid play window.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Set position beyond the end of the video's duration and attempt to play.
//!@SYMTestExpectedResults    KErrNone
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1009-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1010-HP
//!@SYMTestCaseDesc           Load corrupted file.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Attempt to load a file that has been corrupted.
//!@SYMTestExpectedResults    KErrCorrupt
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1010-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1011-HP
//!@SYMTestCaseDesc           Load a video clip that uses a codec that isn't supported.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Attemp to load and initilise a file that has an unsupported codec.
//!@SYMTestExpectedResults    KErrCorrupt
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1011-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1012-HP
//!@SYMTestCaseDesc           Play a text file.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Initialise video utility with a video file and play.
//!@SYMTestExpectedResults    KErrNotSupported
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1012-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000

//
//!@SYMTestCaseID             MM-MMF-VCLNTAVI-I-1013-HP
//!@SYMTestCaseDesc           Play video file, giving invalid Controller UID.
//!@SYMPREQ                   PREQ452
//!@SYMTestPriority           2
//!@SYMTestActions            Initialise video utility with a video file and play.
//!@SYMTestExpectedResults    KErrNotFound
RUN_TEST_STEP 200000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-1013-HP c:\vclntavi\video_avi.ini
TEST_COMPLETE
DELAY 5000
