graphicsresourceservices/graphicsresourceimplementation/test/inc/tsgimagegeneric.h
changeset 36 01a6848ebfd7
equal deleted inserted replaced
0:5d03bc08d59c 36:01a6848ebfd7
       
     1 // Copyright (c) 2007-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 #ifndef TSGIMAGEGENERIC_H
       
    17 #define TSGIMAGEGENERIC_H
       
    18 
       
    19 #include "tgraphicsresourceteststepbase.h"
       
    20 
       
    21 /**
       
    22 Class containing all the positive, negative and panic tests for RSgImage.
       
    23 
       
    24 KErrNoMemory testing can optionally be enabled.
       
    25  */
       
    26 class CTSgImageGeneric : public CTSgTestStepBase
       
    27 {
       
    28 public:
       
    29 	CTSgImageGeneric(TBool aConformanceTests);
       
    30 	~CTSgImageGeneric();
       
    31 	
       
    32 	//positive tests
       
    33 	void TestGetPixelFormatsL();
       
    34 	void TestCreateImageUninitializedL();
       
    35 	void TestCreateImageL();
       
    36 	void TestCreateImageFromExistingImageL();	
       
    37 	void TestGetImageInfoL();
       
    38 	void TestGetImageDrawableIdL();	
       
    39 	void TestOpenImageL();
       
    40 	void TestGetInterfaceL();
       
    41 	void TestCreateImageAllPixelFormatsL();
       
    42 	void TestCreateImageDataStrideL();
       
    43 	void TestOpenImageMultithreadedL();
       
    44 	
       
    45 	//negative tests
       
    46 	void TestGetPixelFormatsInvalidL();
       
    47 	void TestOpenImageInvalidL();
       
    48 	void TestCloseImageManyTimesL();
       
    49 	void TestCloseImageWithoutOpenL();
       
    50 	void TestCreateImageInvalidL();
       
    51 	void TestGetInfoImageInvalidL();
       
    52 	void TestGetAttributesImageInvalidL();
       
    53 		
       
    54 	//stress tests
       
    55 	void TestStress1L();
       
    56 	void TestStress2L();
       
    57 
       
    58 private:
       
    59 	//panic tests
       
    60 	void TestPanicImageGetInterfaceInvalidHandleL();
       
    61 	void TestPanicImageGetInterfaceNoDriverL();
       
    62 	void TestPanicImageCloseInvalidHandleL();
       
    63 	void TestPanicImageCloseNoDriverL();
       
    64 	void TestPanicImageIdInvalidHandleL();
       
    65 	void TestPanicImageIdNoDriverL();
       
    66 	void TestPanicImageCreateInvalidHandleL();
       
    67 	void TestPanicImageGetInfoInvalidHandleL();
       
    68 	void TestPanicImageGetInfoNoDriverL();
       
    69 	void TestPanicImageOpenNoDriverL();
       
    70 	void TestPanicImageCreateNoDriver1L();
       
    71 	void TestPanicImageCreateNoDriver2L();
       
    72 	void TestPanicImageDrawableTypeNoDriverL();
       
    73 	void TestPanicImageDrawableTypeInvalidHandleL();
       
    74 	void TestPanicImageGetAttributeInvalidHandleL();
       
    75 	void TestPanicImageGetAttributeNoDriverL();
       
    76 	void TestPanicImageAttributeArrayInvalidIndexL();
       
    77 	void TestPanicImageAttributeArrayInvalidIndex2L();
       
    78 	void TestPanicDriverCloseOpenResourcesL();
       
    79 	void TestCreateOpenCloseImageAndDriverInSecondThreadL();
       
    80 
       
    81 	// utility methods
       
    82 	void DestroyImages();
       
    83     
       
    84 	// From CTSgTestStepBase
       
    85 	virtual TVerdict doTestStepL();
       
    86 		
       
    87 private:
       
    88     RArray<RSgImage> iTestImages;
       
    89 };
       
    90 
       
    91 _LIT(KTSgImageGeneric,"TSgImageGeneric");
       
    92 
       
    93 #endif /*TSGIMAGEGENERIC_H*/