//// Copyright (c) 2005-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:///////////////////////////////////////////////////////////////////////////////////! @file//! @SYMTestSuiteName T_BTUserAPI//! @SYMScriptTestEnvironment This test script requires a basic ROM with bluetooth dongle.//! @SYMScriptDescription Tests all published partner elements of the TAvdtpContentProtectionCapabilities class//! as a means of confidence that the API works as expected. //! The purpose is to provide a regression test suite of PublishedPartner APIs for //! BT USER related classes.//! Negative testing is performed to confirm that correct errors are returned //! when incorrect parameters are given. The tests are fully automated.//! @SYMAuthor Jason Lin//! @SYMCreationDate 03/10/2008///////////////////////////////////////////////////////////////////////////////RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\LOAD_SUITE T_BTUserAPIDELAY 1000///////////////////////////////////////////////////////////TAvdtpContentProtectionCapabilities/////////////////////////////////////////////////////////START_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0001//! @SYMTestCaseID BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0001//! @SYMAPI TAvdtpContentProtectionCapabilities::TAvdtpContentProtectionCapabilities()//! @SYMAuthor Jason Lin//! @SYMCreationDate 02/29/2008//! @SYMTestCaseDesc Create a TAvdtpContentProtectionCapabilities object by C++ default constructor//! @SYMTestActions 1.Create a TAvdtpContentProtectionCapabilities object //! 2.Destruct the TAvdtpContentProtectionCapabilities object//! @SYMTestStatus Implemented//! @SYMTestPriority Critical//! @SYMTestExpectedResults TAvdtpContentProtectionCapabilities object was created without panic//! @SYMTestType CIT START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-AvdtpContentProtectionCapa-PublishedPartner.ini CREATE_OBJECT TAvdtpContentProtectionCapabilities avdtpcpc COMMAND avdtpcpc new COMMAND avdtpcpc ~ END_TEST_BLOCK END_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0001START_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002//! @SYMTestCaseID BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002//! @SYMAPI TAvdtpContentProtectionCapabilities::ContentProtectionType();//! TAvdtpContentProtectionCapabilities::SetContentProtectionType( TUint16 )//! @SYMAuthor Jason Lin//! @SYMCreationDate 02/29/2008//! @SYMTestCaseDesc 1.Set the content protection type//! 2.Get the content protection type//! @SYMTestActions 1.Create a TAvdtpContentProtectionCapabilities object//! 2.Set the content protection type ( 0 ) to the AvdtpContentProtectionCapabilities object//! 3.Get the content protection type//! 4.Set the content protection type ( 1 ) to the AvdtpContentProtectionCapabilities object//! 5.Get the content protection type//! 6.Set the content protection type ( 65535 ) to the AvdtpContentProtectionCapabilities object//! 7.Get the content protection type//! 8.Destruct the TAvdtpContentProtectionCapabilities object//! @SYMTestStatus Implemented//! @SYMTestPriority High//! @SYMTestExpectedResults 1.Called without causing panic and returns value as expected//! 1.1.Step 3 return content protection type 0//! 1.2.Step 5 return content protection type 1//! 1.3.Step 7 return content protection type 65535//! @SYMTestType CIT START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-AvdtpContentProtectionCapa-PublishedPartner.ini CREATE_OBJECT TAvdtpContentProtectionCapabilities avdtpcpc COMMAND avdtpcpc new COMMAND avdtpcpc SetContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-SetContentProtectionType_Command02 COMMAND avdtpcpc ContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-ContentProtectionType_Command03 COMMAND avdtpcpc SetContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-SetContentProtectionType_Command04 COMMAND avdtpcpc ContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-ContentProtectionType_Command05 COMMAND avdtpcpc SetContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-SetContentProtectionType_Command06 COMMAND avdtpcpc ContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-ContentProtectionType_Command07 COMMAND avdtpcpc ~ END_TEST_BLOCK END_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002START_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003//! @SYMTestCaseID BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003//! @SYMAPI TAvdtpContentProtectionCapabilities::ContentProtectionData();//! TAvdtpContentProtectionCapabilities::SetContentProtectionData( const TDesC8 {ref} )//! @SYMAuthor Jason Lin//! @SYMCreationDate 02/29/2008//! @SYMTestCaseDesc 1.Set the content protection data//! 2.Get the content protection data, and verify the data//! @SYMTestActions 1.Create a TAvdtpContentProtectionCapabilities object//! 2.Set the content protection data ( "initial data" ) to the AvdtpContentProtectionCapabilities object//! 3.Get the content protection data//! 4.Set the content protection data ( "content data" ) to the AvdtpContentProtectionCapabilities object//! 5.Get the content protection data//! 6.Destruct the TAvdtpContentProtectionCapabilities object//! @SYMTestStatus Implemented//! @SYMTestPriority High//! @SYMTestExpectedResults 1.Called without causing panic and returns value as expected//! 1.1.Step 3 return the protection data "initial data"//! 1.2.Step 5 return the protection data "content data"//! @SYMTestType CIT START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-AvdtpContentProtectionCapa-PublishedPartner.ini CREATE_OBJECT TAvdtpContentProtectionCapabilities avdtpcpc COMMAND avdtpcpc new COMMAND avdtpcpc SetContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003-0001-SetContentProtectionData_Command02 COMMAND avdtpcpc ContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003-0001-ContentProtectionData_Command03 COMMAND avdtpcpc SetContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003-0001-SetContentProtectionData_Command04 COMMAND avdtpcpc ContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003-0001-ContentProtectionData_Command05 COMMAND avdtpcpc ~ END_TEST_BLOCK END_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003START_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0004//! @SYMTestCaseID BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0004//! @SYMAPI TAvdtpContentProtectionCapabilities::Category()//! @SYMAuthor Jason Lin//! @SYMCreationDate 02/29/2008//! @SYMTestCaseDesc (Inherited from TAvdtpServiceCapability)Get the TAvdtpServiceCategory enumeration value//! @SYMTestActions 1.Create a TAvdtpContentProtectionCapabilities object//! 2.Get the TAvdtpServiceCategory enumeration value//! 3.Destruct the TAvdtpContentProtectionCapabilities object//! @SYMTestStatus Implemented//! @SYMTestPriority High//! @SYMTestExpectedResults Called without causing panic and return value (EServiceCategoryContentProtection) as expected.//! @SYMTestType CIT START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-AvdtpContentProtectionCapa-PublishedPartner.ini CREATE_OBJECT TAvdtpContentProtectionCapabilities avdtpcpc COMMAND avdtpcpc new COMMAND avdtpcpc Category BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0004-0001-Category_Command02 COMMAND avdtpcpc ~ END_TEST_BLOCK END_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0004START_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009//! @SYMTestCaseID BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009//! @SYMAPI TAvdtpContentProtectionCapabilities::ContentProtectionData();//! TAvdtpContentProtectionCapabilities::SetContentProtectionData( const TDesC8 {ref} )//! @SYMAuthor Jason Lin//! @SYMCreationDate 03/26/2008//! @SYMTestCaseDesc 1.Set the content protection data//! 2.Get the content protection data, and verify the data//! @SYMTestActions 1.Create a TAvdtpContentProtectionCapabilities object//! 2.Set the content protection data with empty string to the AvdtpContentProtectionCapabilities object//! 3.Get the content protection data//! 4.Set the content protection data ( "content data" ) to the AvdtpContentProtectionCapabilities object//! 5.Get the content protection data//! 6.Set the content protection data with empty string to the AvdtpContentProtectionCapabilities object//! 7.Get the content protection data//! 8.Destruct the TAvdtpContentProtectionCapabilities object//! @SYMTestStatus Implemented//! @SYMTestPriority High//! @SYMTestExpectedResults 1.Called without causing panic and returns value as expected//! 1.1.Step 3 return empty string//! 1.2.Step 5 return "content data"//! 1.3.Step 7 return empty string//! @SYMTestType CIT START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-AvdtpContentProtectionCapa-PublishedPartner.ini CREATE_OBJECT TAvdtpContentProtectionCapabilities avdtpcpc COMMAND avdtpcpc new COMMAND avdtpcpc SetContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-SetContentProtectionData_Command02 COMMAND avdtpcpc ContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-ContentProtectionData_Command03 COMMAND avdtpcpc SetContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-SetContentProtectionData_Command04 COMMAND avdtpcpc ContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-ContentProtectionData_Command05 COMMAND avdtpcpc SetContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-SetContentProtectionData_Command06 COMMAND avdtpcpc ContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-ContentProtectionData_Command07 COMMAND avdtpcpc ~ END_TEST_BLOCK END_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009DELAY 2000