// 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:
//

LOAD_SUITE tsu_mmf_subtitlegraphic.dll

// 
// Positive tests
// 

//! @SYMTestCaseID          MM-MMF-SUBTITLE-CRP-U-0001-HP
//! @SYMREQ                 REQ9904
//! @SYMTestCaseDesc         Test sending a 'drawframe' message to the CRP, this test also includes multiple initialization calls
//! @SYMTestActions         	1) Create a CMMFSubtitleGraphic object
//!				2) Create a test CFbsBitmap object
//!				3) Call CMMGSubtitleGraphic::Initialize()
//!				4) Call CMMGSubtitleGraphic::Initialize()
//!				5) Call CMMFSubtitleGraphic::DrawFrame()
//!				6) Call CMMFSubtitleGraphic::DrawFrame()
//! @SYMTestExpectedResults API call completes with no errors
//! @SYMTestPriority        High
RUN_TEST_STEP 30000, tsu_mmf_subtitlegraphic, MM-MMF-SUBTITLE-CRP-U-0001-HP
TEST_COMPLETE

//! @SYMTestCaseID          MM-MMF-SUBTITLE-CRP-U-0002-HP
//! @SYMREQ                 REQ9904
//! @SYMTestCaseDesc        Test sending a 'swapframe' message to the CRP, this test also includes 
//!                         multiple initiaslization calls, and multiple variations of Display Duration
//!			    Test sending a 'swapframe' message, reinitialize and send a 'drawframe' message to ensure the CRP
//!			    can change rendering modes.
//! @SYMTestActions         	1)  Create a CMMFSubtitleGraphic object
//!				2)  Call CMMGSubtitleGraphic::Initialize()
//!				3)  Call CMMGSubtitleGraphic::Initialize()
//!				4)  Create two test CFbsBitmap objects
//!				5)  Call CMMFSubtitleGraphic::SwapFrame()
//!				6)  Call CMMFSubtitleGraphic::SwapFrame()
//!				7)  Call CMMFSubtitleGraphic::SwapFrame()
//!				8)  Call CMMFSubtitleGraphic::SwapFrame() waits for the CRP to clear the subtitle
//!				9)  Call CMMFSubtitleGraphic::SwapFrame()
//!				10) Call CMMFSubtitleGraphic::SwapFrame() with dirtyregion reduced to 50% 
//!				11) Call CMMFSubtitleGraphic::DrawFrame()
//!				12) Call CMMFSubtitleGraphic::SwapFrame()
//!				13) Call CMMFSubtitleGraphic::DrawFrame()
//!				
//! @SYMTestExpectedResults API call completes with no errors
//! @SYMTestPriority        High
RUN_TEST_STEP 60000, tsu_mmf_subtitlegraphic, MM-MMF-SUBTITLE-CRP-U-0002-HP
TEST_COMPLETE

//! @SYMTestCaseID          MM-MMF-SUBTITLE-CRP-0003-HP
//! @SYMREQ                 REQ9904
//! @SYMTestCaseDesc        Test requests the current CRP UID
//! @SYMTestActions         	1) Create a CMMFSubtitleGraphic object
//!				2) Call CMMFSubtitleGraphic::Id()
//!				3) Call CMMFSubtitleGraphic::IsId()
//!				4) Call CMMFSubtitleGraphic::IsUid()
//! @SYMTestExpectedResults API call completes with no leave/errors
//! @SYMTestPriority        High
RUN_TEST_STEP 30000, tsu_mmf_subtitlegraphic, MM-MMF-SUBTITLE-CRP-U-0003-HP
TEST_COMPLETE

//! @SYMTestCaseID          MM-MMF-SUBTITLE-CRP-U-0004-HP
//! @SYMREQ                 REQ9904
//! @SYMTestCaseDesc        MM-MMF-SUBTITLE-CRP-U-0004-HP Test sending a 'clear' message to the CRP, the clear message is sent multiple times
//! @SYMTestActions         	1) Create a CMMFSubtitleGraphic object
//!				2) Create a test CFbsBitmap object
//!				3) Call CMMFSubtitleGraphic::DrawFrame
//!				4) Call CMMFSubtitleGraphic::Clear
//!				5) Call CMMFSubtitleGraphic::Clear
//!				6) Call CMMFSubtitleGraphic::DrawFrame
//! @SYMTestExpectedResults API calls complete with no errors
//! @SYMTestPriority        High
RUN_TEST_STEP 30000, tsu_mmf_subtitlegraphic, MM-MMF-SUBTITLE-CRP-U-0004-HP
TEST_COMPLETE

//	          
// Negative tests 
//                

//! @SYMTestCaseID          MM-MMF-SUBTITLE-CRP-U-0101-HP
//! @SYMREQ                 REQ9904
//! @SYMTestCaseDesc        MM-MMF-SUBTITLE-CRP-U-0101-HP Test sending a 'drawframe' message to the CRP using an invalid bitmap handle
//! @SYMTestActions         	1) Create a CMMFSubtitleGraphic object
//!				2) Create a test CFbsBitmap object
//!				3) Call CMMFSubtitleGraphic::Inialize()
//!				3) Call CMMFSubtitleGraphic::DrawFrame using an invalid bitmap handle
//!				3) Call CMMFSubtitleGraphic::Initialize(handle1, handle2)
//!				3) Call CMMFSubtitleGraphic::DrawFrame using an invalid initialization call
//! @SYMTestExpectedResults API calls return with expected error codes
//! @SYMTestPriority        High
RUN_TEST_STEP 30000, tsu_mmf_subtitlegraphic, MM-MMF-SUBTITLE-CRP-U-0101-HP
TEST_COMPLETE

//! @SYMTestCaseID          MM-MMF-SUBTITLE-CRP-U-0102-HP
//! @SYMREQ                 REQ9904
//! @SYMTestCaseDesc        MM-MMF-SUBTITLE-CRP-U-0102-HP Test sending a 'drawframe' message to the CRP using an invalid dirty region
//! @SYMTestActions         	1) Create a CMMFSubtitleGraphic object
//!				2) Create a test CFbsBitmap object
//!				3) Call CMMFSubtitleGraphic::DrawFrame using an invalid dirty region
//! @SYMTestExpectedResults API calls return with expected error codes
//! @SYMTestPriority        High
RUN_TEST_STEP 30000, tsu_mmf_subtitlegraphic, MM-MMF-SUBTITLE-CRP-U-0102-HP
TEST_COMPLETE

//! @SYMTestCaseID          MM-MMF-SUBTITLE-CRP-U-0103-HP
//! @SYMREQ                 REQ9904
//! @SYMTestCaseDesc        MM-MMF-SUBTITLE-CRP-U-0103-HP Test sending a 'Initialize' message to the CRP using invalid bitmap handles
//! @SYMTestActions         	1) Create a CMMFSubtitleGraphic object
//!				2) Call CMMFSubtitleGraphic::Initialize with invalid handle 1
//!				3) Call CMMFSubtitleGraphic::Initialize with invalid handle 2
//!				4) Call CMMFSubtitleGraphic::Initialize with both handles set to invalid 
//! @SYMTestExpectedResults API calls return with expected error codes
//! @SYMTestPriority        High
RUN_TEST_STEP 30000, tsu_mmf_subtitlegraphic, MM-MMF-SUBTITLE-CRP-U-0103-HP
TEST_COMPLETE

//! @SYMTestCaseID          MM-MMF-SUBTITLE-CRP-U-0104-HP
//! @SYMREQ                 REQ9904
//! @SYMTestCaseDesc        MM-MMF-SUBTITLE-CRP-0104 Test sending a 'swapframe' message to the CRP using an invalid dirty region
//!                         Test sending a 'swapframe' message to the CRP after an incorrect initialise funtion call
//! @SYMTestActions         	1) Create a CMMFSubtitleGraphic object
//!				2) Create a test CFbsBitmap object
//!				3) Call CMMFSubtitleGraphic::Initialize with valid bitmap hanldes
//!				4) Call CMMFSubtitleGraphic::SwapFrame using an invalid dirty region
//!				5) Call CMMFSubtitleGraphic::Initialize simple initialization 
//!				4) Call CMMFSubtitleGraphic::SwapFrame
//! @SYMTestExpectedResults API calls return with expected error codes
//! @SYMTestPriority        High
RUN_TEST_STEP 30000, tsu_mmf_subtitlegraphic, MM-MMF-SUBTITLE-CRP-U-0104-HP
TEST_COMPLETE

//! @SYMTestCaseID          MM-MMF-SUBTITLE-CRP-U-0105-HP
//! @SYMREQ                 REQ9904
//! @SYMTestCaseDesc        MM-MMF-SUBTITLE-CRP-U-0105-HP Test sending a 'swapframe' message to the CRP using an invalid expected buffer
//! @SYMTestActions         	1) Create a CMMFSubtitleGraphic object
//!				2) Create a test CFbsBitmap object
//!				3) Call CMMFSubtitleGraphic::Initialize with valid bitmap handles
//!				4) Call CMMFSubtitleGraphic::SwapFrame using an invalid expected buffer
//! @SYMTestExpectedResults API calls return with expected error codes
//! @SYMTestPriority        High
RUN_TEST_STEP 30000, tsu_mmf_subtitlegraphic, MM-MMF-SUBTITLE-CRP-U-0105-HP
TEST_COMPLETE

//! @SYMTestCaseID          MM-MMF-SUBTITLE-CRP-U-0106-HP
//! @SYMREQ                 REQ9904
//! @SYMTestCaseDesc        MM-MMF-SUBTITLE-CRP-U-0106-HP Test sending a 'swapframe' message to the CRP using an invalid (negative) display duration
//! @SYMTestActions         	1) Create a CMMFSubtitleGraphic object
//!				2) Create a test CFbsBitmap object
//!				3) Call CMMFSubtitleGraphic::Initialize with valid bitmap handles
//!				4) Call CMMFSubtitleGraphic::SwapFrame using an invalid (negative) display duration
//!				5) Call CMMFSubtitleGraphic::DrawFrame using an invalid (negative) display duration
//! @SYMTestExpectedResults API calls return with expected error codes
//! @SYMTestPriority        High
RUN_TEST_STEP 30000, tsu_mmf_subtitlegraphic, MM-MMF-SUBTITLE-CRP-U-0106-HP
TEST_COMPLETE