imagingandcamerafws/imaginginttest/TSI_ICL_IMGDISP/src/IntTestStepImageDisplay.cpp
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2004-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 // EPOC includes
       
    17 #include <e32base.h>
       
    18 #include <imagedisplay.h>
       
    19 #include <icl/imagedisplayplugin.h>
       
    20 #include "TestHelperIface.h"
       
    21 
       
    22 // Test system includes
       
    23 #include <testframework.h>
       
    24 
       
    25 #include "TestStepImageDisplay.h"
       
    26 #include "TestSuiteImageDisplay.h"
       
    27 
       
    28 #include "IntTestStepImageDisplay.h"
       
    29 
       
    30 /*
       
    31  * CDecodeFileByNameByPluginUid::CDecodeFileByNameByPluginUid()
       
    32  *
       
    33  * Test step constructor.
       
    34  */
       
    35 
       
    36 CDecodeFileByNameByPluginUid::CDecodeFileByNameByPluginUid(const TImageDisplayUnitTestParams& aTestParams)
       
    37 	: CTestStepImgDisplayGeneric(aTestParams)
       
    38 	{
       
    39 	}
       
    40 
       
    41 /*
       
    42  * TVerdict CDecodeFileByNameByPluginUid::TestL()
       
    43  *
       
    44  * Test step specific code.
       
    45  */
       
    46 
       
    47 TVerdict CDecodeFileByNameByPluginUid::TestL()
       
    48 	{
       
    49 	TVerdict testStepResult = EPass;	// assume success
       
    50 
       
    51 	ASSERT(iImageDisplay == NULL);
       
    52 	// create an ImageDisplay object
       
    53 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
    54 
       
    55 	SetupPluginL();
       
    56 
       
    57 	TRAP(iLastError, iImageDisplay->SetupL() );
       
    58 
       
    59 	if (KErrNone != iLastError)
       
    60 		{
       
    61 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
    62 		return (testStepResult = EFail );
       
    63 		}
       
    64 	// try PluginLoaded -> (Processing <-> Paused) -> PluginLoaded two times
       
    65 	for(TInt i=2; i && KErrNone == iLastError; --i)
       
    66 		{
       
    67 		// start decoding
       
    68 		iImageDisplay->Play();
       
    69 		CActiveScheduler::Start();
       
    70 		}
       
    71 	if (KErrNone != iLastError && 
       
    72 			!(iTestParams->iTestType==TImageDisplayUnitTestParams::EAlloc && KErrNoMemory == iLastError))
       
    73 		{
       
    74 		testStepResult = EFail;
       
    75 		}
       
    76 		
       
    77 	iImageDisplay->StopPlay();
       
    78 	delete iImageDisplay;
       
    79 	iImageDisplay = NULL;
       
    80 	return testStepResult;
       
    81 	}
       
    82 
       
    83 /*
       
    84  * CDecodeFileByNameByInvalidPluginUid::CDecodeFileByNameByInvalidPluginUid()
       
    85  *
       
    86  * Test step constructor.
       
    87  */
       
    88 
       
    89 CDecodeFileByNameByInvalidPluginUid::CDecodeFileByNameByInvalidPluginUid(const TImageDisplayUnitTestParams& aTestParams)
       
    90 	: CTestStepImgDisplayGeneric(aTestParams)
       
    91 	{
       
    92 	}
       
    93 
       
    94 /*
       
    95  * TVerdict CDecodeFileByNameByInvalidPluginUid::TestL()
       
    96  *
       
    97  * Test step specific code.
       
    98  */
       
    99 
       
   100 TVerdict CDecodeFileByNameByInvalidPluginUid::TestL()
       
   101 	{
       
   102 	TVerdict testStepResult = EPass;	// assume success
       
   103 
       
   104 	ASSERT(iImageDisplay == NULL);
       
   105 	// create an ImageDisplay object
       
   106 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   107 
       
   108 	// Opened -> Configured
       
   109 	SetImageSourceL();
       
   110 // "normal" operation using the file name
       
   111 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   112 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   113 
       
   114 	TRAPD( err, iImageDisplay->SetupL() );
       
   115 	if( KErrNotFound == err )
       
   116 		{
       
   117 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   118 		return testStepResult;
       
   119 		}
       
   120 
       
   121 	if (KErrNone != iLastError)
       
   122 		{
       
   123 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   124 		testStepResult = EFail;
       
   125 		}
       
   126 
       
   127 	delete iImageDisplay;
       
   128 	iImageDisplay = NULL;
       
   129 	return testStepResult;
       
   130 	}
       
   131 
       
   132 /*
       
   133  * CDecodeEmptyFileByNameNoExt::CDecodeEmptyFileByNameNoExt()
       
   134  *
       
   135  * Test step constructor.
       
   136  */
       
   137 
       
   138 CDecodeEmptyFileByNameNoExt::CDecodeEmptyFileByNameNoExt(const TImageDisplayUnitTestParams& aTestParams)
       
   139 	: CTestStepImgDisplayGeneric(aTestParams)
       
   140 	{
       
   141 	}
       
   142 
       
   143 /*
       
   144  * TVerdict CDecodeEmptyFileByNameNoExt::TestL()
       
   145  *
       
   146  * Test step specific code.
       
   147  */
       
   148 
       
   149 TVerdict CDecodeEmptyFileByNameNoExt::TestL()
       
   150 	{
       
   151 	TVerdict testStepResult = EPass;	// assume success
       
   152 
       
   153 	ASSERT(iImageDisplay == NULL);
       
   154 	// create an ImageDisplay object
       
   155 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   156 
       
   157 	// Opened -> Configured
       
   158 	SetImageSourceL();
       
   159 // "normal" operation using the file name
       
   160 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   161 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   162 
       
   163 	TRAPD( err, iImageDisplay->SetupL() );
       
   164 	if( KErrNotSupported == err )
       
   165 		{
       
   166 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   167 		return testStepResult;
       
   168 		}
       
   169 
       
   170 	if (KErrNone != iLastError)
       
   171 		{
       
   172 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   173 		testStepResult = EFail;
       
   174 		}
       
   175 
       
   176 	delete iImageDisplay;
       
   177 	iImageDisplay = NULL;
       
   178 	return testStepResult;
       
   179 	}
       
   180 
       
   181 /*
       
   182  * CDecodeEmptyFileByName::CDecodeEmptyFileByName()
       
   183  *
       
   184  * Test step constructor.
       
   185  */
       
   186 
       
   187 CDecodeEmptyFileByName::CDecodeEmptyFileByName(const TImageDisplayUnitTestParams& aTestParams)
       
   188 	: CTestStepImgDisplayGeneric(aTestParams)
       
   189 	{
       
   190 	}
       
   191 
       
   192 /*
       
   193  * TVerdict CDecodeEmptyFileByName::TestL()
       
   194  *
       
   195  * Test step specific code.
       
   196  */
       
   197 
       
   198 TVerdict CDecodeEmptyFileByName::TestL()
       
   199 	{
       
   200 	TVerdict testStepResult = EPass;	// assume success
       
   201 
       
   202 	ASSERT(iImageDisplay == NULL);
       
   203 	// create an ImageDisplay object
       
   204 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   205 
       
   206 	// Opened -> Configured
       
   207 	SetImageSourceL();
       
   208 // "normal" operation using the file name
       
   209 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   210 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   211 
       
   212 	TRAPD( err, iImageDisplay->SetupL() );
       
   213 	if( KErrNotSupported == err )
       
   214 		{
       
   215 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   216 		return testStepResult;
       
   217 		}
       
   218 
       
   219 	if (KErrNone != iLastError)
       
   220 		{
       
   221 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   222 		testStepResult = EFail;
       
   223 		}
       
   224 
       
   225 	delete iImageDisplay;
       
   226 	iImageDisplay = NULL;
       
   227 	return testStepResult;
       
   228 	}
       
   229 
       
   230 /*
       
   231  * CDecodeEmptyFileByMimeType::CDecodeEmptyFileByMimeType()
       
   232  *
       
   233  * Test step constructor.
       
   234  */
       
   235 
       
   236 CDecodeEmptyFileByMimeType::CDecodeEmptyFileByMimeType(const TImageDisplayUnitTestParams& aTestParams)
       
   237 	: CTestStepImgDisplayGeneric(aTestParams)
       
   238 	{
       
   239 	}
       
   240 
       
   241 /*
       
   242  * TVerdict CDecodeEmptyFileByMimeType::TestL()
       
   243  *
       
   244  * Test step specific code.
       
   245  */
       
   246 
       
   247 TVerdict CDecodeEmptyFileByMimeType::TestL()
       
   248 	{
       
   249 	TVerdict testStepResult = EPass;	// assume success
       
   250 
       
   251 	ASSERT(iImageDisplay == NULL);
       
   252 	// create an ImageDisplay object
       
   253 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   254 
       
   255 	// Opened -> Configured
       
   256 	SetImageSourceL();
       
   257 // "normal" operation using the file name
       
   258 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   259 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   260 
       
   261 	TRAPD( err, iImageDisplay->SetupL() );
       
   262 	if( KErrNotSupported == err )
       
   263 		{
       
   264 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   265 		return testStepResult;
       
   266 		}
       
   267 
       
   268 	if (KErrNone != iLastError)
       
   269 		{
       
   270 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   271 		testStepResult = EFail;
       
   272 		}
       
   273 
       
   274 	delete iImageDisplay;
       
   275 	iImageDisplay = NULL;
       
   276 	return testStepResult;
       
   277 	}
       
   278 
       
   279 /*
       
   280  * CDecodeEmptyFileByImageType::CDecodeEmptyFileByImageType()
       
   281  *
       
   282  * Test step constructor.
       
   283  */
       
   284 
       
   285 CDecodeEmptyFileByImageType::CDecodeEmptyFileByImageType(const TImageDisplayUnitTestParams& aTestParams)
       
   286 	: CTestStepImgDisplayGeneric(aTestParams)
       
   287 	{
       
   288 	}
       
   289 
       
   290 /*
       
   291  * TVerdict CDecodeEmptyFileByImageType::TestL()
       
   292  *
       
   293  * Test step specific code.
       
   294  */
       
   295 
       
   296 TVerdict CDecodeEmptyFileByImageType::TestL()
       
   297 	{
       
   298 	TVerdict testStepResult = EPass;	// assume success
       
   299 
       
   300 	ASSERT(iImageDisplay == NULL);
       
   301 	// create an ImageDisplay object
       
   302 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   303 
       
   304 	// Opened -> Configured
       
   305 	SetImageSourceL();
       
   306 // "normal" operation using the file name
       
   307 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   308 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   309 
       
   310 	TRAPD( err, iImageDisplay->SetupL() );
       
   311 	if( KErrNotSupported == err )
       
   312 		{
       
   313 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   314 		return testStepResult;
       
   315 		}
       
   316 
       
   317 	if (KErrNone != iLastError)
       
   318 		{
       
   319 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   320 		testStepResult = EFail;
       
   321 		}
       
   322 
       
   323 	delete iImageDisplay;
       
   324 	iImageDisplay = NULL;
       
   325 	return testStepResult;
       
   326 	}
       
   327 
       
   328 /*
       
   329  * CDecodeBadHdrFileByNameNoExt::CDecodeBadHdrFileByNameNoExt()
       
   330  *
       
   331  * Test step constructor.
       
   332  */
       
   333 
       
   334 CDecodeBadHdrFileByNameNoExt::CDecodeBadHdrFileByNameNoExt(const TImageDisplayUnitTestParams& aTestParams)
       
   335 	: CTestStepImgDisplayGeneric(aTestParams)
       
   336 	{
       
   337 	}
       
   338 
       
   339 /*
       
   340  * TVerdict CDecodeBadHdrFileByNameNoExt::TestL()
       
   341  *
       
   342  * Test step specific code.
       
   343  */
       
   344 
       
   345 TVerdict CDecodeBadHdrFileByNameNoExt::TestL()
       
   346 	{
       
   347 	TVerdict testStepResult = EPass;	// assume success
       
   348 
       
   349 	ASSERT(iImageDisplay == NULL);
       
   350 	// create an ImageDisplay object
       
   351 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   352 
       
   353 	// Opened -> Configured
       
   354 	SetImageSourceL();
       
   355 // "normal" operation using the file name
       
   356 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   357 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   358 
       
   359 	TRAPD( err, iImageDisplay->SetupL() );
       
   360 	if( KErrNotSupported == err )
       
   361 		{
       
   362 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   363 		return testStepResult;
       
   364 		}
       
   365 
       
   366 	if (KErrNone != iLastError)
       
   367 		{
       
   368 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   369 		testStepResult = EFail;
       
   370 		}
       
   371 
       
   372 	delete iImageDisplay;
       
   373 	iImageDisplay = NULL;
       
   374 	return testStepResult;
       
   375 	}
       
   376 
       
   377 /*
       
   378  * CDecodeBadHdrFileByName::CDecodeBadHdrFileByName()
       
   379  *
       
   380  * Test step constructor.
       
   381  */
       
   382 
       
   383 CDecodeBadHdrFileByName::CDecodeBadHdrFileByName(const TImageDisplayUnitTestParams& aTestParams)
       
   384 	: CTestStepImgDisplayGeneric(aTestParams)
       
   385 	{
       
   386 	}
       
   387 
       
   388 /*
       
   389  * TVerdict CDecodeBadHdrFileByName::TestL()
       
   390  *
       
   391  * Test step specific code.
       
   392  */
       
   393 
       
   394 TVerdict CDecodeBadHdrFileByName::TestL()
       
   395 	{
       
   396 	TVerdict testStepResult = EPass;	// assume success
       
   397 
       
   398 	ASSERT(iImageDisplay == NULL);
       
   399 	// create an ImageDisplay object
       
   400 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   401 
       
   402 	// Opened -> Configured
       
   403 	SetImageSourceL();
       
   404 // "normal" operation using the file name
       
   405 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   406 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   407 
       
   408 	TRAPD( err, iImageDisplay->SetupL() );
       
   409 	if( KErrNotSupported == err )
       
   410 		{
       
   411 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   412 		return testStepResult;
       
   413 		}
       
   414 
       
   415 	if (KErrNone != iLastError)
       
   416 		{
       
   417 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   418 		testStepResult = EFail;
       
   419 		}
       
   420 
       
   421 	delete iImageDisplay;
       
   422 	iImageDisplay = NULL;
       
   423 	return testStepResult;
       
   424 	}
       
   425 
       
   426 /*
       
   427  * CDecodeBadHdrFileByMimeType::CDecodeBadHdrFileByMimeType()
       
   428  *
       
   429  * Test step constructor.
       
   430  */
       
   431 
       
   432 CDecodeBadHdrFileByMimeType::CDecodeBadHdrFileByMimeType(const TImageDisplayUnitTestParams& aTestParams)
       
   433 	: CTestStepImgDisplayGeneric(aTestParams)
       
   434 	{
       
   435 	}
       
   436 
       
   437 /*
       
   438  * TVerdict CDecodeBadHdrFileByMimeType::TestL()
       
   439  *
       
   440  * Test step specific code.
       
   441  */
       
   442 
       
   443 TVerdict CDecodeBadHdrFileByMimeType::TestL()
       
   444 	{
       
   445 	TVerdict testStepResult = EPass;	// assume success
       
   446 
       
   447 	ASSERT(iImageDisplay == NULL);
       
   448 	// create an ImageDisplay object
       
   449 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   450 
       
   451 	// Opened -> Configured
       
   452 	SetImageSourceL();
       
   453 // "normal" operation using the file name
       
   454 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   455 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   456 
       
   457 	TRAPD( err, iImageDisplay->SetupL() );
       
   458 	if( KErrNotSupported == err )
       
   459 		{
       
   460 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   461 		return testStepResult;
       
   462 		}
       
   463 
       
   464 	if (KErrNone != iLastError)
       
   465 		{
       
   466 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   467 		testStepResult = EFail;
       
   468 		}
       
   469 
       
   470 	delete iImageDisplay;
       
   471 	iImageDisplay = NULL;
       
   472 	return testStepResult;
       
   473 	}
       
   474 
       
   475 /*
       
   476  * CDecodeBadHdrFileByImageType::CDecodeBadHdrFileByImageType()
       
   477  *
       
   478  * Test step constructor.
       
   479  */
       
   480 
       
   481 CDecodeBadHdrFileByImageType::CDecodeBadHdrFileByImageType(const TImageDisplayUnitTestParams& aTestParams)
       
   482 	: CTestStepImgDisplayGeneric(aTestParams)
       
   483 	{
       
   484 	}
       
   485 
       
   486 /*
       
   487  * TVerdict CDecodeBadHdrFileByImageType::TestL()
       
   488  *
       
   489  * Test step specific code.
       
   490  */
       
   491 
       
   492 TVerdict CDecodeBadHdrFileByImageType::TestL()
       
   493 	{
       
   494 	TVerdict testStepResult = EPass;	// assume success
       
   495 
       
   496 	ASSERT(iImageDisplay == NULL);
       
   497 	// create an ImageDisplay object
       
   498 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   499 
       
   500 	// Opened -> Configured
       
   501 	SetImageSourceL();
       
   502 // "normal" operation using the file name
       
   503 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   504 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   505 
       
   506 	TRAPD( err, iImageDisplay->SetupL() );
       
   507 	if( KErrNotSupported == err )
       
   508 		{
       
   509 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   510 		return testStepResult;
       
   511 		}
       
   512 
       
   513 	if (KErrNone != iLastError)
       
   514 		{
       
   515 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   516 		testStepResult = EFail;
       
   517 		}
       
   518 
       
   519 	delete iImageDisplay;
       
   520 	iImageDisplay = NULL;
       
   521 	return testStepResult;
       
   522 	}
       
   523 
       
   524 /*
       
   525  * CDecodeFileClippedNoClipPlugins::CDecodeFileClippedNoClipPlugins()
       
   526  *
       
   527  * Test step constructor.
       
   528  */
       
   529 
       
   530 CDecodeFileClippedNoClipPlugins::CDecodeFileClippedNoClipPlugins(const TImageDisplayUnitTestParams& aTestParams)
       
   531 	: CTestStepImgDisplayGeneric(aTestParams)
       
   532 	{
       
   533 	}
       
   534 
       
   535 /*
       
   536  * TVerdict CDecodeFileClippedNoClipPlugins::TestL()
       
   537  *
       
   538  * Test step specific code.
       
   539  */
       
   540 
       
   541 TVerdict CDecodeFileClippedNoClipPlugins::TestL()
       
   542 	{
       
   543 	TVerdict testStepResult = EPass;	// assume success
       
   544 
       
   545 	ASSERT(iImageDisplay == NULL);
       
   546 	// create an ImageDisplay object
       
   547 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   548 
       
   549 	// Opened -> Configured
       
   550 	SetImageSourceL();
       
   551 // "normal" operation using the file name
       
   552 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   553 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   554 
       
   555 	TRAPD( err, iImageDisplay->SetupL() );
       
   556 	if( KErrNotFound == err )
       
   557 		{
       
   558 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   559 		return testStepResult;
       
   560 		}
       
   561 
       
   562 	if (KErrNone != iLastError)
       
   563 		{
       
   564 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   565 		testStepResult = EFail;
       
   566 		}
       
   567 
       
   568 	delete iImageDisplay;
       
   569 	iImageDisplay = NULL;
       
   570 	return testStepResult;
       
   571 	}
       
   572 
       
   573 /*
       
   574  * CDecodeFileClipCancelNoClipPlugins::CDecodeFileClipCancelNoClipPlugins()
       
   575  *
       
   576  * Test step constructor.
       
   577  */
       
   578 
       
   579 CDecodeFileClipCancelNoClipPlugins::CDecodeFileClipCancelNoClipPlugins(const TImageDisplayUnitTestParams& aTestParams)
       
   580 	: CTestStepImgDisplayGeneric(aTestParams)
       
   581 	{
       
   582 	}
       
   583 
       
   584 /*
       
   585  * TVerdict CDecodeFileClipCancelNoClipPlugins::TestL()
       
   586  *
       
   587  * Test step specific code.
       
   588  */
       
   589 
       
   590 TVerdict CDecodeFileClipCancelNoClipPlugins::TestL()
       
   591 	{
       
   592 	TVerdict testStepResult = EPass;	// assume success
       
   593 
       
   594 	ASSERT(iImageDisplay == NULL);
       
   595 	// create an ImageDisplay object
       
   596 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   597 
       
   598 	// Opened -> Configured
       
   599 	SetImageSourceL();
       
   600 // "normal" operation using the file name
       
   601 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   602 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   603 
       
   604 	TRAPD( err, iImageDisplay->SetupL() );
       
   605 	if( KErrNotFound == err )
       
   606 		{
       
   607 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   608 		return testStepResult;
       
   609 		}
       
   610 
       
   611 	if (KErrNone != iLastError)
       
   612 		{
       
   613 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   614 		testStepResult = EFail;
       
   615 		}
       
   616 
       
   617 	delete iImageDisplay;
       
   618 	iImageDisplay = NULL;
       
   619 	return testStepResult;
       
   620 	}
       
   621 
       
   622 /*
       
   623  * CDecodeNoExistFileByName::CDecodeNoExistFileByName()
       
   624  *
       
   625  * Test step constructor.
       
   626  */
       
   627 
       
   628 CDecodeNoExistFileByName::CDecodeNoExistFileByName(const TImageDisplayUnitTestParams& aTestParams)
       
   629 	: CTestStepImgDisplayGeneric(aTestParams)
       
   630 	{
       
   631 	}
       
   632 
       
   633 /*
       
   634  * TVerdict CDecodeNoExistFileByName::TestL()
       
   635  *
       
   636  * Test step specific code.
       
   637  */
       
   638 
       
   639 TVerdict CDecodeNoExistFileByName::TestL()
       
   640 	{
       
   641 	TVerdict testStepResult = EPass;	// assume success
       
   642 
       
   643 	ASSERT(iImageDisplay == NULL);
       
   644 	// create an ImageDisplay object
       
   645 	iImageDisplay = CImageDisplay::NewL(*this, iFs);
       
   646 
       
   647 	// Opened -> Configured
       
   648 	SetImageSourceL();
       
   649 // "normal" operation using the file name
       
   650 	iImageDisplay->SetSizeInPixels(TSize(iTestParams->iDestWidth, iTestParams->iDestHeight), iTestParams->iMaintainAspectRatio);
       
   651 	iImageDisplay->SetOptions(CImageDisplay::EOptionMainImage);
       
   652 
       
   653 	TRAPD( err, iImageDisplay->SetupL() );
       
   654 	if( KErrNotSupported == err )
       
   655 		{
       
   656 		INFO_PRINTF2(_L("Leave from SetupL() %d"),err);
       
   657 		return testStepResult;
       
   658 		}
       
   659 
       
   660 	if (KErrNone != iLastError)
       
   661 		{
       
   662 		INFO_PRINTF2(_L("Error from SetupL() %d after reuse"),iLastError);
       
   663 		testStepResult = EFail;
       
   664 		}
       
   665 
       
   666 	delete iImageDisplay;
       
   667 	iImageDisplay = NULL;
       
   668 	return testStepResult;
       
   669 	}