// 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:
// MMF Video Clients Unit Testing script related to subtitles
// testframework.exe [path]\[this script name]. It requires no exceptional network support. 
// The class CVideoPlayerUtility2 should be available to the client.  
// 
//

//! @file
//! @SYMTestSuiteName          tsu_mmf_vclnt_01
//! @SYMScriptTestEnvironment  This test runs using multimedia test framework with the following test list entry:

PRINT Run all the MMF Video Clients unit tests related to subtitles
PRINT 

LOAD_SUITE tsu_mmf_vclnt_01.dll

// Positive test

//! @SYMTestCaseID          MM-MMF-VCLNT-U-1300-CP
//! @SYMREQ                 REQ9901
//! @SYMTestCaseDesc        Check subtitles availability when subtitle is available
//! @SYMTestActions         Check for subtitle
//! @SYMTestExpectedResults SubtitlesAvailable return ETrue
//! @SYMTestPriority        Critical
RUN_TEST_STEP 180000, tsu_mmf_vclnt_01, MM-MMF-VCLNT-U-1300-CP
TEST_COMPLETE 

//! @SYMTestCaseID          MM-MMF-VCLNT-U-1301-CP
//! @SYMREQ                 REQ9901
//! @SYMTestCaseDesc        Enable and disable subtitle
//! @SYMTestActions         Add display window, then enable subtitle, then disable subtitle. 
//!		Then enable subtitle and disable subtitle again
//! @SYMTestExpectedResults Doesn't leave. No error returned. EnableSubtitles and 
//! 	AddSubtitleConfig with proper config should be called in the controller, 
//!		then event CRP ready is received. After subtitle is disabled, DisableSubtitles 
//!		and RemoveSubtitleConfig should be called in the controller.
//! @SYMTestPriority        Critical
RUN_TEST_STEP 180000, tsu_mmf_vclnt_01, MM-MMF-VCLNT-U-1301-CP
TEST_COMPLETE 

//! @SYMTestCaseID          MM-MMF-VCLNT-U-1302-HP
//! @SYMREQ                 REQ9901
//! @SYMTestCaseDesc        Redraw subtitle
//! @SYMTestActions         Add display window, then enable subtitle. After CRP 
//!		ready is received, call redraw subtitle on the added display window and another display window
//! @SYMTestExpectedResults Doesn't leave. No error returned. EnableSubtitles and AddSubtitleConfig 
//!		with proper config should be called in the controller, then event CRP ready is received. 
//!		Then send a CRP ready event to client API with unexpected window handle and the event should be ignored.
//! @SYMTestPriority        High
RUN_TEST_STEP 180000, tsu_mmf_vclnt_01, MM-MMF-VCLNT-U-1302-HP
TEST_COMPLETE 

//! @SYMTestCaseID          MM-MMF-VCLNT-U-1303-HP
//! @SYMREQ                 REQ9901
//! @SYMTestCaseDesc        Redraw subtitle when CRP is not ready
//! @SYMTestActions         Add display window, then enable subtitle, and call redraw subtitle on 
//!		the added display window but CRP ready is not received yet
//! @SYMTestExpectedResults Doesn't leave. No error returned. EnableSubtitles and AddSubtitleConfig 
//!		with proper config should be called in the controller. The event CRP ready is not received, 
//!		so redraw subtitle will be ignored.
//! @SYMTestPriority        High
RUN_TEST_STEP 180000, tsu_mmf_vclnt_01, MM-MMF-VCLNT-U-1303-HP
TEST_COMPLETE 

//! @SYMTestCaseID          MM-MMF-VCLNT-U-1308-HP
//! @SYMREQ                 REQ9901
//! @SYMTestCaseDesc        Get supported subtitle language and subtitle language
//! @SYMTestActions         Add display window, then enable subtitle. Then get supported subtitle 
//!		language, set and get subtitle language, 
//! @SYMTestExpectedResults Doesn't leave. No error returned. 
//! @SYMTestPriority        High
RUN_TEST_STEP 180000, tsu_mmf_vclnt_01, MM-MMF-VCLNT-U-1308-HP
TEST_COMPLETE 

//! @SYMTestCaseID          MM-MMF-VCLNT-U-1309-HP
//! @SYMREQ                 REQ9901 REQ9906
//! @SYMTestCaseDesc        Enable subtitle and change rotation setting
//! @SYMTestActions         Add 1 display window, then enable subtitle, and change rotation to 
//!		same and different rotation settings. Also try redrawing when CRP ready is not received yet.
//! @SYMTestExpectedResults Doesn't leave. No error returned. EnableSubtitles should be called in 
//!		the controller, and AddSubtitleConfig with proper config should be called. After rotation 
//!		is set, UpdateSubtitleConfig with proper config should be called in the controller. When 
//!		new rotation setting is same as old setting, UpdateSubtitleConfig call is not expected.
//! @SYMTestPriority        High
RUN_TEST_STEP 180000, tsu_mmf_vclnt_01, MM-MMF-VCLNT-U-1309-HP
TEST_COMPLETE 

//! @SYMTestCaseID          MM-MMF-VCLNT-U-1310-HP
//! @SYMREQ                 REQ9901 REQ9906
//! @SYMTestCaseDesc        Enable subtitle and change window clip rect setting
//! @SYMTestActions         Add 1 display window, then enable subtitle, and change window clip rect
//! @SYMTestExpectedResults Doesn't leave. No error returned. EnableSubtitles should be called in 
//!		the controller, and AddSubtitleConfig with proper config should be called. After window 
//!		clip rect is set, UpdateSubtitleConfig with proper config should be called in the controller.  
//!		When clip rec setting is same as old setting, UpdateSubtitleConfig call is not expected
//! @SYMTestPriority        High
RUN_TEST_STEP 180000, tsu_mmf_vclnt_01, MM-MMF-VCLNT-U-1310-HP
TEST_COMPLETE 

// Negative test

//! @SYMTestCaseID          MM-MMF-VCLNT-U-1352-MP
//! @SYMREQ                 REQ9901
//! @SYMTestCaseDesc        Enable subtitle twice
//! @SYMTestActions         Add display window, then enable subtitle twice
//! @SYMTestExpectedResults Leave with KErrInUse on the second enable call
//! @SYMTestPriority        Medium
RUN_TEST_STEP 180000, tsu_mmf_vclnt_01, MM-MMF-VCLNT-U-1352-MP
TEST_COMPLETE 

//! @SYMTestCaseID          MM-MMF-VCLNT-U-1358-LP
//! @SYMREQ                 REQ9901
//! @SYMTestCaseDesc        Redraw subtitle when subtitle is not enabled
//! @SYMTestActions         Subtitle is not enabled, and call redraw subtitle
//! @SYMTestExpectedResults Doesn't leave. No error returned. The call is ignored
//! @SYMTestPriority        Low
RUN_TEST_STEP 180000, tsu_mmf_vclnt_01, MM-MMF-VCLNT-U-1358-LP
TEST_COMPLETE 
