|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "tpanictests.h" |
|
17 #include <graphics/directgdicontext.h> |
|
18 #include <graphics/directgdiimagetarget.h> |
|
19 |
|
20 _LIT(KPanicCategory, "DGDI"); |
|
21 |
|
22 CTPanicTests::CTPanicTests() |
|
23 { |
|
24 SetTestStepName(KTDirectGdiPanicTestsStep); |
|
25 } |
|
26 |
|
27 CTPanicTests::~CTPanicTests() |
|
28 { |
|
29 } |
|
30 |
|
31 /** |
|
32 @SYMTestCaseID |
|
33 GRAPHICS-DIRECTGDI-PANIC-0001 |
|
34 |
|
35 @SYMTestPriority |
|
36 Medium |
|
37 |
|
38 @SYMPREQ |
|
39 PREQ39 |
|
40 |
|
41 @SYMREQ |
|
42 REQ9195 |
|
43 REQ9201 |
|
44 REQ9202 |
|
45 REQ9222 |
|
46 REQ9223 |
|
47 REQ9236 |
|
48 REQ9237 |
|
49 |
|
50 @SYMTestCaseDesc |
|
51 Tests if DirectGDI methods panic when called on a inactivated context. |
|
52 |
|
53 @SYMTestActions |
|
54 Construct CDirectGdiDriver. |
|
55 Construct CDirectGdiContext. |
|
56 Construct RSgImage. |
|
57 Construct MDirectGdiImageTarget. |
|
58 Create MDirectGdiImageTarget, using RSgImage. |
|
59 |
|
60 Do not Activate CDirectGdiContext. |
|
61 Call any API on the context. |
|
62 |
|
63 Destroy RSgImage. |
|
64 Destroy MDirectGdiImageTarget. |
|
65 Destroy CDirectGdiContext. |
|
66 Close CDirectGdiDriver. |
|
67 |
|
68 @SYMTestExpectedResults |
|
69 It should panic with panic code DGDI 7, EDirectGdiPanicContextNotActivated |
|
70 |
|
71 @SYMTestStatus |
|
72 Implemented |
|
73 */ |
|
74 void CTPanicTests::TestContextNotActivatedL() |
|
75 { |
|
76 if (iUseDirectGdi) |
|
77 { |
|
78 TInt result = CDirectGdiDriver::Open(); |
|
79 TESTNOERRORL(result); |
|
80 |
|
81 CDirectGdiDriver* dgdiDriver = CDirectGdiDriver::Static(); |
|
82 TEST(dgdiDriver != NULL); |
|
83 CleanupClosePushL(*dgdiDriver); |
|
84 |
|
85 CDirectGdiContext* gc = CDirectGdiContext::NewL(*dgdiDriver); |
|
86 |
|
87 RSgImage* rsgImage1 = new RSgImage(); |
|
88 TESTL(rsgImage1 != NULL); |
|
89 |
|
90 // Set the bitmap up... |
|
91 TSgImageInfo imageInfo; |
|
92 imageInfo.iSizeInPixels = TSize (320, 240); |
|
93 imageInfo.iPixelFormat = iTestParams.iTargetPixelFormat; |
|
94 |
|
95 imageInfo.iUsage = ESgUsageDirectGdiTarget; |
|
96 result = rsgImage1->Create(imageInfo, NULL,0); |
|
97 TESTNOERRORL(result); |
|
98 |
|
99 RDirectGdiImageTarget* dgdiImageTarget1 = new RDirectGdiImageTarget(*dgdiDriver); |
|
100 TESTL(dgdiImageTarget1 != NULL); |
|
101 result = dgdiImageTarget1->Create(*rsgImage1); |
|
102 TESTNOERRORL(result); |
|
103 |
|
104 TRect rect(10, 15, 100, 100); |
|
105 gc->DrawEllipse(rect); |
|
106 |
|
107 dgdiImageTarget1->Close(); |
|
108 delete(dgdiImageTarget1); |
|
109 rsgImage1->Close(); |
|
110 delete(rsgImage1); |
|
111 delete(gc); |
|
112 CleanupStack::PopAndDestroy(1); |
|
113 } |
|
114 else //BitGDI |
|
115 User::Panic(KPanicCategory, 7); |
|
116 } |
|
117 |
|
118 /** |
|
119 @SYMTestCaseID |
|
120 GRAPHICS-DIRECTGDI-PANIC-0002 |
|
121 |
|
122 @SYMTestPriority |
|
123 Medium |
|
124 |
|
125 @SYMPREQ |
|
126 PREQ39 |
|
127 |
|
128 @SYMREQ |
|
129 REQ9195 |
|
130 REQ9201 |
|
131 REQ9202 |
|
132 REQ9222 |
|
133 REQ9223 |
|
134 REQ9236 |
|
135 REQ9237 |
|
136 |
|
137 @SYMTestCaseDesc |
|
138 Testing if a panic is raised during text drawing functions usage without valid font set. |
|
139 |
|
140 @SYMTestActions |
|
141 Context is created and activated. |
|
142 |
|
143 Set font in context. |
|
144 Call any DrawText() API on the context. |
|
145 |
|
146 Reset font in context. |
|
147 Call any DrawText() API on the context. |
|
148 |
|
149 @SYMTestExpectedResults |
|
150 It should panic with panic code DGDI 11, EDirectGdiPanicNoFontSelected. |
|
151 |
|
152 @SYMTestStatus |
|
153 Implemented |
|
154 */ |
|
155 |
|
156 void CTPanicTests::TestFontNotSetL() |
|
157 { |
|
158 if(iUseDirectGdi) |
|
159 { |
|
160 _LIT(KText, "test"); |
|
161 |
|
162 ResetGc(); |
|
163 |
|
164 CFont* font = GetFont(); |
|
165 TESTL(font != NULL); |
|
166 |
|
167 iGc->SetPenColor(TRgb(0, 0, 0)); |
|
168 |
|
169 iGc->SetFont(font); |
|
170 iGc->DrawText(KText, NULL, TPoint(10, 30)); |
|
171 |
|
172 iGc->ResetFont(); |
|
173 iGc->DrawText(KText, NULL, TPoint(10, 50)); |
|
174 |
|
175 ReleaseFont(font); |
|
176 } |
|
177 else //BitGDI |
|
178 User::Panic( KPanicCategory, 11); |
|
179 } |
|
180 |
|
181 /** |
|
182 @SYMTestCaseID |
|
183 GRAPHICS-DIRECTGDI-PANIC-0003 |
|
184 |
|
185 @SYMTestPriority |
|
186 Medium |
|
187 |
|
188 @SYMPREQ |
|
189 PREQ39 |
|
190 |
|
191 @SYMREQ |
|
192 REQ9195 |
|
193 REQ9201 |
|
194 REQ9202 |
|
195 REQ9222 |
|
196 REQ9223 |
|
197 REQ9236 |
|
198 REQ9237 |
|
199 |
|
200 @SYMTestCaseDesc |
|
201 Tests the negative conditions that can only be reached by creating RSgImage with an invalid pixel type, to |
|
202 improve the code coverage. |
|
203 |
|
204 @SYMTestActions |
|
205 Construct CDirectGdiDriver. |
|
206 Construct CDirectGdiContext. |
|
207 |
|
208 Construct RSgImage with unsupported pixel type and do not check for the return error code. |
|
209 Construct MDirectGdiImageTarget. |
|
210 Create MDirectGdiImageTarget, using RSgImage, ignoring the return error code. |
|
211 |
|
212 Activate CDirectGdiContext using MDirectGdiImageTarget. |
|
213 |
|
214 Destroy RSgImage. |
|
215 Destroy MDirectGdiImageTarget. |
|
216 |
|
217 Destroy CDirectGdiContext. |
|
218 Close CDirectGdiDriver. |
|
219 |
|
220 @SYMTestExpectedResults |
|
221 It should panic with panic code DGDI 21, EDirectGdiImageTargetInfoError |
|
222 |
|
223 @SYMTestStatus |
|
224 Implemented |
|
225 */ |
|
226 void CTPanicTests::TestInvalidTargetL() |
|
227 { |
|
228 if(iUseDirectGdi) |
|
229 { |
|
230 TInt err = CDirectGdiDriver::Open(); |
|
231 TESTNOERROR(err); |
|
232 |
|
233 CDirectGdiDriver* dgdiDriver = CDirectGdiDriver::Static(); |
|
234 TESTL(dgdiDriver != NULL); |
|
235 CleanupClosePushL(*dgdiDriver); |
|
236 |
|
237 CDirectGdiContext* gc = CDirectGdiContext::NewL(*dgdiDriver); |
|
238 RSgImage rsgImage; |
|
239 |
|
240 // Set the bitmap up... |
|
241 TSgImageInfo imageInfo; |
|
242 imageInfo.iSizeInPixels = TSize (320, 240); |
|
243 imageInfo.iPixelFormat = EUidPixelFormatA_8; |
|
244 imageInfo.iUsage = ESgUsageDirectGdiTarget; |
|
245 rsgImage.Create(imageInfo, NULL,0); |
|
246 |
|
247 RDirectGdiImageTarget dgdiImageTarget(*dgdiDriver); |
|
248 dgdiImageTarget.Create(rsgImage); |
|
249 gc->Activate (dgdiImageTarget); |
|
250 |
|
251 rsgImage.Close(); |
|
252 dgdiImageTarget.Close(); |
|
253 delete gc; |
|
254 CleanupStack::PopAndDestroy(1); |
|
255 } |
|
256 else //BitGDI |
|
257 User::Panic( KPanicCategory, 21); |
|
258 } |
|
259 |
|
260 /** |
|
261 @SYMTestCaseID |
|
262 GRAPHICS-DIRECTGDI-PANIC-0004 |
|
263 |
|
264 @SYMTestPriority |
|
265 Medium |
|
266 |
|
267 @SYMPREQ |
|
268 PREQ39 |
|
269 |
|
270 @SYMREQ |
|
271 REQ9195 |
|
272 REQ9201 |
|
273 REQ9202 |
|
274 REQ9222 |
|
275 REQ9223 |
|
276 REQ9236 |
|
277 REQ9237 |
|
278 |
|
279 @SYMTestCaseDesc |
|
280 Test that the adapter panics when an attempt is made to activate a target with an invalid handle. |
|
281 |
|
282 @SYMTestActions |
|
283 Create an RSgImage. |
|
284 Make it a target for the driver. |
|
285 Change the target's handle so it has an erroneous handle. |
|
286 Attempt to activate the target. |
|
287 (This test only works in _DEBUG mode as the handle check only happens in _DEBUG mode) |
|
288 |
|
289 @SYMTestExpectedResults |
|
290 The test should panic when the target is activated DGDIAdapter 32, EDirectGdiPanicResourceHandleNotFound. |
|
291 |
|
292 @SYMTestStatus |
|
293 Implemented |
|
294 */ |
|
295 void CTPanicTests::TestImageInvalidTargetHandleL() |
|
296 { |
|
297 #ifdef _DEBUG |
|
298 TInt err = CDirectGdiDriver::Open(); |
|
299 TESTNOERROR(err); |
|
300 |
|
301 CDirectGdiDriver* dgdiDriver = CDirectGdiDriver::Static(); |
|
302 TESTL(dgdiDriver != NULL); |
|
303 CleanupClosePushL(*dgdiDriver); |
|
304 |
|
305 CDirectGdiContext* gc = CDirectGdiContext::NewL(*dgdiDriver); |
|
306 RSgImage rsgImage; |
|
307 |
|
308 // Set the bitmap up... |
|
309 TSgImageInfo imageInfo; |
|
310 imageInfo.iSizeInPixels = TSize (320, 240); |
|
311 imageInfo.iPixelFormat = iTestParams.iTargetPixelFormat; |
|
312 imageInfo.iUsage = ESgUsageDirectGdiTarget; |
|
313 rsgImage.Create(imageInfo, NULL,0); |
|
314 |
|
315 RDirectGdiImageTarget dgdiImageTarget(*dgdiDriver); |
|
316 dgdiImageTarget.Create(rsgImage); |
|
317 |
|
318 // Set the target's handle to a non-null invalid handle. |
|
319 dgdiImageTarget.iHandle = 0x12345678; |
|
320 |
|
321 // Activate should panic (DGDIAdapter EDirectGdiTargetHandleNotFound 32) |
|
322 gc->Activate (dgdiImageTarget); |
|
323 |
|
324 rsgImage.Close(); |
|
325 dgdiImageTarget.Close(); |
|
326 delete gc; |
|
327 CleanupStack::PopAndDestroy(1); |
|
328 #else |
|
329 User::Panic(KPanicCategory, 32); |
|
330 #endif |
|
331 } |
|
332 |
|
333 /** |
|
334 @SYMTestCaseID |
|
335 GRAPHICS-DIRECTGDI-PANIC-0005 |
|
336 |
|
337 @SYMTestPriority |
|
338 Medium |
|
339 |
|
340 @SYMPREQ |
|
341 PREQ39 |
|
342 |
|
343 @SYMTestCaseDesc |
|
344 Tests the negative conditions that the same RDirectGdiImageTarget object |
|
345 is created twice. |
|
346 |
|
347 @SYMTestActions |
|
348 Construct CDirectGdiDriver. |
|
349 Construct RDirectGdiImageTarget twice. |
|
350 |
|
351 @SYMTestExpectedResults |
|
352 It should panic with panic code DGDIAdapter 17, EDirectGdiImageTargetAlreadyExists |
|
353 |
|
354 @SYMTestStatus |
|
355 Implemented |
|
356 */ |
|
357 void CTPanicTests::TestImageTargetActivatedTwiceL() |
|
358 { |
|
359 if(iUseDirectGdi) |
|
360 { |
|
361 TInt err = CDirectGdiDriver::Open(); |
|
362 TESTNOERRORL(err); |
|
363 CDirectGdiDriver* dgdiDriver = CDirectGdiDriver::Static(); |
|
364 TESTL(dgdiDriver != NULL); |
|
365 CleanupClosePushL(*dgdiDriver); |
|
366 |
|
367 TSgImageInfo info2; |
|
368 info2.iSizeInPixels = TSize(8, 8); |
|
369 info2.iUsage = ESgUsageDirectGdiTarget; |
|
370 info2.iPixelFormat = EUidPixelFormatRGB_565; |
|
371 info2.iCpuAccess = ESgCpuAccessNone; |
|
372 info2.iShareable = ETrue; |
|
373 RSgImage image2; |
|
374 User::LeaveIfError(image2.Create(info2, NULL, 0)); |
|
375 CleanupClosePushL(image2); |
|
376 |
|
377 RDirectGdiImageTarget dgdiImageTarget(*dgdiDriver); |
|
378 TESTNOERRORL(dgdiImageTarget.Create(image2)); |
|
379 CleanupClosePushL(dgdiImageTarget); |
|
380 dgdiImageTarget.Create(image2); //should panic here |
|
381 CleanupClosePushL(dgdiImageTarget); |
|
382 |
|
383 CleanupStack::PopAndDestroy(4, dgdiDriver); |
|
384 } |
|
385 else //BitGDI |
|
386 { |
|
387 User::Panic( KPanicCategory, 17); |
|
388 } |
|
389 } |
|
390 |
|
391 /** |
|
392 @SYMTestCaseID |
|
393 GRAPHICS-DIRECTGDI-PANIC-0006 |
|
394 |
|
395 @SYMTestPriority |
|
396 Medium |
|
397 |
|
398 @SYMPREQ |
|
399 PREQ39 |
|
400 |
|
401 @SYMTestCaseDesc |
|
402 Tests the negative conditions that the same RDirectGdiDrawableSource object |
|
403 is created twice. |
|
404 |
|
405 @SYMTestActions |
|
406 Construct CDirectGdiDriver. |
|
407 Construct RDirectGdiDrawableSource twice. |
|
408 |
|
409 @SYMTestExpectedResults |
|
410 It should panic with panic code DGDI 18, EDirectGdiImageSourceAlreadyExists |
|
411 |
|
412 @SYMTestStatus |
|
413 Implemented |
|
414 */ |
|
415 void CTPanicTests::TestImageSourceActivatedTwiceL() |
|
416 { |
|
417 if(iUseDirectGdi) |
|
418 { |
|
419 TInt err = CDirectGdiDriver::Open(); |
|
420 TESTNOERRORL(err); |
|
421 CDirectGdiDriver* dgdiDriver = CDirectGdiDriver::Static(); |
|
422 TESTL(dgdiDriver != NULL); |
|
423 CleanupClosePushL(*dgdiDriver); |
|
424 |
|
425 TSgImageInfo info1; |
|
426 info1.iSizeInPixels = TSize(8, 8); |
|
427 info1.iUsage = ESgUsageDirectGdiSource; |
|
428 info1.iPixelFormat = EUidPixelFormatRGB_565; |
|
429 info1.iCpuAccess = ESgCpuAccessReadWrite; |
|
430 info1.iShareable = ETrue; |
|
431 RSgImage image1; |
|
432 User::LeaveIfError(image1.Create(info1, NULL, 0)); |
|
433 CleanupClosePushL(image1); |
|
434 |
|
435 RDirectGdiDrawableSource dgdiImageSource(*dgdiDriver); |
|
436 TESTNOERRORL(dgdiImageSource.Create(image1)); |
|
437 CleanupClosePushL(dgdiImageSource); |
|
438 dgdiImageSource.Create(image1); //should panic here |
|
439 CleanupClosePushL(dgdiImageSource); |
|
440 |
|
441 CleanupStack::PopAndDestroy(4, dgdiDriver); |
|
442 } |
|
443 else //BitGDI |
|
444 { |
|
445 User::Panic( KPanicCategory, 18); |
|
446 } |
|
447 } |
|
448 |
|
449 /** |
|
450 @SYMTestCaseID |
|
451 GRAPHICS-DIRECTGDI-PANIC-0007 |
|
452 |
|
453 @SYMTestPriority |
|
454 Medium |
|
455 |
|
456 @SYMPREQ |
|
457 PREQ39 |
|
458 |
|
459 @SYMREQ |
|
460 REQ9195 |
|
461 REQ9201 |
|
462 REQ9202 |
|
463 REQ9222 |
|
464 REQ9223 |
|
465 REQ9236 |
|
466 REQ9237 |
|
467 |
|
468 @SYMTestCaseDesc |
|
469 Tests the negative conditions that the same RDirectGdiDrawableSource object |
|
470 is created twice. |
|
471 |
|
472 @SYMTestActions |
|
473 Construct CDirectGdiDriver. |
|
474 Construct RDirectGdiDrawableSource twice. |
|
475 |
|
476 @SYMTestExpectedResults |
|
477 It should panic with panic code DGDIAdapter 19, EDirectGdiDrawableSourceAlreadyExists |
|
478 |
|
479 @SYMTestStatus |
|
480 Implemented |
|
481 */ |
|
482 void CTPanicTests::TestDrawableSourceActivatedTwiceL() |
|
483 { |
|
484 if(iUseDirectGdi) |
|
485 { |
|
486 TInt err = CDirectGdiDriver::Open(); |
|
487 TESTNOERRORL(err); |
|
488 CDirectGdiDriver* dgdiDriver = CDirectGdiDriver::Static(); |
|
489 TESTL(dgdiDriver != NULL); |
|
490 CleanupClosePushL(*dgdiDriver); |
|
491 |
|
492 TSgImageInfo info1; |
|
493 info1.iSizeInPixels = TSize(8, 8); |
|
494 info1.iUsage = ESgUsageDirectGdiSource; |
|
495 info1.iPixelFormat = EUidPixelFormatARGB_8888_PRE; |
|
496 info1.iCpuAccess = ESgCpuAccessReadWrite; |
|
497 info1.iShareable = ETrue; |
|
498 RSgImage image1; |
|
499 TESTNOERRORL(image1.Create(info1, NULL, 0)); |
|
500 CleanupClosePushL(image1); |
|
501 |
|
502 RDirectGdiDrawableSource dgdiDrawableSource(*dgdiDriver); |
|
503 TESTNOERRORL(dgdiDrawableSource.Create(image1)); |
|
504 CleanupClosePushL(dgdiDrawableSource); |
|
505 dgdiDrawableSource.Create(image1); //should panic here |
|
506 CleanupClosePushL(dgdiDrawableSource); |
|
507 |
|
508 CleanupStack::PopAndDestroy(4, dgdiDriver); |
|
509 } |
|
510 else //BitGDI |
|
511 { |
|
512 User::Panic( KPanicCategory, 19); |
|
513 } |
|
514 } |
|
515 |
|
516 /** |
|
517 @SYMTestCaseID |
|
518 GRAPHICS-DIRECTGDI-PANIC-0008 |
|
519 |
|
520 @SYMTestPriority |
|
521 Medium |
|
522 |
|
523 @SYMPREQ |
|
524 PREQ39 |
|
525 |
|
526 @SYMREQ |
|
527 REQ9195 |
|
528 REQ9201 |
|
529 REQ9202 |
|
530 REQ9222 |
|
531 REQ9223 |
|
532 REQ9236 |
|
533 REQ9237 |
|
534 |
|
535 @SYMTestCaseDesc |
|
536 Make sure a panic occurs when calling SetBrushStyle() with EPatternedBrush when no brush pattern has been set. |
|
537 |
|
538 @SYMTestActions |
|
539 Set brush style to EPatternedBrush. |
|
540 |
|
541 @SYMTestExpectedResults |
|
542 It should panic with panic code DGDI 9, EDirectGdiBrushPatternNotSet. |
|
543 |
|
544 @SYMTestStatus |
|
545 Implemented |
|
546 */ |
|
547 void CTPanicTests::TestBrushPatternNotSetL() |
|
548 { |
|
549 if(iUseDirectGdi) |
|
550 { |
|
551 ResetGc(); |
|
552 iGc->SetBrushStyle(DirectGdi::EPatternedBrush); |
|
553 } |
|
554 else //BitGDI |
|
555 User::Panic( KPanicCategory, 9); |
|
556 } |
|
557 |
|
558 /** |
|
559 Override of base class virtual |
|
560 @leave Gets system wide error code |
|
561 @return - TVerdict code |
|
562 */ |
|
563 TVerdict CTPanicTests::doTestStepPreambleL() |
|
564 { |
|
565 CTDirectGdiStepBase::doTestStepPreambleL(); |
|
566 return TestStepResult(); |
|
567 } |
|
568 |
|
569 /** |
|
570 Override of base class pure virtual |
|
571 Our implementation only gets called if the base class doTestStepPreambleL() did |
|
572 not leave. That being the case, the current test result value will be EPass. |
|
573 @leave Gets system wide error code |
|
574 @return TVerdict code |
|
575 */ |
|
576 TVerdict CTPanicTests::doTestStepL() |
|
577 { |
|
578 // Test for each pixel format |
|
579 for(TInt targetPixelFormatIndex = iTargetPixelFormatArray.Count() - 1; targetPixelFormatIndex >= 0 ; targetPixelFormatIndex--) |
|
580 { |
|
581 iTestParams.iTargetPixelFormat = iTargetPixelFormatArray[targetPixelFormatIndex]; |
|
582 SetTargetL(iTestParams.iTargetPixelFormat); |
|
583 RunTestsL(); |
|
584 RunOomTestsL(); |
|
585 } |
|
586 |
|
587 return TestStepResult(); |
|
588 } |
|
589 |
|
590 /** |
|
591 Override of base class pure virtual |
|
592 Lists the tests to be run |
|
593 */ |
|
594 void CTPanicTests::RunTestsL() |
|
595 { |
|
596 INFO_PRINTF1(_L("DirectGdi Panic Tests" )); |
|
597 TInt aCurTestCase; |
|
598 //Read the case number from the ini file |
|
599 TBool res = GetIntFromConfig(ConfigSection(), KCaseNumber, aCurTestCase); |
|
600 if(!res) |
|
601 { |
|
602 return ; |
|
603 } |
|
604 SetTestStepID(KUnknownSYMTestCaseIDName); |
|
605 switch(aCurTestCase) |
|
606 { |
|
607 case 1: |
|
608 INFO_PRINTF1(_L("TestContextNotActivatedL\n")); |
|
609 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PANIC-0001")); |
|
610 TestContextNotActivatedL(); |
|
611 break; |
|
612 case 2: |
|
613 INFO_PRINTF1(_L("TestFontNotSetL\r\n")); |
|
614 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PANIC-0002")); |
|
615 TestFontNotSetL(); |
|
616 break; |
|
617 case 3: |
|
618 INFO_PRINTF1(_L("TestInvalidTargetL\r\n")); |
|
619 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PANIC-0003")); |
|
620 TestInvalidTargetL(); |
|
621 break; |
|
622 case 4: |
|
623 INFO_PRINTF1(_L("TestImageInvalidTargetHandleL\r\n")); |
|
624 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PANIC-0004")); |
|
625 TestImageInvalidTargetHandleL(); |
|
626 break; |
|
627 case 5: |
|
628 INFO_PRINTF1(_L("TestImageTargetActivatedTwiceL\r\n")); |
|
629 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PANIC-0005")); |
|
630 TestImageTargetActivatedTwiceL(); |
|
631 break; |
|
632 case 6: |
|
633 INFO_PRINTF1(_L("TestImageSourceActivatedTwiceL\r\n")); |
|
634 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PANIC-0006")); |
|
635 TestImageSourceActivatedTwiceL(); |
|
636 break; |
|
637 case 7: |
|
638 INFO_PRINTF1(_L("TestDrawableSourceActivatedTwiceL\r\n")); |
|
639 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PANIC-0007")); |
|
640 TestDrawableSourceActivatedTwiceL(); |
|
641 break; |
|
642 case 8: |
|
643 INFO_PRINTF1(_L("TestBrushPatternNotSetL\r\n")); |
|
644 SetTestStepID(_L("GRAPHICS-DIRECTGDI-PANIC-0008")); |
|
645 TestBrushPatternNotSetL(); |
|
646 break; |
|
647 } |
|
648 RecordTestResultL(); |
|
649 } |