1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/contentmgmt/referencedrmagent/tcaf/scripts/stringattributes.script Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,186 @@
1.4 +//
1.5 +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Eclipse Public License v1.0"
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +
1.21 +LOAD_SUITE tcaf
1.22 +LOAD_SUITE RTAUtils
1.23 +
1.24 +RUN_UTILS MkDir c:\rta\
1.25 +RUN_UTILS MkDir c:\rta\testdata\
1.26 +RUN_UTILS MkDir c:\tcaf\
1.27 +RUN_UTILS MkDir c:\tcaf\testdata\
1.28 +RUN_UTILS MkDir c:\tcaf\testdata\TestAgentPrivateDir\
1.29 +
1.30 +RUN_UTILS CopyFile z:\rta\testdata\*.* c:\rta\testdata\*.*
1.31 +RUN_UTILS CopyFile z:\tcaf\testdata\*.* c:\tcaf\testdata\*.*
1.32 +RUN_UTILS CopyFile z:\tcaf\testdata\TestAgentPrivateDir\*.* c:\tcaf\testdata\TestAgentPrivateDir\*.*
1.33 +
1.34 +
1.35 +START_TESTCASE SEC-CAF-STRATR-0001
1.36 +//! @SYMTestCaseID SEC-CAF-STRATR-0001
1.37 +//! @SYMTestCaseDesc CreateDrmArchive for content.xml
1.38 +RUN_TEST_STEP 100 RTAUtils CreateDrmArchive c:\tcaf\stringattributes.ini CreateDrmArchive
1.39 +END_TESTCASE SEC-CAF-STRATR-0001
1.40 +
1.41 +START_TESTCASE SEC-CAF-STRATR-0002
1.42 +//! @SYMTestCaseID SEC-CAF-STRATR-0002
1.43 +//! @SYMTestCaseDesc copy stringattribute.content file to the private directory of the RTA, so the RTA gets picked
1.44 +RUN_TEST_STEP 100 tcaf CAFCopyFileStep c:\tcaf\stringattributes.ini PrivateCopyFileOk
1.45 +END_TESTCASE SEC-CAF-STRATR-0002
1.46 +
1.47 +
1.48 +START_TESTCASE SEC-CAF-STRATR-1909
1.49 +//-------------------------------------
1.50 +//-- Step to retrieve TransactionID
1.51 +//-------------------------------------
1.52 +//! @SYMTestCaseID SEC-CAF-STRATR-1909
1.53 +//! @SYMTestCaseDesc Test addition of new entry,TransactionID, in TStringAttribute
1.54 +//! @SYMCR CR0895
1.55 +//! @SYMREQ REQ 6526, 6527
1.56 +//! @SYMTestPriority High
1.57 +//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both shuold match.
1.58 +//! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file.
1.59 +RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute
1.60 +END_TESTCASE SEC-CAF-STRATR-1909
1.61 +
1.62 +START_TESTCASE SEC-CAF-STRATR-1914
1.63 +//---------------------------------------------------
1.64 +//-- Step to retrieve non existing transaction ID
1.65 +//---------------------------------------------------
1.66 +//! @SYMTestCaseID SEC-CAF-STRATR-1914
1.67 +//! @SYMTestCaseDesc Test retrieval of non-existing TransactionID, in TStringAttribute
1.68 +//! @SYMCR CR0895
1.69 +//! @SYMREQ REQ 6526, 6527
1.70 +//! @SYMTestPriority High
1.71 +//! @SYMTestActions RTA gets picked to read the content file, calls GetStringAttribute on transactionid and initiliases its value to "".
1.72 +//! @SYMTestExpectedResults expected value is empty string since there is not TransactionID attribute in this content, and expected result is KErrNotfound.
1.73 +RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini NonExistingTransactionIDAttribute
1.74 +END_TESTCASE SEC-CAF-STRATR-1914
1.75 +
1.76 +
1.77 +
1.78 +START_TESTCASE SEC-CAF-STRATR-1915
1.79 +//-----------------------------------------------------------------
1.80 +//-- Step to retrieve transaction ID using GetStringAttributeSet.
1.81 +//-----------------------------------------------------------------
1.82 +//! @SYMTestCaseID SEC-CAF-STRATR-1915
1.83 +//! @SYMTestCaseDesc Test TransactionID retrieval calling GetStringAttributeSet()
1.84 +//! @SYMCR CR0895
1.85 +//! @SYMREQ REQ 6526, 6527
1.86 +//! @SYMTestPriority High
1.87 +//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid, the contentid and compares them with expected values.
1.88 +//! @SYMTestExpectedResults transactionid & contentid should be the same as the ones defined in the .ini file.
1.89 +RUN_TEST_STEP 100 tcaf CAFDataStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet
1.90 +END_TESTCASE SEC-CAF-STRATR-1915
1.91 +
1.92 +
1.93 +START_TESTCASE SEC-CAF-STRATR-3156
1.94 +//! @SYMTestCaseID SEC-CAF-STRATR-3156
1.95 +//! @SYMTestCaseDesc Test TransactionID retrieval calling GetStringAttributeSet()
1.96 +//! @SYMCR CR0895
1.97 +//! @SYMREQ REQ 6526, 6527
1.98 +//! @SYMTestPriority High
1.99 +//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid, the contentid and compares them with expected values.
1.100 +//! @SYMTestExpectedResults transactionid & contentid should be the same as the ones defined in the .ini file.
1.101 +RUN_TEST_STEP 100 tcaf CAFManagerStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet
1.102 +END_TESTCASE SEC-CAF-STRATR-3156
1.103 +
1.104 +
1.105 +START_TESTCASE SEC-CAF-STRATR-1916
1.106 +//-------------------------------------------------
1.107 +//-- Step to retrieve 1char long transaction ID
1.108 +//-------------------------------------------------
1.109 +//! @SYMTestCaseID SEC-CAF-STRATR-1916
1.110 +//! @SYMTestCaseDesc Test 1char long transactionid
1.111 +//! @SYMCR CR0895
1.112 +//! @SYMREQ REQ 6526, 6527
1.113 +//! @SYMTestPriority High
1.114 +//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both should match.
1.115 +//! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file.
1.116 +RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute1char
1.117 +END_TESTCASE SEC-CAF-STRATR-1916
1.118 +
1.119 +
1.120 +START_TESTCASE SEC-CAF-STRATR-1919
1.121 +//-------------------------------------------------
1.122 +//-- Step to retrieve 13char long Transaction ID
1.123 +//-------------------------------------------------
1.124 +//! @SYMTestCaseID SEC-CAF-STRATR-1919
1.125 +//! @SYMTestCaseDesc Test 13char long transactionid
1.126 +//! @SYMCR CR0895
1.127 +//! @SYMREQ REQ 6526, 6527
1.128 +//! @SYMTestPriority High
1.129 +//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both should match.
1.130 +//! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file.
1.131 +RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute13char
1.132 +END_TESTCASE SEC-CAF-STRATR-1919
1.133 +
1.134 +
1.135 +START_TESTCASE SEC-CAF-STRATR-1918
1.136 +//--------------------------------------------------
1.137 +//-- Step to retrieve 257char long transaction ID
1.138 +//--------------------------------------------------
1.139 +//! @SYMTestCaseID SEC-CAF-STRATR-1918
1.140 +//! @SYMTestCaseDesc Test addition of new entry,TransactionID, in TStringAttribute
1.141 +//! @SYMCR CR0895
1.142 +//! @SYMREQ REQ 6526, 6527
1.143 +//! @SYMTestPriority High
1.144 +//! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file.
1.145 +//! @SYMTestExpectedResults An overflow error is expected as size of transaction ID is greater than the client side buffer size.
1.146 +RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini 257LengthTransactionIDAttribute
1.147 +END_TESTCASE SEC-CAF-STRATR-1918
1.148 +
1.149 +
1.150 +START_TESTCASE SEC-CAF-STRATR-3384
1.151 +//--------------------------------------------------
1.152 +// Regression tests for DEF 101676
1.153 +//--------------------------------------------------
1.154 +//! @SYMTestCaseID SEC-CAF-STRATR-3384
1.155 +//! @SYMTestCaseDesc Test of GetStringAttribute functions in RTA Content module
1.156 +//! @SYMDEF DEF101676
1.157 +//! @SYMTestPriority High
1.158 +//! @SYMTestActions RTA gets picked to read the content file, gets the StringAttribute values & compares them with expected values in the .ini file.
1.159 +//! @SYMTestExpectedResults The values should match those in the .ini file
1.160 +RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini ContentStringAttribute
1.161 +RUN_TEST_STEP 100 tcaf CAFContentStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet
1.162 +END_TESTCASE SEC-CAF-STRATR-3384
1.163 +
1.164 +
1.165 +START_TESTCASE SEC-CAF-STRATR-3399
1.166 +//--------------------------------------------------
1.167 +// Testing new entries added for DEF102465
1.168 +//--------------------------------------------------
1.169 +//! @SYMTestCaseID SEC-CAF-STRATR-3399
1.170 +//! @SYMTestCaseDesc Test addition of new entries in TStringAttribute: EContentLocation & ERightsIssuerURI, and in TAttribute: EContentVersion
1.171 +//! @SYMDEF DEF102465
1.172 +//! @SYMTestPriority High
1.173 +//! @SYMTestActions RTA gets picked to read the content file, gets the attributes & compares them with expected values in the .ini file.
1.174 +//! @SYMTestExpectedResults Attributes in the .ini file should be identical to the ones in .content file.
1.175 +RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini ContentLocationAttribute
1.176 +RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini RightsIssuerURIAttribute
1.177 +RUN_TEST_STEP 100 tcaf CAFContentAttributeStep c:\tcaf\stringattributes.ini ContentVersionAttribute
1.178 +END_TESTCASE SEC-CAF-STRATR-3399
1.179 +
1.180 +
1.181 +START_TESTCASE SEC-CAF-STRATR-0003
1.182 +//! @SYMTestCaseID SEC-CAF-STRATR-0003
1.183 +//! @SYMTestCaseDesc delete the copy created earlier
1.184 +RUN_TEST_STEP 100 tcaf CAFDeleteStep c:\tcaf\stringattributes.ini PrivateDeleteFileOk
1.185 +END_TESTCASE SEC-CAF-STRATR-0003
1.186 +
1.187 +//delete content file
1.188 +RUN_UTILS Delete c:\tcaf\testdata\stringattribute.content
1.189 +