|
1 // |
|
2 // Copyright (c) 2005-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 "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 //! @file |
|
18 //! @SYMTestSuiteName T_BTUserAPI |
|
19 //! @SYMScriptTestEnvironment This test script requires a basic ROM with bluetooth dongle. |
|
20 //! @SYMScriptDescription Tests all published partner elements of the TAvdtpContentProtectionCapabilities class |
|
21 //! as a means of confidence that the API works as expected. |
|
22 //! The purpose is to provide a regression test suite of PublishedPartner APIs for |
|
23 //! BT USER related classes. |
|
24 //! Negative testing is performed to confirm that correct errors are returned |
|
25 //! when incorrect parameters are given. The tests are fully automated. |
|
26 //! @SYMAuthor Jason Lin |
|
27 //! @SYMCreationDate 03/10/2008 |
|
28 /////////////////////////////////////////////////////////////////////////////// |
|
29 |
|
30 RUN_UTILS MkDir ${SYSDRIVE}\bluetooth\user\ |
|
31 |
|
32 LOAD_SUITE T_BTUserAPI |
|
33 DELAY 1000 |
|
34 |
|
35 ///////////////////////////////////////////////////////// |
|
36 //TAvdtpContentProtectionCapabilities |
|
37 ///////////////////////////////////////////////////////// |
|
38 |
|
39 |
|
40 START_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0001 |
|
41 //! @SYMTestCaseID BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0001 |
|
42 //! @SYMAPI TAvdtpContentProtectionCapabilities::TAvdtpContentProtectionCapabilities() |
|
43 //! @SYMAuthor Jason Lin |
|
44 //! @SYMCreationDate 02/29/2008 |
|
45 //! @SYMTestCaseDesc Create a TAvdtpContentProtectionCapabilities object by C++ default constructor |
|
46 //! @SYMTestActions 1.Create a TAvdtpContentProtectionCapabilities object |
|
47 //! 2.Destruct the TAvdtpContentProtectionCapabilities object |
|
48 //! @SYMTestStatus Implemented |
|
49 //! @SYMTestPriority Critical |
|
50 //! @SYMTestExpectedResults TAvdtpContentProtectionCapabilities object was created without panic |
|
51 //! @SYMTestType CIT |
|
52 |
|
53 START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-AvdtpContentProtectionCapa-PublishedPartner.ini |
|
54 CREATE_OBJECT TAvdtpContentProtectionCapabilities avdtpcpc |
|
55 COMMAND avdtpcpc new |
|
56 COMMAND avdtpcpc ~ |
|
57 END_TEST_BLOCK |
|
58 END_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0001 |
|
59 |
|
60 |
|
61 |
|
62 START_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002 |
|
63 //! @SYMTestCaseID BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002 |
|
64 //! @SYMAPI TAvdtpContentProtectionCapabilities::ContentProtectionType(); |
|
65 //! TAvdtpContentProtectionCapabilities::SetContentProtectionType( TUint16 ) |
|
66 //! @SYMAuthor Jason Lin |
|
67 //! @SYMCreationDate 02/29/2008 |
|
68 //! @SYMTestCaseDesc 1.Set the content protection type |
|
69 //! 2.Get the content protection type |
|
70 //! @SYMTestActions 1.Create a TAvdtpContentProtectionCapabilities object |
|
71 //! 2.Set the content protection type ( 0 ) to the AvdtpContentProtectionCapabilities object |
|
72 //! 3.Get the content protection type |
|
73 //! 4.Set the content protection type ( 1 ) to the AvdtpContentProtectionCapabilities object |
|
74 //! 5.Get the content protection type |
|
75 //! 6.Set the content protection type ( 65535 ) to the AvdtpContentProtectionCapabilities object |
|
76 //! 7.Get the content protection type |
|
77 //! 8.Destruct the TAvdtpContentProtectionCapabilities object |
|
78 //! @SYMTestStatus Implemented |
|
79 //! @SYMTestPriority High |
|
80 //! @SYMTestExpectedResults 1.Called without causing panic and returns value as expected |
|
81 //! 1.1.Step 3 return content protection type 0 |
|
82 //! 1.2.Step 5 return content protection type 1 |
|
83 //! 1.3.Step 7 return content protection type 65535 |
|
84 //! @SYMTestType CIT |
|
85 |
|
86 START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-AvdtpContentProtectionCapa-PublishedPartner.ini |
|
87 CREATE_OBJECT TAvdtpContentProtectionCapabilities avdtpcpc |
|
88 COMMAND avdtpcpc new |
|
89 COMMAND avdtpcpc SetContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-SetContentProtectionType_Command02 |
|
90 COMMAND avdtpcpc ContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-ContentProtectionType_Command03 |
|
91 COMMAND avdtpcpc SetContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-SetContentProtectionType_Command04 |
|
92 COMMAND avdtpcpc ContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-ContentProtectionType_Command05 |
|
93 COMMAND avdtpcpc SetContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-SetContentProtectionType_Command06 |
|
94 COMMAND avdtpcpc ContentProtectionType BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002-0001-ContentProtectionType_Command07 |
|
95 COMMAND avdtpcpc ~ |
|
96 END_TEST_BLOCK |
|
97 END_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0002 |
|
98 |
|
99 |
|
100 START_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003 |
|
101 //! @SYMTestCaseID BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003 |
|
102 //! @SYMAPI TAvdtpContentProtectionCapabilities::ContentProtectionData(); |
|
103 //! TAvdtpContentProtectionCapabilities::SetContentProtectionData( const TDesC8 {ref} ) |
|
104 //! @SYMAuthor Jason Lin |
|
105 //! @SYMCreationDate 02/29/2008 |
|
106 //! @SYMTestCaseDesc 1.Set the content protection data |
|
107 //! 2.Get the content protection data, and verify the data |
|
108 //! @SYMTestActions 1.Create a TAvdtpContentProtectionCapabilities object |
|
109 //! 2.Set the content protection data ( "initial data" ) to the AvdtpContentProtectionCapabilities object |
|
110 //! 3.Get the content protection data |
|
111 //! 4.Set the content protection data ( "content data" ) to the AvdtpContentProtectionCapabilities object |
|
112 //! 5.Get the content protection data |
|
113 //! 6.Destruct the TAvdtpContentProtectionCapabilities object |
|
114 //! @SYMTestStatus Implemented |
|
115 //! @SYMTestPriority High |
|
116 //! @SYMTestExpectedResults 1.Called without causing panic and returns value as expected |
|
117 //! 1.1.Step 3 return the protection data "initial data" |
|
118 //! 1.2.Step 5 return the protection data "content data" |
|
119 //! @SYMTestType CIT |
|
120 START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-AvdtpContentProtectionCapa-PublishedPartner.ini |
|
121 CREATE_OBJECT TAvdtpContentProtectionCapabilities avdtpcpc |
|
122 COMMAND avdtpcpc new |
|
123 COMMAND avdtpcpc SetContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003-0001-SetContentProtectionData_Command02 |
|
124 COMMAND avdtpcpc ContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003-0001-ContentProtectionData_Command03 |
|
125 COMMAND avdtpcpc SetContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003-0001-SetContentProtectionData_Command04 |
|
126 COMMAND avdtpcpc ContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003-0001-ContentProtectionData_Command05 |
|
127 COMMAND avdtpcpc ~ |
|
128 END_TEST_BLOCK |
|
129 END_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0003 |
|
130 |
|
131 |
|
132 START_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0004 |
|
133 //! @SYMTestCaseID BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0004 |
|
134 //! @SYMAPI TAvdtpContentProtectionCapabilities::Category() |
|
135 //! @SYMAuthor Jason Lin |
|
136 //! @SYMCreationDate 02/29/2008 |
|
137 //! @SYMTestCaseDesc (Inherited from TAvdtpServiceCapability)Get the TAvdtpServiceCategory enumeration value |
|
138 //! @SYMTestActions 1.Create a TAvdtpContentProtectionCapabilities object |
|
139 //! 2.Get the TAvdtpServiceCategory enumeration value |
|
140 //! 3.Destruct the TAvdtpContentProtectionCapabilities object |
|
141 //! @SYMTestStatus Implemented |
|
142 //! @SYMTestPriority High |
|
143 //! @SYMTestExpectedResults Called without causing panic and return value (EServiceCategoryContentProtection) as expected. |
|
144 //! @SYMTestType CIT |
|
145 START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-AvdtpContentProtectionCapa-PublishedPartner.ini |
|
146 CREATE_OBJECT TAvdtpContentProtectionCapabilities avdtpcpc |
|
147 COMMAND avdtpcpc new |
|
148 COMMAND avdtpcpc Category BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0004-0001-Category_Command02 |
|
149 COMMAND avdtpcpc ~ |
|
150 END_TEST_BLOCK |
|
151 END_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0004 |
|
152 |
|
153 START_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009 |
|
154 //! @SYMTestCaseID BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009 |
|
155 //! @SYMAPI TAvdtpContentProtectionCapabilities::ContentProtectionData(); |
|
156 //! TAvdtpContentProtectionCapabilities::SetContentProtectionData( const TDesC8 {ref} ) |
|
157 //! @SYMAuthor Jason Lin |
|
158 //! @SYMCreationDate 03/26/2008 |
|
159 //! @SYMTestCaseDesc 1.Set the content protection data |
|
160 //! 2.Get the content protection data, and verify the data |
|
161 //! @SYMTestActions 1.Create a TAvdtpContentProtectionCapabilities object |
|
162 //! 2.Set the content protection data with empty string to the AvdtpContentProtectionCapabilities object |
|
163 //! 3.Get the content protection data |
|
164 //! 4.Set the content protection data ( "content data" ) to the AvdtpContentProtectionCapabilities object |
|
165 //! 5.Get the content protection data |
|
166 //! 6.Set the content protection data with empty string to the AvdtpContentProtectionCapabilities object |
|
167 //! 7.Get the content protection data |
|
168 //! 8.Destruct the TAvdtpContentProtectionCapabilities object |
|
169 //! @SYMTestStatus Implemented |
|
170 //! @SYMTestPriority High |
|
171 //! @SYMTestExpectedResults 1.Called without causing panic and returns value as expected |
|
172 //! 1.1.Step 3 return empty string |
|
173 //! 1.2.Step 5 return "content data" |
|
174 //! 1.3.Step 7 return empty string |
|
175 //! @SYMTestType CIT |
|
176 START_TEST_BLOCK 10 T_BTUserAPI \bluetooth\user\BT-USER-AvdtpContentProtectionCapa-PublishedPartner.ini |
|
177 CREATE_OBJECT TAvdtpContentProtectionCapabilities avdtpcpc |
|
178 COMMAND avdtpcpc new |
|
179 COMMAND avdtpcpc SetContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-SetContentProtectionData_Command02 |
|
180 COMMAND avdtpcpc ContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-ContentProtectionData_Command03 |
|
181 COMMAND avdtpcpc SetContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-SetContentProtectionData_Command04 |
|
182 COMMAND avdtpcpc ContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-ContentProtectionData_Command05 |
|
183 COMMAND avdtpcpc SetContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-SetContentProtectionData_Command06 |
|
184 COMMAND avdtpcpc ContentProtectionData BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009-0001-ContentProtectionData_Command07 |
|
185 COMMAND avdtpcpc ~ |
|
186 END_TEST_BLOCK |
|
187 END_TESTCASE BT-USER-AvdtpContentProtectionCapa-PublishedPartner-0009 |
|
188 |
|
189 DELAY 2000 |