os/graphics/graphicsresourceservices/graphicsresourceimplementation/test/src/tgraphicsresourceinternalsecondprocess.cpp
Update contrib.
1 // Copyright (c) 2009-2010 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.
22 #include "tgraphicsresourceinternalsecondprocessenums.h"
23 #include "tsgimagegeneric.h"
24 #include "tsgdrawablegeneric.h"
25 #include "tgraphicsresourceinternalsecondprocesstesthandler.h"
29 TInt procHandles1 = 0;
30 TInt threadHandles1 = 0;
31 RThread().HandleCount(procHandles1, threadHandles1);
33 TPckgBuf<TSgResIntTestInfo> infoPkg;
34 User::LeaveIfError(User::GetDesParameter(KSecondProcessParametersSlot, infoPkg));
35 TSgResIntTestInfo& info = infoPkg();
38 CTSgResInternalSecondProcessTestHandler* handler = CTSgResInternalSecondProcessTestHandler::NewLC();
39 handler->OpenDriverL();
41 result = handler->RunTestCaseL(info);
42 CleanupStack::PopAndDestroy(handler);
45 if (!(result < KErrNone))
48 TInt threadHandles2=0;
49 RThread().HandleCount(procHandles2,threadHandles2);
50 if (threadHandles1 != threadHandles2)
52 result = KErrBadHandle; // Thread-owned handles not closed
59 GLDEF_C TInt E32Main()
62 CTrapCleanup* cleanupStack = CTrapCleanup::New();
63 if(cleanupStack == NULL)
68 TRAPD(ret, result=MainL());
71 User::Panic(_L("SGRESTEST"), 0);