sl@0: // sl@0: // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: sl@0: LOAD_SUITE tcaf sl@0: LOAD_SUITE RTAUtils sl@0: sl@0: RUN_UTILS MkDir c:\rta\ sl@0: RUN_UTILS MkDir c:\rta\testdata\ sl@0: RUN_UTILS MkDir c:\tcaf\ sl@0: RUN_UTILS MkDir c:\tcaf\testdata\ sl@0: RUN_UTILS MkDir c:\tcaf\testdata\TestAgentPrivateDir\ sl@0: sl@0: RUN_UTILS CopyFile z:\rta\testdata\*.* c:\rta\testdata\*.* sl@0: RUN_UTILS CopyFile z:\tcaf\testdata\*.* c:\tcaf\testdata\*.* sl@0: RUN_UTILS CopyFile z:\tcaf\testdata\TestAgentPrivateDir\*.* c:\tcaf\testdata\TestAgentPrivateDir\*.* sl@0: sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-0001 sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-0001 sl@0: //! @SYMTestCaseDesc CreateDrmArchive for content.xml sl@0: RUN_TEST_STEP 100 RTAUtils CreateDrmArchive c:\tcaf\stringattributes.ini CreateDrmArchive sl@0: END_TESTCASE SEC-CAF-STRATR-0001 sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-0002 sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-0002 sl@0: //! @SYMTestCaseDesc copy stringattribute.content file to the private directory of the RTA, so the RTA gets picked sl@0: RUN_TEST_STEP 100 tcaf CAFCopyFileStep c:\tcaf\stringattributes.ini PrivateCopyFileOk sl@0: END_TESTCASE SEC-CAF-STRATR-0002 sl@0: sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-1909 sl@0: //------------------------------------- sl@0: //-- Step to retrieve TransactionID sl@0: //------------------------------------- sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-1909 sl@0: //! @SYMTestCaseDesc Test addition of new entry,TransactionID, in TStringAttribute sl@0: //! @SYMCR CR0895 sl@0: //! @SYMREQ REQ 6526, 6527 sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both shuold match. sl@0: //! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file. sl@0: RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute sl@0: END_TESTCASE SEC-CAF-STRATR-1909 sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-1914 sl@0: //--------------------------------------------------- sl@0: //-- Step to retrieve non existing transaction ID sl@0: //--------------------------------------------------- sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-1914 sl@0: //! @SYMTestCaseDesc Test retrieval of non-existing TransactionID, in TStringAttribute sl@0: //! @SYMCR CR0895 sl@0: //! @SYMREQ REQ 6526, 6527 sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions RTA gets picked to read the content file, calls GetStringAttribute on transactionid and initiliases its value to "". sl@0: //! @SYMTestExpectedResults expected value is empty string since there is not TransactionID attribute in this content, and expected result is KErrNotfound. sl@0: RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini NonExistingTransactionIDAttribute sl@0: END_TESTCASE SEC-CAF-STRATR-1914 sl@0: sl@0: sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-1915 sl@0: //----------------------------------------------------------------- sl@0: //-- Step to retrieve transaction ID using GetStringAttributeSet. sl@0: //----------------------------------------------------------------- sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-1915 sl@0: //! @SYMTestCaseDesc Test TransactionID retrieval calling GetStringAttributeSet() sl@0: //! @SYMCR CR0895 sl@0: //! @SYMREQ REQ 6526, 6527 sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid, the contentid and compares them with expected values. sl@0: //! @SYMTestExpectedResults transactionid & contentid should be the same as the ones defined in the .ini file. sl@0: RUN_TEST_STEP 100 tcaf CAFDataStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet sl@0: END_TESTCASE SEC-CAF-STRATR-1915 sl@0: sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-3156 sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-3156 sl@0: //! @SYMTestCaseDesc Test TransactionID retrieval calling GetStringAttributeSet() sl@0: //! @SYMCR CR0895 sl@0: //! @SYMREQ REQ 6526, 6527 sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid, the contentid and compares them with expected values. sl@0: //! @SYMTestExpectedResults transactionid & contentid should be the same as the ones defined in the .ini file. sl@0: RUN_TEST_STEP 100 tcaf CAFManagerStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet sl@0: END_TESTCASE SEC-CAF-STRATR-3156 sl@0: sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-1916 sl@0: //------------------------------------------------- sl@0: //-- Step to retrieve 1char long transaction ID sl@0: //------------------------------------------------- sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-1916 sl@0: //! @SYMTestCaseDesc Test 1char long transactionid sl@0: //! @SYMCR CR0895 sl@0: //! @SYMREQ REQ 6526, 6527 sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both should match. sl@0: //! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file. sl@0: RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute1char sl@0: END_TESTCASE SEC-CAF-STRATR-1916 sl@0: sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-1919 sl@0: //------------------------------------------------- sl@0: //-- Step to retrieve 13char long Transaction ID sl@0: //------------------------------------------------- sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-1919 sl@0: //! @SYMTestCaseDesc Test 13char long transactionid sl@0: //! @SYMCR CR0895 sl@0: //! @SYMREQ REQ 6526, 6527 sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both should match. sl@0: //! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file. sl@0: RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute13char sl@0: END_TESTCASE SEC-CAF-STRATR-1919 sl@0: sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-1918 sl@0: //-------------------------------------------------- sl@0: //-- Step to retrieve 257char long transaction ID sl@0: //-------------------------------------------------- sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-1918 sl@0: //! @SYMTestCaseDesc Test addition of new entry,TransactionID, in TStringAttribute sl@0: //! @SYMCR CR0895 sl@0: //! @SYMREQ REQ 6526, 6527 sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. sl@0: //! @SYMTestExpectedResults An overflow error is expected as size of transaction ID is greater than the client side buffer size. sl@0: RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini 257LengthTransactionIDAttribute sl@0: END_TESTCASE SEC-CAF-STRATR-1918 sl@0: sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-3384 sl@0: //-------------------------------------------------- sl@0: // Regression tests for DEF 101676 sl@0: //-------------------------------------------------- sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-3384 sl@0: //! @SYMTestCaseDesc Test of GetStringAttribute functions in RTA Content module sl@0: //! @SYMDEF DEF101676 sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions RTA gets picked to read the content file, gets the StringAttribute values & compares them with expected values in the .ini file. sl@0: //! @SYMTestExpectedResults The values should match those in the .ini file sl@0: RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini ContentStringAttribute sl@0: RUN_TEST_STEP 100 tcaf CAFContentStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet sl@0: END_TESTCASE SEC-CAF-STRATR-3384 sl@0: sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-3399 sl@0: //-------------------------------------------------- sl@0: // Testing new entries added for DEF102465 sl@0: //-------------------------------------------------- sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-3399 sl@0: //! @SYMTestCaseDesc Test addition of new entries in TStringAttribute: EContentLocation & ERightsIssuerURI, and in TAttribute: EContentVersion sl@0: //! @SYMDEF DEF102465 sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestActions RTA gets picked to read the content file, gets the attributes & compares them with expected values in the .ini file. sl@0: //! @SYMTestExpectedResults Attributes in the .ini file should be identical to the ones in .content file. sl@0: RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini ContentLocationAttribute sl@0: RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini RightsIssuerURIAttribute sl@0: RUN_TEST_STEP 100 tcaf CAFContentAttributeStep c:\tcaf\stringattributes.ini ContentVersionAttribute sl@0: END_TESTCASE SEC-CAF-STRATR-3399 sl@0: sl@0: sl@0: START_TESTCASE SEC-CAF-STRATR-0003 sl@0: //! @SYMTestCaseID SEC-CAF-STRATR-0003 sl@0: //! @SYMTestCaseDesc delete the copy created earlier sl@0: RUN_TEST_STEP 100 tcaf CAFDeleteStep c:\tcaf\stringattributes.ini PrivateDeleteFileOk sl@0: END_TESTCASE SEC-CAF-STRATR-0003 sl@0: sl@0: //delete content file sl@0: RUN_UTILS Delete c:\tcaf\testdata\stringattribute.content sl@0: