uiacceltk/hitchcock/AlfHintPlugin/src/alfcrpplugintest.cpp
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2009 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 void CWsGraphicBase::DoTestDrawInvalidBitmapIDL()
       
    19 	{
       
    20 	iTestLog.Append(_L("DrawInvalidBitmapID"));
       
    21  		
       
    22 	CFbsBitmap bitmap1;
       
    23 	CFbsBitmap mask1;
       
    24 	CFbsBitmap *bitmap2 = NULL;
       
    25 	CFbsBitmap *mask2 = NULL;
       
    26 	
       
    27 	User::LeaveIfError(bitmap1.Load(MY_TEST_BITMAP,0));
       
    28 	mask1.Create(bitmap1.SizeInPixels(),iScreen->DisplayMode());
       
    29 	
       
    30 	// valid bitmap
       
    31 	CWsGraphicBitmap* bTest = CWsGraphicBitmap::NewL(&bitmap1,&mask1);
       
    32 	
       
    33 	// invalid bitmap
       
    34 	CWsGraphicBitmap* bTest2 = CWsGraphicBitmap::NewL(bitmap2,mask2);
       
    35  	
       
    36 	PrepGc();
       
    37 	iGc->DrawWsGraphic(bTest->Id(),iPosition1);
       
    38 	iGc->DrawWsGraphic(bTest2->Id(),iPosition2);
       
    39 	RetireGc();
       
    40 	
       
    41 	// compare the graphic in both positions, should only be graphic in position 1
       
    42 	TestForDifferentBitmaps();
       
    43 	
       
    44 	delete bTest2;
       
    45 	delete bTest;
       
    46 	}
       
    47