videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybackcontrolpolicy/src/testmpxvideoplaybackcontrolpolicy.cpp
changeset 36 8aed59de29f9
parent 35 3738fe97f027
equal deleted inserted replaced
35:3738fe97f027 36:8aed59de29f9
    13 *
    13 *
    14 * Description:   tester for methods in TestMPXVideoPlaybackControlPolicy
    14 * Description:   tester for methods in TestMPXVideoPlaybackControlPolicy
    15 * 
    15 * 
    16 */
    16 */
    17 
    17 
    18 // Version : %version:  2 %
    18 // Version : %version:  4 %
    19 
    19 
    20 
    20 
    21 #include <qdebug>
    21 #include <qdebug>
    22 
    22 
    23 #include <hbmainwindow.h>
    23 #include <hbmainwindow.h>
   117 
   117 
   118     init();
   118     init();
   119 
   119 
   120     TUint properties = 0;
   120     TUint properties = 0;
   121 
   121 
   122     mDetails->mPlaybackMode = EMPXVideoLocal;
   122     mDetails->mPlaybackMode = EMPXVideoStreaming;
   123 
       
   124     mPolicy->setControlProperties( EMPXStatusPane, properties, mDetails, EFullScreenView );
       
   125     QVERIFY( properties == ( EMPXShownWhenPlaying | EMPXShownWhenPaused | EMPXShownWhenSeeking ) );
       
   126 
       
   127     mPolicy->setControlProperties( EMPXStatusPane, properties, mDetails, EDetailsView );
   123     mPolicy->setControlProperties( EMPXStatusPane, properties, mDetails, EDetailsView );
   128     QVERIFY( properties == EMPXAllProperties );
   124     QVERIFY( properties == EMPXAllProperties );
       
   125 
       
   126     mDetails->mPlaybackMode = EMPXVideoLocal;
       
   127     mPolicy->setControlProperties( EMPXStatusPane, properties, mDetails, EFullScreenView );
       
   128     QVERIFY( properties == 
       
   129             ( EMPXShownWhenPlaying | EMPXShownWhenPaused | EMPXShownWhenSeeking | EMPXShownWhenBuffering) );
   129 
   130 
   130     cleanup();
   131     cleanup();
   131 }
   132 }
   132 
   133 
   133 // ---------------------------------------------------------------------------
   134 // ---------------------------------------------------------------------------
   146     QVERIFY( properties == 0 );
   147     QVERIFY( properties == 0 );
   147 
   148 
   148     mPolicy->setControlProperties( EMPXControlBar, properties, mDetails, EAudioOnlyView );
   149     mPolicy->setControlProperties( EMPXControlBar, properties, mDetails, EAudioOnlyView );
   149     QVERIFY( properties == EMPXAllProperties );
   150     QVERIFY( properties == EMPXAllProperties );
   150 
   151 
       
   152     mDetails->mPlaybackMode = EMPXVideoLocal;
   151     mPolicy->setControlProperties( EMPXControlBar, properties, mDetails, EFullScreenView );
   153     mPolicy->setControlProperties( EMPXControlBar, properties, mDetails, EFullScreenView );
   152     QVERIFY( properties == ( EMPXShownWhenPlaying | EMPXShownWhenPaused | EMPXShownWhenSeeking ) );
   154     QVERIFY( properties == 
       
   155             ( EMPXShownWhenPlaying | EMPXShownWhenPaused | EMPXShownWhenSeeking | EMPXShownWhenBuffering ) );
       
   156 
       
   157     mDetails->mPlaybackMode = EMPXVideoStreaming;
       
   158     mPolicy->setControlProperties( EMPXControlBar, properties, mDetails, EFullScreenView );
       
   159     QVERIFY( properties == 
       
   160             ( EMPXShownWhenPlaying | EMPXShownWhenPaused | EMPXShownWhenSeeking ) );
   153 
   161 
   154     cleanup();
   162     cleanup();
   155 }
   163 }
   156 
   164 
   157 // ---------------------------------------------------------------------------
   165 // ---------------------------------------------------------------------------