Ejemplo n.º 1
0
/**
Base class pure virtual doTestStepL(): 
Tests the ebo support in http.
@internalTechnology
@test
@param		None
@return		EPass or EFail indicating the result of the test step.
*/
TVerdict CTestHttpBaseStep::doTestStepL()
	{
//	__UHEAP_MARK;
	INFO_PRINTF1(_L("\n"));
	// Start C32 and initalize some device drivers. This is necessary when running a test console as these won't 
	// have been started
	TRAPD(err,InitCommsL());
	if (err != KErrNone)
		{
		ERR_PRINTF2(_L("Teststep Failed: Leave occured in CTestHttpBaseStep::InitCommsL: %D\n"
					  ),err
				   );
		SetTestStepResult(EFail);
		}
	else
		{
		// Opening session
		iSess.OpenL();
		// start the client
		TRAP(err,StartClientL());
		if (err != KErrNone)
			{
			ERR_PRINTF2(_L("Teststep Failed: Leave occured in CTestHttpBaseStep::StartClientL: %D\n"
						  ),err
					   );
			SetTestStepResult(EFail);
			}
		// Closing session
		iSess.Close();
		}
//	__UHEAP_MARKEND; 
	
	INFO_PRINTF1(_L("\n"));
	return TestStepResult();
	}	// doTestStepL
Ejemplo n.º 2
0
//
// Set up Epoc environment. Put in separate function so we can
// let heap allocations fail and leave, trapping them all in 
// one place above.
//
LOCAL_C void ProgramL()
	{
	CActiveScheduler* pS = new(ELeave) CActiveScheduler;
	CleanupStack::PushL(pS);

	//initialization for COMM port (TFTP server on comm2)
	InitCommsL();
	
    CActiveScheduler::Install(pS);
	//create console for output
	CConsoleBase* console = Console::NewL(_L("TFTP"),TSize(KConsFullScreen,KConsFullScreen));
	CleanupStack::PushL(console);
	CCommandParser* compars= CCommandParser::NewL(*console);
	compars->Call();
	   
	CActiveScheduler::Start();

	delete compars;
	CleanupStack::PopAndDestroy(console);
	CleanupStack::PopAndDestroy(pS);
	}
Ejemplo n.º 3
0
LOCAL_C void MainL()
	{
	// Leave the hooks in for platform security
#if (defined __DATA_CAGING__)
	RProcess().DataCaging(RProcess::EDataCagingOn);
	RProcess().SecureApi(RProcess::ESecureApiOn);
#endif
	InitCommsL();
	CActiveScheduler* sched=NULL;
	sched=new(ELeave) CActiveScheduler;
	CleanupStack::PushL(sched);
	CActiveScheduler::Install(sched);
	CTRevocationServer* server = NULL;
	// Create the CTestServer derived server
	TRAPD(err,server = CTRevocationServer::NewL());
	if(!err)
		{
		RProcess::Rendezvous(KErrNone);
		sched->Start();
		}
	CleanupStack::Pop(sched);
	delete server;
	delete sched;
	}