|
1 // |
|
2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of the License "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 // |
|
17 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
18 // All rights reserved. |
|
19 // This component and the accompanying materials are made available |
|
20 // under the terms of the License "Symbian Foundation License v1.0" |
|
21 // which accompanies this distribution, and is available |
|
22 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
23 // |
|
24 // Initial Contributors: |
|
25 // Nokia Corporation - initial contribution. |
|
26 // |
|
27 // Contributors: |
|
28 // |
|
29 // Description: |
|
30 // |
|
31 |
|
32 LOAD_SUITE tcaf |
|
33 LOAD_SUITE RTAUtils |
|
34 |
|
35 RUN_UTILS MkDir c:\rta\ |
|
36 RUN_UTILS MkDir c:\rta\testdata\ |
|
37 RUN_UTILS MkDir c:\tcaf\ |
|
38 RUN_UTILS MkDir c:\tcaf\testdata\ |
|
39 RUN_UTILS MkDir c:\tcaf\testdata\TestAgentPrivateDir\ |
|
40 |
|
41 RUN_UTILS CopyFile z:\rta\testdata\*.* c:\rta\testdata\*.* |
|
42 RUN_UTILS CopyFile z:\tcaf\testdata\*.* c:\tcaf\testdata\*.* |
|
43 RUN_UTILS CopyFile z:\tcaf\testdata\TestAgentPrivateDir\*.* c:\tcaf\testdata\TestAgentPrivateDir\*.* |
|
44 |
|
45 |
|
46 START_TESTCASE SEC-CAF-STRATR-0001 |
|
47 //! @SYMTestCaseID SEC-CAF-STRATR-0001 |
|
48 //! @SYMTestCaseDesc CreateDrmArchive for content.xml |
|
49 RUN_TEST_STEP 100 RTAUtils CreateDrmArchive c:\tcaf\stringattributes.ini CreateDrmArchive |
|
50 END_TESTCASE SEC-CAF-STRATR-0001 |
|
51 |
|
52 START_TESTCASE SEC-CAF-STRATR-0002 |
|
53 //! @SYMTestCaseID SEC-CAF-STRATR-0002 |
|
54 //! @SYMTestCaseDesc copy stringattribute.content file to the private directory of the RTA, so the RTA gets picked |
|
55 RUN_TEST_STEP 100 tcaf CAFCopyFileStep c:\tcaf\stringattributes.ini PrivateCopyFileOk |
|
56 END_TESTCASE SEC-CAF-STRATR-0002 |
|
57 |
|
58 |
|
59 START_TESTCASE SEC-CAF-STRATR-1909 |
|
60 //------------------------------------- |
|
61 //-- Step to retrieve TransactionID |
|
62 //------------------------------------- |
|
63 //! @SYMTestCaseID SEC-CAF-STRATR-1909 |
|
64 //! @SYMTestCaseDesc Test addition of new entry,TransactionID, in TStringAttribute |
|
65 //! @SYMCR CR0895 |
|
66 //! @SYMREQ REQ 6526, 6527 |
|
67 //! @SYMTestPriority High |
|
68 //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both shuold match. |
|
69 //! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file. |
|
70 RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute |
|
71 END_TESTCASE SEC-CAF-STRATR-1909 |
|
72 |
|
73 START_TESTCASE SEC-CAF-STRATR-1914 |
|
74 //--------------------------------------------------- |
|
75 //-- Step to retrieve non existing transaction ID |
|
76 //--------------------------------------------------- |
|
77 //! @SYMTestCaseID SEC-CAF-STRATR-1914 |
|
78 //! @SYMTestCaseDesc Test retrieval of non-existing TransactionID, in TStringAttribute |
|
79 //! @SYMCR CR0895 |
|
80 //! @SYMREQ REQ 6526, 6527 |
|
81 //! @SYMTestPriority High |
|
82 //! @SYMTestActions RTA gets picked to read the content file, calls GetStringAttribute on transactionid and initiliases its value to "". |
|
83 //! @SYMTestExpectedResults expected value is empty string since there is not TransactionID attribute in this content, and expected result is KErrNotfound. |
|
84 RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini NonExistingTransactionIDAttribute |
|
85 END_TESTCASE SEC-CAF-STRATR-1914 |
|
86 |
|
87 |
|
88 |
|
89 START_TESTCASE SEC-CAF-STRATR-1915 |
|
90 //----------------------------------------------------------------- |
|
91 //-- Step to retrieve transaction ID using GetStringAttributeSet. |
|
92 //----------------------------------------------------------------- |
|
93 //! @SYMTestCaseID SEC-CAF-STRATR-1915 |
|
94 //! @SYMTestCaseDesc Test TransactionID retrieval calling GetStringAttributeSet() |
|
95 //! @SYMCR CR0895 |
|
96 //! @SYMREQ REQ 6526, 6527 |
|
97 //! @SYMTestPriority High |
|
98 //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid, the contentid and compares them with expected values. |
|
99 //! @SYMTestExpectedResults transactionid & contentid should be the same as the ones defined in the .ini file. |
|
100 RUN_TEST_STEP 100 tcaf CAFDataStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet |
|
101 END_TESTCASE SEC-CAF-STRATR-1915 |
|
102 |
|
103 |
|
104 START_TESTCASE SEC-CAF-STRATR-3156 |
|
105 //! @SYMTestCaseID SEC-CAF-STRATR-3156 |
|
106 //! @SYMTestCaseDesc Test TransactionID retrieval calling GetStringAttributeSet() |
|
107 //! @SYMCR CR0895 |
|
108 //! @SYMREQ REQ 6526, 6527 |
|
109 //! @SYMTestPriority High |
|
110 //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid, the contentid and compares them with expected values. |
|
111 //! @SYMTestExpectedResults transactionid & contentid should be the same as the ones defined in the .ini file. |
|
112 RUN_TEST_STEP 100 tcaf CAFManagerStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet |
|
113 END_TESTCASE SEC-CAF-STRATR-3156 |
|
114 |
|
115 |
|
116 START_TESTCASE SEC-CAF-STRATR-1916 |
|
117 //------------------------------------------------- |
|
118 //-- Step to retrieve 1char long transaction ID |
|
119 //------------------------------------------------- |
|
120 //! @SYMTestCaseID SEC-CAF-STRATR-1916 |
|
121 //! @SYMTestCaseDesc Test 1char long transactionid |
|
122 //! @SYMCR CR0895 |
|
123 //! @SYMREQ REQ 6526, 6527 |
|
124 //! @SYMTestPriority High |
|
125 //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both should match. |
|
126 //! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file. |
|
127 RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute1char |
|
128 END_TESTCASE SEC-CAF-STRATR-1916 |
|
129 |
|
130 |
|
131 START_TESTCASE SEC-CAF-STRATR-1919 |
|
132 //------------------------------------------------- |
|
133 //-- Step to retrieve 13char long Transaction ID |
|
134 //------------------------------------------------- |
|
135 //! @SYMTestCaseID SEC-CAF-STRATR-1919 |
|
136 //! @SYMTestCaseDesc Test 13char long transactionid |
|
137 //! @SYMCR CR0895 |
|
138 //! @SYMREQ REQ 6526, 6527 |
|
139 //! @SYMTestPriority High |
|
140 //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. Both should match. |
|
141 //! @SYMTestExpectedResults transactionid in the .ini file should be identical to the one in .content file. |
|
142 RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini TransactionIDAttribute13char |
|
143 END_TESTCASE SEC-CAF-STRATR-1919 |
|
144 |
|
145 |
|
146 START_TESTCASE SEC-CAF-STRATR-1918 |
|
147 //-------------------------------------------------- |
|
148 //-- Step to retrieve 257char long transaction ID |
|
149 //-------------------------------------------------- |
|
150 //! @SYMTestCaseID SEC-CAF-STRATR-1918 |
|
151 //! @SYMTestCaseDesc Test addition of new entry,TransactionID, in TStringAttribute |
|
152 //! @SYMCR CR0895 |
|
153 //! @SYMREQ REQ 6526, 6527 |
|
154 //! @SYMTestPriority High |
|
155 //! @SYMTestActions RTA gets picked to read the content file, gets the transactionid & compares it with expected value in the .ini file. |
|
156 //! @SYMTestExpectedResults An overflow error is expected as size of transaction ID is greater than the client side buffer size. |
|
157 RUN_TEST_STEP 100 tcaf CAFStringAttributesStep c:\tcaf\stringattributes.ini 257LengthTransactionIDAttribute |
|
158 END_TESTCASE SEC-CAF-STRATR-1918 |
|
159 |
|
160 |
|
161 START_TESTCASE SEC-CAF-STRATR-3384 |
|
162 //-------------------------------------------------- |
|
163 // Regression tests for DEF 101676 |
|
164 //-------------------------------------------------- |
|
165 //! @SYMTestCaseID SEC-CAF-STRATR-3384 |
|
166 //! @SYMTestCaseDesc Test of GetStringAttribute functions in RTA Content module |
|
167 //! @SYMDEF DEF101676 |
|
168 //! @SYMTestPriority High |
|
169 //! @SYMTestActions RTA gets picked to read the content file, gets the StringAttribute values & compares them with expected values in the .ini file. |
|
170 //! @SYMTestExpectedResults The values should match those in the .ini file |
|
171 RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini ContentStringAttribute |
|
172 RUN_TEST_STEP 100 tcaf CAFContentStringAttributeSetStep c:\tcaf\stringattributes.ini StringAttributeSet |
|
173 END_TESTCASE SEC-CAF-STRATR-3384 |
|
174 |
|
175 |
|
176 START_TESTCASE SEC-CAF-STRATR-3399 |
|
177 //-------------------------------------------------- |
|
178 // Testing new entries added for DEF102465 |
|
179 //-------------------------------------------------- |
|
180 //! @SYMTestCaseID SEC-CAF-STRATR-3399 |
|
181 //! @SYMTestCaseDesc Test addition of new entries in TStringAttribute: EContentLocation & ERightsIssuerURI, and in TAttribute: EContentVersion |
|
182 //! @SYMDEF DEF102465 |
|
183 //! @SYMTestPriority High |
|
184 //! @SYMTestActions RTA gets picked to read the content file, gets the attributes & compares them with expected values in the .ini file. |
|
185 //! @SYMTestExpectedResults Attributes in the .ini file should be identical to the ones in .content file. |
|
186 RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini ContentLocationAttribute |
|
187 RUN_TEST_STEP 100 tcaf CAFContentStringAttributeStep c:\tcaf\stringattributes.ini RightsIssuerURIAttribute |
|
188 RUN_TEST_STEP 100 tcaf CAFContentAttributeStep c:\tcaf\stringattributes.ini ContentVersionAttribute |
|
189 END_TESTCASE SEC-CAF-STRATR-3399 |
|
190 |
|
191 |
|
192 START_TESTCASE SEC-CAF-STRATR-0003 |
|
193 //! @SYMTestCaseID SEC-CAF-STRATR-0003 |
|
194 //! @SYMTestCaseDesc delete the copy created earlier |
|
195 RUN_TEST_STEP 100 tcaf CAFDeleteStep c:\tcaf\stringattributes.ini PrivateDeleteFileOk |
|
196 END_TESTCASE SEC-CAF-STRATR-0003 |
|
197 |
|
198 //delete content file |
|
199 RUN_UTILS Delete c:\tcaf\testdata\stringattribute.content |
|
200 |