diff -r e8c1ea2c6496 -r 8758140453c0 localisation/apparchitecture/tef/T_ProcStep.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localisation/apparchitecture/tef/T_ProcStep.h Thu Jan 21 12:53:44 2010 +0000 @@ -0,0 +1,87 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent - Internal Symbian test code +*/ + +#if (!defined __T_PROC_STEP_H__) +#define __T_PROC_STEP_H__ + +#include +#include +#include "ApparcTestServer.h" +#include + +_LIT(KT_ProcStep,"T_Proc"); +_LIT(KParentExe, "ParentProcess"); +_LIT(KChildOneExe, "ChildI"); +_LIT(KChildTwoExe, "ChildII"); +_LIT(KChildThreeExe, "ChildIII"); +_LIT(KT_ParentProcessID,"ParentProcessID"); +_LIT(KFilePath,"c:\\logs\\TestExecute\\Proc.txt"); +_LIT8(KTResultPass, "PASS"); +_LIT8(KTResultFail, "FAIL"); + + +//! A CT_ProcStep test class. + +/** Checks for child process existence when its parent terminates. */ + +class CT_ProcStep : public CTestStep + { +public: + CT_ProcStep(); + ~CT_ProcStep(); + virtual TVerdict doTestStepL(); +private: + void testChildExistsL(void); + void testChildSetToTerminateL(void); + void testChildSetToRemainL(void); + void testTwoChildsOneToTerminateAndOtherToRemainL(void); + void testParentWithoutAChildL(void); + void testAllChildsSetToTerminateL(void); + void testNoChildSetToTerminateL(void); + void testIdAvailableToChildL(void); + void testIdNotAvailableToChildL(void); + }; + + +//! A support class for CT_ProcStep test class. + +/** An active object which monitors the current status of child when its parent terminates. */ + +class CChildProcess : public CActive + { +public: + static CChildProcess* NewL(RProcess& aParentProcess,TProcessId aChildProcessId); + void RunL(); + void DoCancel(); + ~CChildProcess(); +private: + void ConstructL(); + CChildProcess(RProcess& aParentProcess,TProcessId aChildProcessId); +private: + TProcessId iChildProcessId; + RProcess iParentProcess; + RProcess iChildProcess; + TExitType iExitType; + TInt iCount; + }; + +#endif