os/graphics/egl/egltest/endpointtestsuite/automated/tsrc/egltest_releaseimagegles_local.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 /**
    20  @file
    21  @test
    22  @internalComponent - Internal Symbian test code
    23 */
    24 
    25 
    26 #include "egltest_releaseimagegles.h"
    27 
    28 
    29 //This test case acquires an image from an endpoint then attempts to 
    30 //release the image, passing in EGL_OPENGL_ES_API as the API flag.
    31 //There are two configurations for the test, that is controlled by
    32 //a flag in aParams. The options are to have a valid GLES context 
    33 //set current, or to have nothing current.
    34 
    35 
    36 CEglTest_LocalTestStep_EndpointReleaseImageGles::CEglTest_LocalTestStep_EndpointReleaseImageGles() :
    37     CLocalTestStepBase(ETestUidEndpointReleaseImageGles)
    38     {
    39     }
    40 
    41 
    42 CEglTest_LocalTestStep_EndpointReleaseImageGles::~CEglTest_LocalTestStep_EndpointReleaseImageGles()
    43     {
    44     }
    45 
    46 
    47 void CEglTest_LocalTestStep_EndpointReleaseImageGles::DoPreambleL()
    48     {
    49     //Register the test id.
    50     _LIT(KTestId, "COV");
    51     RegisterTestIdsL(KTestId);
    52     SetCurrentTestIds(KTestId);
    53     }
    54 
    55 
    56 void CEglTest_LocalTestStep_EndpointReleaseImageGles::DoPostambleL()
    57     {
    58     }
    59 
    60 
    61 TVerdict CEglTest_LocalTestStep_EndpointReleaseImageGles::doTestStepL()
    62     {
    63     TRemoteTestParams params;
    64     StartRemoteTestStep(TRemoteTestParams());
    65     
    66     //Valid GLES context test.
    67     params.iEndpointReleaseImageGles.iUseValidGlesContext = ETrue;
    68     RunRemoteTestCase(0, params);
    69     
    70     //Invalid GLES context test.
    71     params.iEndpointReleaseImageGles.iUseValidGlesContext = EFalse;
    72     RunRemoteTestCase(0, params);
    73         
    74     EndRemoteTestStep(TRemoteTestParams());
    75     return TestStepResult();
    76     }
    77