// 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:
// Video Player Utility 2 test for video subtitles and captions
// 
//

LOAD_SUITE tsi_mmf_vclntavi.dll

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

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0600-CP
//! @SYMTestCaseDesc           Play video with subtitles
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Enable subtitles and play a long video with a large srt file to stress the system.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.  Subtitles are reported as being available.
RUN_TEST_STEP 120000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0600-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0602-CP
//! @SYMTestCaseDesc           Enable subtitles during playback
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Play a video with subtitles and enable subtitles during playback.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0602-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0603-CP
//! @SYMTestCaseDesc           Disable subtitles during playback
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Play a video with subtitles enabled then disable them during playback.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0603-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0605-CP
//! @SYMTestCaseDesc           Disable subtitles twice
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Disable subtitles and start playback.  Disable subtitles again.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0605-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0606-CP
//! @SYMTestCaseDesc           Change window clip rectangle before playback
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Set clip rectangle to nondefault value and play video with subtitles.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0606-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0607-CP
//! @SYMTestCaseDesc           Change window clip rectangle during playback
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Set clip rectangle to nondefault value while playing video with subtitles.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0607-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0608-CP
//! @SYMTestCaseDesc           Change surface rotation before playback
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Set surface rotation to nondefault value and play video with subtitles.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0608-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0609-CP
//! @SYMTestCaseDesc           Change surface rotation during playback
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Set surface rotation to nondefault value while playing video with subtitles.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0609-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0610-CP
//! @SYMTestCaseDesc           Redraw subtitles
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Redraw subtitles during playback.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0610-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0611-CP
//! @SYMTestCaseDesc           Redraw rotated and clipped subtitles
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Redraw subtitles during playback with nondefault rotation and clip rectangle.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0611-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0612-CP
//! @SYMTestCaseDesc           Enable and disable subtitles repeatedly.
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Check if subtitles are available, then alternately enable and disable them during playback.  Subtitles available.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0612-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0613-CP
//! @SYMTestCaseDesc           Remove display window during playback.
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Remove display window during playback with subtitles enabled.  Add the window back again and let video complete.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0613-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0614-CP
//! @SYMTestCaseDesc           Redraw subtitles when not enabled
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Redraw subtitles during playback when subtitles are not enabled.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.  Redraw is ignored.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0614-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0615-CP
//! @SYMTestCaseDesc           Redraw subtitles when not available
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Redraw subtitles during playback when subtitles are not available.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error. Redraw is ignored.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0615-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0616-CP
//! @SYMTestCaseDesc           Enable and disable subtitles repeatedly.
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Check if subtitles are available, then alternately enable and disable them during playback.  Subtitles nopt available.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0616-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0617-CP
//! @SYMTestCaseDesc           Enable and disable subtitles repeatedly.
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Check if subtitles are available, then alternately enable and disable them during playback.  Subtitles corrupt.
//! @SYMTestExpectedResults    Video plays successfully.  API calls do not result in an error.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0617-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

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

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0700-CP
//! @SYMTestCaseDesc           Corrupt subtitle file.
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Play video with corrupt subtitle file.
//! @SYMTestExpectedResults    Video plays successfully.  Subtitles are not displayed after corrupted 
//! portion of subtitle is read.  Client receives no error because of the corrupted file.
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0700-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0707-CP
//! @SYMTestCaseDesc           Enable subtitles twice
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Enable subtitles during playback when subtitles have already been enabled.
//! @SYMTestExpectedResults    Second call to EnableSubtitlesL should leave with KErrInUse
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0707-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE

//! @SYMTestCaseID             MM-MMF-VCLNTAVI-I-0708-CP
//! @SYMTestCaseDesc           Render subtitles when two display windows are added
//! @SYMPREQ                   PREQ1939
//! @SYMTestPriority           1
//! @SYMTestActions            Add two windows on the same display.
//! @SYMTestExpectedResults    Adding the second display window will fail with KErrInUse.  
RUN_TEST_STEP 50000 TSI_MMF_VCLNTAVI MM-MMF-VCLNTAVI-I-0708-CP c:\vclntavi\video_avi.ini
TEST_COMPLETE
