imagehandling_plat/thumbnailmanager_api/tsrc/conf/ThumbnailManagerTest.cfg
branchRCL_3
changeset 13 ee674526fac5
parent 0 2014ca87e772
child 38 2b4b06654caa
--- a/imagehandling_plat/thumbnailmanager_api/tsrc/conf/ThumbnailManagerTest.cfg	Wed Mar 31 22:04:49 2010 +0300
+++ b/imagehandling_plat/thumbnailmanager_api/tsrc/conf/ThumbnailManagerTest.cfg	Wed Apr 14 16:16:51 2010 +0300
@@ -15,7 +15,6 @@
 *
 */
 
-
 [StifSettings]
 TestThreadStackSize= 32768
 TestThreadMinHeap= 4096
@@ -37,25 +36,26 @@
 // ---------------------------------------------------------------------------
 [Define]
 
-KErrNotFound -1
-KErrNotSupported -5
-KErrArgument -6
+KErrNotFound      -1
+KErrGeneral       -2
+KErrNotSupported  -5
+KErrArgument      -6
 
 KMaxTInt 2147483647
 
 // Delay between test cases (milliseconds)
 KTestDelay 1000
 
-KOneSecondDelay 1000
-KFiveSecondDelay 5000
-KTenSecondDelay 5000
+KOneSecondDelay   1000
+KFiveSecondDelay  5000
+KTenSecondDelay   10000
 
 // 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
+KClientServerDelay   150
+KClientServerDelay2  25
+KClientServerDelay3  10
 
 // From TDisplayMode: value for 24-bit display mode
 EColor16M 8
@@ -83,7 +83,10 @@
 EVideoFullScreenThumbnailSize 7      
 EAudioGridThumbnailSize 8
 EAudioListThumbnailSize 9
-EAudioFullScreenThumbnailSize 10 
+EAudioFullScreenThumbnailSize 10
+EGridThumbnailSize = 11
+EListThumbnailSize = 12
+EFullScreenThumbnailSize = 13
 
 // Custom sizes
 KCustomSizeX 111
@@ -1594,24 +1597,17 @@
 
 
 // ---------------------------------------------------------------------------
-// Get thumbnail by id
+// Create thumbnail with id
 // ---------------------------------------------------------------------------
 [Test]
-title Get thumbnail by id
+title Create thumbnail with 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
+tn GetThumbnailL
 waittestclass tn
 tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
 tn DeleteThumbnails
@@ -1794,7 +1790,19 @@
 tn GetThumbnailL
 allownextresult KErrNotFound
 waittestclass tn
+tn DeleteThumbnails
+tn DeleteSourceInstance
 
+// delete thumbnail which is not in database yet
+tn SetThumbnailEnumSizeL EImageGridThumbnailSize
+tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
+tn CreateThumbnails
+tn DeleteThumbnails
+tn DeleteSourceInstance
+
+tn SetThumbnailEnumSizeL EImageGridThumbnailSize
+tn CreateSourceInstancePathL \data\ThumbnailManagerTest\Videoclip.mp4
+tn CreateThumbnails
 tn DeleteThumbnails
 tn DeleteSourceInstance
 
