imagehandling_plat/thumbnailmanager_api/tsrc/conf/ThumbnailManagerTest.cfg
changeset 14 2edacbf5d3f9
parent 0 2014ca87e772
child 30 b67379558a75
equal deleted inserted replaced
1:235a7fc86938 14:2edacbf5d3f9
    52 
    52 
    53 // A delay to make sure the client-server request to generate a thumbnail
    53 // A delay to make sure the client-server request to generate a thumbnail
    54 // reaches the server, but doesn't have enough time to complete yet
    54 // reaches the server, but doesn't have enough time to complete yet
    55 // (milliseconds)
    55 // (milliseconds)
    56 KClientServerDelay 150
    56 KClientServerDelay 150
    57 KClientServerDelay2 25
       
    58 KClientServerDelay3 10
       
    59 
    57 
    60 // From TDisplayMode: value for 24-bit display mode
    58 // From TDisplayMode: value for 24-bit display mode
    61 EColor16M 8
    59 EColor16M 8
    62 EColor64K 7
    60 EColor64K 7
    63 KDefaultDisplayMode 7
    61 KDefaultDisplayMode 7
  1856 tn DeleteSourceInstance
  1854 tn DeleteSourceInstance
  1857 
  1855 
  1858 pause KTenSecondDelay
  1856 pause KTenSecondDelay
  1859 
  1857 
  1860 tn UpdatePathL 99999 \data\ThumbnailManagerTest\updated_path.bmp
  1858 tn UpdatePathL 99999 \data\ThumbnailManagerTest\updated_path.bmp
  1861 waittestclass tn
       
  1862 
  1859 
  1863 pause KTenSecondDelay
  1860 pause KTenSecondDelay
  1864 
  1861 
  1865 tn SetFlagsL EDoNotCreate
  1862 tn SetFlagsL EDoNotCreate
  1866 tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
  1863 tn CreateSourceInstancePathL \data\ThumbnailManagerTest\RGB_VGA.jpg
  1867 tn GetThumbnailL
  1864 tn GetThumbnailL
  1868 allownextresult KErrNotFound
       
  1869 waittestclass tn
  1865 waittestclass tn
  1870 tn DeleteSourceInstance
  1866 tn DeleteSourceInstance
  1871 
  1867 
  1872 tn CreateSourceInstancePathL \data\ThumbnailManagerTest\updated_path.bmp 99999
  1868 tn CreateSourceInstancePathL \data\ThumbnailManagerTest\updated_path.bmp 99999
  1873 tn GetThumbnailByIdL 99999
  1869 tn GetThumbnailByIdL 99999
  1936 
  1932 
  1937 tn CreateSourceInstancePathL \data\ThumbnailManagerTest\TALL_400x800.bmp
  1933 tn CreateSourceInstancePathL \data\ThumbnailManagerTest\TALL_400x800.bmp
  1938 tn GetThumbnailL
  1934 tn GetThumbnailL
  1939 tn DeleteSourceInstance
  1935 tn DeleteSourceInstance
  1940 
  1936 
  1941 pause KClientServerDelay2
  1937 pause KClientServerDelay
  1942 
  1938 
  1943 // The server should have the two thumbnail requests queued by now.
  1939 // The server should have the two thumbnail requests queued by now.
  1944 // This should cancel the second one while letting the first one finish.
  1940 // This should cancel the second one while letting the first one finish.
  1945 tn CancelPrevious
  1941 tn CancelPrevious
  1946 
  1942 
  1955 // ---------------------------------------------------------------------------
  1951 // ---------------------------------------------------------------------------
  1956 // Priority handling
  1952 // Priority handling
  1957 // ---------------------------------------------------------------------------
  1953 // ---------------------------------------------------------------------------
  1958 [Test]
  1954 [Test]
  1959 title Priority handling
  1955 title Priority handling
  1960 create ThumbnailManagerTest tn
       
  1961 tn CreateInstanceL
       
  1962 tn SetDisplayModeL EColor16M
       
  1963 tn SetThumbnailEnumSizeL ECustomThumbnailSize
       
  1964 
       
  1965 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
       
  1966 tn DeleteThumbnails
       
  1967 tn DeleteSourceInstance
       
  1968 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
       
  1969 tn DeleteThumbnails
       
  1970 tn DeleteSourceInstance
       
  1971 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
       
  1972 tn DeleteThumbnails
       
  1973 tn DeleteSourceInstance
       
  1974 
       
  1975 // First request with 100 priority
       
  1976 tn SetThumbnailSizeL 80 40
       
  1977 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
       
  1978 tn GetThumbnailL 0 100
       
  1979 tn DeleteSourceInstance
       
  1980 
       
  1981 // Second request with negative priority
       
  1982 tn SetThumbnailSizeL 1 1
       
  1983 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
       
  1984 tn GetThumbnailL 0 -50
       
  1985 tn DeleteSourceInstance
       
  1986 
       
  1987 // Third request with positive priority
       
  1988 tn SetThumbnailSizeL 40 30
       
  1989 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
       
  1990 tn GetThumbnailL 0 50
       
  1991 tn DeleteSourceInstance
       
  1992 
       
  1993 // First request should complete first, since the server started processing
       
  1994 // it before the other requests were done
       
  1995 waittestclass tn
       
  1996 tn CheckThumbnailL 80 40 EColor16M
       
  1997 
       
  1998 // The third request should finish next
       
  1999 waittestclass tn
       
  2000 tn CheckThumbnailL 40 30 EColor16M
       
  2001 
       
  2002 // The second request should finish last, since it had the lowest priority
       
  2003 waittestclass tn
       
  2004 tn CheckThumbnailL 1 1 EColor16M
       
  2005 
       
  2006 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
       
  2007 tn DeleteThumbnails
       
  2008 tn DeleteSourceInstance
       
  2009 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
       
  2010 tn DeleteThumbnails
       
  2011 tn DeleteSourceInstance
       
  2012 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
       
  2013 tn DeleteThumbnails
       
  2014 tn DeleteSourceInstance
       
  2015 
       
  2016 tn DeleteInstance
       
  2017 delete tn
       
  2018 pause KTestDelay
       
  2019 [Endtest]
       
  2020 
       
  2021 // ---------------------------------------------------------------------------
       
  2022 // Change priority
       
  2023 // ---------------------------------------------------------------------------
       
  2024 [Test]
       
  2025 title Change priority
       
  2026 create ThumbnailManagerTest tn
  1956 create ThumbnailManagerTest tn
  2027 tn CreateInstanceL
  1957 tn CreateInstanceL
  2028 tn SetDisplayModeL EColor16M
  1958 tn SetDisplayModeL EColor16M
  2029 tn SetThumbnailEnumSizeL ECustomThumbnailSize
  1959 tn SetThumbnailEnumSizeL ECustomThumbnailSize
  2030 
  1960 
  2042 tn SetThumbnailSizeL 80 40
  1972 tn SetThumbnailSizeL 80 40
  2043 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
  1973 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
  2044 tn GetThumbnailL 0 0
  1974 tn GetThumbnailL 0 0
  2045 tn DeleteSourceInstance
  1975 tn DeleteSourceInstance
  2046 
  1976 
       
  1977 // Short delay to make sure the server starts processing this request
       
  1978 pause KClientServerDelay
       
  1979 
  2047 // Second request with negative priority
  1980 // Second request with negative priority
  2048 tn SetThumbnailSizeL 1 1
  1981 tn SetThumbnailSizeL 1 1
  2049 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
  1982 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
  2050 tn GetThumbnailL 0 -50
  1983 tn GetThumbnailL 0 -10
  2051 tn DeleteSourceInstance
  1984 tn DeleteSourceInstance
  2052 
  1985 
  2053 // Third request with positive priority
  1986 // Third request with positive priority
  2054 tn SetThumbnailSizeL 40 30
  1987 tn SetThumbnailSizeL 40 30
  2055 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
  1988 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
  2056 tn GetThumbnailL 0 50
  1989 tn GetThumbnailL 0 10
  2057 tn DeleteSourceInstance
  1990 tn DeleteSourceInstance
  2058 
       
  2059 // Change the priority of the third request to a low value
       
  2060 tn ChangePreviousPriority -100
       
  2061 
  1991 
  2062 // First request should complete first, since the server started processing
  1992 // First request should complete first, since the server started processing
  2063 // it before the other requests were done
  1993 // it before the other requests were done
  2064 waittestclass tn
  1994 waittestclass tn
  2065 tn CheckThumbnailL 80 40 EColor16M
  1995 tn CheckThumbnailL 80 40 EColor16M
  2066 
  1996 
  2067 // The second request should finish next
  1997 // The third request should finish next, since it had the highest priority of
       
  1998 // the other tasks.
       
  1999 waittestclass tn
       
  2000 tn CheckThumbnailL 40 30 EColor16M
       
  2001 
       
  2002 // The second request should finish last, since it had the lowest priority
       
  2003 waittestclass tn
       
  2004 tn CheckThumbnailL 1 1 EColor16M
       
  2005 
       
  2006 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
       
  2007 tn DeleteThumbnails
       
  2008 tn DeleteSourceInstance
       
  2009 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
       
  2010 tn DeleteThumbnails
       
  2011 tn DeleteSourceInstance
       
  2012 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
       
  2013 tn DeleteThumbnails
       
  2014 tn DeleteSourceInstance
       
  2015 
       
  2016 tn DeleteInstance
       
  2017 delete tn
       
  2018 pause KTestDelay
       
  2019 [Endtest]
       
  2020 
       
  2021 // ---------------------------------------------------------------------------
       
  2022 // Change priority
       
  2023 // ---------------------------------------------------------------------------
       
  2024 [Test]
       
  2025 title Change priority
       
  2026 create ThumbnailManagerTest tn
       
  2027 tn CreateInstanceL
       
  2028 tn SetDisplayModeL EColor16M
       
  2029 tn SetThumbnailEnumSizeL ECustomThumbnailSize
       
  2030 
       
  2031 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
       
  2032 tn DeleteThumbnails
       
  2033 tn DeleteSourceInstance
       
  2034 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
       
  2035 tn DeleteThumbnails
       
  2036 tn DeleteSourceInstance
       
  2037 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
       
  2038 tn DeleteThumbnails
       
  2039 tn DeleteSourceInstance
       
  2040 
       
  2041 // First request with 0 priority
       
  2042 tn SetThumbnailSizeL 80 40
       
  2043 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\WIDE_800x400.gif
       
  2044 tn GetThumbnailL 0 0
       
  2045 tn DeleteSourceInstance
       
  2046 
       
  2047 // Short delay to make sure the server starts processing this request
       
  2048 pause KClientServerDelay
       
  2049 
       
  2050 // Second request with negative priority
       
  2051 tn SetThumbnailSizeL 1 1
       
  2052 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\TALL_400x800.bmp
       
  2053 tn GetThumbnailL 0 -10
       
  2054 tn DeleteSourceInstance
       
  2055 
       
  2056 // Third request with positive priority
       
  2057 tn SetThumbnailSizeL 40 30
       
  2058 tn CreateSourceInstanceHandleL \data\ThumbnailManagerTest\SVG_640x480.svg
       
  2059 tn GetThumbnailL 0 10
       
  2060 tn DeleteSourceInstance
       
  2061 
       
  2062 // Change the priority of the third request to a low value
       
  2063 tn ChangePreviousPriority -20
       
  2064 
       
  2065 // First request should complete first, since the server started processing
       
  2066 // it before the other requests were done
       
  2067 waittestclass tn
       
  2068 tn CheckThumbnailL 80 40 EColor16M
       
  2069 
       
  2070 // The second request should finish next, since it had the highest priority of
       
  2071 // the other tasks.
  2068 waittestclass tn
  2072 waittestclass tn
  2069 tn CheckThumbnailL 1 1 EColor16M
  2073 tn CheckThumbnailL 1 1 EColor16M
  2070 
  2074 
  2071 // The third request should finish last, since the priority was changed to the
  2075 // The third request should finish last, since the priority was changed to the
  2072 // lowest value.
  2076 // lowest value.
  2116 tn CreateThumbnails
  2120 tn CreateThumbnails
  2117 waittestclass tn
  2121 waittestclass tn
  2118 
  2122 
  2119 pause KTenSecondDelay
  2123 pause KTenSecondDelay
  2120 
  2124 
  2121 tn DeleteSourceInstance
       
  2122 
       
  2123 tn CreateSourceInstancePathL \data\ThumbnailManagerTest\camera.jpg
       
  2124 tn SetFlagsL EDoNotCreate
  2125 tn SetFlagsL EDoNotCreate
  2125 tn SetThumbnailEnumSizeL EImageGridThumbnailSize
  2126 tn SetThumbnailEnumSizeL EImageGridThumbnailSize
  2126 tn GetThumbnailL
  2127 tn GetThumbnailL
  2127 waittestclass tn
  2128 waittestclass tn
  2128 tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
  2129 tn CheckThumbnailCenrepL EImageGridThumbnailSize EColor16M
       
  2130 tn SetThumbnailEnumSizeL EImageListThumbnailSize
       
  2131 tn GetThumbnailL
       
  2132 waittestclass tn
       
  2133 tn CheckThumbnailCenrepL EImageListThumbnailSize EColor16M
  2129 tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
  2134 tn SetThumbnailEnumSizeL EImageFullScreenThumbnailSize
  2130 tn GetThumbnailL
  2135 tn GetThumbnailL
  2131 waittestclass tn
  2136 waittestclass tn
  2132 tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
  2137 tn CheckThumbnailCenrepL EImageFullScreenThumbnailSize EColor16M
  2133 tn DeleteThumbnails
  2138 tn DeleteThumbnails