imagehandling_plat/thumbnailmanager_api/tsrc/conf/ThumbnailManagerTest.cfg
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 26 Jan 2010 15:18:05 +0200
changeset 0 2014ca87e772
child 10 ee674526fac5
permissions -rw-r--r--
Revision: 201004

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Thumbnail Manager API tests
*
*/


[StifSettings]
TestThreadStackSize= 32768
TestThreadMinHeap= 4096
TestThreadMaxHeap= 67108860
[EndStifSettings]


// ---------------------------------------------------------------------------
// Thumbnail Manager API test cases
// ---------------------------------------------------------------------------

// These should be run in sequential mode if several cases are run at the same
// time! Running multiple cases in parallel will not work, because the test
// cases assume they can delete the database file between tests.


// ---------------------------------------------------------------------------
// Define constants
// ---------------------------------------------------------------------------
[Define]

KErrNotFound -1
KErrNotSupported -5
KErrArgument -6

KMaxTInt 2147483647

// Delay between test cases (milliseconds)
KTestDelay 1000

KOneSecondDelay 1000
KFiveSecondDelay 5000
KTenSecondDelay 5000

// A delay to make sure the client-server request to generate a thumbnail
// reaches the server, but doesn't have enough time to complete yet
// (milliseconds)
KClientServerDelay 150
KClientServerDelay2 25
KClientServerDelay3 10

// From TDisplayMode: value for 24-bit display mode
EColor16M 8
EColor64K 7
KDefaultDisplayMode 7

// From CThumbnailManager::TThumbeFlags
EDefaultFlags 0
EAllowAnySize 1
EDoNotCreate 2
ECropToAspectRatio 4

// From CThumbnailManager::TThumbeQualityPreference
EOptimizeForQuality 0
EOptimizeForPerformance 1 
EOptimizeForQualityWithPreview 2

EUnknownThumbnailSize 0
ECustomThumbnailSize 1
EImageGridThumbnailSize 2
EImageListThumbnailSize 3
EImageFullScreenThumbnailSize 4
EVideoGridThumbnailSize 5
EVideoListThumbnailSize 6
EVideoFullScreenThumbnailSize 7      
EAudioGridThumbnailSize 8
EAudioListThumbnailSize 9
EAudioFullScreenThumbnailSize 10 

// Custom sizes
KCustomSizeX 111
KCustomSizeY 222
KCustomSize2X 222
KCustomSize2Y 111
KCustomSize3X 10
KCustomSize3Y 100
KCustomSize4X 100
KCustomSize4Y 10
KCustomSize5X 1000
KCustomSize5Y 1000
KCustomSize6X 1000
KCustomSize6Y 2000
KCustomSize7X 2000
KCustomSize7Y 1000
KCustomSize8X 1
KCustomSize8Y 1
KCustomSize9X 555
KCustomSize9Y 556
KCustomSize10X 556
KCustomSize10Y 555

[Enddefine]


// ---------------------------------------------------------------------------
// Create and delete CThumbnailManager
// ---------------------------------------------------------------------------
[Test]
title Create and delete CThumbnailManager
create ThumbnailManagerTest tn
tn CreateInstanceL
pause KOneSecondDelay
tn DeleteInstance
delete tn
pause KTestDelay
[Endtest] 

// ---------------------------------------------------------------------------
// Set and check parameters
// ---------------------------------------------------------------------------
[Test]
title Set and check parameters
create ThumbnailManagerTest tn
tn CreateInstanceL

tn SetThumbnailSizeL 0 0
tn CheckThumbnailSizeL 0 0
tn SetThumbnailSizeL 1 1
tn CheckThumbnailSizeL 1 1
tn SetThumbnailSizeL KMaxTInt KMaxTInt
tn CheckThumbnailSizeL KMaxTInt KMaxTInt
tn SetThumbnailEnumSizeL EUnknownThumbnailSize
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn SetThumbnailEnumSizeL EVideoFullScreenThumbnailSize
tn SetThumbnailEnumSizeL KMaxTInt

