os/graphics/fbs/fontandbitmapserver/tfbs/TStreamIdCache.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2004-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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __TSTREAMIDCACHE_H__
    17 #define __TSTREAMIDCACHE_H__
    18 
    19 #include <fbs.h>
    20 #include "test/TGraphicsHarness.h"
    21 
    22 class CTStreamIdCache : public CTGraphicsBase
    23 	{
    24 public:
    25 	CTStreamIdCache(CTestStep* aStep);
    26 	~CTStreamIdCache();
    27 protected:
    28 //from 	CTGraphicsStep
    29 	virtual void RunTestCaseL(TInt aCurTestCase);
    30 	void ConstructL();
    31 	
    32 private:	
    33 	void ExpandCleanupStackL();
    34 
    35 	void TestStreamIdCacheEntry();	
    36 	void TestProcessingBitmapStream();
    37 	void TestComparingStreams();
    38 	void TestReplacingFile();
    39 	void TestInvalidArgument();
    40 	void TestOOMCondition();
    41 	void TestPerformance();
    42 	void TestLoadAtOffset();
    43 	void DoTestingL();
    44 	TInt FileSizeL(const TDesC& aFileName);
    45 	void TestSessionClose();
    46 private:
    47 	RFbsSession* iFbs;
    48 	RFs iFs;
    49 	TBool iShutdownFbs;
    50 	TFileName iTestBitmapName;
    51 	TInt iSessionHandle;
    52 	};
    53 
    54 class CTStreamIdCacheStep : public CTGraphicsStep
    55 	{
    56 public:
    57 	CTStreamIdCacheStep();
    58 protected:	
    59 	//from CTGraphicsStep
    60 	virtual CTGraphicsBase* CreateTestL();
    61 	void TestSetupL();
    62 	void TestClose();
    63 	
    64 private:
    65 	TInt iStartProcessHandleCount;
    66 	TInt iStartThreadHandleCount;
    67 	TInt iEndProcessHandleCount;
    68 	TInt iEndThreadHandleCount;
    69 			
    70 	RThread iThread;
    71 	};
    72 
    73 _LIT(KTStreamIdCacheStep,"TStreamIdCache");
    74 
    75 
    76 #endif