Update contrib.
1 // Copyright (c) 1996-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // General window tests
21 @internalComponent - Internal Symbian test code
24 #include "twindowsizecache.h"
26 CTWindowSizeCacheTest::CTWindowSizeCacheTest(CTestStep* aStep) : CTWsGraphicsBase(aStep)
29 CTWindowSizeCacheTest::~CTWindowSizeCacheTest()
33 void CTWindowSizeCacheTest::ConstructL()
37 void CTWindowSizeCacheTest::TestCreateRWindowL(TSizeCacheStatus aEnableWindowSizeCache)
42 TInt err = rws.Connect();
43 CleanupClosePushL(rws);
44 TEST(KErrNone == err);
46 if (ETestSizeCacheEnabled == aEnableWindowSizeCache)
48 rws.EnableWindowSizeCacheL();
52 err = wg.Construct(0);
53 CleanupClosePushL(wg);
54 TEST(KErrNone == err);
58 err = w1.Construct(wg,1);
59 CleanupClosePushL(w1);
60 TEST(KErrNone == err);
64 err = w2.Construct(wg,2);
65 CleanupClosePushL(w2);
66 TEST(KErrNone == err);
77 err = w3.Construct(wg,1);
78 CleanupClosePushL(w3);
79 TEST(KErrNone == err);
88 RWindowGroup wg2(rws);
89 err = wg2.Construct(0);
90 CleanupClosePushL(wg2);
91 TEST(KErrNone == err);
93 RWindowGroup wg3(rws);
94 err = wg3.Construct(1);
95 CleanupClosePushL(wg3);
96 TEST(KErrNone == err);
100 err = w4.Construct(wg2,2);
101 CleanupClosePushL(w4);
102 TEST(KErrNone == err);
106 err = w5.Construct(wg3,3);
107 CleanupClosePushL(w5);
108 TEST(KErrNone == err);
110 CleanupStack::Pop(5);
116 // Check nothing bad happens when calling Close more than once on RWindow
120 // Check nothing bad happens when calling Close more than once on RWindowGroup
126 // Check nothing bad happens when calling Close more than once on RWsSession
132 void CTWindowSizeCacheTest::TestCreateRBlankWindowL(TSizeCacheStatus aEnableWindowSizeCache)
137 TInt err = rws.Connect();
138 CleanupClosePushL(rws);
139 TEST(KErrNone == err);
141 if (ETestSizeCacheEnabled == aEnableWindowSizeCache)
143 rws.EnableWindowSizeCacheL();
146 RWindowGroup wg(rws);
147 err = wg.Construct(0);
148 CleanupClosePushL(wg);
149 TEST(KErrNone == err);
152 RBlankWindow w1(rws);
153 err = w1.Construct(wg,1);
154 CleanupClosePushL(w1);
155 TEST(KErrNone == err);
158 RBlankWindow w2(rws);
159 err = w2.Construct(wg,2);
160 CleanupClosePushL(w2);
161 TEST(KErrNone == err);
163 CleanupStack::Pop(2);
170 RBlankWindow w3(rws);
172 err = w3.Construct(wg,1);
173 CleanupClosePushL(w3);
174 TEST(KErrNone == err);
176 CleanupStack::Pop(2);
183 RWindowGroup wg2(rws);
184 err = wg2.Construct(0);
185 CleanupClosePushL(wg2);
186 TEST(KErrNone == err);
188 RWindowGroup wg3(rws);
189 err = wg3.Construct(1);
190 CleanupClosePushL(wg3);
191 TEST(KErrNone == err);
194 RBlankWindow w4(rws);
195 err = w4.Construct(wg2,2);
196 CleanupClosePushL(w4);
197 TEST(KErrNone == err);
200 RBlankWindow w5(rws);
201 err = w5.Construct(wg3,3);
202 CleanupClosePushL(w5);
203 TEST(KErrNone == err);
205 CleanupStack::Pop(5);
211 // Check nothing bad happens when calling Close more than once on RBlankWindow
221 void CTWindowSizeCacheTest::TestCreateRBackedUpWindowL(TSizeCacheStatus aEnableWindowSizeCache, TDisplayMode aDisplayMode)
226 TInt err = rws.Connect();
227 CleanupClosePushL(rws);
228 TEST(KErrNone == err);
230 if (ETestSizeCacheEnabled == aEnableWindowSizeCache)
232 rws.EnableWindowSizeCacheL();
235 RWindowGroup wg(rws);
236 err = wg.Construct(0);
237 CleanupClosePushL(wg);
238 TEST(KErrNone == err);
241 RBackedUpWindow w1(rws);
242 err = w1.Construct(wg,aDisplayMode,1);
243 CleanupClosePushL(w1);
244 TEST(KErrNone == err);
247 RBackedUpWindow w2(rws);
248 err = w2.Construct(wg,aDisplayMode,2);
249 CleanupClosePushL(w2);
250 TEST(KErrNone == err);
252 CleanupStack::Pop(2);
260 RBackedUpWindow w3(rws);
262 err = w3.Construct(wg,aDisplayMode,1);
263 CleanupClosePushL(w3);
264 TEST(KErrNone == err);
266 CleanupStack::Pop(2);
273 RWindowGroup wg2(rws);
274 CleanupClosePushL(wg2);
275 err = wg2.Construct(0);
276 TEST(KErrNone == err);
278 RWindowGroup wg3(rws);
279 err = wg3.Construct(1);
280 CleanupClosePushL(wg3);
281 TEST(KErrNone == err);
284 RBackedUpWindow w4(rws);
285 err = w4.Construct(wg2,aDisplayMode,2);
286 CleanupClosePushL(w4);
287 TEST(KErrNone == err);
290 RBackedUpWindow w5(rws);
291 err = w5.Construct(wg3,aDisplayMode,3);
292 CleanupClosePushL(w5);
293 TEST(KErrNone == err);
295 CleanupStack::Pop(5);
301 // Check nothing bad happens when calling Close more than once on RBackedUpWindow
311 void CTWindowSizeCacheTest::TestRWindowNoCacheEntryL(TSizeCacheStatus aEnableWindowSizeCache)
316 TInt err = rws.Connect();
317 CleanupClosePushL(rws);
320 if (aEnableWindowSizeCache)
322 rws.EnableWindowSizeCacheL();
325 RWindowGroup wg(rws);
327 CleanupClosePushL(rws);
332 CleanupClosePushL(w1);
347 void CTWindowSizeCacheTest::TestRWindowNoCacheEntrySetExtentErrL(TSizeCacheStatus aEnableWindowSizeCache)
352 TInt err = rws.Connect();
353 CleanupClosePushL(rws);
356 if (aEnableWindowSizeCache)
358 rws.EnableWindowSizeCacheL();
361 RWindowGroup wg(rws);
363 CleanupClosePushL(rws);
368 CleanupClosePushL(w1);
371 TPoint point1 (10101,897);
372 TSize size1 (10001,123);
373 err = w1.SetExtentErr(point1, size1);
374 TEST(KErrNone == err);
389 void CTWindowSizeCacheTest::TestRWindowNoCacheEntrySetSizeErrL(TSizeCacheStatus aEnableWindowSizeCache)
394 TInt err = rws.Connect();
395 CleanupClosePushL(rws);
398 if (aEnableWindowSizeCache)
400 rws.EnableWindowSizeCacheL();
403 RWindowGroup wg(rws);
405 CleanupClosePushL(rws);
410 CleanupClosePushL(w1);
413 TSize size1 (10001,123);
414 err = w1.SetSizeErr(size1);
415 TEST(KErrNone == err);
430 void CTWindowSizeCacheTest::TestRWindowNoCacheEntrySetExtentL(TSizeCacheStatus aEnableWindowSizeCache)
435 TInt err = rws.Connect();
436 CleanupClosePushL(rws);
439 if (aEnableWindowSizeCache)
441 rws.EnableWindowSizeCacheL();
444 RWindowGroup wg(rws);
446 CleanupClosePushL(rws);
451 CleanupClosePushL(w1);
454 TPoint point1 (10101,897);
455 TSize size1 (10001,123);
456 w1.SetExtent(point1, size1);
472 void CTWindowSizeCacheTest::TestRWindowNoCacheEntrySetSizeL(TSizeCacheStatus aEnableWindowSizeCache)
477 TInt err = rws.Connect();
478 CleanupClosePushL(rws);
481 if (aEnableWindowSizeCache)
483 rws.EnableWindowSizeCacheL();
486 RWindowGroup wg(rws);
488 CleanupClosePushL(rws);
493 CleanupClosePushL(w1);
496 TSize size1 (10001,123);
513 void CTWindowSizeCacheTest::TestRWindowNoCacheEntryEnableWindowSizeCacheL()
518 TInt err = rws.Connect();
519 CleanupClosePushL(rws);
522 rws.EnableWindowSizeCacheL();
524 RWindowGroup wg(rws);
526 CleanupClosePushL(rws);
531 CleanupClosePushL(w1);
534 // Only the first call to EnableWindowSizeCacheL() should have an effect
535 // All subsequent calls to EnableWindowSizeCacheL() should have no effect
536 rws.EnableWindowSizeCacheL();
551 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheCleanL(TSizeCacheStatus aEnableWindowSizeCache)
556 TInt err = rws.Connect();
557 CleanupClosePushL(rws);
560 if (aEnableWindowSizeCache)
562 rws.EnableWindowSizeCacheL();
565 RWindowGroup wg(rws);
567 CleanupClosePushL(rws);
572 CleanupClosePushL(w1);
575 TSize size1 (10001,123);
580 TSize retSize1 = w1.Size();
581 TEST(retSize1 == size1);
596 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheCleanSizeL(TSizeCacheStatus aEnableWindowSizeCache)
601 TInt err = rws.Connect();
602 CleanupClosePushL(rws);
605 if (aEnableWindowSizeCache)
607 rws.EnableWindowSizeCacheL();
610 RWindowGroup wg(rws);
612 CleanupClosePushL(rws);
617 CleanupClosePushL(w1);
620 TSize size1 (10001,123);
625 TSize retSize1 = w1.Size();
626 TEST(retSize1 == size1);
629 TSize retSize2 = w1.Size();
630 TEST(retSize2 == size1);
645 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheCleanEnableWindowSizeCacheL()
650 TInt err = rws.Connect();
651 CleanupClosePushL(rws);
654 rws.EnableWindowSizeCacheL();
656 RWindowGroup wg(rws);
658 CleanupClosePushL(rws);
663 CleanupClosePushL(w1);
666 TSize size1 (10001,123);
671 TSize retSize1 = w1.Size();
672 TEST(retSize1 == size1);
675 // Only the first call to EnableWindowSizeCacheL() should have an effect
676 // All subsequent calls to EnableWindowSizeCacheL() should have no effect
677 rws.EnableWindowSizeCacheL();
692 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheCleanEnableWindowSizeCacheLSizeL()
697 TInt err = rws.Connect();
698 CleanupClosePushL(rws);
701 rws.EnableWindowSizeCacheL();
703 RWindowGroup wg(rws);
705 CleanupClosePushL(rws);
710 CleanupClosePushL(w1);
713 TSize size1 (10001,123);
718 TSize retSize1 = w1.Size();
719 TEST(retSize1 == size1);
722 // Only the first call to EnableWindowSizeCacheL() should have an effect
723 // All subsequent calls to EnableWindowSizeCacheL() should have no effect
724 rws.EnableWindowSizeCacheL();
727 TSize retSize2 = w1.Size();
728 TEST(retSize2 == size1);
743 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtySetSizeL(TSizeCacheStatus aEnableWindowSizeCache)
748 TInt err = rws.Connect();
749 CleanupClosePushL(rws);
752 if (aEnableWindowSizeCache)
754 rws.EnableWindowSizeCacheL();
757 RWindowGroup wg(rws);
759 CleanupClosePushL(rws);
764 CleanupClosePushL(w1);
767 TSize size1 (10001,123);
772 TSize retSize1 = w1.Size();
773 TEST(retSize1 == size1);
776 TSize size2 (20002,223);
793 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtySetExtentL(TSizeCacheStatus aEnableWindowSizeCache)
798 TInt err = rws.Connect();
799 CleanupClosePushL(rws);
802 if (aEnableWindowSizeCache)
804 rws.EnableWindowSizeCacheL();
807 RWindowGroup wg(rws);
809 CleanupClosePushL(rws);
814 CleanupClosePushL(w1);
817 TSize size1 (10001,123);
822 TSize retSize1 = w1.Size();
823 TEST(retSize1 == size1);
826 TPoint point2 (20202,223);
827 TSize size2 (20002,223);
828 w1.SetExtent(point2, size2);
844 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtySetSizeErrL(TSizeCacheStatus aEnableWindowSizeCache)
849 TInt err = rws.Connect();
850 CleanupClosePushL(rws);
853 if (aEnableWindowSizeCache)
855 rws.EnableWindowSizeCacheL();
858 RWindowGroup wg(rws);
860 CleanupClosePushL(rws);
865 CleanupClosePushL(w1);
868 TSize size1 (10001,123);
873 TSize retSize1 = w1.Size();
874 TEST(retSize1 == size1);
877 TSize size2 (20002,223);
878 err = w1.SetSizeErr(size2);
879 TEST(KErrNone == err);
894 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtySetExtentErrL(TSizeCacheStatus aEnableWindowSizeCache)
899 TInt err = rws.Connect();
900 CleanupClosePushL(rws);
903 if (aEnableWindowSizeCache)
905 rws.EnableWindowSizeCacheL();
908 RWindowGroup wg(rws);
910 CleanupClosePushL(rws);
915 CleanupClosePushL(w1);
918 TSize size1 (10001,123);
923 TSize retSize1 = w1.Size();
924 TEST(retSize1 == size1);
927 TPoint point2 (20202,223);
928 TSize size2 (20002,223);
929 err = w1.SetExtentErr(point2, size2);
930 TEST(KErrNone == err);
945 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtySetSizeTwiceL(TSizeCacheStatus aEnableWindowSizeCache)
950 TInt err = rws.Connect();
951 CleanupClosePushL(rws);
954 if (aEnableWindowSizeCache)
956 rws.EnableWindowSizeCacheL();
959 RWindowGroup wg(rws);
961 CleanupClosePushL(rws);
966 CleanupClosePushL(w1);
969 TSize size1 (10001,123);
974 TSize retSize1 = w1.Size();
975 TEST(retSize1 == size1);
978 TSize size2 (20002,223);
981 TSize size3 (30003,323);
999 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtySetSizeSetExtentL(TSizeCacheStatus aEnableWindowSizeCache)
1004 TInt err = rws.Connect();
1005 CleanupClosePushL(rws);
1006 TEST(err==KErrNone);
1008 if (aEnableWindowSizeCache)
1010 rws.EnableWindowSizeCacheL();
1013 RWindowGroup wg(rws);
1015 CleanupClosePushL(rws);
1020 CleanupClosePushL(w1);
1023 TSize size1 (10001,123);
1028 TSize retSize1 = w1.Size();
1029 TEST(retSize1 == size1);
1032 TSize size2 (20002,223);
1036 TPoint point3 (30303,232);
1037 TSize size3 (30003,323);
1038 w1.SetExtent(point3, size3);
1042 CleanupStack::Pop();
1045 CleanupStack::Pop();
1048 CleanupStack::Pop();
1054 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtySetSizeSetSizeErrL(TSizeCacheStatus aEnableWindowSizeCache)
1059 TInt err = rws.Connect();
1060 CleanupClosePushL(rws);
1061 TEST(err==KErrNone);
1063 if (aEnableWindowSizeCache)
1065 rws.EnableWindowSizeCacheL();
1068 RWindowGroup wg(rws);
1070 CleanupClosePushL(rws);
1075 CleanupClosePushL(w1);
1078 TSize size1 (10001,123);
1083 TSize retSize1 = w1.Size();
1084 TEST(retSize1 == size1);
1087 TSize size2 (20002,223);
1091 TSize size3 (30003,323);
1092 err = w1.SetSizeErr(size3);
1093 TEST(KErrNone == err);
1096 CleanupStack::Pop();
1099 CleanupStack::Pop();
1102 CleanupStack::Pop();
1108 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtySetSizeSetExtentErrL(TSizeCacheStatus aEnableWindowSizeCache)
1113 TInt err = rws.Connect();
1114 CleanupClosePushL(rws);
1115 TEST(err==KErrNone);
1117 if (aEnableWindowSizeCache)
1119 rws.EnableWindowSizeCacheL();
1122 RWindowGroup wg(rws);
1124 CleanupClosePushL(rws);
1129 CleanupClosePushL(w1);
1132 TSize size1 (10001,123);
1137 TSize retSize1 = w1.Size();
1138 TEST(retSize1 == size1);
1141 TSize size2 (20002,223);
1145 TPoint point3 (30303,232);
1146 TSize size3 (30003,323);
1147 err = w1.SetExtentErr(point3, size3);
1148 TEST(KErrNone == err);
1151 CleanupStack::Pop();
1154 CleanupStack::Pop();
1157 CleanupStack::Pop();
1163 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtySetSizeEnableWindowSizeCacheL()
1168 TInt err = rws.Connect();
1169 CleanupClosePushL(rws);
1170 TEST(err==KErrNone);
1172 rws.EnableWindowSizeCacheL();
1174 RWindowGroup wg(rws);
1176 CleanupClosePushL(rws);
1181 CleanupClosePushL(w1);
1184 TSize size1 (10001,123);
1189 TSize retSize1 = w1.Size();
1190 TEST(retSize1 == size1);
1193 TSize size2 (20002,223);
1196 // Only the first call to EnableWindowSizeCacheL() should have an effect
1197 // All subsequent calls to EnableWindowSizeCacheL() should have no effect
1198 rws.EnableWindowSizeCacheL();
1201 CleanupStack::Pop();
1204 CleanupStack::Pop();
1207 CleanupStack::Pop();
1213 //-------------------------------------------------------------------------------------------
1214 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeL(TSizeCacheStatus aEnableWindowSizeCache)
1219 TInt err = rws.Connect();
1220 CleanupClosePushL(rws);
1221 TEST(err==KErrNone);
1223 if (aEnableWindowSizeCache)
1225 rws.EnableWindowSizeCacheL();
1228 RWindowGroup wg(rws);
1230 CleanupClosePushL(rws);
1235 CleanupClosePushL(w1);
1238 TSize size1 (10001,123);
1243 TSize retSize1 = w1.Size();
1244 TEST(retSize1 == size1);
1247 TSize size2 (20002,223);
1252 TSize retSize2 = w1.Size();
1253 TEST(retSize2 == size2);
1256 CleanupStack::Pop();
1259 CleanupStack::Pop();
1262 CleanupStack::Pop();
1268 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtyToCleanSetExtentL(TSizeCacheStatus aEnableWindowSizeCache)
1273 TInt err = rws.Connect();
1274 CleanupClosePushL(rws);
1275 TEST(err==KErrNone);
1277 if (aEnableWindowSizeCache)
1279 rws.EnableWindowSizeCacheL();
1282 RWindowGroup wg(rws);
1284 CleanupClosePushL(rws);
1289 CleanupClosePushL(w1);
1292 TSize size1 (10001,123);
1297 TSize retSize1 = w1.Size();
1298 TEST(retSize1 == size1);
1301 TPoint point2 (20202,223);
1302 TSize size2 (20002,223);
1303 w1.SetExtent(point2, size2);
1307 TSize retSize2 = w1.Size();
1308 TEST(retSize2 == size2);
1311 CleanupStack::Pop();
1314 CleanupStack::Pop();
1317 CleanupStack::Pop();
1323 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeErrL(TSizeCacheStatus aEnableWindowSizeCache)
1328 TInt err = rws.Connect();
1329 CleanupClosePushL(rws);
1330 TEST(err==KErrNone);
1332 if (aEnableWindowSizeCache)
1334 rws.EnableWindowSizeCacheL();
1337 RWindowGroup wg(rws);
1339 CleanupClosePushL(rws);
1344 CleanupClosePushL(w1);
1347 TSize size1 (10001,123);
1352 TSize retSize1 = w1.Size();
1353 TEST(retSize1 == size1);
1356 TSize size2 (20002,223);
1357 err = w1.SetSizeErr(size2);
1358 TEST(KErrNone == err);
1361 TSize retSize2 = w1.Size();
1362 TEST(retSize2 == size2);
1365 CleanupStack::Pop();
1368 CleanupStack::Pop();
1371 CleanupStack::Pop();
1377 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtyToCleanSetExtentErrL(TSizeCacheStatus aEnableWindowSizeCache)
1382 TInt err = rws.Connect();
1383 CleanupClosePushL(rws);
1384 TEST(err==KErrNone);
1386 if (aEnableWindowSizeCache)
1388 rws.EnableWindowSizeCacheL();
1391 RWindowGroup wg(rws);
1393 CleanupClosePushL(rws);
1398 CleanupClosePushL(w1);
1401 TSize size1 (10001,123);
1406 TSize retSize1 = w1.Size();
1407 TEST(retSize1 == size1);
1410 TPoint point2 (20202,223);
1411 TSize size2 (20002,223);
1412 err = w1.SetExtentErr(point2, size2);
1413 TEST(KErrNone == err);
1416 TSize retSize2 = w1.Size();
1417 TEST(retSize2 == size2);
1420 CleanupStack::Pop();
1423 CleanupStack::Pop();
1426 CleanupStack::Pop();
1432 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeTwiceL(TSizeCacheStatus aEnableWindowSizeCache)
1437 TInt err = rws.Connect();
1438 CleanupClosePushL(rws);
1439 TEST(err==KErrNone);
1441 if (aEnableWindowSizeCache)
1443 rws.EnableWindowSizeCacheL();
1446 RWindowGroup wg(rws);
1448 CleanupClosePushL(rws);
1453 CleanupClosePushL(w1);
1456 TSize size1 (10001,123);
1461 TSize retSize1 = w1.Size();
1462 TEST(retSize1 == size1);
1465 TSize size2 (20002,223);
1468 TSize size3 (30003,323);
1474 TSize retSize2 = w1.Size();
1475 TEST(retSize2 == size3);
1478 CleanupStack::Pop();
1481 CleanupStack::Pop();
1484 CleanupStack::Pop();
1490 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeSetExtentL(TSizeCacheStatus aEnableWindowSizeCache)
1495 TInt err = rws.Connect();
1496 CleanupClosePushL(rws);
1497 TEST(err==KErrNone);
1499 if (aEnableWindowSizeCache)
1501 rws.EnableWindowSizeCacheL();
1504 RWindowGroup wg(rws);
1506 CleanupClosePushL(rws);
1511 CleanupClosePushL(w1);
1514 TSize size1 (10001,123);
1519 TSize retSize1 = w1.Size();
1520 TEST(retSize1 == size1);
1523 TSize size2 (20002,223);
1527 TPoint point3 (30303,232);
1528 TSize size3 (30003,323);
1529 w1.SetExtent(point3, size3);
1533 TSize retSize2 = w1.Size();
1534 TEST(retSize2 == size3);
1537 CleanupStack::Pop();
1540 CleanupStack::Pop();
1543 CleanupStack::Pop();
1549 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeSetSizeErrL(TSizeCacheStatus aEnableWindowSizeCache)
1554 TInt err = rws.Connect();
1555 CleanupClosePushL(rws);
1556 TEST(err==KErrNone);
1558 if (aEnableWindowSizeCache)
1560 rws.EnableWindowSizeCacheL();
1563 RWindowGroup wg(rws);
1565 CleanupClosePushL(rws);
1570 CleanupClosePushL(w1);
1573 TSize size1 (10001,123);
1578 TSize retSize1 = w1.Size();
1579 TEST(retSize1 == size1);
1582 TSize size2 (20002,223);
1586 TSize size3 (30003,323);
1587 err = w1.SetSizeErr(size3);
1588 TEST(KErrNone == err);
1591 TSize retSize2 = w1.Size();
1592 TEST(retSize2 == size3);
1595 CleanupStack::Pop();
1598 CleanupStack::Pop();
1601 CleanupStack::Pop();
1607 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeSetExtentErrL(TSizeCacheStatus aEnableWindowSizeCache)
1612 TInt err = rws.Connect();
1613 CleanupClosePushL(rws);
1614 TEST(err==KErrNone);
1616 if (aEnableWindowSizeCache)
1618 rws.EnableWindowSizeCacheL();
1621 RWindowGroup wg(rws);
1623 CleanupClosePushL(rws);
1628 CleanupClosePushL(w1);
1631 TSize size1 (10001,123);
1636 TSize retSize1 = w1.Size();
1637 TEST(retSize1 == size1);
1640 TSize size2 (20002,223);
1644 TPoint point3 (30303,232);
1645 TSize size3 (30003,323);
1646 err = w1.SetExtentErr(point3, size3);
1647 TEST(KErrNone == err);
1650 TSize retSize2 = w1.Size();
1651 TEST(retSize2 == size3);
1654 CleanupStack::Pop();
1657 CleanupStack::Pop();
1660 CleanupStack::Pop();
1666 void CTWindowSizeCacheTest::TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeEnableWindowSizeCacheL()
1671 TInt err = rws.Connect();
1672 CleanupClosePushL(rws);
1673 TEST(err==KErrNone);
1675 rws.EnableWindowSizeCacheL();
1677 RWindowGroup wg(rws);
1679 CleanupClosePushL(rws);
1684 CleanupClosePushL(w1);
1687 TSize size1 (10001,123);
1692 TSize retSize1 = w1.Size();
1693 TEST(retSize1 == size1);
1696 TSize size2 (20002,223);
1699 // Only the first call to EnableWindowSizeCacheL() should have an effect
1700 // All subsequent calls to EnableWindowSizeCacheL() should have no effect
1701 rws.EnableWindowSizeCacheL();
1704 TSize retSize2 = w1.Size();
1705 TEST(retSize2 == size2);
1708 CleanupStack::Pop();
1711 CleanupStack::Pop();
1714 CleanupStack::Pop();
1720 //------------------------------------------------------------------------------------------
1722 void CTWindowSizeCacheTest::TestRBlankWindowSetSizeSetExtentL(TSizeCacheStatus aEnableWindowSizeCache)
1727 TInt err = rws.Connect();
1728 CleanupClosePushL(rws);
1729 TEST(err==KErrNone);
1731 if (aEnableWindowSizeCache)
1733 rws.EnableWindowSizeCacheL();
1736 RWindowGroup wg(rws);
1737 err = wg.Construct(0);
1738 CleanupClosePushL(rws);
1739 TEST(err==KErrNone);
1742 RBlankWindow w1(rws);
1743 err = w1.Construct(wg,1);
1744 CleanupClosePushL(w1);
1745 TEST(err==KErrNone);
1748 TSize size1 (10001,123);
1753 TSize retSize1 = w1.Size();
1754 TEST(retSize1 == size1);
1757 TSize size2 (20002,223);
1761 TPoint point3 (30303,232);
1762 TSize size3 (30003,323);
1763 w1.SetExtent(point3, size3);
1767 TSize retSize2 = w1.Size();
1768 TEST(retSize2 == size3);
1771 TSize size4 (40004,423);
1775 TSize retSize3 = w1.Size();
1776 TEST(retSize3 == size4);
1779 CleanupStack::Pop();
1782 CleanupStack::Pop();
1785 CleanupStack::Pop();
1791 //------------------------------------------------------------------------------------------
1793 void CTWindowSizeCacheTest::TestRBackedUpWindowSetSizeErrSetExtentErrL(TSizeCacheStatus aEnableWindowSizeCache)
1798 TInt err = rws.Connect();
1799 CleanupClosePushL(rws);
1800 TEST(err==KErrNone);
1802 if (aEnableWindowSizeCache)
1804 rws.EnableWindowSizeCacheL();
1807 RWindowGroup wg(rws);
1808 err = wg.Construct(0);
1809 CleanupClosePushL(rws);
1810 TEST(err==KErrNone);
1813 RBlankWindow w1(rws);
1814 err = w1.Construct(wg,1);
1815 CleanupClosePushL(w1);
1816 TEST(err==KErrNone);
1819 TSize size1 (10001,123);
1820 err = w1.SetSizeErr(size1);
1821 TEST(err==KErrNone);
1824 TSize retSize1 = w1.Size();
1825 TEST(retSize1 == size1);
1828 TSize size2 (20002,223);
1829 err = w1.SetSizeErr(size2);
1830 TEST(err==KErrNone);
1833 TPoint point3 (30303,232);
1834 TSize size3 (30003,323);
1835 err = w1.SetExtentErr(point3, size3);
1836 TEST(err==KErrNone);
1839 TSize retSize2 = w1.Size();
1840 TEST(retSize2 == size3);
1843 TSize size4 (40004,423);
1844 err = w1.SetSizeErr(size4);
1845 TEST(err==KErrNone);
1848 TSize retSize3 = w1.Size();
1849 TEST(retSize3 == size4);
1852 CleanupStack::Pop();
1855 CleanupStack::Pop();
1858 CleanupStack::Pop();
1864 //------------------------------------------------------------------------------------------
1866 TUint64 CTWindowSizeCacheTest::TestRWindowSizePerformanceL(TSizeCacheStatus aEnableWindowSizeCache, TUint aIterations)
1868 TUint64 timeDeltaMicroSeconds = 0;
1873 TInt err = rws.Connect();
1874 TEST(KErrNone == err);
1875 CleanupClosePushL(rws);
1877 if (ETestSizeCacheEnabled == aEnableWindowSizeCache)
1879 rws.EnableWindowSizeCacheL();
1882 RWindowGroup wg(rws);
1883 err = wg.Construct(0);
1884 TEST(KErrNone == err);
1885 CleanupClosePushL(wg);
1889 err = w1.Construct(wg,1);
1890 TEST(KErrNone == err);
1891 CleanupClosePushL(w1);
1893 TSize size1 (10001,123);
1898 start.UniversalTime();
1899 for (TUint iter = 0; iter < aIterations; ++iter)
1902 TSize retSize1 = w1.Size();
1903 TEST(retSize1 == size1);
1905 end.UniversalTime();
1907 TTimeIntervalMicroSeconds delta = end.MicroSecondsFrom(start);
1908 timeDeltaMicroSeconds = delta.Int64();
1909 INFO_PRINTF4(_L("TestRWindowSizePerformanceL - WindowSizeCacheEnabled %d, Iterations %d, Microseconds %Ld"), aEnableWindowSizeCache, aIterations, timeDeltaMicroSeconds);
1912 CleanupStack::Pop();
1915 CleanupStack::Pop();
1918 CleanupStack::Pop();
1922 return timeDeltaMicroSeconds;
1926 //------------------------------------------------------------------------------------------
1928 Sets the random seed used by CTWindowSizeCacheTest::NextRandom.
1930 void CTWindowSizeCacheTest::SetRandomSeed(TInt64 aSeed)
1932 INFO_PRINTF2(_L("Random Seed - %d"), aSeed);
1937 Performs an action on RWindow or RWsSession as specified by TRWindowAction aAction.
1938 When the size of the window is changed, aExpectedSize is changed to the size we expect the window to be the next time RWindow::Size is called.
1939 When RWindow::Size is called, we check the size returned matches aExpectedSize.
1940 If aAction requests RWsSession::EnableWindowSizeCache, we call this if TSizeCacheStatus allows this.
1942 This function was designed for use with random stress tests, with a pseudo-random sequence driving TRWindowAction.
1944 void CTWindowSizeCacheTest::RWindowPerformAction(TRWindowAction aAction, TSizeCacheStatus aEnableWindowSizeCache, RWsSession& aWs, RWindow& aWindow, TSize& aExpectedSize)
1950 TPoint point(NextRandom(), NextRandom());
1951 aExpectedSize.iHeight = NextRandom();
1952 aExpectedSize.iWidth = NextRandom();
1953 aWindow.SetExtent(point, aExpectedSize);
1954 aExpectedSize.iHeight = (aExpectedSize.iHeight < 0) ? 0 : aExpectedSize.iHeight;
1955 aExpectedSize.iWidth = (aExpectedSize.iWidth < 0) ? 0 : aExpectedSize.iWidth;
1958 case ESetExtentErr :
1960 TPoint point(NextRandom(), NextRandom());
1961 aExpectedSize.iHeight = NextRandom();
1962 aExpectedSize.iWidth = NextRandom();
1963 TInt err = aWindow.SetExtentErr(point, aExpectedSize);
1964 TEST(KErrNone == err);
1965 aExpectedSize.iHeight = (aExpectedSize.iHeight < 0) ? 0 : aExpectedSize.iHeight;
1966 aExpectedSize.iWidth = (aExpectedSize.iWidth < 0) ? 0 : aExpectedSize.iWidth;
1971 aExpectedSize.iHeight = NextRandom();
1972 aExpectedSize.iWidth = NextRandom();
1973 aWindow.SetSize(aExpectedSize);
1974 aExpectedSize.iHeight = (aExpectedSize.iHeight < 0) ? 0 : aExpectedSize.iHeight;
1975 aExpectedSize.iWidth = (aExpectedSize.iWidth < 0) ? 0 : aExpectedSize.iWidth;
1980 aExpectedSize.iHeight = NextRandom();
1981 aExpectedSize.iWidth = NextRandom();
1982 TInt err = aWindow.SetSizeErr(aExpectedSize);
1983 TEST(KErrNone == err);
1984 aExpectedSize.iHeight = (aExpectedSize.iHeight < 0) ? 0 : aExpectedSize.iHeight;
1985 aExpectedSize.iWidth = (aExpectedSize.iWidth < 0) ? 0 : aExpectedSize.iWidth;
1990 TSize retSize1 = aWindow.Size();
1991 TEST(retSize1 == aExpectedSize);
1994 case EFlushSession :
1999 case EEnableWindowSizeCache :
2001 if (ETestSizeCacheEnabled == aEnableWindowSizeCache)
2003 aWs.EnableWindowSizeCacheL();
2012 void CTWindowSizeCacheTest::TestRandomisedStressL(TSizeCacheStatus aEnableWindowSizeCache, TUint aIterations)
2017 TInt err = rws.Connect();
2018 TEST(KErrNone == err);
2019 CleanupClosePushL(rws);
2021 if (aEnableWindowSizeCache)
2023 rws.EnableWindowSizeCacheL();
2026 RWindowGroup wg(rws);
2027 err = wg.Construct(0);
2028 TEST(KErrNone == err);
2029 CleanupClosePushL(wg);
2033 err = w1.Construct(wg,1);
2034 TEST(KErrNone == err);
2035 CleanupClosePushL(w1);
2037 TSize size1 (10001,123);
2040 for (TUint iter = 0; iter < aIterations; ++iter)
2042 TRWindowAction action = static_cast<TRWindowAction>(NextRandom(EMaxAction));
2043 RWindowPerformAction(action, aEnableWindowSizeCache, rws, w1, size1);
2047 CleanupStack::Pop();
2050 CleanupStack::Pop();
2053 CleanupStack::Pop();
2059 TCleanupOperation for a window pool, implemented as RPointerArray<RWindow>.
2061 void CTWindowSizeCacheTest::CleanupWindowPool(TAny* aPtr)
2063 RPointerArray<RWindow> windowPool = *(static_cast<RPointerArray<RWindow>*>(aPtr));
2064 const TUint poolSize = windowPool.Count();
2065 // Note: ResetAndDestroy deletes referenced objects, so no need to delete items in loop
2066 for (TUint iter = 0; iter < poolSize; ++iter)
2068 windowPool[iter]->Close();
2070 windowPool.ResetAndDestroy();
2073 void CTWindowSizeCacheTest::TestRandomisedStressMultiSessionL(TSizeCacheStatus aEnableWindowSizeCache, TUint aIterations)
2078 TInt err = rws1.Connect();
2079 TEST(KErrNone == err);
2080 CleanupClosePushL(rws1);
2082 // Multiple sessions in one thread
2084 err = rws2.Connect();
2085 TEST(KErrNone == err);
2086 CleanupClosePushL(rws2);
2088 RWindowGroup rws1_wg1(rws1);
2089 err = rws1_wg1.Construct(0);
2090 CleanupClosePushL(rws1_wg1);
2091 TEST(KErrNone == err);
2093 RWindowGroup rws2_wg1(rws2);
2094 err = rws2_wg1.Construct(0);
2095 CleanupClosePushL(rws2_wg1);
2096 TEST(KErrNone == err);
2098 // Multiple window groups in one session
2099 RWindowGroup rws2_wg2(rws2);
2100 err = rws2_wg2.Construct(1);
2101 CleanupClosePushL(rws2_wg2);
2102 TEST(KErrNone == err);
2104 // Window pool for all windows owned by session rws1
2105 RPointerArray<RWindow> rws1_windowPool;
2106 CleanupStack::PushL(TCleanupItem(CleanupWindowPool,&rws1_windowPool));
2107 // Each window in window pool has a corresponding expected size at corresponding array index
2108 RArray<TSize> rws1_expectedSizePool;
2109 CleanupClosePushL(rws1_expectedSizePool);
2111 // Window pool for all windows owned by session rws2
2112 RPointerArray<RWindow> rws2_windowPool;
2113 CleanupStack::PushL(TCleanupItem(CleanupWindowPool,&rws2_windowPool));
2114 // Each window in window pool has a corresponding expected size at corresponding array index
2115 RArray<TSize> rws2_expectedSizePool;
2116 CleanupClosePushL(rws2_expectedSizePool);
2118 // Populate window pool
2119 const TUint KWindowCount_rws1_wg1 = 50;
2120 const TUint KWindowCount_rws2_wg1 = 50;
2121 const TUint KWindowCount_rws2_wg2 = 50;
2123 // Windows for session 1 belonging to rws1_wg1
2124 // Many windows - siblings
2125 for (TUint iter = 0; iter < KWindowCount_rws1_wg1; ++iter)
2127 RWindow* win = new (ELeave) RWindow(rws1);
2128 CleanupStack::PushL(win);
2129 TInt err = win->Construct(rws1_wg1,iter+1);
2130 TEST(KErrNone == err);
2131 rws1_windowPool.AppendL(win);
2132 CleanupStack::Pop(win);
2133 TSize expectedSize (NextRandom(),NextRandom());
2134 win->SetSize(expectedSize);
2135 // Wserv flattens size to zero
2136 expectedSize.iHeight = (expectedSize.iHeight < 0) ? 0 : expectedSize.iHeight;
2137 expectedSize.iWidth = (expectedSize.iWidth < 0) ? 0 : expectedSize.iWidth;
2138 rws1_expectedSizePool.AppendL(expectedSize);
2139 TSize retSize1 = win->Size();
2140 TEST(retSize1 == expectedSize);
2143 // Windows for session 2 belonging to rws2_wg1
2144 // Many windows - siblings
2145 for (TUint iter = 0; iter < KWindowCount_rws2_wg1; ++iter)
2147 RWindow* win = new (ELeave) RWindow(rws2);
2148 CleanupStack::PushL(win);
2149 TInt err = win->Construct(rws2_wg1,iter+2);
2150 TEST(KErrNone == err);
2151 rws2_windowPool.AppendL(win);
2152 CleanupStack::Pop();
2153 TSize expectedSize (NextRandom(),NextRandom());
2154 win->SetSize(expectedSize);
2155 // Wserv flattens size to zero
2156 expectedSize.iHeight = (expectedSize.iHeight < 0) ? 0 : expectedSize.iHeight;
2157 expectedSize.iWidth = (expectedSize.iWidth < 0) ? 0 : expectedSize.iWidth;
2158 rws2_expectedSizePool.AppendL(expectedSize);
2159 TSize retSize1 = win->Size();
2160 TEST(retSize1 == expectedSize);
2163 // Windows for session 2 belonging to rws2_wg2
2164 // Many windows - children
2165 RWindowTreeNode parent = rws2_wg2;
2166 for (TUint iter = 0; iter < KWindowCount_rws2_wg2; ++iter)
2168 RWindow* win = new (ELeave) RWindow(rws2);
2169 CleanupStack::PushL(win);
2170 TInt err = win->Construct(parent,KWindowCount_rws2_wg1+iter+2);
2171 TEST(KErrNone == err);
2173 rws2_windowPool.AppendL(win);
2174 CleanupStack::Pop();
2175 TSize expectedSize (NextRandom(),NextRandom());
2176 win->SetSize(expectedSize);
2177 // Wserv flattens size to zero
2178 expectedSize.iHeight = (expectedSize.iHeight < 0) ? 0 : expectedSize.iHeight;
2179 expectedSize.iWidth = (expectedSize.iWidth < 0) ? 0 : expectedSize.iWidth;
2180 rws2_expectedSizePool.AppendL(expectedSize);
2181 TSize retSize1 = win->Size();
2182 TEST(retSize1 == expectedSize);
2185 // Stress system by performing actions on windows
2186 for (TUint iter = 0; iter < aIterations; ++iter)
2188 TRWindowAction action = static_cast<TRWindowAction>(NextRandom(EMaxAction));
2189 TUint32 windowPool = NextRandom(2);
2194 TUint32 target = NextRandom(rws1_windowPool.Count());
2195 RWindowPerformAction(action, aEnableWindowSizeCache, rws1, *(rws1_windowPool[target]) , rws1_expectedSizePool[target]);
2200 TUint32 target = NextRandom(rws2_windowPool.Count());
2201 RWindowPerformAction(action, aEnableWindowSizeCache, rws2, *(rws2_windowPool[target]) , rws2_expectedSizePool[target]);
2210 // Cleanup afterwards
2211 CleanupStack::Pop(9);
2213 CleanupWindowPool(&rws1_windowPool);
2214 rws1_expectedSizePool.Close();
2218 CleanupWindowPool(&rws2_windowPool);
2219 rws2_expectedSizePool.Close();
2225 void CTWindowSizeCacheTest::TestRandomisedStressCacheEntryVolumeL(TSizeCacheStatus aEnableWindowSizeCache, TUint aIterations, TUint aWindowPoolSize)
2230 TInt err = rws1.Connect();
2231 TEST(KErrNone == err);
2232 CleanupClosePushL(rws1);
2234 if (aEnableWindowSizeCache)
2236 rws1.EnableWindowSizeCacheL();
2239 RWindowGroup rws1_wg1(rws1);
2240 err = rws1_wg1.Construct(0);
2241 TEST(KErrNone == err);
2242 CleanupClosePushL(rws1_wg1);
2244 RPointerArray<RWindow> windowPool;
2245 CleanupStack::PushL(TCleanupItem(CleanupWindowPool,&windowPool));
2246 // Each window in window pool has a corresponding expected size at corresponding array index
2247 RArray<TSize> expectedSizePool;
2248 CleanupClosePushL(expectedSizePool);
2250 // Populate window pool
2251 for (TUint iter = 0; iter < aWindowPoolSize; ++iter)
2253 RWindow* win = new (ELeave) RWindow(rws1);
2254 CleanupStack::PushL(win);
2255 TInt err = win->Construct(rws1_wg1,iter+1);
2256 TEST(KErrNone == err);
2257 windowPool.AppendL(win);
2258 CleanupStack::Pop(win);
2260 TSize expectedSize (NextRandom(),NextRandom());
2261 win->SetSize(expectedSize);
2262 // Wserv flattens size to zero
2263 expectedSize.iHeight = (expectedSize.iHeight < 0) ? 0 : expectedSize.iHeight;
2264 expectedSize.iWidth = (expectedSize.iWidth < 0) ? 0 : expectedSize.iWidth;
2265 expectedSizePool.AppendL(expectedSize);
2266 TSize retSize1 = win->Size();
2267 TEST(retSize1 == expectedSize);
2270 // Stress system by performing actions on windows
2271 for (TUint iter = 0; iter < aIterations; ++iter)
2273 TRWindowAction action = static_cast<TRWindowAction>(NextRandom(EMaxAction));
2274 TUint32 target = NextRandom(aWindowPoolSize);
2275 RWindowPerformAction(action, aEnableWindowSizeCache, rws1, *(windowPool[target]), expectedSizePool[target]);
2278 // Cleanup afterwards
2279 CleanupStack::Pop(4);
2281 CleanupWindowPool(&windowPool);
2282 expectedSizePool.Close();
2289 //------------------------------------------------------------------------------------------
2291 void CTWindowSizeCacheTest::TestStressEnableWindowSizeCacheL(TUint aIterations)
2296 TInt err = rws.Connect();
2297 CleanupClosePushL(rws);
2298 TEST(err==KErrNone);
2300 // Only the first call to EnableWindowSizeCacheL() should have an effect
2301 // All subsequent calls to EnableWindowSizeCacheL() should have no effect
2302 for (TUint iter = 0; iter < aIterations; iter++)
2304 rws.EnableWindowSizeCacheL();
2307 RWindowGroup wg(rws);
2309 CleanupClosePushL(rws);
2314 CleanupClosePushL(w1);
2316 TSize size1 (10001,123);
2320 TSize retSize1 = w1.Size();
2321 TEST(retSize1 == size1);
2324 TSize size2 (20002,223);
2328 // Only the first call to EnableWindowSizeCacheL() should have an effect
2329 // All subsequent calls to EnableWindowSizeCacheL() should have no effect
2330 for (TUint iter = 0; iter < aIterations; iter++)
2332 rws.EnableWindowSizeCacheL();
2336 TSize retSize2 = w1.Size();
2337 TEST(retSize2 == size2);
2340 CleanupStack::Pop();
2343 CleanupStack::Pop();
2346 CleanupStack::Pop();
2353 Tests 701-706 focus on window creation operating correctly, alternating use of the window size cache.
2354 Tests 707-710 aim to cover state transitions for cache entries in the window size cache for RWindow.
2355 Tests 711-712 performs basic verification of size related functionality for RBlankWindow and RBackedUpWindow.
2356 Test 713 focusses on ensuring a performance gain is achieved with window size caching enabled.
2357 Tests 714-720 aim to stress the window size cache with pseudo-random sequences of RWindow size related functions.
2359 The states in the state machine model used for testing the RWindow size cache in tests 707-710 is as follows:
2362 Window not yet in existence
2364 State 0: No Cache entry
2365 Window created, window size cache does not contain an entry for this window
2367 State 1: Cache entry exists, cache clean
2368 Window created, window size cache exists, contains a valid size
2370 State 2: Cache entry exists, cache dirty
2371 Window created, window size cache exists, does not contain a valid size
2376 void CTWindowSizeCacheTest::RunTestCaseL(TInt /*aCurTestCase*/)
2378 _LIT(KTest1,"Create RWindow, window size cache off");
2379 _LIT(KTest2,"Create RWindow, window size cache on");
2380 _LIT(KTest3,"Create RBlankWindow, window size cache off");
2381 _LIT(KTest4,"Create RBlankWindow, window size cache on");
2382 _LIT(KTest5,"Create RBackedUpWindow, window size cache off");
2383 _LIT(KTest6,"Create RBackedUpWindow, window size cache on");
2385 _LIT(KTest7,"RWindow - No cache entry");
2386 _LIT(KTest8,"RWindow - Cache entry exists, cache clean");
2387 _LIT(KTest9,"RWindow - Cache entry exists, cache dirty");
2388 _LIT(KTest10,"RWindow - Cache entry exists, cache dirty->clean");
2390 _LIT(KTest11,"RBlankWindow size cache");
2391 _LIT(KTest12,"RBackedUpWindow size cache");
2393 _LIT(KTest13,"RWindow Size Performance");
2394 _LIT(KTest14,"RWindow Randomised Stress window size cache off");
2395 _LIT(KTest15,"RWindow Randomised Stress window size cache on");
2396 _LIT(KTest16,"RWindow Randomised Stress MultiSession cache off");
2397 _LIT(KTest17,"RWindow Randomised Stress MultiSession cache on");
2398 _LIT(KTest18,"RWindow Randomised Stress Entry Volume cache off");
2399 _LIT(KTest19,"RWindow Randomised Stress Entry Volume cache on");
2400 _LIT(KTest20,"RWsSession stress EnableWindowSizeCacheL");
2402 const TDisplayMode displayMode = EColor16MAP;
2403 const TUint KPerformanceIterations = 50000;
2404 const TUint KStressTestIterations = 3000;
2405 const TUint KStressWindowPoolSize = 100;
2407 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName);
2409 switch(++iTest->iState)
2412 @SYMTestCaseID GRAPHICS-WSERV-0701
2414 @SYMDEF DevCR BBRE-7UWGHL
2416 @SYMTestCaseDesc Test creation and destruction for instances of RWindow, window size cache off
2418 @SYMTestPriority High
2420 @SYMTestStatus Implemented
2422 @SYMTestActions Creates an RWsSession, some RWindowGroup and RWindow instances, and closes them.
2424 @SYMTestExpectedResults Window objects created successfully, no memory leaks.
2427 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0701"));
2428 iTest->LogSubTest(KTest1);
2429 TestCreateRWindowL(ETestSizeCacheNotEnabled);
2432 @SYMTestCaseID GRAPHICS-WSERV-0702
2434 @SYMDEF DevCR BBRE-7UWGHL
2436 @SYMTestCaseDesc Test creation and destruction for instances of RWindow, window size cache on
2438 @SYMTestPriority High
2440 @SYMTestStatus Implemented
2442 @SYMTestActions Creates an RWsSession, enables window size cache, creates some RWindowGroup and RWindow instances, and closes them.
2444 @SYMTestExpectedResults Window objects created successfully, no memory leaks.
2447 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0702"));
2448 iTest->LogSubTest(KTest2);
2449 TestCreateRWindowL(ETestSizeCacheEnabled);
2452 @SYMTestCaseID GRAPHICS-WSERV-0703
2454 @SYMDEF DevCR BBRE-7UWGHL
2456 @SYMTestCaseDesc Test creation and destruction for instances of RBlankWindow, window size cache off
2458 @SYMTestPriority High
2460 @SYMTestStatus Implemented
2462 @SYMTestActions Creates an RWsSession, creates some RWindowGroup and RBlankWindow instances, and closes them.
2464 @SYMTestExpectedResults Window objects created successfully, no memory leaks.
2467 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0703"));
2468 iTest->LogSubTest(KTest3);
2469 TestCreateRBlankWindowL(ETestSizeCacheNotEnabled);
2472 @SYMTestCaseID GRAPHICS-WSERV-0704
2474 @SYMDEF DevCR BBRE-7UWGHL
2476 @SYMTestCaseDesc Test creation and destruction for instances of RBlankWindow, window size cache on
2478 @SYMTestPriority High
2480 @SYMTestStatus Implemented
2482 @SYMTestActions Creates an RWsSession, enables window size cache, creates some RWindowGroup and RBlankWindow instances, and closes them.
2484 @SYMTestExpectedResults Window objects created successfully, no memory leaks.
2487 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0704"));
2488 iTest->LogSubTest(KTest4);
2489 TestCreateRBlankWindowL(ETestSizeCacheEnabled);
2492 @SYMTestCaseID GRAPHICS-WSERV-0705
2494 @SYMDEF DevCR BBRE-7UWGHL
2496 @SYMTestCaseDesc Test creation and destruction for instances of RBackedUpWindow, window size cache off
2498 @SYMTestPriority High
2500 @SYMTestStatus Implemented
2502 @SYMTestActions Creates an RWsSession, creates some RWindowGroup and RBackedUpWindow instances, and closes them.
2504 @SYMTestExpectedResults Window objects created successfully, no memory leaks.
2507 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0705"));
2508 iTest->LogSubTest(KTest5);
2509 TestCreateRBackedUpWindowL(ETestSizeCacheNotEnabled, displayMode);
2512 @SYMTestCaseID GRAPHICS-WSERV-0706
2514 @SYMDEF DevCR BBRE-7UWGHL
2516 @SYMTestCaseDesc Test creation and destruction for instances of RBackedUpWindow, window size cache on
2518 @SYMTestPriority High
2520 @SYMTestStatus Implemented
2522 @SYMTestActions Creates an RWsSession, enables window size cache, creates some RWindowGroup and RBackedUpWindow instances, and closes them.
2524 @SYMTestExpectedResults Window objects created successfully, no memory leaks.
2527 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0706"));
2528 iTest->LogSubTest(KTest6);
2529 TestCreateRBackedUpWindowL(ETestSizeCacheEnabled, displayMode);
2532 @SYMTestCaseID GRAPHICS-WSERV-0707
2534 @SYMDEF DevCR BBRE-7UWGHL
2536 @SYMTestCaseDesc Test RWindow size cache - State: No Cache Entry
2538 @SYMTestPriority High
2540 @SYMTestStatus Implemented
2542 @SYMTestActions Perform the following with window size cache on and off:
2543 Create RWsSession, creates RWindowGroup and RWindow.
2544 Perform one of SetExtent/SetSize/SetExtentErr/SetSizeErr/EnableWindowSizeCacheL.
2547 @SYMTestExpectedResults Window objects created successfully, no memory leaks.
2550 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0707"));
2551 iTest->LogSubTest(KTest7);
2552 TestRWindowNoCacheEntryL(ETestSizeCacheNotEnabled);
2553 TestRWindowNoCacheEntryL(ETestSizeCacheEnabled);
2554 TestRWindowNoCacheEntrySetExtentErrL(ETestSizeCacheNotEnabled);
2555 TestRWindowNoCacheEntrySetExtentErrL(ETestSizeCacheEnabled);
2556 TestRWindowNoCacheEntrySetSizeErrL(ETestSizeCacheNotEnabled);
2557 TestRWindowNoCacheEntrySetSizeErrL(ETestSizeCacheEnabled);
2558 TestRWindowNoCacheEntrySetExtentL(ETestSizeCacheNotEnabled);
2559 TestRWindowNoCacheEntrySetExtentL(ETestSizeCacheEnabled);
2560 TestRWindowNoCacheEntrySetSizeL(ETestSizeCacheNotEnabled);
2561 TestRWindowNoCacheEntrySetSizeL(ETestSizeCacheEnabled);
2562 TestRWindowNoCacheEntryEnableWindowSizeCacheL();
2566 @SYMTestCaseID GRAPHICS-WSERV-0708
2568 @SYMDEF DevCR BBRE-7UWGHL
2570 @SYMTestCaseDesc Test RWindow size cache State: Cache entry exists, cache clean
2572 @SYMTestPriority High
2574 @SYMTestStatus Implemented
2576 @SYMTestActions Perform the following with window size cache on and off:
2577 Create RWsSession, creates RWindowGroup and RWindow, calls SetSize.
2578 Perform one of Size/EnableWindowSizeCacheL.
2579 Check that size returned matches expected size.
2582 @SYMTestExpectedResults Window objects created successfully, no memory leaks.
2585 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0708"));
2586 iTest->LogSubTest(KTest8);
2587 TestRWindowCacheEntryExistsCacheCleanL(ETestSizeCacheNotEnabled);
2588 TestRWindowCacheEntryExistsCacheCleanL(ETestSizeCacheEnabled);
2589 TestRWindowCacheEntryExistsCacheCleanSizeL(ETestSizeCacheNotEnabled);
2590 TestRWindowCacheEntryExistsCacheCleanSizeL(ETestSizeCacheEnabled);
2591 TestRWindowCacheEntryExistsCacheCleanEnableWindowSizeCacheL();
2592 TestRWindowCacheEntryExistsCacheCleanEnableWindowSizeCacheLSizeL();
2596 @SYMTestCaseID GRAPHICS-WSERV-0709
2598 @SYMDEF DevCR BBRE-7UWGHL
2600 @SYMTestCaseDesc Test RWindow size cache State: Cache entry exists, cache dirty
2602 @SYMTestPriority High
2604 @SYMTestStatus Implemented
2606 @SYMTestActions Perform the following with window size cache on and off:
2607 Create RWsSession, creates RWindowGroup and RWindow.
2608 Calls SetSize, Size, then SetSize to enter state with dirty cache entry.
2609 Perform combinations of SetSize/SetExtent/SetSizeErr/SetExtentErr/EnableWindowSizeCacheL.
2610 Check that size returned matches the last size set on the window whenever size is queried.
2613 @SYMTestExpectedResults Window objects created successfully, no memory leaks.
2616 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0709"));
2617 iTest->LogSubTest(KTest9);
2618 TestRWindowCacheEntryExistsCacheDirtySetSizeL(ETestSizeCacheNotEnabled);
2619 TestRWindowCacheEntryExistsCacheDirtySetSizeL(ETestSizeCacheEnabled);
2620 TestRWindowCacheEntryExistsCacheDirtySetExtentL(ETestSizeCacheNotEnabled);
2621 TestRWindowCacheEntryExistsCacheDirtySetExtentL(ETestSizeCacheEnabled);
2622 TestRWindowCacheEntryExistsCacheDirtySetSizeErrL(ETestSizeCacheNotEnabled);
2623 TestRWindowCacheEntryExistsCacheDirtySetSizeErrL(ETestSizeCacheEnabled);
2624 TestRWindowCacheEntryExistsCacheDirtySetExtentErrL(ETestSizeCacheNotEnabled);
2625 TestRWindowCacheEntryExistsCacheDirtySetExtentErrL(ETestSizeCacheEnabled);
2626 TestRWindowCacheEntryExistsCacheDirtySetSizeTwiceL(ETestSizeCacheNotEnabled);
2627 TestRWindowCacheEntryExistsCacheDirtySetSizeTwiceL(ETestSizeCacheEnabled);
2628 TestRWindowCacheEntryExistsCacheDirtySetSizeSetExtentL(ETestSizeCacheNotEnabled);
2629 TestRWindowCacheEntryExistsCacheDirtySetSizeSetExtentL(ETestSizeCacheEnabled);
2630 TestRWindowCacheEntryExistsCacheDirtySetSizeSetSizeErrL(ETestSizeCacheNotEnabled);
2631 TestRWindowCacheEntryExistsCacheDirtySetSizeSetSizeErrL(ETestSizeCacheEnabled);
2632 TestRWindowCacheEntryExistsCacheDirtySetSizeSetExtentErrL(ETestSizeCacheNotEnabled);
2633 TestRWindowCacheEntryExistsCacheDirtySetSizeSetExtentErrL(ETestSizeCacheEnabled);
2634 TestRWindowCacheEntryExistsCacheDirtySetSizeEnableWindowSizeCacheL();
2639 @SYMTestCaseID GRAPHICS-WSERV-0710
2641 @SYMDEF DevCR BBRE-7UWGHL
2643 @SYMTestCaseDesc Test RWindow size cache State: Cache entry exists, cache dirty -> State: Cache entry exists, cache clean
2645 @SYMTestPriority High
2647 @SYMTestStatus Implemented
2649 @SYMTestActions Perform the following with window size cache on and off:
2650 Create RWsSession, creates RWindowGroup and RWindow.
2651 Calls SetSize, Size, to enter state with clean cache entry.
2652 Perform combinations of SetSize/SetExtent/SetSizeErr/SetExtentErr/EnableWindowSizeCacheL to enter state with dirty cache entry.
2653 Calls RWindow::Size to re-enter state with clean cache entry.
2654 Check that size returned matches the last size set on the window whenever size is queried.
2657 @SYMTestExpectedResults Window objects created successfully, no memory leaks.
2660 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0710"));
2661 iTest->LogSubTest(KTest10);
2662 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeL(ETestSizeCacheNotEnabled);
2663 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeL(ETestSizeCacheEnabled);
2664 TestRWindowCacheEntryExistsCacheDirtyToCleanSetExtentL(ETestSizeCacheNotEnabled);
2665 TestRWindowCacheEntryExistsCacheDirtyToCleanSetExtentL(ETestSizeCacheEnabled);
2666 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeErrL(ETestSizeCacheNotEnabled);
2667 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeErrL(ETestSizeCacheEnabled);
2668 TestRWindowCacheEntryExistsCacheDirtyToCleanSetExtentErrL(ETestSizeCacheNotEnabled);
2669 TestRWindowCacheEntryExistsCacheDirtyToCleanSetExtentErrL(ETestSizeCacheEnabled);
2670 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeTwiceL(ETestSizeCacheNotEnabled);
2671 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeTwiceL(ETestSizeCacheEnabled);
2672 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeSetExtentL(ETestSizeCacheNotEnabled);
2673 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeSetExtentL(ETestSizeCacheEnabled);
2674 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeSetSizeErrL(ETestSizeCacheNotEnabled);
2675 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeSetSizeErrL(ETestSizeCacheEnabled);
2676 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeSetExtentErrL(ETestSizeCacheNotEnabled);
2677 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeSetExtentErrL(ETestSizeCacheEnabled);
2678 TestRWindowCacheEntryExistsCacheDirtyToCleanSetSizeEnableWindowSizeCacheL();
2682 @SYMTestCaseID GRAPHICS-WSERV-0711
2684 @SYMDEF DevCR BBRE-7UWGHL
2686 @SYMTestCaseDesc Test RBlankWindow Size cache behaviour
2688 @SYMTestPriority High
2690 @SYMTestStatus Implemented
2692 @SYMTestActions Utilises RBlankWindow::SetSize, RBlankWindow::SetExtent, RBlankWindow::Size.
2693 Checks size returned by RBlankWindow::Size.
2696 @SYMTestExpectedResults Window objects created successfully, no memory leaks, size returned should be last size set on window
2699 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0711"));
2700 iTest->LogSubTest(KTest11);
2701 TestRBlankWindowSetSizeSetExtentL(ETestSizeCacheNotEnabled);
2702 TestRBlankWindowSetSizeSetExtentL(ETestSizeCacheEnabled);
2705 @SYMTestCaseID GRAPHICS-WSERV-0712
2707 @SYMDEF DevCR BBRE-7UWGHL
2709 @SYMTestCaseDesc Test RBackedUpWindow Size cache behaviour
2711 @SYMTestPriority High
2713 @SYMTestStatus Implemented
2715 @SYMTestActions Utilises RBackedUpWindow::SetSizeErr, RBackedUpWindow::SetExtentErr, RBackedUpWindow::Size.
2716 Checks size returned by RBackedUpWindow::Size.
2719 @SYMTestExpectedResults Window objects created successfully, no memory leaks, size returned should be last size set on window
2722 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0712"));
2723 iTest->LogSubTest(KTest12);
2724 TestRBackedUpWindowSetSizeErrSetExtentErrL(ETestSizeCacheNotEnabled);
2725 TestRBackedUpWindowSetSizeErrSetExtentErrL(ETestSizeCacheEnabled);
2729 @SYMTestCaseID GRAPHICS-WSERV-0713
2731 @SYMDEF DevCR BBRE-7UWGHL
2733 @SYMTestCaseDesc Compare performance of RWindow::Size function with size cache on and off
2735 @SYMTestPriority High
2737 @SYMTestStatus Implemented
2739 @SYMTestActions Creates an RWsSession, optionally enables window size cache, creates an RWindowGroup and an RWindow
2740 Calls RWindow::Size KPerformanceIterations times.
2741 Measures time taken - with and without size cache enabled
2743 @SYMTestExpectedResults Window objects created successfully, no memory leaks, time taken for KPerformanceIterations RWindow::Size() calls with cache enabled should be faster.
2747 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0713"));
2748 iTest->LogSubTest(KTest13);
2749 TUint64 sizeCacheOffDeltaMicroSeconds = TestRWindowSizePerformanceL(ETestSizeCacheNotEnabled, KPerformanceIterations);
2750 TUint64 sizeCacheOnDeltaMicroSeconds = TestRWindowSizePerformanceL(ETestSizeCacheEnabled, KPerformanceIterations);
2751 TEST(sizeCacheOnDeltaMicroSeconds < sizeCacheOffDeltaMicroSeconds);
2752 INFO_PRINTF1(_L("Accessing size using cache is faster"));
2756 @SYMTestCaseID GRAPHICS-WSERV-0714
2758 @SYMDEF DevCR BBRE-7UWGHL
2760 @SYMTestCaseDesc Randomised stress test - RWindow size related functions
2762 @SYMTestPriority High
2764 @SYMTestStatus Implemented
2766 @SYMTestActions Creates an RWsSession, creates some RWindowGroup and RWindow instances, performs random size related actions, cleans up.
2768 @SYMTestExpectedResults Window objects created successfully, no memory leaks, size for each window matches last size set on window
2772 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0714"));
2773 iTest->LogSubTest(KTest14);
2774 TInt seed = Math::Random();
2775 // To replicate a test run, take the random seed from the test log and pass into SetRandomSeed
2776 SetRandomSeed(seed);
2777 TestRandomisedStressL(ETestSizeCacheNotEnabled, KStressTestIterations);
2781 @SYMTestCaseID GRAPHICS-WSERV-0714
2783 @SYMDEF DevCR BBRE-7UWGHL
2785 @SYMTestCaseDesc Randomised stress test - RWindow size related functions, size cache on
2787 @SYMTestPriority High
2789 @SYMTestStatus Implemented
2791 @SYMTestActions Creates an RWsSession, enables window size cache, creates some RWindowGroup and RWindow instances, performs random size related actions, cleans up.
2793 @SYMTestExpectedResults Window objects created successfully, no memory leaks, size for each window matches last size set on window
2797 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0715"));
2798 iTest->LogSubTest(KTest15);
2799 TInt seed = Math::Random();
2800 // To replicate a test run, take the random seed from the test log and pass into SetRandomSeed
2801 SetRandomSeed(seed);
2802 TestRandomisedStressL(ETestSizeCacheEnabled, KStressTestIterations);
2808 @SYMTestCaseID GRAPHICS-WSERV-0716
2810 @SYMDEF DevCR BBRE-7UWGHL
2812 @SYMTestCaseDesc Randomised stress test - RWindow size related functions, multiple sessions
2814 @SYMTestPriority High
2816 @SYMTestStatus Implemented
2818 @SYMTestActions Creates two RWsSession instances, creates some RWindowGroup and RWindow instances, performs random size related actions, cleans up.
2820 @SYMTestExpectedResults Window objects created successfully, no memory leaks, size for each window matches last size set on window
2824 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0716"));
2825 iTest->LogSubTest(KTest16);
2826 TInt seed = Math::Random();
2827 // To replicate a test run, take the random seed from the test log and pass into SetRandomSeed
2828 SetRandomSeed(seed);
2829 TestRandomisedStressMultiSessionL(ETestSizeCacheNotEnabled, KStressTestIterations);
2833 @SYMTestCaseID GRAPHICS-WSERV-0717
2835 @SYMDEF DevCR BBRE-7UWGHL
2837 @SYMTestCaseDesc Randomised stress test - RWindow size related functions, multiple sessions, size cache on
2839 @SYMTestPriority High
2841 @SYMTestStatus Implemented
2843 @SYMTestActions Creates two RWsSession instances, enables window size cache, creates some RWindowGroup and RWindow instances, performs random size related actions, cleans up.
2845 @SYMTestExpectedResults Window objects created successfully, no memory leaks, size for each window matches last size set on window
2849 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0717"));
2850 iTest->LogSubTest(KTest17);
2851 TInt seed = Math::Random();
2852 // To replicate a test run, take the random seed from the test log and pass into SetRandomSeed
2853 SetRandomSeed(seed);
2854 TestRandomisedStressMultiSessionL(ETestSizeCacheEnabled, KStressTestIterations);
2859 @SYMTestCaseID GRAPHICS-WSERV-0718
2861 @SYMDEF DevCR BBRE-7UWGHL
2863 @SYMTestCaseDesc Randomised stress test - RWindow size related functions, large number of windows
2865 @SYMTestPriority High
2867 @SYMTestStatus Implemented
2869 @SYMTestActions Creates an RWsSession, creates some RWindowGroup and RWindow instances, performs random size related actions, cleans up.
2871 @SYMTestExpectedResults Window objects created successfully, no memory leaks, size for each window matches last size set on window
2875 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0718"));
2876 iTest->LogSubTest(KTest18);
2877 TInt seed = Math::Random();
2878 // To replicate a test run, take the random seed from the test log and pass into SetRandomSeed
2879 SetRandomSeed(seed);
2880 TestRandomisedStressCacheEntryVolumeL(ETestSizeCacheNotEnabled, KStressTestIterations, KStressWindowPoolSize);
2884 @SYMTestCaseID GRAPHICS-WSERV-0719
2886 @SYMDEF DevCR BBRE-7UWGHL
2888 @SYMTestCaseDesc Randomised stress test - RWindow size related functions, large number of windows
2890 @SYMTestPriority High
2892 @SYMTestStatus Implemented
2894 @SYMTestActions Creates an RWsSession, enables window size cache, creates some RWindowGroup and RWindow instances, performs random size related actions, cleans up.
2896 @SYMTestExpectedResults Window objects created successfully, no memory leaks, size for each window matches last size set on window
2900 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0719"));
2901 iTest->LogSubTest(KTest19);
2902 TInt seed = Math::Random();
2903 // To replicate a test run, take the random seed from the test log and pass into SetRandomSeed
2904 SetRandomSeed(seed);
2905 TestRandomisedStressCacheEntryVolumeL(ETestSizeCacheEnabled, KStressTestIterations, KStressWindowPoolSize);
2910 @SYMTestCaseID GRAPHICS-WSERV-0720
2912 @SYMDEF DevCR BBRE-7UWGHL
2914 @SYMTestCaseDesc Test RWsSession::EnableWindowSizeCacheL() API
2916 @SYMTestPriority High
2918 @SYMTestStatus Implemented
2920 @SYMTestActions Creates an RWsSession, calls EnableWindowSizeCacheL() multiple times, uses Size related APIs.
2922 @SYMTestExpectedResults No memory leaks.
2926 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(_L("GRAPHICS-WSERV-0720"));
2927 iTest->LogSubTest(KTest20);
2928 TestStressEnableWindowSizeCacheL(KStressTestIterations);
2932 ((CTWindowSizeCacheTestStep*)iStep)->SetTestStepID(KNotATestSYMTestCaseIDName);
2933 ((CTWindowSizeCacheTestStep*)iStep)->CloseTMSGraphicsStep();
2937 ((CTWindowSizeCacheTestStep*)iStep)->RecordTestResultL();
2940 __WS_CONSTRUCT_STEP__(WindowSizeCacheTest)