tn SetFlagsL EDefaultFlags
tn CheckFlags EDefaultFlags
tn SetFlagsL EAllowAnySize
tn CheckFlags EAllowAnySize
tn SetFlagsL KMaxTInt
tn CheckFlags KMaxTInt

tn SetQualityPreferenceL EOptimizeForQuality
tn CheckQualityPreference EOptimizeForQuality
tn SetQualityPreferenceL EOptimizeForPerformance
tn CheckQualityPreference EOptimizeForPerformance
tn SetQualityPreferenceL KMaxTInt
tn CheckQualityPreference KMaxTInt

tn SetDisplayModeL EColor16M
tn CheckDisplayModeL EColor16M
tn SetDisplayModeL EColor64K
tn CheckDisplayModeL EColor64K
tn SetDisplayModeL 0
tn CheckDisplayModeL 0
tn SetDisplayModeL KMaxTInt
tn CheckDisplayModeL KMaxTInt

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest] 

// ---------------------------------------------------------------------------
// Create object sources
// ---------------------------------------------------------------------------
[Test]
title Create object sources
create ThumbnailManagerTest tn
tn CreateInstanceL

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteSourceInstance
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\Tiny_1x1.jpg
tn DeleteSourceInstance 
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\video.3gp
tn DeleteSourceInstance
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\empty_file.bmp
tn DeleteSourceInstance

tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteSourceInstance 
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\Tiny_1x1.jpg
tn DeleteSourceInstance 
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\video.3gp
tn DeleteSourceInstance
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\empty_file.bmp
tn DeleteSourceInstance

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_VGA.jpg image/jpeg
tn DeleteSourceInstance 
tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\Tiny_1x1.jpg image/jpeg
tn DeleteSourceInstance 
tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\empty_file.bmp image/bmp
tn DeleteSourceInstance 

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]


// ---------------------------------------------------------------------------
// Create JPEG thumbnail
// ---------------------------------------------------------------------------
[Test]
title Create JPEG thumbnail
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

// using path
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

// using handle
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Create GIF thumbnail
// ---------------------------------------------------------------------------
[Test]
title Create GIF thumbnail
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

// using path
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

// using handle
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Create SVG thumbnail
// ---------------------------------------------------------------------------
[Test]
title Create SVG thumbnail
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

// using path
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\SVG_640x480.svg
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

// using handle
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Create BMP thumbnail
// ---------------------------------------------------------------------------
[Test]
title Create BMP thumbnail
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

// using path
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_400x300.bmp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

// using handle
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\RGB_400x300.bmp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Create 3GP thumbnail
// ---------------------------------------------------------------------------
[Test]
title Create 3GP thumbnail
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

// using path
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\video.3gp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

// using handle
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\video.3gp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Create MPEG4 thumbnail
// ---------------------------------------------------------------------------
[Test]
title Create MPEG4 thumbnail
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

// using path
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\Videoclip.mp4
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

// using handle
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\Videoclip.mp4
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Create MP3 thumbnail
// ---------------------------------------------------------------------------
[Test]
title Create MP3 thumbnail
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

// using path
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\mp3.mp3
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EAudioGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EAudioGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EAudioFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EAudioFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

// using handle
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\mp3.mp3
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EAudioGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EAudioGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EAudioFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EAudioFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]


// ---------------------------------------------------------------------------
// Thumbs from buffer
// ---------------------------------------------------------------------------
[Test]
title Thumbs from buffer
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_VGA.jpg image/jpeg
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_400x300.bmp image/bmp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\8bit_PNG.png image/png
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\SVG_640x480.svg image/svg+xml
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Create thumbnails for each persistent size
// ---------------------------------------------------------------------------
[Test]
title Create thumbnails for each persistent size
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

tn SetFlagsL EDefaultFlags
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteThumbnails
tn CreateThumbnails
waittestclass tn

pause KTenSecondDelay

tn SetFlagsL EDoNotCreate
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EImageListThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageListThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn SetFlagsL EDefaultFlags
tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_VGA.jpg image/jpeg
tn DeleteThumbnails
tn CreateThumbnails
waittestclass tn

pause KTenSecondDelay

