graphicstest/uibench/src/tfadeperf.cpp
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2005-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 /**
       
    17  @file
       
    18  @test
       
    19  @internalComponent - Internal Symbian test code 
       
    20 */
       
    21  
       
    22 #include "tfadeperf.h"
       
    23 
       
    24 const TInt KIterationsToTest = 250; 		// Number of iterations to run tests
       
    25 
       
    26 CTFadePerf::~CTFadePerf()
       
    27 	{
       
    28 	}
       
    29 
       
    30 CTFadePerf::CTFadePerf()
       
    31 	{
       
    32 	SetTestStepName(KTFadePerfName);
       
    33 	}
       
    34 
       
    35 /**
       
    36 Override of base class virtual
       
    37 
       
    38 @return - TVerdict code
       
    39 */
       
    40 TVerdict CTFadePerf::doTestStepPreambleL()
       
    41 	{	
       
    42 	User::LeaveIfError(iWs.Connect());
       
    43 	CTe_graphicsperformanceSuiteStepBase::doTestStepPreambleL();
       
    44 		
       
    45 	return TestStepResult();
       
    46 	}
       
    47 
       
    48 TVerdict CTFadePerf::doTestStepPostambleL()
       
    49 	{	
       
    50 	iWs.Close();
       
    51 		
       
    52 	return TestStepResult();
       
    53 	}
       
    54 
       
    55 /**
       
    56 	Override of base class pure virtual
       
    57 	Our implementation only gets called if the base class doTestStepPreambleL() did
       
    58 	not leave. That being the case, the current test result value will be EPass.
       
    59 	
       
    60 	@return - TVerdict code
       
    61 */
       
    62 TVerdict CTFadePerf::doTestStepL()
       
    63 	{
       
    64 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0108"));
       
    65 	FadeOpaqueSingleWindowRepeatedlyL();
       
    66 	RecordTestResultL();
       
    67 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0109"));
       
    68 	FadeTransparentSingleWindowRecordFadeL();
       
    69 	RecordTestResultL();
       
    70 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0110"));
       
    71 	FadeTransparentSingleWindowRecordUnfadeL();
       
    72 	RecordTestResultL();
       
    73 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0111"));
       
    74 	FadeOpaqueSingleWindowRecordFadeL();
       
    75 	RecordTestResultL();
       
    76 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0112"));
       
    77 	FadeOpaqueSingleWindowRecordUnfadeL();
       
    78 	RecordTestResultL();
       
    79 
       
    80 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0113"));
       
    81 	FadeOpaqueWindowsBehindRepeatedlyL();
       
    82 	RecordTestResultL();
       
    83 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0114"));
       
    84 	FadeTransparentWindowsBehindRecordFadeL();
       
    85 	RecordTestResultL();
       
    86 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0115"));
       
    87 	FadeTransparentWindowsBehindRecordUnfadeL();
       
    88 	RecordTestResultL();
       
    89 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0116"));
       
    90 	FadeOpaqueWindowsBehindRecordFadeL();
       
    91 	RecordTestResultL();
       
    92 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0117"));
       
    93 	FadeOpaqueWindowsBehindRecordUnfadeL();
       
    94 	RecordTestResultL();
       
    95 	
       
    96 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0118"));
       
    97 	SetSystemFadedRepeatedlyL();
       
    98 	RecordTestResultL();
       
    99 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0119"));
       
   100 	SetSystemFadedTransparentWindowsRecordFadeL();
       
   101 	RecordTestResultL();
       
   102 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0120"));
       
   103 	SetSystemFadedTransparentWindowsRecordUnfadeL();
       
   104 	RecordTestResultL();
       
   105 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0121"));
       
   106 	SetSystemFadedOpaqueWindowsRecordFadeL();
       
   107 	RecordTestResultL();
       
   108 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0122"));
       
   109 	SetSystemFadedOpaqueWindowsRecordUnfadeL();
       
   110 	RecordTestResultL();
       
   111 
       
   112 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0123"));
       
   113 	SetNonFadingRepeatedlyL();
       
   114 	RecordTestResultL();
       
   115 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0124"));
       
   116 	SetNonFadingTransparentWindowsRecordFadeL();
       
   117 	RecordTestResultL();
       
   118 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0125"));
       
   119 	SetNonFadingTransparentWindowsRecordUnfadeL();
       
   120 	RecordTestResultL();
       
   121 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0126"));
       
   122 	SetNonFadingOpaqueWindowsRecordFadeL();
       
   123 	RecordTestResultL();
       
   124 	SetTestStepID(_L("GRAPHICS-UI-BENCH-0127"));
       
   125 	SetNonFadingOpaqueWindowsRecordUnfadeL();
       
   126 	RecordTestResultL();
       
   127 	return TestStepResult();
       
   128 	}
       
   129 
       
   130 /** Set up the window server environment in which the fading performance test cases are executed.
       
   131   	The RWsSession is connected to the window server, the CWsScreenDevice and the RWindowGroup
       
   132    	members are constructed.
       
   133  */
       
   134 void CTFadePerf::SetUpWindowEnvironmentL()
       
   135 	{
       
   136 	SetScreenModeL(EColor16MA);
       
   137 			
       
   138 	iWsScreenDev = new(ELeave) CWsScreenDevice(iWs);
       
   139 	User::LeaveIfError(iWsScreenDev->Construct());
       
   140 	TSize screenSize = iWsScreenDev->SizeInPixels();
       
   141 	
       
   142 	iWinGroup = new(ELeave) RWindowGroup(iWs);
       
   143 	User::LeaveIfError(iWinGroup->Construct(reinterpret_cast<TUint32>(iWinGroup),iWsScreenDev));
       
   144 	}
       
   145 
       
   146 /** Construct the single RWindow member and set its background colour according to the tranparency flag.
       
   147  	Make the window visible, activate it and draw it. 
       
   148   
       
   149     @param aUseTransparency the transparency flag of the window
       
   150  */
       
   151 void CTFadePerf::ConstructSingleWindowL(TBool aUseTransparency)
       
   152 	{
       
   153 	iSingleWin = new(ELeave) RWindow(iWs);
       
   154 	TUint32 winID = reinterpret_cast<TUint32>(iWinGroup+1);
       
   155 	User::LeaveIfError(iSingleWin->Construct(*iWinGroup,winID));
       
   156 	iSingleWin->SetExtent(TPoint(0,0),iWsScreenDev->SizeInPixels());
       
   157 	
       
   158 	if (aUseTransparency)
       
   159 		{
       
   160 		iSingleWin->SetTransparencyAlphaChannel();
       
   161 		iSingleWin->SetBackgroundColor(TRgb(240,50,170,50)); //semi-transparent window (R,G,B,Alpha)
       
   162 		}
       
   163 	else
       
   164 		{
       
   165 		iSingleWin->SetBackgroundColor(TRgb(240,50,170,255)); //opaque window
       
   166 		}
       
   167 	
       
   168 	iSingleWin->SetVisible(ETrue);
       
   169 	iSingleWin->Activate();
       
   170 	iSingleWin->Invalidate();
       
   171 	iSingleWin->BeginRedraw();
       
   172 	iSingleWin->EndRedraw();
       
   173 	iWs.Flush();
       
   174 	iWs.Finish();
       
   175 	}
       
   176 
       
   177 /** Populate the RWindow array member by constructing RWindow objcets. Set the background colour of the windows according to the
       
   178     tranparency flag. Set non-fading half of the windows according to the non-fade flag.
       
   179  	Make the windows visible, activate them and draw them.
       
   180   
       
   181     @param aUseTransparency the transparency flag of the windows 
       
   182     @param aNonFadeHalfWindows the non-fade flag of the windows 
       
   183  */
       
   184 void CTFadePerf::ConstructArrayOfWindowsL(TBool aUseTransparency, TBool aNonFadeHalfWindows)
       
   185 	{
       
   186 	TRect rect(TPoint(0,0),iWsScreenDev->SizeInPixels());
       
   187 	TInt i;
       
   188 	TUint32 winID;
       
   189 	for (i=0;i<ENumWins;++i)
       
   190 		{
       
   191 		iWins[i]=new(ELeave) RWindow(iWs);
       
   192 		winID = reinterpret_cast<TUint32>(iWinGroup+i+1);
       
   193 		if (i==0)
       
   194 			{
       
   195 			User::LeaveIfError(iWins[i]->Construct(*iWinGroup,winID)); //iWinGroup is the parent of iWins[0]
       
   196 			}
       
   197 		else
       
   198 			{
       
   199 			User::LeaveIfError(iWins[i]->Construct(*iWins[0],winID)); //iWins[0] is the the parent for every subsequent window
       
   200 			}
       
   201 		rect.Resize(-rect.Width()/10,-rect.Height()/10);
       
   202 		iWins[i]->SetExtent(TPoint(0,0),rect.Size());
       
   203 		if (aUseTransparency)
       
   204 			{	
       
   205 			iWins[i]->SetTransparencyAlphaChannel();
       
   206 			iWins[i]->SetBackgroundColor(TRgb(240,(200*i)/ENumWins,170-(20*i)/ENumWins,(60*(i+1))/ENumWins)); //semi-transparent window (R,G,B,Alpha)
       
   207 			}
       
   208 		else
       
   209 			{
       
   210 			iWins[i]->SetBackgroundColor(TRgb(180,(30*i)/ENumWins,170-(40*i)/ENumWins,255)); //opaque window
       
   211 			}
       
   212 		
       
   213 		if (aNonFadeHalfWindows)
       
   214 			{
       
   215 			if ((i%2)==0)  //every second window is set to non fading
       
   216 				{
       
   217 				iWins[i]->SetNonFading(ETrue);
       
   218 				}
       
   219 			}
       
   220 			
       
   221 		iWins[i]->SetVisible(ETrue);
       
   222 		iWins[i]->Activate();	
       
   223 		iWins[i]->Invalidate();
       
   224 		iWins[i]->BeginRedraw();
       
   225 		iWins[i]->EndRedraw();
       
   226 		}
       
   227 			
       
   228 	iWs.Flush();
       
   229 	iWs.Finish();
       
   230 	}
       
   231 
       
   232 /** Release the resources that the window server environment and the window construction has allocated.
       
   233  */
       
   234 void CTFadePerf::ReleaseWindowsAndEnvironment(TBool aIsSingleWindow)
       
   235 	{
       
   236 	if (aIsSingleWindow)
       
   237 		{
       
   238 		if (iSingleWin)
       
   239 			iSingleWin->Close();
       
   240 		delete iSingleWin;
       
   241 		iSingleWin=NULL;
       
   242 		}
       
   243 	else
       
   244 		{
       
   245 		for (TInt i=0;i<ENumWins;++i)
       
   246 			{
       
   247 			if (iWins[i])
       
   248 				iWins[i]->Close();
       
   249 			delete iWins[i];
       
   250 			iWins[i]=NULL;
       
   251 			}
       
   252 		}
       
   253 	
       
   254 	if (iWinGroup)
       
   255 		iWinGroup->Close();
       
   256 	delete iWinGroup;
       
   257 	iWinGroup=NULL;
       
   258 	
       
   259 	delete iWsScreenDev;
       
   260 	iWsScreenDev=NULL;
       
   261 	}
       
   262 
       
   263 /**
       
   264    Fade single window test cases
       
   265  */ 
       
   266 
       
   267 /**
       
   268 @SYMTestCaseID
       
   269 GRAPHICS-UI-BENCH-0108
       
   270 
       
   271 @SYMPREQ PREQ1841
       
   272 
       
   273 @SYMTestCaseDesc
       
   274 Tests how long it takes to fade a single opaque window repeatedly without trying 
       
   275 to unfade it first
       
   276 
       
   277 @SYMTestActions
       
   278 Set up the window server environment and construct an opaque window. Over a specific number
       
   279 of iterations fade the window by calling RWindow::SetFaded() and record the time this action requires. 
       
   280 
       
   281 @SYMTestExpectedResults
       
   282 Test should pass and display average test time per iteration
       
   283 */
       
   284 void CTFadePerf::FadeOpaqueSingleWindowRepeatedlyL()
       
   285 	{
       
   286 	_LIT(KTestName, "FadeOpaqueSingleWindowRepeatedlyL");
       
   287 	
       
   288 	SetUpWindowEnvironmentL();
       
   289 	ConstructSingleWindowL(EFalse);
       
   290 	
       
   291 	iProfiler->InitResults();
       
   292 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   293 		{
       
   294 		iProfiler->StartTimer();
       
   295 		iSingleWin->SetFaded(ETrue,RWindowTreeNode::EFadeWindowOnly);
       
   296 		iWs.Flush();
       
   297 		iWs.Finish();
       
   298 		iProfiler->MarkResultSetL();
       
   299 		}	
       
   300 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   301 	
       
   302 	ReleaseWindowsAndEnvironment(ETrue);
       
   303 	}
       
   304 
       
   305 /**
       
   306 @SYMTestCaseID
       
   307 GRAPHICS-UI-BENCH-0109
       
   308 
       
   309 @SYMPREQ PREQ1841
       
   310 
       
   311 @SYMTestCaseDesc
       
   312 Tests how long it takes to fade a single transparent window, when at each iteration the window is later unfaded
       
   313 
       
   314 @SYMTestActions
       
   315 Set up the window server environment and construct a transparent window. Over a specific number
       
   316 of iterations fade the window by calling RWindow::SetFaded() and record the time this action requires.
       
   317 The window is unfaded at the end of each iteration.
       
   318 
       
   319 @SYMTestExpectedResults
       
   320 Test should pass and display average test time per iteration
       
   321 */
       
   322 void CTFadePerf::FadeTransparentSingleWindowRecordFadeL()
       
   323 	{
       
   324 	_LIT(KTestName, "FadeTransparentSingleWindowRecordFadeL");
       
   325 		
       
   326 	SetUpWindowEnvironmentL();
       
   327 	ConstructSingleWindowL(ETrue);
       
   328 		
       
   329 	iProfiler->InitResults();
       
   330 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   331 		{
       
   332 		iProfiler->StartTimer();		
       
   333 		iSingleWin->SetFaded(ETrue,RWindowTreeNode::EFadeWindowOnly);
       
   334 		iWs.Flush();
       
   335 		iWs.Finish();
       
   336 		iProfiler->MarkResultSetL();
       
   337 		iSingleWin->SetFaded(EFalse,RWindowTreeNode::EFadeWindowOnly);
       
   338 		iWs.Flush();
       
   339 		iWs.Finish();
       
   340 		}
       
   341 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   342 	
       
   343 	ReleaseWindowsAndEnvironment(ETrue);
       
   344 	}
       
   345 
       
   346 /**
       
   347 @SYMTestCaseID
       
   348 GRAPHICS-UI-BENCH-0110
       
   349 
       
   350 @SYMPREQ PREQ1841
       
   351 
       
   352 @SYMTestCaseDesc
       
   353 Tests how long it takes to unfade a single transparent window, when at each iteration the window is faded first
       
   354 
       
   355 @SYMTestActions
       
   356 Set up the window server environment and construct a transparent window. Over a specific number
       
   357 of iterations fade the window and successively unfade it by calling RWindow::SetFaded() and record the time the latter action requires.
       
   358 
       
   359 @SYMTestExpectedResults
       
   360 Test should pass and display average test time per iteration
       
   361 */
       
   362 void CTFadePerf::FadeTransparentSingleWindowRecordUnfadeL()
       
   363 	{
       
   364 	_LIT(KTestName, "FadeTransparentSingleWindowRecordUnfadeL");
       
   365 			
       
   366 	SetUpWindowEnvironmentL();
       
   367 	ConstructSingleWindowL(ETrue);
       
   368 			
       
   369 	iProfiler->InitResults();
       
   370 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   371 		{		
       
   372 		iSingleWin->SetFaded(ETrue,RWindowTreeNode::EFadeWindowOnly);
       
   373 		iWs.Flush();
       
   374 		iWs.Finish();
       
   375 		iProfiler->StartTimer();
       
   376 		iSingleWin->SetFaded(EFalse,RWindowTreeNode::EFadeWindowOnly);
       
   377 		iWs.Flush();
       
   378 		iWs.Finish();
       
   379 		iProfiler->MarkResultSetL();
       
   380 		}
       
   381 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   382 		
       
   383 	ReleaseWindowsAndEnvironment(ETrue);
       
   384 	}
       
   385 
       
   386 /**
       
   387 @SYMTestCaseID
       
   388 GRAPHICS-UI-BENCH-0111
       
   389 
       
   390 @SYMPREQ PREQ1841
       
   391 
       
   392 @SYMTestCaseDesc
       
   393 Tests how long it takes to fade a single opaque window, when at each iteration the window is later unfaded
       
   394 
       
   395 @SYMTestActions
       
   396 Set up the window server environment and construct an opaque window. Over a specific number
       
   397 of iterations fade the window by calling RWindow::SetFaded(). Record the time this action requires.
       
   398 The window is unfaded at the end of each iteration.
       
   399 
       
   400 @SYMTestExpectedResults
       
   401 Test should pass and display average test time per iteration
       
   402 */
       
   403 void CTFadePerf::FadeOpaqueSingleWindowRecordFadeL()
       
   404 	{
       
   405 	_LIT(KTestName, "FadeOpaqueSingleWindowRecordFadeL");
       
   406 			
       
   407 	SetUpWindowEnvironmentL();
       
   408 	ConstructSingleWindowL(EFalse);
       
   409 			
       
   410 	iProfiler->InitResults();
       
   411 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   412 		{
       
   413 		iProfiler->StartTimer();		
       
   414 		iSingleWin->SetFaded(ETrue,RWindowTreeNode::EFadeWindowOnly);
       
   415 		iWs.Flush();
       
   416 		iWs.Finish();
       
   417 		iProfiler->MarkResultSetL();
       
   418 		iSingleWin->SetFaded(EFalse,RWindowTreeNode::EFadeWindowOnly);
       
   419 		iWs.Flush();
       
   420 		iWs.Finish();
       
   421 		}
       
   422 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   423 		
       
   424 	ReleaseWindowsAndEnvironment(ETrue);
       
   425 	}
       
   426 
       
   427 /**
       
   428 @SYMTestCaseID
       
   429 GRAPHICS-UI-BENCH-0112
       
   430 
       
   431 @SYMPREQ PREQ1841
       
   432 
       
   433 @SYMTestCaseDesc
       
   434 Tests how long it takes to unfade a single opaque window, when at each iteration the window is faded first
       
   435 
       
   436 @SYMTestActions
       
   437 Set up the window server environment and construct an opaque window. Over a specific number
       
   438 of iterations fade the window and successively unfade it by calling RWindow::SetFaded(). Record the time the latter action requires.
       
   439 
       
   440 @SYMTestExpectedResults
       
   441 Test should pass and display average test time per iteration
       
   442 */
       
   443 void CTFadePerf::FadeOpaqueSingleWindowRecordUnfadeL()
       
   444 	{
       
   445 	_LIT(KTestName, "FadeOpaqueSingleWindowRecordUnfadeL");
       
   446 				
       
   447 	SetUpWindowEnvironmentL();
       
   448 	ConstructSingleWindowL(EFalse);
       
   449 				
       
   450 	iProfiler->InitResults();
       
   451 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   452 		{		
       
   453 		iSingleWin->SetFaded(ETrue,RWindowTreeNode::EFadeWindowOnly);
       
   454 		iWs.Flush();
       
   455 		iWs.Finish();
       
   456 		iProfiler->StartTimer();
       
   457 		iSingleWin->SetFaded(EFalse,RWindowTreeNode::EFadeWindowOnly);
       
   458 		iWs.Flush();
       
   459 		iWs.Finish();
       
   460 		iProfiler->MarkResultSetL();
       
   461 		}
       
   462 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   463 		
       
   464 	ReleaseWindowsAndEnvironment(ETrue);
       
   465 	}
       
   466 
       
   467 /**
       
   468    Fade behind test cases
       
   469  */
       
   470 
       
   471 /**
       
   472 @SYMTestCaseID
       
   473 GRAPHICS-UI-BENCH-0113
       
   474 
       
   475 @SYMPREQ PREQ1841
       
   476 
       
   477 @SYMTestCaseDesc
       
   478 Tests how long it takes to fade opaque windows behind another opaque window repeatedly without trying 
       
   479 to unfade them first
       
   480 
       
   481 @SYMTestActions
       
   482 Set up the window server environment and construct an array of opaque windows. Over a specific number
       
   483 of iterations fade the windows behind the one on top by calling RWindow::FadeBehind() and record the time this action requires. 
       
   484 
       
   485 @SYMTestExpectedResults
       
   486 Test should pass and display average test time per iteration
       
   487 */
       
   488 void CTFadePerf::FadeOpaqueWindowsBehindRepeatedlyL()
       
   489 	{
       
   490 	_LIT(KTestName, "FadeOpaqueWindowsBehindRepeatedlyL");
       
   491 	
       
   492 	SetUpWindowEnvironmentL();
       
   493 	ConstructArrayOfWindowsL(EFalse, EFalse);
       
   494 		
       
   495 	iProfiler->InitResults();
       
   496 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   497 		{
       
   498 		iProfiler->StartTimer();
       
   499 		iWins[ENumWins-1]->FadeBehind(ETrue);
       
   500 		iWs.Flush();
       
   501 		iWs.Finish();
       
   502 		iProfiler->MarkResultSetL();
       
   503 		}
       
   504 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   505 		
       
   506 	ReleaseWindowsAndEnvironment(EFalse);
       
   507 	}
       
   508 
       
   509 /**
       
   510 @SYMTestCaseID
       
   511 GRAPHICS-UI-BENCH-0114
       
   512 
       
   513 @SYMPREQ PREQ1841
       
   514 
       
   515 @SYMTestCaseDesc
       
   516 Tests how long it takes to fade transparent windows behind the window on top when at each iteration the windows are later unfaded.
       
   517 
       
   518 @SYMTestActions
       
   519 Set up the window server environment and construct an array of transparent windows. Over a specific number
       
   520 of iterations fade the windows behind the one on top by calling RWindow::FadeBehind() and record the time this action requires. 
       
   521 The windows are unfaded at the end of each iteration.
       
   522 
       
   523 @SYMTestExpectedResults
       
   524 Test should pass and display average test time per iteration
       
   525 */
       
   526 void CTFadePerf::FadeTransparentWindowsBehindRecordFadeL()
       
   527 	{
       
   528 	_LIT(KTestName, "FadeTransparentWindowsBehindRecordFadeL");
       
   529 		
       
   530 	SetUpWindowEnvironmentL();
       
   531 	ConstructArrayOfWindowsL(ETrue, EFalse);
       
   532 			
       
   533 	iProfiler->InitResults();
       
   534 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   535 		{
       
   536 		iProfiler->StartTimer();
       
   537 		iWins[ENumWins-1]->FadeBehind(ETrue);
       
   538 		iWs.Flush();
       
   539 		iWs.Finish();
       
   540 		iProfiler->MarkResultSetL();
       
   541 		iWins[ENumWins-1]->FadeBehind(EFalse);
       
   542 		iWs.Flush();
       
   543 		iWs.Finish();
       
   544 		}
       
   545 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   546 			
       
   547 	ReleaseWindowsAndEnvironment(EFalse);
       
   548 	}
       
   549 
       
   550 /**
       
   551 @SYMTestCaseID
       
   552 GRAPHICS-UI-BENCH-0115
       
   553 
       
   554 @SYMPREQ PREQ1841
       
   555 
       
   556 @SYMTestCaseDesc
       
   557 Tests how long it takes to unfade transparent windows behind the window on top when at each iteration the windows are faded first
       
   558 
       
   559 @SYMTestActions
       
   560 Set up the window server environment and construct an array of transparent windows. Over a specific number
       
   561 of iterations fade and unfade the windows behind the one on top by calling RWindow::FadeBehind(). Record the time the latter action requires. 
       
   562 The windows are unfaded at the end of each iteration.
       
   563 
       
   564 @SYMTestExpectedResults
       
   565 Test should pass and display average test time per iteration
       
   566 */
       
   567 void CTFadePerf::FadeTransparentWindowsBehindRecordUnfadeL()
       
   568 	{
       
   569 	_LIT(KTestName, "FadeTransparentWindowsBehindRecordUnfadeL");
       
   570 			
       
   571 	SetUpWindowEnvironmentL();
       
   572 	ConstructArrayOfWindowsL(ETrue, EFalse);
       
   573 				
       
   574 	iProfiler->InitResults();
       
   575 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   576 		{
       
   577 		iWins[ENumWins-1]->FadeBehind(ETrue);
       
   578 		iWs.Flush();
       
   579 		iWs.Finish();
       
   580 		iProfiler->StartTimer();
       
   581 		iWins[ENumWins-1]->FadeBehind(EFalse);
       
   582 		iWs.Flush();
       
   583 		iWs.Finish();
       
   584 		iProfiler->MarkResultSetL();
       
   585 		}
       
   586 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   587 				
       
   588 	ReleaseWindowsAndEnvironment(EFalse);	
       
   589 	}
       
   590 
       
   591 /**
       
   592 @SYMTestCaseID
       
   593 GRAPHICS-UI-BENCH-0116
       
   594 
       
   595 @SYMPREQ PREQ1841
       
   596 
       
   597 @SYMTestCaseDesc
       
   598 Tests how long it takes to fade opaque windows behind the window on top, when at each iteration the windows are later unfaded.
       
   599 
       
   600 @SYMTestActions
       
   601 Set up the window server environment and construct an array of opaque windows. Over a specific number
       
   602 of iterations fade the windows behind the one on top by calling RWindow::FadeBehind() and record the time this action requires. 
       
   603 The windows are unfaded at the end of each iteration.
       
   604 
       
   605 @SYMTestExpectedResults
       
   606 Test should pass and display average test time per iteration
       
   607 */
       
   608 void CTFadePerf::FadeOpaqueWindowsBehindRecordFadeL()
       
   609 	{
       
   610 	_LIT(KTestName, "FadeOpaqueWindowsBehindRecordFadeL");
       
   611 			
       
   612 	SetUpWindowEnvironmentL();
       
   613 	ConstructArrayOfWindowsL(EFalse, EFalse);
       
   614 				
       
   615 	iProfiler->InitResults();
       
   616 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   617 		{
       
   618 		iProfiler->StartTimer();
       
   619 		iWins[ENumWins-1]->FadeBehind(ETrue);
       
   620 		iWs.Flush();
       
   621 		iWs.Finish();
       
   622 		iProfiler->MarkResultSetL();
       
   623 		iWins[ENumWins-1]->FadeBehind(EFalse);
       
   624 		iWs.Flush();
       
   625 		iWs.Finish();
       
   626 		}
       
   627 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   628 				
       
   629 	ReleaseWindowsAndEnvironment(EFalse);
       
   630 	}
       
   631 
       
   632 /**
       
   633 @SYMTestCaseID
       
   634 GRAPHICS-UI-BENCH-0117
       
   635 
       
   636 @SYMPREQ PREQ1841
       
   637 
       
   638 @SYMTestCaseDesc
       
   639 Tests how long it takes to unfade opaque windows behind the window on top, when at each iteration the windows are faded first
       
   640 
       
   641 @SYMTestActions
       
   642 Set up the window server environment and construct an array of opaque windows. Over a specific number
       
   643 of iterations fade and unfade the windows behind the one on top by calling RWindow::FadeBehind(). Record the time the latter action requires. 
       
   644 The windows are unfaded at the end of each iteration.
       
   645 
       
   646 @SYMTestExpectedResults
       
   647 Test should pass and display average test time per iteration
       
   648 */
       
   649 void CTFadePerf::FadeOpaqueWindowsBehindRecordUnfadeL()
       
   650 	{
       
   651 	_LIT(KTestName, "FadeOpaqueWindowsBehindRecordUnfadeL");
       
   652 				
       
   653 		SetUpWindowEnvironmentL();
       
   654 		ConstructArrayOfWindowsL(EFalse, EFalse);
       
   655 					
       
   656 		iProfiler->InitResults();
       
   657 		for (TInt count=KIterationsToTest; count>=0; --count)
       
   658 			{
       
   659 			iWins[ENumWins-1]->FadeBehind(ETrue);
       
   660 			iWs.Flush();
       
   661 			iWs.Finish();
       
   662 			iProfiler->StartTimer();
       
   663 			iWins[ENumWins-1]->FadeBehind(EFalse);
       
   664 			iWs.Flush();
       
   665 			iWs.Finish();
       
   666 			iProfiler->MarkResultSetL();
       
   667 			}
       
   668 		iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   669 					
       
   670 		ReleaseWindowsAndEnvironment(EFalse);	
       
   671 	}
       
   672 
       
   673 /**
       
   674    SetSystemFaded test cases
       
   675  */
       
   676 
       
   677 /**
       
   678 @SYMTestCaseID
       
   679 GRAPHICS-UI-BENCH-0118
       
   680 
       
   681 @SYMPREQ PREQ1841
       
   682 
       
   683 @SYMTestCaseDesc
       
   684 Tests how long it takes to set the windows in the system faded repeatedly, without trying to unfade them first
       
   685 
       
   686 @SYMTestActions
       
   687 Set up the window server environment and construct an array of opaque windows. Half of them are set to non fading. 
       
   688 Over a specific number of iterations set the system faded by calling RWsSession::SetSystemFaded() and record the time
       
   689 this action requires. 
       
   690 
       
   691 @SYMTestExpectedResults
       
   692 Test should pass and display average test time per iteration
       
   693 */
       
   694 void CTFadePerf::SetSystemFadedRepeatedlyL()
       
   695 	{
       
   696 	_LIT(KTestName, "SetSystemFadedRepeatedlyL");
       
   697 						
       
   698 	SetUpWindowEnvironmentL();
       
   699 	ConstructArrayOfWindowsL(EFalse, ETrue);
       
   700 							
       
   701 	iProfiler->InitResults();
       
   702 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   703 		{
       
   704 		iProfiler->StartTimer();
       
   705 		iWs.SetSystemFaded(ETrue);
       
   706 		iWs.Finish();
       
   707 		iProfiler->MarkResultSetL();
       
   708 		}
       
   709 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   710 						
       
   711 	ReleaseWindowsAndEnvironment(EFalse);	
       
   712 	}
       
   713 
       
   714 /**
       
   715 @SYMTestCaseID
       
   716 GRAPHICS-UI-BENCH-0119
       
   717 
       
   718 @SYMPREQ PREQ1841
       
   719 
       
   720 @SYMTestCaseDesc
       
   721 Tests how long it takes to set the windows in the system faded, when at each iteration the windows are later unfaded.
       
   722 
       
   723 @SYMTestActions
       
   724 Set up the window server environment and construct an array of tranparent windows. Half of them are set to non fading.
       
   725 Over a specific number of iterations set the system faded by calling RWsSession::SetSystemFaded() and record the time this action requires. 
       
   726 The system is set unfaded at the end of each iteration.
       
   727 
       
   728 
       
   729 @SYMTestExpectedResults
       
   730 Test should pass and display average test time per iteration
       
   731 */
       
   732 void CTFadePerf::SetSystemFadedTransparentWindowsRecordFadeL()
       
   733 	{
       
   734 	_LIT(KTestName, "SetSystemFadedTransparentWindowsRecordFadeL");
       
   735 					
       
   736 	SetUpWindowEnvironmentL();
       
   737 	ConstructArrayOfWindowsL(ETrue, ETrue);
       
   738 						
       
   739 	iProfiler->InitResults();
       
   740 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   741 		{
       
   742 		iProfiler->StartTimer();
       
   743 		iWs.SetSystemFaded(ETrue);
       
   744 		iWs.Finish();
       
   745 		iProfiler->MarkResultSetL();
       
   746 		iWs.SetSystemFaded(EFalse);
       
   747 		iWs.Finish();
       
   748 		}
       
   749 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   750 						
       
   751 	ReleaseWindowsAndEnvironment(EFalse);	
       
   752 	}
       
   753 
       
   754 /**
       
   755 @SYMTestCaseID
       
   756 GRAPHICS-UI-BENCH-0120
       
   757 
       
   758 @SYMPREQ PREQ1841
       
   759 
       
   760 @SYMTestCaseDesc
       
   761 Tests how long it takes to set the windows in the system unfaded, when at each iteration the windows are faded first.
       
   762 
       
   763 @SYMTestActions
       
   764 Set up the window server environment and construct an array of transparent windows. Half of them are set to non fading.
       
   765 Over a specific number of iterations set the system faded and successively unfaded by calling RWsSession::SetSystemFaded(). Record the time the latter action requires. 
       
   766 
       
   767 @SYMTestExpectedResults
       
   768 Test should pass and display average test time per iteration
       
   769 */
       
   770 void CTFadePerf::SetSystemFadedTransparentWindowsRecordUnfadeL()
       
   771 	{
       
   772 	_LIT(KTestName, "SetSystemFadedTransparentWindowsRecordUnfadeL");
       
   773 						
       
   774 	SetUpWindowEnvironmentL();
       
   775 	ConstructArrayOfWindowsL(ETrue, ETrue);
       
   776 							
       
   777 	iProfiler->InitResults();
       
   778 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   779 		{
       
   780 		iWs.SetSystemFaded(ETrue);
       
   781 		iWs.Finish();
       
   782 		iProfiler->StartTimer();
       
   783 		iWs.SetSystemFaded(EFalse);
       
   784 		iWs.Finish();
       
   785 		iProfiler->MarkResultSetL();
       
   786 		}
       
   787 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   788 							
       
   789 	ReleaseWindowsAndEnvironment(EFalse);
       
   790 	}
       
   791 
       
   792 /**
       
   793 @SYMTestCaseID
       
   794 GRAPHICS-UI-BENCH-0121
       
   795 
       
   796 @SYMPREQ PREQ1841
       
   797 
       
   798 @SYMTestCaseDesc
       
   799 Tests how long it takes to set all the windows in the system faded, when at each iteration the windows are later unfaded.
       
   800 
       
   801 @SYMTestActions
       
   802 Set up the window server environment and construct an array of opaque windows. Half of them are set to non fading.
       
   803 Over a specific number of iterations set the system faded by calling RWsSession::SetSystemFaded(). Record the time the latter action requires. 
       
   804 The system is set unfaded at the end of each iteration.
       
   805 
       
   806 @SYMTestExpectedResults
       
   807 Test should pass and display average test time per iteration
       
   808 */
       
   809 void CTFadePerf::SetSystemFadedOpaqueWindowsRecordFadeL()
       
   810 	{
       
   811 	_LIT(KTestName, "SetSystemFadedOpaqueWindowsRecordFadeL");
       
   812 							
       
   813 	SetUpWindowEnvironmentL();
       
   814 	ConstructArrayOfWindowsL(EFalse, ETrue);
       
   815 								
       
   816 	iProfiler->InitResults();
       
   817 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   818 		{
       
   819 		iProfiler->StartTimer();
       
   820 		iWs.SetSystemFaded(ETrue);
       
   821 		iWs.Finish();
       
   822 		iProfiler->MarkResultSetL();
       
   823 		iWs.SetSystemFaded(EFalse);
       
   824 		iWs.Finish();
       
   825 		}
       
   826 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   827 								
       
   828 	ReleaseWindowsAndEnvironment(EFalse);
       
   829 	}
       
   830 
       
   831 /**
       
   832 @SYMTestCaseID
       
   833 GRAPHICS-UI-BENCH-0122
       
   834 
       
   835 @SYMPREQ PREQ1841
       
   836 
       
   837 @SYMTestCaseDesc
       
   838 Tests how long it takes to set the windows in the system unfaded, when at each iteration the windows are faded first.
       
   839 
       
   840 @SYMTestActions
       
   841 Set up the window server environment and construct an array of opaque windows. Half of them are set to non fading.
       
   842 Over a specific number of iterations set the system faded and successively unfaded by calling RWsSession::SetSystemFaded(). Record the time the latter action requires. 
       
   843 
       
   844 @SYMTestExpectedResults
       
   845 Test should pass and display average test time per iteration
       
   846 */
       
   847 void CTFadePerf::SetSystemFadedOpaqueWindowsRecordUnfadeL()
       
   848 	{
       
   849 	_LIT(KTestName, "SetSystemFadedOpaqueWindowsRecordUnfadeL");
       
   850 							
       
   851 	SetUpWindowEnvironmentL();
       
   852 	ConstructArrayOfWindowsL(EFalse, ETrue);
       
   853 								
       
   854 	iProfiler->InitResults();
       
   855 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   856 		{
       
   857 		iWs.SetSystemFaded(ETrue);
       
   858 		iWs.Finish();
       
   859 		iProfiler->StartTimer();
       
   860 		iWs.SetSystemFaded(EFalse);
       
   861 		iWs.Finish();
       
   862 		iProfiler->MarkResultSetL();
       
   863 		}
       
   864 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   865 								
       
   866 	ReleaseWindowsAndEnvironment(EFalse);
       
   867 	}
       
   868 
       
   869 /**
       
   870    SetNonFading test cases
       
   871  */
       
   872 
       
   873 /**
       
   874 @SYMTestCaseID
       
   875 GRAPHICS-UI-BENCH-0123
       
   876 
       
   877 @SYMPREQ PREQ1841
       
   878 
       
   879 @SYMTestCaseDesc
       
   880 Tests how long it takes to set a parent window and its children faded repeatedly, without trying to unfade them first.
       
   881 
       
   882 @SYMTestActions
       
   883 Set up the window server environment and construct an array of opaque windows, so that the first window is the parent for all the other windows. 
       
   884 Half of them are set to non fading. Over a specific number of iterations set the parent window faded including its children by calling RWindow::SetFaded().
       
   885 Record the time this action requires. 
       
   886 
       
   887 @SYMTestExpectedResults
       
   888 Test should pass and display average test time per iteration
       
   889 */
       
   890 void CTFadePerf::SetNonFadingRepeatedlyL()
       
   891 	{
       
   892 	_LIT(KTestName, "SetNonFadingRepeatedlyL");
       
   893 							
       
   894 	SetUpWindowEnvironmentL();
       
   895 	ConstructArrayOfWindowsL(EFalse, ETrue);
       
   896 								
       
   897 	iProfiler->InitResults();
       
   898 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   899 		{
       
   900 		iProfiler->StartTimer();
       
   901 		iWins[0]->SetFaded(ETrue,RWindowTreeNode::EFadeIncludeChildren);
       
   902 		iWs.Flush();
       
   903 		iWs.Finish();
       
   904 		iProfiler->MarkResultSetL();
       
   905 		}
       
   906 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   907 							
       
   908 	ReleaseWindowsAndEnvironment(EFalse);
       
   909 	}
       
   910 
       
   911 /**
       
   912 @SYMTestCaseID
       
   913 GRAPHICS-UI-BENCH-0124
       
   914 
       
   915 @SYMPREQ PREQ1841
       
   916 
       
   917 @SYMTestCaseDesc
       
   918 Tests how long it takes to fade a parent window and its children, when at each iteration they are later unfaded.
       
   919 
       
   920 @SYMTestActions
       
   921 Set up the window server environment and construct an array of transparent windows, so that the first window is the parent for all the other windows. 
       
   922 Half of them are set to non fading. Over a specific number of iterations set the parent window faded including its children by calling RWindow::SetFaded().
       
   923 Record the time this action requires. The parent and children windows are unfaded at the end of each iteration.
       
   924 
       
   925 @SYMTestExpectedResults
       
   926 Test should pass and display average test time per iteration
       
   927 */
       
   928 void CTFadePerf::SetNonFadingTransparentWindowsRecordFadeL()
       
   929 	{
       
   930 	_LIT(KTestName, "SetNonFadingTransparentWindowsRecordFadeL");
       
   931 											
       
   932 	SetUpWindowEnvironmentL();
       
   933 	ConstructArrayOfWindowsL(ETrue, ETrue);
       
   934 												
       
   935 	iProfiler->InitResults();
       
   936 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   937 		{
       
   938 		iProfiler->StartTimer();
       
   939 		iWins[0]->SetFaded(ETrue,RWindowTreeNode::EFadeIncludeChildren);
       
   940 		iWs.Flush();
       
   941 		iWs.Finish();
       
   942 		iProfiler->MarkResultSetL();
       
   943 		iWins[0]->SetFaded(EFalse,RWindowTreeNode::EFadeIncludeChildren);
       
   944 		iWs.Flush();
       
   945 		iWs.Finish();
       
   946 		}
       
   947 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   948 												
       
   949 	ReleaseWindowsAndEnvironment(EFalse);
       
   950 	}
       
   951 
       
   952 /**
       
   953 @SYMTestCaseID
       
   954 GRAPHICS-UI-BENCH-0125
       
   955 
       
   956 @SYMPREQ PREQ1841
       
   957 
       
   958 @SYMTestCaseDesc
       
   959 Tests how long it takes to unfade a parent window and its children, when at each iteration they are first faded.
       
   960 
       
   961 @SYMTestActions
       
   962 Set up the window server environment and construct an array of transparent windows, so that the first window is the parent for all the other windows. 
       
   963 Half of them are set to non fading. Over a specific number of iterations set the parent window faded and successively unfaded including its children
       
   964 by calling RWindow::SetFaded(). Record the time the latter action requires.
       
   965 
       
   966 @SYMTestExpectedResults
       
   967 Test should pass and display average test time per iteration
       
   968 */
       
   969 void CTFadePerf::SetNonFadingTransparentWindowsRecordUnfadeL()
       
   970 	{
       
   971 	_LIT(KTestName, "SetNonFadingTransparentWindowsRecordUnfadeL");
       
   972 									
       
   973 	SetUpWindowEnvironmentL();
       
   974 	ConstructArrayOfWindowsL(ETrue, ETrue);
       
   975 										
       
   976 	iProfiler->InitResults();
       
   977 	for (TInt count=KIterationsToTest; count>=0; --count)
       
   978 		{
       
   979 		iWins[0]->SetFaded(ETrue,RWindowTreeNode::EFadeIncludeChildren);
       
   980 		iWs.Flush();
       
   981 		iWs.Finish();
       
   982 		iProfiler->StartTimer();
       
   983 		iWins[0]->SetFaded(EFalse,RWindowTreeNode::EFadeIncludeChildren);
       
   984 		iWs.Flush();
       
   985 		iWs.Finish();
       
   986 		iProfiler->MarkResultSetL();
       
   987 		}
       
   988 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
   989 										
       
   990 	ReleaseWindowsAndEnvironment(EFalse);
       
   991 	}
       
   992 
       
   993 /**
       
   994 @SYMTestCaseID
       
   995 GRAPHICS-UI-BENCH-0126
       
   996 
       
   997 @SYMPREQ PREQ1841
       
   998 
       
   999 @SYMTestCaseDesc
       
  1000 Tests how long it takes to fade an parent window and its children, when at each iteration they are later unfaded.
       
  1001 
       
  1002 @SYMTestActions
       
  1003 Set up the window server environment and construct an array of opaque windows, so that the first window is the parent for all the other windows. 
       
  1004 Half of them are set to non fading. Over a specific number of iterations set the parent window faded including its children by calling RWindow::SetFaded().
       
  1005 Record the time this action requires. The parent and children windows are unfaded at the end of each iteration.
       
  1006 
       
  1007 @SYMTestExpectedResults
       
  1008 Test should pass and display average test time per iteration
       
  1009 */
       
  1010 void CTFadePerf::SetNonFadingOpaqueWindowsRecordFadeL()
       
  1011 	{
       
  1012 	_LIT(KTestName, "SetNonFadingOpaqueWindowsRecordFadeL");
       
  1013 										
       
  1014 	SetUpWindowEnvironmentL();
       
  1015 	ConstructArrayOfWindowsL(EFalse, ETrue);
       
  1016 											
       
  1017 	iProfiler->InitResults();
       
  1018 	for (TInt count=KIterationsToTest; count>=0; --count)
       
  1019 		{
       
  1020 		iProfiler->StartTimer();
       
  1021 		iWins[0]->SetFaded(ETrue,RWindowTreeNode::EFadeIncludeChildren);
       
  1022 		iWs.Flush();
       
  1023 		iWs.Finish();
       
  1024 		iProfiler->MarkResultSetL();
       
  1025 		iWins[0]->SetFaded(EFalse,RWindowTreeNode::EFadeIncludeChildren);
       
  1026 		iWs.Flush();
       
  1027 		iWs.Finish();
       
  1028 		}
       
  1029 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
  1030 											
       
  1031 	ReleaseWindowsAndEnvironment(EFalse);
       
  1032 	}
       
  1033 
       
  1034 /**
       
  1035 @SYMTestCaseID
       
  1036 GRAPHICS-UI-BENCH-0127
       
  1037 
       
  1038 @SYMPREQ PREQ1841
       
  1039 
       
  1040 @SYMTestCaseDesc
       
  1041 Tests how long it takes to unfade a parent window and its children, when at each iteration they are first faded.
       
  1042 
       
  1043 @SYMTestActions
       
  1044 Set up the window server environment and construct an array of transparent windows, so that the first window is the parent for all the other windows. 
       
  1045 Half of them are set to non fading. Over a specific number of iterations set the parent window faded and successively unfaded including its children
       
  1046 by calling RWindow::SetFaded(). Record the time the latter action requires.
       
  1047 
       
  1048 @SYMTestExpectedResults
       
  1049 Test should pass and display average test time per iteration
       
  1050 */
       
  1051 void CTFadePerf::SetNonFadingOpaqueWindowsRecordUnfadeL()
       
  1052 	{
       
  1053 	_LIT(KTestName, "SetNonFadingOpaqueWindowsRecordUnfadeL");
       
  1054 								
       
  1055 	SetUpWindowEnvironmentL();
       
  1056 	ConstructArrayOfWindowsL(EFalse, ETrue);
       
  1057 									
       
  1058 	iProfiler->InitResults();
       
  1059 	for (TInt count=KIterationsToTest; count>=0; --count)
       
  1060 		{
       
  1061 		iWins[0]->SetFaded(ETrue,RWindowTreeNode::EFadeIncludeChildren);
       
  1062 		iWs.Flush();
       
  1063 		iWs.Finish();
       
  1064 		iProfiler->StartTimer();
       
  1065 		iWins[0]->SetFaded(EFalse,RWindowTreeNode::EFadeIncludeChildren);
       
  1066 		iWs.Flush();
       
  1067 		iWs.Finish();
       
  1068 		iProfiler->MarkResultSetL();
       
  1069 		}
       
  1070 	iProfiler->ResultsAnalysis(KTestName, 0, EColor16MA, EColor16MA, KIterationsToTest);
       
  1071 									
       
  1072 	ReleaseWindowsAndEnvironment(EFalse);
       
  1073 	}