@@ -1804,89 +1812,10 @@
 [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
+// Delete thumbnail when requests are pending
 // ---------------------------------------------------------------------------
 [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
+title Delete thumbnail when requests are pending
 create ThumbnailManagerTest tn
 tn CreateInstanceL
 
@@ -1981,13 +1910,13 @@
 // Second request with negative priority
 tn SetThumbnailSizeL 1 1
 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
-tn GetThumbnailL 0 -50
+tn GetThumbnailL 0 -100
 tn DeleteSourceInstance
 
 // Third request with positive priority
 tn SetThumbnailSizeL 40 30
 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
-tn GetThumbnailL 0 50
+tn GetThumbnailL 0 0
 tn DeleteSourceInstance
 
 // First request should complete first, since the server started processing
@@ -2120,9 +2049,9 @@
 
 tn DeleteSourceInstance
 
+tn SetThumbnailEnumSizeL EImageGridThumbnailSize
 tn CreateSourceInstancePathL \data\ThumbnailManagerTest\camera.jpg
 tn SetFlagsL EDoNotCreate
-tn SetThumbnailEnumSizeL EImageGridThumbnailSize
 tn GetThumbnailL
 waittestclass tn
 tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
@@ -2137,3 +2066,283 @@
 delete tn
 pause KTestDelay
 [Endtest]
+
+// ---------------------------------------------------------------------------
+// Load MP3 thumbnail with PNG album art
+// ---------------------------------------------------------------------------
+[Test]
+title Create MP3 PNG album art thumbnail
+create ThumbnailManagerTest tn
+tn CreateInstanceL
+tn SetDisplayModeL EColor16M
+
+tn CreateSourceInstancePathL \data\ThumbnailManagerTest\mp3_png.mp3
+tn DeleteThumbnails
+tn SetThumbnailEnumSizeL EAudioFullScreenThumbnailSize
+tn GetThumbnailL
+waittestclass tn
+tn CheckThumbnailCenrepL EAudioFullScreenThumbnailSize EColor16M
+tn DeleteThumbnails
+tn DeleteSourceInstance 
+
+tn DeleteInstance
+delete tn
+pause KTestDelay
+[Endtest]
+
+
+// ---------------------------------------------------------------------------
+// Test WMA png & empty album arts
+// ---------------------------------------------------------------------------
+[Test]
+title Test WMA png & empty album arts
+create ThumbnailManagerTest tn
+tn CreateInstanceL
+tn SetDisplayModeL EColor16M
+
+// try to create thumbnail from PNG
+tn CreateSourceInstancePathL \data\ThumbnailManagerTest\wma_png.wma
+tn DeleteThumbnails
+tn SetThumbnailEnumSizeL EAudioFullScreenThumbnailSize
+tn GetThumbnailL
+allownextresult KErrNotFound
+waittestclass tn
+tn DeleteThumbnails
+tn DeleteSourceInstance  
+
+// try to create thumbnail without album art
+tn CreateSourceInstancePathL \data\ThumbnailManagerTest\wma_empty.wma
+tn DeleteThumbnails
+tn SetThumbnailEnumSizeL EAudioFullScreenThumbnailSize
+tn GetThumbnailL
+allownextresult KErrNotFound
+waittestclass tn
+tn DeleteThumbnails
+tn DeleteSourceInstance 
+
+tn DeleteInstance
+delete tn
+pause KTestDelay
+[Endtest]
+
+// ---------------------------------------------------------------------------
+// Create thumbnail preview with EXIF 
+// ---------------------------------------------------------------------------
+[Test]
+title Create thumbnail preview with EXIF
+create ThumbnailManagerTest tn
+tn CreateInstanceL
+tn SetDisplayModeL EColor16M
+
+// jpg with exif
+tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
+tn DeleteThumbnails
+tn SetThumbnailEnumSizeL EImageGridThumbnailSize
+tn SetQualityPreferenceL EOptimizeForQualityWithPreview
+tn GetThumbnailL
+waittestclass tn
+tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
+tn DeleteThumbnails
+tn DeleteSourceInstance 
+
+// png with exif
+tn CreateSourceInstancePathL \data\ThumbnailManagerTest\exif.png
+tn DeleteThumbnails
+tn SetThumbnailEnumSizeL EImageGridThumbnailSize
+tn SetQualityPreferenceL EOptimizeForQualityWithPreview
+tn GetThumbnailL
+waittestclass tn
+tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
+tn DeleteThumbnails
+tn DeleteSourceInstance 
+
+// no exif
+tn CreateSourceInstancePathL \data\ThumbnailManagerTest\no_exif.jpg
+tn DeleteThumbnails
+tn SetThumbnailEnumSizeL EImageGridThumbnailSize
+tn SetQualityPreferenceL EOptimizeForQualityWithPreview
+tn GetThumbnailL
+waittestclass tn
+tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
+tn DeleteThumbnails
+tn DeleteSourceInstance 
+
+tn DeleteInstance
+delete tn
+pause KTestDelay
+[Endtest]
+
+// ---------------------------------------------------------------------------
+// Create thumbnails by Url
+// ---------------------------------------------------------------------------
+[Test]
+title Create thumbnails by Url
+create ThumbnailManagerTest tn
+tn CreateInstanceL
+tn SetDisplayModeL EColor16M
+
+// try to create thumbnail from image
+tn CreateThumbnailsByUrlL \data\ThumbnailManagerTest\RGB_VGA.jpg
+waittestclass tn
+tn DeleteThumbnails
+tn DeleteSourceInstance  
+
+// try to create thumbnail from music
+tn CreateThumbnailsByUrlL \data\ThumbnailManagerTest\mp3_png.mp3
+waittestclass tn
+tn DeleteThumbnails
+tn DeleteSourceInstance  
+
+// try to create thumbnail from video
+tn CreateThumbnailsByUrlL \data\ThumbnailManagerTest\Videoclip.mp4
+waittestclass tn
+tn DeleteThumbnails
+tn DeleteSourceInstance  
+
+tn DeleteInstance
+delete tn
+pause KTestDelay
+[Endtest]
+
+// ---------------------------------------------------------------------------
+// Get thumbnails
+// ---------------------------------------------------------------------------
+[Test]
+title Get thumbnails
+create ThumbnailManagerTest tn
+tn CreateInstanceL
+tn SetDisplayModeL EColor16M
+
+// Get thumbnail with url
+tn SetThumbnailEnumSizeL EImageGridThumbnailSize
+tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
+tn DeleteThumbnails
+tn CreateThumbnails
+waittestclass tn
+
+pause KTenSecondDelay
+
+tn GetThumbnailL
+waittestclass tn
+tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
+tn DeleteThumbnails
+tn DeleteSourceInstance
+
+// Get thumbnail with EDoNotCreate flag on
+tn SetThumbnailEnumSizeL EImageGridThumbnailSize
+tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
+tn SetFlagsL EDoNotCreate
+tn DeleteThumbnails
+tn GetThumbnailL
+allownextresult KErrNotFound
+waittestclass tn
+tn DeleteThumbnails
+
+tn DeleteSourceInstance
+tn DeleteInstance
+delete tn
+pause KTestDelay
+[Endtest]
+
+// ---------------------------------------------------------------------------
+// Run multiple tests
+// ---------------------------------------------------------------------------
+[Test]
+title Run multiple tests
+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 
+
+// mp3 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
+
+// corrupted file
+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
+
+// delete one thumbnail
+tn SetThumbnailEnumSizeL EImageGridThumbnailSize
+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
+
+// delete 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]
\ No newline at end of file