tn SetFlagsL EDoNotCreate
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EImageListThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageListThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn SetFlagsL EDefaultFlags
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_400x300.bmp
tn DeleteThumbnails
tn CreateThumbnails
waittestclass tn

pause KTenSecondDelay

tn SetFlagsL EDoNotCreate
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EImageListThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageListThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn SetFlagsL EDefaultFlags
tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_400x300.bmp image/bmp
tn DeleteThumbnails
tn CreateThumbnails
waittestclass tn

pause KTenSecondDelay

tn SetFlagsL EDoNotCreate
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EImageListThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageListThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn SetFlagsL EDefaultFlags
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\video.3gp
tn DeleteThumbnails
tn CreateThumbnails
waittestclass tn

pause KTenSecondDelay

tn SetFlagsL EDoNotCreate
tn SetThumbnailEnumSizeL EVideoGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoGridThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EVideoListThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoListThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EVideoFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]


// ---------------------------------------------------------------------------
// Thumbnail from missing or unsupported file
// ---------------------------------------------------------------------------
[Test]
title Thumbnail from missing or unsupported file
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\does_not_exist.jpg
tn GetThumbnailL
allownextresult KErrNotFound
waittestclass tn
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\Unsupported.txt
tn GetThumbnailL
allownextresult KErrNotSupported
waittestclass tn
tn DeleteSourceInstance

tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\Unsupported.txt
tn GetThumbnailL
allownextresult KErrNotSupported
waittestclass tn
tn DeleteSourceInstance

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\Unsupported.txt plain/text
tn GetThumbnailL
allownextresult KErrNotSupported
waittestclass tn
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Thumbnail from corrupt file
// ---------------------------------------------------------------------------
[Test]
title Thumbnail from corrupt file
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\not_jpg.jpg
tn GetThumbnailL
allownextresult KErrNotFound
waittestclass tn
tn DeleteSourceInstance

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\not_jpg.jpg image/jpeg
tn GetThumbnailL
allownextresult KErrNotFound
waittestclass tn
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\not_3gp.3gp
tn GetThumbnailL
allownextresult KErrNotSupported
waittestclass tn
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]


// ---------------------------------------------------------------------------
// Custom size thumbs
// ---------------------------------------------------------------------------
[Test]
title Custom size thumbs
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M
tn SetThumbnailEnumSizeL ECustomThumbnailSize

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize2X KCustomSize2Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize2X KCustomSize2Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize3X KCustomSize3Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize3X KCustomSize3Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize4X KCustomSize4Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize4X KCustomSize4Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize6X KCustomSize6Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize6X KCustomSize6Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize7X KCustomSize7Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize7X KCustomSize7Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize8X KCustomSize8Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize8X KCustomSize8Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize9X KCustomSize9Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize9X KCustomSize9Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize10X KCustomSize10Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize10X KCustomSize10Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize2X KCustomSize2Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize2X KCustomSize2Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize3X KCustomSize3Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize3X KCustomSize3Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize4X KCustomSize4Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize4X KCustomSize4Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize6X KCustomSize6Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize6X KCustomSize6Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize7X KCustomSize7Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize7X KCustomSize7Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize8X KCustomSize8Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize8X KCustomSize8Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize9X KCustomSize9Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize9X KCustomSize9Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize10X KCustomSize10Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize10X KCustomSize10Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize2X KCustomSize2Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize2X KCustomSize2Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize3X KCustomSize3Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize3X KCustomSize3Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize4X KCustomSize4Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize4X KCustomSize4Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize6X KCustomSize6Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize6X KCustomSize6Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize7X KCustomSize7Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize7X KCustomSize7Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize8X KCustomSize8Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize8X KCustomSize8Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize9X KCustomSize9Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize9X KCustomSize9Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize10X KCustomSize10Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize10X KCustomSize10Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Custom size thumbs with cropping
// ---------------------------------------------------------------------------
[Test]
title Custom size thumbs with cropping
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M
tn SetThumbnailEnumSizeL ECustomThumbnailSize

