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. |