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