tn SetFlagsL ECropToAspectRatio

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize2X KCustomSize2Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize2X KCustomSize2Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize3X KCustomSize3Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize3X KCustomSize3Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize4X KCustomSize4Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize4X KCustomSize4Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize6X KCustomSize6Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize6X KCustomSize6Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize7X KCustomSize7Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize7X KCustomSize7Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize8X KCustomSize8Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize8X KCustomSize8Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize9X KCustomSize9Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize9X KCustomSize9Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize10X KCustomSize10Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize10X KCustomSize10Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize2X KCustomSize2Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize2X KCustomSize2Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize3X KCustomSize3Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize3X KCustomSize3Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize4X KCustomSize4Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize4X KCustomSize4Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize6X KCustomSize6Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize6X KCustomSize6Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize7X KCustomSize7Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize7X KCustomSize7Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize8X KCustomSize8Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize8X KCustomSize8Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize9X KCustomSize9Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize9X KCustomSize9Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize10X KCustomSize10Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize10X KCustomSize10Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize2X KCustomSize2Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize2X KCustomSize2Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize3X KCustomSize3Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize3X KCustomSize3Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize4X KCustomSize4Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize4X KCustomSize4Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize6X KCustomSize6Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize6X KCustomSize6Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize7X KCustomSize7Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize7X KCustomSize7Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize8X KCustomSize8Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize8X KCustomSize8Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize9X KCustomSize9Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize9X KCustomSize9Y EColor16M
tn DeleteThumbnails
tn SetThumbnailSizeL KCustomSize10X KCustomSize10Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize10X KCustomSize10Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Different display modes
// ---------------------------------------------------------------------------
[Test]
title Different display modes
create ThumbnailManagerTest tn
tn CreateInstanceL

// 24-bit
tn SetDisplayModeL EColor16M

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_VGA.jpg image/jpeg
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance 

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_400x300.bmp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_400x300.bmp image/bmp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\video.3gp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\Videoclip.mp4
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoGridThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor16M
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

// 16-bit
tn SetDisplayModeL EColor64K

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor64K
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_VGA.jpg image/jpeg
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor64K
tn DeleteThumbnails
tn DeleteSourceInstance 

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_400x300.bmp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor64K
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_400x300.bmp image/bmp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor64K
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\video.3gp
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoGridThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoFullScreenThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor64K
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\Videoclip.mp4
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoGridThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL EVideoFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EVideoFullScreenThumbnailSize EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSizeX KCustomSizeY
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSizeX KCustomSizeY EColor64K
tn DeleteThumbnails
tn SetThumbnailEnumSizeL ECustomThumbnailSize
tn SetThumbnailSizeL KCustomSize5X KCustomSize5Y
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailL KCustomSize5X KCustomSize5Y EColor64K
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]


// ---------------------------------------------------------------------------
// Get thumbnail by id
// ---------------------------------------------------------------------------
[Test]
title Get thumbnail by id
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg 99999
tn DeleteThumbnails
tn CreateThumbnails
waittestclass tn

pause KTenSecondDelay

tn SetFlagsL EDoNotCreate
tn GetThumbnailByIdL 99999
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails

tn DeleteSourceInstance
tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Set thumbnail from buffer
// ---------------------------------------------------------------------------
[Test]
title Set thumbnail from buffer
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

tn SetFlagsL EDefaultFlags
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_VGA.jpg image/jpeg
tn DeleteThumbnails
tn SetThumbnailL

waittestclass tn

tn SetFlagsL EDoNotCreate
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn SetFlagsL EDefaultFlags
tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\RGB_400x300.bmp image/bmp
tn DeleteThumbnails
tn SetThumbnailL

waittestclass tn

tn SetFlagsL EDoNotCreate
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn SetFlagsL EDefaultFlags
tn CreateSourceInstanceBufferL \data\ThumbnailManagerTest\WIDE_800x400.gif image/gif
tn DeleteThumbnails
tn SetThumbnailL

waittestclass tn

tn SetFlagsL EDoNotCreate
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Import thumbnail
// ---------------------------------------------------------------------------
[Test]
title Import thumbnail
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

