lafagnosticuifoundation/cone/tef/TCONE7STEP.CPP
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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  @internalComponent - Internal Symbian test code 
       
    19 */
       
    20 
       
    21 #include <apgcli.h>
       
    22 #include "TCone7Step.h"
       
    23 #include "twindowposition.h"
       
    24 
       
    25 CCone7TestAppUi::CCone7TestAppUi(CTmsTestStep* aStep) :
       
    26 CTestCoeAppUi(aStep)
       
    27 {}
       
    28 
       
    29 CCone7TestAppUi::~CCone7TestAppUi()
       
    30 	{
       
    31 	}
       
    32 
       
    33 
       
    34 void CCone7TestAppUi::ConstructL()
       
    35 	{
       
    36 	INFO_PRINTF1(_L("App UI ConstructL"));
       
    37 	
       
    38 	CTestCoeAppUi::ConstructL();
       
    39 	AutoTestManager().StartAutoTest();
       
    40 	}
       
    41 
       
    42 	
       
    43 TKeyResponse CCone7TestAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
       
    44 	{
       
    45 	TKeyResponse ret=EKeyWasNotConsumed;
       
    46     	if (aType==EEventKey && aKeyEvent.iCode==CTRL('e'))
       
    47 		{
       
    48 		CBaActiveScheduler::Exit();
       
    49 		ret=EKeyWasConsumed;
       
    50 		}
       
    51 	return ret;
       
    52 	}
       
    53 
       
    54 
       
    55 /**
       
    56 Ensure the text-drawer is propagated from container to component control
       
    57 test case PREQ641.1
       
    58 */
       
    59 TBool CCone7TestAppUi::TestTextDrawer_1L()
       
    60 	{
       
    61 	CCtlContainer641* testContainer = new (ELeave)CCtlContainer641();
       
    62 	CleanupStack::PushL(testContainer);
       
    63 	testContainer->ConstructL( _L("Container") );
       
    64 	testContainer->SetExtent( TPoint(20,20),TSize(600,200) );
       
    65 	testContainer->ActivateL();
       
    66 	testContainer->DrawNow();
       
    67 	
       
    68 	const TInt err = testContainer->iContainee->TestContainerTextDrawer();
       
    69 	User::After( TTimeIntervalMicroSeconds32(2000000) );
       
    70 	
       
    71 	CleanupStack::PopAndDestroy(testContainer);
       
    72 	return err;
       
    73 	}
       
    74 
       
    75 
       
    76 
       
    77 /**
       
    78 Ensure the text-drawer is propagated from the super-container, 
       
    79 via the sub-container to the component control	
       
    80 test case PREQ641.2
       
    81 */
       
    82 TBool CCone7TestAppUi::TestTextDrawer_2L()
       
    83 	{
       
    84 	CCtlSuperContainer641* testSuperContainer = new (ELeave)CCtlSuperContainer641;
       
    85 	CleanupStack::PushL(testSuperContainer);
       
    86 	testSuperContainer->ConstructL( _L("SuperContainer") );
       
    87 	testSuperContainer->SetExtent( TPoint(20,20),TSize(600,200) );			
       
    88 	testSuperContainer->ActivateL();
       
    89 	testSuperContainer->DrawNow();
       
    90 	
       
    91 	const TInt err = testSuperContainer->iSubContainer->iContainee->TestContainerTextDrawer();
       
    92 	User::After( TTimeIntervalMicroSeconds32(2000000) );
       
    93 	
       
    94 	CleanupStack::PopAndDestroy(testSuperContainer);
       
    95 	return err;
       
    96 	}
       
    97 
       
    98 
       
    99 class MyDummyMopObject
       
   100 	{
       
   101 public:
       
   102 	enum { ETypeId = 0x1234 };
       
   103 	MyDummyMopObject() {}
       
   104 	~MyDummyMopObject() {}
       
   105 public:
       
   106 	TInt iDummy;
       
   107 	};
       
   108 
       
   109 /**  Ensure the text-drawer the MopSupplyObject function is working properly. */
       
   110 
       
   111 TBool CCone7TestAppUi::TestTextDrawer_3L()
       
   112 	{
       
   113 	CCoePlainTextDrawer* drawer = CCoePlainTextDrawer::New(KRgbRed);
       
   114 	if (!drawer)
       
   115 		return EFalse;
       
   116 		
       
   117 	XCoeTextDrawer xdrawer(*drawer);
       
   118 	
       
   119 	const CCoePlainTextDrawer* drawer2 = xdrawer->MopGetObject(drawer2);
       
   120 	if (!drawer2 || (drawer2->TextColor() != KRgbRed))
       
   121 		return EFalse;
       
   122 		
       
   123 	const MyDummyMopObject* dummy3 = xdrawer->MopGetObject(dummy3);
       
   124 	if (dummy3)
       
   125 		return EFalse;
       
   126 	
       
   127 	return ETrue;
       
   128 	}
       
   129 
       
   130 /**
       
   131 This test will verify that left and right text alignment is swapped when the
       
   132 application language is set to a RightToLeft script, unless the alignment is
       
   133 set to be absolute. This will be done in 9 steps, drawing a four line text
       
   134 clockwise from topLeft, via topCenter, topRight, bottomRight, bottomCenter, 
       
   135 bottomLeft, topLeft, topCenter, to topRight.
       
   136 
       
   137 Visual verification is required.
       
   138 */
       
   139 TBool CCone7TestAppUi::TestTextDrawer_4L()
       
   140 	{
       
   141 	CCtlTestTextDrawer* testTextDrawer = new(ELeave) CCtlTestTextDrawer();
       
   142 	CleanupStack::PushL(testTextDrawer);
       
   143 	testTextDrawer->ConstructL();
       
   144 	testTextDrawer->SetExtent(TPoint(20,20),TSize(600,200));
       
   145 	testTextDrawer->ActivateL();
       
   146 	testTextDrawer->DrawNow();
       
   147 	
       
   148 	const TInt noOfLines = TCoeTextTypeAdaptor(KMultipleLineText).NumberOfLines();
       
   149 	TEST(noOfLines == 4);
       
   150 	INFO_PRINTF2(_L("Number of lines in the text separated by new line character are : %d"), noOfLines);
       
   151 
       
   152 	TOpenFontFaceAttrib openFontFaceAttrib;
       
   153 	((CFbsFont&)(testTextDrawer->FontUsed())).GetFaceAttrib(openFontFaceAttrib);
       
   154 	TBuf<25> buf(openFontFaceAttrib.FullName());
       
   155 	INFO_PRINTF2(_L("CCtlTestTextDrawer : Typeface being used is %S"), &buf);
       
   156 	
       
   157 	CWsScreenDevice* screenDevice = iCoeEnv->ScreenDevice();
       
   158 	TSize sizeInPixels = screenDevice->SizeInPixels();
       
   159 	TSize sizeInTwips = screenDevice->SizeInTwips();
       
   160 	TInt xPixel = sizeInPixels.iWidth;
       
   161 	TInt xTwips = sizeInTwips.iWidth;
       
   162 	TInt yPixel = sizeInPixels.iHeight;
       
   163 	TInt yTwips = sizeInTwips.iHeight;
       
   164 	
       
   165 	TInt KLineWidthsInPixels[4];
       
   166 	
       
   167 	//Line width in pixels on H4
       
   168 	if(xPixel == 320 && xTwips == 4463 && yPixel == 240 && yTwips == 3041)
       
   169 		{
       
   170 		KLineWidthsInPixels[0] = 80;
       
   171 		KLineWidthsInPixels[1] = 51;
       
   172 		KLineWidthsInPixels[2] = 110;
       
   173 		KLineWidthsInPixels[3] = 100;
       
   174 		}
       
   175 	//Line width in pixels on H6 QVGA
       
   176 	else if(xPixel == 240 && xTwips == 3685 && yPixel == 320 && yTwips ==5056)
       
   177 		{
       
   178 		KLineWidthsInPixels[0] = 64;
       
   179 		KLineWidthsInPixels[1] = 41;
       
   180 		KLineWidthsInPixels[2] = 88;
       
   181 		KLineWidthsInPixels[3] = 80;
       
   182 		}
       
   183 	//Line width in pixels on H6 VGA
       
   184 	else if(xPixel == 480 && xTwips == 3685 && yPixel == 640 && yTwips ==5056)
       
   185 		{
       
   186 		KLineWidthsInPixels[0] = 128;
       
   187 		KLineWidthsInPixels[1] = 81;
       
   188 		KLineWidthsInPixels[2] = 176;
       
   189 		KLineWidthsInPixels[3] = 160;
       
   190 		}
       
   191 	//Line width in pixels on emulator
       
   192 	else if(xPixel == 640 && xTwips == 7620 && yPixel == 240 && yTwips == 2858)
       
   193 		{
       
   194 		KLineWidthsInPixels[0] = 80;
       
   195 		KLineWidthsInPixels[1] = 51;
       
   196 		KLineWidthsInPixels[2] = 110;
       
   197 		KLineWidthsInPixels[3] = 100;
       
   198 		}
       
   199 	//Line width in pixels on NaviEngine
       
   200 	else if(xPixel == 800 && xTwips == 9520 && yPixel == 480 && yTwips == 5712)
       
   201 		{
       
   202 		KLineWidthsInPixels[0] = 80;
       
   203 		KLineWidthsInPixels[1] = 51;
       
   204 		KLineWidthsInPixels[2] = 110;
       
   205 		KLineWidthsInPixels[3] = 100;
       
   206 		}
       
   207 	//Line width in pixels on NaviEngine without integrated screen
       
   208 	else if(xPixel == 640 && xTwips == 7616 && yPixel == 480 && yTwips == 5712)
       
   209 		{
       
   210 		KLineWidthsInPixels[0] = 80;
       
   211 		KLineWidthsInPixels[1] = 51;
       
   212 		KLineWidthsInPixels[2] = 110;
       
   213 		KLineWidthsInPixels[3] = 100;
       
   214 		}
       
   215 	else
       
   216 		{
       
   217 		INFO_PRINTF1(_L("This might be a new hardware, need to calculate line widths in pixels again."));
       
   218 		INFO_PRINTF5(_L("xPixel=%d, xTwips=%d, yPixel=%d, yTwips=%d"),xPixel,xTwips,yPixel,yTwips);
       
   219 		CleanupStack::PopAndDestroy(testTextDrawer);
       
   220 		return EFalse;
       
   221 		}
       
   222     
       
   223 	TInt widthInPixels = 0;
       
   224 	for (TInt line = 0; line < noOfLines; line++)
       
   225 		{
       
   226 		testTextDrawer->WidthOfText(line, widthInPixels);
       
   227 		TInt testWidth = KLineWidthsInPixels[line];
       
   228 		// Allow a tolerance of 1 pixel difference less than KLineWidthsInPixels
       
   229 		TEST(Rng(testWidth-1, widthInPixels, testWidth));
       
   230 		INFO_PRINTF3(_L("Width for line %d in pixels : %d"), line, widthInPixels);
       
   231 		}
       
   232 		
       
   233 	for(TInt testIndex = 0; testIndex <= 8; testIndex++)
       
   234 		{
       
   235 		testTextDrawer->TestTextDrawer(testIndex, ETrue);
       
   236 		User::After( TTimeIntervalMicroSeconds32(1000000) );
       
   237 		}
       
   238 
       
   239 	CleanupStack::PopAndDestroy(testTextDrawer);		
       
   240 	return ETrue;
       
   241 	}
       
   242 
       
   243 /**
       
   244 This text case will verify that vertical text drawing of XCoeTextDrawer class is correct and 
       
   245 consistent with horizontal drawing of the same alignment. Clip area will also be set to check that 
       
   246 drawing will not happen outside this area. The text will consist of a few lines.
       
   247 
       
   248 defect INC122592  
       
   249 Visual verification is required.
       
   250 */
       
   251 TBool CCone7TestAppUi::TestTextDrawer_5L()
       
   252 	{
       
   253 	CCtlTestTextDrawer* testTextDrawer = new(ELeave) CCtlTestTextDrawer();
       
   254 	CleanupStack::PushL(testTextDrawer);
       
   255 	testTextDrawer->ConstructL();
       
   256 	testTextDrawer->SetExtent(TPoint(20,20),TSize(600,200));
       
   257 	testTextDrawer->ActivateL();
       
   258 	testTextDrawer->DrawNow();
       
   259 	
       
   260 	const TInt noOfLines = TCoeTextTypeAdaptor(KMultipleLineText1).NumberOfLines();
       
   261 
       
   262 	TOpenFontFaceAttrib openFontFaceAttrib;
       
   263 	((CFbsFont&)(testTextDrawer->FontUsed())).GetFaceAttrib(openFontFaceAttrib);
       
   264 	TBuf<25> buf(openFontFaceAttrib.FullName());
       
   265 	INFO_PRINTF2(_L("CCtlTestTextDrawer : Typeface being used is %S"), &buf);
       
   266 	
       
   267 	//testing with clip area
       
   268 	TRect clipRect = testTextDrawer->Rect();
       
   269 	clipRect.Shrink(40, 40);
       
   270 	TRgb nonClippedText = KRgbRed;
       
   271 	
       
   272 	//drawing vertical text, up direction
       
   273 	for(TInt testIndex = 0; testIndex <= 8; testIndex++)
       
   274 		{
       
   275 		testTextDrawer->TestTextDrawer(testIndex, ETrue, NULL, &nonClippedText);
       
   276 		testTextDrawer->TestTextDrawer(testIndex, ETrue, &clipRect, NULL, EFalse);
       
   277 		User::After( TTimeIntervalMicroSeconds32(1000000) );
       
   278 
       
   279 		testTextDrawer->TestTextDrawer(testIndex, EFalse, NULL, &nonClippedText);
       
   280 		testTextDrawer->TestTextDrawer(testIndex, EFalse, &clipRect, NULL, EFalse);
       
   281 		User::After( TTimeIntervalMicroSeconds32(1000000) );
       
   282 		}
       
   283 
       
   284 	//drawing vertical text, up direction
       
   285 	for(TInt testIndex = 0; testIndex <= 8; testIndex++)
       
   286 		{
       
   287 		testTextDrawer->TestTextDrawer(testIndex, ETrue, NULL, &nonClippedText);
       
   288 		testTextDrawer->TestTextDrawer(testIndex, ETrue, &clipRect, NULL, EFalse);
       
   289 		User::After( TTimeIntervalMicroSeconds32(1000000) );
       
   290 
       
   291 		testTextDrawer->TestTextDrawer(testIndex, EFalse, NULL,     &nonClippedText, ETrue, EFalse);
       
   292 		testTextDrawer->TestTextDrawer(testIndex, EFalse, &clipRect, NULL,         EFalse, EFalse);
       
   293 		User::After( TTimeIntervalMicroSeconds32(1000000) );
       
   294 		}
       
   295 	
       
   296 	CleanupStack::PopAndDestroy(testTextDrawer);		
       
   297 	return ETrue;
       
   298 	}
       
   299 
       
   300 /**
       
   301    @SYMTestCaseID UIF-TCone7Step-TestWindowPositionL
       
   302   
       
   303    @SYMDEF PDEF109812: Draw optimization assumes children's position are relative to parent's 
       
   304   
       
   305    @SYMTestCaseDesc Launches the twindowposition application.
       
   306 	The application test for position of the non window owning control being drawn.
       
   307 	
       
   308    @SYMTestPriority High
       
   309   
       
   310    @SYMTestStatus Implemented
       
   311    
       
   312    @SYMTestActions : Launches an test application as follows.
       
   313 	Instantiates a CApaCommandLine object. Creates the application KAppFileName using RProcess object
       
   314 	and sets the process environment. Resumes the process and tests for application's exit reason. 
       
   315 	The test application draw the controls such that when the child has a parent window and is not 
       
   316 	relative to the the parent control's window.
       
   317 	  
       
   318    @SYMTestExpectedResults The test application should be started without any error. 
       
   319 	The test application exit with KErrNone if the position of the child window being drawn matches 
       
   320 	with co-ordinate space of the parent control. Otherwise it exit with KErrWindowPosDoesNotMatch.
       
   321 
       
   322    @SYMTestType : CIT 
       
   323  */
       
   324 TBool CCone7TestAppUi::TestWindowPositionL()
       
   325 	{
       
   326 	_LIT(KAppFileName,"z:\\sys\\bin\\twindowposition.exe");
       
   327 	CApaCommandLine* cmdLine = CApaCommandLine::NewLC();	
       
   328 	RProcess windowPos;
       
   329 	TInt ret = windowPos.Create(KAppFileName,KNullDesC);
       
   330 	TEST(ret == KErrNone);
       
   331 	User::LeaveIfError(ret);
       
   332 	CleanupClosePushL(windowPos);
       
   333 	INFO_PRINTF1(_L("Create twindowposition process."));
       
   334 	
       
   335 	//attach commandline to twindowposition process
       
   336 	TRAP(ret,cmdLine->SetProcessEnvironmentL(windowPos));
       
   337 	TEST(ret == KErrNone);
       
   338 	windowPos.Resume();
       
   339 	//Time for the twindowposition process to launch itself
       
   340 	User::After(3000000);
       
   341 	TEST(windowPos.ExitReason() != KErrWindowPosDoesNotMatch);
       
   342 	CleanupStack::PopAndDestroy(&windowPos);
       
   343 	CleanupStack::PopAndDestroy(cmdLine);
       
   344 	return ETrue;
       
   345 	}
       
   346 
       
   347 
       
   348 /**
       
   349    @SYMTestCaseID UIF-TCone7Step-TestExtentNotSetL
       
   350   
       
   351    @SYMDEF DEF123521 - Fix for PDEF116704 has been removed 
       
   352   
       
   353    @SYMTestCaseDesc Tests fix for PDEF116704 has not regressed.
       
   354 	
       
   355    @SYMTestPriority High
       
   356   
       
   357    @SYMTestStatus Implemented
       
   358    
       
   359    @SYMTestActions : Creates a CCoeControl and a RWindow. Sets the RWindow as the container
       
   360     window for the CCoeControl.
       
   361 	  
       
   362    @SYMTestExpectedResults The RWindow's position and size should not change.
       
   363 
       
   364    @SYMTestType : CIT 
       
   365  */
       
   366 TBool CCone7TestAppUi::TestExtentNotSetL()
       
   367 	{
       
   368 	
       
   369 	// Create a window
       
   370 	RWindow window(iCoeEnv->WsSession());
       
   371 	TEST(window.Construct((RWindowTreeNode&)iCoeEnv->RootWin(), TUint32(this))==KErrNone);
       
   372 	
       
   373 	// Create a control
       
   374 	CCoeControl* ctrl = new (ELeave) CCoeControl;
       
   375 	CleanupStack::PushL(ctrl);
       
   376 	ctrl->SetExtent(TPoint(20,20), TSize(40,40));
       
   377 
       
   378 	// Get extent of window
       
   379 	TPoint position1 = window.Position();
       
   380 	TSize size1 = window.Size();
       
   381 
       
   382 	// Set control's container window
       
   383 	ctrl->SetContainerWindowL(window);
       
   384 
       
   385 	// Check extent not changed
       
   386 	TPoint position2 = window.Position();
       
   387 	TSize size2 = window.Size();
       
   388 
       
   389 	TEST((size1==size2)&&(position1==position2)); 
       
   390 
       
   391 	// Cleanup
       
   392 
       
   393 	CleanupStack::PopAndDestroy(ctrl);
       
   394 	window.Close();
       
   395 
       
   396 	return ETrue;
       
   397 	}
       
   398 
       
   399 
       
   400 /**
       
   401    @SYMTestCaseID UIF-TCone7Step-TestBackedUpExtentNotSetL
       
   402   
       
   403    @SYMDEF DEF123521 - Fix for PDEF116704 has been removed 
       
   404   
       
   405    @SYMTestCaseDesc Tests fix for PDEF116704 has not regressed.
       
   406 	
       
   407    @SYMTestPriority High
       
   408   
       
   409    @SYMTestStatus Implemented
       
   410    
       
   411    @SYMTestActions : Creates a CCoeControl and a RBackedUpWindow. Sets the RBackupWindow as the container
       
   412     window for the CCoeControl.
       
   413 	  
       
   414    @SYMTestExpectedResults The RBackedUpWindow's position and size should not change.
       
   415 
       
   416    @SYMTestType : CIT 
       
   417  */
       
   418 TBool CCone7TestAppUi::TestBackedUpExtentNotSetL()
       
   419 	{
       
   420 	
       
   421 	// Create a window
       
   422 	RBackedUpWindow window(iCoeEnv->WsSession());
       
   423 	TEST(window.Construct((RWindowTreeNode&)iCoeEnv->RootWin(), EGray4, TUint32(this))==KErrNone);
       
   424 	
       
   425 	// Create a control
       
   426 	CCoeControl* ctrl = new (ELeave) CCoeControl;
       
   427 	CleanupStack::PushL(ctrl);
       
   428 	ctrl->SetExtent(TPoint(20,20), TSize(40,40));
       
   429 
       
   430 	// Get extent of window
       
   431 	TPoint position1 = window.Position();
       
   432 	TSize size1 = window.Size();
       
   433 
       
   434 	// Set control's container window
       
   435 	ctrl->SetContainerWindowL(window);
       
   436 
       
   437 	// Check extent not changed
       
   438 	TPoint position2 = window.Position();
       
   439 	TSize size2 = window.Size();
       
   440 
       
   441 	TEST((size1==size2)&&(position1==position2)); 
       
   442 
       
   443 	// Cleanup
       
   444 	CleanupStack::PopAndDestroy(ctrl);
       
   445 	window.Close();
       
   446 
       
   447 	return ETrue;
       
   448 	} 
       
   449 
       
   450 void CCone7TestAppUi::RunTestStepL(TInt aStepNum)
       
   451 	{
       
   452 	switch(aStepNum)
       
   453 		{
       
   454 		case 0 :
       
   455 		case 1 :
       
   456 			TEST(TestTextDrawer_1L());
       
   457 			break;
       
   458 		case 2 :
       
   459 			TEST(TestTextDrawer_2L());	
       
   460 			break;
       
   461 		case 3 :
       
   462 			TEST(TestTextDrawer_3L());
       
   463 			break;		
       
   464 		case 4:
       
   465 			TEST(TestTextDrawer_4L());
       
   466 			break;
       
   467 		case 5:
       
   468 			TEST(TestTextDrawer_5L());
       
   469 			break;
       
   470 		case 6:
       
   471 			SetTestStepID(_L("UIF-TCone7Step-TestWindowPositionL"));
       
   472 			TEST(TestWindowPositionL());
       
   473 			RecordTestResultL();
       
   474 			break;
       
   475 		case 7:
       
   476 			SetTestStepID(_L("UIF-TCone7Step-TestExtentNotSetL"));
       
   477 			TEST(TestExtentNotSetL());
       
   478 			RecordTestResultL();
       
   479 			break;
       
   480 		case 8:
       
   481 			SetTestStepID(_L("UIF-TCone7Step-TestBackedUpExtentNotSetL"));
       
   482 			TEST(TestBackedUpExtentNotSetL());
       
   483 			RecordTestResultL();
       
   484 			CloseTMSGraphicsStep();
       
   485 			break;
       
   486 		default:
       
   487 			AutoTestManager().FinishAllTestCases(CAutoTestManager::EPass);
       
   488 			break;
       
   489 		}
       
   490 	}
       
   491 
       
   492 
       
   493 
       
   494 //----------
       
   495 void CTCone7Step::ConstructAppL(CCoeEnv* aCoe)
       
   496 	{ // runs inside a TRAP harness
       
   497 	aCoe->ConstructL();
       
   498 	CCone7TestAppUi* appUi= new (ELeave) CCone7TestAppUi(this);
       
   499 	aCoe->SetAppUi(appUi);
       
   500 	appUi->ConstructL();
       
   501 	}
       
   502 
       
   503 CTCone7Step::CTCone7Step()
       
   504 	{
       
   505 	SetTestStepName(KTCone7Step);
       
   506 	}
       
   507 
       
   508 CTCone7Step::~CTCone7Step()
       
   509 	{}
       
   510 
       
   511 
       
   512 TVerdict CTCone7Step::doTestStepL() // main function called by E32
       
   513 	{
       
   514 	INFO_PRINTF1(_L("Test 7 Started"));
       
   515 	
       
   516 	PreallocateHALBuffer();
       
   517 
       
   518 	__UHEAP_MARK;
       
   519 
       
   520 	CCoeEnv* coe=new(ELeave) CCoeEnv;
       
   521 
       
   522 	TRAPD(err,ConstructAppL(coe));
       
   523 
       
   524 	if (!err)
       
   525 		{
       
   526 		coe->ExecuteD();
       
   527 		}
       
   528 	else
       
   529 		{
       
   530 		SetTestStepResult(EFail);
       
   531 		delete coe;
       
   532 		}
       
   533 
       
   534 	REComSession::FinalClose();	
       
   535 
       
   536 	__UHEAP_MARKEND;
       
   537 
       
   538 	INFO_PRINTF1(_L("Test Finished"));
       
   539 	return TestStepResult();
       
   540 	}
       
   541 
       
   542