os/graphics/egl/egltest/endpointtestsuite/automated/tsrc/egltest_releaseimagegles_local.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/egl/egltest/endpointtestsuite/automated/tsrc/egltest_releaseimagegles_local.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,77 @@
     1.4 +/*
     1.5 +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +/**
    1.23 + @file
    1.24 + @test
    1.25 + @internalComponent - Internal Symbian test code
    1.26 +*/
    1.27 +
    1.28 +
    1.29 +#include "egltest_releaseimagegles.h"
    1.30 +
    1.31 +
    1.32 +//This test case acquires an image from an endpoint then attempts to 
    1.33 +//release the image, passing in EGL_OPENGL_ES_API as the API flag.
    1.34 +//There are two configurations for the test, that is controlled by
    1.35 +//a flag in aParams. The options are to have a valid GLES context 
    1.36 +//set current, or to have nothing current.
    1.37 +
    1.38 +
    1.39 +CEglTest_LocalTestStep_EndpointReleaseImageGles::CEglTest_LocalTestStep_EndpointReleaseImageGles() :
    1.40 +    CLocalTestStepBase(ETestUidEndpointReleaseImageGles)
    1.41 +    {
    1.42 +    }
    1.43 +
    1.44 +
    1.45 +CEglTest_LocalTestStep_EndpointReleaseImageGles::~CEglTest_LocalTestStep_EndpointReleaseImageGles()
    1.46 +    {
    1.47 +    }
    1.48 +
    1.49 +
    1.50 +void CEglTest_LocalTestStep_EndpointReleaseImageGles::DoPreambleL()
    1.51 +    {
    1.52 +    //Register the test id.
    1.53 +    _LIT(KTestId, "COV");
    1.54 +    RegisterTestIdsL(KTestId);
    1.55 +    SetCurrentTestIds(KTestId);
    1.56 +    }
    1.57 +
    1.58 +
    1.59 +void CEglTest_LocalTestStep_EndpointReleaseImageGles::DoPostambleL()
    1.60 +    {
    1.61 +    }
    1.62 +
    1.63 +
    1.64 +TVerdict CEglTest_LocalTestStep_EndpointReleaseImageGles::doTestStepL()
    1.65 +    {
    1.66 +    TRemoteTestParams params;
    1.67 +    StartRemoteTestStep(TRemoteTestParams());
    1.68 +    
    1.69 +    //Valid GLES context test.
    1.70 +    params.iEndpointReleaseImageGles.iUseValidGlesContext = ETrue;
    1.71 +    RunRemoteTestCase(0, params);
    1.72 +    
    1.73 +    //Invalid GLES context test.
    1.74 +    params.iEndpointReleaseImageGles.iUseValidGlesContext = EFalse;
    1.75 +    RunRemoteTestCase(0, params);
    1.76 +        
    1.77 +    EndRemoteTestStep(TRemoteTestParams());
    1.78 +    return TestStepResult();
    1.79 +    }
    1.80 +