tn SetFlagsL EDefaultFlags
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteThumbnails
tn ImportThumbnailL \data\ThumbnailManagerTest\imported.jpg
waittestclass tn
tn DeleteSourceInstance

tn SetFlagsL EDoNotCreate
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\imported.jpg
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn SetFlagsL EDefaultFlags
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_400x300.bmp
tn DeleteThumbnails
tn ImportThumbnailL \data\ThumbnailManagerTest\imported.bmp
waittestclass tn
tn DeleteSourceInstance

tn SetFlagsL EDoNotCreate
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\imported.bmp
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn SetFlagsL EDefaultFlags
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn DeleteThumbnails
tn ImportThumbnailL \data\ThumbnailManagerTest\imported.gif
waittestclass tn
tn DeleteSourceInstance

tn SetFlagsL EDoNotCreate
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\imported.gif
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn SetFlagsL EDefaultFlags
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\video.3gp
tn DeleteThumbnails
tn ImportThumbnailL \data\ThumbnailManagerTest\imported.3gp
waittestclass tn
tn DeleteSourceInstance

tn SetFlagsL EDoNotCreate
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\imported.3gp
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]


// ---------------------------------------------------------------------------
// Delete thumbnails
// ---------------------------------------------------------------------------
[Test]
title Delete thumbnails
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

tn SetThumbnailEnumSizeL EImageGridThumbnailSize

// one thumbnail
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn DeleteThumbnails
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M

tn DeleteThumbnails
pause KTenSecondDelay

tn SetFlagsL EDoNotCreate
tn GetThumbnailL
allownextresult KErrNotFound
waittestclass tn

// all persistent thumbnails created
tn SetFlagsL EDefaultFlags
tn CreateThumbnails
waittestclass tn
pause KTenSecondDelay

tn DeleteThumbnails
pause KTenSecondDelay

tn SetFlagsL EDoNotCreate
tn GetThumbnailL
allownextresult KErrNotFound
waittestclass tn

tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Delete thumbnails by id
// ---------------------------------------------------------------------------
[Test]
title Delete thumbnails by id
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg 99999
tn DeleteThumbnails
tn CreateThumbnails
waittestclass tn

pause KTenSecondDelay

tn SetFlagsL EDoNotCreate
tn GetThumbnailByIdL 99999
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M

tn DeleteThumbnailsByIdL 99999
pause KOneSecondDelay

tn GetThumbnailByIdL 99999
allownextresult KErrNotFound
waittestclass tn

tn DeleteSourceInstance
tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]


// ---------------------------------------------------------------------------
// Update path
// ---------------------------------------------------------------------------
[Test]
title Update path
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg 99999
tn DeleteThumbnails
tn CreateThumbnails
waittestclass tn
tn DeleteSourceInstance

pause KTenSecondDelay

tn UpdatePathL 99999 \data\ThumbnailManagerTest\updated_path.bmp
waittestclass tn

pause KTenSecondDelay

tn SetFlagsL EDoNotCreate
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
tn GetThumbnailL
allownextresult KErrNotFound
waittestclass tn
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\updated_path.bmp 99999
tn GetThumbnailByIdL 99999
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn DeleteSourceInstance
tn DeleteThumbnailsByIdL 99999

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]


// ---------------------------------------------------------------------------
// Delete engine when requests are pending
// ---------------------------------------------------------------------------
[Test]
title Delete engine when requests are pending
create ThumbnailManagerTest tn
tn CreateInstanceL

tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\Videoclip.mp4
tn DeleteThumbnails
tn DeleteSourceInstance
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\Videoclip.mp4
tn GetThumbnailL
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn GetThumbnailL
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Cancel request
// ---------------------------------------------------------------------------
[Test]
title Cancel request
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\Videoclip.mp4
tn DeleteThumbnails
tn DeleteSourceInstance
tn CreateSourceInstancePathL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn DeleteThumbnails
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\Videoclip.mp4
tn GetThumbnailL
tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn GetThumbnailL
tn DeleteSourceInstance

pause KClientServerDelay2

// The server should have the two thumbnail requests queued by now.
// This should cancel the second one while letting the first one finish.
tn CancelPrevious

waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Priority handling
// ---------------------------------------------------------------------------
[Test]
title Priority handling
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M
tn SetThumbnailEnumSizeL ECustomThumbnailSize

tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn DeleteThumbnails
tn DeleteSourceInstance
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn DeleteThumbnails
tn DeleteSourceInstance
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
tn DeleteThumbnails
tn DeleteSourceInstance

// First request with 100 priority
tn SetThumbnailSizeL 80 40
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn GetThumbnailL 0 100
tn DeleteSourceInstance

// Second request with negative priority
tn SetThumbnailSizeL 1 1
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn GetThumbnailL 0 -50
tn DeleteSourceInstance

// Third request with positive priority
tn SetThumbnailSizeL 40 30
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
tn GetThumbnailL 0 50
tn DeleteSourceInstance

// First request should complete first, since the server started processing
// it before the other requests were done
waittestclass tn
tn CheckThumbnailL 80 40 EColor16M

// The third request should finish next
waittestclass tn
tn CheckThumbnailL 40 30 EColor16M

// The second request should finish last, since it had the lowest priority
waittestclass tn
tn CheckThumbnailL 1 1 EColor16M

tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn DeleteThumbnails
tn DeleteSourceInstance
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn DeleteThumbnails
tn DeleteSourceInstance
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Change priority
// ---------------------------------------------------------------------------
[Test]
title Change priority
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M
tn SetThumbnailEnumSizeL ECustomThumbnailSize

tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn DeleteThumbnails
tn DeleteSourceInstance
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn DeleteThumbnails
tn DeleteSourceInstance
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
tn DeleteThumbnails
tn DeleteSourceInstance

// First request with 0 priority
tn SetThumbnailSizeL 80 40
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn GetThumbnailL 0 0
tn DeleteSourceInstance

// Second request with negative priority
tn SetThumbnailSizeL 1 1
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn GetThumbnailL 0 -50
tn DeleteSourceInstance

// Third request with positive priority
tn SetThumbnailSizeL 40 30
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
tn GetThumbnailL 0 50
tn DeleteSourceInstance

// Change the priority of the third request to a low value
tn ChangePreviousPriority -100

// First request should complete first, since the server started processing
// it before the other requests were done
waittestclass tn
tn CheckThumbnailL 80 40 EColor16M

// The second request should finish next
waittestclass tn
tn CheckThumbnailL 1 1 EColor16M

// The third request should finish last, since the priority was changed to the
// lowest value.
waittestclass tn
tn CheckThumbnailL 40 30 EColor16M

tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
tn DeleteThumbnails
tn DeleteSourceInstance
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
tn DeleteThumbnails
tn DeleteSourceInstance
tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]

// ---------------------------------------------------------------------------
// Get supported mime types
// ---------------------------------------------------------------------------
[Test]
title Get supported mime types
create ThumbnailManagerTest tn
tn CreateInstanceL
tn GetSupportedMimeTypesL
tn DeleteInstance
delete tn
pause KTestDelay
[Endtest] 

// ---------------------------------------------------------------------------
// Create thumbnails using CFbsBitmap
// ---------------------------------------------------------------------------
[Test]
title Create thumbnails using CFbsBitmap
create ThumbnailManagerTest tn
tn CreateInstanceL
tn SetDisplayModeL EColor16M

tn SetFlagsL EDefaultFlags
tn CreateSourceInstanceBitmapL \data\ThumbnailManagerTest\TestMBM.mbm \data\ThumbnailManagerTest\camera.jpg
tn DeleteThumbnails
tn CreateThumbnails
waittestclass tn

pause KTenSecondDelay

tn DeleteSourceInstance

tn CreateSourceInstancePathL \data\ThumbnailManagerTest\camera.jpg
tn SetFlagsL EDoNotCreate
tn SetThumbnailEnumSizeL EImageGridThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
tn GetThumbnailL
waittestclass tn
tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
tn DeleteThumbnails
tn DeleteSourceInstance

tn DeleteInstance
delete tn
pause KTestDelay
[Endtest]