119 return; |
86 return; |
120 } |
87 } |
121 |
88 |
122 switch(aCurTestCase) |
89 switch(aCurTestCase) |
123 { |
90 { |
|
91 /** |
|
92 @SYMTestCaseID |
|
93 GRAPHICS-FBSERV-0603 |
|
94 |
|
95 @SYMTestCaseDesc |
|
96 Tests the sending of commands to a FbsSession |
|
97 server thru Inter Process Communication. Sends |
|
98 both valid and invalid commands. |
|
99 |
|
100 @SYMTestActions |
|
101 Commands sent to the server: |
|
102 1. EFbsMessShutdown |
|
103 2. EFbsMessFontHeightInTwips |
|
104 3. EFbsMessFontHeightInTwips |
|
105 4. EFbsMessFontHeightInPixels |
|
106 5. EFbsMessFontHeightInPixels |
|
107 6. EFbsMessAddFontStoreFile |
|
108 7. EFbsMessAddFontStoreFile |
|
109 8. EFbsMessInstallFontStoreFile |
|
110 9. EFbsMessInstallFontStoreFile |
|
111 10. EFbsMessInstallFontStoreFile |
|
112 11. EFbsMessBitmapCreate |
|
113 12. EFbsMessRasterize |
|
114 13. EFbsMessFaceAttrib |
|
115 14. EFbsMessHasCharacter |
|
116 15. EFbsMessFontNameAlias |
|
117 16. EFbsMessGetNearestFontToDesignHeightInTwips |
|
118 17. EFbsMessGetNearestFontToMaxHeightInTwips |
|
119 18. EFbsMessGetNearestFontToDesignHeightInPixels |
|
120 19. EFbsMessGetNearestFontToMaxHeightInPixels |
|
121 20. EFbsMessShapeText |
|
122 21. EFbsMessShapeDelete |
|
123 22. EFbsMessSetTwipsHeight |
|
124 23. EFbsMessGetTwipsHeight |
|
125 |
|
126 @SYMTestExpectedResults |
|
127 Test should pass |
|
128 */ |
124 case 1: |
129 case 1: |
125 INFO_PRINTF1(_L("Shutdown\r\n")); |
130 INFO_PRINTF1(_L("Shutdown")); |
126 iFbs->SendCommand(EFbsMessShutdown); |
131 iFbs->SendCommand(EFbsMessShutdown); |
127 TestComplete(); |
132 TestComplete(); |
128 break; |
133 break; |
129 case 2: |
134 case 2: |
130 INFO_PRINTF1(_L("Height in twips with negative typeface index\r\n")); |
135 INFO_PRINTF1(_L("Height in twips with negative typeface index")); |
131 iFbs->SendCommand(EFbsMessFontHeightInTwips, -1); |
136 iFbs->SendCommand(EFbsMessFontHeightInTwips, -1); |
132 TEST(EFalse); // Previous line should have paniced |
137 TEST(EFalse); // Previous line should have paniced |
133 TestComplete(); |
138 TestComplete(); |
134 break; |
139 break; |
135 case 3: |
140 case 3: |
136 INFO_PRINTF1(_L("Height in twips with invalid size\r\n")); |
141 INFO_PRINTF1(_L("Height in twips with invalid size")); |
137 iClient.SendInvalidSize(EFbsMessFontHeightInTwips); |
142 iClient.SendInvalidSize(EFbsMessFontHeightInTwips); |
138 TEST(EFalse); |
143 TEST(EFalse); |
139 TestComplete(); |
144 TestComplete(); |
140 break; |
145 break; |
141 case 4: |
146 case 4: |
142 INFO_PRINTF1(_L("Height in pixels with negative typeface index\r\n")); |
147 INFO_PRINTF1(_L("Height in pixels with negative typeface index")); |
143 iFbs->SendCommand(EFbsMessFontHeightInPixels, -1); |
148 iFbs->SendCommand(EFbsMessFontHeightInPixels, -1); |
144 TEST(EFalse); |
149 TEST(EFalse); |
145 TestComplete(); |
150 TestComplete(); |
146 break; |
151 break; |
147 case 5: |
152 case 5: |
148 INFO_PRINTF1(_L("Height in pixels with invalid size\r\n")); |
153 INFO_PRINTF1(_L("Height in pixels with invalid size")); |
149 iClient.SendInvalidSize(EFbsMessFontHeightInPixels); |
154 iClient.SendInvalidSize(EFbsMessFontHeightInPixels); |
150 TEST(EFalse); |
155 TEST(EFalse); |
151 TestComplete(); |
156 TestComplete(); |
152 break; |
157 break; |
153 case 6: |
158 case 6: |
154 INFO_PRINTF1(_L("Add font store file with negative length\r\n")); |
159 INFO_PRINTF1(_L("Add font store file with negative length")); |
155 iFbs->SendCommand(EFbsMessAddFontStoreFile, 0, -1); |
160 iFbs->SendCommand(EFbsMessAddFontStoreFile, 0, -1); |
156 TEST(EFalse); |
161 TEST(EFalse); |
157 TestComplete(); |
162 TestComplete(); |
158 break; |
163 break; |
159 case 7: |
164 case 7: |
160 INFO_PRINTF1(_L("Add font store file with huge length\r\n")); |
165 INFO_PRINTF1(_L("Add font store file with huge length")); |
161 iFbs->SendCommand(EFbsMessAddFontStoreFile, 963955448, 963955368, 963955300, 963955232); |
166 iFbs->SendCommand(EFbsMessAddFontStoreFile, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
162 TEST(EFalse); |
167 TEST(EFalse); |
163 TestComplete(); |
168 TestComplete(); |
164 break; |
169 break; |
165 case 8: |
170 case 8: |
166 INFO_PRINTF1(_L("Install font store file with negative length\r\n")); |
171 INFO_PRINTF1(_L("Install font store file with negative length")); |
167 iFbs->SendCommand(EFbsMessInstallFontStoreFile, 0, -1); |
172 iFbs->SendCommand(EFbsMessInstallFontStoreFile, 0, -1); |
168 TEST(EFalse); |
173 TEST(EFalse); |
169 TestComplete(); |
174 TestComplete(); |
170 break; |
175 break; |
171 case 9: |
176 case 9: |
172 INFO_PRINTF1(_L("Install font store file with huge length\r\n")); |
177 INFO_PRINTF1(_L("Install font store file with huge length")); |
173 iFbs->SendCommand(EFbsMessInstallFontStoreFile, 963955448, 963955368, 963955300, 963955232); |
178 iFbs->SendCommand(EFbsMessInstallFontStoreFile, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
174 TEST(EFalse); |
179 TEST(EFalse); |
175 TestComplete(); |
180 TestComplete(); |
176 break; |
181 break; |
177 case 10: |
182 case 10: |
178 INFO_PRINTF1(_L("Remove font store file with active references\r\n")); |
183 INFO_PRINTF1(_L("Remove font store file with active references")); |
179 iFbs->SendCommand(EFbsMessRemoveFontStoreFile, 11); |
184 iFbs->SendCommand(EFbsMessRemoveFontStoreFile, 11); |
180 // With PDEF121246 (INC120690) fix in place, this test will always pass. Without the fix there will be a KERN 4 panic. |
185 // With PDEF121246 (INC120690) fix in place, this test will always pass. Without the fix there will be a KERN 4 panic. |
181 TEST(ETrue); |
186 TEST(ETrue); |
182 TestComplete(); |
187 TestComplete(); |
183 break; |
188 break; |
184 case 11: |
189 case 11: |
185 INFO_PRINTF1(_L("Bitmap create with invalid display mode\r\n")); |
190 INFO_PRINTF1(_L("Bitmap create with invalid display mode")); |
186 iClient.SendInvalidDisplayMode(EFbsMessBitmapCreate); |
191 iClient.SendInvalidDisplayMode(EFbsMessBitmapCreate); |
187 TEST(EFalse); |
192 TEST(EFalse); |
188 TestComplete(); |
193 TestComplete(); |
189 break; |
194 break; |
190 case 12: |
195 case 12: |
191 INFO_PRINTF1(_L("Rasterize with invalid bitmap handle\r\n")); |
196 INFO_PRINTF1(_L("Rasterize with invalid bitmap handle")); |
192 iFbs->SendCommand(EFbsMessRasterize, 963955448, 963955368, 963955300, 963955232); |
197 iFbs->SendCommand(EFbsMessRasterize, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
193 TEST(EFalse); |
198 TEST(EFalse); |
194 TestComplete(); |
199 TestComplete(); |
195 break; |
200 break; |
196 case 13: |
201 case 13: |
197 INFO_PRINTF1(_L("Face Attribute with invalid bitmap handle\r\n")); |
202 INFO_PRINTF1(_L("Face Attribute with invalid bitmap handle")); |
198 iFbs->SendCommand(EFbsMessFaceAttrib, 963955448, 963955368, 963955300, 963955232); |
203 iFbs->SendCommand(EFbsMessFaceAttrib, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
199 TEST(EFalse); |
204 TEST(EFalse); |
200 TestComplete(); |
205 TestComplete(); |
201 break; |
206 break; |
202 case 14: |
207 case 14: |
203 INFO_PRINTF1(_L("Has Character with invalid bitmap handle\r\n")); |
208 INFO_PRINTF1(_L("Has Character with invalid bitmap handle")); |
204 iFbs->SendCommand(EFbsMessHasCharacter, 963955448, 963955368, 963955300, 963955232); |
209 iFbs->SendCommand(EFbsMessHasCharacter, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
205 TEST(EFalse); |
210 TEST(EFalse); |
206 TestComplete(); |
211 TestComplete(); |
207 break; |
212 break; |
208 case 15: |
213 case 15: |
209 INFO_PRINTF1(_L("Name Alias with huge alias name length\r\n")); |
214 INFO_PRINTF1(_L("Name Alias with huge alias name length")); |
210 iFbs->SendCommand(EFbsMessFontNameAlias, 963955448, 963955368, 963955300, 963955232); |
215 iFbs->SendCommand(EFbsMessFontNameAlias, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
211 TEST(EFalse); |
216 TEST(EFalse); |
212 TestComplete(); |
217 TestComplete(); |
213 break; |
218 break; |
214 case 16: |
219 case 16: |
215 INFO_PRINTF1(_L("Get nearest font to design height in twips with invalid typeface name length\r\n")); |
220 INFO_PRINTF1(_L("Get nearest font to design height in twips with invalid typeface name length")); |
216 iClient.SendInvalidNameLength(EFbsMessGetNearestFontToDesignHeightInTwips); |
221 iClient.SendInvalidNameLength(EFbsMessGetNearestFontToDesignHeightInTwips); |
217 TEST(EFalse); |
222 TEST(EFalse); |
218 TestComplete(); |
223 TestComplete(); |
219 break; |
224 break; |
220 case 17: |
225 case 17: |
221 INFO_PRINTF1(_L("Get nearest font to max height in twips with invalid typeface name length\r\n")); |
226 INFO_PRINTF1(_L("Get nearest font to max height in twips with invalid typeface name length")); |
222 iClient.SendInvalidNameLength(EFbsMessGetNearestFontToMaxHeightInTwips); |
227 iClient.SendInvalidNameLength(EFbsMessGetNearestFontToMaxHeightInTwips); |
223 TEST(EFalse); |
228 TEST(EFalse); |
224 TestComplete(); |
229 TestComplete(); |
225 break; |
230 break; |
226 case 18: |
231 case 18: |
227 INFO_PRINTF1(_L("Get nearest font to design height in pixels with invalid typeface name length\r\n")); |
232 INFO_PRINTF1(_L("Get nearest font to design height in pixels with invalid typeface name length")); |
228 iClient.SendInvalidNameLength(EFbsMessGetNearestFontToDesignHeightInPixels); |
233 iClient.SendInvalidNameLength(EFbsMessGetNearestFontToDesignHeightInPixels); |
229 TEST(EFalse); |
234 TEST(EFalse); |
230 TestComplete(); |
235 TestComplete(); |
231 break; |
236 break; |
232 case 19: |
237 case 19: |
233 INFO_PRINTF1(_L("Get nearest font to max height in pixels with invalid typeface name length\r\n")); |
238 INFO_PRINTF1(_L("Get nearest font to max height in pixels with invalid typeface name length")); |
234 iClient.SendInvalidNameLength(EFbsMessGetNearestFontToMaxHeightInPixels); |
239 iClient.SendInvalidNameLength(EFbsMessGetNearestFontToMaxHeightInPixels); |
235 TEST(EFalse); |
240 TEST(EFalse); |
236 TestComplete(); |
241 TestComplete(); |
237 break; |
242 break; |
238 case 20: |
243 case 20: |
239 INFO_PRINTF1(_L("Shape text with invalid bitmap font handle\r\n")); |
244 INFO_PRINTF1(_L("Shape text with invalid bitmap font handle")); |
240 iFbs->SendCommand(EFbsMessShapeText, 963955448, 963955368, 963955300, 963955232); |
245 iFbs->SendCommand(EFbsMessShapeText, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
241 TEST(EFalse); |
246 TEST(EFalse); |
242 TestComplete(); |
247 TestComplete(); |
243 break; |
248 break; |
244 case 21: |
249 case 21: |
245 INFO_PRINTF1(_L("Shape delete with invalid bitmap font handle\r\n")); |
250 INFO_PRINTF1(_L("Shape delete with invalid bitmap font handle")); |
246 iFbs->SendCommand(EFbsMessShapeDelete, 963955448, 963955368, 963955300, 963955232); |
251 iFbs->SendCommand(EFbsMessShapeDelete, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
247 TEST(EFalse); |
252 TEST(EFalse); |
248 TestComplete(); |
253 TestComplete(); |
249 break; |
254 break; |
250 case 22: |
255 case 22: |
251 INFO_PRINTF1(_L("Set twips height with invalid font handle\r\n")); |
256 INFO_PRINTF1(_L("Set twips height with invalid font handle")); |
252 iFbs->SendCommand(EFbsMessSetTwipsHeight, 963955448, 963955368, 963955300, 963955232); |
257 iFbs->SendCommand(EFbsMessSetTwipsHeight, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
253 TEST(EFalse); |
258 TEST(EFalse); |
254 TestComplete(); |
259 TestComplete(); |
255 break; |
260 break; |
256 case 23: |
261 case 23: |
257 INFO_PRINTF1(_L("Get twips height with invalid font handle\r\n")); |
262 INFO_PRINTF1(_L("Get twips height with invalid font handle")); |
258 ((CTIPCTestStep*)iStep)->SetOverallTestStepID(_L("GRAPHICS-FBSERV-0603")); |
263 iFbs->SendCommand(EFbsMessGetTwipsHeight, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
259 ((CTIPCTestStep*)iStep)->RecordTestResultL(); |
|
260 ((CTIPCTestStep*)iStep)->CloseTMSGraphicsStep(); |
|
261 iFbs->SendCommand(EFbsMessGetTwipsHeight, 963955448, 963955368, 963955300, 963955232); |
|
262 TEST(EFalse); |
264 TEST(EFalse); |
263 TestComplete(); |
265 TestComplete(); |
264 break; |
266 break; |
265 case 24: |
267 case 24: |
|
268 /** |
|
269 @SYMTestCaseID GRAPHICS-FBSERV-0630 |
|
270 |
|
271 @SYMTestCaseDesc |
|
272 Tests that invalid font handle to EFbsMessGetGlyphs causes panic |
|
273 |
|
274 @SYMTestExpectedResults |
|
275 Client should panic with FBSERV -8 |
|
276 */ |
|
277 INFO_PRINTF1(_L("Get glyphs from glyph atlas with invalid font handle")); |
|
278 iFbs->SendCommand(EFbsMessGetGlyphs, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
|
279 TEST(EFalse); |
|
280 TestComplete(); |
|
281 break; |
|
282 case 25: |
|
283 /** |
|
284 @SYMTestCaseID GRAPHICS-FBSERV-0670 |
|
285 |
|
286 @SYMTestCaseDesc |
|
287 Tests that invalid font handle to EFbsMessGetGlyphMetrics causes panic |
|
288 |
|
289 @SYMTestExpectedResults |
|
290 Client should panic with FBSERV -8 |
|
291 */ |
|
292 INFO_PRINTF1(_L("Get glyph metrics with invalid font handle")); |
|
293 iFbs->SendCommand(EFbsMessGetGlyphMetrics, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
|
294 TEST(EFalse); |
|
295 TestComplete(); |
|
296 break; |
|
297 /** |
|
298 @SYMTestCaseID |
|
299 TI18N-GDI-CIT-4086 |
|
300 |
|
301 @SYMTestCaseDesc |
|
302 Test if FBS can handle invalid messages correctly |
|
303 and panic the client as needed. |
|
304 |
|
305 @SYMTestActions |
|
306 26. EFbsMessGetFontTable |
|
307 27. EFbsMessReleaseFontTable |
|
308 28. EFbsMessGetGlyphOutline |
|
309 29. EFbsMessReleaseGlyphOutline |
|
310 |
|
311 @SYMTestExpectedResults |
|
312 Test should pass |
|
313 */ |
|
314 case 26: |
|
315 INFO_PRINTF1(_L("Get Font Table with wrong msg")); |
|
316 iFbs->SendCommand(EFbsMessGetFontTable, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
|
317 TEST(EFalse); |
|
318 TestComplete(); |
|
319 break; |
|
320 case 27: |
|
321 INFO_PRINTF1(_L("Release Font Table with wrong msg")); |
|
322 iFbs->SendCommand(EFbsMessReleaseFontTable, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
|
323 TEST(EFalse); |
|
324 TestComplete(); |
|
325 break; |
|
326 case 28: |
|
327 INFO_PRINTF1(_L("Get Glyph outline with wrong msg")); |
|
328 iFbs->SendCommand(EFbsMessGetGlyphOutline,KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
|
329 TEST(EFalse); |
|
330 TestComplete(); |
|
331 break; |
|
332 case 29: |
|
333 INFO_PRINTF1(_L("Release Glyph outline with wrong msg")); |
|
334 iFbs->SendCommand(EFbsMessReleaseGlyphOutline, KInvalidParam1, KInvalidParam2, KInvalidParam3, KInvalidParam4); |
|
335 TEST(EFalse); |
|
336 TestComplete(); |
|
337 break; |
|
338 case 30: |
266 TestComplete(); |
339 TestComplete(); |
267 break; |
340 break; |
268 } |
341 } |
269 } |
342 } |
270 |
343 |